content
stringlengths
7
2.61M
import numpy as np import matplotlib.pyplot as plt import librosa.display import librosa import pathlib import os def read_audio_file(path, fs): audio_sample = librosa.load(str(path), sr=fs) return audio_sample sr = 16000 hop_length = 256 n_fft = 512 data_dir = pathlib.Path("../melgan-neurips/output") _, ext = os.path.splitext(os.listdir(data_dir)[3]) paths = list(data_dir.glob("*" + ext)) cats = np.load("sc09.npy") rnd_paths = np.random.choice(paths, size=9) images = [] for rp in rnd_paths: audio = read_audio_file(rp, 16000) D = np.abs(librosa.stft(audio[0], n_fft=n_fft, hop_length=hop_length)) DB = librosa.amplitude_to_db(D, ref=np.max) images.append(DB) """ indices = np.random.choice(np.arange(cats.shape[0]), size=9) images = [] for rp in indices: D = np.abs(librosa.stft(cats[rp].reshape(-1), n_fft=n_fft, hop_length=hop_length)) DB = librosa.amplitude_to_db(D, ref=np.max) images.append(DB) """ fig, ax = plt.subplots(nrows=3, ncols=3) c = 0 for row in ax: for col in row: col.imshow(images[c], aspect="auto", cmap="gnuplot") col.set_axis_off() c += 1 plt.subplots_adjust(hspace=0.02, wspace=0.02) plt.savefig("../results/melgan_gen_random_spectrogram_test", bbox_inches="tight", pad_inches=0)
Mechanisms Responsible for StratospheretoTroposphere Transport Around a Mesoscale Convective System Anvil Recent observational studies have shown that stratospheric air rich in ozone (O3) is capable of being transported into the upper troposphere in association with tropopausepenetrating convection (anvil wrapping). This finding challenges the current understanding of upper tropospheric sources of O3, which is traditionally thought to come from thunderstorm outflows where lightninggenerated nitrogen oxides facilitate O3 formation. Since tropospheric O3 is an important greenhouse gas and the frequency and strength of tropopausepenetrating storms may change in a changing climate, it is important to understand the mechanisms driving this transport process so that it can be better represented in chemistryclimate models. Simulations of a mesoscale convective system (MCS) around which this transport process was observed are performed using the Weather Research and Forecasting model coupled with Chemistry. The Weather Research and Forecasting model coupled with Chemistry model adequately simulates anvil wrapping of ozonerich air. Possible mechanisms that influence the transport, including smallscale static and dynamic instabilities and MCSinduced mesoscale circulations, are evaluated. Model results suggest that anvil wrapping is a twostep transport process compensating subsidence surrounding the MCS, which is driven by mass conservation as the MCS transports tropospheric air into the upper troposphere and lower stratosphere, followed by differential advection beneath the core of the MCS uppertropospheric outflow jet which wraps high O3 air around and under the MCS cloud anvil. Static and dynamic instabilities are not a leading contributor to this transport process. Continued finescale modeling of these events is needed to fully represent the stratospheretotroposphere transport process.
/** * Read the content of a text file from the src/main/resources folder. * Used to read vtl scripts. * * @param filePath * The path to the file (or only the file name if the file is directly in the resources folder). * * @return * The content of the file in a string. */ public static String readFromResources(String filePath) { ClassLoader classloader = Thread.currentThread().getContextClassLoader(); InputStream is = classloader.getResourceAsStream(filePath); if (is != null) { try{ InputStreamReader isr = new InputStreamReader(is); is.close(); return readTextContent(isr); } catch(IOException e){ log.warn(String.format("Unable to read the resource text file %s.", filePath), e); return null; } } else { log.warn("null input stream trying to read resource: " + filePath); return null; } }
Comparison of Control Techniques for Damping of Oscillations in Power System using STATCOM In a power system if any disturbance occur the machines or generators initially oscillate and then settle down at stable equilibrium point. To damp out these oscillations FACTS devices can be used as a viable option. One such popular FACT device is STATCOM. In this paper an attempt has been made to compare two controlling techniques for damping out power system oscillation using STATCOM. First technique is a Bang-Bang controller (BBC) and the other is transient energy control law. Both the techniques are used in a single machine infinite bus (SMIB) system to see the effect of the regulating law used. Stability is increased thereby damping of oscillation induced due to fault in the system.
Dendritic cells and atopic eczema/dermatitis syndrome Purpose of reviewThe manifestation of atopic eczema/dermatitis syndrome is believed to result from a complex interrelationship of environmental factors, pharmacological abnormalities, skin barrier defects, and immunological phenomena. Although we are only beginning to understand the molecular basis of this disease, much progress has been made in defining key events leading to the manifestation of allergic inflammation. Here, we review recent findings that underscore the importance of dendritic cells as being central to shape these proinflammatory responses. Recent findingsEvidence for a differential regulation of the high affinity receptor for IgE, FcRI, on the surface of atopic dendritic cells compared with non-atopic dendritic cells became apparent. In atopic donors, in contrast to non-atopic donors, the intracellular expression of the -chains of FcRI is sufficient, thus leading to the assembly with the -chain and surface expression of the receptor. This finding is of considerable interest for an understanding of the pathophysiology of IgE-mediated dendritic cell functions in atopic eczema/dermatitis syndrome. In addition, it has been shown that keratinocytes from the epidermal skin of individuals with atopic eczema/dermatitis syndrome express human thymic stromal lymphopoietin, which activates dendritic cells to attract T helper type 2 cells into the skin. Furthermore, these activated dendritic cells prime nave T cells into T helper type 2 cells. SummaryThe past few years have seen a remarkable process of refocusing in atopy. Dendritic cells in particular have been at the centre of this process. It has become unequivocally clear that these cells have the power of shaping the allergic response.
Feasibility of messenger-marketing for promotion of goods and services on the internet The relevance and role of using instant messengers in the promotion of goods and services of enterprises are substantiated in the research. The advantages (affordability, variability of content, loyalty, high efficiency) and disadvantages (lack of API, lack of popularity, lack of legislative regulation and the difficulty of controlling mailings) of using messenger marketing in the enterprises Internet marketing system are presented. The trends in the use of instant messengers in Ukraine and the features of using each of the instant messengers at the present stage of development of Internet marketing are considered. An overview of the tools of such popular instant messengers in Ukraine as WhatsApp, Viber, Telegram, Facebook Messenger, Skype is provided and their comparative characteristics are compiled. The main stages of the instant messengers implementation and the benefits for the company with a reasonable choice of an instant messaging service in Internet marketing are described.
Like new Old Town townhouse with 3 BR 2.5 Baths and almost 1800 sqft. 9' Ceilings and Maple hardwood floors through the entire main level. Open kitchen with granite countertops, large breakfast bar and stainless steel appliances. Cedar grill deck off the main. Vaulted ceilings through all upstairs bedrooms. Master suite with tile floors, dual vanities, walk in closet and walk in tile shower. 3 Panel white doors. Espresso trim. 2" wood blinds throughout. Perfect central Coralville Location.
/** * Override AdapterView.OnItemClickListener method * @param parent adapter param * @param view listView * @param position list index * @param id Long */ @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id){ Counter countersname; indexRemoved = position; countersname = (Counter)(parent.getItemAtPosition(position)); Intent i = new Intent(getApplicationContext(), Detail.class); i.putExtra("COUNTER", countersname); startActivityForResult(i,REQUEST_CODE_TWO); }
. OBJECTIVE To study the gene mutants of G6PD deficiency and their clinical featuers among children in Luzhou area. METHODS 732 children with suspected G6PD deficiency in Luzhou area from March 2017 to July 2019 were selected, which were examined for G6PD enzyme activity and gene mutation. The G6PD enzyme activity was detected by ultraviolet rate quantification, and the gene mutation was detected by melting curve analysis-based PCR assay, and the clinical characteristics of different mutants when acute hemolysis happens were analyzed. RESULTS 387 positive specimens were detected in 732 specimens, among which the gene mutation and the enzyme activity decrease was found in specimens 326, 49 specimens showed gene mutation but without the enzyme activity decrease, and 12 specimens without gene mutation but with the enzyme activity decrease. Among 375 positive samples with gene mutation, c.1376G>T, c.1388G>A, c.1024C>T and c.95A>G were the most common. The enzyme activity of c.1376G>T and c.1388G>A was statistically significantly different with c.1024C>T. The most common incentives of acute hemolysis was broad bean, the reticulocyte count was statistically significantly different among c.1376G>T, c.1388G>A and c.95A>G. The hemoglobin level of c.1376G>T was statistically significantly different from with c.95A>G. Moreover, c.1376G>T, c.1388G>A was lower than c.1024 C>T. When acute hemolysis occurs, the reticulocyte count and hemoglobin changes were different between different mutation types, while the patients age, hospitalization time, blood transfusion, total bilirubin, and urine color recovery time of the patients were not statistically different. CONCLUSION The common mutants of G6PD deficiency among children in Luzhou area are c.1376G>T, and c.1388G>A, c.1024C>T. Favism is the most common clinical manifestation of G6PD deficiency.
<filename>applications/ObjectEditor/include/ObjectEditorCommonData.h #pragma once #include <QString> #include <mtt/render/RenderScene.h> #include <mtt/editorLib/AnimationPlayer.h> #include <mtt/editorLib/EditorCommonData.h> #include <mtt/editorLib/EditorUndoStack.h> #include <ObjectEditorScene.h> class ObjectEditorCommonData : public mtt::EditorCommonData { Q_OBJECT public: ObjectEditorCommonData(); ObjectEditorCommonData(const ObjectEditorCommonData&) = delete; ObjectEditorCommonData& operator = (const ObjectEditorCommonData&) = delete; virtual ~ObjectEditorCommonData() noexcept = default; inline ObjectEditorScene* scene() const noexcept; /// Returns old scene virtual std::unique_ptr<ObjectEditorScene> setScene( std::unique_ptr<ObjectEditorScene> newScene); inline mtt::AnimationPlayer& animationPlayer() noexcept; inline const mtt::AnimationPlayer& animationPlayer() const noexcept; signals: void sceneChanged(ObjectEditorScene* newScene); private: mtt::AnimationPlayer _animationPlayer; mtt::EditorUndoStack _undoStack; }; inline ObjectEditorScene* ObjectEditorCommonData::scene() const noexcept { return static_cast<ObjectEditorScene*>(CommonEditData::scene()); } inline mtt::AnimationPlayer& ObjectEditorCommonData::animationPlayer() noexcept { return _animationPlayer; } inline const mtt::AnimationPlayer& ObjectEditorCommonData::animationPlayer() const noexcept { return _animationPlayer; }
<gh_stars>0 import { Directive, ElementRef, HostListener } from '@angular/core'; @Directive({ selector: '[ngFyRipple]' }) export class RippleDirective { constructor( private el?:ElementRef ) { } @HostListener('click',['$event']) onClick(event){ let child = document.createElement('div'), weight = this.el.nativeElement.offsetHeight > this.el.nativeElement.offsetWidth ? this.el.nativeElement.offsetHeight : this.el.nativeElement.offsetWidth; child.style.height = (weight*2.4)+"px"; child.style.width = (weight*2.4)+"px"; child.style.left = (event.offsetX)+"px"; child.style.top = (event.offsetY)+"px"; child.classList.add('ripple-div'); this.el.nativeElement.appendChild(child); setTimeout(() => { this.el.nativeElement.removeChild(child); }, 1000); } }
<reponame>hackforthesea/hackforthesea.tech<gh_stars>1-10 # -*- coding: utf-8 -*- from __future__ import unicode_literals from datetime import datetime from django.contrib.auth.models import User from django.db import models from ordered_model.models import OrderedModel class BeneficiaryOrganization(models.Model): name = models.CharField(max_length=512) logo = models.FileField(upload_to='beneficiary_logos/', null=True) url = models.URLField() def __str__(self): return self.name class ChallengeStatement(OrderedModel): question = models.CharField(max_length=320) image = models.FileField(upload_to='challenge_imgages/', null=True) description = models.TextField() hackathon = models.ForeignKey("Hackathon", on_delete=models.CASCADE) beneficiaries = models.ManyToManyField(BeneficiaryOrganization, related_name='challenges') pass def __str__(self): return self.question class Meta(OrderedModel.Meta): pass class DataSet(models.Model): title = models.CharField(max_length=512) note = models.CharField(max_length=512, null=True, blank=True) url = models.URLField() challenge = models.ManyToManyField(ChallengeStatement, related_name="datasets") def __str__(self): return self.title class Hackathon(models.Model): name = models.CharField(max_length=512) unlocode = models.CharField(max_length=5, unique=True) description = models.TextField() ticket_link = models.URLField() address = models.CharField(max_length=512) city = models.CharField(max_length=512) state = models.CharField(max_length=2) logo = models.FileField(upload_to='hackathon_logos/', null=True) start_time = models.DateTimeField(default=datetime.now, blank=True) end_time = models.DateTimeField(default=datetime.now, blank=True) organizers = models.ManyToManyField(User, related_name="hackathons") def __str__(self): return self.name class Purveyor(models.Model): name = models.CharField(max_length=512) logo = models.FileField(upload_to='sponsor_logos/', null=True) in_footer = models.BooleanField() url = models.URLField() def __str__(self): return self.name class Team(models.Model): name = models.CharField(max_length=512) hackathon = models.ForeignKey('Hackathon', on_delete=models.CASCADE) def __str__(self): return self.name class FrequentlyAskedQuestion(models.Model): question = models.TextField() answer = models.TextField() hackathon = models.ForeignKey(Hackathon, on_delete=models.CASCADE) def __str__(self): return self.question
The expression ‘burying the lede’ refers to the practice of hiding key information deep in the body of an article while front-loading less pressing details. Variety did just that in a new report on an upcoming film called Bright (more on that in a moment), but allow us to go right ahead and exhume the lede they buried: the schedule for Bright has been contoured to free up star Will Smith and director David Ayer in time for a 2017 shoot Suicide Squad 2 . So, yes Suicide Squad 2 is happening. Unfortunately we don’t know much yet at this point, but if Will Smith is back, you can bet Margot Robbie will return as well. Bright , though: Ayer has taken on what sounds like a combination fantasy adventure / cop drama (?) as his next major project. Working from a script from Max Landis, the less-than-masterful pen behind last year’s thoroughly meh American Ultra and straight-up bad Victor Frankenstein , Ayer will weave a tale described by Variety both as containing fairies and orcs, but also somehow being in the vein of Ayer’s Jake Gyllenhaal/Michael Peña police procedural End of Watch . Maybe in the fantastical world of Southcentralia, two experienced fairy enforcers are the only thing standing between the roving gangs of orcs and total lawless pandemonium? Will Smith and Joel Edgerton have agreed to head up the cast as the (ostensibly magic) partners in law enforcement at the center of the upcoming film, which still has yet to be purchased by a major studio. Once it does, we’ll get to the good stuff — release dates, full cast, plot synopsis, y’all know the drill. Until then, we can all snigger childishly at the weird thought of a gritty cop drama about fairies and orcs. (“When you live by the magic wand, you die by the magic wand.”) Suicide Squad opens in theaters on August 5.
<filename>vite-frontend/src/App.tsx import { useEffect, useState } from 'react' import TodoItem from './components/TodoItem' import AddTodo from './components/AddTodo' import { getTodos, addTodo, updateTodo, deleteTodo } from './API' import './App.css' const App: React.FC = () => { const [todos, setTodos] = useState<ITodo[]>([]) useEffect(() => { fetchTodos() }, []) const fetchTodos = (): void => { getTodos() .then(({ data: { todos } }: ITodo[] | any) => setTodos(todos)) .catch((err: Error) => console.log(err)) } const handleSaveTodo = (e: React.FormEvent, formData: ITodo): void => { e.preventDefault() addTodo(formData) .then(({ status, data }) => { if (status !== 201) { throw new Error('Error! Todo not saved') } setTodos(data.todos) }) .catch((err) => console.log(err)) } const handleDeleteTodo = (_id: string): void => { deleteTodo(_id) .then(({ status, data }) => { if (status !== 200) { throw new Error('Error! Todo not deleted') } setTodos(data.todos) }) .catch((err) => console.log(err)) } const handleUpdateTodo = (todo: ITodo): void => { updateTodo(todo) .then(({ status, data }) => { if (status !== 200) { throw new Error('Error! Todo not deleted') } setTodos(data.todos) }) .catch((err) => console.log(err)) } return ( <main className="App"> <h1>My Todos</h1> <AddTodo saveTodo={handleSaveTodo} /> {todos.map((todo: ITodo) => ( <TodoItem key={todo._id} updateTodo={handleUpdateTodo} deleteTodo={handleDeleteTodo} todo={todo} /> ))} </main> ) } export default App
Retinal proteins associated with redox regulation and protein folding play central roles in response to high glucose conditions Diabetic retinopathy typically causes poor vision and blindness. A previous study revealed that a high blood glucose concentration induces glycoxidation and weakens the retinal capillaries. Nevertheless, the molecular mechanisms underlying the effects of high blood glucose induced diabetic retinopathy remain to be elucidated. In the present study, we cultured the retinal pigmented epithelial cell line ARPE19 in mannitolbalanced 5.5, 25, and 100 mM glucose media and investigated protein level alterations. Proteomic analysis revealed significant changes in 137 protein features, of which 124 demonstrated changes in a glucose concentration dependent manner. Several proteins functionally associated with redox regulation, protein folding, or the cytoskeleton are affected by increased glucose concentrations. Additional analyses also revealed that cellular oxidative stress, including endoplasmic reticulum stress, was significantly increased after treatment with high glucose concentrations. However, the mitochondrial membrane potential and cell survival remained unchanged during treatment with high glucose concentrations. To summarize, in this study, we used a comprehensive retinal pigmented epithelial cell based proteomic approach for identifying changes in protein expression associated retinal markers induced by high glucose concentrations. Our results revealed that a high glucose condition can induce cellular oxidative stress and modulate the levels of proteins with functions in redox regulation, protein folding, and cytoskeleton regulation; however, cell viability and mitochondrial integrity are not significantly disturbed under these high glucose conditions.
/** * * <pre> * &lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;comments xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://schemas.datacontract.org/2004/07/Inflectra.SpiraTest.Web.Services.v3_0.DataObjects" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;&lt;summary&gt; * Represents a single Release or Iteration artifact in the system * &lt;/summary&gt;&lt;remarks&gt; * Although the fields refer to Release, they are the same fields for an Iteration * &lt;/remarks&gt;&lt;/comments&gt; * </pre> * * * <p>Java class for RemoteRelease complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="RemoteRelease"> * &lt;complexContent> * &lt;extension base="{http://schemas.datacontract.org/2004/07/Inflectra.SpiraTest.Web.Services.v3_0.DataObjects}RemoteArtifact"> * &lt;sequence> * &lt;element name="Active" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/> * &lt;element name="AvailableEffort" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/> * &lt;element name="CreationDate" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/> * &lt;element name="CreatorId" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/> * &lt;element name="CreatorName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="DaysNonWorking" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/> * &lt;element name="Description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="EndDate" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/> * &lt;element name="FullName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="IndentLevel" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="Iteration" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/> * &lt;element name="LastUpdateDate" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/> * &lt;element name="Name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="PlannedEffort" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/> * &lt;element name="ProjectId" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/> * &lt;element name="ReleaseId" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/> * &lt;element name="ResourceCount" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/> * &lt;element name="StartDate" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/> * &lt;element name="Summary" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/> * &lt;element name="TaskActualEffort" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/> * &lt;element name="TaskCount" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/> * &lt;element name="TaskEstimatedEffort" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/> * &lt;element name="VersionNumber" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;/sequence> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "RemoteRelease", namespace = "http://schemas.datacontract.org/2004/07/Inflectra.SpiraTest.Web.Services.v3_0.DataObjects", propOrder = { "active", "availableEffort", "creationDate", "creatorId", "creatorName", "daysNonWorking", "description", "endDate", "fullName", "indentLevel", "iteration", "lastUpdateDate", "name", "plannedEffort", "projectId", "releaseId", "resourceCount", "startDate", "summary", "taskActualEffort", "taskCount", "taskEstimatedEffort", "versionNumber" }) public class RemoteRelease extends RemoteArtifact { @XmlElement(name = "Active") protected Boolean active; @XmlElementRef(name = "AvailableEffort", namespace = "http://schemas.datacontract.org/2004/07/Inflectra.SpiraTest.Web.Services.v3_0.DataObjects", type = JAXBElement.class) protected JAXBElement<Integer> availableEffort; @XmlElement(name = "CreationDate") @XmlSchemaType(name = "dateTime") protected XMLGregorianCalendar creationDate; @XmlElementRef(name = "CreatorId", namespace = "http://schemas.datacontract.org/2004/07/Inflectra.SpiraTest.Web.Services.v3_0.DataObjects", type = JAXBElement.class) protected JAXBElement<Integer> creatorId; @XmlElementRef(name = "CreatorName", namespace = "http://schemas.datacontract.org/2004/07/Inflectra.SpiraTest.Web.Services.v3_0.DataObjects", type = JAXBElement.class) protected JAXBElement<String> creatorName; @XmlElement(name = "DaysNonWorking") protected Integer daysNonWorking; @XmlElementRef(name = "Description", namespace = "http://schemas.datacontract.org/2004/07/Inflectra.SpiraTest.Web.Services.v3_0.DataObjects", type = JAXBElement.class) protected JAXBElement<String> description; @XmlElement(name = "EndDate") @XmlSchemaType(name = "dateTime") protected XMLGregorianCalendar endDate; @XmlElementRef(name = "FullName", namespace = "http://schemas.datacontract.org/2004/07/Inflectra.SpiraTest.Web.Services.v3_0.DataObjects", type = JAXBElement.class) protected JAXBElement<String> fullName; @XmlElementRef(name = "IndentLevel", namespace = "http://schemas.datacontract.org/2004/07/Inflectra.SpiraTest.Web.Services.v3_0.DataObjects", type = JAXBElement.class) protected JAXBElement<String> indentLevel; @XmlElement(name = "Iteration") protected Boolean iteration; @XmlElement(name = "LastUpdateDate") @XmlSchemaType(name = "dateTime") protected XMLGregorianCalendar lastUpdateDate; @XmlElementRef(name = "Name", namespace = "http://schemas.datacontract.org/2004/07/Inflectra.SpiraTest.Web.Services.v3_0.DataObjects", type = JAXBElement.class) protected JAXBElement<String> name; @XmlElementRef(name = "PlannedEffort", namespace = "http://schemas.datacontract.org/2004/07/Inflectra.SpiraTest.Web.Services.v3_0.DataObjects", type = JAXBElement.class) protected JAXBElement<Integer> plannedEffort; @XmlElementRef(name = "ProjectId", namespace = "http://schemas.datacontract.org/2004/07/Inflectra.SpiraTest.Web.Services.v3_0.DataObjects", type = JAXBElement.class) protected JAXBElement<Integer> projectId; @XmlElementRef(name = "ReleaseId", namespace = "http://schemas.datacontract.org/2004/07/Inflectra.SpiraTest.Web.Services.v3_0.DataObjects", type = JAXBElement.class) protected JAXBElement<Integer> releaseId; @XmlElement(name = "ResourceCount") protected Integer resourceCount; @XmlElement(name = "StartDate") @XmlSchemaType(name = "dateTime") protected XMLGregorianCalendar startDate; @XmlElement(name = "Summary") protected Boolean summary; @XmlElementRef(name = "TaskActualEffort", namespace = "http://schemas.datacontract.org/2004/07/Inflectra.SpiraTest.Web.Services.v3_0.DataObjects", type = JAXBElement.class) protected JAXBElement<Integer> taskActualEffort; @XmlElementRef(name = "TaskCount", namespace = "http://schemas.datacontract.org/2004/07/Inflectra.SpiraTest.Web.Services.v3_0.DataObjects", type = JAXBElement.class) protected JAXBElement<Integer> taskCount; @XmlElementRef(name = "TaskEstimatedEffort", namespace = "http://schemas.datacontract.org/2004/07/Inflectra.SpiraTest.Web.Services.v3_0.DataObjects", type = JAXBElement.class) protected JAXBElement<Integer> taskEstimatedEffort; @XmlElementRef(name = "VersionNumber", namespace = "http://schemas.datacontract.org/2004/07/Inflectra.SpiraTest.Web.Services.v3_0.DataObjects", type = JAXBElement.class) protected JAXBElement<String> versionNumber; /** * Gets the value of the active property. * * @return * possible object is * {@link Boolean } * */ public Boolean isActive() { return active; } /** * Sets the value of the active property. * * @param value * allowed object is * {@link Boolean } * */ public void setActive(Boolean value) { this.active = value; } /** * Gets the value of the availableEffort property. * * @return * possible object is * {@link JAXBElement }{@code <}{@link Integer }{@code >} * */ public JAXBElement<Integer> getAvailableEffort() { return availableEffort; } /** * Sets the value of the availableEffort property. * * @param value * allowed object is * {@link JAXBElement }{@code <}{@link Integer }{@code >} * */ public void setAvailableEffort(JAXBElement<Integer> value) { this.availableEffort = ((JAXBElement<Integer> ) value); } /** * Gets the value of the creationDate property. * * @return * possible object is * {@link XMLGregorianCalendar } * */ public XMLGregorianCalendar getCreationDate() { return creationDate; } /** * Sets the value of the creationDate property. * * @param value * allowed object is * {@link XMLGregorianCalendar } * */ public void setCreationDate(XMLGregorianCalendar value) { this.creationDate = value; } /** * Gets the value of the creatorId property. * * @return * possible object is * {@link JAXBElement }{@code <}{@link Integer }{@code >} * */ public JAXBElement<Integer> getCreatorId() { return creatorId; } /** * Sets the value of the creatorId property. * * @param value * allowed object is * {@link JAXBElement }{@code <}{@link Integer }{@code >} * */ public void setCreatorId(JAXBElement<Integer> value) { this.creatorId = ((JAXBElement<Integer> ) value); } /** * Gets the value of the creatorName property. * * @return * possible object is * {@link JAXBElement }{@code <}{@link String }{@code >} * */ public JAXBElement<String> getCreatorName() { return creatorName; } /** * Sets the value of the creatorName property. * * @param value * allowed object is * {@link JAXBElement }{@code <}{@link String }{@code >} * */ public void setCreatorName(JAXBElement<String> value) { this.creatorName = ((JAXBElement<String> ) value); } /** * Gets the value of the daysNonWorking property. * * @return * possible object is * {@link Integer } * */ public Integer getDaysNonWorking() { return daysNonWorking; } /** * Sets the value of the daysNonWorking property. * * @param value * allowed object is * {@link Integer } * */ public void setDaysNonWorking(Integer value) { this.daysNonWorking = value; } /** * Gets the value of the description property. * * @return * possible object is * {@link JAXBElement }{@code <}{@link String }{@code >} * */ public JAXBElement<String> getDescription() { return description; } /** * Sets the value of the description property. * * @param value * allowed object is * {@link JAXBElement }{@code <}{@link String }{@code >} * */ public void setDescription(JAXBElement<String> value) { this.description = ((JAXBElement<String> ) value); } /** * Gets the value of the endDate property. * * @return * possible object is * {@link XMLGregorianCalendar } * */ public XMLGregorianCalendar getEndDate() { return endDate; } /** * Sets the value of the endDate property. * * @param value * allowed object is * {@link XMLGregorianCalendar } * */ public void setEndDate(XMLGregorianCalendar value) { this.endDate = value; } /** * Gets the value of the fullName property. * * @return * possible object is * {@link JAXBElement }{@code <}{@link String }{@code >} * */ public JAXBElement<String> getFullName() { return fullName; } /** * Sets the value of the fullName property. * * @param value * allowed object is * {@link JAXBElement }{@code <}{@link String }{@code >} * */ public void setFullName(JAXBElement<String> value) { this.fullName = ((JAXBElement<String> ) value); } /** * Gets the value of the indentLevel property. * * @return * possible object is * {@link JAXBElement }{@code <}{@link String }{@code >} * */ public JAXBElement<String> getIndentLevel() { return indentLevel; } /** * Sets the value of the indentLevel property. * * @param value * allowed object is * {@link JAXBElement }{@code <}{@link String }{@code >} * */ public void setIndentLevel(JAXBElement<String> value) { this.indentLevel = ((JAXBElement<String> ) value); } /** * Gets the value of the iteration property. * * @return * possible object is * {@link Boolean } * */ public Boolean isIteration() { return iteration; } /** * Sets the value of the iteration property. * * @param value * allowed object is * {@link Boolean } * */ public void setIteration(Boolean value) { this.iteration = value; } /** * Gets the value of the lastUpdateDate property. * * @return * possible object is * {@link XMLGregorianCalendar } * */ public XMLGregorianCalendar getLastUpdateDate() { return lastUpdateDate; } /** * Sets the value of the lastUpdateDate property. * * @param value * allowed object is * {@link XMLGregorianCalendar } * */ public void setLastUpdateDate(XMLGregorianCalendar value) { this.lastUpdateDate = value; } /** * Gets the value of the name property. * * @return * possible object is * {@link JAXBElement }{@code <}{@link String }{@code >} * */ public JAXBElement<String> getName() { return name; } /** * Sets the value of the name property. * * @param value * allowed object is * {@link JAXBElement }{@code <}{@link String }{@code >} * */ public void setName(JAXBElement<String> value) { this.name = ((JAXBElement<String> ) value); } /** * Gets the value of the plannedEffort property. * * @return * possible object is * {@link JAXBElement }{@code <}{@link Integer }{@code >} * */ public JAXBElement<Integer> getPlannedEffort() { return plannedEffort; } /** * Sets the value of the plannedEffort property. * * @param value * allowed object is * {@link JAXBElement }{@code <}{@link Integer }{@code >} * */ public void setPlannedEffort(JAXBElement<Integer> value) { this.plannedEffort = ((JAXBElement<Integer> ) value); } /** * Gets the value of the projectId property. * * @return * possible object is * {@link JAXBElement }{@code <}{@link Integer }{@code >} * */ public JAXBElement<Integer> getProjectId() { return projectId; } /** * Sets the value of the projectId property. * * @param value * allowed object is * {@link JAXBElement }{@code <}{@link Integer }{@code >} * */ public void setProjectId(JAXBElement<Integer> value) { this.projectId = ((JAXBElement<Integer> ) value); } /** * Gets the value of the releaseId property. * * @return * possible object is * {@link JAXBElement }{@code <}{@link Integer }{@code >} * */ public JAXBElement<Integer> getReleaseId() { return releaseId; } /** * Sets the value of the releaseId property. * * @param value * allowed object is * {@link JAXBElement }{@code <}{@link Integer }{@code >} * */ public void setReleaseId(JAXBElement<Integer> value) { this.releaseId = ((JAXBElement<Integer> ) value); } /** * Gets the value of the resourceCount property. * * @return * possible object is * {@link Integer } * */ public Integer getResourceCount() { return resourceCount; } /** * Sets the value of the resourceCount property. * * @param value * allowed object is * {@link Integer } * */ public void setResourceCount(Integer value) { this.resourceCount = value; } /** * Gets the value of the startDate property. * * @return * possible object is * {@link XMLGregorianCalendar } * */ public XMLGregorianCalendar getStartDate() { return startDate; } /** * Sets the value of the startDate property. * * @param value * allowed object is * {@link XMLGregorianCalendar } * */ public void setStartDate(XMLGregorianCalendar value) { this.startDate = value; } /** * Gets the value of the summary property. * * @return * possible object is * {@link Boolean } * */ public Boolean isSummary() { return summary; } /** * Sets the value of the summary property. * * @param value * allowed object is * {@link Boolean } * */ public void setSummary(Boolean value) { this.summary = value; } /** * Gets the value of the taskActualEffort property. * * @return * possible object is * {@link JAXBElement }{@code <}{@link Integer }{@code >} * */ public JAXBElement<Integer> getTaskActualEffort() { return taskActualEffort; } /** * Sets the value of the taskActualEffort property. * * @param value * allowed object is * {@link JAXBElement }{@code <}{@link Integer }{@code >} * */ public void setTaskActualEffort(JAXBElement<Integer> value) { this.taskActualEffort = ((JAXBElement<Integer> ) value); } /** * Gets the value of the taskCount property. * * @return * possible object is * {@link JAXBElement }{@code <}{@link Integer }{@code >} * */ public JAXBElement<Integer> getTaskCount() { return taskCount; } /** * Sets the value of the taskCount property. * * @param value * allowed object is * {@link JAXBElement }{@code <}{@link Integer }{@code >} * */ public void setTaskCount(JAXBElement<Integer> value) { this.taskCount = ((JAXBElement<Integer> ) value); } /** * Gets the value of the taskEstimatedEffort property. * * @return * possible object is * {@link JAXBElement }{@code <}{@link Integer }{@code >} * */ public JAXBElement<Integer> getTaskEstimatedEffort() { return taskEstimatedEffort; } /** * Sets the value of the taskEstimatedEffort property. * * @param value * allowed object is * {@link JAXBElement }{@code <}{@link Integer }{@code >} * */ public void setTaskEstimatedEffort(JAXBElement<Integer> value) { this.taskEstimatedEffort = ((JAXBElement<Integer> ) value); } /** * Gets the value of the versionNumber property. * * @return * possible object is * {@link JAXBElement }{@code <}{@link String }{@code >} * */ public JAXBElement<String> getVersionNumber() { return versionNumber; } /** * Sets the value of the versionNumber property. * * @param value * allowed object is * {@link JAXBElement }{@code <}{@link String }{@code >} * */ public void setVersionNumber(JAXBElement<String> value) { this.versionNumber = ((JAXBElement<String> ) value); } }
export type Appearance = | 'info' | 'warning' | 'error' | 'confirmation' | 'change';
#ifndef DMZ_QT_PLUGIN_LIST_DOT_H #define DMZ_QT_PLUGIN_LIST_DOT_H #include <dmzRuntimeConfig.h> #include <dmzRuntimeLog.h> #include <dmzRuntimeMessaging.h> #include <dmzRuntimeModule.h> #include <dmzRuntimePlugin.h> #include <dmzRuntimePluginObserver.h> #include <dmzTypesHashTableHandleTemplate.h> #include <QtGui/QFrame> #include <QtGui/QSortFilterProxyModel> #include <QtGui/QStandardItemModel> #include <ui_PluginList.h> namespace dmz { class HandleContainer; class QtPluginList : public QFrame, public Plugin, public PluginObserver, public MessageObserver { Q_OBJECT public: QtPluginList (const PluginInfo &Info, Config &local, Config &global); ~QtPluginList (); // Plugin Interface virtual void update_plugin_state ( const PluginStateEnum State, const UInt32 Level); virtual void discover_plugin ( const PluginDiscoverEnum Mode, const Plugin *PluginPtr); // PluginObserver Interface virtual void update_runtime_plugin ( const PluginDiscoverEnum Mode, const Handle RuntimeModuleHandle, const Handle PluginHandle); // Message Observer Interface virtual void receive_message ( const Message &Type, const UInt32 MessageSendHandle, const Handle TargetObserverHandle, const Data *InData, Data *outData); protected slots: void on_unloadButton_clicked (); void on_reloadButton_clicked (); void on_filter_textChanged (const QString &Text); protected: typedef QList<QStandardItem *> QStandardItemList; // QtPluginList Interface void _get_selected (HandleContainer &list); void _init (Config &local); Log _log; Config _global; Ui::PluginList _ui; QStandardItemModel _model; QSortFilterProxyModel _proxyModel; QString _baseTitle; int _labelCount; HashTableHandleTemplate<QStandardItem> _itemTable; HashTableHandleTemplate<RuntimeModule> _rmTable; Message _showMsg; private: QtPluginList (); QtPluginList (const QtPluginList &); QtPluginList &operator= (const QtPluginList &); }; }; #endif // DMZ_QT_PLUGIN_LIST_DOT_H
<reponame>rpalcolea/genie<filename>genie-client/src/integTest/java/com/netflix/genie/client/GenieClientIntegrationTestBase.java /* * * Copyright 2016 Netflix, 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.netflix.genie.client; import com.google.common.collect.Lists; import com.google.common.collect.Sets; import com.netflix.genie.GenieTestApp; import com.netflix.genie.common.dto.Application; import com.netflix.genie.common.dto.ApplicationStatus; import com.netflix.genie.common.dto.Cluster; import com.netflix.genie.common.dto.ClusterStatus; import com.netflix.genie.common.dto.Command; import com.netflix.genie.common.dto.CommandStatus; import org.apache.commons.lang3.StringUtils; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.web.server.LocalServerPort; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.junit4.SpringRunner; import java.util.List; import java.util.Set; import java.util.UUID; /** * Base class for all Genie client integration tests. * * @author amsharma * @since 3.0.0 */ @RunWith(SpringRunner.class) @SpringBootTest(classes = GenieTestApp.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) @ActiveProfiles("integration") public abstract class GenieClientIntegrationTestBase { @LocalServerPort private int port; /** * Helper method that returns the dynamic url of the genie service. * * @return The genie service url. */ String getBaseUrl() { return "http://localhost:" + this.port; } /** * Helper method to generate a sample Cluster DTO. * * @param id The id of the cluster. * @return A cluster object. */ Cluster constructClusterDTO(final String id) { final String clusterId; if (StringUtils.isBlank(id)) { clusterId = UUID.randomUUID().toString(); } else { clusterId = id; } final Set<String> tags = Sets.newHashSet("foo", "bar"); final Set<String> configList = Sets.newHashSet("config1", "configs2"); final Set<String> dependenciesList = Sets.newHashSet("cluster-dep1", "cluster-dep2"); return new Cluster.Builder("name", "user", "1.0", ClusterStatus.UP) .withId(clusterId) .withDescription("client Test") .withSetupFile("path to set up file") .withTags(tags) .withConfigs(configList) .withDependencies(dependenciesList) .build(); } /** * Helper method to generate a sample Command DTO. * * @param id The id of the command. * @return A command object. */ Command constructCommandDTO(final String id) { final String commandId; if (StringUtils.isBlank(id)) { commandId = UUID.randomUUID().toString(); } else { commandId = id; } final Set<String> tags = Sets.newHashSet("foo", "bar"); final Set<String> configList = Sets.newHashSet("config1", "configs2"); final Set<String> dependenciesList = Sets.newHashSet("command-dep1", "command-dep2"); final List<String> executableAndArgs = Lists.newArrayList("exec"); return new Command.Builder("name", "user", "1.0", CommandStatus.ACTIVE, executableAndArgs, 1000) .withId(commandId) .withDescription("client Test") .withSetupFile("path to set up file") .withTags(tags) .withConfigs(configList) .withDependencies(dependenciesList) .build(); } /** * Helper method to generate a sample Application DTO. * * @param id The id of the application. * @return An application object. */ Application constructApplicationDTO(final String id) { final String applicationId; if (StringUtils.isBlank(id)) { applicationId = UUID.randomUUID().toString(); } else { applicationId = id; } final Set<String> tags = Sets.newHashSet("foo", "bar"); final Set<String> configList = Sets.newHashSet("config1", "configs2"); final Set<String> dependenciesList = Sets.newHashSet("dep1", "dep2"); return new Application.Builder("name", "user", "1.0", ApplicationStatus.ACTIVE) .withId(applicationId) .withDescription("client Test") .withSetupFile("path to set up file") .withTags(tags) .withConfigs(configList) .withDependencies(dependenciesList) .build(); } }
/* clears the whole tree and resets pointer to it to NULL */ void tree_clear (struct tree_s **t) { tree_deleter (*t); *t = NULL; }
Abandoning growth failure in neonatal intensive care units. T he ultimate goal in neonatology is to achieve a functional outcome in premature infants that is comparable with healthy term-born infants ; however, many infants face detrimental effects from their early birth Because nutrition is one of the key factors for normal cell growth, providing the right amount and quality of nutrients could prove pivotal for normal development. Many premature infants are catabolic during the first week of life, however, which has directly been linked to growth failure, disease, and suboptimal long-term outcome. Many articles have been published showing that first-week nutritional management can result in positive nitrogen balance and thus growth of lean body mass. The article published in this issue of the Journal by Senterre and Rigo is the first to show that it is possible to provide adequate nutrition in the first few weeks of life during routine management. The results are excellent. The suboptimal growth pattern we have observed so frequently in many studies is not shown here. Senterre and Rigo showed that after the initial drop in weight gain, infants remained within their growth trajectory.Thisisanimportant step because nutrition has long been regarded as less important than, for example, ventilation strategies, usage of dopamine or dobutamine, or the choice for certain anti-biotics. Such an attitude neglects the effect of appropriate nutrition on long-term outcome, even or maybe especially in ill infants. A few publications prospectively show a positive effect on outcome. The largest stems from the United Kingdom showing, for example, the direct effect of early nutrition on nucleus caudatus volume, whereas previously, the effect of early nutrition was shown on IQ. In addition, parenteral amino acid and energy intake during the first week of life seems to be related to cognitive development at 2 years of life. Although management aiming at the prevention of undernutrition in the neonatal intensive care unit seems logical, we also should be aware of the possibility that the quality of nutrients may not be optimal and may induce adverse effects in either the short or long term. Appropriate designed prospective nutritional intervention trials with a
/* * This file is part of the ONT API. * The contents of this file are subject to the LGPL License, Version 3.0. * Copyright (c) 2018, Avicomp Services, AO * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. * * Alternatively, the contents of this file may be used under the terms of the Apache License, Version 2.0 in which case, the provisions of the Apache License Version 2.0 are applicable instead of those above. * 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 ru.avicomp.owlapi.tests.api.ontology; import org.junit.Test; import org.semanticweb.owlapi.model.*; import ru.avicomp.owlapi.tests.api.baseclasses.TestBase; import java.util.Collection; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.semanticweb.owlapi.model.parameters.Imports.INCLUDED; import static org.semanticweb.owlapi.search.EntitySearcher.*; import static org.semanticweb.owlapi.search.Filters.subClassWithSub; import static org.semanticweb.owlapi.search.Filters.subClassWithSuper; import static org.semanticweb.owlapi.search.Searcher.*; import static org.semanticweb.owlapi.util.OWLAPIStreamUtils.asUnorderedSet; import static org.semanticweb.owlapi.util.OWLAPIStreamUtils.contains; import static ru.avicomp.owlapi.OWLFunctionalSyntaxFactory.Class; import static ru.avicomp.owlapi.OWLFunctionalSyntaxFactory.*; /** * @author <NAME>, The University Of Manchester, Information * Management Group * @since 2.2.0 */ @SuppressWarnings("javadoc") public class OWLOntologyAccessorsTestCase extends TestBase { private static void performAxiomTests(OWLOntology ont, OWLAxiom... axioms) { assertEquals(ont.getAxiomCount(), axioms.length); for (OWLAxiom ax : axioms) { assertTrue(contains(ont.axioms(), ax)); if (ax.isLogicalAxiom()) { assertTrue(contains(ont.logicalAxioms(), ax)); } assertEquals(ont.getLogicalAxiomCount(), axioms.length); AxiomType<?> axiomType = ax.getAxiomType(); assertTrue(contains(ont.axioms(axiomType), ax)); assertTrue(contains(ont.axioms(axiomType, INCLUDED), ax)); assertEquals(ont.getAxiomCount(axiomType), axioms.length); assertEquals(ont.getAxiomCount(axiomType, INCLUDED), axioms.length); ax.signature().forEach(e -> { assertTrue(contains(ont.referencingAxioms(e), ax)); assertTrue(contains(ont.signature(), e)); }); } } @Test public void testSubClassOfAxiomAccessors() { OWLOntology ont = getOWLOntology(); OWLClass clsA = Class(iri("A")); OWLClass clsB = Class(iri("B")); OWLObjectProperty prop = ObjectProperty(iri("prop")); OWLOntologyManager man = ont.getOWLOntologyManager(); OWLSubClassOfAxiom ax = SubClassOf(clsA, clsB); man.addAxiom(ont, ax); OWLSubClassOfAxiom ax2 = SubClassOf(clsA, ObjectSomeValuesFrom(prop, clsB)); man.addAxiom(ont, ax2); performAxiomTests(ont, ax, ax2); assertTrue(contains(ont.subClassAxiomsForSubClass(clsA), ax)); assertTrue(contains(ont.subClassAxiomsForSuperClass(clsB), ax)); assertTrue(contains(ont.axioms(clsA), ax)); assertTrue(contains(sup(ont.axioms(subClassWithSub, clsA, INCLUDED)), clsB)); assertTrue(contains(sub(ont.axioms(subClassWithSuper, clsB, INCLUDED)), clsA)); } @Test public void testEquivalentClassesAxiomAccessors() { OWLOntology ont = getOWLOntology(); OWLClass clsA = Class(iri("A")); OWLClass clsB = Class(iri("B")); OWLClass clsC = Class(iri("C")); OWLClass clsD = Class(iri("D")); OWLObjectProperty prop = ObjectProperty(iri("prop")); OWLOntologyManager man = ont.getOWLOntologyManager(); OWLEquivalentClassesAxiom ax = EquivalentClasses(clsA, clsB, clsC, ObjectSomeValuesFrom(prop, clsD)); man.addAxiom(ont, ax); performAxiomTests(ont, ax); assertTrue(contains(ont.equivalentClassesAxioms(clsA), ax)); assertTrue(contains(ont.equivalentClassesAxioms(clsB), ax)); assertTrue(contains(ont.equivalentClassesAxioms(clsC), ax)); assertTrue(contains(ont.axioms(clsA), ax)); assertTrue(contains(ont.axioms(clsB), ax)); assertTrue(contains(ont.axioms(clsC), ax)); } @Test public void testDisjointClassesAxiomAccessors() { OWLOntology ont = getOWLOntology(); OWLClass clsA = Class(iri("A")); OWLClass clsB = Class(iri("B")); OWLClass clsC = Class(iri("C")); OWLClass clsD = Class(iri("D")); OWLObjectProperty prop = ObjectProperty(iri("prop")); OWLOntologyManager man = ont.getOWLOntologyManager(); OWLDisjointClassesAxiom ax = DisjointClasses(clsA, clsB, clsC, ObjectSomeValuesFrom(prop, clsD)); man.addAxiom(ont, ax); performAxiomTests(ont, ax); assertTrue(contains(ont.disjointClassesAxioms(clsA), ax)); assertTrue(contains(ont.disjointClassesAxioms(clsB), ax)); assertTrue(contains(ont.disjointClassesAxioms(clsC), ax)); assertTrue(contains(ont.axioms(clsA), ax)); assertTrue(contains(ont.axioms(clsB), ax)); assertTrue(contains(ont.axioms(clsC), ax)); } @Test public void testSubObjectPropertyOfAxiomAccessors() { OWLOntology ont = getOWLOntology(); OWLObjectProperty propP = ObjectProperty(iri("p")); OWLObjectProperty propQ = ObjectProperty(iri("q")); OWLOntologyManager man = ont.getOWLOntologyManager(); OWLSubObjectPropertyOfAxiom ax = SubObjectPropertyOf(propP, propQ); man.addAxiom(ont, ax); performAxiomTests(ont, ax); assertTrue(contains(ont.objectSubPropertyAxiomsForSubProperty(propP), ax)); assertTrue(contains(ont.objectSubPropertyAxiomsForSuperProperty(propQ), ax)); assertTrue(contains(ont.axioms(propP), ax)); } @Test public void testEquivalentObjectPropertiesAxiomAccessors() { OWLOntology ont = getOWLOntology(); OWLObjectProperty propP = ObjectProperty(iri("p")); OWLObjectProperty propQ = ObjectProperty(iri("q")); OWLObjectProperty propR = ObjectProperty(iri("r")); OWLOntologyManager man = ont.getOWLOntologyManager(); OWLEquivalentObjectPropertiesAxiom ax = EquivalentObjectProperties(propP, propQ, propR); man.addAxiom(ont, ax); performAxiomTests(ont, ax); assertTrue(contains(ont.equivalentObjectPropertiesAxioms(propP), ax)); assertTrue(contains(ont.equivalentObjectPropertiesAxioms(propQ), ax)); assertTrue(contains(ont.equivalentObjectPropertiesAxioms(propR), ax)); assertTrue(contains(ont.axioms(propP), ax)); assertTrue(contains(ont.axioms(propQ), ax)); assertTrue(contains(ont.axioms(propR), ax)); } @Test public void testDisjointObjectPropertiesAxiomAccessors() { OWLOntology ont = getOWLOntology(); OWLObjectProperty propP = ObjectProperty(iri("p")); OWLObjectProperty propQ = ObjectProperty(iri("q")); OWLObjectProperty propR = ObjectProperty(iri("r")); OWLOntologyManager man = ont.getOWLOntologyManager(); OWLDisjointObjectPropertiesAxiom ax = DisjointObjectProperties(propP, propQ, propR); man.addAxiom(ont, ax); performAxiomTests(ont, ax); assertTrue(contains(ont.disjointObjectPropertiesAxioms(propP), ax)); assertTrue(contains(ont.disjointObjectPropertiesAxioms(propQ), ax)); assertTrue(contains(ont.disjointObjectPropertiesAxioms(propR), ax)); assertTrue(contains(ont.axioms(propP), ax)); assertTrue(contains(ont.axioms(propQ), ax)); assertTrue(contains(ont.axioms(propR), ax)); } @Test public void testObjectPropertyDomainAxiomAccessors() { OWLOntology ont = getOWLOntology(); OWLObjectProperty propP = ObjectProperty(iri("p")); OWLClass clsA = Class(iri("ClsA")); OWLOntologyManager man = ont.getOWLOntologyManager(); OWLObjectPropertyDomainAxiom ax = ObjectPropertyDomain(propP, clsA); man.addAxiom(ont, ax); performAxiomTests(ont, ax); assertTrue(contains(ont.objectPropertyDomainAxioms(propP), ax)); assertTrue(contains(ont.axioms(propP), ax)); assertTrue(contains(domain(ont.objectPropertyDomainAxioms(propP)), clsA)); } @Test public void testObjectPropertyRangeAxiomAccessors() { OWLOntology ont = getOWLOntology(); OWLObjectProperty propP = ObjectProperty(iri("p")); OWLClass clsA = Class(iri("ClsA")); OWLOntologyManager man = ont.getOWLOntologyManager(); OWLObjectPropertyRangeAxiom ax = ObjectPropertyRange(propP, clsA); man.addAxiom(ont, ax); performAxiomTests(ont, ax); assertTrue(contains(ont.objectPropertyRangeAxioms(propP), ax)); assertTrue(contains(ont.axioms(propP), ax)); assertTrue(contains(range(ont.objectPropertyRangeAxioms(propP)), clsA)); } @Test public void testFunctionalObjectPropertyAxiomAccessors() { OWLOntology ont = getOWLOntology(); OWLObjectProperty propP = ObjectProperty(iri("p")); OWLOntologyManager man = ont.getOWLOntologyManager(); OWLFunctionalObjectPropertyAxiom ax = FunctionalObjectProperty(propP); man.addAxiom(ont, ax); performAxiomTests(ont, ax); assertTrue(contains(ont.functionalObjectPropertyAxioms(propP), ax)); assertTrue(contains(ont.axioms(propP), ax)); assertTrue(isFunctional(propP, ont)); } @Test public void testInverseFunctionalObjectPropertyAxiomAccessors() { OWLOntology ont = getOWLOntology(); OWLObjectProperty propP = ObjectProperty(iri("p")); OWLOntologyManager man = ont.getOWLOntologyManager(); OWLInverseFunctionalObjectPropertyAxiom ax = InverseFunctionalObjectProperty(propP); man.addAxiom(ont, ax); performAxiomTests(ont, ax); assertTrue(contains(ont.inverseFunctionalObjectPropertyAxioms(propP), ax)); assertTrue(contains(ont.axioms(propP), ax)); assertTrue(isInverseFunctional(propP, ont)); } @Test public void testTransitiveObjectPropertyAxiomAccessors() { OWLOntology ont = getOWLOntology(); OWLObjectProperty propP = ObjectProperty(iri("p")); OWLOntologyManager man = ont.getOWLOntologyManager(); OWLTransitiveObjectPropertyAxiom ax = TransitiveObjectProperty(propP); man.addAxiom(ont, ax); performAxiomTests(ont, ax); assertTrue(contains(ont.transitiveObjectPropertyAxioms(propP), ax)); assertTrue(contains(ont.axioms(propP), ax)); assertTrue(isTransitive(propP, ont)); } @Test public void testSymmetricObjectPropertyAxiomAccessors() { OWLOntology ont = getOWLOntology(); OWLObjectProperty propP = ObjectProperty(iri("p")); OWLOntologyManager man = ont.getOWLOntologyManager(); OWLSymmetricObjectPropertyAxiom ax = SymmetricObjectProperty(propP); man.addAxiom(ont, ax); performAxiomTests(ont, ax); assertTrue(contains(ont.symmetricObjectPropertyAxioms(propP), ax)); assertTrue(contains(ont.axioms(propP), ax)); assertTrue(isSymmetric(propP, ont)); } @Test public void testAsymmetricObjectPropertyAxiomAccessors() { OWLOntology ont = getOWLOntology(); OWLObjectProperty propP = ObjectProperty(iri("p")); OWLOntologyManager man = ont.getOWLOntologyManager(); OWLAsymmetricObjectPropertyAxiom ax = AsymmetricObjectProperty(propP); man.addAxiom(ont, ax); performAxiomTests(ont, ax); assertTrue(contains(ont.asymmetricObjectPropertyAxioms(propP), ax)); assertTrue(contains(ont.axioms(propP), ax)); assertTrue(isAsymmetric(propP, ont)); } @Test public void testReflexiveObjectPropertyAxiomAccessors() { OWLOntology ont = getOWLOntology(); OWLObjectProperty propP = ObjectProperty(iri("p")); OWLOntologyManager man = ont.getOWLOntologyManager(); OWLReflexiveObjectPropertyAxiom ax = ReflexiveObjectProperty(propP); man.addAxiom(ont, ax); performAxiomTests(ont, ax); assertTrue(contains(ont.reflexiveObjectPropertyAxioms(propP), ax)); assertTrue(contains(ont.axioms(propP), ax)); assertTrue(isReflexive(propP, ont)); } @Test public void testIrreflexiveObjectPropertyAxiomAccessors() { OWLOntology ont = getOWLOntology(); OWLObjectProperty propP = ObjectProperty(iri("p")); OWLOntologyManager man = ont.getOWLOntologyManager(); OWLIrreflexiveObjectPropertyAxiom ax = IrreflexiveObjectProperty(propP); man.addAxiom(ont, ax); performAxiomTests(ont, ax); assertTrue(contains(ont.irreflexiveObjectPropertyAxioms(propP), ax)); assertTrue(contains(ont.axioms(propP), ax)); assertTrue(isIrreflexive(propP, ont)); } @Test public void testSubDataPropertyOfAxiomAccessors() { OWLOntology ont = getOWLOntology(); OWLDataProperty propP = DataProperty(iri("p")); OWLDataProperty propQ = DataProperty(iri("q")); OWLOntologyManager man = ont.getOWLOntologyManager(); OWLSubDataPropertyOfAxiom ax = SubDataPropertyOf(propP, propQ); man.addAxiom(ont, ax); performAxiomTests(ont, ax); assertTrue(contains(ont.dataSubPropertyAxiomsForSubProperty(propP), ax)); assertTrue(contains(ont.dataSubPropertyAxiomsForSuperProperty(propQ), ax)); assertTrue(contains(ont.axioms(propP), ax)); } @Test public void testEquivalentDataPropertiesAxiomAccessors() { OWLOntology ont = getOWLOntology(); OWLDataProperty propP = DataProperty(iri("p")); OWLDataProperty propQ = DataProperty(iri("q")); OWLDataProperty propR = DataProperty(iri("r")); OWLOntologyManager man = ont.getOWLOntologyManager(); OWLEquivalentDataPropertiesAxiom ax = EquivalentDataProperties(propP, propQ, propR); man.addAxiom(ont, ax); performAxiomTests(ont, ax); assertTrue(contains(ont.equivalentDataPropertiesAxioms(propP), ax)); assertTrue(contains(ont.equivalentDataPropertiesAxioms(propQ), ax)); assertTrue(contains(ont.equivalentDataPropertiesAxioms(propR), ax)); assertTrue(contains(ont.axioms(propP), ax)); assertTrue(contains(ont.axioms(propQ), ax)); assertTrue(contains(ont.axioms(propR), ax)); } @Test public void testDisjointDataPropertiesAxiomAccessors() { OWLOntology ont = getOWLOntology(); OWLDataProperty propP = DataProperty(iri("p")); OWLDataProperty propQ = DataProperty(iri("q")); OWLDataProperty propR = DataProperty(iri("r")); OWLOntologyManager man = ont.getOWLOntologyManager(); OWLDisjointDataPropertiesAxiom ax = DisjointDataProperties(propP, propQ, propR); man.addAxiom(ont, ax); performAxiomTests(ont, ax); assertTrue(contains(ont.disjointDataPropertiesAxioms(propP), ax)); assertTrue(contains(ont.disjointDataPropertiesAxioms(propQ), ax)); assertTrue(contains(ont.disjointDataPropertiesAxioms(propR), ax)); assertTrue(contains(ont.axioms(propP), ax)); assertTrue(contains(ont.axioms(propQ), ax)); assertTrue(contains(ont.axioms(propR), ax)); } @Test public void testDataPropertyDomainAxiomAccessors() { OWLOntology ont = getOWLOntology(); OWLDataProperty propP = DataProperty(iri("p")); OWLClass clsA = Class(iri("ClsA")); OWLOntologyManager man = ont.getOWLOntologyManager(); OWLDataPropertyDomainAxiom ax = DataPropertyDomain(propP, clsA); man.addAxiom(ont, ax); performAxiomTests(ont, ax); assertTrue(contains(ont.dataPropertyDomainAxioms(propP), ax)); assertTrue(contains(ont.axioms(propP), ax)); assertTrue(contains(domain(ont.dataPropertyDomainAxioms(propP)), clsA)); } @Test public void testDataPropertyRangeAxiomAccessors() { OWLOntology ont = getOWLOntology(); OWLDataProperty propP = DataProperty(iri("p")); OWLDatatype dt = Datatype(iri("dt")); OWLOntologyManager man = ont.getOWLOntologyManager(); OWLDataPropertyRangeAxiom ax = DataPropertyRange(propP, dt); man.addAxiom(ont, ax); performAxiomTests(ont, ax); assertTrue(contains(ont.dataPropertyRangeAxioms(propP), ax)); assertTrue(contains(ont.axioms(propP), ax)); assertTrue(contains(range(ont.dataPropertyRangeAxioms(propP)), dt)); } @Test public void testFunctionalDataPropertyAxiomAccessors() { OWLOntology ont = getOWLOntology(); OWLDataProperty propP = DataProperty(iri("p")); OWLOntologyManager man = ont.getOWLOntologyManager(); OWLFunctionalDataPropertyAxiom ax = FunctionalDataProperty(propP); man.addAxiom(ont, ax); performAxiomTests(ont, ax); assertTrue(contains(ont.functionalDataPropertyAxioms(propP), ax)); assertTrue(contains(ont.axioms(propP), ax)); assertTrue(isFunctional(propP, ont)); } @Test public void testClassAssertionAxiomAccessors() { OWLOntology ont = getOWLOntology(); OWLClass clsA = Class(iri("clsA")); OWLNamedIndividual indA = NamedIndividual(iri("indA")); OWLOntologyManager man = ont.getOWLOntologyManager(); OWLClassAssertionAxiom ax = ClassAssertion(clsA, indA); man.addAxiom(ont, ax); performAxiomTests(ont, ax); assertTrue(contains(ont.classAssertionAxioms(indA), ax)); assertTrue(contains(ont.classAssertionAxioms(clsA), ax)); assertTrue(contains(ont.axioms(indA), ax)); assertTrue(contains(instances(ont.classAssertionAxioms(indA)), indA)); assertTrue(contains(types(ont.classAssertionAxioms(indA)), clsA)); } @Test public void testObjectPropertyAxiomAccessors() { OWLOntology ont = getOWLOntology(); OWLObjectProperty prop = ObjectProperty(iri("prop")); OWLNamedIndividual indA = NamedIndividual(iri("indA")); OWLNamedIndividual indB = NamedIndividual(iri("indB")); OWLOntologyManager man = ont.getOWLOntologyManager(); OWLObjectPropertyAssertionAxiom ax = ObjectPropertyAssertion(prop, indA, indB); man.addAxiom(ont, ax); performAxiomTests(ont, ax); assertTrue(contains(ont.objectPropertyAssertionAxioms(indA), ax)); assertTrue(contains(ont.axioms(indA), ax)); } @Test public void testNegativeObjectPropertyAxiomAccessors() { OWLOntology ont = getOWLOntology(); OWLObjectProperty prop = ObjectProperty(iri("prop")); OWLNamedIndividual indA = NamedIndividual(iri("indA")); OWLNamedIndividual indB = NamedIndividual(iri("indB")); OWLOntologyManager man = ont.getOWLOntologyManager(); OWLNegativeObjectPropertyAssertionAxiom ax = NegativeObjectPropertyAssertion(prop, indA, indB); man.addAxiom(ont, ax); performAxiomTests(ont, ax); assertTrue(contains(ont.negativeObjectPropertyAssertionAxioms(indA), ax)); assertTrue(contains(ont.axioms(indA), ax)); } @Test public void testDataPropertyAxiomAccessors() { OWLOntology ont = getOWLOntology(); OWLDataProperty prop = DataProperty(iri("prop")); OWLNamedIndividual indA = NamedIndividual(iri("indA")); OWLLiteral lit = Literal(3); OWLOntologyManager man = ont.getOWLOntologyManager(); OWLDataPropertyAssertionAxiom ax = DataPropertyAssertion(prop, indA, lit); man.addAxiom(ont, ax); performAxiomTests(ont, ax); assertTrue(contains(ont.dataPropertyAssertionAxioms(indA), ax)); assertTrue(contains(ont.axioms(indA), ax)); } @Test public void testNegativeDataPropertyAxiomAccessors() { OWLOntology ont = getOWLOntology(); OWLDataProperty prop = DataProperty(iri("prop")); OWLNamedIndividual indA = NamedIndividual(iri("indA")); OWLLiteral lit = Literal(3); OWLOntologyManager man = ont.getOWLOntologyManager(); OWLNegativeDataPropertyAssertionAxiom ax = NegativeDataPropertyAssertion(prop, indA, lit); man.addAxiom(ont, ax); performAxiomTests(ont, ax); assertTrue(contains(ont.negativeDataPropertyAssertionAxioms(indA), ax)); assertTrue(contains(ont.axioms(indA), ax)); } @Test public void testSameIndividualAxiomAccessors() { OWLOntology ont = getOWLOntology(); OWLNamedIndividual indA = NamedIndividual(iri("indA")); OWLNamedIndividual indB = NamedIndividual(iri("indB")); OWLNamedIndividual indC = NamedIndividual(iri("indC")); OWLOntologyManager man = ont.getOWLOntologyManager(); OWLSameIndividualAxiom ax = SameIndividual(indA, indB, indC); man.addAxiom(ont, ax); performAxiomTests(ont, ax); assertTrue(contains(ont.sameIndividualAxioms(indA), ax)); assertTrue(contains(ont.sameIndividualAxioms(indB), ax)); assertTrue(contains(ont.sameIndividualAxioms(indC), ax)); assertTrue(contains(ont.axioms(indA), ax)); Collection<OWLObject> equivalent = asUnorderedSet(equivalent(ont.sameIndividualAxioms(indA))); assertTrue(equivalent.contains(indB)); assertTrue(equivalent.contains(indC)); } @Test public void testDifferentIndividualsAxiomAccessors() { OWLOntology ont = getOWLOntology(); OWLNamedIndividual indA = NamedIndividual(iri("indA")); OWLNamedIndividual indB = NamedIndividual(iri("indB")); OWLNamedIndividual indC = NamedIndividual(iri("indC")); OWLOntologyManager man = ont.getOWLOntologyManager(); OWLDifferentIndividualsAxiom ax = DifferentIndividuals(indA, indB, indC); man.addAxiom(ont, ax); performAxiomTests(ont, ax); assertTrue(contains(ont.differentIndividualAxioms(indA), ax)); assertTrue(contains(ont.differentIndividualAxioms(indB), ax)); assertTrue(contains(ont.differentIndividualAxioms(indC), ax)); assertTrue(contains(ont.axioms(indA), ax)); Collection<OWLObject> different = asUnorderedSet(different(ont.differentIndividualAxioms(indA))); assertTrue(different.contains(indB)); assertTrue(different.contains(indC)); } }
package com.ripple.core.fields; import com.ripple.core.enums.LedgerEntryType; import com.ripple.core.enums.TransactionEngineResult; import com.ripple.core.enums.TransactionType; import java.util.EnumMap; public class FieldSymbolics { static public EnumMap<Field, Enums> lookup = new EnumMap<Field, Enums>(Field.class); static public interface Enums { String asString(int i); Integer asInteger(String s); } static { lookup.put(Field.TransactionType, new Enums() { @Override public String asString(int i) { return TransactionType.fromNumber(i).name(); } @Override public Integer asInteger(String s) { return TransactionType.valueOf(s).asInteger(); } }); lookup.put(Field.LedgerEntryType, new Enums() { @Override public String asString(int i) { return LedgerEntryType.fromNumber(i).name(); } @Override public Integer asInteger(String s) { return LedgerEntryType.valueOf(s).asInteger(); } }); lookup.put(Field.TransactionResult, new Enums() { @Override public String asString(int i) { return TransactionEngineResult.fromNumber(i).name(); } @Override public Integer asInteger(String s) { return TransactionEngineResult.valueOf(s).asInteger(); } }); } public static boolean isSymbolicField(Field field) { return lookup.containsKey(field); } public static String asString(Field f, Number i) { return lookup.get(f).asString(i.intValue()); } public static Integer asInteger(Field f, String s) { return lookup.get(f).asInteger(s); } }
<gh_stars>1-10 #pragma once #include <DirectXMath.h> #include <DirectXCollision.h> #include <Windows.h> #include "Transform.h" #include "Patterns.h" class Camera : public Singleton<Camera> { public: Camera(); ~Camera(); DirectX::XMFLOAT4X4 ViewMatrix() const; DirectX::XMFLOAT4X4 ProjectionMatrix() const; void Update(float deltaTime); void Resize(unsigned int width, unsigned int height); float fov, nearPlane, farPlane; DirectX::BoundingFrustum frustum; TransformData::Handle transform; private: DirectX::XMFLOAT4X4 viewMat, projMat; bool fpsEnabled; POINT fpsPos; };
<reponame>DavidCoenFish/ancient-code-0<gh_stars>0 // // gcolour4byte.cpp // GCommon // // Created by <NAME> on 2011 06 01 // Copyright Pleasure seeking morons 2011. All rights reserved. // #include "gcolour4byte.h" #include "gcolour4float.h" #include "gmath.h" /*static*/ const GColour4Byte GColour4Byte::sWhite(255, 255, 255, 255); /*static*/ const GColour4Byte GColour4Byte::sBlack(0, 0, 0, 255); /*static*/ const GColour4Byte GColour4Byte::sGrey(127, 127, 127, 255); /*static*/ const GColour4Byte GColour4Byte::sRed(255, 0, 0, 255); /*static*/ const GColour4Byte GColour4Byte::sGreen(0, 255, 0, 255); /*static*/ const GColour4Byte GColour4Byte::sBlue(0, 0, 255, 255); /*static*/ const GU8 GColour4Byte::FloatToByte(const GR32 in_value) { const GS32 value = GMath::Clamp((GS32)((in_value * 255.0F) + 0.5F), 0, 255); return (value & 0xFF); } //constructors GColour4Byte::GColour4Byte(const GU8 in_red, const GU8 in_green, const GU8 in_blue, const GU8 in_alpha ) { SetData(in_red, in_green, in_blue, in_alpha); return; } /*explicit*/ GColour4Byte::GColour4Byte(const GColour4Float& in_src) { m_red = FloatToByte(in_src.m_red); m_green = FloatToByte(in_src.m_green); m_blue = FloatToByte(in_src.m_blue); m_alpha = FloatToByte(in_src.m_alpha);; return; } GColour4Byte::GColour4Byte(const GColour4Byte& in_src) { (*this) = in_src; return; } GColour4Byte::~GColour4Byte() { return; } //operators const GColour4Byte& GColour4Byte::operator=(const GColour4Byte& in_rhs) { m_red = in_rhs.m_red; m_green = in_rhs.m_green; m_blue = in_rhs.m_blue; m_alpha = in_rhs.m_alpha; return (*this); } //public accessors void GColour4Byte::SetData( const GU8 in_red, const GU8 in_green, const GU8 in_blue, const GU8 in_alpha ) { m_red = in_red; m_green = in_green; m_blue = in_blue; m_alpha = in_alpha; return; }
Detecting adenosine triphosphate in the pericellular space Release of adenosine triphosphate (ATP) into the extracellular space occurs in response to a multiplicity of physiological and pathological stimuli in virtually all cells and tissues. A role for extracellular ATP has been identified in processes as different as neurotransmission, endocrine and exocrine secretion, smooth muscle contraction, bone metabolism, cell proliferation, immunity and inflammation. However, ATP measurement in the extracellular space has proved a daunting task until recently. To tackle this challenge, some years ago, we designed and engineered a novel luciferase probe targeted to and expressed on the outer aspect of the plasma membrane. This novel probe was constructed by appending to firefly luciferase the N-terminal leader sequence and the C-terminal glycophosphatidylinositol anchor of the folate receptor. This chimeric protein, named plasma membrane luciferase, is targeted and localized to the outer side of the plasma membrane. With this probe, we have generated stably transfected HEK293 cell clones that act as an in vitro and in vivo sensor of the extracellular ATP concentration in several disease conditions, such as experimentally induced tumours and inflammation. Introduction For many years, adenosine triphosphate (ATP) was solely considered for its role as the main source of energy in living cells; however, we now know that ATP also plays a fundamental physiological role as a pleiotropic extracellular messenger of cell-to-cell communication acting at plasma membrane receptors named P2 purinergic receptors. The purinergic receptor family is composed of adenosine (P1) and nucleotide (P2) selective receptors. P1 receptors are further subdivided into A1, A2a, A2b and A3, whereas P2 receptors are subdivided into the P2Y and P2X subfamilies. The P2Y subfamily has eight members: P2Y1, P2Y2, P2Y4, P2Y6, P2Y11, P2Y12, P2Y13 and P2Y14. The P2Y1 receptor is activated by adenosine diphosphate (ADP), whereas, at P2Y2, ATP and uridine-5 0 -triphosphate (UTP) are equipotent. At P2Y4 and P2Y6, the uridine nucleotides UTP and uridine diphosphate (UDP) are preferred agonists, respectively. P2Y12 and P2Y13 are selectively activated by ADP, and P2Y14 is activated by UDP-glucose or UDP-galactose. The P2X subfamily includes seven receptors, P2X1-P2X7, for which ATP is the primary endogenous ligand. Affinity for extracellular nucleotides ranges from the low nanomolar level (P2Y receptors) to the high micromolar level (P2X7 receptor). This wide range of affinities of P2 receptors for extracellular nucleotides confers a remarkable plasticity to purinergic signalling, allowing the detection of minute as well as large changes of agonist concentration within the extracellular space. Furthermore, ubiquitous distribution in all tissues makes P2 receptors one of the most common and versatile signalling systems in the human body. Thus, it is not surprising that extracellular ATP, ADP and UTP are involved in a wide variety of different responses such as cell proliferation, migration and differentiation, neurotransmitter and cytokine release, necrosis and apoptosis. Likewise, nucleotide signalling participates in several crucial physiological and pathological events such as embryonic development, immune system maturation, neurodegeneration, inflammation and cancer. Their intrinsic features make nucleotides the ideal signal molecules to report cell damage or distress (damage-associated molecular patterns; DAMPs) as they are concentrated to high levels within the cell cytoplasm, but virtually absent in the extracellular space. In addition, to further support their role as DAMPs, nucleotides, being charged species, are highly diffusible through the aqueous interstitial tissue and quickly hydrolysed by specialized degrading systems, as expected of any bona fide biological messenger. Last but not least, nucleotides ligate specific plasma membrane receptors that confer a remarkable specificity to their signalling. The nucleotide-degrading system plays a critical role in purinergic signalling because, besides degrading ATP, and therefore terminating P2 receptor-targeted signalling, it also generates adenosine, an additional powerful modulator of cell functions acting at P1 receptors. The main enzymes involved in ATP hydrolysis and adenosine generation are the ubiquitous ecto-nucleotidases CD39, which converts ATP and ADP to adenosine monophosphate (AMP), and CD73, which converts AMP to adenosine. Thus, in principle, the extracellular ATP concentration can change as a consequence of enhanced ATP release as well as of reduced ATP hydrolysis. ATP de novo synthesis owing to adenylate kinase, nucleoside diphosphate kinase and ATP synthase expressed on the outer aspect of the plasma membrane might also contribute to the accumulation of extracellular ATP, but these latter pathways are as yet poorly characterized. Although the intracellular ATP concentration is in the millimolar range (3-10 mM), the extracellular concentration is considerably lower. It is estimated that the physiological ATP concentration in human blood is normally submicromolar (20-100 nM), although it is reported to increase after sustained exercise. Measurement of extracellular ATP within tissue interstitium is much more technically demanding and uncertain; however, it is reckoned that quiescent cells keep the pericellular ATP concentration in the low nanomolar range. It is worth stressing that this is likely to be an imprecise estimate. In fact, increasing evidence suggests that cells are surrounded by a halo of ATP, with a higher concentration within the unstirred layer closer to the cell surface. Accurate measurement of ATP levels within this layer, which contains the actual ATP concentration 'seen' by plasma membrane P2 receptors, is extremely difficult. Indirect experimental evidence suggests that in the pericellular halo the ATP concentration is sufficient to keep most P2 receptors in a state of tonic activation, the low affinity P2X7 included, to the point that some of these receptors might even be partially desensitized. The extracellular ATP concentration can increase in response to any cell perturbation owing to physical, chemical or biological stimuli, to reach the hundred micromolar level in many disease states such as ischaemia, hypoxia, trauma, cancer or inflammation. Pathways for ATP release are diverse, though poorly characterized. There is no doubt that, thanks to its favourable chemical concentration gradient, ATP can easily passively efflux out of the cell. Thus, a number of candidate ATP-permeable release channels have been put forward, e.g. VDAC or other chloride channels such as the cystic fibrosis transmembrane conductance channel regulator, ABC transporters, connexins, pannexins and the P2X7 receptor itself. Moreover, ATP can also be actively released via vesicular release from mast cells, platelets, neurons and in theory from any cell capable of stimulated or constitutive exocytosis. Of course, large amounts of ATP may be released from injured or necrotic cells. Recently, it has been shown that autophagy-competent cells also release ATP, which might be a constituent of the peculiar biochemical microenvironment of tissues undergoing autophagy. In general, it is worth stressing that ATP release also occurs in response to a variety of even minor mechanical stresses owing to routine experimental procedures (cell rinsing, medium changing). Despite the generally acknowledged important role of extracellular ATP, only a few tools are available today for its quantification in physiological or pathological conditions. Usually, extracellular ATP is measured in the cell supernatant by using the standard bioluminescence luciferine/luciferase assay. However, this technique gives only an indirect estimate of the level that ATP can reach at sites of release close to the plasma membrane, and, more importantly, does not allow real-time or in vivo measurement of the extracellular ATP concentration. Thus, there is a need to develop novel probes/techniques that allow closer monitoring of ATP kinetics in the extracellular space. The pioneering technique of Dale and co-workers is microelectrode recording. This approach is simple, accurate, quantitative and amenable to in vivo measurements, but has a major drawback: sticking an electrode into a tissue unavoidably causes a certain amount of damage that affects the ATP measurement. Dubyak and co-workers proposed a method for realtime measurement of ATP by using a cell-surface-bound luciferase. Firefly luciferase was fused in frame with the immunoglobulin G (IgG) binding domain of Staphylococcus aureus protein A (a construct named proA-luc), thus allowing this chimeric protein to bind to IgG adsorbed on the surface of cells via interaction with native antigens. The feasibility of proA-luc as a cell surface ATP-measuring probe was validated in three cell systems: human platelets, HL-60 promyelocytic cells and Bac-1.2F5 macrophages. An improvement of this technique has been described by Kobatake and co-workers. A more sophisticated approach was proposed at about the same time by Schneider and co-workers. These authors engineered a scanning tip coated with the ATPase-containing S1 myosin fragment and exploited atomic force microscopy to identify point sources of ATP release at the surface of living cells and to measure the local ATP concentration. This rather complex measuring technique might have been difficult to apply, as, to the best of our knowledge, it has not been used in subsequent studies. Another biosensor method was developed by Hayashi and co-workers. The method is based on the measurement of ATPdependent currents of P2X2 channels expressed on a sensor cell, patched on a patch-clamp micropipette and placed near the ATP-releasing target cell. Based on P2X2 receptor affinity for ATP, this technique allows a fairly accurate quantification of the extracellular ATP concentration. A calibration curve may be constructed by local application of known ATP concentrations. Other methods use fluorescence microscopy for real-time ATP measurement by a two-enzyme system. Corriden et al. reported a technique based on a tandem enzyme reaction driven by hexokinase and glucose-6-phosphate dehydrogenase, which, in the presence of ATP and glucose, converts nicotinamide adenine dinucleotide phosphate (NADP) to NADPH. This latter nucleotide, being fluorescent, can be imaged by fluorescence microscopy. Rather interestingly, with this method, the authors were able to show that ATP may reach concentrations of up to 80 mM in the vicinity of the plasma membrane. Bioluminescence Luciferase reporters as a source of bioluminescence are by far the most widely used probes for the measurement of ATP, whether in free solution, within intact isolated cells or in vivo. rsfs.royalsocietypublishing.org Interface Focus 3: 20120101 Bioluminescence is a natural phenomenon owing to chemical emission of light (chemiluminescence), remarkably conserved across a variety of different species (bacteria, protists, fungi, insects, a variety of marine organisms) with the notable exception of higher terrestrial organisms. Chemically, this process yields photons as a consequence of an exergonic reaction catalysed by a class of enzymes (e.g. luciferases) that oxidize a photon-emitting substrate (luciferin). In nature, there are different types of light-emitting enzymes (e.g. luciferases, aequorin), each with a specific substrate selectivity. In the course of time, many luciferases have been isolated and characterized from several sources and, to date, luciferase reporter systems are extensively used in vitro and in vivo to investigate gene expression, track cancer cells in living animals or measure environmental pollutants. The most widely used luciferases are firefly luciferase (Fluc) from Photinus pyralis and Renilla luciferase (Rluc) from Renilla reniformis. Firefly luciferase is a 62 kDa protein member of the adenylating enzyme superfamily. In the presence of its substrate D-luciferin (LH2), Mg 2 ion, molecular oxygen and ATP, this enzyme catalyses a multistep reaction that yields light in the green-to-yellow region (l max 560 nm). The first step involves the initial formation of the intermediate enzyme-D-luciferyl adenylate (D-LH2-AMP), with release of inorganic pyrophosphate. Subsequently, this intermediate is oxidized by molecular oxygen with the formation of carbon dioxide and the excited complex enzyme-oxyluciferin-AMP. In the last step of the reaction, the rapid loss of energy from the excited complex produces photon emission with dissociation of the individual components (figure 1). For each quantum of light emitted 1 mol of ATP, 1 mol of oxygen and 1 mol of luciferin are consumed. For its high sensitivity and specificity, firefly luciferase has found numerous applications in biomedicine, but it is above all the most important sensor of cellular ATP. As such, luciferase is widely used in whole cell lysates to measure the intracellular ATP concentration, and, more recently, it has also been used to monitor ATP release into cell supernatants. Measurement of the extracellular ATP concentration has rapidly become a frequent application of luciferase, given the increasing importance that purinergic signalling has recently achieved in cell biology. Measuring ATP release in cell supernatants with soluble luciferase has two major limitations: in the first place, sample manipulation causes a perturbation that by itself might cause an unwanted cell stimulation with consequent release of ATP; second, soluble luciferase is likely to be unable to detect rapid changes in the concentration of ATP close to the plasma membrane, i.e. exactly where extracellular ATP is biologically active. In order to overcome these technical drawbacks and be able to investigate the dynamic changes of extracellular ATP in vitro and in vivo, in 2005, we engineered a chimeric luciferase targeted to and retained on the external side of the plasma membrane named plasma membrane extracellular luciferase ( pmeLUC). The pmeLUC probe The pmeLUC probe was devised as an important analytical tool to measure extracellular ATP in the vicinity of the cell surface. It is a chimeric protein in which the luciferase cDNA (from Photinus pyralis) was fused in frame between the N-terminal sequence encoding an endoplasmic reticulum-targeting signal (26 amino acid (aa) long leader sequence) and the C-terminal plasma membrane anchor sequence (glycophosphatidylinositol (GPI); 28 aa long anchor sequence), both derived from the folate receptor. Thanks to these modifications, the pmeLUC probe is targeted and expressed on the plasma membrane, with the catalytic site facing the extracellular milieu. This topology enables pmeLUC to measure ATP increases owing to transient release in the close vicinity of the plasma membrane (figure 2). pmeLUC can be transfected into a variety of cell types to generate stable clones (e.g. HEK293-pmeLUC or CT26-pmeLUC cells) for in vitro and in vivo experiments. HEK293-pmeLUC cells were among the first stable clones that we generated, and in which the pmeLUC probe was extensively validated. We first carried out an extensive in vitro characterization which showed that this probe is insensitive to other nucleotides, such as ADP, UTP, UDP and guanosine triphosphate (GTP) (figure 3), and ATP selective. Rather surprisingly, affinity is low compared with soluble luciferase, as the ATP threshold is in the low micromolar range (5-10 mM), with saturation of the signal at near millimolar ATP levels. An ATP calibration curve can be obtained that provides a useful reference for in vitro as well as in vivo experiments ( figure 4). The pmeLUC probe efficiently measures ATP release triggered by pharmacological or mechanical stimuli. Last but not least, pmeLUC-transfected cells proliferate normally in vitro and respond to a variety of physiological agonists tested. An important advantage of this ATP sensor is its feasibility for in vivo imaging of extracellular ATP. In fact, pmeLUCtransfected cells can be inoculated into test animals and used as in vivo probes of the ATP concentration within tissue interstitium. Of course, as usual for all bioluminescence applications, luciferine (usually 3 mg per mouse) must also be routinely injected intraperitoneally (i.p.) before luminescence acquisition. This standard procedure is absolutely harmless and very reliable because luciferine is non-toxic and freely diffusible through the tissues. As detailed in §4, we have used HEK293-pmeLUC to image ATP levels at tumour and inflammation sites in living animals with a total body luminometer. An obvious drawback of using pmeLUC-transfected cells as an in vivo probe is the unavoidable stimulation of the immune response against the allogeneic cells (HEK293 are human cells). To circumvent this problem, in the first in vivo application, HEK293-pmeLUC cells were injected into nude/nude mice, in order to reduce the immune reaction. In the nude/nude host, HEK293-pmeLUC cells remain viable and functional for over a month. This drawback can be partially circumvented by generating pmeLUC-transfected cell clones syngeneic with the host (see below), but yet luciferase will be identified as an alloantigen by the immune system. However, pmeLUC-transfected cancer cells produce tumours in the syngeneic host with kinetics comparable to that of control, pmeLUC-negative cancer cells, but no extensive studies have as yet been performed to monitor the long-term fate of injected pmeLUC cells in an immunocompetent host. The pmeLUC probe allows real-time measurement of the biochemical composition of inflammatory and tumour Luc + LH2 + ATP Luc LH2 -AMP + PPi Luc LH2 -AMP + O 2 Luc AMP + oxyluciferin* + CO 2 Luc AMP oxyluciferin* Luc + oxyluciferin + AMP + hn Figure 1. Reaction steps leading to ATP-driven luciferase (LUC)/luciferin (LH2) photoemission. rsfs.royalsocietypublishing.org Interface Focus 3: 20120101 microenvironments, and imaging of extracellular ATP changes occurring over an extended length of time. As for HEK293, different cell types can be engineered to express pmeLUC; for example, transfecting inflammatory or cancer cells with pmeLUC might allow the inflammatory or tumour microenvironment to be probed directly in vivo, respectively. Alternatively, pmeLUC-transfected cells can be directly inoculated into the tissue site of interest to report the local extracellular ATP concentration. Obviously, a limitation in the use of the pmeLUC probe is the need for transfection, a technical step that narrows the cell types and processes amenable to investigation. Applications We first used pmeLUC-transfected cells to probe the ATP content of the tumour microenvironment. Investigation of the biochemical composition of the tumour microenvironment is a focus of current interest as it is now clear that tumour progression and metastasis diffusion depend critically on the peculiar properties of this compartment. Here, a complex array of factors are secreted that inhibit cell death and promote survival and proliferation, stimulate angiogenesis, invasion and metastasis, and inhibit T-cell-and natural killer cellmediated cytotoxic responses. Extracellular ATP is a key biochemical constituent of the tumour microenvironment. The tumour microenvironment is eminently hypoxic and it has long been known that hypoxia causes ATP release. Furthermore, hypoxia-inducible factor-alpha has a strong modulatory effect on the expression of the extracellular enzymes that hydrolyse extracellular ATP and generate adenosine. Thus, one of the hallmarks of the tumour microenvironment is its abundance of purinergic mediators. Very probably, ATP is rsfs.royalsocietypublishing.org Interface Focus 3: 20120101 released into the tumour microenvironment by inflammatory as well as tumour cells. Here, it is understood that this nucleotide may act as an autocrine/paracrine stimulus to support cell growth and differentiation. ATP might be responsible for several responses that promote tumour progression: (i) induction of a distorted maturation of tumour-associated dendritic cells that would favour a T-helper 2 (Th2) rather than Th1 response; (ii) stimulation of tumour cell proliferation; (iii) potentiation of tumour cell aerobic glycolysis (Warburg effect); (iv) stimulation of release of angiogenic factors (e.g. vascular endothelial growth factor); and (v) generation of the potent immunosuppressor adenosine. In the first place, we have used HEK293-pmeLUC cells to verify the assumption that tumour interstitium is ATP rich. To this aim, HEK293-pmeLUC cells were injected into tumour-bearing or control nude mice, and bioluminescence was monitored with a total body luminometer (Caliper-Perki-nElmer IVIS Lumina). Very interestingly, injection of HEK293-pmeLUC cells into healthy animals produced no luminescence, irrespective of the route of inoculation, i.e. intravenous, intraperitoneal or subcutaneous (figure 5a). On the contrary, inoculation of the reporter cells into mice bearing the OVCAR-3 human ovarian carcinoma or the MZ2-MEL human melanoma produced strong luminescence at tumour sites (figure 5b). Luminescence was sensitive to injection of apyrase, a potent ATP-hydrolysing enzyme. Calibration of the luminescence signal revealed that the ATP concentration in the tumour interstitium reached the hundred micromolar range. Further demonstration of the reliability of pmeLUC cells as a sensor of extracellular ATP comes from experiments in which this probe was directly transfected into the CT26 colon carcinoma cells (CT26-pmeLUC cells), and these transfectants were used to establish the tumour (figure 6). Also in this case, luminescence analysis revealed that tumour cells generate a microenvironment in which the ATP concentration is in the hundred micromolar range. Rather interestingly, these experiments revealed that ATP release from cancer cells correlates with other biological features, such as ability to carry out autophagy, that directly impinge on the tumour's susceptibility to chemotherapy. In addition, ATP release from cancer cells is also necessary to induce an efficient anti-cancer immune response via stimulation of the P2X7 receptor expressed by tumour-infiltrating dendritic cells or tumour-associated macrophages. Inflammation The tumour microenvironment has its own specific features, but there is no doubt that generally speaking it can be equated to an inflammatory milieu. Therefore, it is anticipated that inflammatory conditions of non-cancer origin are also characterized by a high extracellular ATP content. This was shown to be true in two models of inflammation: graft-versus-host disease (GVHD) and allergic contact dermatitis (ACD). Acute GVHD is a serious complication of allogeneic bone marrow transplantation and a major cause of morbidity and mortality. Understanding the mechanism that leads to excessive immune-mediated tissue destruction and to systemic inflammation is vital to design more effective therapeutic strategies. GVHD is often started by host tissue damage by transplant procedures, such as high-intensity chemoradiotherapy, that activate host antigen presenting cells (APCs), which are therefore already primed before donor tissue transplant. Total body irradiation is well known to stimulate host immune cells to secrete inflammatory cytokines such as tumour necrosis factor-a and interleukin-1b, and to induce endothelial and epithelial cell damage, especially in the gastrointestinal tract. In a second phase, host APCs present alloantigens to resting donor T cells, which are then activated and stimulated to proliferate. Together with T lymphocytes, macrophages and neutrophils are also activated in the target organs, thus further amplifying the inflammatory response and the subsequent tissue injury. Recent evidence shows that extracellular ATP plays a central role in the orchestration of this process. Accordingly, increases in the extracellular ATP concentration can be demonstrated during GVHD, especially in the specific target organs ( figure 7). ACD is a T-cell-mediated inflammatory skin disease caused by low molecular chemicals or metal ions. The molecular mechanism by which contact allergens activate the innate immune response is largely unknown, but it is increasingly clear that activation of dendritic cells by locally released DAMPs has a key role in the generation of an efficient immunostimulation by allergens. In ACD, as in GVHD, Weber and co-workers showed that an increase in the extracellular ATP concentration occurs before the early phases of the process, and that prevention of the ATP increase attenuates the inflammatory response. rsfs.royalsocietypublishing.org Interface Focus 3: 20120101 Conclusion and future directions Bioluminescence is an established and reliable technique for monitoring several biological parameters. The versatility of luciferase coupling to different physiologically relevant gene sequences and the availability of several genetically engineered mice that express luciferase either constitutively or conditionally allows visualization of a host of biological responses with little or no discomfort for the animal. The luciferase substrate, luciferin, is harmless, freely diffusible throughout the body and relatively cheap. pmeLUC was the obvious development of the luciferase/luciferin technique and of current efforts to better understand the pathophysiology of purinergic signalling. We believe that the ability to real-time visualize extracellular ATP in vivo should help solve several critical issues and allow a great leap forward in this field. The basic idea behind pmeLUC is indeed trivial, but establishing the optimal conditions for reliable and reproducible in vitro expression of functional pmeLUC required a substantial amount of experimental work. Nevertheless, we are now able to express functional pmeLUC in many human and mouse cell lines without major problems, except for the usual cell type limitations of cell transfection. On the contrary, and rather surprisingly to us, in vivo application of pmeLUC was much less problematic: the stable pmeLUC transfectants selected at the end of the cumbersome in vitro procedure described in Pellegatti et al. turned out to be perfectly responsive and reliable the very first time they were tested in vivo. Ease of use and reproducibility are certainly reasons for the increasing attention that the scientific community is paying to pmeLUC. As of February 2013, each of the two seminal papers describing the construction and in vitro validation of this probe and its first in vivo application received over 70 citations. Moreover, our group has freely provided both the pmeLUC plasmid and the stably transfected HEK293-pmeLUC cells to several laboratories that have independently validated this sensor in vivo. Results from some of these studies are already available in the literature. The main advantage of pmeLUC is its cellular location that allows recording of ATP changes in a restricted milieu, close to the external surface of the plasma membrane, and not easily accessible to other probes. Low affinity for ATP, which in principle should be a drawback, turns out to be a bonus, because it makes pmeLUC responsive only to frankly pathological increases in extracellular ATP, thus making this probe a useful indicator of disease or injury ( figure 5). Clearly, under certain conditions, pmeLUC-transfected cells might be unsuitable to reach the core of an inflammatory site or of a solid tumour. In this regard, a model mouse constitutively expressing pmeLUC would be ideal. In collaboration with the Danish Center for Genetically Modified Mice (Arhus, Denmark), we have generated a transgenic mouse that constitutively expresses pmeLUC. The pmeLUC mouse is currently being characterized in the authors' laboratory. A conditional pmeLUC mouse model would also further extend the range of applications. Furthermore, in vivo applications of this technique will certainly be facilitated by the availability of luciferases with increased thermostability, tolerance to acidic pH or peak emission at longer wavelength, or novel more stable luciferin analogues. In conclusion, we believe that the pmeLUC probe and its congeners will allow a more efficient exploration of protected environments that have been up to now refractory to biochemical investigation, will enhance our understanding of inflammation and tumour pathophysiology and will provide novel tools for imaging diseased sites in vivo.. Increased ATP release in the gut during GVHD in mice. Extracellular ATP levels were revealed by HEK293-pmeLUC cells injected intravenously in BALB/c mice that were either untreated or had received irradiation and allogeneic bone marrow alone (BM), or BM together with allogeneic T cells (BM Tc), or BM with allogeneic T cells and apyrase (BM Tc apyrase). These data indicate that the ATP level increases in the gut during GVHD. ATP increase is abrogated by apyrase (adapted from Wilhelm et al. ). Figure 6. pmeLUC reveals an enhanced level of ATP release from autophagycompetent cancer cells. CT26 cancer cells engineered to express the pmeLUC exhibited a significant increase in ATP-dependent luminescence 48 h after systemic chemotherapy with the anti-cancer drug mitoxantrone. ATP release was much higher in autophagy-competent CT26 cells (SCR, cells transfected with a scrambled siRNA construct) than in autophagy-deficient CT26 cells transfected with a siRNA specific for the two autophagy genes Atg7 and Atg5 (adapted from Michaud et al. ).
// // Author: <NAME> // Date: 2017-05-22 17:50:23 // // Last Modified by: <NAME> // Last Modified time: 2017-05-22 17:50:23 // #ifndef ITILE_HPP_ # define ITILE_HPP_ #include <cstddef> #include <string> #include <utility> #include "Color.hpp" #include "Game/ModelsId.hpp" namespace indie { /// /// \enum class ELookAT : int /// \brief Indicate the direction where the model is looking at. /// enum class ELookAt : int { NORTH = 0, EAST, SOUTH, WEST }; /// /// \class ITile /// \brief Interface representing a tile /// /// A tile is a "block" of the map. It can be a wall, a empty block, /// a player, etc. It can be described with a type, a color and/or /// a Model. /// class ITile { public: /// /// \fn virtual ~ITile() /// \brief Virtual destructor of the interface /// virtual ~ITile() {}; /// /// \fn virtual size_t getTileSize() const = 0 /// \brief Returns the size of the tile, in other words /// the number of elements in this tile. /// virtual size_t getTileSize() const = 0; /// /// \fn virtual bool hasModel(size_t at) const = 0 /// \brief Returns true if the Tile has a Model affected /// virtual bool hasModel(size_t at) const = 0; /// /// \fn virtual size_t getModelId(size_t at) const = 0 /// \brief Get the Mesh ID linked with the model /// virtual indie::MODELS_ID getModelId(size_t at) const = 0; /// /// \fn virtual size_t getObjectId(size_t at) const = 0 /// \brief Get the Model ID /// virtual size_t getObjectId(size_t at) const = 0; /// /// \fn virtual ELookAt getObjectRotation(size_t at) const = 0 /// \brief Get the direction towards which the character is directed /// virtual ELookAt getObjectRotation(size_t at) const = 0; /// /// \fn virtual std::string getObjectTexture(size_t at) const = 0 /// \brief Get the Model texture /// virtual std::string getObjectTexture(size_t at) const = 0; /// /// \fn virtual bool doesAnimationChanged(size_t at) const = 0 /// \brief Returns true if the animation of the model has been changed /// virtual bool doesAnimationChanged(size_t at) const = 0; /// /// \fn virtual std::pair<size_t, size_t> getObjectFrameLoop(size_t at) const = 0 /// \brief Get the new frame loop of the model. /// virtual std::pair<size_t, size_t> getObjectFrameLoop(size_t at) const = 0; /// /// \fn virtual double getShiftX(size_t at) const = 0 /// \brief Get the tile position shift on x /// virtual double getShiftX(size_t at) const = 0; /// /// \fn virtual size_t getShiftY(size_t at) const = 0 /// \brief Get the tile position shift on y /// virtual double getShiftY(size_t at) const = 0; /// /// \fn virtual OBJECTS_ID getType(size_t at) const = 0 /// \brief Get the type of the object int the tile /// virtual OBJECTS_ID getType(size_t at) const = 0; }; } #endif // !ITILE_HPP_
// TODO(zpzim): move this back into SCAMP_Operation, we shouldn't have the // merging be functionality of the individual tile // Merges a local result "tile_profile" with the global matrix profile // "full_profile" void Tile::MergeTileIntoFullProfile(Profile *tile_profile, uint64_t position, uint64_t length, Profile *full_profile, uint64_t index_start, std::mutex &lock) { std::unique_lock<std::mutex> mlock(lock); switch (_info->profile_type) { case PROFILE_TYPE_SUM_THRESH: elementwise_sum<double>(full_profile->data[0].double_value.data(), position, length, tile_profile->data[0].double_value.data()); return; case PROFILE_TYPE_1NN_INDEX: elementwise_max<uint64_t>( full_profile->data[0].uint64_value.data(), position, length, tile_profile->data[0].uint64_value.data(), index_start); return; case PROFILE_TYPE_1NN: elementwise_max<float>(full_profile->data[0].float_value.data(), position, length, tile_profile->data[0].float_value.data()); return; case PROFILE_TYPE_FREQUENCY_THRESH: elementwise_sum<uint64_t>(full_profile->data[0].uint64_value.data(), position, length, tile_profile->data[0].uint64_value.data()); return; case PROFILE_TYPE_KNN: case PROFILE_TYPE_1NN_MULTIDIM: default: ASSERT(false, "FUNCTIONALITY UNIMPLEMENTED"); return; } }
import { defineComponent, PropType } from 'vue' import { IContainer } from '../../../models/item/IContainer' export default defineComponent({ props: { item: { type: Object as PropType<IContainer>, required: true } } })
<filename>src/Server.ts import 'express-async-errors' import express, { NextFunction, Request, Response } from 'express' import cors from 'cors' import bodyParser from 'body-parser' import v1 from './routes/v1.router' const app: express.Application = express() app.use(cors()) app.use(bodyParser.json()) app.use(bodyParser.urlencoded({ extended: true })) app.use('/api/v1', v1) app.use((error:Error,request:Request,response:Response, nextFunction:NextFunction)=>{ return response.status(500).json({ message:error.message }) }) export { app }
Japanese ironclad Fusō Background Tensions between Japan and China heightened after the former launched its punitive expedition against Taiwan in May 1874 in retaliation of the murder of a number of shipwrecked sailors by the Paiwan aborigines. China inquired into the possibility of buying ironclad warships from Great Britain and Japan was already negotiating with the Brazilian government about the purchase of the ironclad Independencia then under construction in Britain. The Japanese terminated the negotiations with the Brazilians in October after the ship was badly damaged upon launching and the expeditionary force was about to withdraw from Taiwan. The crisis illustrated the need to reinforce the IJN and a budget request was submitted that same month by Acting Navy Minister Kawamura Sumiyoshi for ¥3.9–4.2 million to purchase three warships from abroad. No Japanese shipyard was able to build ships of this size so they were ordered from Great Britain. This was rejected as too expensive and a revised request of ¥2.3 million was approved later that month. Nothing was done until March 1875 when Kawamura proposed to buy one ironclad for half of the money authorized and use the rest for shipbuilding and gun production at the Yokosuka Shipyard. No response was made by the Prime Minister's office before the proposal was revised to use all of the allocated money to buy three ships, one iron-hulled armored warship and two armored corvettes of composite construction to be designed by the prominent British naval architect Sir Edward Reed, formerly the Chief Constructor of the Royal Navy. Reed would also supervise the construction of the ships for an honorarium of five percent of the construction cost. The Prime Minister's office approved the revised proposal on 2 May and notified the Japanese consul, Ueno Kagenori, that navy officers would be visiting to negotiate the contract with Reed. Commander Matsumura Junzō arrived in London on 21 July and gave Reed the specifications for the ships. Reed responded on 3 September with an offer, excluding armament, that exceeded the amount allocated in the budget. Ueno signed the contracts for all three ships on 24 September despite this problem because Reed was scheduled to depart for a trip to Russia and the matter had to be concluded before his departure. Ueno had informed the Navy Ministry about the costs before signing, but Kawamura's response to postpone the order for the armored frigate did not arrive until 8 October. The totals for all three contracts came to £433,850 or ¥2,231,563 and did not include the armament. These were ordered from Krupp with a 50 percent down payment of £24,978. The government struggled to provide the necessary money even though the additional expenses had been approved by the Prime Minister's office on 5 June 1876, especially as more money was necessary to fully equip the ships for sea and to provision them for the delivery voyage to Japan. Description The design of Fusō was based on a scaled-down version of HMS Iron Duke, an Audacious-class central-battery ironclad, familiar to the Japanese as the flagship of the Royal Navy China Station from 1871–75. The ship was 220 feet (67.1 m) long between perpendiculars and had a beam of 48 feet (14.6 m). She had a forward draft of 17 feet 9 inches (5.4 m) and drew 18 feet 5 inches (5.6 m) aft. She displaced 2,248 long tons (2,284 t) and had a crew of 26 officers and 269 enlisted men. Propulsion Fusō had a pair of two-cylinder, double-expansion trunk steam engines made by John Penn and Sons, each driving a two-bladed 15-foot-6-inch (4.7 m) propeller. Eight cylindrical boilers provided steam to the engine at a working pressure of 4.09 bar (409 kPa; 59 psi). The engines were designed to produce 3,500 indicated horsepower (2,600 kW) to give the ships a speed of 13 knots (24 km/h; 15 mph). During her sea trials on 3 January 1878, she reached a maximum speed of 13.16 knots (24.37 km/h; 15.14 mph) from 3,824 ihp (2,852 kW). The ship carried a maximum of 350 long tons (360 t) of coal, enough to steam 4,500 nautical miles (8,300 km; 5,200 mi) at 10 knots (19 km/h; 12 mph). The three-masted ironclad was barque-rigged and had a sail area of 17,000 square feet (1,579 m²). To reduce wind resistance while under sail alone, the funnel was semi-retractable. The ship was modernized at Yokosuka Naval Arsenal beginning in 1891. Her masts were removed and the fore- and mizzenmasts were replaced by two military masts also fitted with fighting tops. Her funnel was fixed in height and she received four new cylindrical boilers. To offset the reduced number of boilers, the new ones were fitted with forced draught which increased their working pressure to 6.13 bar (613 kPa; 89 psi). The space made available by removal of the boilers was used to increase her coal storage by 36 long tons (37 t). Armament and armor Fusō was fitted with four 20-caliber 24-centimeter (9.4 in) Krupp rifled breech-loading (RBL) guns and two 22-caliber RBL 17-centimeter (6.7 in) Krupp guns. The 24 cm guns were mounted at the corners of the armored citadel on the main deck at an angle of 65 degrees to the centerline of the ship. Each gun could traverse 35 degrees to the left and right. Only the 60-degree arc at the bow and stern could not be fired upon. The two pivot-mounted 17-centimeter guns were positioned on the sides of the upper deck, each with three gun ports that allowed them to act as chase guns, firing fore and aft, as well as on the broadside. The ship also carried four long and two short 75-millimeter (3.0 in) guns, the latter intended for use ashore or mounted on the ship's boats. The armor-piercing shell of the 24-centimeter gun weighed 352.7 pounds (160 kg). It had a muzzle velocity of 1,560 ft/s (475 m/s) and was credited with the ability to penetrate 15.5 inches (393 mm) of wrought iron armor at the muzzle. The 132.3-pound (60 kg) 17-centimeter shell had a muzzle velocity of 1,510–1,600 ft/s (460–487 m/s) and could penetrate 10.3–11.4 inches (262–290 mm) of armor. The only data available for the 75-millimeter guns is their muzzle velocities of 1,550 ft/s (473 m/s) and 960 ft/s (292 m/s) for the long and short-barreled guns respectively. During the 1880s the armament of Fusō was augmented several times. In June 1883 seven quadruple-barreled 25.4-millimeter (1.0 in) Nordenfelt machine guns were added for defense against torpedo boats. Five were positioned on the upper deck and one each in the fighting tops. Three years later two quintuple-barreled 11-millimeter (0.4 in) Nordenfeldt machine guns were mounted in the fighting tops. Slightly earlier, Fusō became the first ship in the IJN to mount 356-millimeter (14.0 in) torpedo tubes for Schwartzkopff torpedoes when two above-water, traverseable tubes, one on each broadside, were added in late 1885. She first fired these weapons on 14 January 1886 although further testing revealed that the torpedoes were often damaged by the impact with the water. Upon the recommendation of the prominent French naval architect Louis-Émile Bertin, a "spoon" was added to the ends of the tubes to make the torpedoes strike the water horizontally which better distributed the shock of impact. The modifications were made and successful tests were conducted before the end of the year. When the ship was being refitted from 1891–94, her anti-torpedo boat armament was reinforced by the replacement of three 25.4-millimeter Nordenfelt guns by a pair of 2.5-pounder Hotchkiss guns and a single 3-pounder Hotchkiss gun. Two additional 11-millimeter Nordenfelt guns in the fighting tops were also added at that time. After the Sino-Japanese War, a small poop deck was added in 1896 and a quick-firing (QF) 12-centimetre (4.7 in) gun was mounted there as the stern chase gun. Another such gun was mounted on the forecastle as the forward chase gun and the two 17-centimeter guns were replaced by another pair of 12-centimeter quick-firers. In addition twelve 3-pounder Hotchkiss guns were added and the 11-millimeter guns were replaced by 25.4-millimeter Nordenfelts. In March 1900 the 12-centimeter chase guns were superseded by two QF 15-centimetre (5.9 in) guns and the former chase guns were shifted to make room for them. The final change to Fusō's armament was made in July 1906 when her obsolete 24-centimeter guns were replaced by two QF 15-centimeter guns and two more 3-pounders were added. Fusō had a wrought-iron waterline armor belt 9 inches (229 mm) thick amidships that tapered to 6.4 inches (162 mm) at the ends of the ship. The sides of the central battery were 9 inches thick and the transverse bulkheads were 8 inches (203 mm) thick. Construction and career Given a classical name for Japan, Fusō was built at the Samuda Brothers shipyard in Cubitt Town, London. Japanese sources universally give the date for Kongō's keel-laying as 24 September 1875—the same as that for the awarding of the contract—but historian Hans Langerer describes this as improbable, arguing that no shipyard would order enough material to begin construction without cash in hand. Fusō was launched on 14 April 1877 when Ueno Ikuko, wife of the Japanese consul, cut the retaining rope with a hammer and chisel. Completed in January 1878, the ship sailed for Japan before 22 March under the command of a British captain and with a British crew because the IJN was not yet ready for such a long voyage. While transiting the Suez Canal, she was lightly damaged when she ran aground on 27 April. She received temporary repairs at a local dockyard and arrived in Yokohama on 11 June. She was classified as a second-class warship while still in transit. She was transferred to Yokosuka Naval Arsenal on 17 June for permanent repairs. On 10 July a formal ceremony was held in Yokohama for the receipt of the ship that was attended by the Meiji Emperor and many senior government officials. The ship was then opened for tours by the nobility, their families and invited guests for three days after the ceremony. Beginning on 14 July, the general public was allowed to tour the ship for a week. Fusō was assigned to the Tokai Naval District and the Standing Fleet in 1880. That same year she transported the Naval Lord, Enomoto Takeaki, on a tour of Hokkaido. On 10 August 1881 she departed with Emperor Meiji on a tour of Aomori Prefecture and Otaru, Hokkaido that lasted until 30 September. The ship was transferred to the Medium Fleet in 1882 and made port visits in Kyushu and Pusan, Korea the following year. Fusō visited Hong Kong and Shanghai, China in 1884. She hosted Empress Shōken for the launching ceremony of the corvette Musashi on 30 March 1886 and was transferred to the Small Standing Fleet in 1887. The ship made a lengthy cruise in the Western Pacific in 1888 and visited ports in Korea, Russia and China the following year. Fusō participated in the fleet maneuvers on 25 March 1880 and then hosted Emperor Meiji for his visits to Kure, Sasebo, and Etajima. From November 1891 to July 1894, Fusō was extensively refitted and partially modernized at Yokosuka Naval Arsenal. During the Battle of the Yalu River on 17 September 1894, Fusō was assigned to the rear of the Japanese main body and was heavily engaged by the Chinese ships. Although hit many times by 6-inch (152 mm) shells, not one penetrated her armor; of her crew only five were killed and nine wounded. During the battle her crew fired twenty-nine 24 cm, thirty-two 17 cm, one hundred thirty-six 75 mm, one hundred sixty-four 2.5- and 3-pounder shells and over fifteen hundred shells from her machine guns. The ship was present during the Battle of Weihaiwei in January–February 1895, although she did not see any significant combat. On 29 October 1897, Fusō's anchor chain broke during a strong gale off Nagahama, Ehime and she collided with the ram of the protected cruiser Matsushima at 16:30. She then struck Matsushima's sister ship, Itsukushima, and sank at 16:57. Re-classed as a second-class battleship on 21 March 1898 and refloated on 7 July, Fusō was repaired at Kure Naval Arsenal and ran her trials on 8 April 1900. Fusō served as the flagship of Rear Admiral Sukeuji Hosoya, Seventh Division, Third Squadron, during the Russo-Japanese War and was held in reserve south of Tsushima Island during the Battle of Tsushima in case the battle drifted her way. On 7 September 1904, her 15-centimeter guns were dismounted for use in the Siege of Port Arthur. They were replaced by guns transferred from the damaged Akashi at Maizuru Naval Arsenal on 28 December. She was reclassified as a coast defense ship in December 1905, and stricken on 1 April 1908. Relegated to the status of a "miscellaneous service craft", she was assigned to the Yokosuka Harbor Master until she was ordered to be sold on 15 February 1909. Yokosuka reported her sale on 30 November, but provided no information on the date of sale or the name of the winning bidder.
<reponame>herrywen-nanj/51reboot # 真 且 真 print(True and True) # True # 真 且 假 print(True and False) # False # 真 或 假 print(True or False) # True # 假 或 假 print(False or False) # False # 非假 print(not True) # False
Dielectric properties of residual water in amorphous lyophilized mixtures of sugar and drug Dielectric relaxation spectroscopy was used to investigate the properties of residual water in lyophilized formulations of a proprietary tri-phosphate drug containing a sugar (trehalose, lactose or sucrose) or dextran. The dielectric properties of each formulation were determined in the frequency range (0.1 Hz0.1 MHz) and temperature range (30°CTg). The temperature dependence of the relaxation times for all samples showed Arrhenuis behaviour, from which the activation energy was derived. Proton hopping through the hydrogen-bonded network (clusters) of water molecules was suggested as the principle mode of charge transport. Significant differences in dielectric relaxation kinetics and activation energy were observed for the different formulations, which were found to correlate with the amount of monophosphate degradation product.
<reponame>PaddyHuang/Basic<filename>Languages/Python3/006-DataStructure/03-SeqStack.py #!/usr/local/bin/python3 class SeqStack(object): def __init__(self): # 构造函数 print('Initiating list...') self.__top = -1 # 顺序栈栈顶指针 self.__maxsize = 10 # 顺序栈最大长度 self.__elements = [0] * self.__maxsize # 顺序栈元素列表 print('Initiated.') def __del__(self): # 析构函数 print('Del list') del self def __len__(self): # 获取长度 print('Stack size: ', end = '') return self.__top def isEmpty(self): # 顺序栈判空 return True if self.__top == -1 else False def isFull(self): # 顺序栈判满 return True if self.__top >= self.__maxsize else False def push(self, value: int): self.__elements[self.__top] = value self.__top += 1 def peek(self): return self.__elements[self.__top - 1] def pop(self): value = self.__elements[self.__top - 1] self.__top -= 1 return value def main(): seqStack = SeqStack() seqStack.push(10) seqStack.push(20) seqStack.push(30) while not seqStack.isEmpty(): print('Pop: ', end = '') print(seqStack.pop()) if __name__ == '__main__': main()
package main import ( "fmt" "math" ) func thirdMax(nums []int) int { min := nums[0] for _, n := range nums[1:] { if n < min { min = n } } min -= 1 first, second, third := min, min, min for _, n := range nums { switch { case n > first: third = second second = first first = n case n == first: // do nothing case n > second: third = second second = n case n == second: // do nothing case n > third: third = n } } if third == min { return first } return third } func main() { fmt.Println("hello world!") fmt.Println(thirdMax([]int{1, 2, -2147483648})) fmt.Println(math.MinInt64) }
// SpawnHost creates and starts a new Docker container func (m *dockerManager) SpawnHost(ctx context.Context, h *host.Host) (*host.Host, error) { if h.Distro.Provider != evergreen.ProviderNameDocker { return nil, errors.Errorf("Can't spawn instance of %s for distro %s: provider is %s", evergreen.ProviderNameDocker, h.Distro.Id, h.Distro.Provider) } settings := &dockerSettings{} if h.Distro.ProviderSettings != nil { if err := mapstructure.Decode(h.Distro.ProviderSettings, settings); err != nil { return nil, errors.Wrapf(err, "Error decoding params for distro '%s'", h.Distro.Id) } } if err := settings.Validate(); err != nil { return nil, errors.Wrapf(err, "Invalid Docker settings in distro '%s'", h.Distro.Id) } grip.Info(message.Fields{ "message": "decoded Docker container settings", "container": h.Id, "host_ip": settings.HostIP, "image_id": settings.ImageID, "client_port": settings.ClientPort, "min_port": settings.PortRange.MinPort, "max_port": settings.PortRange.MaxPort, }) if err := m.client.CreateContainer(ctx, h.Id, h.Distro, settings); err != nil { err = errors.Wrapf(err, "Failed to create container for host '%s'", settings.HostIP) grip.Error(err) return nil, err } if err := m.client.StartContainer(ctx, h); err != nil { err = errors.Wrapf(err, "Docker start container API call failed for host '%s'", settings.HostIP) if err2 := m.client.RemoveContainer(ctx, h); err2 != nil { err = errors.Wrapf(err, "Unable to cleanup: %+v", err2) } grip.Error(err) return nil, err } grip.Info(message.Fields{ "message": "created and started Docker container", "container": h.Id, }) event.LogHostStarted(h.Id) newContainer, err := m.client.GetContainer(ctx, h) if err != nil { err = errors.Wrapf(err, "Docker inspect container API call failed for host '%s'", settings.HostIP) grip.Error(err) return nil, err } hostPort, err := retrieveOpenPortBinding(newContainer) if err != nil { err = errors.Wrapf(err, "Container '%s' could not retrieve open ports", newContainer.ID) grip.Error(err) return nil, err } h.Host = fmt.Sprintf("%s:%s", settings.HostIP, hostPort) grip.Info(message.Fields{ "message": "retrieved open port binding", "container": h.Id, "host_ip": settings.HostIP, "host_port": hostPort, }) return h, nil }
import sys import time for x in range(0, 2): print ("result %d" % x) time.sleep(1) print ("foobar!", file=sys.stderr) sys.exit(1)
<gh_stars>1-10 package co.gobd.tracker.network; import co.gobd.tracker.config.BackendUrl; import co.gobd.tracker.model.tracker.TrackerLocation; import retrofit2.Call; import retrofit2.http.Body; import retrofit2.http.POST; /** * Created by tonmoy on 27-Dec-15. */ public interface TrackerApi { @POST(BackendUrl.ShadowCat.PING) Call<Void> ping(@Body TrackerLocation trackerLocation); }
// MarshalBinary takes a range proof and marshals into bytes. func (proof *RangeProof) MarshalBinary() []byte { var out []byte out = append(out, proof.capA.ToAffineCompressed()...) out = append(out, proof.capS.ToAffineCompressed()...) out = append(out, proof.capT1.ToAffineCompressed()...) out = append(out, proof.capT2.ToAffineCompressed()...) out = append(out, proof.taux.Bytes()...) out = append(out, proof.mu.Bytes()...) out = append(out, proof.tHat.Bytes()...) out = append(out, proof.ipp.MarshalBinary()...) return out }
def install_libs(binary, installdir): while installdir.startswith('//'): installdir = installdir[1:] def _find_libs(target): p = subprocess.Popen(["ldd", target], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) (outdata, errdata) = p.communicate() libs = set() for line in outdata.split('\n'): fields = line.split() if not len(fields): continue if len(fields) > 2 and os.path.exists(fields[2]): libs.add(fields[2]) elif os.path.exists(fields[0]): libs.add(fields[0]) return libs def find_libs(target): libs = set() more_libs = _find_libs(target) while libs != more_libs: for lib in set(more_libs - libs): libs.add(lib) more_libs.update(_find_libs(lib)) return libs for lib in find_libs(binary): fname = os.path.basename(lib) if os.path.exists(installdir + '/' + fname): continue print("Installing %s" % lib) shutil.copy2(lib, installdir)
Hybrid Entity Mismatches: Exploring Three Alternatives for Coordination The OECD pragmatic approach regarding hybrid entity mismatches is, without doubt, questionable. However, equally questionable is the absence of alternatives solutions proposed by either academics or tax policy makers, which demonstrates a sort of conformism as regards both the diagnosis of the problems and the solutions thereto, as if matching tax outcomes and taxing income somewhere no matter where were indeed the only possible path to deal with hybrid entity mismatches. In an attempt to break this inertia, this article argues for coordination in the tax characterization of entities as a straightforward and suitable alternative to replace the current OECD linking rules, and perhaps also, the consequentialist OECD approach to hybrid entity mismatches. For this purpose, three specific alternatives are explored for coordination in the tax characterization of entities, which include supremacy of the tax characterization rules of the source state, supremacy of the tax characterization rules of the residence state and supremacy of the tax characterization rules of the home state. The analysis of these alternatives includes both hypotheticals and specific examples from domestic and supranational laws that are used to illustrate and support their effectiveness. The ultimate aim of this article is to demonstrate that coordination in the tax characterization of entities appears to be not only a more preferable path when compared to the OECD approach of matching tax outcomes, but also a more coherent and less costly alternative for both taxpayers and tax administrations.
use std::collections::HashMap; pub fn sum(stack: &Vec<f32>) -> f32{ stack.iter().sum() } pub fn prod(stack: &Vec<f32>) -> f32{ stack.iter().product() } pub fn eval_rpn(ln: &str, numtable: &HashMap<&str, f32>, bin_num_ops: &HashMap<String, fn(f32,f32)->f32>, stac_num_ops: &HashMap<String, fn(&Vec<f32>)->f32>, ops: &str) -> f32 { let mut stack: Vec<f32> = Vec::new(); let line_parse = ln.split(' ').collect::<Vec<&str>>(); let mut place_holder: f32; for t in line_parse.iter(){ println!("tkn = {:?}",t); if ops.contains(t){ if bin_num_ops.contains_key(&t.to_string()){ place_holder = bin_num_ops[&t.to_string()](stack[0], stack[1]); } else { place_holder = stac_num_ops[&t.to_string()](&stack); } stack = Vec::new(); stack.push(place_holder); println!("{:?}",stack); } else if t.chars().all(|x| x.is_numeric()){ stack.push(t.to_string().parse::<f32>().unwrap()); println!("{:?}",stack); } else { let varname : String = t.to_string().to_owned(); stack.push(numtable[&varname[..]]); println!("{:?}",stack); } } println!("result = {:?} (quick maths)",stack); stack[0] }
Triiodothyronine increases glucose transporter isotype 4 mRNA expression, glucose transport, and glycogen synthesis in adult rat cardiomyocytes in long-term culture. Effects of T3 treatment (day 2-day 12) on the expression of the insulin-regulated GLUT4, on 2-deoxyglucose uptake, and on glycogen synthesis were studied in ARC after 12 days of culture in T3-depleted 20% fetal calf serum. GLUT4 mRNA expression was low in controls, but increased in a dose-dependent manner by T3 treatment up to 2.8-fold at 100 nM. In parallel, 100 nM T3 increased basal 2-deoxyglucose uptake 1.95-fold and insulin-stimulated uptake 1.75-fold. In addition, T3 enhanced basal and insulin-stimulated glucose incorporation into glycogen 1.86- and 1.5-fold, respectively. Hence, ARC may meet part of their increased energy requirements in response to T3 by enhancing GLUT4 expression.
<reponame>BWoodfork/resilience4j<filename>resilience4j-reactor/src/test/java/io/github/resilience4j/reactor/bulkhead/operator/BulkheadSubscriberWhiteboxVerification.java<gh_stars>1000+ /* * Copyright 2018 <NAME> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.github.resilience4j.reactor.bulkhead.operator; import io.github.resilience4j.bulkhead.Bulkhead; import org.reactivestreams.Subscriber; import org.reactivestreams.Subscription; import org.reactivestreams.tck.SubscriberWhiteboxVerification; import org.reactivestreams.tck.TestEnvironment; import reactor.core.publisher.MonoProcessor; public class BulkheadSubscriberWhiteboxVerification extends SubscriberWhiteboxVerification<Integer> { public BulkheadSubscriberWhiteboxVerification() { super(new TestEnvironment()); } @Override public Subscriber<Integer> createSubscriber(WhiteboxSubscriberProbe<Integer> probe) { return new io.github.resilience4j.reactor.bulkhead.operator.BulkheadSubscriber<Integer>( Bulkhead.ofDefaults("verification"), MonoProcessor.create(), true) { @Override public void hookOnSubscribe(Subscription subscription) { super.hookOnSubscribe(subscription); // register a successful Subscription, and create a Puppet, // for the WhiteboxVerification to be able to drive its tests: probe.registerOnSubscribe(new SubscriberPuppet() { @Override public void triggerRequest(long elements) { subscription.request(elements); } @Override public void signalCancel() { subscription.cancel(); } }); } @Override public void hookOnNext(Integer integer) { super.hookOnNext(integer); probe.registerOnNext(integer); } @Override public void hookOnError(Throwable t) { super.hookOnError(t); probe.registerOnError(t); } @Override public void hookOnComplete() { super.hookOnComplete(); probe.registerOnComplete(); } }; } @Override public Integer createElement(int element) { return element; } }
<reponame>usma0118/PlexTraktSync<filename>plextraktsync/factory.py<gh_stars>0 from deprecated import deprecated from plextraktsync.decorators.memoize import memoize from plextraktsync.rich_addons import RichHighlighter class Factory: @memoize def trakt_api(self): from plextraktsync.trakt_api import TraktApi config = self.run_config() trakt = TraktApi(batch_delay=config.batch_delay) return trakt @memoize def plex_api(self): from plextraktsync.plex_api import PlexApi server = self.plex_server() plex = PlexApi(server) return plex @memoize def media_factory(self): from plextraktsync.media import MediaFactory trakt = self.trakt_api() plex = self.plex_api() mf = MediaFactory(plex, trakt) return mf @memoize def plex_server(self): from plextraktsync.plex_server import get_plex_server return get_plex_server() @memoize def session(self): from requests_cache import CachedSession config = self.config() trakt_cache = config["cache"]["path"] session = CachedSession(trakt_cache) return session @memoize @deprecated("Use session instead") def requests_cache(self): import requests_cache config = self.config() trakt_cache = config["cache"]["path"] requests_cache.install_cache(trakt_cache) return requests_cache @memoize def sync(self): from plextraktsync.sync import Sync config = self.config() return Sync(config) @memoize def progressbar(self, enabled=True): if enabled: import warnings from functools import partial from tqdm import TqdmExperimentalWarning from tqdm.rich import tqdm from plextraktsync.console import console warnings.filterwarnings("ignore", category=TqdmExperimentalWarning) return partial(tqdm, options={'console': console}) return None @memoize def run_config(self): from plextraktsync.config import RunConfig config = RunConfig() return config @memoize def walk_config(self): from plextraktsync.walker import WalkConfig wc = WalkConfig() return wc @memoize def plex_audio_codec(self): from plextraktsync.plex_api import PlexAudioCodec return PlexAudioCodec() @memoize def walker(self): from plextraktsync.walker import Walker config = self.run_config() walk_config = self.walk_config() plex = self.plex_api() trakt = self.trakt_api() mf = self.media_factory() pb = self.progressbar(config.progressbar) w = Walker(plex=plex, trakt=trakt, mf=mf, config=walk_config, progressbar=pb) return w @memoize def console_logger(self): from rich.logging import RichHandler from plextraktsync.console import console handler = RichHandler(console=console, show_time=False, show_path=False, highlighter=RichHighlighter()) return handler @memoize def config(self): from plextraktsync.config import CONFIG return CONFIG factory = Factory()
Portfolio Construction and New Energy Infrastructure Investing In light of the increasingly severe consequences of climate change, an increasing number of institutional investors want their investments to replicate their ethical values. This article identifies the decarbonization of global power generation as an opportunity for those investors requiring sustainable impact while enhancing the risk-adjusted returns for, and future-proofing of, their portfolios. After analyzing the worsening state of financial markets, with high equity valuations and record-low bond yields, the authors demonstrate the added benefit of economic resilience of sustainable infrastructure assets. A move into sustainable infrastructure is bolstered by global political tailwinds earmarking fiscal stimulus to upgrade existing and new green infrastructure, as well as regulators increasingly enforcing disclosure of progress. Finally, by delving deeper into portfolio construction, the authors argue for the benefits of diversifying into the adjacent renewable-energy technologies needed to sustain the forthcoming renewable-power networks to optimize the riskreturn profile of portfolios.
<filename>python/ql/src/Variables/UninitializedLocal.py<gh_stars>1000+ def test(): var = 1 def print_var(): print var # Use variable from outer scope print_var() print var def test1(): var = 2 def print_var(): print var # Attempt to use variable from local scope. var = 3 # Since this is not initialized yet, this results print_var() # in an UnboundLocalError print var def test2(): var = 2 def print_var(): var = 3 # Initialize local version of the variable print var # Use variable from local scope. print_var() # Note that this local variable "shadows" the variable from print var # outer scope which makes code more difficult to interpret. def test3(): var = 4 def print_var(): nonlocal var # Use non-local variable from outer scope. print var print_var() print var
Acquired Brachial Arteriovenous Fistula in an Ex-Premature Infant Jatrogenic vascular injuries sustained during venipuncture, catheterization, or central venous canulation do occur and may result in arteriovenous fistula (AVF) formation. The incidence of traumatic brachial artery fistula is reported to be 6% in civilians.' The incidence of acquired AVF in children secondary to venipuncture (excluding those from intervention-related procedures) is not exactly known but
import java.util.*; public class c254 { public static void main(String ar[]) { Scanner obj=new Scanner(System.in); int n=obj.nextInt(); int m=obj.nextInt(); int a[]=new int[n+1]; double ans=0.0; for(int i=1;i<=n;i++) a[i]=obj.nextInt(); int x,y,c; for(int i=0;i<m;i++) { x=obj.nextInt(); y=obj.nextInt(); c=obj.nextInt(); ans=Math.max(ans,(double)(a[x]+a[y])/(double)c); } System.out.println(ans); } }
Clinical outcome of cycles with oocyte degeneration after intracytoplasmic sperm injection ABSTRACT There are variant rates of oocyte degeneration after intracytoplasmic sperm injection (ICSI) among different patients. Oocyte degeneration after ICSI may reflect the cohort of oocyte quality and subsequent embryo development capacity and clinical outcome. This retrospective study analyzed 255 cycles with at least one degenerated oocyte after ICSI (degeneration group) and 243 cycles with no degenerated oocytes after ICSI (control group). Basic characteristics like female age, body mass index, duration of infertility, hormone (FSH, LH, E2) levels on day 3 of menses, and primary infertility patient rate were similar between the two groups (p > 0.05). Total dose of gonadotropin and length of stimulation were also similar between the two groups (p > 0.05), but the degeneration group exhibited a more exuberant response to ovarian stimulation as reflected by more oocytes retrieved (p < 0.05). The number of 2PN embryos available and high quality embryos were similar between the two groups (p > 0.05), but the high quality embryo rate, early cleavage embryo rate, and available embryo rate were all statistically lower than the control group (p < 0.05). Embryo developmental kinetics seemed to be disturbed and embryo fragmentation rate increased in the degeneration group (p < 0.05). However, there was no statistical difference in the distribution of graded embryos transferred, and there were no statistical differences in the pregnancy rate, implantation rate, and abortion rate between the two groups (p > 0.05). We deduce that the presence of oocyte degeneration after ICSI may be associated with decreased embryo quality with embryo development kinetics disturbed. However, the clinical outcomes may not be affected if the premise that sufficient high quality degeneration group embryos are available for transfer.
# -*- coding: utf-8 -*- # dcf # --- # A Python library for generating discounted cashflows. # # Author: sonntagsgesicht, based on a fork of Deutsche Postbank [pbrisk] # Version: 0.5, copyright Sunday, 21 November 2021 # Website: https://github.com/sonntagsgesicht/dcf # License: Apache License 2.0 (see LICENSE file) from .interestratecurve import ZeroRateCurve, CashRateCurve from .cashflow import CashFlowLegList def _simple_bracketing(func, a, b, precision=1e-13): """ find root by _simple_bracketing an interval :param callable func: function to find root :param float a: lower interval boundary :param float b: upper interval boundary :param float precision: max accepted error :rtype: tuple :return: :code:`(a, m, b)` of last recursion step with :code:`m = a + (b-a) *.5` """ fa, fb = func(a), func(b) if fb < fa: f = (lambda x: -func(x)) fa, fb = fb, fa else: f = func if not fa <= 0. <= fb: msg = "_simple_bracketing function must be loc monotone between %0.4f and %0.4f \n" % (a, b) msg += "and _simple_bracketing 0. between %0.4f and %0.4f." % (fa, fb) raise AssertionError(msg) m = a + (b - a) * 0.5 if abs(b - a) < precision and abs(fb - fa) < precision: return a, m, b a, b = (m, b) if f(m) < 0 else (a, m) return _simple_bracketing(f, a, b, precision) def get_present_value(cashflow_list, discount_curve, valuation_date=None, include_value_date=True): if valuation_date is None: valuation_date = cashflow_list.origin # filter flows if include_value_date: pay_dates = list(d for d in cashflow_list.domain if valuation_date <= d) else: pay_dates = list(d for d in cashflow_list.domain if valuation_date < d) # discount flows value_flows = zip(pay_dates, cashflow_list[pay_dates]) values = (discount_curve.get_discount_factor(valuation_date, t) * a for t, a in value_flows) return sum(values) def get_yield_to_maturity(cashflow_list, valuation_date=None, present_value=0., **kwargs): if valuation_date is None: valuation_date = cashflow_list.origin # set error function def err(current): discount_curve = ZeroRateCurve([valuation_date], [current], **kwargs) pv = get_present_value(cashflow_list, discount_curve, valuation_date) return pv - present_value # run bracketing _, ytm, _ = _simple_bracketing(err, -0.1, .2, 1e-2) return ytm def get_interest_accrued(cashflow_list, valuation_date): """ calculates interest accrued for rate cashflows :param cashflow_list: requires a `day_count` property :param valuation_date: calculation date :return: """ if cashflow_list.origin < valuation_date < cashflow_list.domain[-1]: if isinstance(cashflow_list, CashFlowLegList): return sum(get_interest_accrued(leg, valuation_date) for leg in cashflow_list.legs) last = max((d for d in cashflow_list.domain if valuation_date > d), default=cashflow_list.origin) next = list(d for d in cashflow_list.domain if valuation_date <= d)[0] if hasattr(cashflow_list, 'day_count'): remaining = cashflow_list.day_count(valuation_date, next) total = cashflow_list.day_count(last, next) return cashflow_list[next] * (1. - remaining / total) return 0. def get_par_rate(cashflow_list, discount_curve, valuation_date=None, present_value=0.): if valuation_date is None: valuation_date = cashflow_list.origin # todo: cashflow_list.payoff.fixed_rate fixed_rate = cashflow_list.fixed_rate # set error function def err(current): cashflow_list.fixed_rate = current pv = get_present_value(cashflow_list, discount_curve, valuation_date) return pv - present_value # run bracketing _, par, _ = _simple_bracketing(err, -0.1, .2, 1e-7) # restore fixed rate cashflow_list.fixed_rate = fixed_rate return par def get_basis_point_value(cashflow_list, discount_curve, delta_curve=None, valuation_date=None): if isinstance(cashflow_list, CashFlowLegList): return sum(get_basis_point_value( leg, discount_curve, delta_curve, valuation_date) for leg in cashflow_list.legs) pv = get_present_value(cashflow_list, discount_curve, valuation_date) delta_curve = discount_curve if delta_curve is None else delta_curve # check if curve is CashRateCurve if isinstance(delta_curve, CashRateCurve): basis_point_curve = CashRateCurve([delta_curve.origin], [0.0001]) else: basis_point_curve = ZeroRateCurve([delta_curve.origin], [0.0001]) shifted_curve = delta_curve + basis_point_curve if delta_curve == discount_curve: discount_curve = shifted_curve # todo: cashflow_list.payoff_model.forward_curve fwd_curve = getattr(cashflow_list, 'forward_curve', None) if fwd_curve == delta_curve: # replace delta_curve by shifted_curve cashflow_list.forward_curve = shifted_curve sh = get_present_value(cashflow_list, discount_curve, valuation_date) if fwd_curve == delta_curve: # restore delta_curve by shifted_curve cashflow_list.forward_curve = shifted_curve return sh - pv
import React from 'react'; import { useDispatch } from 'react-redux'; import { useTypedSelector } from '../../../hooks/useTypedSelector'; import { setLocalizationLanguage } from '../../../store/state/app/actions'; import { LanguageCode } from '../../../store/static/localization/types/LanguageCode'; import { Button } from '../../buttons/Button'; import { ButtonSwitcher } from '../ButtonSwitcher'; import { languageNames } from '../../../store/static/localization/localization'; import classnames from 'classnames'; import styles from './styles.scss'; export const LocalizationLanguageSwitcher: React.FC = () => { const appState = useTypedSelector((state) => state.app); const dispatch = useDispatch(); const localizationLanguages = Object.values(LanguageCode); return ( <ButtonSwitcher className={styles['localization-language-switcher']}> {localizationLanguages.map((localizationLanguage, index) => { const languageName = languageNames[localizationLanguage]; return ( <Button key={index} className={classnames(styles['button'], { [styles['button_selected']]: appState.localizationLanguage === localizationLanguage })} title={languageName} onClick={() => dispatch(setLocalizationLanguage(localizationLanguage))} > {languageName} </Button> ); })} </ButtonSwitcher> ); };
Sammi 'Sweetheart' Giancola looks likes she has forgiven love rat boyfriend Ronnie Ortiz Magro for cheating on her. After storming out of the Jersey Shore last week, the reality star has made a return to the house. And earlier today she was seen smiling widely as she went food shopping with Margo and fellow housemate Snooki, suggesting things are back on track. The trio stocked up on supplies, although Ronnie did look somewhat stern next to his cheerful partner. Sammi was left furious after watching an episode where Ronnie was cheating on her. He was shown partying every night with different girls, but going home at the end of the night to clueless Sammi. And it looks like all the house mates were aware of the situation apart from Sammi, who is livid that they didn't tell her what was happening. When Sammi saw the episode on TV, she allegedly flew into a rage and left the house, just a few weeks before season three was due to wrap. ‘Sammi was angry and hurt by everyone,’ a source told RadarOnline. ‘She couldn't believe Ronnie did this and the girls hadn't really told her. ‘She just couldn't stay living with the person who did this to her, so she moved out. ‘She had to find out in front of everyone that her boyfriend was lying to her and treating her like hell. But now it appears that Sammi has returned to the show - and after initially looking glum to be back has now apparently cheered up. Sammi and Ronnie first started dating during season one of the show, which was filmed in Seaside Heights, New Jersey. The couple were inseparable for the duration of filming, but split after a reunion special showed Sammi getting a little too close to castmate Mike 'The Situation' Sorrentino. When season two (which is currently being aired on MTV) began shooting, Sammi and Ronnie fell into a relationship again. But this time Ronnie had no intention of being faithful to Sammi - and the rest of the cast were well aware of Ronnie's actions. And it looks like Sammi has given everyone a piece of her mind since she's been back, judging by the dour expressions on their faces. And according to the source, Sammi's reasons for returning to the house were very simple.
Tomatidine Represses Invasion and Migration of Human Osteosarcoma U2OS and HOS Cells by Suppression of Presenilin 1 and c-RafMEKERK Pathway Osteosarcoma, which is the most prevalent malignant bone tumor, is responsible for the great majority of bone cancer-associated deaths because of its highly metastatic potential. Although tomatidine is suggested to serve as a chemosensitizer in multidrug-resistant tumors, the anti-metastatic effect of tomatidine in osteosarcoma is still unknown. Here, we tested the hypothesis that tomatidine suppresses migration and invasion, features that are associated with metastatic process in human osteosarcoma cells and also investigate its underlying pathway. Tomatidine, up to 100 M, without cytotoxicity, inhibited the invasion and migration capabilities of human osteosarcoma U2OS and HOS cells and repressed presenilin 1 (PS-1) expression of U2OS cells. After the knockdown of PS-1, U2OS and HOS cells biological behaviors of cellular invasion and migratory potential were significantly reduced. While tomatidine significantly decreased the phosphorylation of c-Raf, mitogen/extracellular signal-regulated kinase (MEK), and extracellular signal-regulated protein kinase (ERK)1/2 in U2OS cells, no obvious influences on p-Jun N-terminal kinase, p38, and Akt, including their phosphorylation, were observed. In ERK 1 silencing U2 OS cells, tomatidine further enhanced the decrease of their migratory potential and invasive activities. We conclude that both PS-1 derived from U2OS and HOS cells and the c-RafMEKERK pathway contribute to cellular invasion and migration and tomatidine could inhibit the phenomenons. These findings indicate that tomatidine might be a potential candidate for anti-metastasis treatment of human osteosarcoma. tomatidine affects the invasion and migration of human osteosarcoma cells and attempted to define its underlying mechanisms. Cytotoxicity of Tomatidine in Osteosarcoma U2OS and HOS Cells For the cell viability experiment, a microculture tetrazolium (MTT) (3-(4,5-dimethylthiazol-2-yl)-2,5-diphenyltetrazolium bromide) colorimetric assay was performed to determine the cytotoxicity of tomatidine. After 24 h of treatment, the viability of osteosarcoma U2OS and HOS cells in the presence of concentrations of 25, 50, 75, and 100 M of tomatidine was not significantly different to that of the controls (0 M) in MTT assay (U2OS: p = 0894; HOS: p = 0.136) ( Figure 1). Thus, a 24-h treatment with tomatidine up to 100 M had no cytotoxic effect on U2OS and HOS cells. We used this concentration range for tomatidine in all subsequent experiments to investigate its anti-metastatic properties. Tomatidine Represses U2OS and HOS Cells Migration and Invasiveness We used a modified Boyden chamber migration and invasion assays to test the effect of tomatidine on invasive properties of U2OS and HOS cells in vitro. After treating for 24 h, the Boyden chamber assay without Matrigel showed that tomatidine significantly dose-dependently reduced the migratory potential in U2OS and HOS cells (U2OS: p < 0.001; HOS: p < 0.001) ( Figure 2). The modified Boyden chamber assay with Matrigel also showed that tomatidine dose-dependently reduced the invasive activity in U2OS and HOS cells (U2OS: p < 0.001; HOS: p < 0.001). Tomatidine Reduces PS-1 Expression of U2OS Cells We employed the protease array, which showed repression of PS-1 secretion in U2OS cells after treatment of 100 M tomatidine for 24 h, to identify the underlying mechanism of the anti-metastatic actions of tomatidine in osteosarcoma cells, ( Figure 3A). However, no significant effects on MMP-2 and nine secretions were observed in the protease array. We subsequently performed the western blot analysis to validate the finding in the protease array and found that 100 M of tomatidine significantly repressed the PS-1 protein expression of U2OS cells (p = 0.001) ( Figure 3B). PS-1 Knockdown Reduces Migration and Invasion of U2OS and HOS Cells We transformed cells with a small interfering RNA (siRNA) targeting PS-1 expression for 24 h and measured the protein expression and the mRNA level in western blotting and reverse transcription-polymerase chain reaction (RT-PCR), respectively, to further confirm whether reduction of PS-1 interferes with migratory potential and invasive activity of U2OS and HOS cells (U2OS: protein: p < 0.001 and RNA: p < 0.001; HOS: protein: p < 0.001 and RNA: p = 0.002) ( Figure 4A). Subsequently, we performed Boyden chamber migration and modified Matrigel invasion assays while using siRNA of PS-1 for 24 h and 48 h to compare the amount of migratory and invasive cells, respectively. Unsurprisingly, the knockdown of PS-1 significantly decreased the migratory potential and invasive activities of U2OS and HOS cells (U2OS: migration: p = 0.008 and invasion: p = 0.034; HOS: migration: p = 0.001; and, invasion: p < 0.001) ( Figure 4B). Tomatidine Reduces the c-Raf-MEK-ERK Pathway in U2OS Cells Western blotting was employed to further investigate the molecular mechanisms since MAPKs and PI3K pathways may be dependent signaling of PS-1. In the analysis, c-Raf, mitogen/extracellular signal-regulated kinase (MEK), MAPKs, and PI3K-Akt pathways were detected in U2OS cells. As a result, tomatidine decreased the phosphorylation of c-Raf, MEK, and ERK 1/2 in U2OS cells, but no obvious influence on JNK 1/2, p38, and Akt, including their phosphorylation, was observed ( Figure 5). Tomatidine Inhibits Cellular Migration and Invasion in ERK 1 Knockdown U2OS Cells We conducted siRNA directly against the ERK 1 with and without treatment of 100 M tomatidine to identify whether the ERK pathway interferes with migratory potential and invasive activities in U2OS cells, and performed Boyden chamber migration and modified Matrigel invasion assays to compare the amount of migratory and invasive cells. Predictably, the knockdown of ERK 1 significantly decreased the migratory potential and invasive activities in U2OS cells (p < 0.05 and p < 0.05, respectively) and tomatidine further enhanced the decrease of migratory potential and invasive activities in ERK 1 silencing U2OS cells (p < 0.05 and p < 0.05, respectively) ( Figure 6). However, with and without treatment of 100 M tomatidine, ERK 1 knockdown could not further enhance the decrease of PS-1 expression (data not shown), which implies that the c-Raf-MEK-ERK pathway might be not the upstream signaling of PS-1. Discussion In the study, tomatidine, without cytotoxicity, attenuated migratory potential and invasiveness of U2OS and HOS cells. Although MMP-2 and MMP-9 are key enzymes and they contribute to the process of osteosarcoma cell invasion and metastasis in our previous research, there were no effects of tomatidine on MMP-2 and nine secretions of U2OS cells in the protease array. Intriguingly, the repression of PS-1 in U2OS cells was observed after treatment of 100 M tomatidine and the tomatidine's repression of PS-1 protein expression was verified in western blotting. The silencing of PS-1 confirmed the anti-metastatic properties of migration and invasion of U2OS and HOS cells by PS-1. Through a further analysis of MAPKs and the PI3K pathways, tomatidine decreased the phosphorylation of c-Raf, MEK, and ERK 1/2 in U2OS and HOS cells, whereas there was no evident influence on JNK 1/2, p38, and Akt, and their phosphorylation. Furthermore, the decrease of migratory potential and invasive activities, which was caused by the ERK 1 knockdown in U2OS cells, was enhanced by tomatidine. These results implied that tomatidine's inhibition of invasion and migration in human osteosarcoma U2OS and HOS cells resulted from the attenuation of PS-1 and the c-Raf-MEK-ERK pathway, rather than JNK, p38, and PI3K-Akt signaling. PS homologs PS-1 and PS-2 participate in several signaling pathways that regulate cell survival and tumorigenesis. PS-1 mutant overexpression has been reported to induce cell apoptosis, while the loss of PS-1 and mutant PS-1 mice have higher skin and carcinogen-induced brain tumorigenesis, respectively. PS-1 promotes tumor invasion and metastasis of gastric cancer both in vitro and in vivo, in addition to the positive correlation with lymph node metastasis and the poor overall survival rate. Conversely, the -secretase inhibitor DAPT inhibits gastric cancer cell growth and EMT and the results of the treatment are consistent with the outcomes of treatment with PS-1 silencing. The therapeutic effect of -secretase inhibition was also observed in lung cancer by the derepression of DUSP1 and inhibition of ERK. In the present study, we found that tomatidine represses PS-1 to inhibit the biological behaviors of migration and invasion in U2OS and HOS cells, which indicates that PS-1 might represent a novel prognostic biomarker and a potential therapeutic target for anti-metastasis treatment of osteosarcoma. Moreover, notch signaling regulates osteosarcoma proliferation and migration through ERK phosphorylation, so PS might be the upstream signaling of the ERK pathway and the inhibition of PS can lead to ERK activation. However, in the study, the silencing of ERK 1 seemed not to affect PS-1 expression, which suggests that the c-Raf-MEK-ERK pathway might be not the upstream signaling of PS-1. While the c-Raf-MEK-ERK pathway and PS-1 pathway both simultaneously contribute to invasion and migration of U2OS and HOS cells, they might be independently or the c-Raf-MEK-ERK pathway might be the downstream signaling of PS-1. Hence, further tests are required to make it explicitly clear. Anyway, PS-1 and the c-Raf-MEK-ERK pathways both actually affect the invasion and migration of U2OS and HOS cells. The diverse MAPK members and PI3K/Akt are activated in response to various extracellular stimuli and have distinct downstream targets, including cell motility, migration, invasion, proteinase-induction, and angiogenesis, which all contribute to metastasis. Besides, ERK 1/2 and JNK are thought to play a central role in regulating the expression of MMPs to implicate cell migration and proteinase-induction. Tomatine, which is a secondary metabolite from tomato, suppresses MMP-2 and MMP-9 activities and cell proliferation in breast cancer MCF-7 cell line and structure-activity relationships of -, 1 -, -, and -tomatine and tomatidine against various cancer cells have been studied. Alpha-tomatine inactivates PI3K/Akt and ERK signaling pathways and nuclear factor (NF)-B and AP-1 binding activities to inhibit the invasion and migration of human lung adenocarcinoma A549 cells by reducing u-PA MMP-2 and MMP-9. However, the invasion and migration of human non-small cell lung cancer NCI-H460 cells are suppressed by -tomatine through inactivating the focal adhesion kinase/PI3K/Akt signaling pathway, which reduces the binding activity of nuclear factor (NF)-B and downregulates the MMP-7 expression. Of particular interest is that tomatidine inhibits iNOS and cyclooxygenase-2 expressions to display the anti-inflammatory effect through the suppression of NF-B and JNK pathways in LPS-stimulated mouse macrophages. In addition to anti-inflammatory, anti-tumorigenic, and lipid-lowering activities, tomatidine has been suggested to serve as a chemosensitizer in combination chemotherapy, which uses chemotherapeutic drugs for the treatment of multidrug-resistant cancers. Moreover, tomatidine inhibits the invasion of human lung adenocarcinoma A549 cells through the suppression of ERK and Akt pathways and MMP-2 and 9 expressions. However, in the study, tomatidine's inhibitory properties of migration and invasion in U2OS and HOS cells are induced by the suppression of the c-Raf-MEK-ERK 1/2 pathway and the repression of PS-1 secretion, but that has no effect on MMP-2 and 9. These findings reveal a unique concept of pathway and direction for tomatidine in anti-metastatic therapy of osteosarcoma. In future, the determination of therapeutic potential and pharmacodynamics properties of tomatidine on osteosarcoma metastasis in vivo is imperative. Cell culture and Tomatidine Treatment Being obtained from the Food Industry Research and Development Institute (Hsinchu, Taiwan), the human osteosarcoma U2OS (15-yr-old female) cells and HOS (13-yr-old female) cells were supplemented with 10% FBS and 1% penicillin/streptomycin and then cultured in DMEM and Eagle's MEM, respectively. The cell cultures were maintained at 37 C in a humidified atmosphere of a 5% CO2 incubator. Tomatidine was purchased from Sigma-Aldrich (St. Louis, MO, USA). Cell Migration and Invasion Assays After treatment with the indicated concentrations of tomatidine (0, 25, 50, 75, and 100 M), the cells were seeded into the upper section of the Boyden chamber (Neuro Probe, Cabin John, MD, USA) without or with Matrigel at densities of 2.0 10 5 /mL for the U2OS cells and HOS cells, and then incubated at 37 C for 24 h, respectively. Finally, the migratory cells in the Boyden chamber migration assay and invasive cells in the modified Boyden chamber invasion assay were counted under a light microscope, as described previously. Protease Array Analysis A protease array (35 proteases) analysis was used to evaluate the protein lysates from vehicle-or 100 M tomatidine-treated cells, according to the manufacturer's protocols (Human Protease Array Kit, Catalog Number ARY021B, R&D Systems, Minneapolis, MN). As described previously, blots were then incubated with a horseradish peroxidase goat anti-rabbit or anti-mouse IgG for 1 h and the intensity of each band was measured by densitometry. Small Interfering RNA For silencing PS-1 protein expression, a unique siRNA inhibiting human PS-1 (s111) and negative-control siRNA were purchased from Applied Biosystems Instruments (Foster City, CA, USA). For silencing the ERK1 protein expression, a unique siRNA inhibiting human ERK1 (SC-29307) and negative-control siRNA (SC-37007) were purchased from Santa Cruz Biotechnology (Santa Cruz, CA, USA). 5 10 5 U2OS cells and HOS cells were grown in 6 cm cell culture dishes overnight. A total of 150 pmol of PS-1 siRNA was transfected into the cells while using lipofectamine RNAiMAX transfection reagent, according to the manufacturer's instructions (Invitrogen, Carlsbad, CA, USA). The silencer negative control siRNA, a nonsense siRNA duplex, was used as a control. Statistical Analysis For all of the measurements, analysis of variance was followed by one-way analysis of variance (ANOVA) with post hoc Turkey's HSD tests for more than two groups with equal sample sizes per group. When two groups were compared, the data were analyzed whileusing Student's t-test. Each experiment was performed in triplicate and three independent experiments were performed. p values < 0.05 was considered to be statistically significant. Conclusions In conclusion, U2OS and HOS cells-derived PS-1 and the c-Raf-MEK-ERK signaling pathway, not JNK, p38 and PI3K/Akt signaling, may both contribute to cellular invasion and migration. This phenomenon of PS-1 s repression of invasion and migration in U2OS and HOS cells could be activated by tomatidine. Certainly, our work reinforces the idea that tomatidine possesses the suggestive behaviors of anti-metastatic properties in human osteosarcoma cells, which contributes to a better understanding of the mechanism that is responsible for these effects.
Artificial Intelligence Improving the Life of Type 1 Diabetes The recent increased availability of insulin pumps and continuous glucose monitors(CGM) created a new focus in current research: the development of a close-loop system that would become the perfect artificial pancreas. So far, there are some community projects that try to achieve this goal. If our hypothesis is supported, then artificial intelligence could solve this problem once and for all. Artificial intelligence could help the patient maintain the blood glucose level as stable as possible, while requiring little to no interaction from the user. Such a closed-loop system may improve the quality of life for the patient and prevent the long-term side effects of diabetes.
Photosynthetic parameters of Juglans nigra trees are linked to cumulative water stress The influence of water deficits and drought on tree physiological processes, growth, and survival has been the focus of substantial research efforts and debate over the past decades, but there is still a need to quantitatively link finer scale mechanistic explanations of the influence of water status with the physiological responses of trees, particularly for those past the sapling stage. Hence, the objective of this study was to link accumulated water stress during the growing season to leaf physiological response mechanisms of Juglans nigra L. trees. Results showed that trees subjected to higher cumulative water stress had lower maximum light-saturated photosynthesis (Amax), initiated net photosynthesis at higher light levels (Ic), and displayed reduced effectiveness of CO2 fixation per photons absorbed (Qe) at the bottom and upper positions along the vertical canopy gradient. Results suggest that water stress integral (S), a variable that takes into account accumulated water deficits, would be useful to help future research efforts aimed at investigating responses to drought in trees past the sapling stage.
def disabling_button_1a(n_clicks): if n_clicks >= 1: return {'display':"none"}
def model_report(self, examples): examples = DataManager(examples, feature_names=self.feature_names) reports = [] if isinstance(self.examples, np.ndarray): raw_predictions = self.predict(examples) reports.append("Example: {} \n".format(examples[0])) reports.append("Outputs: {} \n".format(raw_predictions[0])) reports.append("Model type: {} \n".format(self.model_type)) reports.append("Output Var Type: {} \n".format(self.output_var_type)) reports.append("Output Shape: {} \n".format(self.output_shape)) reports.append("N Classes: {} \n".format(self.n_classes)) reports.append("Input Shape: {} \n".format(self.input_shape)) reports.append("Probability: {} \n".format(self.probability)) return reports
Mitt Romney was wrong when he said the 47 percent of Americans who pay no federal income taxes are “dependent on the government.” Most of them are working people who simply do not earn very much money. Romney also assumed that all of those in the 47 percent who pay no federal income tax vote Democratic. But polling data suggest that’s just not true. President Obama is faring better than Romney among the lowest earners — those most likely to be among the 47 percent who pay no federal income tax — but polls show Romney is supported by some 40 percent of those earning the lowest income. In fact, a healthy chunk of the 47 percent are seniors who tend to vote Republican. Romney’s comments, recorded surreptitiously during a Republican fundraiser in May and reported Sept. 17 by Mother Jones, have touched off a firestorm of analysis. Romney: There are 47 percent of the people who will vote for the president no matter what. All right, there are 47 percent who are with him, who are dependent upon government, who believe that they are victims, who believe the government has a responsibility to care for them, who believe that they are entitled to health care, to food, to housing, to you-name-it. That that’s an entitlement. And the government should give it to them. And they will vote for this president no matter what. And I mean, the president starts off with 48, 49, he starts off with a huge number. These are people who pay no income tax. Forty-seven percent of Americans pay no income tax. So our message of low taxes doesn’t connect. So he’ll be out there talking about tax cuts for the rich. I mean, that’s what they sell every four years. And so my job is not to worry about those people. I’ll never convince them they should take personal responsibility and care for their lives. What I have to do is convince the 5 to 10 percent in the center that are independents, that are thoughtful, that look at voting one way or the other depending upon in some cases emotion, whether they like the guy or not. Romney is a bit out of date with his claim that 47 percent of Americans pay no federal income tax. That was true in 2009, but the number is lower now, and falling as the economy improves and more people are working and getting paychecks. Figures come from the nonpartisan Tax Policy Center, and its most recent analysis in July 2011 put the figure for that year at 46.4 percent. That comes to about 76 million individuals or families who paid no federal income taxes in 2011. TPC projected that the percentage would fall to 46 percent this year, and to 44 percent in 2013, under current tax policies. Let’s take a closer look at the 46.4 percenters. According to the Tax Policy Center, about half of those who owe no federal income tax are people whose incomes are so low that when standard income tax provisions — personal exemptions for taxpayers and dependents and the standard deduction — are factored in, that simply leaves no income to be taxed. Those are people who earned less than about $27,000. But that doesn’t mean those folks paid no taxes at all. Many of them paid payroll taxes, those taxes taken out of a paycheck by an employer to fund programs such as Social Security and Medicare. They also pay federal excise taxes, such as those on gasoline, and they may also pay state and local income taxes or property taxes. 22 percent receive senior tax benefits — the extra standard deduction for seniors, the exclusion of a portion of Social Security benefits, and the credit for seniors. Most of them are older people on Social Security whose adjusted gross income is less than $25,000. 15.2 percent receive tax credits for children and the working poor. That includes the child tax credit and the earned income tax credit. The child tax credit was enacted under Democratic President Bill Clinton, but it doubled under Republican President George W. Bush. The earned income tax credit was enacted under Republican President Gerald Ford, and was expanded under presidents of both parties. Republican President Ronald Reagan once praised it as “one of the best antipoverty programs this country’s ever seen.” As a result of various tax expenditures, about two thirds of households with children making between $40,000 and $50,000 owed no federal income taxes. The rest ended up owing no federal income tax due to various tax expenditures such as education credits, itemized deductions or reduced rates on capital gains and dividends. Most of this group are in the middle to upper income brackets. In fact, the TPC estimates there are about7,000 families and individuals who earn $1 million a year or more and still pay no federal income tax. So when Romney says all of those in the 46 percent are “dependent on government,” that’s not accurate. Of the estimated 76 million who paid no federal income tax in 2011, 61 percent earned anywhere between $10,000 and $50,000. But it is true that 42 percent of the 76 million who owe no federal income tax had a “negative liability” in 2011, meaning that in addition to not owing any federal tax, they got a check from the federal government due to eligibility of some form of tax expenditure. But the majority did not. Are the 46.4 Percenters All Democrats? Romney also said the 46.4 percent who pay no federal income tax “will vote for the president no matter what,” and, therefore, President Obama starts off with an automatic 48 percent or 49 percent of the vote. But that doesn’t jibe with polling data. It’s safe to say that most of the 46.4 percent referred to by Romney are in the lower income brackets. According to the most recent Gallup polls of registered voters, 37 percent of those making less than $36,000 a year indicate they plan to vote for Romney. Moreover, as we noted earlier, a sizable chunk of 46.4 percenters are retirees, and among those 65 and older, Romney leads Obama by nine points, 52 percent to 43 percent. According to a Rasmussen Reports poll of likely voters between Sept. 10 and 16, 40 percent of those making less than $20,000 said they plan to vote for Romney; 50 percent of those making between $20,000 and $40,000 said they supported Romney. The Pew Research Center similarly found in its latest poll that 32 percent of those making less than $30,000 and 42 percent of those making between $30,000 and $50,000 support Romney — as do a plurality of seniors. A map put out by the Tax Foundation of the 10 states with the highest and lowest percentage of filers with no federal tax liability shows that the states with the highest percentage of non-filers are, by-and-large, states that typically vote Republican, while the 10 states with the lowest percentage of non-filers tend to be Democratic-leaning. That’s not a precise measure of the voting habits of those who don’t pay federal income taxes, but it suggests Romney is way off when he assumes all of the 46.4 percenters vote Democratic.
<reponame>javv3183/ED2<gh_stars>0 class Node(): def __init__(self, value): self.value=value self.left=None self.right=None def insert(self, value): if self.value: if value>self.value: if self.right==None: self.right=Node(value) else: self.right.insert(value) #Recursividad if value<self.value: if self.left==None: self.left=Node(value) else: self.left.insert(value)
interface ILoginRequest { username: string password: string } interface ILoginResponse { email: string first_name: string last_name: string date_joined: string admin: boolean permissions: string[] } interface IUser extends ILoginResponse { authenticated: boolean } interface IRegisterRequest { email: string first_name: string last_name: string password: string captcha: string } interface IRegisterData extends IRegisterRequest { confirmPassword: string } interface IProfileRequest { email: string first_name: string last_name: string old_password?: string password?: string } interface IProfileData extends IProfileRequest { confirmPassword: string changePassword: boolean } interface IResetPasswordStep1Request { captcha: string email: string } interface IResetPasswordStep2Request { token: string password: string } interface IResetPasswordStep2Data extends IResetPasswordStep2Request { confirmPassword: string } interface IPasswordValidation { password?: string confirmPassword?: string } interface IUserStore extends IChildStore<IRootStore> { loginForm: ILoginFormStore registerForm: IRegisterFormStore profileForm: IProfileFormStore resetPasswordStep1Form: IResetPasswordStep1Store resetPasswordStep2Form: IResetPasswordStep2Store user: IUser hasPermision(...perm: string[]): boolean login(data: ILoginRequest): Promise<void> register(data: IRegisterRequest): Promise<void> updateProfile(data: IProfileRequest): Promise<void> resetPasswordStep1(data: IResetPasswordStep1Request): Promise<void> resetPasswordStep2(data: IResetPasswordStep2Request): Promise<void> logout(): Promise<void> validatePassword(password: string): boolean } interface IRegisterFormStore extends IFormStore<IUserStore, IRegisterData> { captchaId?: number validation: IPasswordValidation validatePassword(): void } interface IProfileFormStore extends IFormStore<IUserStore, IProfileData> { validation: IPasswordValidation validatePassword(): void } interface IResetPasswordStep1Store extends IFormStore<IUserStore, IResetPasswordStep1Request> { captchaId?: number } interface IResetPasswordStep2Store extends IFormStore<IUserStore, IResetPasswordStep2Data> { validation: IPasswordValidation validatePassword(): void } type ILoginFormStore = IFormStore<IUserStore, ILoginRequest>
<gh_stars>1-10 #pragma once // --- SIPO PWM Module --- // // SIPO = shift register with paralel output. // // This module lets you use SIPO outputs as a "software PWM". // // Tested to work on 74hc4094 and 74hc595 #include <stdint.h> // Your file with configs #include "sipo_pwm_config.h" /* // --- PWM pin aliases --- // Store signal #define SPWM_STR D2 // Shift/clock signal #define SPWM_CLK D3 // Data signal #define SPWM_DATA D4 // --- Other settings --- // Number of PWM levels (color depth) #define SPWM_COLOR_DEPTH 256 // Number of SIPO channels #define SPWM_CHANNELS 24 // Invert outputs (for Common Anode LEDs) #define SPWM_INVERT 1 */ // Array for setting PWM levels (PWM_CHANNELS-long) extern uint8_t spwm_levels[SPWM_CHANNELS]; /** Configure output pins etc */ void spwm_init(); /** Perform one PWM cycle. * This should be called in a Timer ISR or a loop. */ void spwm_send();
def _load_fasta(self, source): seqs = [] seq = '' with open(source, 'r') as fr: for line in fr: if line[0] == '>': if seq != '': if self.include_stop: seq += '*' seqs.append(seq) seq = '' else: seq += line.strip('\n') if seq != '': if self.include_stop: seq += '*' seqs.append(seq) return seqs
This invention relates to a readout instrument for thermoluminescent dosimeters useful in the measurement of the dose of radiation such as gamma-ray. A radiation dosimeter element of the thermoluninescence type emits thermoluminescence when the dosimeter element is heated to 200.degree.-400.degree. C after the exposure of the dosimeter element to radiation or radioactive ray. As is known, the intensity of the emitted thermoluminescence is proportional to the exposure dose in the preceding irradiation. Various heating methods have been employed in conventional readout instruments for thermoluminescent dosimeter elements. These heating methods are divided roughly into two types. In one type of the methods, the dosimeter element is contacted with a heat source. However, this method is rather inconvenient in practical applications, and some dosimeter elements are shaped unsuitable to this heating method. In the other type of the methods, hot air is blown against the dosimeter element. When a multi-element dosimeter is subjected to readout by the employment of a heating method of the latter type, the dosimeter is intermittently moved relatively to a nozzle for the blast of hot air so that the individual elements of the dosimeter may be heated in sequence. However, the transfer of the dosimeter elements during readout results in the consumption of a large amount of time for the overall readout operation and tends to cause appreciable errors in the readout due to a variation in the positional relationship between the nozzle and the individual dosimeter elements. From a different point of view, there is a problem of optical noises at the readout of thermoluminescent dosimeter elements. In general, the intensity of thermoluminescence emitted from a conventional thermoluminescent dosimeter element is very feeble. It is difficult, therefore, to accomplish the readout with accuracy unless a readout instrument is designed to well suppress optical noises from various sources. Principal noise sources in the readout instrument are: (a) a dark current in the photoelectric transducer included in the instrument, (b) a leak of an external light into the instrument and (c) heat radiation from the heating section of the instrument, for example, from the walls of the heating chamber and/or certain components of the heating device such as the air nozzle and a heat exchanger. An optical noise caused by the source (a) depends primarily on the temperature of the photoelectric transducer. It is possible to suppress this noise to a satisfactorily low level by cooling the photoelectric transducer or, more conveniently, electrically compensating for this noise. A noise attributable to the source (b) can rather easily be precluded by making the readout instrument have either a fully closed construction with effective packings or a refracted construction relatively to the path of the emitted thermoluminescence. The heat radiation (c) as the noise source is the most hard-to-solve problem in the conventional readout instruments regardless of the type of the heating method. The heating chamber and the heating device of the readout instrument always include some metal members or the like. A heated metal member, for example, emits from its surface a light of a wide wavelength range from the near infrared region to the infrared region, depending on the surface temperature of the metal member. When such a heat radiation occurs in the readout instrument, the intensity of the heat radiation governs the background level to the thermoluminescence. Since the intensity of the described heat radiation is variable with a change in the temperature, the occurrence of the heat radiation inevitably results in an irregular fluctuation of the background level and obstructs the measurement of the feeble thermoluminescence.
Saudi Arabia wants a U.S. nuclear deal. But can they be trusted not to build a bomb? WASHINGTON — Before Saudi Arabia’s crown prince, Mohammed bin Salman, was implicated by the CIA in the killing of Jamal Khashoggi, U.S. intelligence agencies were trying to solve a separate mystery: Was the prince laying the groundwork for building an atomic bomb? The 33-year-old heir to the Saudi throne had been overseeing a negotiation with the Energy Department and the State Department to get the United States to sell designs for nuclear power plants to the kingdom. The deal was worth upward of $80 billion, depending on how many plants Saudi Arabia decided to build. But there is a hitch: Saudi Arabia insists on producing its own nuclear fuel, even though it could buy it more cheaply abroad, according to U.S. and Saudi officials familiar with the negotiations. That raised concerns in Washington that the Saudis could divert their fuel into a covert weapons project — exactly what the United States and its allies feared Iran was doing before it reached the 2015 nuclear accord, which President Donald Trump has since abandoned. Prince Mohammed set off alarms when he declared earlier this year, in the midst of the negotiation, that if Iran, Saudi Arabia’s fiercest rival, “developed a nuclear bomb, we will follow suit as soon as possible.” His negotiators stirred more worries by telling the Trump administration that Saudi Arabia would refuse to sign an agreement that would allow United Nations inspectors to look anywhere in the country for signs the Saudis might be working on a bomb, U.S. officials said. Asked in Congress last March about his secret negotiations with the Saudis, Energy Secretary Rick Perry dodged a question about whether the Trump administration would insist that the kingdom be banned from producing nuclear fuel. Eight months later, the administration will not say where the negotiations stand. Now lurking behind the transaction is the question of whether a Saudi government that assassinated Khashoggi and repeatedly changed its story about the killing can be trusted with nuclear fuel and technology. Such fuel can be used for benign or military purposes: If uranium is enriched to 4 percent purity, it can fuel a power plant; at 90 percent it can be used for a bomb. Privately, administration officials argue that if the United States does not sell the nuclear equipment to Saudi Arabia someone else will — maybe Russia, China or South Korea. They stress that assuring the Saudis use a reactor designed by Westinghouse, the only U.S. competitor for the deal, fits with Trump’s insistence that jobs, oil and the strategic relationship between Riyadh and Washington are all far more important than the death of a Saudi dissident who was living, and writing newspaper columns, in the United States. Under the rules that govern nuclear accords of this kind, Congress would have the opportunity to reject any agreement with Saudi Arabia, though the House and Senate would each need a veto-proof majority to stop Trump’s plans. “It is one thing to sell them planes, but another to sell them nukes, or the capacity to build them,” said Rep. Brad Sherman, D-Calif., a member of the House Foreign Affairs Committee. Following Khashoggi’s death, Sherman has led the charge to change the law and make it harder for the Trump administration to reach a nuclear agreement with Saudi Arabia. He described it as one of the most effective ways to punish Prince Mohammed. “A country that can’t be trusted with a bone saw shouldn’t be trusted with nuclear weapons,” Sherman said, referring to Khashoggi’s brutal killing in the Saudi Consulate in Istanbul last month. Nuclear experts said Prince Mohammed should have been disqualified from receiving nuclear help as soon as he raised the prospect of acquiring atomic weapons to counter Iran. “We have never before contemplated, let alone concluded, a nuclear cooperation agreement with a country that was threatening to leave the nonproliferation treaty, even provisionally,” said William Tobey, a senior official in the Energy Department during the Bush administration who has testified about the risks of the agreement with Saudi Arabia. He was referring to the crown prince’s threat to match any Iranian nuclear weapon — a step that would require the Saudis to either publicly abandon their commitments under the nonproliferation treaty or secretly race for the bomb. The Trump administration declined to provide an update on the negotiations, which were intense enough that Perry went to Riyadh in late 2017. Within the last several months, a senior State Department official engaged in further discussions over the deal in Europe. Saudi Arabia has long displayed interest in acquiring, or helping allies acquire, the building blocks of a program that could make nuclear weapons and protect the kingdom from potential threats from its neighbors — first Israel, then Iraq and Iran. The Saudi government provided the financing for Pakistan to secretly build its own nuclear arms, the first “Sunni bomb,” as the Pakistani creators of the program called it. That financial link has long left U.S. intelligence officials wondering if there was a quid pro quo: If Saudi Arabia ever needed its own small arsenal, Pakistan could provide it — perhaps by moving Pakistani troops to Saudi territory. The Saudis were also thinking of delivery systems. In 1988, the kingdom bought medium-range missiles from China that were designed to be fitted with nuclear, chemical or biological warheads, drawing protests from U.S. officials. Riyadh’s worries spiked in 2003 when it was revealed that Tehran had secretly built a vast underground plant for enriching uranium — a fuel for nuclear arms and reactors. That insistence is what set off the Iranian nuclear crisis. Over the years, several nations have demonstrated that it is possible to turn ostensibly civilian programs into sources of bomb fuel, and thus atomic warheads and military power. Israel recently released an archive of material, stolen from Tehran in January, to prove that the Iranian government deceived the world for years. The Saudis, meanwhile, had no equivalent facilities. They promised to get them. “Whatever the Iranians build, we will also build,” Prince Turki al-Faisal, a former Saudi intelligence chief, warned as the Obama administration sought to negotiate what became the 2015 nuclear agreement with Iran. The core challenge for the Trump administration is that it has declared that Iran can never be trusted with any weapons-making technology. Now, it must decide whether to draw the same line for the Saudis. The United States’ own actions may be helping to drive the Saudis’ nuclear thinking. Now that the Iran agreement, brokered with world powers, is on the edge of collapse after Trump withdrew the United States, analysts are worried that the Saudis may be positioning themselves to create their own nuclear program in response. The kingdom has extensive uranium deposits and five nuclear research centers. Analysts said Saudi Arabia’s atomic workforce was steadily growing in size and sophistication — even without producing nuclear fuel. Saudi leaders saw a political opening when Trump was elected. In its early days, the administration spent considerable time discussing ways Saudi Arabia and other Arab states could acquire nuclear reactors. Michael Flynn, who briefly served as Trump’s national security adviser, backed a plan that would have let Moscow and Washington cooperate on a deal to supply Riyadh with reactors — but not the ability to make its own atomic fuel. As a precondition, U.S. economic sanctions against Russia would have been dropped to allow Moscow to join the effort. Flynn was fired in early 2017 as questions swirled around his conversations with Russia’s ambassador to the United States, including about ending the trade restrictions. In late 2017, Perry, the energy secretary, picked up the nuclear cooperation issue. Excluding Russia, he began negotiating with Riyadh over the terms. Whether the Saudis would be banned from fuel production quickly became a flash point in Congress. At his Senate confirmation hearing in November 2017, Christopher A. Ford, the assistant secretary of state for international security and nonproliferation, called the safeguards a “desired outcome.” But he equivocated on whether the United States would insist on them. The Saudi delegation was led by the energy minister, Khalid al-Falih, who resisted the proposal. Nuclear experts said the kingdom wanted to build as many as 16 nuclear power plants over the next 20 to 25 years at a cost of more than $80 billion. Recently, it scaled back its initial plan to the construction of just two reactors. Westinghouse, based in Pennsylvania, would provide the technology, but probably under a license to South Korean manufacturers. The crown prince made headlines in March by shifting the public discussion over Riyadh’s intentions from reactors to atomic bombs. In a CBS News interview, he said that if Iran acquired nuclear arms, Saudi Arabia would quickly follow suit. A few days later, al-Falih, the energy minister, raised concerns about the outcome of negotiations with Washington by insisting publicly that Riyadh would make its own atomic fuel. He said in an interview with Reuters that he was hopeful for a deal. But al-Falih emphasized that the kingdom had its own uranium deposits and wanted to develop them rather than relying on an overseas supplier.
/** * @author Stefan Heinz */ public class BeatmapPropertiesActivity extends AppCompatActivity { private static final String LOG_TAG = "Beatmap Properties"; private static final int AUDIO_REQUEST_CODE = 1111; private Spinner characteristicSpinner; private RecyclerView difficultyList; private ImageButton songPlayButton; private SeekBar songProgressBar; private TextView songStatus; private final TimerTask songProgressSyncTask = new TimerTask() { @Override public void run() { if(songPlayer.isPlaying()) { songProgressBar.setProgress(songPlayer.getCurrentPosition()); final int seconds = songPlayer.getCurrentPosition() / 1000; final int minutes = seconds / 60; songStatus.setText(String.format(Locale.GERMAN, "%d:%d", minutes, seconds % 60)); } else stopSongProgressSync(); } }; private final Timer songProgressSyncTimer = new Timer(); private boolean songProgressSynced = false; private boolean songValid = false; private MediaPlayer songPlayer; private ArrayList<InfoDifficulty> currentDifficulties = new ArrayList<>(); private Info info; private String beatmapContainer; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getWindow().setEnterTransition(new Explode()); Intent intent = getIntent(); beatmapContainer = intent.getStringExtra(BEATMAP_CONTAINER); Log.i(LOG_TAG, "Beatmap container: " + beatmapContainer); // Set dark theme if(Preferences.isDarkTheme()) { setTheme(R.style.AppTheme_Dark); } setContentView(R.layout.activity_beatmap_properties); SwipeRefreshLayout propertiesRefresh = findViewById(R.id.propertiesRefresh); propertiesRefresh.setOnRefreshListener(() -> { refresh(); propertiesRefresh.setRefreshing(false); }); songPlayButton = findViewById(R.id.songPlayButton); songProgressBar = findViewById(R.id.songProgressBar); songStatus = findViewById(R.id.songStatus); refresh(); } private void refresh() { info = Beatmaps.readBeatmapInfo(beatmapContainer); if(info == null) { ErrorPrinter.msg(this, "Beatmap info in container '" + beatmapContainer + "' could not be found!"); } TextView songName = findViewById(R.id.songName); TextView songSubName = findViewById(R.id.songSubName); TextView songAuthor = findViewById(R.id.songAuthor); TextView levelAuthor = findViewById(R.id.levelAuthor); TextView bpm = findViewById(R.id.bpm); ImageView coverView = findViewById(R.id.cover); songName.setText(info.getSongName()); songSubName.setText(info.getSongSubName()); songAuthor.setText(info.getSongAuthorName()); levelAuthor.setText(info.getLevelAuthorName()); bpm.setText(String.valueOf(info.getBeatsPerMinute())); Bitmap bitmap = Beatmaps.getCoverBitmap(this, Beatmaps.getCover(beatmapContainer, info.getCoverImageFilename())); coverView.setImageBitmap(bitmap); difficultyList = findViewById(R.id.difficultyList); difficultyList.setAdapter(new DifficultyListAdapter(this, currentDifficulties, info, beatmapContainer)); difficultyList.setLayoutManager(new LinearLayoutManager(getApplicationContext())); difficultyList.setItemAnimator(new DefaultItemAnimator()); characteristicSpinner = findViewById(R.id.characteristicSelector); ArrayList<String> characteristics = new ArrayList<>(); for (Characteristics c : Characteristics.values()) { characteristics.add(c.getName()); } characteristicSpinner.setAdapter(new ArrayAdapter<>(this, R.layout.support_simple_spinner_dropdown_item, characteristics)); characteristicSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { String selected = characteristics.get(position); showDifficulties(selected); } @Override public void onNothingSelected(AdapterView<?> parent) {} }); loadSong(); } public void loadSong() { songPlayer = new MediaPlayer(); songPlayer.setOnErrorListener((mp, what, extra) -> { songValid = false; songStatus.setText(R.string.error_no_song); return true; }); songPlayer.setOnPreparedListener(mp -> songValid = true); try { Uri uri = Uri.fromFile(Beatmaps.getSong(beatmapContainer, info.getSongFilename())); Log.i(LOG_TAG, "Loading sound file " + uri.toString()); songPlayer.setDataSource(this, uri); AudioAttributes.Builder attributesBuilder = new AudioAttributes.Builder(); attributesBuilder.setContentType(AudioAttributes.CONTENT_TYPE_MUSIC); attributesBuilder.setUsage(AudioAttributes.USAGE_MEDIA); songPlayer.setAudioAttributes(attributesBuilder.build()); } catch (IOException ex) { songValid = false; } songProgressBar.setMax(songPlayer.getDuration()); songProgressBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() { @Override public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { songPlayer.seekTo(progress); } @Override public void onStartTrackingTouch(SeekBar seekBar) { } @Override public void onStopTrackingTouch(SeekBar seekBar) { } }); startSongProgressSync(); } private void startSongProgressSync() { if(!songProgressSynced && songValid) { songProgressSyncTimer.scheduleAtFixedRate(songProgressSyncTask, 0, 1000); songProgressSynced = true; } } private void stopSongProgressSync() { if(songProgressSynced && songValid) { songProgressSyncTask.cancel(); songProgressSynced = false; } } public void toggleSong(View view) { if(!songValid) return; if(songPlayer.isPlaying()) { songPlayer.start(); songPlayButton.setImageDrawable(getDrawable(R.drawable.ic_play_arrow_white_24dp)); } else { songPlayer.stop(); songPlayButton.setImageDrawable(getDrawable(R.drawable.ic_pause_white_24dp)); } } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_beatmap_properties, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); switch(id) { case R.id.editProperties: editProperties(); break; case R.id.refreshProperties: refresh(); break; } return super.onOptionsItemSelected(item); } private void showDifficulties(String characteristic) { for(InfoDifficultySet set : info.getDifficultyBeatmapSets()) { if(set.getBeatmapCharacteristicName().equals(characteristic)) { currentDifficulties.clear(); currentDifficulties.addAll(set.getDifficultyBeatmaps()); Log.i(LOG_TAG, "S: " + currentDifficulties.size()); difficultyList.getAdapter().notifyDataSetChanged(); return; } } currentDifficulties.clear(); Log.i(LOG_TAG, "S: " + 0); difficultyList.getAdapter().notifyDataSetChanged(); } public void addDifficulty(View v) { String characteristic = (String) characteristicSpinner.getSelectedItem(); AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle(R.string.new_difficulty_title); builder.setView(R.layout.dialog_new_difficulty); AlertDialog dialog = builder.show(); Spinner difficultyTypeSpinner = dialog.findViewById(R.id.new_difficulty_type); ArrayList<String> difficulties = new ArrayList<>(); for(Difficulties diff : Difficulties.values()) difficulties.add(diff.name()); difficultyTypeSpinner.setAdapter(new ArrayAdapter<>(this, R.layout.support_simple_spinner_dropdown_item, difficulties)); EditText njsEditText = dialog.findViewById(R.id.new_difficulty_njs); Button createBtn = dialog.findViewById(R.id.new_difficulty_create); createBtn.setOnClickListener(view -> { InfoDifficultySet currentDifficultySet = null; for(InfoDifficultySet existingSet : info.getDifficultyBeatmapSets()) { if(existingSet.getBeatmapCharacteristicName().equals(characteristic)) currentDifficultySet = existingSet; } if(currentDifficultySet == null) { currentDifficultySet = new InfoDifficultySet(characteristic); info.getDifficultyBeatmapSets().add(currentDifficultySet); } String diffName = (String) difficultyTypeSpinner.getSelectedItem(); InfoDifficulty difficulty = new InfoDifficulty(); difficulty.setBeatmapFilename(currentDifficultySet.getBeatmapCharacteristicName() + "_" + diffName + ".dat"); difficulty.setNoteJumpMovementSpeed(Float.parseFloat(njsEditText.getText().toString())); difficulty.setDifficulty(diffName); difficulty.setDifficultyRank(Difficulties.valueOf(diffName).getRank()); boolean beatmapAlreadyExists = false; // Only add new difficulty if it does not exist yet for(InfoDifficulty diff : currentDifficultySet.getDifficultyBeatmaps()) { if(diff.getDifficultyRank() == difficulty.getDifficultyRank()) { beatmapAlreadyExists = true; } } if(beatmapAlreadyExists) { Toast.makeText(this, R.string.difficulty_already_exists, Toast.LENGTH_SHORT).show(); } else { currentDifficultySet.getDifficultyBeatmaps().add(difficulty); Beatmaps.saveInfo(this, info, beatmapContainer); currentDifficulties.add(difficulty); refresh(); dialog.cancel(); } }); } public void browseSong(View view) { Intent browserIntent = new Intent(Intent.ACTION_GET_CONTENT); browserIntent.setType("audio/*"); startActivityForResult(browserIntent, AUDIO_REQUEST_CODE); } public void editProperties() { Toast.makeText(this, R.string.feature_missing, Toast.LENGTH_LONG).show(); } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if(requestCode == AUDIO_REQUEST_CODE && resultCode == RESULT_OK) { Uri uri = data.getData(); if(uri != null) { File file = new File(uri.toString()); Log.i(LOG_TAG, "Converting audio file '" + file.toString() + "' to ogg format"); Toast.makeText(this, R.string.feature_missing, Toast.LENGTH_LONG).show(); } else Toast.makeText(this, R.string.error_incorrect_file, Toast.LENGTH_LONG).show(); } super.onActivityResult(requestCode, resultCode, data); } @Override protected void onPause() { super.onPause(); stopSongProgressSync(); } @Override protected void onResume() { super.onResume(); startSongProgressSync(); } }
<filename>boost/test/results_collector.hpp // (C) Copyright <NAME> 2001-2012. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/test for the library home page. // // File : $RCSfile$ // // Version : $Revision$ // // Description : defines class unit_test_result that is responsible for // gathering test results and presenting this information to end-user // *************************************************************************** #ifndef BOOST_TEST_RESULTS_COLLECTOR_HPP_071894GER #define BOOST_TEST_RESULTS_COLLECTOR_HPP_071894GER // Boost.Test #include <boost/test/tree/observer.hpp> #include <boost/test/detail/global_typedef.hpp> #include <boost/test/detail/fwd_decl.hpp> #include <boost/test/utils/trivial_singleton.hpp> #include <boost/test/utils/class_properties.hpp> #include <boost/test/detail/suppress_warnings.hpp> //____________________________________________________________________________// namespace boost { namespace unit_test { // ************************************************************************** // // ************** first failed assertion debugger hook ************** // // ************************************************************************** // namespace { inline void first_failed_assertion() {} } // ************************************************************************** // // ************** test_results ************** // // ************************************************************************** // class BOOST_TEST_DECL test_results { public: test_results(); typedef BOOST_READONLY_PROPERTY( counter_t, (results_collector_t)(test_results)(results_collect_helper) ) counter_prop; typedef BOOST_READONLY_PROPERTY( bool, (results_collector_t)(test_results)(results_collect_helper) ) bool_prop; counter_prop p_assertions_passed; counter_prop p_assertions_failed; counter_prop p_warnings_failed; counter_prop p_expected_failures; counter_prop p_test_cases_passed; counter_prop p_test_cases_warned; counter_prop p_test_cases_failed; counter_prop p_test_cases_skipped; counter_prop p_test_cases_aborted; bool_prop p_aborted; bool_prop p_skipped; // "conclusion" methods bool passed() const; int result_code() const; // collection helper void operator+=( test_results const& ); void clear(); }; // ************************************************************************** // // ************** results_collector ************** // // ************************************************************************** // class BOOST_TEST_DECL results_collector_t : public test_observer, public singleton<results_collector_t> { public: // test_observer interface implementation virtual void test_start( counter_t test_cases_amount ); virtual void test_unit_start( test_unit const& ); virtual void test_unit_finish( test_unit const&, unsigned long ); virtual void test_unit_skipped( test_unit const& ); virtual void test_unit_aborted( test_unit const& ); virtual void assertion_result( unit_test::assertion_result ); virtual void exception_caught( execution_exception const& ); virtual int priority() { return 2; } // results access test_results const& results( test_unit_id ) const; private: BOOST_TEST_SINGLETON_CONS( results_collector_t ) }; BOOST_TEST_SINGLETON_INST( results_collector ) } // namespace unit_test } // namespace boost #include <boost/test/detail/enable_warnings.hpp> #endif // BOOST_TEST_RESULTS_COLLECTOR_HPP_071894GER
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // <queue> // template <class InputIterator> // priority_queue(InputIterator first, InputIterator last, // const Compare& comp, const container_type& c); #include <queue> #include <cassert> int main() { int a[] = {3, 5, 2, 0, 6, 8, 1}; const int n = sizeof(a)/sizeof(a[0]); std::vector<int> v(a, a+n/2); std::priority_queue<int> q(a+n/2, a+n, std::less<int>(), v); assert(q.size() == n); assert(q.top() == 8); }
As the clock clicks down towards an NHL lockout, we have seen a number of big money last minute NHL signings and contract extensions. NHL Owners have thrown around money like its going out of style, and with given the owner’s offers in these CBA negotiations perhaps they are. We’ve heard Gary Bettman say over and over again how the NHL owners need the players to take less money. He has repeatedly said that the league is paying out too much in salary, and that we are headed for this lockout because we need a reset. The financial instability of small market teams, and the overpayment of players has been his repeated talking points. Big money contracts are being handed out to players all over the league. Alex Semin got 7 million per season from the Carolina Hurricanes. John Carlson, Kari Lehtonen, Milan Lucic, and Alex Burrows all signed long term big money deals in just the last two days. Even depth players like Carlo Coliacovo, and Justin Abdelkader are getting paid. Heck, Greg Jamieson has still not officially bought the Phoenix Coyotes, they are owned by the league as of today, and yet yesterday we saw them hand a 4 year, $21.2 million contract to Shane Doan. Overall we’ve seen close to a billion dollars in salary commitments made to NHL players this summer. Bettman and the owners have also harped on long term contracts, and have stated that they would like a five year contract limit on future deals. Yet since July 1st eleven teams, or over one-third of the league, have signed 16 players to contracts or contract extensions of 6 or more years. And its not just big market clubs, we see small market owners like Craig Leipold in Minnesota (Zach Parise, Ryan Suter) giving out crazy contracts; we have seen the Nashville Predators match an offer sheet to Shea Weber, we have seen the Carolina Hurricanes give long term deals to Jeff Skinner and Jordan Staal. Even the owners who are known as “hawks” and are the most visible and most vocal in their desire to break the union and reduce player salaries have gotten involved. Traditional hardliners like Ed Snider of the Philadelphia Flyers (Wayne Simmonds, Scott Hartnell) and Jeremy Jacobs of the Boston Bruins (Tyler Seguin) have handed out multiple 6 year deals in recent weeks. Another target of NHL owners has been the three year Entry Level Contract system. And yet we’ve seen the great majority of first round draft picks from the 2012 draft sign their ELCs this summer. Teams easily could have had their prospects wait and sign ELCs under the new CBA and the new system, whatever that will be. This is one area where surely the owners will be able to restrict players rights, and ELCs will be more favorable to teams. Its always the way in labour negotiations, whether it be the last NHL lockout, the MLB negotiation, the NBA’s recent lockout and the NFL’s recent lockout, the rules for signing newly drafted players are almost always restricted. Its one rule change that can benefit owners and that doesn’t effect any voting members of the Players Association, and so it is easy for the players to give it up in order to get concessions from the owners in other areas. Yet despite the fact that we will surely see more favorable ELC rules in the new CBA, teams are signing their prospects now. I guess the question has to be asked, if this system is so bad for the owners. If this system is broken and contracts under it are causing the owners to lose so much money why are the same owners (including the small market owners, the hawks, and the league itself) so quick to keep signing up these players under this same CBA. Why not wait a few months for the new system? Is this a sign of owner dissension? Is it a sign of owner hypocrisy? Or is it just good business to get these contracts done now while they still can? Let us know your thoughts and follow me on Twitter @LastWordBKerr
def statistic_var_pd(df, data_key, var, var_ids_uq): vars = [np.var(df[df[var] == var_id][data_key]) for var_id in var_ids_uq] return np.mean(vars)
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim:set ts=2 sw=2 sts=2 tw=80 et cindent: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nsMediaSniffer_h #define nsMediaSniffer_h #include "nsIModule.h" #include "nsIFactory.h" #include "nsIComponentManager.h" #include "nsIComponentRegistrar.h" #include "nsIContentSniffer.h" #include "mozilla/Attributes.h" // ed905ba3-c656-480e-934e-6bc35bd36aff #define NS_MEDIA_SNIFFER_CID \ {0x3fdd6c28, 0x5b87, 0x4e3e, \ {0x8b, 0x57, 0x8e, 0x83, 0xc2, 0x3c, 0x1a, 0x6d}} #define NS_MEDIA_SNIFFER_CONTRACTID "@mozilla.org/media/sniffer;1" #define PATTERN_ENTRY(mask, pattern, contentType) \ {(const uint8_t*)mask, (const uint8_t*)pattern, sizeof(mask) - 1, contentType} struct nsMediaSnifferEntry { const uint8_t* mMask; const uint8_t* mPattern; const uint32_t mLength; const char* mContentType; }; class nsMediaSniffer final : public nsIContentSniffer { public: NS_DECL_ISUPPORTS NS_DECL_NSICONTENTSNIFFER private: ~nsMediaSniffer() {} static nsMediaSnifferEntry sSnifferEntries[]; }; #endif
Clinical pharmacy--a hospital perspective. All large acute hospitals have an on-site pharmacy department which has the key purpose of ensuring that patients can receive the right medicine at the right time by an efficient and economical system. Today most pharmacists would agree that they have a wider responsibility in ensuring that they apply pharmaceutical expertise to help maximise drug efficacy and minimise drug toxicity. This concern of pharmacists for the outcome of treatment in an individual patient, which has developed in the UK over the last thirty years, characterises the practice of clinical pharmacy and has led to the concept of pharmaceutical care as the description of the role of the pharmacist in patient care. Clinical pharmacy is not practised in a uniform manner in UK hospitals, a reflection of the diversity of pharmacy practice in general found amongst our hospitals. The input to patient care for example does vary, in some hospitals there are ward based pharmacists who practice as key members of the clinical team whilst in others a pharmacist may visit the wards on an irregular basis to review medicine charts and promote formulary policies. This lack of consistency applies not just to clinical pharmacy, but is true of pharmaceutical services such as intravenous additive services, discharge planning services and almost all aspects of pharmacy services. The absence of central direction by the profession and by the Department of Health has enabled this diversity to flourish. Each major hospitals service has developed in a way favoured by its pharmacy staff. Strong leaders have developed their own style of service varying from a supply orientated to a patient orientated service. They have frequently been more concerned with promotion of pharmacy within the hospital as opposed to disseminating information on service improvements to their colleagues. A result of this is that any benefits to patients from a new approach to service provision developed in one hospital, may not be realised by other pharmacy departments without a long lag time. Implementation of evidence based improvements in pharmacy practice could be accelerated if a more open approach to dissemination and promotion of developments was adopted by pharmacists.
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "WebBrowserPersistSerializeParent.h" #include "nsReadableUtils.h" #include "nsThreadUtils.h" namespace mozilla { WebBrowserPersistSerializeParent::WebBrowserPersistSerializeParent( nsIWebBrowserPersistDocument* aDocument, nsIOutputStream* aStream, nsIWebBrowserPersistWriteCompletion* aFinish) : mDocument(aDocument), mStream(aStream), mFinish(aFinish), mOutputError(NS_OK) { MOZ_ASSERT(aDocument); MOZ_ASSERT(aStream); MOZ_ASSERT(aFinish); } WebBrowserPersistSerializeParent::~WebBrowserPersistSerializeParent() = default; mozilla::ipc::IPCResult WebBrowserPersistSerializeParent::RecvWriteData( nsTArray<uint8_t>&& aData) { if (NS_FAILED(mOutputError)) { return IPC_OK(); } uint32_t written = 0; static_assert(sizeof(char) == sizeof(uint8_t), "char must be (at least?) 8 bits"); const char* data = reinterpret_cast<const char*>(aData.Elements()); // nsIOutputStream::Write is allowed to return short writes. while (written < aData.Length()) { uint32_t writeReturn; nsresult rv = mStream->Write(data + written, aData.Length() - written, &writeReturn); if (NS_FAILED(rv)) { mOutputError = rv; return IPC_OK(); } written += writeReturn; } return IPC_OK(); } mozilla::ipc::IPCResult WebBrowserPersistSerializeParent::Recv__delete__( const nsACString& aContentType, const nsresult& aStatus) { if (NS_SUCCEEDED(mOutputError)) { mOutputError = aStatus; } mFinish->OnFinish(mDocument, mStream, aContentType, mOutputError); mFinish = nullptr; return IPC_OK(); } void WebBrowserPersistSerializeParent::ActorDestroy(ActorDestroyReason aWhy) { if (mFinish) { MOZ_ASSERT(aWhy != Deletion); // See comment in WebBrowserPersistDocumentParent::ActorDestroy // (or bug 1202887) for why this is deferred. nsCOMPtr<nsIRunnable> errorLater = NewRunnableMethod<nsCOMPtr<nsIWebBrowserPersistDocument>, nsCOMPtr<nsIOutputStream>, nsCString, nsresult>( "nsIWebBrowserPersistWriteCompletion::OnFinish", mFinish, &nsIWebBrowserPersistWriteCompletion::OnFinish, mDocument, mStream, ""_ns, NS_ERROR_FAILURE); NS_DispatchToCurrentThread(errorLater); mFinish = nullptr; } } } // namespace mozilla
Dietary osteopontin-enriched algal protein as nutritional support in weaned pigs infected with F18-fimbriated enterotoxigenic Escherichia coli. This study investigated the effects of dietary osteopontin-enriched algal protein on growth, immune status, and fecal fermentation profiles of weaned pigs challenged with a live infection of F18-fimbriated enterotoxigenic E. coli (ETEC). At 21 d of age, 54 pigs (5.95 ± 0.28 kg BW; blocked by BW) were allotted to 1 of 3 experimental groups combining dietary and health statuses. A control diet, containing 1% wild-type algal protein, was fed to both sham-inoculated (NC) and ETEC-inoculated (PC) pigs, while the test diet contained 1% osteopontin-enriched algal protein as fed only to ETEC-inoculated pigs (OA). All pigs received their assigned dietary treatment starting at study initiation to permit a 10-d acclimation period prior to inoculation. Growth performance, fecal dry matter, as well as hematological, histopathological, immune, and microbiota outcomes were analyzed by ANOVA, where treatment and time were considered as fixed effects and pig as a random effect; significance was accepted at P < 0.05. Overall, ETEC-inoculated pigs (PC and OA) exhibited decreased (P < 0.05) ADG and G:F, as well as increased (P < 0.05) peripheral blood helper T-cells and total leukocyte counts, compared with NC pigs during the post-inoculation period. The OA treatment also elicited the highest (P < 0.05) concentrations of circulating TNF- and volatile fatty acid concentrations in luminal contents at various post-inoculation time-points, compared with other treatments. A principal coordinate analysis based on Unifrac weighted distances indicated that NC and OA groups had similar overall bacterial community structures, while PC pigs exhibited greater diversity, but infection status had no impact on alpha-diversity. Osteopontin-specific effects on microbial community structure included enrichment within Streptococcus and Blautia genera and decreased abundance of 12 other genera as compared with PC pigs. Overall, ETEC-infected pigs receiving 1% osteopontin-enriched algal protein exhibited changes immunity, inflammatory status, and colonic microbial community structure that may benefit weanling pigs experiencing F18 ETEC infection.
Three leading national cancer organizations have issued a consensus guideline for physicians treating women who have ductal carcinoma in situ (DCIS) treated with breast-conserving surgery with whole breast irradiation. The new guideline has the potential to save many women from unnecessary surgeries while reducing costs to the health care system. The Society of Surgical Oncology (SSO), the American Society for Radiation Oncology (ASTRO) and the American Society of Clinical Oncology (ASCO) together published the new guideline in their respective journals, the Annals of Surgical Oncology, Practical Radiation Oncology and the Journal of Clinical Oncology. The groups concluded, "The use of a two millimeter margin as the standard for an adequate margin in DCIS treated with whole breast radiation therapy (WBRT) is associated with low rates of recurrence of cancer in the breast and has the potential to decrease re-excision rates, improve cosmetic outcome, and decrease health care costs. Clinical judgment should be used in determining the need for further surgery in patients with negative margins less than two millimeters. Margins more widely clear than two millimeters do not further reduce the rates of recurrence of cancer in the breast and their routine use is not supported by evidence." Supported by a grant from Susan G. Komen, SSO spearheaded the guideline initiative and established a panel of experts from the three organizations, including clinicians, researchers and a patient advocate to create the new guideline to provide clarity regarding the optimal negative margin width for ductal carcinoma in situ. To determine the margin width, a pathologist paints the outer surface of the tissue that's been removed with ink. A clear, negative, or clean margin means there are no cancer cells at the outer inked edge of tissue that was removed, while a positive margin means that cancer cells extend to the inked tissue. A 2010 survey found that 42 percent of surgeons recommended a two millimeter margin, while 48 percent favored larger margins. To date, approximately one in three women who are treated surgically for DCIS undergo a re-excision, due in part to the lack of consensus on what constitutes an adequate negative margin. Re-excisions have the potential for added discomfort, surgical complications, compromise in cosmetic outcome, additional stress for patients and families, and increased health care costs. They have also been associated with patients choosing to have double mastectomies. "An important finding from the review of the published literature performed to provide evidence for this guideline is that margin widths greater than two millimeters (approximately 1/8th of an inch) do not reduce the risk of cancer recurring in the breast in women with DCIS who are treated with lumpectomy and whole breast radiation therapy," said Monica Morrow, MD, past SSO President and panel co-chair, Memorial Sloan Kettering Cancer Center, Breast Service, Department of Surgery. The panel established by SSO, ASTRO and ASCO to develop the consensus guideline relied on a review examining the relationship between margin width and cancer recurrence in the breast that included 30 studies involving 7,883 patients, as well as other studies relevant to this topic. "With this guideline, it is our two-pronged goal to help physicians improve the quality of care they provide to women undergoing surgery for DCIS and ultimately improve outcomes for those patients. We hope the guideline also translates into peace of mind for women who will know that future surgeries may not be needed," said Mariana Chavez-MacGregor, MD, University of Texas MD Anderson Cancer Center and panel member representing ASCO. Dr. Morrow advised that if a woman with a negative margin is told to have a re-excision, she needs to ask what factors are prompting the surgeon to recommend that re-excision. Bruce G. Haffty, MD, immediate past chair of ASTRO's Board of Directors, said this new guideline builds on previously published standards and will benefit clinicians who have struggled with margin width in women with DCIS. "This important cooperative guideline generated by these societies involved a multidisciplinary panel of surgical, medical and radiation oncologists, as well as pathologists and statistical experts. While the guideline appropriately allows for some flexibility and clinical judgment in interpretation, the conclusion that a two millimeter margin width is adequate in patients with DCIS will be helpful and reassuring to clinicians and patients in clinical decision-making." "This guideline is another important step in our collective work to ensure that women are receiving the best and most appropriate breast cancer care," said Susan G. Komen President and CEO Judy Salerno, MD, MS. "We were pleased to support the panel, both through funding and by lending the patient perspective to these discussions, and hope it empowers both patients and physicians to make well-informed treatment decisions that will reduce the likelihood for re-excisions." This study was conducted by the panel co-chaired by Dr. Morrow and ASTRO representative Meena S. Moran, MD, Department of Therapeutic Radiology, Yale School of Medicine, Yale University. This guideline has also been endorsed by the American Society of Breast Surgeons. Article: Society of Surgical Oncology - American Society for Radiation Oncology-American Society of Clinical Oncology Consensus Guideline on Margins for Breast-Conserving Surgery with Whole-Breast Irradiation in Ductal Carcinoma In Situ, Monica Morrow, Kimberly J. Van Zee, Lawrence J. Solin, Nehmat Houssami, Mariana Chavez-MacGregor, Jay R. Harris, Janet Horton, Shelley Hwang, Peggy L. Johnson, M. Luke Marinovich, Stuart J. Schnitt, Irene Wapnir, Meena S. Moran, Annals of Surgical Oncology, doi:10.1245/s10434-016-5449-z, published online 15 August 2016. American Society for Radiation Oncology. "New DCIS consensus guideline could curb unnecessary breast surgery and reduce health system costs." Medical News Today. MediLexicon, Intl., 17 Aug. 2016. Web.
/* * The MIT License (MIT) * * Copyright (c) 2013 AlgorithmX2 * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * the Software, and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ package appeng.api.features; import net.minecraft.item.ItemStack; /** * Provider for special comparisons. when an item is encountered AE Will request * if the comparison function handles the item, by trying to request a * IItemComparison class. */ public interface IItemComparisonProvider { /** * should return a new IItemComparison, or return null if it doesn't handle * the supplied item. * * @param is item * * @return IItemComparison, or null */ IItemComparison getComparison( ItemStack is ); /** * Simple test for support ( AE generally skips this and calls the above function. ) * * @param stack item * * @return true, if getComparison will return a valid IItemComparison Object */ boolean canHandle( ItemStack stack ); }
Analysis of the GNAS1 gene in Albright's hereditary osteodystrophy. Albright's hereditary osteodystrophy (AHO) is characterized by phenotypic signs that typically include brachydactyly and sc calcifications occurring with or without hormone resistance toward PTH or other hormones such as thyroid hormone or gonadotropins. Different inactivating mutations of the gene GNAS1 encoding Gsalpha lead to a reduced Gsalpha protein activity in patients with AHO and pseudohypoparathyroidism type Ia or without resistance to PTH (pseudopseudohypoparathyroidism). We investigated 29 unrelated patients with AHO and pseudohypoparathyroidism type Ia or pseudopseudohypoparathyroidism and their affected family members performing functional and molecular genetic analysis of Gsalpha. In vitro determination of Gsalpha protein activity in erythrocyte membranes was followed by the investigation of the whole coding region of the GNAS1 gene using PCR, nonisotopic single strand conformation analysis, and direct sequencing of the PCR products. All patients showed a reduced Gsalpha protein activity (mean 59% compared with healthy controls). In 21/29 (72%) patients, 15 different mutations in GNAS1 including 11 novel mutations were detected. In addition we add five unrelated patients with a previously described 4 bp deletion in exon 7 (Delta GACT, codon 189/190), confirming the presence of a hot spot for loss of function mutations in GNAS1. In eight patients, no molecular abnormality was found in the GNAS1 gene despite a functional defect of Gsalpha. We conclude that biochemical and molecular analysis of Gsalpha and its gene GNAS1 can be valuable tools to confirm the diagnosis of AHO. However, in some patients with reduced activity of Gsalpha, the molecular defect cannot be detected in the exons encoding the common form of Gsalpha.
Take a look at this beautiful cabin in Overgaard Springs Ranch which comes with 2 downstairs bdrms, bath, and a spacious loft that could be used as a 3rd bedroom/office/family room with bath.This cabin has warm wood accents, cathedral ceiling, and a stone faced gas fireplace in the living room. Loads of trees, peaceful ponds, and maintenance free living make this a special place. Enjoy the use of the beautiful Community Lodge for family & parties inc in the HOA. Mountain living at its best!
#[macro_use] extern crate lalrpop_util; #[macro_use] extern crate serde_derive; extern crate clap; extern crate serde; extern crate serde_json; #[macro_use] extern crate lazy_static; #[cfg(feature = "display")] extern crate kiss3d; #[cfg(feature = "display")] extern crate nalgebra; mod boolean; #[cfg(feature = "display")] mod display; mod format; mod ops; mod parser; mod runtime; mod solid; mod stdlib; use ops::*; use solid::*; use clap::{App, Arg, SubCommand}; use std::fs::File; use std::io; use std::io::BufRead; fn test_boolean() { let outside_box = Solid::make_box([2.0, 2.0, 2.0]); let test_plane = Plane { point: Point { pos: [0.0, 0.0, 0.0].into(), }, norm: Vector::from([1.0, 1.0, 1.0]).into(), }; println!("{:?}", slice(&outside_box, &test_plane)); let inside_box = Transform::rotate_x(1.0) * Solid::make_box([1.0, 5.0, 1.0]); let bool_result = boolean(&outside_box, &inside_box, Boolean::Difference); println!("{:?}", bool_result); #[cfg(feature = "display")] { display::display(bool_result); // let mut display = display::KissDisplay::new(); // display.set(bool_result); // display.join(); // let tris = triangulate_solid(bool_result.clone()); // display::quick_display(tris.iter().map(tri_to_face).collect()); // display::display(bool_result.clone()); // format::write_stl( // &mut File::create("output.stl").unwrap(), // bool_result, // "test output", // ) // .unwrap(); } } fn main() { // #[cfg(feature = "display")] // test_boolean(); let stdin = io::stdin(); let program_string = stdin .lock() .lines() .filter_map(|l| l.ok()) .collect::<Vec<_>>() .join("\n"); if let Some(ast) = parser::parse::parse_program(&program_string) { runtime::Runtime::new(program_string, None) .run(&ast) .unwrap(); } // println!("{:?}", Solid::make_box([2.0, 2.0, 2.0])); }
package main import ( "encoding/json" "log" "net" "time" "github.com/navaz-alani/concord/core" throttle "github.com/navaz-alani/concord/core/throttle" "github.com/navaz-alani/concord/packet" "github.com/navaz-alani/concord/server" ) func main() { // instantiate server addr := &net.UDPAddr{ IP: []byte{0, 0, 0, 0}, Port: 10000, } var rate throttle.Rate = throttle.Rate10k svr, err := server.NewUDPServer(addr, 4096, packet.NewJSONPktCreator(int(rate)/2), rate) if err != nil { log.Fatalln("Failed to initialize server") } var requestsServed int // configure target on server svr.PacketProcessor().AddCallback("app.echo", func(ctx *core.TargetCtx, pw packet.Writer) { log.Println("got packet") // decode packet data, which in this case is JSON. var pkt struct { Msg string `json:"msg"` } if err := json.Unmarshal(ctx.Pkt.Data(), &pkt); err != nil { // packet data is malformed - cannot process // modify server context to prevent further execution of callback queue ctx.Stat = -1 ctx.Msg = "malformed packet data" return } requestsServed++ log.Printf("Served %d", requestsServed) pw.Write([]byte("Received at " + time.Now().String())) pw.Close() }) // run server log.Println("Listening on port ", addr.Port) svr.Serve() }
. We present a 22-year-old male diagnosed with pro T-acute lymphoblastic leukemia (ALL). His laboratory test showed 181,900/microL of WBC complicated with lymphoadenopathy, pleural effusion, pericardial effusion and hepatosplenomegaly at the onset. Flow cytometry analysis of the leukemic cells showed cCD3+, CD7+, CD2+, CD1a-, CD3-, CD5-, CD4-, CD8-, CD34+, and HLA-DR+ as a pro T-cell phenotype. The patient was treated with induction therapy followed by 3 courses of consolidation therapy and achieved his first complete remission. He underwent up-front stem cell transplantation (SCT) from an HLA-full matched sibling, with early relapse just before transplantation. The conditioning regimen consisted of fludarabine (100 mg/m2) and melphalan (180 mg/m2). He relapsed with an extramedullary mass (gingival, testis, and femoral muscles) 1 year after transplantation. Since bone marrow involvement was not apparent, he received involved field radiation therapy (25.2 Gy/14 frequencies) in each mass. Six months after extramedullary relapse, bone marrow relapse occurred, and the patient died of sepsis due to Pseudomonas aeruginosa during re-induction therapies. Based on the immature T cell phenotype frequently with myeloid markers, a graft-versus- leukemic effect might be expected after allogeneic SCT for Pro T-ALL and a positive indication of SCT for this disease should be considered.
Incidental Prostatic Cancer: Repeat TURP or Biopsy? An incidental diagnosis of carcinoma is made in about 15% of patients undergoing transurethral or open surgery for prostatic adenoma. The importance of correct staging lies in the different clinical behaviors of the tumor according to the stage, which means that it will require different treatment. We present a review article on the diagnosis of residual neoplasia following transurethral resection of the prostate.
Topological superconductivity in semiconductor-superconductor-magnetic insulator heterostructures Hybrid superconductor-semiconductor heterostructures are promising platforms for realizing topological superconductors and exploring Majorana bound states physics. Motivated by recent experimental progress, we theoretically study how magnetic insulators offer an alternative to the use of external magnetic fields for reaching the topological regime. We consider different setups, where: the magnetic insulator induces an exchange field in the superconductor, which leads to a splitting in the semiconductor by proximity effect, and the magnetic insulator acts as a spin-filter tunnel barrier between the superconductor and the semiconductor. We show that the spin splitting in the superconductor alone cannot induce a topological transition in the semiconductor. To overcome this limitation, we propose to use a spin-filter barrier which enhances the magnetic exchange and provides a mechanism for a topological phase transition. Moreover, the spin-dependent tunneling introduces a strong dependence on the band alignment, which can be crucial in quantum-confined systems. This mechanism opens up a route towards networks of topological wires with less constraints on device geometry as compared to previous devices which require external magnetic fields. I. INTRODUCTION Topological superconductivity has been predicted to appear in one-dimensional spin-orbit coupled semiconductors proximitized by an s-wave superconductor. In these systems, an external magnetic field causes the gap to close. In the presence of strong spin-orbit interaction, the gap reopens, leading to a topological phase. The quantum phase transition can bring the system into the topological regime when where V Z is the Zeeman energy, the semiconductor chemical potential, and ∆ the superconducting gap. In the topological phase, the system behaves as a spinless p-wave superconductor and Majorana bound states appear at the edges of the system. These states have been proposed to be used for topological quantum computation. Following this idea, different hybrid semiconductor-superconductor (Sm-Sc) platforms have been proposed to exhibit topological superconductivity, such as proximitized nanowires, selective-areagrown (SAG) wires and two-dimensional electron gas (2DEG) systems. One limitation of these platforms is the requirement of external magnetic fields to induce the topological phase transition. External magnetic fields have several drawbacks as they are detrimental to superconductivity and the topological phase is very sensitive to the relative orientation between the magnetic and the spin-orbit fields. This problem becomes even more evident when considering more complicated geometries where all nanowires cannot be aligned in the same direction, like the ones proposed to demonstrate Majorana non-abelian statistics in real space. Magnetic materials are alternatives to the use of external magnetic fields. This idea was discussed by some early works in the field, where magnetic insulators (MI) were used to induce a spin splitting by means of stray fields. In addition, clean interfaces with a MI lead also to exchange fields in the proximitized materials, which provide a more effective way to control the local spin splitting. Developments in the fabrication technology have enabled the integration of thin layers of the MI EuS in the hybrid Sm-Sc InAs-Al nanowires with excellent interface quality. This material has also been tested in combination with Au showing signatures consistent with the presence of Majorana bound states. In experiments with ferromagnetic hybrid nanowires, spectroscopic measurements have shown the onset of a zero-bias conductance peak which has been interpreted as a signature of localized Majorana bound states at their ends. This signature has been detected only when the Al and the EuS layers overlap, Fig. 1 (a). Samples with non-overlapping facets, like Fig. 1 (b), have shown no signatures of topological phases. This behavior is in contrast with expectations that the main effect of MIs is to induce an exchange field in the Sm. In these devices, however, the induced exchange field in the Sm is weak and short-range. For this reason, the topological transition requires tuning of the electrostatic gates, as pointed out by recent theory works. Another effect of the MI layer is to induce an exchange field in the Sc due to the proximity effect taking place at the Sc-MI interface. Many experimental works have verified a strong effect of MI on thin Sc layers in terms of an induced spin splitting of the Sc density of states. If a direct effect of the MI on the Sm is excluded, a proposed alternative hypothesis is that the induction of an exchange field in the Sm could be medi-ated by the spin-split Sc which induces superconductivity and exchange field at the same time. In this case the relevant exchange coupling would be directly between the MI and the Sc. FIG. 1. Sketch of the cross section of a Sm nanowire in proximity to a Sc and a MI. (a) shows a Sm nanowire with partially overlapping Sc and MI, where a zero bias peak has been recently reported. (b) Sm nanowire with no overlap between the Sc and MI layers, which did not show signatures of topological superconductivity. (c) Sm nanowire with completely overlapping Sc and a thin MI layer. Measures of devices of the kind shown in figure (c) have not been reported yet. In this article, we provide a theory for the combined superconductivity and magnetic proximity effect in Sc-MI-Sm and MI-Sc-Sm heterostructures, as illustrated in Fig. 2. We show that the combined magnetic and superconducting proximity effects of a spin-split Sc cannot induce, alone, topological phases in the Sm. To overcome this limitation, we propose a new heterostructure layout where a thin film of MI between the Sm and the Sc leads to a spin-dependent tunnel barrier, Fig. 1 (c). Our proposal exhibits a parameter region where topological superconductivity is present in the Sm for strong enough spin-dependent tunneling. II. MODEL A MI layer can induce several effects in the Sm-Sc device, depending on the heterostructure layout, as shown in Fig. 2. One of the effects of the MI layer is the induction of an exchange field in both the Sm and the Sc. This is due to the microscopic scattering interaction of the electrons with the localized magnetic moments in the MI. We can describe the effect of the interface by means of a Heisenberg-like term H int = − d 3 r JS MI S, which describes the coupling between the spin density of the metals S, with the localized spins in the insulator, S MI. The coupling strength J is related to the exchange integral between the localized orbitals and the free electron and could be in principle different for the conduction band electrons of the MI and the electrons in the proximitized material. These considerations apply to ferromagnetic materials as well as antiferromagnetic insulators. We consider the width of the Sc layer to be smaller than the superconducting coherence length, 0, which is FIG. 2. Sketch representing the proximity effects in the systems considered in this work. In the illustrations, V MI is the native exchange splitting in the magnetic insulator, ∆ and V Sc are the gap parameter and the MI-induced exchange filed in the Sc. Here,∆ and are the Sc-induced gap and exchange field in the Sm. The matrix T is the hopping matrix of the tunneling Hamiltonian which couple the two materials. In panel (a), the magnetic insulator is inducing an exchange field in the Sc. The spin-split Sc is coupled to the Sm by a spin symmetric tunneling Hamiltonian. In panel (b), a thin magnetic insulator layer is placed between the Sc and Sm. The MI induces an exchange field in the Sc, also providing a spin-dependent tunnel barrier between the Sc and the Sm. In both cases, we ignore the effect of the MI on the Sm as it only increases close to the interface to the MI. the characteristic decay length for the induced exchange field in a Sc-MI heterostructure. In the experiments, the SC and MI layers have a width of few nanometers while the typical size of a magnetic domain in the EuS is ∼ 10 0 for EuS-Al heterostructures. Since the dimensions of the systems under consideration are smaller than 0, we can disregard inhomogeneities and assume that the MI induces a homogeneous exchange field in the Sc, which couples with the spin degree of freedom of the electrons by the Zeeman term H Z = V Sc. In this work we disregard the induced exchange field in the Sm as experimental evidence suggests that it is small in devices. We note that recent theoretical works suggest that it can lead to topological superconductivity by careful control of the gate voltages. A directly MI-induced exchange field in the Sm would provide an enhancement of the Zeeman energy in the Sm, enlarging the topological region. We also neglect the magnetic orbital effects induced by the stray field of the MI as this effect is usually weaker than the exchange field. If the MI considered is a magnetic semiconductor like EuS, the conduction band is not accessible at low temperatures. The modest band gap can be used to fabricate spin filter tunnel barriers, using thin films, that allows spin-dependent tunneling through it when placed between two metallic regions. The proposed setup is illustrated in Fig. 2 (b). In the following, we compare the two different situations represented in Fig. 2. For the case shown in Fig. 2 (a), the MI only causes a spin splitting in the SC density of states. This situation is relevant for the geometry shown in Fig. 1 (a) where a thick MI layer is placed in between the two materials such that the tunneling is strongly suppressed. In Fig. 2 (b) we show a different situation where a thin layer of MI is placed in between the Sc and Sm working as a spin filter tunnel barrier, having a weak effect on the Sm density of states. This case applies to the device geometry shown in Fig. 1 (c) but could also be relevant in the case of Fig. 1 (a) if the MI layer is sufficiently thin and, therefore, all the interfaces contribute to the tunneling processes. To simplify the treatment, we consider a translationinvariant system along the longitudinal direction, z, consisting of a single-channel Sm coupled to a Sc. The complete Hamiltonian of the system reads The Sm is described by where we use the spinors c pz = (c pz↑, c pz↓ ) and c pz is the electron annihilation operator in the Sm, while x is the spin-orbit coupling strength. The bare Hamiltonian for the Sc is given by where a npz is the electron annihilation operator for the mode n in the Sc and npz = p 2 z 2mSc + n − Sc. We neglect possible superconductive interband coupling and we assume singlet pairing in the parent superconductor gap matrix ∆ npz = ∆ 0,npz 0. As anticipated, our Sc model features a homogeneous exchange field V Sc = V z e z induced by the nearby MI, which we consider to be aligned to the wire. An important quantity is the distribution of the transverse modes in the Sc, n, which strongly depends on the device geometry. It ranges from a value larger than the superconducting gap for very thin Scs, to zero in bulk materials. The Sc and Sm regions are coupled through a spindependent, momentum conserving, tunneling Hamiltonian where the hopping matrix T npz describes the electron tunneling processes taking place at the interfaces between the two materials. We can write T npz in the basis of Pauli matrices T npz = t 0,npz 0 + i t i,npz i. In the following, we set t x,npz = t y,npz = 0 as they are negligible for an uniformly polarized MI layer. Moreover, we consider only the case of real and positive t 0,npz and t z,npz. This is justified as we are assuming that spin-orbit coupling is absent in the Sc. An extended derivation with all the terms can be found in the Appendix A 3. The bare Sc retarded Green function in the basis of time-reversed pairs reads: where the i are the Pauli matrices in the particle-hole space. In this work we ignore any back action of the Sm on the Sc as the electron density in the Sm is orders of magnitude smaller than the one in the Sc. The retarded Green function of the Sm reads npz describes the coupling to the Sc. This allow us to write a low-energy effective model for the Sm. Since we focus on the the quantum phase transition characterized by the gap closing, we will work with the effective Hamiltonian H eff = H Sm +H 0 where the induced Hamiltonian isH 0 = ( = 0). Indeed, we can split the effective Hamiltonian in three different contributions: with∆(p z ) =∆ 0 (p z ) 0 + i∆ i (p z ) i. These three terms describe the shift in the chemical potential, the induced exchange field and the induced superconducting gap matrix in the Sm. The explicit form of these contributions are: where we have divided the induced Zeeman term into two contribution z = z. The first one is proportional to the splitting in the parent Sc, while the second one is linked to the spin asymmetric tunneling amplitude of the barrier t z. If we include the energy dependence, a triplet component∆ z is also present, vanishing for = 0. Therefore, only the singlet pairing ∆ 0 is important to describe the topological transition. We will assume on that the parent Sc gap is homogeneous and equal for each transverse mode of the Sc, i.e. ∆ 0,npz = ∆ 0 from now. A. Semiconductor symmetrically coupled to a spin-split superconductor In this section, we show that the combined superconducting and exchange proximity effects induced by the coupling to a spin-split Sc cannot induce, alone, a topological transition in the Sm. We consider a system like the one sketched in Fig. 2 (a), where MI induces a spin splitting in the Sc. The Sc, in turn, induces superconductivity and an exchange field in the Sm. To check the presence of topological phases, we calculate the ratio between the induced exchange field, z, and the gap,∆ 0. Topological phases appear when the condition in Eq. is met, which leads to a closing of the superconducting gap at p z = 0. For this reason, we focus on this point in the following. A necessary condition to satisfy the inequality is having a gap polarization ratio |V Z /∆| > 1. Taking the ratio of Eqs. and for t z = 0, we see that so the induced gap polarization ratio in the Sm is the same as in the Sc. The gap polarization ratio V Sc /∆ 0 has to be less than unity in the parent gap, otherwise superconductivity is suppressed in the whole device. In the case of a large homogeneous Sc, this ratio is limited by the stricter Chandrasekar-Clogston bound, which dictates that a finite superconducting gap can be only maintained if V Sc /∆ 0 < 1/ √ 2. In thin Sc films, quantum confinement cause an increase of the superconducting gap leading to a superconductive phase that survives under stronger exchange fields. However, the Chandrasekar-Clogston limit still holds in terms of gap polarization ratio. Even before this limit, the gap parameter in a clean Sc subjected to strong exchange fields cease to be spatially homogeneous. Therefore, it is not possible to obtain topological phases by coupling a spin-split Sc to a Sm. This result is independent of the mode distribution in the Sc within the constant ∆ 0 and V z approximation. The same result is found for a continuous flat density of transverse modes in the Sc where ∆ 0 is taken finite and constant for a wide range of energies being zero otherwise, as shown in Appendix B. In this case, the Zeeman term can be weakly enhanced but this effect is totally negligible in realistic systems. This result can be generalized to the case where a multimode Sm is coupled to a multimode Sc as discussed in Appendix A 2. B. Spin-dependent tunneling We consider now the case of a spin-asymmetric tunneling between the Sc and the Sm, taken as momentum independent for simplicity and described by T = t 0 0 + t z z. As Eqs. show, the induced terms in the effective Hamiltonian are dependent on the distribution of the transverse modes in the Sc with respect to the chemical potential. In particular, they decay with the energy difference between the bottom of the Sc sub-band and the chemical potential. This means that modes close to the Fermi energy give the dominant contribution to the induced superconducting pairing and exchange fields at p z = 0. We first analyze the contribution of an isolated Sc mode to the effective Hamiltonian, as the ones from different modes just add up. The behavior of the induced term in the effective Hamiltonian is illustrated in Fig. 3. The two terms of the induced exchange field V z and V z sum constructively for Sc > n. Both z and∆ 0 decay for | n,0 | → ∞, leading to the existence of an optimal regime where both the induced exchange field and superconducting pairing are maximal and z /∆ 0 > 1. This is the ideal region for searching for topological superconductivity. z share the same dependence on the Sc band structure (they decay as ∼ −2 ) while having a different prefactor which depends on the tunneling matrix. Therefore, the spin splitting in the Sc leads to an enhancement of z and provides a first mechanism to induce topological superconductivity in the Sm. In contrast to z, the second contribution z to the induced exchange field in the semiconductor is totally independent of the spin polarization in the parent superconductor. This term depends solely on the spin-asymmetric component of the tunneling Hamiltonian. Moreover, z has an energy dependence ∼ −1, with a sign that depends on the relative position of the mode to the Sc Fermi energy. Since∆ 0 and dominates as the energy difference between the Sm and Sc modes increases. This contribution exhibits a sign change, which leads to a cancellation of z in the limit of small energy separation between modes. However, in thin Scs, the transverse modes can exhibit a large energy separation because of quantum confinement effects. This result suggests that two different mechanisms can drive the system to the topological phase. First, a spin-dependent tunneling enhances the induced gappolarization ratio of spin-split superconductor. Alternatively, a spin-dependent tunneling combined with the quantum-confinement in the Sc can lead to the appearance of the topological phase in regimes where, otherwise, the phase-diagram would be globally trivial. C. Combined proximity effect dominated by one transverse mode If the separation between transverse modes in the Sc is large enough, the contribution of the mode closest to the chemical potential dominates over the other ones. We can visualize this system like two coupled one dimensional wires, where one features both spin splitting and superconductivity while the other features only spin-orbit coupling. In the rest of this section, we set the energy of the bottom of the single Sc band to zero, 0 = 0, as it only causes a shift of the energy scale. In this way Sc = − 0,pz=0. The topological transition can occur when the induced exchange field is larger than the induced gap. In this specific case, both the spin splitting and the superconducting pairing are inherited by the parent Sc, while the effective chemical potential is the sum of the bare nanowire electrochemical potential and the renormalization term induced by the proximity effect. To identify the critical lines, we impose the condition 2 z = ( Sm +) 2 +∆ 2 0. To simplify the calculation, we take the limit ∆ 0 → 0 as the chemical potential of the Sc is usually much bigger than the gap parameter. In this way we find the analytical condition t z = +t 0 ± +V z Sm + Sm Sc, This result allows us to identify the regions in the parameter space where topological phases can exist. The same result can be obtained by calculating analytically the Pfaffian invariant of this system, as shown in Appendix C. An illustration of the phase diagram of this simple system is shown in Fig. 4, where topological superconductivity appears for a relatively wide range of parameters. Except for very low tunneling amplitudes, topological superconductivity is present in the region where t z /t 0 ∼ 1, which is the point corresponding to one spin tunneling component being completely suppressed (perfect spin filter). A strong polarization of the barrier, however, tends also to suppress the induced gap, closing it for t z /t 0 = 1. The topological region can be enlarged by controlling the chemical potential of the Sm and Sc. The size of the topological region depends on the product Sm Sc, as shown in Eqs.. The first conclusion is that the effect of the spin splitting of the Sc is negligible for realistic parameters, as it appears summed to the Sc Fermi energy which is many orders of magnitude bigger. Analyzing the behavior with respect to the tunneling parameters, it can be noticed that there exists a region corresponding to t 0 ∼ ± √ −V z Sm + Sm Sc, where a small polarization of the barrier can induce a topological phase with a relatively big gap. Since the chemical potential in the nanowire is tunable by means of electrostatic gates, it is in principle possible to set the operating point of the device near this optimal point. D. Superconductor with several relevant transverse modes In a more realistic scenario, the Sc features many transverse modes. In this case, Eqs. explains how the induced terms in the Sm effective Hamiltonian are determined by the sum of the contributions of each mode. The relative position of the transverse modes in the Sc strongly affects the gap polarization in the Sm, becoming a critical factor for the appearance of the topological phase. In the systems of interest, the dimensions of the Sc section vary from a few to hundreds of nanometers. For small length scales, the effect of quantum confinement separates the Sc subbands such that it is not possible to treat the density of state like a continuum. Both ∆ 0 and z have a Lorentzian shape with a full width at half maximum = ∆ 2 0 − V 2 z. We can use as a reference to distinguish between discrete modes,, and a continuum distribution of modes,, where is the average separation of modes. Indeed, if the average energy separation between the transverse modes is, the resonance peaks do not overlap entirely and the resonance peaks of V z do not completely cancel out. In this case, the net exchange field experienced in the Sm will be due by the sum of the contribution of each transverse mode. To provide a more clear picture, we consider the case where the band structure of the Sc can be described by perfectly equidistant transverse modes. In this case, is the relative separation between the Sc modes. This approximation recovers the continuum limit for a 2D sys-tem, where we expect a constant density of transverse modes g m = () −1. We also define Sc as the relative position of the Fermi energy in the Sc from the middle of the band. We proceed by summing over the modes contributions following Eqs. to derive the value of the induced terms in the effective Hamiltonian (calculation details can be found in Appendix D). The behavior of the induced terms for p z = 0 are illustrated in Fig. 5. By varying the chemical potential in the Sc, as the subbands cross the Fermi energy we see an alternation of trivial regions (gray background) and regions where topological superconductivity can appear by tuning Sm (white background). This behavior is more clearly illustrated by the topological invariant and the superconducting gap, shown in Fig. 6. In this figure, the gap is given by the smallest eigenvalue of the effective Hamiltonian. FIG. 6. Phase diagram for a single mode Sm coupled to a multimode Sc, showing the effective gap in the Sm |∆ eff | = minn,p z En,p z, where En,p z are the Hamiltonian eigenvalues and sign given by the topological invariant W Z 2. We observe an oscillation between the topological (red) and trivial (blue) phases as we vary the chemical potential measured from the middle of the band Sc. As the density of transverse modes gm increase, the peaks get closer and overlap until they merge in the continuous limit gm (∆0) −1. In the continuum limit the system is in a globally trivial or topologically phase, depending on the condition in Eq.. We assume that the chemical potential in the Sm is tuned such that Sm = −. The observation of an alternation of topological and trivial phases while varying Sc is consistent with Fig. 5. The limit g m 1/∆ 0 corresponds to a large Sc where the effect of quantum confinement becomes completely negligible. This behavior can be realized if the average separation of transverse mode is such that. In this limit, the contributions from each mode overlaps leading to a globally trivial or topological phase, depending on the polarization of the spin filter barrier t z /t 0. A quantitative criterion can be obtained by integrating Eqs. over a constant density of transverse modes as shown in Appendix B. In this limit, the term in Eq. vanishes and we get for the gap polarization We note that the spin-dependent tunneling leads to an enhancement of the induced exchange field, while reducing the induced superconducting gap. This effect can be used to bring the ratio above one, closing the gap at p z = 0 and inducing a quantum phase transition to the topological phase. Therefore, the spin-asymmetric tunneling, provides a way to overcome the limitation of Eq. and to induce a phase transition to the topological phase, Fig. 2 (b). The topological phase appears for a barrier polarization IV. DISCUSSION In this section, we discuss the applicability of the spin tunneling mechanism for generating topological superconductivity to the case of EuS-Al-InAs platforms. EuS is a magnetic semiconductor with an optical bandgap of E g = 1.65 eV which can be effectively tuned by quantum confinement and, therefore, it depends on the film thickness. The magnetic properties of this material are attributed to the Eu atoms which are characterized by strongly localized half-filled 4f shells. They behave as localized spins with a magnetic moment of around 7 B. For this reason, the EuS can be well described as a Heisenberg ferromagnet with a Curie temperature of T m = 16.6 K. The magnetization induce a splitting of the conduction band of around ∆E c = 0.36 eV. These properties are very promising in the view of fabricating spin-filter tunnel barriers. As discussed in the previous section, the behavior of the system is strongly dependent on the band structure of the Sc, which is controlled by the dimension of the Al region. If a wide Al shell is used, the transverse modes of the nanowire will be densely distributed in the energy spectrum. In this case, z vanish and topological superconductivity can be only induced using the spinasymmetric tunneling to enhance z and suppress∆ 0, as summarized in Eq.. To check if the ferromagnetic hybrid nanowire is in this regime, we can estimate the average mode separation by a simple particle in a box model 2 2m * Sc 2 L 2 Sc, where L Sc refers to the largest dimension of the cross section of the Sc shell. Assuming that ∼ 100 eV, which is in line with the experimental measurements of Al-EuS heterostructures, we estimate that, in order to observe well-separated modes, the maximum dimension of the shell should be in the order of 60 nm. In experiments, the facet length is around 60 nm. For this reason, we expect the contributions of the modes in the Sc to overlap significantly. Previous measurements performed on EuS-Al heterostructures have shown a polarization of around 50% of the gap. In this case, applying, we can estimate that a spin-dependent barrier with a 58% polarization is enough to bring the Sm to the topological regime. Estimating the optimal magnetic barrier length to achieve this polarization is a complicated task as strong spin-polarized band bending is expected at the interfaces. In general, as the barrier gets thicker we can expect a stronger polarization, but at the same time, the coupling between the two systems gets strongly suppressed. Therefore, the optimal barrier length would be determined by a trade off between a strongly polarizing thick barrier which however suffers low transparency, and a thin transparent barrier with low polarization. The introduction of MI in 2DEG is more challenging as the geometry and fabrication constraints make particularly complicated to introduce at the same time Sc-Sm, MI-Sm and MI-Sc interfaces. The use of MI as a spin filter tunnel barrier simplifies the design of topological quantum devices by eliminating the requirement of a Sc-Sm interface. Using this new operating principle, the geometry sketched in Fig. 2 (b) can provide a viable alternative to achieve zero-field topological superconductivity in 2DEG materials. Finally, we note that both nanowires Sc shell and Sc layers in 2DEG system are around 5 nm thick, so we can already expect measurable effect of quantum confinement in this direction. For this reason, we expect that the resonance effect discussed previously can be measured by scaling down the width of the devices. V. CONCLUSIONS In this work, we have demonstrated that a spin-split superconductor cannot induce, alone, topological superconductivity in a spin-orbit coupled semiconductor by the combined superconducting and magnetic proximity effect. This is in contradiction with the hypothesis that topological transitions in the semiconductor are caused by a superconductor-mediated exchange field in nanowire in experiments. We have shown how a spin-filter tunnel barrier, provided by a thin magnetic insulating layer between the semiconductor and the superconductor, can be used to overcome this limitation. The spin-dependent tunneling suppresses the induced superconducting gap while enhancing the spin splitting, thus providing a way to bring the system to the topological phase. In the case of a distribution of discrete modes in the superconductor, the phase diagram exhibits an alternation of trivial and topological regions as a function of the chemical potential of the superconductor due to a change on the sign in the contributions to the exchange field. The net induced exchange field strongly depends on the relative energy difference between the closest levels to the Fermi energy in the superconductor. While this mechanism is unlikely to explain the results in Ref. because of the relatively thick EuS layer used, the concept of spin-dependent coupling can be exploited in the next generation of topological superconducting devices without magnetic field. Spin filter tunnel barriers can be achieved by depositing a thin film of around a nanometer of a ferromagnetic insulator at the interface between the superconductor and the semiconductor. The proposed mechanism is compatible with the currently used hybrid superconductorsemiconductor platforms, including nanowires and 2DEG systems. VI. ACKNOWLEDGMENTS This research was supported by the Danish National Research Foundation, the Danish Council for Independent Research -Natural Sciences, and by the Microsoft Corporation. This project has received funding from the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation programme under grant agreement No. 856526. R.S.S. and M.L. acknowledge funding from QuantERA project "2D hybrid materials as a platform for topological quantum computing" and from NanoLund. Frequency dependence We now focus on the frequency dependence of the Sm Green function. For this reason, we consider a singleband Sm, dropping the index m. We simplify the hopping matrix by assuming that the tunneling matrix has the following form T n,pz = t 0 0 + t z z with t 0 and t z real and positive. We proceed by splitting the self energy like (, p z ) =(, p z ) +H(, p z ) where ∝ 0 0 while the frequency-dependent effective HamiltonianH(, p z ) contains all the other i j terms. We study a low-energy model for the semiconductor valid in the limit → 0. Since we have taken the tunneling amplitude energy-independent, we can directly Taylor expand the Sc Green function and consider the lowest orders in G R Sc (, n, p z ) = +
def process_parallel(jenkins_node): steps = jenkins_node.get_steps() if not steps: logging.error('No steps available') return parallel_duration_ms = 0 for step in steps: parallel_duration_ms += step.duration_ms step_metric_dimensions = dict(node_metric_dimensions) step_metric_dimensions['Stage'] = current_stage step_metric_dimensions['Step'] = jenkins_node.display_name aws_utils.publish_cloudwatch_metric( cloudwatch=cloudwatch, metric_name='Step Duration', unit='Seconds', value=int(parallel_duration_ms / 1000), unix_timestamp=unix_timestamp, metric_namespace=CLOUDWATCH_METRIC_NAMESPACE, dimensions=step_metric_dimensions) logging.info('== STEP %s ran for %s', jenkins_node.display_name, str(timedelta(milliseconds=parallel_duration_ms)))
COSMOS: A Middleware for Integrated Data Processing over Heterogeneous Sensor Networks With the increasing need for intelligent environment monitoring applications and the decreasing cost of manufacturing sensor devices, it is likely that a wide variety of sensor networks will be deployed in the near future. In this environment, the way to access heterogeneous sensor networks and the way to integrate various sensor data are very important. This paper proposes the common system for middleware of sensor networks (COSMOS), which provides integrated data processing over multiple heterogeneous sensor networks based on sensor network abstraction called the sensor network common interface. Specifically, this paper introduces the sensor network common interface which defines a standardized communication protocol and message formats used between the COSMOS and sensor networks.
T1 and T2 Mapping in Cardiology: Mapping the Obscure Object of Desire The increasing use of cardiovascular magnetic resonance (CMR) is based on its capability to perform biventricular function assessment and tissue characterization without radiation and with high reproducibility. The use of late gadolinium enhancement (LGE) gave the potential of non-invasive biopsy for fibrosis quantification. However, LGE is unable to detect diffuse myocardial disease. Native T1 mapping and extracellular volume fraction (ECV) provide knowledge about pathologies affecting both the myocardium and interstitium that is otherwise difficult to identify. Changes of myocardial native T1 reflect cardiac diseases (acute coronary syndromes, infarction, myocarditis, and diffuse fibrosis, all with high T1) and systemic diseases such as cardiac amyloid (high T1), Anderson-Fabry disease (low T1), and siderosis (low T1). The ECV, an index generated by native and post-contrast T1 mapping, measures the cellular and extracellular interstitial matrix (ECM) compartments. This myocyte-ECM dichotomy has important implications for identifying specific therapeutic targets of great value for heart failure treatment. On the other hand, T2 mapping is superior compared with myocardial T1 and ECM for assessing the activity of myocarditis in recent-onset heart failure. Although these indices can significantly affect the clinical decision making, multicentre studies and a community-wide approach (including MRI vendors, funding, software, contrast agent manufacturers, and clinicians) are still missing.
EphB3 marks delaminating endocrine progenitor cells in the developing pancreas Background: Understanding the process by which pancreatic betacells acquire their fate is critical to the development of in vitro directed differentiation protocols for cell replacement therapies for diabetics. To date, these efforts are hampered by a paucity of markers that distinguish pancreatic endocrine cells at different stages of differentiation. Results: Here, we identify EphB3 as a novel proendocrine marker and use its expression to track delaminating islet lineages. First, we provide a detailed developmental expression profile for EphB3 and other EphB family members in the embryonic pancreas. We demonstrate that EphB3 transiently marks endocrine cells as they delaminate from the pancreatic epithelium, prior to their differentiation. Using a Tetinducible EphB3rtTAlacZ reporter line, we show that shortterm pulselabeled EphB3+ cells coexpress Pdx1, Nkx6.1, Ngn3, and Synaptophysin, but not insulin, glucagon, or other endocrine hormones. Prolonged labeling tracks EphB3+ cells from their exit from the epithelium to their differentiation. Conclusions: These studies demonstrate that proendocrine cell differentiation during late gestation, from delamination to maturation, takes approximately 2 days. Together, these data introduce EphB3 as a new biomarker to identify betacells at a critical step during their stepwise differentiation and define the timeframe of endocrine differentiation. Developmental Dynamics 241:10081019, 2012. © 2012 Wiley Periodicals, Inc.
<reponame>WorldWideWebster/GameEngine<gh_stars>0 // // Created by Sean on 5/21/2019. // #include "Icosahedron.h" // Default Constructor Icosahedron::Icosahedron() : Primitive() { sectorCount = 10; // latitudinal sectors stackCount = 10; // vertical stacks radius = 1.0f; std::vector<Vertex> vertices = calcVertices(); unsigned nrOfVertices = vertices.size(); VertTanCalc(vertices.data(), nrOfVertices); // generate CCW index list of sphere triangles std::vector<GLuint> indices = calcIndices(); unsigned nrOfIndices = indices.size(); this->set(vertices.data(), nrOfVertices, indices.data(), nrOfIndices); } Icosahedron::Icosahedron(int secCount, int staCount, float rad) : Primitive() { sectorCount = secCount; // latitudinal sectors stackCount = staCount; // vertical stacks radius = rad; std::vector<Vertex> vertices = calcVertices(); unsigned nrOfVertices = vertices.size(); VertTanCalc(vertices.data(), nrOfVertices); // generate CCW index list of sphere triangles std::vector<GLuint> indices = calcIndices(); unsigned nrOfIndices = indices.size(); this->set(vertices.data(), nrOfVertices, indices.data(), nrOfIndices); } /////////////////////////////////////////////////////////////////////////////// // compute 12 vertices of icosahedron using spherical coordinates // The north pole is at (0, 0, r) and the south pole is at (0,0,-r). // 5 vertices are placed by rotating 72 deg at elevation 26.57 deg (=atan(1/2)) // 5 vertices are placed by rotating 72 deg at elevation -26.57 deg /////////////////////////////////////////////////////////////////////////////// std::vector<Vertex> Icosahedron::calcVertices() { // constants const float PI = 3.1415926f; const float H_ANGLE = PI / 180 * 72; // 72 degree = 360 / 5 const float V_ANGLE = atanf(1.0f / 2); // elevation = 26.565 degree std::vector<Vertex> vertices(12); // array of 12 vertices (x,y,z) int i1, i2; // indices float z, xy; // coords float hAngle1 = -PI / 2 - H_ANGLE / 2; // start from -126 deg at 1st row float hAngle2 = -PI / 2; // start from -90 deg at 2nd row // the first top vertex at (0, 0, r) vertices[0].position = glm::vec3(0, 0, radius); // compute 10 vertices at 1st and 2nd rows for(int i = 1; i <= 5; ++i) { i1 = i; // index for 1st row i2 = (i + 5); // index for 2nd row z = radius * sinf(V_ANGLE); // elevaton xy = radius * cosf(V_ANGLE); // length on XY plane Vertex vert1; vertex vert2; vert1.Position.x = xy * cosf(hAngle1); // x vert2.Position.x = xy * cosf(hAngle2); vert1.Position.y = xy * sinf(hAngle1); // y vert2.Position.y = xy * sinf(hAngle2); vert1.Position.z = z; // z vert2.Position.z = -z; vertices[i1] = vert1; vertices[i2] = vert2; // next horizontal angles hAngle1 += H_ANGLE; hAngle2 += H_ANGLE; } // the last bottom vertex at (0, 0, -r) i1 = 11; vertices[i1].Position = glm::vec3(0, 0, -radius); return vertices; } /////////////////////////////////////////////////////////////////////////////// // generate vertices with flat shading // each triangle is independent (no shared vertices) // NOTE: The texture coords are offset in order to align coords to image pixels // (S,0) 3S 5S 7S (9S,0) // /\ /\ /\ /\ /\ // // /__\/__\/__\/__\/__\(10S,T) // // (0,T)\ /\ /\ /\ /\ /\ // // \/__\/__\/__\/__\/__\(11S,2T) // // (S,2T)\ /\ /\ /\ /\ / // // \/ \/ \/ \/ \/ // // (2S,3T) 4S 6S 8S (10S,3T) // where S = 186/2048 = 0.0908203 // T = 322/1024 = 0.3144531, If texture size is 2048x1024, S=186, T=322 /////////////////////////////////////////////////////////////////////////////// void Icosahedron::buildVertices() { //const float S_STEP = 1 / 11.0f; // horizontal texture step //const float T_STEP = 1 / 3.0f; // vertical texture step const float S_STEP = 186 / 2048.0f; // horizontal texture step const float T_STEP = 322 / 1024.0f; // vertical texture step // compute 12 vertices of icosahedron std::vector<Vertex> tmpVertices = computeVertices(); // clear memory of prev arrays std::vector<float>().swap(vertices); std::vector<float>().swap(normals); std::vector<float>().swap(texCoords); std::vector<unsigned int>().swap(indices); std::vector<unsigned int>().swap(lineIndices); float *v0, *v1, *v2, *v3, *v4, *v11; // vertex positions float n[3]; // face normal float t0[2], t1[2], t2[2], t3[2], t4[2], t11[2]; // texCoords unsigned int index = 0; // compute and add 20 tiangles v0 = &tmpVertices[0]; // 1st vertex v11 = &tmpVertices[11 * 3]; // 12th vertex for(int i = 1; i <= 5; ++i) { // 4 vertices in the 2nd row v1 = &tmpVertices[i * 3]; if(i < 5) v2 = &tmpVertices[(i + 1) * 3]; else v2 = &tmpVertices[3]; v3 = &tmpVertices[(i + 5) * 3]; if((i + 5) < 10) v4 = &tmpVertices[(i + 6) * 3]; else v4 = &tmpVertices[6 * 3]; // texture coords t0[0] = (2 * i - 1) * S_STEP; t0[1] = 0; t1[0] = (2 * i - 2) * S_STEP; t1[1] = T_STEP; t2[0] = (2 * i - 0) * S_STEP; t2[1] = T_STEP; t3[0] = (2 * i - 1) * S_STEP; t3[1] = T_STEP * 2; t4[0] = (2 * i + 1) * S_STEP; t4[1] = T_STEP * 2; t11[0]= 2 * i * S_STEP; t11[1]= T_STEP * 3; // add a triangle in 1st row Icosahedron::computeFaceNormal(v0, v1, v2, n); addVertices(v0, v1, v2); addNormals(n, n, n); addTexCoords(t0, t1, t2); addIndices(index, index+1, index+2); // add 2 triangles in 2nd row Icosahedron::computeFaceNormal(v1, v3, v2, n); addVertices(v1, v3, v2); addNormals(n, n, n); addTexCoords(t1, t3, t2); addIndices(index+3, index+4, index+5); Icosahedron::computeFaceNormal(v2, v3, v4, n); addVertices(v2, v3, v4); addNormals(n, n, n); addTexCoords(t2, t3, t4); addIndices(index+6, index+7, index+8); // add a triangle in 3rd row Icosahedron::computeFaceNormal(v3, v11, v4, n); addVertices(v3, v11, v4); addNormals(n, n, n); addTexCoords(t3, t11, t4); addIndices(index+9, index+10, index+11); // add 6 edge lines per iteration addLineIndices(index); // next index index += 12; } // generate interleaved vertex array as well buildInterleavedVertices(); }
Highway patrol officers, emergency response teams, and other department of transportation workers and personnel are exposed to the possibilities of being struck by oncoming vehicles when stopped along the side of the highway. The life-threatening hazards involved with work near traffic may also involve a worker who has their back exposed to oncoming traffic and an inability to see a possible collision approaching while their back is turned. The resulting slower response time to avoid a vehicle approaching the worker is extremely hazardous. On a national scale, over one thousand fatalities were reported in each of the past thirteen years that were directly related to transportation work zone crashes. Although flashing lights may be used to warn on-coming motorists, fatalities and injuries remain significant hazards for police officers, emergency response personnel, and transportation workers such as construction workers. Many states have also enacted “move over” laws that require motorists to remain a safer distance from official vehicles; however, enforcement of these laws remains difficult due to a lack of additional personnel during traffic stops.
Why Predator is the Greatest Movie Ever Made Movies can basically be broken down into two categories: Every other film, and the 1987 masterpiece “Predator.” This film literally has it all. Believe it or not, there are actually naysayers out there who doubt the cinematic value of this film. I implore you to take a few moments to hear out my argument in defense of “Predator.” I truly believe that with an open mind and, more importantly, an open heart, you too will begin to cherish John McTiernan’s work of art in the way you rightfully should. Predator starts off the way all films should: with very little character background or development. Sure we could spend a large chunk of the film learning about each character’s history and what makes them who they are, but why waste all that time when it could all be summed up with this shot: Biceps! That’s what really matters. We never even learn the character’s last names for crying out loud because who cares? In most films, too much effort is wasted on plot or storylines. All we need to know is that a couple of ultra buff dudes are both wearing short sleeve polo shirts that are two sizes too small and also that there is no racial tension. They have basically solved every economic and social problem in one manly handshake. Speaking of characters, “Predator” has the strongest supporting cast ever assembled. Imagine if “Ocean’s 11” was just made up of a dozen Clooneys and Pitts. That’s what you get here. Let’s run down the lineup while “Long Tall Sally” by Little Richard plays in the background: This guy plays by his own rules. I don’t mean social or military rules, I mean the rules of nature. At one point he gets shot and is told he’s bleeding. How does he respond? With a request to go to the hospital? Was it asking for a bandage and a chopper to escort him out of the jungle? No. His response was “I ain’t got time to bleed.” Are you kidding me? This guy is above bleeding! To help illustrate how beyond amazing that is, here’s a list of people who aren’t above bleeding: Shaq John F Kennedy Any woman who has ever ovulated Shredder The characters on Oz Jack Bauer Ulysses S. Grant Hitler So essentially he is tougher than all of them combined. But I digress… We don’t learn much about Poncho, but we do know that he isn’t a fan of chewing tobacco so he probably has very healthy gums and teeth. Also, if he was chosen to join this group of elite mercenaries, then he’s got a background that would make Suge Knight piss in his pants. I mean, allegedly piss in his pants. Are you looking for a little comic relief? Oh man Hawkins has got you covered! This guy could be in the middle of a massive gun battle where people are being murdered all around him and yet he still finds time to make a joke about his girlfriend’s disgusting reproductive organs. Judging by those glasses that are the size of dart boards I would think he should be happy with anyone who would settle for him, but not Hawkins. He’s dropping comedy gold 24/7. Billy, who are you? He’s a man of mystery who has the ability to connect with nature in a way we wouldn’t see again until John Travolta starred in “Phenomenon”. Except Billy isn’t moving pens, he’s kicking butt. He also has a laugh that’s so infectious it inspires the Predator and fills the jungle with glee. Mac is so tough that he’s constantly shaving with a razor that I can only assume is not a Gillette Fusion Proglide. He also carries around a giant machine gun that could single-handedly destroy half of the jungle. He also may or may not be in love with Blain. It’s complicated. Chubbs Peterson is supposed to be a corporate suit sent along to supervise the mission, but look at that guy. He’s no corporate stooge, he’s a stone cold warrior that was promoted to a desk job. Don’t overlook Dillon, he can carry his own. He knows where he is, he’s in the jungle baby! Before the group even encounters the alien life form simply known as “The Predator” they embark on a mission to rescue some hostages from jungle terrorists and boy, do we get some fantastic moments. First of all, we learn that if you’re ever stuck in the jungle, just chop a tree branch in half and have a drink! Did they not bring supplies for this trip? Doesn’t matter when you have Billy around. He’ll make you pancakes using tree bark and prayer. That’s just what he does. After discovering some dead bodies, the gang continues marching through the jungle when we get our first glimpse of the type of futuristic technology is going to be used in this film. That’s right, it’s Predator-Vision: This advanced alien being doesn’t waste his time looking at your clothes or your beard, he’s just curious at how well your circulation is or if you get chilly in cool weather. Finally the group reaches the terrorists headquarters – which has shockingly been untouched by the Predator – where Arnold’s character Dutch witnesses one of the hostages being executed. Uh oh, now you’ve done it. We get to see each member of the group using their signature weapons and showing their skills, but all of those moments pale in comparison to Dutch’s masterful kill. After invading the central hub of the headquarters, Dutch takes out his machete and kills an enemy solider. Most men in that situation would simply be grateful to be alive. They may say something like “Wow, that was a close call, thank goodness for my extensive training and experience.” That’s not Dutch’s style. What does he say? STICK AROUND! Haha yes! Do you get it? He threw a knife at him and made him stick to the wall and then, in turn, told him to stick around which is a common slang used to ask someone to remain in one place. You can’t beat that wordplay! The camp gets cleared out and there’s some unimportant political arguing, but then we get to the real meat of the film: the battle with The Predator. The alien uses his skills to learn the voices of each of the mercenaries in order to defeat them, because, let’s be honest, just some random jabroni alien isn’t going to defeat this group without some sort of unfair advantage. It starts taking out the crew one by one. First he gets Hawkins by turning into one of those magic eye puzzles you used to do in sixth grade. Soon after he blows a hole in Jesse “The Body” Ventura using his Silver Surfer death ray. I assume this is a message from the writers to kids letting them know the dangers of chewing tobacco. Not only is this movie entertaining, there are also many life lessons to be learned. Hollywood should take note and emulate these messages. Notice how Poncho, who declined to use the tobacco, lived longer than Blain. Take that, corporate tobacco corporations! After a few other skirmishes Mac is killed trying to get vengeance for his best friend, and possible lover, Blain. Wow, just like Romeo and Juliet. What greater love is there than one who would lay down his life for a friend? Jesus said that. In a tearjerker moment, we see Dutch’s longtime friend Dillon lose his arm trying to redeem himself. Was this foreshadowing to Carl Weathers’ eventual character in “Happy Gilmore?” Who has time to think about something like that when we witness the cinematic power of watching a loved one pass away? Is there any emotional range this movie can’t hit? Rest in peace, good buddy. Maybe you’re saying to yourself “You know, all this sounds good, but I desire a little mystery.” My friend, your prayers have been answered. Everyone is running from the alien, trying to save themselves, but Billy has had enough. The remaining survivors run in fear as Billy faces his nemesis head on. He pulls out his machete and this happens: He slices his chest! Why did you do that, Billy? The next thing we hear is Billy screaming somewhere out in the jungle. What happened to you, Billy? Why aren’t there websites and forums dedicated to fan fiction of Billy’s fate? Is he still alive somewhere out there? It doesn’t matter because he will always be alive in our hearts. Our love will always keep him living on. Poncho gets killed next which would be sad, if it wasn’t followed by the greatest line of dialogue ever uttered on the silver screen. “GET TO THE CHOPPER!” That’s the stuff of legends. There are moments that are bigger than any individual person and this is one of them. For me, the greatest accomplishments by mankind rank as followed: The Discovery of America The Alleged Moon Landing Arnold yelling “Get to the chopper!” Chocolate Double Stuffed Oreos Invented The Discovery of Penicillin Dutch engages in a man vs wild war with the creature after discovering that mud hides him from the heat seeking vision of The Predator. Dutch pulls a Home Alone and sets up traps all over the jungle to foil the alien’s plan. Now this movie is teaching us how to handle a crisis! Is there anything it can’t do? Finally, the monster reveals his true self, which is completely terrifying. It seems that all is lost until Dutch uses one of his traps to fatally injure his nemesis. Seems like a normal ending, right? Wrong, idiot. This is the greatest comeback story ever told. This is “Rudy,” “Miracle,” and “Teen Wolf” all rolled into one inspirational clump. What can you do when faced with oppression and a seemingly undefeatable opponent? You reach down into the core of who you are, and you survive. When all seems lost and everyone else has abandoned you, there is something deep inside that beckons you to push on, to survive. This isn’t just a triumph for Dutch, this is a triumph for the human race. No matter what your alien nemesis is, Dutch proved that you can win. Martin Luther King Jr. would be proud of the progress we have made. God bless you, Predator. You make all of us want to be a better person and also not use recreational chewing tobaccos.
Work-related outcomes among female veterans and service members after treatment of posttraumatic stress disorder. OBJECTIVE This study examined the effect of treatment for posttraumatic stress disorder (PTSD) on work-related quality-of-life outcomes and the relationship between clinically significant change during treatment and work-related outcomes. Additional analyses explored whether current depression and employment status moderated the effects of treatment and clinically significant change. METHODS Participants were 218 female veterans and soldiers with current PTSD who participated in a randomized clinical trial of treatment for PTSD. They received ten weekly sessions of prolonged exposure or present-centered therapy and were assessed before and after treatment and at three- and six-month follow-ups. Outcomes were clinician-rated and self-rated occupational impairment and self-rated satisfaction with work. RESULTS Both treatment groups had improvements in occupational impairment, and the degree of improvement by the two groups was similar. There was no pre- to posttreatment change in work satisfaction. At the end of treatment, participants who no longer met diagnostic criteria for PTSD had greater improvements in all domains of work-related quality of life than participants who still had PTSD. CONCLUSIONS Although prolonged exposure resulted in better PTSD symptom outcomes than present-centered therapy in the randomized clinical trial, it did not result in better work-related quality-of-life outcomes. The improvement in occupational impairment associated with loss of diagnosis suggests the importance of continuing treatment until clinically meaningful change has been attained.
David Von Drehle, editor-at-large for Time magazine, summed up what he sees happening in this year’s elections in Kansas with a quote from former Democratic Gov. Kathleen Sebelius. “Democrats, we don’t win elections in Kansas,” Sebelius said. “Republicans lose elections.” Von Drehle was among a panel of national and regional journalists who spoke Wednesday night at the Dole Institute of Politics about the 2014 midterm elections and what it has been like covering them. That quote may have accurately reflected what is happening this year in Kansas, a traditional Republican stronghold where two of its leading Republicans — Sen. Pat Roberts and Gov. Sam Brownback — now find themselves in the re-election battle of their respective careers. Until recently, the national Republican Party had strong hopes of taking control of the U.S. Senate, where Democrats currently hold a 55-45 majority. But with Roberts now locked in a tight race against Independent candidate Greg Orman, some analysts are now giving them little better than a 50-50 chance of taking control. Much of Roberts’ problems this year can be traced to an article in February about the issue of Roberts’ residency in Dodge City. The headline read, “Lacking a House, a Senator Is Renewing His Ties in Kansas,” and the story described how Roberts had recently changed his address from a home that he rents out to tenants to the home of a political supporter in which he famously said, “I have full access to the recliner.” New York Times reporter Jonathan Martin said Roberts was trying to avoid the same problem that had unseated Indiana Sen. Richard Lugar two years earlier and the senator and his staff all thought they had found the answer. He said Roberts even boasted that his drivers license now showed the address of a home in Dodge City. But Martin said when he traveled to Dodge City and knocked on the door, no one answered. And when he asked neighbors whether they’d ever seen Roberts there, most of them said they never had. “So I went back to the office and wrote the story,” he said. It was a story that Roberts’ tea party challenger Milton Wolf used to great effect and one that might very well have doomed the senator’s chances, had it not been for other revelations about what Martin called Wolf’s “odd Facebook behavior.” Roberts, a political institution in Kansas for more than three decades, survived the primary despite getting less than 50 percent of the Republican vote and now finds himself in a highly competitive race against another political newcomer, Orman. Meanwhile, Gov. Sam Brownback, finds himself trailing in the polls in his bid for re-election against Democrat Paul Davis of Lawrence, the minority leader of the Kansas House. But Dave Helling, a political columnist for the Kansas City Star and a fall 2014 Dole Fellow, said Brownback’s problems are very different from those of Roberts. A senator is usually judged by ideology, Helling said, while a governor is an “executor whose job is to make the trains run on time.” “Your problem isn’t with what I write or what any other reporter writes,” Helling recalled telling Brownback in one conversation. “Your problem is that your credit rating has been downgraded three times.” Helling said he thinks both Roberts and Brownback are still “slight favorites” to win re-election. He said Orman faces an uphill battle because he has never held elected office before and he still has to introduce himself to voters. And Davis still has a challenge in connecting with people in western Kansas who may know little else about him, besides the fact that he’s from Lawrence. “You get out west of Salina and tell people you’re from Lawrence, and some of them start to worry about you,” Helling said. Dole Institute Director Bill Lacy, who hosted the panel discussion, noted that some analysts are predicting the 2014 midterms will be a “wave election” in which Republicans will win controlling majorities in both chambers of Congress. But others, he said, have predicted that Congress will be just as divided next year as it is this year, and he asked the panelists whether both could be write. Juana Summers, formerly a reporter for Politico who recently moved to NPR, said she believed both could be true, but that the next two years will be “tough years for (President Barack) Obama.”
<reponame>Shubhrmcf07/Competitive-Coding-and-Interview-Problems<filename>Hacker Blocks/Maximum Subarray Sum.cpp<gh_stars>10-100 /* Hacker Blocks */ /* Title - Maximum Subarray Sum */ // You are given a one dimensional array that may contain both positive and negative integers, find the sum of contiguous subarray of numbers which has the largest sum. For example, if the given array is {-2, -5, 6, -2, -3, 1, 5, -6}, then the maximum subarray sum is 7. // Input Format // The first line consists of number of test cases T. Each test case consists of two lines. // The first line of each testcase contains a single integer N denoting the number of elements for the array A. // The second line of each testcase contains N space separated integers denoting the elements of the array. // Constraints // 1 <= N <= 100000 // 1 <= t <= 20 // 
-100000000 <= A[i] <= 100000000 // Output Format // Output a single integer denoting the maximum subarray sum for each testcase in a new line. // Sample Input // 2 // 4 // 1 2 3 4 // 3 // -10 5 10 // Sample Output // 10 // 15 // Explanation // For the first testcase, maximum subarray sum is generated by the entire array - 1+2+3+4 = 10 // For the second testcase , maximum subarray sum is generated by the subarray {5,10} - 5+10 = 15 #include<iostream> using namespace std; int main() { int t,n; cin>>t; while(t--){ cin>>n; int a[n]; int currentSum=0,maxSum=0; for(int i=0;i<n;i++) cin>>a[i]; for(int i=0;i<n;i++) { currentSum+=a[i]; maxSum = max(currentSum,maxSum); if(currentSum<0) currentSum=0; } cout<<maxSum<<endl; } return 0; }
def decode(percept_data): if hasattr(percept_data, 'read'): image_array = np.frombuffer(percept_data.read(), np.uint8) return cv2.imdecode(image_array, _kImageReadFlags) return cv2.imread(percept_data, _kImageReadFlags)
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { DocumentFullscreenViewerComponent } from './document-fullscreen-viewer.component'; describe('DocumentFullscreenViewerComponent', () => { let component: DocumentFullscreenViewerComponent; let fixture: ComponentFixture<DocumentFullscreenViewerComponent>; beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [ DocumentFullscreenViewerComponent ] }) .compileComponents(); })); beforeEach(() => { fixture = TestBed.createComponent(DocumentFullscreenViewerComponent); component = fixture.componentInstance; fixture.detectChanges(); }); it('should create', () => { expect(component).toBeTruthy(); }); });
Diplopia after Excessive Smart Phone Usage ABSTRACT Acute comitant esotropia in a child has a mixed set of differentials and we present a report of three cases in children who presented with acute onset diplopia. On careful history taking, all the kids reported an excessive use of the smart phone in the preceding month. We hypothesise that excessive use of the smart phone at near leads to excessive stimulation of ciliary muscle, hence accommodative spasm in these children. This is the first case series to report an association of smart phones and accommodative spasm.
Heat dissipation in Sm3+ and Zn2+ co-substituted magnetite (Zn0.1SmxFe2.9-xO4) nanoparticles coated with citric acid and pluronic F127 for hyperthermia application In this work, Sm3+ and Zn2+ co-substituted magnetite Zn0.1SmxFe2.9-xO4 (x=0.0, 0.01, 0.02, 0.03, 0.04 and 0.05) nanoparticles, have been prepared via co-precipitation method and were electrostatically and sterically stabilized by citric acid and pluronic F127 coatings. The coated nanoparticles were well dispersed in an aqueous solution (pH 5.5). Magnetic and structural properties of the nanoparticles and their ferrofluids were studied by different methods. XRD studies illustrated that all as-prepared nanoparticles have a single phase spinel structure, with lattice constants affected by samarium cations substitution. The temperature dependence of the magnetization showed that Curie temperatures of the uncoated samples monotonically increased from 430 to 480 °C as Sm3+ content increased, due to increase in A-B super-exchange interactions. Room temperature magnetic measurements exhibited a decrease in saturation magnetization of the uncoated samples from 98.8 to 71.9 emu/g as the Sm3+ content increased, which is attributed to substitution of Sm3+ (1.5 B) ions for Fe3+ (5 B) ones in B sublattices. FTIR spectra confirmed that Sm3+ substituted Zn0.1SmxFe2.9-xO4 nanoparticles were coated with both citric acid and pluronic F127 properly. The mean particle size of the coated nanoparticles was 40 nm. Calorimetric measurements showed that the maximum SLP and ILP values obtained for Sm3+ substituted nanoparticles were 259 W/g and 3.49 nHm2/kg (1.08 mg/ml, measured at f=290 kHz and H=16kA/m), respectively, that are related to the sample with x=0.01. Magnetic measurements revealed coercivity, which indicated that hysteresis loss may represent a substantial portion in heat generation. Our results show that these ferrofluids are potential candidates for magnetic hyperthermia applications. MNPs play an important role as heat exchangers in a ferrofluid in the RF magnetic hyperthermia. Use of MNPs causes fewer side effects as damage to healthy tissues than normal cancer treatment methods. This method decreases the cancerous cells and augments their sensitivity to chemotherapy and radiation additionally by rising the local temperature of targeted tissues to an interval from 42 to 46 °C 13,14. The heating efficiency of MNPs is measured through the specific loss power (SLP) that is also referred to as specific absorption rate (SAR). It has been found that the SLP of MNPs can be modified by tuning saturation magnetization, effective anisotropy, and particle size 15. MNPs tend to agglomerate because of their large surface to volume ratio and magnetic dipole-dipole interactions 1. In order to reduce and/or avoid sedimentation and to enhance biocompatibility and functionalization, it is necessary to coat MNPs with surfactants or polymers. The stability of ferrofluids against agglomeration is related to a competition between various interactions, such as Van der Waals, magnetic dipole-dipole interactions, viscous drag force from the carrier fluid, and electrostatic and steric repulsion resulting from the surfactants in the coating 16,17. Achieving stability of ferrofluids in polar media (e.g., water) is a more complicated challenge than non-polar media (e.g., oil). Electrostatic repulsive forces between MNPs due to a high electric surface charge density may allow achieving long-term stability for water-based ferrofluids. Steric stabilization may not be sufficient for obtaining a stable colloidal suspension of particles with large magnetic core which introduce strong magnetic attraction forces. In such cases, strong electrostatic repulsion forces between the particles can be obtained by coating them with a highly charged material. To this end, citric acid (CA) is an appropriate candidate to coat particles, specifically for magnetic nanoparticle with strong magnetic interaction. CA has a high biocompatibility and introduces both, electrostatic and steric repulsion effects. CA has three carboxyl groups and a hydroxyl group that chemisorb to the iron oxide surface of the nanoparticles by forming a carboxylate complex with the Fe ions. Pluronic F127 is a biocompatible triblock polymer of amphiphilic nature which is composed of two hydrophilic chains of polyethylene oxide (PEO) and a hydrophobic chain of polypropylene oxide (PPO) 20. At low temperatures and/or low concentrations in aqueous solution, PEO-PPO-PEO copolymers are present as individual unimers. By increasing copolymer concentration and/or solution temperature, thermodynamically stable micelles are formed. The corresponding critical micelle concentration (CMC) is temperature dependent 21. To stabilize magnetic nanoparticles by coating them with pluronic F127 as used for magnetic diagnostic (i.e. magnetic resonance imaging (MRI)) and therapy (i.e. magnetic hyperthermia), pluronic F127 is normally accompanied by oleic acid and/or other polymers more than CA or in addition to CA 22,23. In this work, due to high biocompatibility of Zn 2+ and anticancer activity of samarium complexes 12,24, Sm 3+ and Zn 2+ co-substituted magnetite Zn 0.1 Sm x Fe 2.9-x O 4 (x = 0.0, 0.01, 0.02, 0.03, 0.04 and 0.05) MNPs, were synthesized via co-precipitation route at 80 °C. In a simple process, these MNPs were coated by CA and pluronic F127, respectively. The effect of substitution of iron by Sm 3+ ions on the physical properties of the uncoated nanoparticles and their ferrofluids were studied. Reduction of drug dose in all medical treatments is a goal. It is desirable to attain the target temperature in MH with as small amount of MNPs as possible to be delivered in tumors, which needs SLPs as high as possible 17. Also synthesis of stable suspensions of large (d > 20 nm) magnetic core-shell nanostructures is another advantage 25, which achieved in this work. Additionally maximum specific absorption rate (259 W/g) and intrinsic loss power (3.49 nHm 2 /kg) were achieved for aqueous ferrofluids, which were related to the sample with x = 0.01, in a concentration as low as 1.08 mg/ml. 3.6H 2 O (1 M) were separately dissolved in deionized double distilled water and stirred on a magnetic stirrer at room temperature to get clear solutions, which were then mixed together (40 ml). In this way, 40 ml of 3 M NaOH solution was added into each mixture abruptly. All obtained precipitates were dark green and were heated and stirred on a magnetic stirrer at 80 °C till their hues changed to black. The dark green precipitates were included iron (II), zinc and samarium compositions, which some Fe 2+ ions were partially oxidized to Fe 3+ in presence of air oxygen by oxidizing solution. These compositions formed via separate reactions occur during the formation of Sm-Zn co-substituted magnetite nanoparticles. The obtained black precipitates were magnetic and responded to an NdFeB permanent magnet strongly. The precipitates were decanted magnetically and were washed with deionized double distilled water several times to eliminate excess ions and get a neutral pH. For powder characterization, a small amount of each washed precipitate was dried in air at room temperature. These samples were named S.00, S.01, S.02, S.03, S.04 and S.05 for x = 0.0, 0.01, 0.02, 0.03, 0.04 and 0.05, respectively. The nanoparticles were coated to reduce their toxicity and to modify their surface. Approximately 2 g of each of the washed as-precipitated samples were dispersed in 300 mL milli-Q water and sonicated for 15 min, using a FRITSCH ultrasonic bath. A CA solution (1.7 g in 25 ml of milli-Q water) was added to each solution and finally each mixture was stirred further for another 10 min. Each mixture was heated and stirred at 80 °C for According to the data obtained from the different analyses on the samples, although the nanoparticles in slurries were large in size and had strong magnetic interactions, the ferrofluids were stable in an aqueous environment (pH 5.5). Stabilization might be related to the provided thermal energy and due to steric repulsive through the polymer coating. The PPO part of the pluronic F127 adsorbed on the surfaces of the nanoparticles. The PEO parts formed a water soluble shell around the particles, generating a repulsive force for entropy reasons. Along with the CMC, we also expect that the solubility was temperature dependent. At high temperatures the value of the CMC is normally higher than at low temperatures 21,26. Images of the ferrofluids and a schematic representation of the coating process are presented in Figs. 1 and 2, respectively. The XRD patterns of the samples were taken at room temperature using an X-ray diffractometer (Philips, X'PERT model), with Cu-K radiation ( = 1.5406 ), at a scanning rate of 0.04° per 1 s, and their full Rietveldrefined patterns were fitted by the MAUD program. The lattice constants of the uncoated nanoparticles were calculated by least-squares method 27. The mean crystallite sizes of the nanoparticles were estimated from the broadening of the XRD peaks, using Scherrer's formula, D = 0.9/ cos(), where D is the mean crystallite size, is the used X-ray wavelength, is the Bragg angle and is the full width at half-maximum (FWHM) intensity of the peak, respectively. Materials and methods The morphology, particle size and size distribution of coated samples were studied using a transmission electron microscope (JEOL JEM-2100F model). The mean particle size from TEM images was calculated by Image J software. The colloidal properties of the nanoparticles in aqueous suspension (mean hydrodynamic size and polydispersity index (PDI)) were studied by dynamic light scattering (DLS, Horiba Scientific) at pH 5.5 and T = 25 °C. Fourier transform infrared (FTIR) spectra were recorded with a Jasco spectrometer (6300 model) between 4000 and 400 cm −1. The Curie temperature of the samples was determined by DTG/M/method 28 in a weak magnetic static magnetic field. In our previous study, we elucidated the Curie temperature measurements 29. Magnetic measurements were performed at room temperature, using a vibrating sample magnetometer (VSM) (Lake Shore Cryotronics, 7407 model) with a maximum applied magnetic field of ± 18 kOe. To determine heating efficiency, the initial temperature slope dT/dt, an alternating magnetic field was generated in an induction coil, using a high-frequency induction machine (EFD Induction, Germany) (Fig. 3). The water-cooled coil was made of copper tube which has 3 turns and a mean diameter of 5 cm. The rms field strength and the field frequency were 16 kA/m and 290 kHz, respectively. The temperature was measured with a fiber optic thermometer with precision of 0.1 °C (FOtemp, OPTOcon, Germany) and the probe was kept in the center of the ferrofluid (Fig. 3). The nanoparticles suspensions (a 0.5 ml of ferrofluid put in a 2 ml Cryovial) were thermally isolated with polyurethane foam and placed at the center of the copper coil. The heat efficiency related to the specific loss power (SLP) defined as heat power dissipation per unit mass of nanoparticles, is expressed by: where m i and C i are the mass and specific heat capacity of each component of the magnetic ferrofluid, and m is the mass of the magnetic nanoparticles 30. Specific heat capacities of water and magnetite are 4180 and 937 J/kg K, respectively 31. The specific heat capacity of water was used for aqueous ferrofluids with a particle concentration lower than 2% in the suspension 30. Since SLP is measured for different magnetic field strengths and frequencies and in different laboratories, the intrinsic loss power (ILP) is determined by using the following equation 32 : Also it can be seen that, by increasing the Sm 3+ content, the main diffraction peaks were initially shifted to lower diffraction angles, which is due to, based on Vegard's law 33 www.nature.com/scientificreports/ dral (A) and octahedral (B) sites), respectively 34,35. The site preferences of Sm 3+ and Zn 2+ ions are octahedral and tetrahedral sites, respectively. By increasing the Sm 3+ ion content, the main XRD diffraction peaks were shifted to larger angles, due to either internal strains which can be responsible for both increase and decrease of lattice parameters 36,37 or due to redistribution of cations between A and B sites in order to relax the strain 38. As the expansion of a lattice is not unlimited, larger rare earth ions have a limited solubility in the spinel structure. XRD patterns of the S. 01, S.03, FS.01 and FS.03 samples are presented in Fig. 4b. As can be seen, coating of the nanoparticles with CA and F127 did not affect the positions of the diffraction peaks. However, the intensity of the peaks decreased which may be attributed to a lower crystallinity due to the presence of the ligands on the surface of the nanoparticles. Figure 5 shows some typical Rietveld-refined XRD patterns of as-prepared samples. As can be seen, the experimental and standard data were matched very well and no unwanted phases were observed. In the Rietveld analysis, the inverse spinel has been applied. It was purposed that zinc ions were in the A sites and samarium ions were in the B sites. Mean crystallite sizes, lattice constants of the samples, refinement parameters www.nature.com/scientificreports/ and quality of the patterns, such as goodness of fit (Sig), weighted profile R-factor (R wp ), Bragg R-factor (R b ) and the expected R-factor (R exp ) are tabulated in Table 1. FTIR spectra of Zn 0.1 Sm x Fe 2.9-x O 4 nanoparticles coated with CA are illustrated in Fig. 6a. The broad band spectrum around 3411 cm −1 is attributed to the O-H band groups of water absorbed on the surface of nanoparticles. The band around 2900 cm −1 is related to the stretching vibration mode of the C-H bond. The 1720 cm −1 peak is due to the symmetric C=O stretching vibration mode from the -COOH group of CA which shifted to a lower wavenumber 1622 cm −1. The band around 1622 cm −1 is assigned to the binding of CA radicals on the surface of nanoparticles through the chemisorption of carboxylate citrate ions. The band around 1461 cm −1 is a characteristic band of the asymmetric stretching vibration mode of CO from the carboxylic group 39. The intense band observed around 570 cm −1 in all FTIR spectra is assigned to stretching vibrational mode of Fe-O bonds on the tetrahedral and octahedral sites 40. As can be seen, by increasing the Sm 3+ content, this band shifted to lower wavenumbers which is attributed to the substitution by large Sm 3+ on the octahedral site which affected distances of Fe-O bonds on the octahedral sites. Therefore, the bands were ascribed to the CA-coated MNPs. CA binds to the surface of nanoparticles through the carboxylate complex with the surface Fe ions. Figure 6b shows the FTIR spectra of coated S.00 and S.01 samples with both CA and Pluronic F127, i.e., FS.00 and FS 0.01, respectively. The band around 1100 cm −1 is attributed to C-O-C stretching vibration mode of the PPO/PPE chains of pluronic F127 41. The presence of this band confirms the adhesion of pluronic F127 on the surface of nanoparticles. It was reported that the intensity and the position of the band are composition dependent 42. Figure 7a and b show TEM images of FS.00 nanoparticles for two different magnifications. As can be seen, nearly hexagonal and irregularly shaped were formed. Figure 7c shows the histogram of particle size distribution for the FS.00 sample, yielding an average of 40 nm. As the thicknesses of their shells were not clearly observable, we did not consider its thickness in averaging. Table 2. According to Nel theory for two sublattice ferrimagnetism, each sublattice is ordered ferromangetically and has a nonzero spontaneous magnetization and magnetizations of the two sublattices are coupled antiferromagnetically. Then, the magnitude of the net magnetization is obtained from: Figure 5. The Rietveld-refined XRD patterns of as-prepared specimens as marked on the patterns. Table 1. The lattice constants, the mean crystallite sizes and Rietveld-refined XRD data of the as-prepared Sm 3+ substituted nanoparticles. Sample a ± 0.001() D ± 2(nm) Sig (GoF) R wp (%) R b (%) R exp (%) S. 00 www.nature.com/scientificreports/ www.nature.com/scientificreports/ where M A, M B and T are magnetizations of A, B sublattices and temperature, respectively. As can be seen, by increasing the content of Sm 3+, the saturation magnetization gradually decreased which is due to replacement of Fe 3+ (5 B ) by Sm 3+ (1.5 B ) ions 43 in B sites. Therefore, the number of magnetic moments of B sites was reduced, while the magnetization of the A sites remained constant. As can be seen, by increasing the content of Sm 3+ the remanent to saturation magnetization ratio decreased slightly. According to the model of non-interacting randomly distributed uniaxial single domain particles, the M r /M s ratio of the particles is 0.5. Any deviation from this value is indicating a transition to multidomain particles 44. Table 2 illustrates that the M r /M s ratios of the uncoated samples were less than 0.1, indicating that the particles are multidomains. In order to estimate the effective anisotropy constants K eff of the samples, an empirical equation, based on the law of approach to saturation, was used: 45,46. Figure 8c shows the variation of magnetization versus magnetic field for high fields that was fitted to M H = M s (T) + cH. All experimental data were fitted very well with R-squared values higher than 99%. As can be seen, by increasing the Sm 3+ content the effective anisotropy constant K eff decreased, which can be attributed to the effect of particle size. By increasing the Sm 3+ content, a correlation between H c and K eff is observed, which is attributed to the direct relationship between H c and K eff 46 : Table 2 illustrates that coercivity of the uncoated samples decreased as the Sm 3+ content increased. Coercivity is dependent on the displacement of domain walls and on the particle sizes 7. Coercivity also is impressed by other factors such as microstrain and magnetocrystalline anisotropy or interactions due to packing density, which is controlled from the coating 36,47. According to Berkov's theory for low anisotropy, coercivity first increases with increasing concentration when dipolar interaction becomes significance, but for more dense packing coercivity decreases again due to the formation of a short range order. Possibly, in the densely packed samples particles come locally in closer contact and therefore a coupling due to exchange interactions may become dominant, so some complicated magnetization structures arise which were not considered in Berkov's model 47. Figure 9 illustrates magnetization-temperature (M-T) curves of the as-prepared samples in the course of first heating and cooling processes. As can be seen, by increasing the Sm 3+ content, the Curie temperature of the samples increased gradually from 430 °C to 480 °C. The Curie temperature is related to the number and the strength of magnetic interactions (A-A, B-B and A-B super-exchange interactions) as well as distance between paramagnetic ions 48. In spinel ferrites, the interaction between Fe 3+ ions in A and B sites is the strongest one and thus plays a dominant role in determining T c 7. There is a weak exchange interaction between the 4f. electrons of Sm 3+ and the 3d electrons of Fe 3+, but A-O-B super-exchange interactions between Fe 3+ -Fe 3+ is stronger than that of Fe 3+ -Sm 3+. Furthermore, by increasing Sm 3+ content, electron hopping between Fe 3+ and Fe 2+ ions in A and B sites occurs, which leads to a decrease in A-B super-exchange interaction 7. Therefore, for a low concentration of Sm 3+ ions, the lattice constant decreased as the Sm 3+ content increased, A-B super-exchange interactions in the samples increased, all resulting in an increase in T c. As M-T curves were recorded in air, samples were oxidized during the determination of the Curie temperatures. The oxidation reaction of substituted magnetite (M z 2+ Fe 1-z 2+ Fe 2 3+ O 4 2-, where M 2+ is a bivalent cation or a combination of cations with different valences so that their net valences are two or Fe 2+ Fe 2-x 3+ M x 3+ O 4 2−, where M 3+ is a trivalent cation or a combination of cations with net valence of three) is a topotactic reaction where the spinel structure is preserved. A metastable defect phase structure forms, which can be described by the following formula: where y = 4z/(9-z) and, where y = x/3, 0 < y < 2/3. By increasing the temperature, the cubic phase transforms into a stable rhombohedral hematite phase. Accordingly, the sample decomposes to a spinel and hematite structure. During cooling from high temperatures to room temperature, magnetization showed a temperature dependency, which is due to the spinel phase with a new cation rearrangement based on ions preference energies which has ferrimagnetic order. The samples decomposed to hematite and a spinel phase. The Curie temperatures for all samples are summarized in Table 2. Colloidal properties. Figure 10 shows DLS diagrams of the ferrofluids. The mean hydrodynamic sizes of the FS. 00, FS. 01, FS.02, FS.03, FS.04 and FS.05 coated nanoparticles, which were dispersed in an aqueous medium, at T = 25 °C and at pH = 5.5 were 582, 489, 491, 518, 445 and 433 nm, respectively. These sizes were much larger than those of both crystallite and particle, which indicates that the magnetic nanoparticles were agglomerated. The hydrodynamic size of the nanoparticles depends on their interactions and the numbers of polymers attached on their surfaces 52. However, even at concentrations below the CMC, amphiphilic molecules attach onto the surfaces of nanoparticles, depending on their surface properties. For concentrations of the pluronic F127 in water above its CMC, micelles form. Possibly absence of micelles of pluronic F127 at T = 25 °C, the micelle passes its CMC, led to agglomeration and thus to a large hydrodynamic size. Calorimetrical and magnetic measurements on ferrofluids in an aqueous medium. To consider contributions of Nel and Brownian relaxation mechanisms for heat generation, we estimated the critical sizes as well as the effective anisotropy constant of the samples. For Nel relaxation, it is assumed that magnetic moments rotate, while the crystal structure is fixed in space. The Nel time constant is defined as: where 0 = 10 −9 s, k B is the Boltzmann's constant (1.38 10 −23 J/K), T is the absolute temperature, V is the particle volume and K eff is effective magnetic anisotropy constant, which may originate from magnetocrystalline, shape and other anisotropies. For the Brownian relaxation mechanism, it is supposed that the magnetic moment is locked to the crystal structure. The magnetic moment rotates in a low viscosity carrier medium, when it aligns with the applied field. The Brownian time constant is: where is the viscosity of the carrier liquid, which is 1.01 10 −3 kg/sm for water and V H is the hydrodynamic volume 53,54. In presence of a magnetic field varying in time, the Brownian relaxation mechanism results in a heat generation in a ferrofluid, as a consequence of viscous friction between particles and the surrounding carrier liquid, which is not limited to superparamagnetic particles 55. We presume that magnetocrystalline anisotropy prevails in effective magnetic anisotropy of the nanoparticles. At a high frequency, the critical size is defined by = 1 56. In the critical size region the hysteresis loss vanishes abruptly and relaxation effects form remaining loss mechanisms 57. The estimated effective anisotropy constants www.nature.com/scientificreports/ of the samples are given in Table 2. For the applied frequency (290 kHz) the critical particle size of the samples were found to be in the range from 19 to 22 nm, where p Nel achieved its maximum. The produced nanoparticles have larger average sizes than the critical size. Therefore, high SLP values are due to nonzero coercivity, i. e., due to hysteresis loss. The hydrodynamic size for our measuring frequency was 11 nm for B = 1. The hydrodynamic sizes of the prepared samples are marked in Fig. 10, which are very higher than those obtained from the hydrodynamic volumes (V H ), estimated from Eq.. Figure 11 shows room temperature VSM curves, which were carried out on the aqueous ferrofluids (FS.01 and FS.02 ). As can be seen although magnetizations of the samples were saturated, but they are so small, which is due to very low concentrations. Saturation magnetization of a ferrofluid in an aqueous medium not only depends on the single cores M S, but depends on concentration. Also VSM data reviled that both ferrofluids have moderate coercivities and then no superparamagnetic behavior, which is due to slightly agglomeration in aqueous medium. As discussed above the same agglomeration was observed by DLS measurements too. So we can deduce that relaxation processes did not play a dominant role in SLP. In an external RF magnetic field, magnetic materials convert the incident RF energy into heat 58. The heating efficiency of the magnetic ferrofluids was obtained using SLP (W/g) = dT/dt m i C i /m. The calculated SLP and ILP values are summarized in Table 3. The maximum SLP and ILP were found to be 259 W/g and 3.49 nHm 2 /kg, respectively, for the sample with x = 0.01. The SLP depends on magnetic field parameters and properties of the nanoparticles, such as size, size distribution, saturation magnetization M S, remanent magnetization M R, coercivity H C and effective magnetic anisotropy as well as the concentration of the sample. Hysteresis loss represents the main portion in heat generation of multidomain magnetic materials, while relaxation processes represent the main contribution for single domain superparamagnetic particles 17. Therefore the high SLP values of the FS.01 and FS.02 samples can be attributed to hysteresis loss first and Brownian mechanism second, due to viscous friction between rotating particles and surrounding aqueous medium. Figure 12a and b illustrate the variation of the temperature in terms of time (T-t) curves for x = 0.01 and 0.02 in an RF magnetic field. According to data from Table 3 and the temperature variations (T) with respect to time, the FS.01 and FS.02 could potentially be good candidates for magnetic hyperthermia application. Gadzhimagomedova et al. reported SLP and ILP values of 8.2 W/g and 0.15 nHm 2 /kg, respectively for samarium doped superparamagnetic magnetite nanoparticles (Sm 0.033 Fe 2.967 O 4 ) coated with PEG 59, which are very lower than those we obtained in this work, Table 3. Conclusions Single phase Sm 3+ and Zn 2+ co-substituted magnetite (Zn 0.1 Sm x Fe 2.9-x O 4, x = 0.01, 0.02, 0.03, 0.04 and 0.05) nanoparticles were synthesized via co-precipitation method. The comparatively large (d > 20 nm) nanoparticles were coated with citric acid and pluronic F127, using a simple route to obtain core-shell structures and then suspended in water to get stable ferrofluids. The stability of the ferrofluids (pH 5.5) was related to the formation of micelles. The PPO sequence of the pluronic F127 adsorbed on the surface of the nanoparticles, while the PEO chains formed hydrophilic shells around the nanoparticles, which in turn generated repulsive forces due to entropy reasons. The coercivity, (M r /M s ) ratio and the effective anisotropy constant K eff were monotonically www.nature.com/scientificreports/ decreased by increasing the Sm 3+ content, which related to properties of the nanoparticles, such as size, size distribution and morphology. VSM measurements on all ferrofluids presented nonzero coercivities, which are results of both multidomain cores and agglomeration of the coated nanoparticles in the solution. The highest obtained values of the SLP and ILP were 259 W/g and 3.49 nHm 2 /kg, respectively, which were found for the FS.01 sample at a concentration as low as 1.08 mg/ml. Those high values are due to the nonzero coercivity of the samples that leads to a hysteresis loss portion as the main loss mechanism, although frictional loss may have occurred additionally too. From the SLP and ILP data, we concluded that both FS.01 and/or FS.02 samples are good candidates for magnetic hyperthermia applications potentially to achieve sufficient heating efficiencies at a low magnetic nanoparticles concentration. www.nature.com/scientificreports/
from .mlp import MLP from .conv import ConvNet, ResizeConvNet, GatedConvNet, ConvEncoderNet, ConvDecoderNet, Conv2Flat from .autoregressive import * from .matching import * from .transformer import TransformerNet, ConvAttnBlock from .context_upsampler import ContextUpsampler, UpsamplerNet
# Function to determine the energy channel range needed for input during # extraction. Requires the file energy_conversion_table.txt to determine the # initial channel selection. # Written by David Gardenier, 2015-2016 from datetime import datetime from astropy.io import fits obj = [ '4U_0614p09', '4U_1636_m53', '4U_1702m43', '4u_1705_m44', '4U_1728_34', 'aquila_X1', 'cir_x1', 'cyg_x2', 'EXO_0748_676', 'gx_17p2', 'gx_340p0', 'gx_349p2', 'gx_5m1', 'HJ1900d1_2455', 'IGR_J00291p5934', 'IGR_J17480m2446', 'IGR_J17498m2921', 'KS_1731m260', 'xte_J1808_369', 'S_J1756d9m2508', 'sco_x1', 'sgr_x1', 'sgr_x2', 'v4634_sgr', 'XB_1254_m690', 'xte_J0929m314', 'J1701_462', 'xte_J1751m305', 'xte_J1807m294', 'xte_J1814m338', 'gx_339_d4', 'H1743m322', 'xte_J1550m564'] def ch2e(ch,date): ss = '/scratch/david/master_project/scripts/subscripts/' with open(ss + 'energy_channel_conversion.txt', 'r') as txt: text = list(txt) stop_dates = [x + y for x, y in zip(text[2].split()[2:6], text[3].split()[2:6])] end_dates = [datetime.strptime(t, '%m/%d/%y(%H:%M)') for t in stop_dates] if len(date) == 8: date = datetime.strptime(date, '%d/%m/%y') else: date = datetime.strptime(date, '%Y-%m-%dT%H:%M:%S') if date < end_dates[0]: epoch = 1 elif date < end_dates[1]: epoch = 2 elif date < end_dates[2]: epoch = 3 elif date < end_dates[3]: epoch = 4 else: epoch = 5 if epoch < 5: column = epoch + 1 else: column = -1 # Make a list of energies energies = [float(i.split()[column]) for i in text[12:]] channels = [i.split()[0] for i in text[12:]] if type(ch) is float: return float('NaN') if ch[0]<5: ei = 0 else: ei = channels.index(str(ch[0])) # starting energy return float(energies[ei]) def start_ch(mode,path): ''' Look inside each file to get the channel range it contains ''' # Get the list in which you want search for channels if mode == 'event': tevtb2 = fits.open(path)[1].header['TEVTB2'] if 'C' not in tevtb2: try: # I think this fixes VLE (Very Long Event) data files hidden as event files. # Not entirely sure about the rel_channels (usually they're given in the # header as 5-255, but presumably that doesn't mean it's all one bin?) tddes2 = fits.open(path)[1].header['TDDES2'] rel_channels = tddes2.split('& C')[1][1:].split(']')[0].replace('~','-') rel_channels = ','.join([str(e) for e in range(int(rel_channels.split('-')[0]), int(rel_channels.split('-')[1])+1)]) except: print 'ERROR: No channel information in this file' return float('NaN') else: # Cut out the channels rel_channels = tevtb2.split(',C')[1][1:].split(']')[0].replace('~','-') elif mode == 'binned': tddes2 = fits.open(path)[1].header['TDDES2'] rel_channels = tddes2.split('& C')[1][1:].split(']')[0].replace('~','-') if ',' not in rel_channels: return float('NaN') # Get a list of numbers to actually search through chs = [] for cr in rel_channels.split(','): # Spent ages looking, but couldn't find what 0~4,(5:35) means, or (0-4), # (5:35). Am assuming ':' means all channel in that range (on basis of # an extracted spectrum), and not sure what () means if '(' in cr: cr = cr.split(')')[0].split('(')[1] if '-' in cr: crs = cr.split('-') if ':' in cr: crs = cr.split(':') cr = [e for e in range(int(crs[0]), int(crs[1])+1)] elif '-' in cr: cr = [e for e in range(int(cr.split('-')[0]), int(cr.split('-')[1])+1)] elif ':' in cr: crs = cr.split(':') cr = [e for e in range(int(crs[0]), int(crs[1])+1)] else: cr = [int(cr)] chs.append(cr) # Ensure the lowest energy channel is not returned # See Gleissner T., Wilms J., Pottschimdt K. etc. 2004 if chs[0][0] == 0: if len(chs) > 2: chs = chs[1] #Assuming channels doesn't do 0-19,etc else: chs = float('NaN') else: chs = chs[0] return chs def find_channels(): ''' Find the distribution of starting energies ''' purpose = 'Find starting energy distribution' print len(purpose)*'=' + '\n' + purpose + '\n' + len(purpose)*'=' import os import pandas as pd import glob from collections import defaultdict filein = '/scratch/david/master_project/scripts/misc/paths.txt' fileout = '/scratch/david/master_project/scripts/subscripts/paths.py' f = open(filein,'r') filedata = f.read() f.close() d = defaultdict(list) for o in obj: data = '/scratch/david/master_project/' + o + '/' database = '/scratch/david/master_project/'+o+'/info/database_'+o+'.csv' os.chdir(data) db = pd.read_csv(database) for obsid, group in db.groupby(['obsids']): group = group.drop_duplicates('paths_data') es = [] ms = [] for mode, path, time in zip(group.modes,group.paths_data,group.times): if mode == 'std1' or mode=='std2' or mode=='gx2': continue elif mode == 'gx1': e = ch2e([0],time) else: ch = start_ch(mode,path) e = ch2e(ch,time) print obsid, mode, ch, e es.append(e) ms.append(mode) if 'gx1' in ms: i = ms.index('gx1') m = 'gx1' fe = es[i] elif 'event' in ms: i = ms.index('event') m = 'event' fe = es[i] elif 'binned' in ms: i = ms.index('binned') m = 'binned' fe = es[i] d['mode'].append(m) d['energies'].append(fe) d['objects'].append(o) d['obsid'].append(obsid) df = pd.DataFrame(d) df.to_csv('/scratch/david/master_project/misc/energy_dist_' + o + '.csv') def plotting(): import matplotlib.pyplot as plt import pandas as pd for o in obj: df = pd.read_csv('/scratch/david/master_project/misc/energy_dist_' + o + '.csv') df.hist(column='energies') plt.savefig('/scratch/david/master_project/misc/energy_dist_' + o + '.png') #find_channels() plotting()
. A 74-year-old man visited his local clinic complaining of abdominal pain that persisted for three days. He was diagnosed with diffuse peritonitis and was transported to our hospital. Contrast computed tomography(CT)showed gastric perforation and a tumor in the sigmoid colon with left obturator lymph node metastasis. He was diagnosed with diffuse peritonitis resulting from gastric perforation and performed emergent surgery. As the size of the gastric perforation was large, we performed distal gastrectomy and transverse colostomy. He was discharged without any complications, and a total of 6 courses of SOX with a bevacizumab regimen were administered postoperatively. CT following chemotherapy showed shrinkage of the lesion. He was admitted again for sigmoidectomy with left lateral lymph node resection and discharged from the hospital on postoperative day 8. We administered 2 courses of SOX regimen after the surgery. He remains alive with no recurrence 27months after the first surgery.