content
stringlengths 7
2.61M
|
---|
package org.recap.model.camel;
import org.junit.Ignore;
import org.junit.jupiter.api.Test;
import org.recap.BaseTestCaseUT;
import java.sql.Timestamp;
import java.util.Date;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
public class EmailPayLoadUT extends BaseTestCaseUT {
@Test
public void Emailpayload() throws Exception {
String itemBarcode = "123456";
String itemInstitution = "PUL";
String oldCgd = "shared";
String newCgd = "open";
String notes = "test";
String jobName = "Acession";
String jobDescription = "test";
String jobAction = "test";
Timestamp timestamp = new Timestamp(System.currentTimeMillis());
String status = "IN";
String message = "test ";
String from = "test";
String to = "test";
String cc = "test";
String subject = "Emailpayload";
EmailPayLoad emailpayload = new EmailPayLoad();
emailpayload.setItemBarcode(itemBarcode);
emailpayload.setItemInstitution(itemInstitution);
emailpayload.setOldCgd(oldCgd);
emailpayload.setNewCgd(newCgd);
emailpayload.setNotes(notes);
emailpayload.setJobName(jobName);
emailpayload.setJobDescription(jobDescription);
emailpayload.setJobAction(jobAction);
emailpayload.setStartDate(timestamp);
emailpayload.setStatus(status);
emailpayload.setMessage(message);
emailpayload.setFrom(from);
emailpayload.setTo(to);
emailpayload.setCc(cc);
emailpayload.setSubject(subject);
assertNotNull(emailpayload.getItemBarcode());
assertNotNull(emailpayload.getItemInstitution());
assertNotNull(emailpayload.getOldCgd());
assertNotNull(emailpayload.getNewCgd());
assertNotNull(emailpayload.getNotes());
assertNotNull(emailpayload.getJobName());
assertNotNull(emailpayload.getJobDescription());
assertNotNull(emailpayload.getStatus());
assertNotNull(emailpayload.getMessage());
assertNotNull(emailpayload.getFrom());
assertNotNull(emailpayload.getCc());
assertNotNull(emailpayload.getTo());
assertNotNull(emailpayload.getSubject());
assertNotNull(emailpayload.getStartDate());
assertNotNull(emailpayload.getJobAction());
}
} |
Transforming growth factor-beta suppresses human B lymphocyte Ig production by inhibiting synthesis and the switch from the membrane form to the secreted form of Ig mRNA. Transforming growth factor-beta (TGF-beta) inhibits B cell Ig secretion and reduces B cell membrane Ig expression. The addition of TGF-beta to human B lymphocyte cultures stimulated with Staphylococcus aureus Cowan strain I and IL-2 completely inhibited B cell Ig secretion (greater than 90%) and decreased B cell surface IgM, IgD, kappa L chain, and lambda L chain expression. In contrast, TGF-beta had only minimal effects on two other B cell membrane proteins, HLA-DR and CD20. Internal labeling with methionine and immunoprecipitation with anti-IgM, anti-kappa, and anti-lambda antibodies revealed a striking reduction in kappa L chain in the presence of TGF-beta. A less pronounced reduction in lambda L chain and microH chain was also noted. Northern blot analysis of RNA purified from B cells treated with TGF-beta for varying time intervals revealed a significant decrease in steady state kappa and lambda L chain mRNA levels. Furthermore, a significant decrease in the switch from the membrane forms of mu and gamma to their respective secreted forms was noted in the presence of TGF-beta. Nuclear run-on experiments demonstrated decreased transcription of kappa L chain. The effects of TGF-beta on two transcriptional regulatory factors, Oct-2 and nuclear factor (NF) kappa B, known to be important in Ig gene transcription were examined. Oct-2 mRNA levels and both Oct-2 and NF-kappa B proteins in nuclear extracts were not altered by treatment with TGF-beta. In contrast, levels of the transcriptional factor AP-1, which is not known to be important in B cell Ig production, were reduced by TGF-beta. These findings demonstrate that TGF-beta decreases B lymphocyte Ig secretion by inhibiting the synthesis of Ig mRNA and inhibiting the switch from the membrane form to the secreted forms of mu and gamma mRNA. The mechanism by which TGF-beta inhibits Ig chain synthesis is unclear although it does not involve inhibition of the binding of NF-kappa B or Oct-2 to their respective target sequences. |
Response to: Pelvic floor reconstruction with a biological mesh after extralevator abdominoperineal excision leads to few perineal hernias and acceptable wound complication rates with minor movement limitations Dear Sir, We would like to thank Musters et al. for their comments on our article Pelvic floor reconstruction with a biological mesh after extralevator abdominoperineal excision leads to few perineal hernias and acceptable wound complication rates with minor movement limitations: single-centre experience including clinical examination and interview. As they may have noticed, the title referred to is not the title of the final, proofread article. The question regarding what should be considered as the standard of care for perineal closure after extralevator abdominoperineal excision (ELAPE) is indeed unanswered, as stated by Musters et al. It is further stated that our reported complication rate is rather high compared with primary perineal closure. The referred article by Nissan et al. reported perineal wound infection in 24% of patients, and similar results after primary perineal closure have been reported elsewhere. It is correct that we do not compare our results with those achieved by primary perineal closure; however, this is indeed mentioned in the introduction of our article. As to the question of whether a perineal hernia rate of 6% should be regarded as low, we respectfully propose that our focused perineal examination, including having the patient sitting on a bedpan chair, combined with the longer follow-up in our study, revealed the true incidence of perineal hernia. The difference in methodology is obvious; the referred articles were based purely on medical chart review. Furthermore, comparable perineal hernia rates have been reported after primary perineal closure, as well as after pelvic floor reconstruction with both tissue flap and biological mesh. We strongly agree that there is a need for higher levels of evidence on the value of a biological mesh after ELAPE and are very pleased to hear that Musters et al. are conducting a multicentre randomized controlled trial to investigate this field further. We look forward to reading the results. |
package Principal;
/**
*
* @author Caio
*/
public abstract class ConsultarTemplate extends javax.swing.JFrame {
public javax.swing.JButton jButton1;
public javax.swing.JButton jButton2;
public javax.swing.JButton jButton3;
public javax.swing.JButton jButton4;
public javax.swing.JButton jButton5;
public javax.swing.JLabel jLabel2;
public javax.swing.JScrollPane jScrollPane1;
public javax.swing.JList listapacientes;
public javax.swing.JTextField nome;
public javax.swing.JLabel titulo;
public ConsultarTemplate() {
initComponents();
this.nome.setDocument(new LengthRestrictedDocument(40));
}
public void initComponents() {
titulo = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
nome = new javax.swing.JTextField();
jButton1 = new javax.swing.JButton();
jScrollPane1 = new javax.swing.JScrollPane();
listapacientes = new javax.swing.JList();
jButton2 = new javax.swing.JButton();
jButton3 = new javax.swing.JButton();
jButton4 = new javax.swing.JButton();
jButton5 = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
titulo.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
titulo.setText("Consultar X");
jLabel2.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
jLabel2.setText("Nome:");
jButton1.setText("Procurar");
jScrollPane1.setViewportView(listapacientes);
jButton2.setText("Visualizar");
jButton3.setText("Sair");
jButton4.setText("Alterar");
jButton5.setText("Excluir");
jButton3.addActionListener(new java.awt.event.ActionListener() {
@Override
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton3ActionPerformed(evt);
}
});
jButton1.addActionListener(new java.awt.event.ActionListener() {
@Override
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton3ActionPerformed(evt);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(nome, javax.swing.GroupLayout.PREFERRED_SIZE, 312, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton1)
.addGap(0, 0, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(layout.createSequentialGroup()
.addComponent(jButton2)
.addGap(18, 18, 18)
.addComponent(jButton4)
.addGap(18, 18, 18)
.addComponent(jButton5)
.addGap(0, 0, Short.MAX_VALUE))
.addComponent(jScrollPane1))
.addGap(28, 28, 28)
.addComponent(jButton3)))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(layout.createSequentialGroup()
.addGap(142, 142, 142)
.addComponent(titulo)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(titulo)
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel2)
.addComponent(nome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jButton1))
.addGap(18, 18, 18)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButton2)
.addComponent(jButton4)
.addComponent(jButton5)
.addComponent(jButton3))
.addContainerGap(18, Short.MAX_VALUE))
);
pack();
}
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {
this.dispose();
}
public void setTitulo(){
this.titulo.setText("Consultar");
}
}
|
The Pioneer Woman: A Canadian Character Type by Elizabeth Thompson (review) not explicitly admit the existence of one good or great poem; does he believe there are none? I admire Hardy's poetry and think Donald Davie badly misrepresents it, and I gave my reasons at length in the pages of this journal in 1974, but I do not think Hardy the poet is best served by citing so many of the 'idea' poems a tactic dictated by the needs of a project set out in the opening pages, the reinstatement of 'ideas in verse' after their demotion by modernist theory. In the interests of the polemic against modernism, Hoffpauir concentrates on some of the theoretical statements of Pound and Eliot rather than on their poems, either giving them perfunctory attention or choosing an easy target like Pound's ' In the Station of the Metro.' The nondiscursive art of the Cathay poems would not be so susceptible to charges of vagueness and failure of communication. It suits Hoffpauir's case to explain Pound's and Eliot's suspicion of the discursive the rationale of imagism as an instance of a general anti-intellectualism in the modernist camp. He knows that this is, at best, a partial truth and says so 'Not all modernist poets are imagists, and those who are are so only part of the time. Most poets find it difficult not to think. Eliot is an obvious example' but he will not concede the corollary: that Eliot, whose watchword was intelligence, rejected 'ideas in verse' in the name of a more rigorous thinking. In praising James for having 'a mind so fine that no idea could violate it' Eliot was asserting the artist's 'escape' from petrified thought. 'In England ideas run wild and pasture on the emotions... we produce the political idea, the emotional idea, evading sensation and thought.' George Meredith's 'ideas... are a substitute for observation and inference.' (MICHAEL KIRKHAM) |
The feature, that different temperatures are generated at a hot end and a cold end of a P-type semiconductor and an N-type semiconductor while being energized, has been widely applied in the field of manufacturing semiconductor cooling or heating devices. In the prior art, when manufacturing an N-type semiconductor, it is presently known that group V elements such as phosphorus, arsenic or antimony are generally incorporated in pure silicon crystal to replace positions of silicon atoms in the lattice, and thus an N-type semiconductor is formed. When the N-type semiconductor element manufactured with the traditional method is applied in manufacturing a cooling or heating device, the major problems are: the temperature difference between the two ends is relatively small (the temperature difference between the hot end and the cold end is generally about 60 degrees), the cooling or heating efficiency is poor, and the energy consumption is large; besides, since the head end and the tail end of the existing N-type semiconductor element cannot be distinguished from each other, when being applied in manufacturing the cooling or heating device, the head ends and the tail ends are connected disorderedly, an orderly head-to-tail connection thereof cannot be achieved, therefore, the electrical power conversion of the semiconductor element does not work efficiently, thereby decreasing the working efficiency. Accordingly, the effect of usage of the existing N-type semiconductor element for a cooling or heating device is less than desired. |
<filename>src/app/shared/controller/index.ts
export * from './abstract.component';
export * from './view.controller';
export * from './side-bar.controller';
export * from './export-data-provider';
|
Cervicothoracic fixation using a tapered rod with posterior en bloc multilevel laminectomy for treatment of cervicothoracic pathology: a prospective case series Background: Cervicothoracic junction pathologies are difficult to treat because of the biomechanical and anatomical considerations of this area. Anterior approaches in this area are highly demanding and often result in long-term morbidities. Posterior fixation of the cervicothoracic junction is difficult because of the change in anatomy of the vertebrae between the cervical and thoracic vertebrae. Traditional laminectomy may be hazardous to the spinal cord. The purpose of this study was to evaluate the results of cervicothoracic fixation using tapered rods and en bloc multilevel laminectomy for treatment of different pathologies in terms of effectiveness, neurological improvement, and complications. Methods: A prospective study was done between 2013 to 2016 on 17 patients with cervicothoracic pathologies. The mean age was 50.05±16.48yr. There were seven patients with tumors, five patients with traumatic fractures (including one patient with ankylosing spondylitis), and five patients with cervicothoracic myelopathy due to degenerative disorders. The patients underwent a detailed history and clinical examination, and they were investigated with radiographs, CT scans, and MRI. The patients neurological functions were classified according to Frankel grades of paraplegia. All patients had preoperative neurological impairment. Results: All patients were operated through posterior approach. En bloc laminectomy and posterior fixation of at least the lower 3 cervical and upper 3 thoracic vertebrae were done using a tapered rod. The mean operative time was 164.40min. The mean operative blood loss was 960.6mL. One case had superficial infection that was treated with antibiotics and daily dressings until wound healing. Patients with spinal metastases received postoperative radiation 1mo after surgery. No neurological deterioration occurred. The improvement in patients was gradual throughout the follow-up but started in some patients from 2 days postoperatively. Gait improved in all patients. No case of metal failure was observed during follow-up. Conclusions: Multilevel en bloc laminectomy is a safe technique that provides adequate decompression of the spinal cord and neurological improvement for patients suffering from cervicothoracic myelopathy due to various pathologies. The use of a tapered rod is a good alternative for connection of screws across the cervicothoracic region, with easy handling and minimal complications. Level of Evidence: Level IV. |
/**
* If partition data distribution methods are same, in the following scenarios,
* the partition types of table and tablegroup are considered to be the same:
* 1.For hash partition, the number of partitions must be the same
* 2.For key partition, the number of partitions must be the same and the column_list_num must match
* 3.For range/range column or list/list column partition,
* the number of partition expressions partitions/partition split point are required to be same
*/
int ObTableGroupHelp::check_partition_option(const ObTablegroupSchema& tablegroup, ObTableSchema& table)
{
int ret = OB_SUCCESS;
bool is_matched = false;
const uint64_t tablegroup_id = tablegroup.get_tablegroup_id();
const uint64_t table_id = table.get_table_id();
if (!table.is_sub_part_template()) {
is_matched = false;
LOG_WARN("nontemplate table cannot be in tablegroup", K(tablegroup), K(table));
} else if (!is_new_tablegroup_id(tablegroup_id)) {
is_matched = true;
LOG_WARN("skip to check tablegroup partition", K(tablegroup), K(table));
} else if (tablegroup.get_part_level() != table.get_part_level()) {
LOG_WARN("part level not matched",
K(ret),
KT(tablegroup_id),
KT(table_id),
"tg_part_level",
tablegroup.get_part_level(),
"table_part_level",
table.get_part_level());
} else if (PARTITION_LEVEL_ZERO == tablegroup.get_part_level()) {
is_matched = true;
LOG_INFO("tablegroup & table has no partitions, just pass", K(ret));
} else {
if (PARTITION_LEVEL_ONE == table.get_part_level() || PARTITION_LEVEL_TWO == table.get_part_level()) {
const bool is_subpart = false;
if (OB_FAIL(check_partition_option(tablegroup, table, is_subpart, is_matched))) {
LOG_WARN("level one partition not matched", K(ret), KT(tablegroup_id), KT(table_id));
} else if (!is_matched) {
} else if (!tablegroup.get_binding()) {
} else if (OB_FAIL(set_mapping_pg_part_id(tablegroup, table))) {
LOG_WARN("fail to set mapping pg part id", K(ret), KT(tablegroup_id), KT(table_id));
}
}
if (OB_SUCC(ret) && is_matched && PARTITION_LEVEL_TWO == table.get_part_level()) {
const bool is_subpart = true;
if (OB_FAIL(check_partition_option(tablegroup, table, is_subpart, is_matched))) {
LOG_WARN("level two partition not matched", K(ret), KT(tablegroup_id), KT(table_id));
} else if (!is_matched) {
} else if (!tablegroup.get_binding()) {
} else if (OB_FAIL(set_mapping_pg_sub_part_id(tablegroup, table))) {
LOG_WARN("fail to set mapping pg subpart id", K(ret), KT(tablegroup_id), KT(table_id));
}
}
}
if (OB_SUCC(ret) && !is_matched) {
ret = OB_OP_NOT_ALLOW;
LOG_WARN("partition option not match", K(ret));
LOG_USER_ERROR(OB_OP_NOT_ALLOW, "table and tablegroup use different partition options");
}
return ret;
} |
export function bubbleSort(numbers: number[]) {
const nums = [...numbers];
for (let i = 0; i < nums.length - 1; i++) {
for (let j = 0; j < nums.length - (1 + i); j++) {
if (nums[j]! > nums[j + 1]!) {
const temp = nums[j]!;
nums[j] = nums[j + 1]!;
nums[j + 1] = temp;
}
}
}
return nums;
}
|
STATE RESPONSIBILITY AND VICTIMS REPARATIONS IN INDONESIA: THEORY OF LAW PERSPECTIVE Gross human rights violations are an internationally wrongful act which entails responsibility to the wrongdoer state to conduct reparations. Based on the principle of state responsibility, the said obligation appears because thr wrongdoer state has already breached an international obligation under international law. Indonesia still has the past gross human rights violations cases that were not settled yet, including the reparations issue of its victims. This article will analyse state responsibility theory, lawstate theory, and development law theory as the theory of law to explain legal obligation of state to conduct reparations toward the victims of the said violations. |
package com.baeldung.cachedrequest;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import javax.servlet.ReadListener;
import javax.servlet.ServletInputStream;
public class CachedBodyServletInputStream extends ServletInputStream {
private InputStream cachedBodyInputStream;
public CachedBodyServletInputStream(byte[] cachedBody) {
this.cachedBodyInputStream = new ByteArrayInputStream(cachedBody);
}
@Override
public boolean isFinished() {
try {
return cachedBodyInputStream.available() == 0;
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return false;
}
@Override
public boolean isReady() {
return true;
}
@Override
public void setReadListener(ReadListener readListener) {
throw new UnsupportedOperationException();
}
@Override
public int read() throws IOException {
return cachedBodyInputStream.read();
}
}
|
October 14, 2010 You must visit TV stations to learn what groups paid for campaign ads and even then the trail often runs cold. The system is clearly not made for transparency.
July 27, 2010 The Senate is holding a vote today at 2:45 p.m. on a campaign finance issue designed to "correct" a Supreme Court ruling back in January that reversed a ban on unlimited corporate spending on campaigns. But Democrats may not have the vote. |
<reponame>tim-smart/rpk
export default {
"00-one": {
key: "value",
},
"02-two": {
foo: false,
},
};
|
<reponame>oKermorgant/marine_presenter<gh_stars>1-10
#!/usr/bin/env python3
import evdev
import rclpy
from rclpy.node import Node
from marine_presenter.srv import ButtonPress
from sys import exit
from time import sleep
# code
# 104 KEY_PAGEUP
# 109 KEY_PAGEDOWN
# 48 KEY_B
# value = 1
# find presenter
dev = None
while dev == None:
for fn in evdev.list_devices():
dev = evdev.InputDevice(fn)
if 'Kensington' in dev.name:
break
if 'Kensington' in dev.name:
break
sleep(1)
keys = {}
keys[evdev.ecodes.KEY_PAGEDOWN] = ButtonPress.Request.BUTTON_NEXT
keys[evdev.ecodes.KEY_PAGEUP] = ButtonPress.Request.BUTTON_PREV
keys[evdev.ecodes.KEY_B] = ButtonPress.Request.BUTTON_ALT
class RemoteNode(Node):
def __init__(self):
super().__init__('remote')
self.cli = self.create_client(ButtonPress, 'remote')
while not self.cli.wait_for_service(timeout_sec=1.0):
self.get_logger().info('service not available, waiting again...')
self.req = ButtonPress.Request()
def send_request(self, button):
self.req.button = button
self.future = self.cli.call_async(self.req)
rclpy.init()
remote_client = RemoteNode()
for event in dev.read_loop():
if not rclpy.ok():
break
if event.type == evdev.ecodes.EV_KEY:
print(evdev.categorize(event))
print(event.type)
print(event.value)
print(event.code)
if event.value and event.code in keys:
remote_client.send_request(keys[event.code])
remote_client.destroy_node()
rclpy.shutdown()
|
/**
* Returns the moral graph of this graph. I assume that you know what is a
* moral graph. Otherwise, you are not supposed to use this method :-)
*
* @return the moral graph of this graph.
*/
public final UndirectedGraph<T> computeMoralGraph() {
UndirectedGraph<T> moralGraph = new UndirectedGraph<>();
for (AbstractNode<T> node : this.nodes) {
moralGraph.addNode(node.getContent());
}
for (Edge<T> edge : this.edges) {
moralGraph.addEdge(moralGraph.getNode(edge.getHead().getContent()),
moralGraph.getNode(edge.getTail().getContent()));
}
for (AbstractNode<T> node : this.nodes) {
DirectedNode<T> dNode = (DirectedNode<T>) node;
for (DirectedNode<T> parent1 : dNode.getParents()) {
AbstractNode<T> neighbor1 = moralGraph.getNode(parent1.getContent());
for (DirectedNode<T> parent2 : dNode.getParents()) {
AbstractNode<T> neighbor2 = moralGraph.getNode(parent2.getContent());
if (neighbor1 != neighbor2 && !neighbor1.hasNeighbor(neighbor2)) {
moralGraph.addEdge(neighbor1, neighbor2);
}
}
}
}
return moralGraph;
} |
. Development of posthypoxic and reoxygenation depression of cardiac activity following a time-portioned disconnection of the apparatus for artificial ventilation of the lungs in rats was restricted by a preventive intravenous infusion of a synthetic opioid peptide--dalargin. Resistance to a stressor effect of hypoxia (ischemia-reperfusion) which was assessed by the degree of restoration of the integral index of the blood circulation--cardiac output could be mediated by correction of Ca-homeostasis of cardiomyocytes by means of dalargin. Elimination of all side effects with a blocker of opioid receptors--naloxon points to a possibility of realization of a protective antihypoxic action. |
const x: number = 1;
console.log('This is JavaScript');
|
Layer-by-layer immobilized catalase on electrospun nanofibrous mats protects against oxidative stress induced by hydrogen peroxide. Catalase, a kind of redox enzyme and generally recognized as an efficient agent for protecting cells against hydrogen peroxide (H2O2)-induced cytotoxicity. The immobilization of catalase was accomplished by depositing the positively charged chitosan and the negatively charged catalase on electrospun cellulose nanofibrous mats through electrospining and layer-by-layer (LBL) techniques. The morphology obtained from Field emission scanning electron microscopy (FE-SEM) indicated that more orderly arranged three-dimension (3D) structure and roughness formed with increasing the number of coating bilayers. Besides, the enzyme-immobilized nanofibrous mats were found with high enzyme loading and activity, moreover, X-ray photoelectron spectroscopy (XPS) results further demonstrated the successful immobilization of chitosan and catalase on cellulose nanofibers support. Furthermore, we evaluated the cytotoxicity induced by hydrogen peroxide in the Human umbilical vascular endothelial cells with or without pretreatment of nanofibrous mats by MTT assay, LDH activity and Flow cytometric evaluation, and confirmed the pronounced hydrogen peroxide-induced toxicity, but pretreatment of immobilized catalase reduced the cytotoxicity and protected cells against hydrogen peroxide-induced cytotoxic effects which were further demonstrated by scanning electron microscopy (SEM) and Transmission Electron Microscopy (TEM) images. The data pointed toward a role of catalase-immobilized nanofibrous mats in protecting cells against hydrogen peroxide-induced cellular damage and their potential application in biomedical field. |
Tushar Rae, 30, was charged Monday in an Arapahoe County courtroom with counts of attempted first-degree assault with a deadly weapon causing serious bodily injury; attempted first-degree assault with a deadly weapon; possession of a weapon on school grounds; and carrying a concealed weapon.
ARAPAHOE COUNTY, Colo. – The dean at Aurora West College Preparatory Academy arrested for a third time in two weeks on Friday was formally charged Monday with three felonies and a misdemeanor in regard to gun threats he is accused of making at the school earlier this month.
Once there, Rae allegedly pulled a handgun out and put it on a desk. “You shouldn’t have said what you said. I don’t want to hurt you. I’m going to hurt all the people around you,” he allegedly told Teslolikhina, then threatened to “shoot the kneecaps off” two fellow administrators.
He left the office and allegedly took pictures of different parts of the school and texted them to Teslolikhina, who placed the school on lockdown.
According to his arrest affidavit, Rae admitted to sending text messages that day “that he should not have sent,” but the police documents do not make clear what the content of those messages was.
Rae was arrested later that day at his home in Denver on suspicion of felony menacing and interference with school staff charges. But he posted a $25,000 bond, after which the Aurora Police Department sent officers to the school and the homes of school staff to ensure their safety.
He would be re-arrested the next day in Denver and held on a $200,000 bond on suspicion of felony menacing and false imprisonment charges. The original case was dropped when Rae made his first court appearance April 10 on the latter charges. That case was merged into the case heard in court Monday, according to the district attorney's office.
Rae posted the $200,000 bond in the case after his court appearance that day but was arrested again on Friday on suspicion of felony menacing and false imprisonment charges – charges for which he appeared in court on Sunday and posted a $75,000 bond ahead of Monday’s hearing.
Teslolikhina was placed on administrative leave sometime after the incident, Aurora Public Schools spokesperson Corey Christiansen told Denver7 last week.
In the third case out of Denver, Rae has been ordered by a judge to relinquish his firearms and has seen a protection order issued. His second advisement in that case is set for May 1.
An affidavit for his arrest in the case says Rae threatened the victim in the case with the same gun he is accused of using to make threats at the school. According to the documents, Rae and the victim, whose name is redacted in the documents, came back to Rae's house after a work function. The two were co-workers, the documents say. Rae was "feeling sad for himself," the victim told police, and the victim asked to leave his home.
But Rae allegedly grabbed a handgun, pointed it at her, then allegedly fired on bullet just to the side of the victim. The woman said she "did not report the incident because she didn't want Rae to get in trouble ... and that she didn't want Rae to commit suicide," according to the documents. He had previously discussed suicide with the victim, the police records state.
They also say that the victim stopped by Rae's home again on March 7, and when she again tried to leave, he blocked her from doing so and at one point grabbed her arm and threw her down on a couch. The two argued until the victim called 911, the documents state.
Rae’s preliminary hearing in the Arapahoe County case was set for June 10 after Monday’s hearing. As conditions of his bond, Rae will be monitored via GPS and will have to report to pre-trial services in conjunction with his Denver case. |
Hunting the ghosts of a strictly quantum field: the KleinGordon equation This paper aims to identify and tackle some problems related to teaching quantum field theory (QFT) at university level. In particular, problems arising from the canonical quantization are addressed by focusing on the KleinGordon equation (KGE). After a brief description of the status of the KGE in teaching as it emerges from an analysis of a selected sample of university textbooks, an analysis of the applications of the KGE in contexts different from the QFT is presented. The results of the analysis show that, while in the real case the solutions of the equation can be easily interpreted from a physical point of view, in the complex case the coherence with relativistic quantum mechanics and the electrodynamics framework brings to light interpretative problems related to the classical complex KG field. The comparison between the classical cases investigated and the QFT framework, where the equation finds a coherent particle interpretation, leads to share Ryder's statement asserting that the KG field is a strictly quantum field. Implications of the results in terms of remarks about the canonical procedure currently utilized for teaching are underlined. |
<reponame>cattlepotato/gatk_ca
package org.broadinstitute.hellbender.tools.exome;
import org.broadinstitute.hellbender.CommandLineProgramTest;
import org.broadinstitute.hellbender.cmdline.ExomeStandardArgumentDefinitions;
import org.broadinstitute.hellbender.cmdline.StandardArgumentDefinitions;
import org.testng.Assert;
import org.testng.annotations.Test;
import java.io.File;
import java.util.List;
/**
* Integration test for {@link CallSegments}.
*/
public final class CallSegmentsIntegrationTest extends CommandLineProgramTest{
private static final File TEST_DIR = new File("src/test/resources/org/broadinstitute/hellbender/tools/exome/caller");
private static final File TEST_TARGETS = new File(TEST_DIR, "targets.tsv");
private static final File TEST_SEGMENTS = new File(TEST_DIR, "segments.tsv");
private static final File TEST_SEGMENTS_LEGACY = new File(TEST_DIR, "segments_legacy.tsv");
@Test
public void testCallSegments() {
final File outputFile = createTempFile("test",".txt");
final String[] arguments = {
"-" + ExomeStandardArgumentDefinitions.SEGMENT_FILE_SHORT_NAME, TEST_SEGMENTS.getAbsolutePath(),
"-" + ExomeStandardArgumentDefinitions.TANGENT_NORMALIZED_COUNTS_FILE_SHORT_NAME, TEST_TARGETS.getAbsolutePath(),
"-" + StandardArgumentDefinitions.OUTPUT_SHORT_NAME, outputFile.getAbsolutePath()
};
runCommandLine(arguments);
final List<ModeledSegment> calls = SegmentUtils.readModeledSegmentsFromSegmentFile(outputFile);
Assert.assertEquals(calls.stream().map(ModeledSegment::getCall).toArray(), new String[] {"+", "-", "0", "0"});
}
@Test
public void testCallSegmentsLegacy() {
final File outputFile = createTempFile("test",".txt");
final String[] arguments = {
"-" + ExomeStandardArgumentDefinitions.SEGMENT_FILE_SHORT_NAME, TEST_SEGMENTS_LEGACY.getAbsolutePath(),
"-" + ExomeStandardArgumentDefinitions.TANGENT_NORMALIZED_COUNTS_FILE_SHORT_NAME, TEST_TARGETS.getAbsolutePath(),
"-" + StandardArgumentDefinitions.OUTPUT_SHORT_NAME, outputFile.getAbsolutePath(),
"-" + ExomeStandardArgumentDefinitions.LEGACY_SEG_FILE_SHORT_NAME
};
runCommandLine(arguments);
final List<ModeledSegment> calls = SegmentUtils.readModeledSegmentsFromSegmentFile(outputFile);
Assert.assertEquals(calls.stream().map(ModeledSegment::getCall).toArray(), new String[] {"+", "-", "0", "0"});
}
}
|
<filename>core/models/personagem.py
# coding: utf-8
__author__ = "<NAME>"
from django.db import models
from bot_facebook.models import Jogadores as Jogadores_F
from bot_telegram.models import Jogadores as Jogadores_T
from core.models import Aventura, Cena
class Personagem(models.Model):
GENERO_CHOICES = (
(0, 'Homem'),
(1, 'Mulher'),
(2, 'Outro'),
)
jogadorF = models.ForeignKey(Jogadores_F, verbose_name='Jogador Facebook', on_delete=models.CASCADE, null=True)
jogadorT = models.ForeignKey(Jogadores_T, verbose_name='Jogador Telegram', on_delete=models.CASCADE, null=True)
aventura = models.ForeignKey(Aventura, verbose_name='Aventura', on_delete=models.CASCADE)
cena_atual = models.ForeignKey(Cena, verbose_name='Cena Atual', on_delete=models.SET_NULL, null=True)
nome = models.CharField('Nome', max_length=50)
iniciou = models.DateTimeField('Iniciou', auto_now_add=True)
ultimo_acesso = models.DateTimeField('Ultimo Acesso', auto_now=True)
genero = models.IntegerField('Genero',
choices=GENERO_CHOICES,
default=0, blank=True)
class Meta:
verbose_name = 'Personagem'
verbose_name_plural = 'Personagens'
def __str__(self):
return self.nome
|
Understanding the impact of the impact factor As many readers know, the Journal of Interprofessional Care (JIC) has recently earned its first impact factor, 0.793, from the Journal Citation Reports w compiled by Thomson Reuters. The receipt of an impact factor reflects concerted efforts to petition Thomson Reuters to include a journal in the Journal Citation Reports. According to the Thompson Reuters website, numerous qualitative and quantitative factors are considered when assessing journals for coverage, such as the journals basic publishing standards, its editorial content, the international diversity of its authorship and the citation data associated with it (Thomson Reuters, 2011). The inclusion of this journal in the Journal Citation Reports is an important milestone given the value attributed to the impact factor in academic environments. Although we celebrate JICs past and current editorial team and board members, and its publisher, authors and peer reviewers for the work that has contributed to the journals first impact factor, it is important to recognize the opportunities it provides, but also appreciate its limitations. Below, we discuss some problems with the impact factor and conclude with thoughts about how this factor can play a role in strengthening JIC. An impact factor is the ratio of cited papers to citable papers. Citation counts are gathered from the previous 2 years. Dividing the number of citations (the cited) by the number of citable publications, the impact factor is thus the average number of times papers from a journal published in the past 2 years were cited in the Journal Citation Reports year. The 2010 JIC impact factor of 0.793 means that JIC articles published in 2008 and 2009 were cited 0.793 times in 2010. Journal Citation Reports placed JIC in the Health Care Sciences and Services peer review group and the Health Policy and Services peer review group. In the first group, JICs 2010 impact factor ranked in the 60th position out of 71 peer journals. It ranked below the groups median impact factor, which was 1.635. In the second group, Health Policy and Services, JICs impact factor ranked 44th out of 56 peers and was also below the median 1.414. While at first glance these numbers might seem disappointing, we need to appreciate the limitations of impact factors. Two key issues which we need to consider are: the calculation of the number itself and whether a number can meaningfully reflect the impact of a journal. In relation to the first issue, increasingly, journals are questioning the metrics that underpin the calculation of a journals impact factor. For example, an editorial by PLoS Medicine described the problematic lack of transparency with how Thomson Scientific determines citable article types (PLoS Medicine, 2006). This editorial went on to note that many journals publish a range of materials that are eligible to be included in the Thomson Scientific impact factor, such as letters to the editor. Citing such materials, it argued, can increase a journals impact factor substantially relative to those that do not publish such materials (PLoS Medicine, 2006). In relation to the second issue, one must remember an impact factor does not actually reflect the quality of papers published by a journal. Indeed, an impact factor can be increased by citation activity that may detract from a journals overall reputation. For example, a journal might publish material that generates citations for negative reasons publishing a piece that is unusually controversial, unrepresentative of contemporary peer studies or worthy of criticism for other reasons. Such papers can and do get cited frequently. Editors may also use various strategies to optimize their impact factor, such as publishing particular types of papers that are more frequently cited (e.g. review papers) earlier in the year, and limiting publication types that are less frequently cited. As the PLoS Medicine editors note, though, editors can become consumed with playing the impact factor game. Impact factors are based on the concept of using citations to measure the relative significance of publications. It is based on the assumption that a frequently cited paper implies that the research described in that paper makes more of a contribution to the field than others. Citations toward a journals impact factor only count if the journal the paper is published in is indexed in a Thomson Reuters database like Web of Science, Medline or CINAHL. These large databases index the contents of 500010000 academic journals. Despite an ongoing increase in the Journal of Interprofessional Care, 2012, 26: 23 q 2012 Informa UK, Ltd. ISSN 1356-1820 print/ISSN 1469-9567 online DOI: 10.3109/13561820.2012.639584 |
#include <vector>
using namespace std;
struct ListNode {
int val;
ListNode *next;
ListNode() : val(0), next(nullptr) {}
ListNode(int x) : val(x), next(nullptr) {}
ListNode(int x, ListNode *next) : val(x), next(next) {}
};
class Solution {
public:
static ListNode *mergeTwoLists(ListNode *l1, ListNode *l2) {
auto *l1_current = l1;
auto *l2_current = l2;
vector<ListNode *> sorted;
while (l1_current || l2_current) {
if (!l2_current || l1_current->val < l2_current->val) {
sorted.push_back(l1_current);
l1_current = l1_current->next;
} else {
sorted.push_back(l2_current);
l2_current = l2_current->next;
}
}
if (sorted.empty())
return nullptr;
for (auto it = sorted.begin();; ++it) {
if (it + 1 != sorted.end())
(*it)->next = *(it + 1);
else {
(*it)->next = nullptr;
break;
}
}
return sorted.front();
}
};
int main() {
ListNode *l1 = nullptr;
ListNode *l2 = nullptr;
Solution::mergeTwoLists(l1, l2);
}
|
<gh_stars>0
#pragma once
#ifndef SELECTORPP_HPP
#define SELECTORPP_HPP
#include "PreCodeGenerate.hpp"
#include "NSource.hpp"
#include <cctype>
#include <memory>
using namespace std;
namespace CInform
{
namespace CodeParser
{
class SelectorItem;
using HSelectorItem = std::shared_ptr<SelectorItem>;
class SelectorItem
{
HSelectorItem _next;
public:
string target;
SelectorItem* add( HSelectorItem next );
HSelectorItem next();
SelectorItem( string _target ) : target( _target ), _next( nullptr ) {}
virtual ~SelectorItem() {}
};
class SelectorKind : public SelectorItem
{
public:
SReference kindRef;
SelectorKind( string _target, SReference _kindRef ) : SelectorItem( _target ), kindRef( _kindRef ) {}
};
class SelectorInstance :public SelectorItem
{
public:
SReference instRef;
};
class SelectorAdjetive :public SelectorItem
{
public:
string adjetive;
SelectorAdjetive( string _target, string _adjetive ) : SelectorItem( _target ), adjetive( _adjetive ) {}
};
class SelectorOr :public SelectorItem
{
public:
HSelectorItem sel1;
HSelectorItem sel2;
SelectorOr( string _target, HSelectorItem _sel1, HSelectorItem _sel2 ) : SelectorItem( _target ), sel1( _sel1 ), sel2( _sel2 ) {}
};
class SelectorUnify :public SelectorItem
{
public:
string other;
SelectorUnify( string _target, string _other ) : SelectorItem( _target ), other( _other ) {}
SelectorUnify( string _target, SReference _other ) : SelectorItem( _target ), other( _other.repr() ) {}
SelectorUnify( SReference _target, string _other ) : SelectorItem( _target.repr() ), other( _other ) {}
};
}
}
#endif |
El efecto del consumo de alcohol sobre el trabajo adolescente en Mxico In Mexico one out of four youths age 12 to 17 years old consume alcohol and are working. It is found that alcohol consumption is associated to a higher probability of working at an early age, and labour participation may increase alcohol consumption. We control for biases due to reverse causality and selectivity by using peer influence and emotions as instruments. We find a direct and robust relationship between alcohol consumption and youth employment in the range of 2.07 and 2.34 percentage points. |
Externalities and Spillovers from Sanitation and Waste Management in Urban and Rural Neighborhoods Proper sanitation and waste management has important health benefits, both directly for the household making the decision and indirectly for its neighbors due to positive externalities. Nevertheless, construction and use of improved sanitation systems in much of the developing world continues to lag. Many recent interventions such as Community Led Total Sanitation (CLTS) have attempted to harness the power of social interactions to increase take-up of improved sanitation. Most evidence to date mobilizes social pressure in rural areas, yet evidence is more scarce in urban neighborhoods where high population density may lead to larger externalities from poor sanitation decisions. We review the recent literature on how sanitation decisions are inter-related within neighborhoods: the health externalities that sanitation decisions have on neighbors and the social decision spillovers that drive take-up. We explore potential explanations for the low take-up and maintenance of sanitation systems, including the possibility of non-linearities and thresholds in health externalities; the roles of social pressure, reciprocity, learning from others, and coordination in decision spillovers; and differences between urban and rural contexts. |
<reponame>eirinikos/dispatch
///////////////////////////////////////////////////////////////////////
// Copyright (c) 2017 VMware, Inc. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
///////////////////////////////////////////////////////////////////////
// Code generated by go-swagger; DO NOT EDIT.
package runner
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"io"
"github.com/go-openapi/runtime"
strfmt "github.com/go-openapi/strfmt"
models "github.com/vmware/dispatch/pkg/function-manager/gen/models"
)
// GetRunsReader is a Reader for the GetRuns structure.
type GetRunsReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *GetRunsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGetRunsOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 400:
result := NewGetRunsBadRequest()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewGetRunsNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewGetRunsInternalServerError()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("unknown error", response, response.Code())
}
}
// NewGetRunsOK creates a GetRunsOK with default headers values
func NewGetRunsOK() *GetRunsOK {
return &GetRunsOK{}
}
/*GetRunsOK handles this case with default header values.
List of function runs
*/
type GetRunsOK struct {
Payload []*models.Run
}
func (o *GetRunsOK) Error() string {
return fmt.Sprintf("[GET /runs][%d] getRunsOK %+v", 200, o.Payload)
}
func (o *GetRunsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// response payload
if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetRunsBadRequest creates a GetRunsBadRequest with default headers values
func NewGetRunsBadRequest() *GetRunsBadRequest {
return &GetRunsBadRequest{}
}
/*GetRunsBadRequest handles this case with default header values.
Invalid input
*/
type GetRunsBadRequest struct {
Payload *models.Error
}
func (o *GetRunsBadRequest) Error() string {
return fmt.Sprintf("[GET /runs][%d] getRunsBadRequest %+v", 400, o.Payload)
}
func (o *GetRunsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetRunsNotFound creates a GetRunsNotFound with default headers values
func NewGetRunsNotFound() *GetRunsNotFound {
return &GetRunsNotFound{}
}
/*GetRunsNotFound handles this case with default header values.
Function not found
*/
type GetRunsNotFound struct {
Payload *models.Error
}
func (o *GetRunsNotFound) Error() string {
return fmt.Sprintf("[GET /runs][%d] getRunsNotFound %+v", 404, o.Payload)
}
func (o *GetRunsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetRunsInternalServerError creates a GetRunsInternalServerError with default headers values
func NewGetRunsInternalServerError() *GetRunsInternalServerError {
return &GetRunsInternalServerError{}
}
/*GetRunsInternalServerError handles this case with default header values.
Internal error
*/
type GetRunsInternalServerError struct {
Payload *models.Error
}
func (o *GetRunsInternalServerError) Error() string {
return fmt.Sprintf("[GET /runs][%d] getRunsInternalServerError %+v", 500, o.Payload)
}
func (o *GetRunsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
|
The present invention relates to a developing device for an electrophotographic image forming apparatus and, more particularly, to a developer carrier on which a magnet brush is selectively formed by a developer for developing a latent image electrostatically formed on the surface of a photoconductive element, or image carrier, and representative of a document image.
Electrophotographic image forming apparatuses such as a copier, facsimile transceiver and printer are extensively used today. In an electrophotographic copier, for example, a latent image representative of a document image is electrostatically formed on a photoconductive element and then developed by a toner or similar developer. For example, a two-component developer which is a mixture of toner and carrier forms a magnet brush on the surface of a developer carrier forming a part of a developing device and implemented as a developing roller. The magnet brush is caused into contact with the latent image. Then, the toner contained in the developer is selectively deposited on the latent image on the basis of the potential pattern of the latent image. Usually, a bias for development is applied to the developing roller. A toner image produced by the above procedure is transferred to a paper sheet or similar medium by a transferring device and then fixed on the medium by a fixing device of the type using a heater by way of example.
Assume that a conductive base constituting the photoconductive element is exposed to the outside due to scratches or similar defects formed in the surface of the photoconductive element. Then, the magnet brush deposited on the developing roller makes contact with the exposed base of the photoconductive element and thereby causes the bias being applied to the roller to leak, resulting in defective reproductions.
Providing an insulating layer on the surface of the developing roller is an approach proposed in the past for eliminating the above problem. Although this kind of approach is successful in eliminating the leak of the bias, it brings about another problem since the insulating layer is charged due to the friction thereof with the developer. Specifically, a color electronic copier or similar image forming apparatus usually has a developing device which is made up of two or more developing units. In this type of apparatus, while one of the developing units is in operation, the others are held in an inoperative condition. Therefore, a prerequisite is that the magnet brush be formed only on the developing roller of the operative developing unit and not on the developing rollers of the inoperative developing units. However, once the insulating layer provided on the developing roller for the above purpose is charged due to its friction with the developer, the developer is electrostatically deposited on the charged insulated layer. As a result, the magnet brush is unwantedly formed on the developing rollers of the inoperative developing units. For this reason, it has been customary to simply replace the defective photoconductive element or to repair it in place of adopting the insulating layer scheme. |
from collections import Counter, Iterable
from cantoolz.stream.processor import Processor
class Subnet(Processor):
def __init__(self, device_builder: callable):
self._devices = dict()
self._device_builder = device_builder
def process(self, message) -> Iterable:
stream = str(message) + ":" + str(len(message))
if stream not in self._devices:
self._devices[stream] = self._device_builder(stream)
yield from self._devices[stream].process(message) |
<reponame>AlvaWang/CarMedia
package com.media.car.service.impl.User;
import org.mybatis.spring.support.SqlSessionDaoSupport;
/**
* Created by Administrator on 2016/12/20.
*/
public class UserLoginServiceImpl extends SqlSessionDaoSupport {
}
|
package org.sakaiproject.api.pojos.login;
import org.sakaiproject.api.pojos.Time;
import java.util.Map;
/**
* Created by vspallas on 09/02/16.
*/
public class UserData {
private Long createdDate;
private Time createdTime;
private String displayId;
private String displayName;
private String eid;
private String email;
private String firstName;
private String id;
private long lastModified;
private String lastName;
private Long modifiedDate;
private Time modifiedTime;
private String owner;
private String password;
private Map<String, String> props;
private String reference;
private String sortName;
private String type;
private String url;
private String entityReference;
private String entityURL;
private String entityId;
private String entityTitle;
public Long getCreatedDate() {
return createdDate;
}
public void setCreatedDate(Long createdDate) {
this.createdDate = createdDate;
}
public Time getCreatedTime() {
return createdTime;
}
public void setCreatedTime(Time createdTime) {
this.createdTime = createdTime;
}
public String getDisplayId() {
return displayId;
}
public void setDisplayId(String displayId) {
this.displayId = displayId;
}
public String getDisplayName() {
return displayName;
}
public void setDisplayName(String displayName) {
this.displayName = displayName;
}
public String getEid() {
return eid;
}
public void setEid(String eid) {
this.eid = eid;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public long getLastModified() {
return lastModified;
}
public void setLastModified(long lastModified) {
this.lastModified = lastModified;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public Long getModifiedDate() {
return modifiedDate;
}
public void setModifiedDate(Long modifiedDate) {
this.modifiedDate = modifiedDate;
}
public Time getModifiedTime() {
return modifiedTime;
}
public void setModifiedTime(Time modifiedTime) {
this.modifiedTime = modifiedTime;
}
public String getOwner() {
return owner;
}
public void setOwner(String owner) {
this.owner = owner;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public Map<String, String> getProps() {
return props;
}
public void setProps(Map<String, String> props) {
this.props = props;
}
public String getReference() {
return reference;
}
public void setReference(String reference) {
this.reference = reference;
}
public String getSortName() {
return sortName;
}
public void setSortName(String sortName) {
this.sortName = sortName;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getEntityReference() {
return entityReference;
}
public void setEntityReference(String entityReference) {
this.entityReference = entityReference;
}
public String getEntityURL() {
return entityURL;
}
public void setEntityURL(String entityURL) {
this.entityURL = entityURL;
}
public String getEntityId() {
return entityId;
}
public void setEntityId(String entityId) {
this.entityId = entityId;
}
public String getEntityTitle() {
return entityTitle;
}
public void setEntityTitle(String entityTitle) {
this.entityTitle = entityTitle;
}
}
|
<filename>neutron/services/logapi/logging_plugin.py
# Copyright (c) 2017 Fujitsu Limited
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from neutron_lib.api.definitions import logging
from neutron_lib.callbacks import events
from neutron_lib.callbacks import registry
from neutron_lib.callbacks import resources
from neutron_lib.db import api as db_api
from neutron_lib.services.logapi import constants as log_const
from neutron.db import db_base_plugin_common
from neutron.extensions import logging as log_ext
from neutron.objects import base as base_obj
from neutron.objects.logapi import logging_resource as log_object
from neutron.services.logapi.common import db_api as log_db_api
from neutron.services.logapi.common import exceptions as log_exc
from neutron.services.logapi.common import validators
from neutron.services.logapi.drivers import manager as driver_mgr
@registry.has_registry_receivers
class LoggingPlugin(log_ext.LoggingPluginBase):
"""Implementation of the Neutron logging api plugin."""
supported_extension_aliases = [logging.ALIAS]
__native_pagination_support = True
__native_sorting_support = True
__filter_validation_support = True
def __init__(self):
super(LoggingPlugin, self).__init__()
self.driver_manager = driver_mgr.LoggingServiceDriverManager()
self.validator_mgr = validators.ResourceValidateRequest.get_instance()
@property
def supported_logging_types(self):
# supported_logging_types are be dynamically loaded from log_drivers
return self.driver_manager.supported_logging_types
def _clean_logs(self, context, sg_id=None, port_id=None):
with db_api.CONTEXT_WRITER.using(context):
sg_logs = log_db_api.get_logs_bound_sg(
context, sg_id=sg_id, port_id=port_id, exclusive=True)
for log in sg_logs:
self.delete_log(context, log['id'])
@registry.receives(resources.SECURITY_GROUP, [events.AFTER_DELETE])
def _clean_logs_by_resource_id(self, resource, event, trigger, payload):
# log.resource_id == SG
self._clean_logs(payload.context.elevated(), sg_id=payload.resource_id)
@registry.receives(resources.PORT, [events.AFTER_DELETE])
def _clean_logs_by_target_id(self, resource, event, trigger, payload):
# log.target_id == port
self._clean_logs(payload.context.elevated(),
port_id=payload.resource_id)
@db_base_plugin_common.filter_fields
@db_base_plugin_common.convert_result_to_dict
def get_logs(self, context, filters=None, fields=None, sorts=None,
limit=None, marker=None, page_reverse=False):
"""Return information for available log objects"""
filters = filters or {}
pager = base_obj.Pager(sorts, limit, page_reverse, marker)
return log_object.Log.get_objects(context, _pager=pager, **filters)
def _get_log(self, context, log_id):
"""Return the log object or raise if not found"""
log_obj = log_object.Log.get_object(context, id=log_id)
if not log_obj:
raise log_exc.LogResourceNotFound(log_id=log_id)
return log_obj
@db_base_plugin_common.filter_fields
@db_base_plugin_common.convert_result_to_dict
def get_log(self, context, log_id, fields=None):
return self._get_log(context, log_id)
@db_base_plugin_common.convert_result_to_dict
def create_log(self, context, log):
"""Create a log object"""
log_data = log['log']
self.validator_mgr.validate_request(context, log_data)
with db_api.CONTEXT_WRITER.using(context):
# body 'log' contains both tenant_id and project_id
# but only latter needs to be used to create Log object.
# We need to remove redundant keyword.
log_data.pop('tenant_id', None)
log_obj = log_object.Log(context=context, **log_data)
log_obj.create()
if log_obj.enabled:
self.driver_manager.call(
log_const.CREATE_LOG_PRECOMMIT, context, log_obj)
if log_obj.enabled:
self.driver_manager.call(
log_const.CREATE_LOG, context, log_obj)
return log_obj
@db_base_plugin_common.convert_result_to_dict
def update_log(self, context, log_id, log):
"""Update information for the specified log object"""
log_data = log['log']
with db_api.CONTEXT_WRITER.using(context):
log_obj = log_object.Log(context, id=log_id)
log_obj.update_fields(log_data, reset_changes=True)
log_obj.update()
need_notify = 'enabled' in log_data
if need_notify:
self.driver_manager.call(
log_const.UPDATE_LOG_PRECOMMIT, context, log_obj)
if need_notify:
self.driver_manager.call(
log_const.UPDATE_LOG, context, log_obj)
return log_obj
def delete_log(self, context, log_id):
"""Delete the specified log object"""
with db_api.CONTEXT_WRITER.using(context):
log_obj = self._get_log(context, log_id)
log_obj.delete()
self.driver_manager.call(
log_const.DELETE_LOG_PRECOMMIT, context, log_obj)
self.driver_manager.call(
log_const.DELETE_LOG, context, log_obj)
def get_loggable_resources(self, context, filters=None, fields=None,
sorts=None, limit=None,
marker=None, page_reverse=False):
"""Get supported logging types"""
return [{'type': type_}
for type_ in self.supported_logging_types]
|
. The characteristic features of the clinical and functional indicators in the early stages are outlined. The impression is that the subjective feelings are being overlapped and objectified by the neurologic status. A considerable number of non-specific reactions with a tendency for generalization are established. It is presumed that in the latent period, the functional changes in the nervous system forerun those in the clinical course and blood. Emphasis is laid on the significance of the astheno-vegetative syndrome and some neurological signs for the early diagnosis. |
MACHO observations of LMC red giants: Mira and semi-regular pulsators, and contact and semi-detached binaries The MACHO data base has been used to examine light curves of all red giant stars brighter than Mbol rv -2 in a 0.5 0 x0.5 0 area of the LMC bar. Periods, often multiple, have been searched for in all stars found to be variable. Five distinct period-luminosity sequences have been found on the low mass (M ~ 2.25M0 ) giant branch. Comparison of observed periods, luminosities and period ratios with theoretical models identifies Miras unambiguously as radial fundamental mode pulsators, while semi-regular variables can be pulsating in the 1st, 2nd or 3rd overtone, or even the fundamental. All these variables lie on just 3 of the 5 distinct sequences, and they all appear to be on the AGB. The fourth sequence contains red giants on the first giant branch (FGB) or at the red end of the core-helium burning loops of intermediate mass stars (M ~ 2.25M0 ). The light curves of these stars strongly suggest that they are contact binaries, and they make up rvO.5% of stars within 1 mag. of the FGB tip. Stars on the fifth sequence show semiregular, eclipse-like light curves. The light curves and periods of these stars suggest that they are in semi-detached binaries, transfering mass to an invisible companion via a stellar wind or Roche lobe overflow. They make up rv25% of AGB stars. If the existence of these red giant contact and semi-detached binaries is confirmed, then extant theories of binary star evolution will require substantial modification. IMount Stromlo and Siding Spring Observatories, Australian National University. 2Center for Particle Astrophysics, University of California, Berkeley. 3Supercomputing Facility, Australian National University. 4Department of Physics, University of California, Davis. 5Lawrence Livermore National Laboratory. 6Departments of Astronomy and Physics, University of Washington. 7Department of Physics, University of Notre Dame. 8Department of Physics, University of California, San Diego. 9Department of Physics, University of Sheffield. lODepartamento de Astronomia, P. Universidad Cat6lica, Santiago. 11 Center for Space Research, MIT. 12European Southern Observatory. 13Department of Physics, University of Oxford. 14Department of Physics and Astronomy, McMaster University. |
<gh_stars>0
/*
Copyright 2018 Caicloud Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package api
import (
"bytes"
"context"
"encoding/json"
"fmt"
"html/template"
"io/ioutil"
"os"
"path/filepath"
"strconv"
"strings"
"github.com/caicloud/nirvana"
"github.com/caicloud/nirvana/cmd/nirvana/buildutils"
"github.com/caicloud/nirvana/definition"
"github.com/caicloud/nirvana/log"
"github.com/caicloud/nirvana/service"
"github.com/caicloud/nirvana/utils/generators/swagger"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
)
const mimeHTML = "text/html"
func init() {
err := service.RegisterProducer(service.NewSimpleSerializer("text/html"))
if err != nil {
log.Fatalln(err)
}
}
func newAPICommand() *cobra.Command {
options := &apiOptions{}
cmd := &cobra.Command{
Use: "api /path/to/apis",
Short: "Generate API documents for your project",
Long: options.Manuals(),
Run: func(cmd *cobra.Command, args []string) {
if err := options.Validate(cmd, args); err != nil {
log.Fatalln(err)
}
if err := options.Run(cmd, args); err != nil {
log.Fatalln(err)
}
},
}
options.Install(cmd.PersistentFlags())
return cmd
}
type apiOptions struct {
Serve string
Output string
}
func (o *apiOptions) Install(flags *pflag.FlagSet) {
flags.StringVar(&o.Serve, "serve", "127.0.0.1:8080", "Start a server to host api docs")
flags.StringVar(&o.Output, "output", "", "Directory to output api specifications")
}
func (o *apiOptions) Validate(cmd *cobra.Command, args []string) error {
return nil
}
func (o *apiOptions) Run(cmd *cobra.Command, args []string) error {
if len(args) <= 0 {
defaultAPIsPath := "pkg/apis"
args = append(args, defaultAPIsPath)
log.Infof("No packages are specified, defaults to %s", defaultAPIsPath)
}
config, definitions, err := buildutils.Build(args...)
if err != nil {
return err
}
log.Infof("Project root directory is %s", config.Root)
generator := swagger.NewDefaultGenerator(config, definitions)
swaggers, err := generator.Generate()
if err != nil {
return err
}
files := map[string][]byte{}
for _, s := range swaggers {
data, err := json.MarshalIndent(s, "", " ")
if err != nil {
return err
}
files[s.Info.Version] = data
}
if o.Output != "" {
if err = o.write(files); err != nil {
return err
}
}
if o.Serve != "" {
err = o.serve(files)
}
return err
}
func (o *apiOptions) write(apis map[string][]byte) error {
dir := o.Output
dir, err := filepath.Abs(dir)
if err != nil {
return err
}
if err := os.MkdirAll(dir, 0775); err != nil {
return err
}
for version, data := range apis {
file := filepath.Join(dir, o.pathForVersion(version))
if err := ioutil.WriteFile(file, data, 0664); err != nil {
return err
}
}
log.Infof("Generated openapi schemes to %s", dir)
return nil
}
func (o *apiOptions) serve(apis map[string][]byte) error {
hosts := strings.Split(o.Serve, ":")
ip := strings.TrimSpace(hosts[0])
if ip == "" {
ip = "127.0.0.1"
}
port := uint16(8080)
if len(hosts) >= 2 {
p := strings.TrimSpace(hosts[1])
if p != "" {
pt, err := strconv.Atoi(p)
if err != nil {
return err
}
port = uint16(pt)
}
}
log.SetDefaultLogger(log.NewStdLogger(0))
cfg := nirvana.NewDefaultConfig()
versions := []string{}
for v, data := range apis {
versions = append(versions, v)
cfg.Configure(nirvana.Descriptor(
o.descriptorForData(o.pathForVersion(v), data, definition.MIMEJSON),
))
}
data, err := o.indexData(versions)
if err != nil {
return err
}
cfg.Configure(
nirvana.Descriptor(o.descriptorForData("/", data, mimeHTML)),
nirvana.IP(ip),
nirvana.Port(port),
)
log.Infof("Listening on %s:%d. Please open your browser to view api docs", cfg.IP(), cfg.Port())
return nirvana.NewServer(cfg).Serve()
}
func (o *apiOptions) descriptorForData(path string, data []byte, ct string) definition.Descriptor {
return definition.Descriptor{
Path: path,
Definitions: []definition.Definition{
{
Method: definition.Get,
Consumes: []string{definition.MIMENone},
Produces: []string{ct},
Function: func(context.Context) ([]byte, error) {
return data, nil
},
Parameters: []definition.Parameter{},
Results: definition.DataErrorResults(""),
},
},
}
}
func (o *apiOptions) pathForVersion(version string) string {
return fmt.Sprintf("/api.%s.json", version)
}
func (o *apiOptions) indexData(versions []string) ([]byte, error) {
index := `
{{ $total := len .}}
{{ $multipleVersions := gt $total 1 }}
<!DOCTYPE html>
<html>
<head>
<title>ReDoc Demo: Multiple apis</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
margin: 0;
{{ if $multipleVersions -}}
padding: 50px 0 0 0;
{{ end -}}
}
{{ if $multipleVersions -}}
.topnav {
position: fixed;
top: 0px;
width: 100%;
height: 50px;
box-sizing: border-box;
z-index: 10;
display: flex;
-webkit-box-align: center;
align-items: center;
font-family: Lato;
background: white;
border-bottom: 1px solid rgb(204, 204, 204);
padding: 5px;
}
.topnav-item {
float: left;
display: block;
font-size: 15px;
line-height: 1.5;
height: 34px;
text-align: center;
padding-top: 15px;
padding-left: 25px;
padding-right: 25px;
margin-right: 1px;
color: #555555;
background-color: #fafafa;
cursor: pointer;
}
.topnav-img {
height: 40px;
width: 124px;
display: inline-block;
margin-right: 90px;
}
{{ end -}}
</style>
</head>
<body>
{{ if $multipleVersions -}}
<!-- Top navigation placeholder -->
<nav class="topnav">
<img class="topnav-img" src="https://github.com/Rebilly/ReDoc/raw/master/docs/images/redoc-logo.png">
<ul id="links_container">
</ul>
</nav>
{{ end }}
<redoc scroll-y-offset="body > nav"></redoc>
<script src="https://rebilly.github.io/ReDoc/releases/v1.x.x/redoc.min.js"> </script>
<script>
// list of APIS
var apis = [
{{ range $i, $v := . }}
{
name: '{{ $v.Name }}',
url: '{{ $v.Path }}'
},
{{ end }}
];
// initially render first API
Redoc.init(apis[0].url, {
suppressWarnings: true
});
{{ if $multipleVersions -}}
function onClick() {
var url = this.getAttribute('data-link');
Redoc.init(url, {
suppressWarnings: true
});
}
// dynamically building navigation items
var $list = document.getElementById('links_container');
apis.forEach(function(api) {
var $listitem = document.createElement('li');
$listitem.setAttribute('data-link', api.url);
$listitem.setAttribute('class', "topnav-item");
$listitem.innerText = api.name;
$listitem.addEventListener('click', onClick);
$list.appendChild($listitem);
});
{{ end }}
</script>
</body>
</html>
`
tmpl, err := template.New("index.html").Parse(index)
if err != nil {
return nil, err
}
data := []struct {
Name string
Path string
}{}
for _, v := range versions {
path := o.pathForVersion(v)
data = append(data, struct {
Name string
Path string
}{v, path})
}
buf := bytes.NewBuffer(nil)
if err := tmpl.Execute(buf, data); err != nil {
return nil, err
}
return buf.Bytes(), nil
}
func (o *apiOptions) Manuals() string {
return ""
}
|
A presentation manager based on application semantics We describe a system for associating the user interface entities of an application with their underlying semantic objects. The associations are classified by arranging the user interface entities in a type lattice in an object-oriented fashion. The interactive behavior of the application is described by defining application operations in terms of methods on the types in the type lattice. This scheme replaces the usual active region interaction model, and allows application interfaces to be specified directly in terms of the objects of the application itself. We discuss the benefits of this system and some of the difficulties we encountered. |
Interactions between peptides containing nucleobase amino acids and T7 phages displaying S. cerevisiae proteins. The importance of high-throughput analyses of protein abundances and functions is interestingly increasing in genomic/proteomic studies. In such postgenome sequencing era, a protein-detecting chip, in which a large number of molecules specifically capturing target proteins (capturing agents) such as antibodies, recombinant proteins, and small molecules are arrayed onto solid, wet, or semi-wet substrates, enables comprehensive analysis of proteomes by a single experiment. However, whole proteomes are generally complicated for comprehensive analyses so that alternative approaches to subproteome analysis categorized by protein functions and binding properties (focused proteome) would be effective. Approaching the goal of development of designed peptide chip for protein analysis, diversity increases in peptide structures and validation of target proteins are needed. We herein describe design and synthesis of nucleobase amino acid (NBA)-containing peptides, selection of nucleic acid-related proteins derived from S. cerevisiae, and detection of interactions between NBA-containing peptides and T7 phages displaying proteins by both enzyme-linked immunosorbent assays (ELISA) and label-free anomalous reflection of gold (AR) measurements. Twenty-eight phage clones were obtained by the phage-display method and sequenced. Ten of 28 clones were expected to be nucleic acid-related proteins including initiation factor, TYB protein, ribosomal proteins, elongation factor, ATP synthase subunit, GTP-binding protein, and ribonuclease. Other phage clones encoded several classes of enzymes such as reductase, oxidase, aldolase, metalloprotease, and hexokinase. Both ELISA and AR measurements suggested that the methodology of in vitro selection for recognition of the NBA-containing peptide presented in this study was successfully established. Such a combination of NBA and phage display technologies would be potential to efficiently confirm valuable target proteins binding specifically to capturing agents, to be arrayed onto solid surfaces to develop the designed peptide chip. |
New research spotlights what the continent’s believers (and those worldwide) are missing.
Want to learn from an African Christian leader? There’s Augustine, Cyprian, and many other African theologians from the church’s first centuries. But you’re unlikely to find a living author in your library or bookstore.
Now, a new study, polling more than 8,000 Christians in four languages across three countries, has found that African Christians aren’t reading African Christians, either.
In the Africa Leadership Study, a quarter of Central Africans, a third of Angolans, and half of Kenyans named a preacher or pastor as their favorite author. Majorities in Angola and Kenya named authors whose writings were explicitly Christian. High percentages also named African writers.
However, “overlap between the two was low, with relatively few respondents identifying favorite authors [who] were both African and Christian,” said Robert Priest, a professor of international studies at Trinity Evangelical Divinity School, who presented the findings to the American Society of Missiology.
The lack of prominent indigenous authors was also evidenced by the library holdings of five major Christian higher education institutions in Kenya, where only one African Christian (John Mbiti) ranked among the top 15 authors with the largest presence on the shelves. Kenyan Christian bookstores had a significantly different top 15, but only one African author (Dag Heward-Mills) cracked their lists. Other commercial booksellers and street vendors didn’t have any African Christian authors among their top 15.
October 2014, Vol. 58, No. 8, Pg 22, "Africans Don’t Read African Christians" |
Synthesis of the angiotensin converting enzyme inhibitor (-)-A58365A via an isomnchnone cycloaddition reaction. The angiotensin converting enzyme inhibitor (-)-A58365A was synthesized by a process based on the -cycloaddition reaction of a phenylsulfonyl-substituted isomnchnone intermediate. The starting material for this process was prepared from L-pyroglutamic acid and involved using a diazo-phenylsulfonyl-substituted pyrrolidine imide. Treatment of the diazoimide with Rh2(OAc)4 in the presence of methyl vinyl ketone afforded a 3-hydroxy-2-pyridone derivative which was subsequently converted to the ACE inhibitor in six additional steps. |
def response_big_image(self, text, image_id, title, description, button=None, **kwargs):
return self._response(
Response(
text,
card=Card.big_image(image_id, title, description, button),
**kwargs,
)
) |
Study on the interactions between melamine-cored Schiff bases with cucurbiturils of different sizes and its application in detecting silver ions Three different complexes, TMeQ-TBT, Q-TBT, and Q-TBT are constructed by three different cucurbiturils and synthesized by guest melamine-cored Schiff bases (TBT) through outer-surface interaction and hostguest interactions. TBT forms a TMeQ-TBT complex with TMeQ through outer-surface interaction, while Q-TBT and Q-TBT form complexes with Q through hostguest interactions. Among them, Q-TBT is selected as a UV detector for the detection of silver ions (Ag+). This work makes full use of the characteristics of each cucurbituril and melamine-cored Schiff base to construct a series of complexes and these are applied to metal detection. Introduction Schiff bases are usually synthesized by the condensation of amines and active carbonyl compounds, endowing them both nitrogen and oxygen donor atoms. Schiff bases are not only easy to coordinate with various transition metal ions to yield different metal-organic frameworks, but also can be used as analytical reagents for the detection of different organic and inorganic substances. Among the various central molecules for the synthesis of Schiff bases, melamine (2,4,6-triamino-s-triazine) has attracted much attention due to its threebranched structure and excellent physical and chemical properties, which is commonly used in many applications including plastic dishes, the main raw material for formaldehyde resin, etc.. Cucurbiturils (Qs, Scheme 1), a kind of supramolecular compound, are formed by polymerization of glycoluril, which Scheme 1: The Structures of Q, Q, TMeQ, and TBT. contains rigid cavities for the study of host-guest chemistry and carbonyl groups for the study of coordination chemistry. For the special methyl cucurbiturils with abundant methyl groups, its high density of the electropositivity can be a perfect candidate for the study of outer-surface interaction of cucurbiturils. In this work, nitrogen-rich melamine is used as the center molecule to synthesize the Schiff base 2,4,6-tris(((4-(4-carboxybutyl)phenyl)methylene)amino)-1,3,5-triazine (TBT) through the Schiff base reaction and the nucleophilic reaction of haloalkane (Scheme 1 and Supporting Information File 1, Scheme S1). In addition to retaining the abundant coordination sites of Schiff bases, TBT is also modified with carbon chains of appropriate length for inducing host-guest interactions and with carboxyl groups for inducing the outer-surface interactions. Then three kinds of cucurbiturils including tetramethylcucurbit uril (TMeQ ), Q, and Q are chosen as the hosts for TBT. Due to the small cavity size and the higher density of the positive charge of TMeQ, TBT naturally interacts with the exposed methyl group on the outer surface through outer-surface interaction rather than entering its cavity. The cavity of Q is very suitable for TBT, so Q tightly binds with the branches of TBT through host-guest interactions. While Q forms a supermolecule polymer with TBT due to its larger cavity. Since Q and TBT form a host-guest complex, the carboxyl group at the end of TBT and the carbonyl group of the Q still have a strong ability to coordinate with metals. Therefore, Q-TBT is selected for the detection of silver ions (Ag + ). Results and Discussion The outer-surface interaction of TMeQ -TBT To investigate the outer-surface interaction between TMeQ and TBT, 1 H NMR titration is used. As shown in Figure 1, with the addition of TMeQ, the proton signals are shifted accordingly. For example, the signals of both H a, H b, and H c are shifted downfield, while the signals of H d, H e, and H f remain unchanged in the presence of TMeQ. Therefore, it can be preliminarily inferred that the interaction between TMeQ and TBT is mainly driven by the outer-surface interaction of the carboxylic carbon chain of TBT and the methyl or hydrogen of TMeQ on its outer surface. In addition, when using UV-vis spectroscopy ( Figure S5 and Supporting Information File 1, Figure S6) to investigate their interaction, it's found that the presence of TMeQ does not affect the absorbance of TBT, indicating that TMeQ prefers to interact with TBT through outer-surface interaction than the host-guest interaction between the benzene ring or the melamine group of TBT. The host-guest interaction of Q-TBT Using the same method of 1 H NMR titration as above. The interaction between Q and TBT is studied and is proved to be different from that of TMeQ. It is found that their interaction is the classical host-guest interaction instead of the outer-surface interaction because of the larger cavity of Q. As shown in Figure 2, the proton signals of the entire TBT are shifted upfield with the increasing amount of Q. For example, the signals of H a shifted from = 1.88 ppm to 1.64 ppm, H b from = 2.32 ppm to 2.25 ppm, H c from = 3.97 ppm to 3.34 ppm, H d from = 6.88 ppm to 5.87 ppm, H e from = 7.68 ppm to 7.06 ppm and H f from = 9.52 ppm to 9.29 ppm. Naturally, it can be inferred that Q binds with the entire branches of TBT with strong host-guest interaction. In addition, we also used the UV-vis spectrum to verify the above inference and to further investigate their molar ratio in detail. Q has a larger cavity than TMeQ, giving it the ability to bind TBT. Therefore, the absorbance of TBT gradually decreases and redshifts in the presence of Q (Figure 3), which is mainly due to the - * and n- * transition caused by the hydrophobic effect of the Q cavity. Meanwhile, the absorbance of TBT is gradually approaching the saturation state, when the amount of Q reaches 3 times that of TBT. Therefore, it can be inferred that Q binds with the three "arms" of TBT at a molar ratio of 3:1 (N Q /N TBT = 3:1) and forms a host-guest complex Q-TBT. In addition, the ITC experiment also strongly supports the above results, which data can be fitted to a very suitable curve using the model of sequential three site (Supporting Information File 1, Figure S7), and the corresponding binding ability (K a ) is 1.422 10 6 M −1. The host-guest interaction of Q-TBT Since Q has a larger cavity than Q, it can bind the entire TBT molecule like Q. However, in the 1 H NMR titration experiment (Supporting Information File 1, Figure S8), it is found that upon the addition of Q, the chemical shift value of TBT did not change significantly. As the concentration of Q continues to increase, the proton signals of TBT start to weaken, while the proton signals of Q have not been detected during the whole experiment. In addition, the UV-vis spectrum in Figure 4a shows that the absorbance of TBT keeps on the decrease (A = 0.623) without red shift or blue shift in the presence of Q. Both of the above phenomena show that Q interacted with the "arm" of TBT and produced precipitation due to aggregation, which is also the reason why the proton signals and absorbance of TBT in the 1 H NMR and UV-vis spectra greatly declines. Then SEM and dynamic light scattering (DLS) are used for in-depth research of Q-TBT complex. As shown in Figure 4b, compared with TBT (5.35 nm), the particle size of Q-TBT is greatly increased to 3726.58 nm. At the same time, SEM (Supporting Information File 1, Figure S10) has also detected a large number of massive Q-TBT complexes. Detection of Ag + based on Q-TBT The guest molecule TBT contains three carboxyl groups and a wealth of lone-pair electrons, so it has a high coordination ability to metals. In this study, Q-TBT was selected as a UV detector to detect common metals. As shown in Figure 5, the additional Ag + increases the absorbance of the Q-TBT complex from 0.441 to 0.555 at max = 258 nm, while other metal ions do not increase or decrease the absorbance significantly at this wavelength, so Q-TBT has a higher selectivity to Ag + among metals. In addition, in the anti-interference experiment, Q -TBT also has a good performance in the detection of silver ions in the presence of other common metals. To further explore the detection limit (DL) and detection mechanism of Q-TBT towards Ag +, a UV-vis titration experiment was carried out. As shown in Figure 6, with the continuous addition of Ag +, the absorbance of Q-TBT continues to increase at max = 258 nm, which is caused by the n- * transition of Q-TBT. Therefore, it can be further inferred that Ag + mainly binds with the carboxyl group of TBT. In addition, the DL is calculated to be 3.91 10 −6 M, which perfectly fits with the formula y = −0.01 + 0.0182x, R 2 = 0.997. Conclusion Three different complexes, TMeQ |
OS-PC: Combining Feature Representation and 3-D Phase Correlation for Subpixel Optical and SAR Image Registration Phase correlation (PC), an efficient frequency-domain registration method, has been extensively used in remote sensing images owing to its subpixel accuracy and robustness to image contrast, noise, and occlusions. However, its performance becomes poor when applied to the registration between optical and synthetic aperture radar (SAR) images, which are two typical multisensor images. Inspired by the recently proposed feature-based methods, we present a novel subpixel registration method that combines robust feature representations of optical and SAR images and the 3-D PC (OS-PC). The robust feature representations, which capture the inherent property of the two images and retain their structural information, form two dense image cubes. The 3-D PC utilizes the image cubes as a substitute of two raw images to estimate 2-D translations, either by locating peak in the spatial domain or by directly working in the Fourier domain. Furthermore, we investigate two techniques to improve the accuracy of the 3-D PC both in the spatial domain and Fourier domain: the first is the constrained energy minimization method to seek the Dirac delta function after 3-D inverse Fourier transform and the second is the fast sample consensus fitting to estimate phase difference after high-order singular value decomposition of the PC matrix. Experiments with both simulated and satellite optical-to-SAR pairs were carried out to test the proposed method. Compared with state-of-the-art PC methods and optical-to-SAR registration methods, the proposed method presents a superior performance in both accuracy and robustness. Moreover, we verify the adaptability of the proposed method. |
Billy Chandler
Background
Chandler graduated from Dry Prong High School and attended Louisiana College in Pineville. A 24-year member of the Grant Parish School Board, Chandler and his wife, Marcia F. Chandler (born October 28, 1938), have three children and three grandchildren. He is a retired state manager of the Woodmen of the World Insurance Company. He is a deacon at the First Baptist Church of Dry Prong. In addition to his previous school board tenure, Chandler served for four years as a Dry Prong alderman.
Election of 2006
Chandler succeeded fellow Democrat Thomas D. "Tommy" Wright of Jena, the seat of La Salle Parish, who had resigned earlier in 2006. Chandler as a Democrat defeated Republican Tony Kevin Owens (born June 22, 1960), who had relocated to Jena from Winnfield. Chandler received 5,034 votes (54 percent) to Owens' 4,234 votes (46 percent).
On April 1, 2006, five Democrats and four Republicans competed in the first round of balloting for Wright's former seat. The Democrats polled a combined 57 percent of the vote to the GOP candidates' 43 percent. The top candidates were Owens, with 1,858 (18 percent) and Chandler, with 1,574 (16 percent). In the runoff, Owens doubled his votes, but Chandler tripled his share of the tabulation.
District 22 was created in 1972, with Democrat Richard S. Thompson of Colfax as its first representative. The district frequently votes Republican in races for U.S. president, governor, or U.S. senator but had always sent a Democrat to the state legislature, with the exception of 1992-1996, when it was represented by the Independent Stephen L. Gunn of Montgomery, also in Grant Parish. Gunn did not seek a second term, and Thomas Wright was elected to succeed him.
Owens had also lost to Wright in the 2003 general election. The seat became vacant when Wright resigned as part of a plea bargain involving a misdemeanor obscenity charge at Lake Buhlow in Pineville.
Chandler's victory was made possible by his strong showing as the favorite son in Grant Parish. Chandler told the Alexandria Daily Town Talk, the largest newspaper in central Louisiana, in a victory statement on election night that he would "represent all parties, wherever they may be, all communities in the district, for one common good, to advance meeting the needs in this district. The constituents have plainly made [it clear] that they haven't been pleased in the past with [Wright's representation]."
Then Louisiana Democratic Party Chairman Chris Whittington hailed Chandler's victory. "As a Democrat, Billy Chandler displays the moral values that we all share: helping the less fortunate, providing for our families and caring for our seniors. He will fight hard in Baton Rouge to provide better schools for our children, create good-paying jobs for our working men and women, and secure retirement benefits for our seniors," Whittington said.
Election of 2007
Chandler was elected to a full term in the legislature in the nonpartisan blanket primary held on October 20, 2007. Then a Democrat, he defeated Ernie Vallery, a Democratic attorney and LSU and Tulane Law School graduate (born 1954) from Pollock in Grant Parish, and the Republican Brandon Carnell Vickers (born 1972) of Jena. Chandler polled 9,855 votes (64 percent) to 1,719 (11 percent) for Vallery and 3,768 (25 percent) for Vickers. |
Asset management information system for higher education Asset management is the process of recording, collecting data, reporting and documenting assets at a specific time based on existing provisions, proper asset management can support operational activities especially in the maintenance, repair, and procurement of assets for the organization. This study aims to design an asset management information system for the process of managing asset data and integrated asset depreciation calculation methods for universities. The methodology used in this research is Scrum, which can accommodate changes during the system design process, by taking samples based on the business process of asset management in one of the private universities. This study produced a web-based asset management information system prototype that can assist in managing asset data and calculating asset value depreciation. Introduction The progress of technology both Information Technology and Information Systems (IT & IS) from time to time has a significant impact on the process of activities of an organization, where IT & IS has become an organization's needs. In carrying out its activities, an organization is supported by essential assets that must be maintained and managed correctly. Assets are economic resources that are controlled or owned by an organization that provides benefits and can be measured by units of money. Asset management is the process of recording, data collection, reporting, and documentation of assets at specific times according to existing provisions. For the asset management process to be carried out efficiently, there must be a system that can help the asset management process. Asset Management Information System (AMIS) is a management information system that collects inventory assets for all organizational bodies to ensure an orderly administration of administration and data collection of goods. Implementing an asset management information system is an effort to order documents relating to data collection on the existence of assets and asset management processes. Higher education is one of the highest educational institutions in Indonesia, with the main business processes of education, research, and community services. With the development and utilization of IT & IS, demanding higher education to be able to manage the potential of all resources by utilizing IT & IS effectively and efficiently to face competition. Higher education has essential assets that must be managed well and regularly so as not to interfere with the business processes that are carried out, especially activities that use assets. Several previous studies have developed asset management information systems with various types of organizations, among others, focusing on computer lab assets, recording the status of computer repairs, loans and asset returns, and asset data collection with asset life. The results of the study can only be used by research objects and cannot be implemented by other organizations, and only one study uses depreciation in the calculation of assets. The focus of this study in addition to collecting incoming asset data, also calculating depreciation of assets, and information systems created can be used by other organizations with a customized organizational profile, by taking a sample of cases at a higher education institution in the West Java region, where asset management at the institution is not appropriately managed, both in asset data recording, procurement time, and asset value calculation. Methodology In this study, the method used in software development techniques based on the Scrum method, which based on user input used by the software development team to provide products that meet user expectations. Scrum is a repetitive workflow methodology that has an innovative and accessible product development approach. Scrum starts with making product guarantees, registering features or capabilities, and prioritizing the features that were needed. Data Retrieval: This stage is carried out to identify components related to research by conducting observations and study of documents used in the process of AMIS design activities Product Backlog: Contains a list of all the features, functions, needs, enhancements, and improvements that are the changes that will make to the product in future releases. In this study, the product backlog feature is created and compiled by the product owner. Sprint: At this sprint stage, there will be further analysis of the product backlog stage by developing a backlog of items produced in the previous step. Scrum Meeting: At this stage of the Scrum meeting, it is to discuss the sprint results that will be evaluated at this stage, to meet the application requirements. Scrum Review: This stage is carried out by all Scrum teams to review completed sprint activities to improve their performance in the next sprint. Results and discussion A: The cost of acquiring assets is the number of expenses incurred by the company to obtain assets until the assets are ready to operate; S: Estimated residual value of assets, namely the estimated amount that may be obtained through assets that have passed their usage period D: Depreciation expense for each period n: Age of benefits / economic life of assets in years Product backlog At this stage, the team led by Scrum Master determines the main features of the product to be developed according to the needs of the product owner. Table 1 shows the detail of the product backlog of the product developed by estimating the time agreed on by the Development Team. 1 Login This module is used for user authentication processes and determines user access rights. This module equipped with a session to monitor activities carried out by the user so that if there is no activity within a specified period, the system will log out automatically and give a warning. Sprint This stage is the stage of product design by involving the Product Owner and the team, to provide understanding to the Product Owner, a model is made in the form of diagrams that represent the product prototype. In Figure 3, the AMIS System Use Case produced is based on the product backlog and needs to agree upon between the Team and the Product Owner. Scrum review After evaluating through the Scrum meeting, the next step is a scrum review, which again involves the Product Owner as a user to assess each product deposit that has been agreed upon previously. Figure 4-7 is a display of AMIS that has been completed and approved by the Product Owner. In figure 4 is the AMIS start page where on this page the verification will be carried out according to the user's access level, while in Figure 5 and Figure 6 is the user dashboard display with a different login access level. Figure 7 is the implementation of the formula with the results of the asset depreciation report. The implementation results are adjusted to the useful life according to the rules of the Decree of the Minister of Finance of the Republic of Indonesia Number: 59 / KMK.6 / 2013, the regulation regulates the classification of asset types and periods determined based on the type of asset. The system created can accommodate asset depreciation calculations based on that regulation by completing the collection of assets in and out, This system uses a web platform for easy access without depending on the operating system used, and makes it easy to configure client-server based systems. Conclusions This research resulted in the Management Information System Assets (AMIS) which were built using Scrum which had the advantage of being able to accommodate very rapid changes based on user needs by involving product owners during system development. AMIS can provide asset depreciation calculations with provisions determined by the government in determining the useful life; besides that, AMIS can be used for other organizations with an institutional data change module equipped. |
Analysis of Correctable Errors in the IBM 3380 Disk File A method of analyzing the correctable errors in disk files is presented. It allows one to infer the most probable error in the encoded-data stream given only the unencoded readback and error-correction information. This method is applied to the errors observed in seven months of operation of four IBM 3380 head-disk assemblies. It is shown that nearly all the observed errors can be explained as single-bit errors at the input to the channel decoder. About 90 percent of the errors were related to imperfections in the disk surfaces. The remaining 10 percent were mostly due to heads which were unusually susceptible to random noise-induced errors. |
There are plenty of apps for beaming music to a Chromecast these days, but one of the most popular music services is still lagging behind. Yes, Spotify. Well, you don't have to wait for the official app to get with the times now that Spoticast is available and ready to stream.
Using Spoticast is a little less straightforward than other Chromecast apps. You have to connect Spoticast to your Chromecast, then wait for Spotify to launch. Everything you play in Spotify will be casted, but you need to open Spoticast again to make any changes to your Chromecast connection. This only works if you have Device Broadcast Status enabled in the Spotify app. You'll also need to have a premium Spotify account.
It looks like the app is imitating a valid Spotify audio receiver, then implementing the Cast API to route the audio to the Chromecast. Neat, right? This is definitely a little hacky, so it might be broken by future Spotify updates. It's a free app, so there's no harm in giving it a shot. |
def check_valid_ext(self, ext):
import fitsio
ext = self._update_ext(ext)
if ext not in self:
raise ValueError("Invalid ext={} for file {} (does not exist)".format(
ext, self.file_name))
if not isinstance(self.file[ext], fitsio.hdu.TableHDU):
raise ValueError("Invalid ext={} for file {} (Not a TableHDU)".format(
ext, self.file_name)) |
from DHP.Utils.cursor import cursor
from DHP.context import warn, color
from DHP.Utils.logger import logger
def login():
try:
while True:
id1 = input("Enter Your ID: ")
password = input("Enter Your Password: ")
auth = False
QUERY = """SELECT * FROM UserData WHERE user_id=%s AND user_password=%s"""
VAL = (id1, password)
cursor.execute(QUERY, VAL)
if len(cursor.fetchall()) == 1:
auth = True
if auth is True:
print(color("Successfully Logged in!!"))
logger.info(f"User {id1} has Logged In!")
return id1
if auth is False:
warn("You Credentials Are Wrong!\nTRY AGAIN")
chance = input("Do you want leave login page? [y] [n] : ")
if chance == "y":
return None
else:
print("Invalid option! continuing login process....")
except Exception as e:
logger.exception("login loop error \n", e)
logger.exception(e)
except KeyboardInterrupt:
logger.warning("login - Loop closed due to Keyboard interrupt Error")
|
import * as React from 'react';
import Tippy, { TippyProps } from '@tippyjs/react';
import { Box, BoxProps } from '@stacks/ui';
export const Tooltip: React.FC<
TippyProps & { label: TippyProps['content']; labelProps?: BoxProps }
> = ({ label, labelProps = {}, 'aria-label': ariaLabel = label, ...rest }: any) => {
return (
<Tippy
content={
<Box as="span" display="block" {...labelProps}>
{label}
</Box>
}
trigger="mouseenter"
hideOnClick={undefined}
{...rest}
/>
);
};
|
The Hermeneutical Significance of Chapter Divisions in Ancient Gospel Manuscripts The study commences with the five major ways of dividing the gospels in Christian history, after which the focus falls on the hermeneutical significance of the Old Greek Divisions. The most defining characteristic of the Divisions is their tendency to demarcate chapters on the basis of the miracles and parables of Jesus. In lieu of miracles or parables, major units of Jesus' teaching also determine Old Greek Divisions. The Synoptic passion narratives, and particularly Matthew's, display the greatest precision and organization among the Divisions. Titles of divisions aided in locating specific passages, identified corresponding material in the gospels by the same title, and when read or memorized in sequence offered an overview of the gospel narratives. |
An Analysis of Code-Mixing in Talk-show Bukan Empat Mata Program The paper examines the phenomena of using code-mixing on TV program, particularly in the talk-show Bukan Empat Mata within a multilingual communities, such as Indonesia. It looks at the different languages used in spoken and written forms. The purposes of this paper are to elaborate the theory, factors, types and the using of code-mixing. Key words : Code mixing |
#!/usr/bin/env python
#
# Copyright 2020 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
"""Unit tests for ZMQ SUB Message Source block"""
import time
import zmq
from gnuradio import gr, gr_unittest, blocks, zeromq
import pmt
class qa_zeromq_sub_msg_source(gr_unittest.TestCase):
"""Unit tests for ZMQ SUB Message Source block"""
def setUp(self):
addr = 'tcp://127.0.0.1'
self.context = zmq.Context()
self.zmq_sock = self.context.socket(zmq.PUB)
port = self.zmq_sock.bind_to_random_port(addr)
self.zeromq_sub_msg_source = zeromq.sub_msg_source(
('%s:%s' % (addr, port)), 100)
self.message_debug = blocks.message_debug()
self.tb = gr.top_block()
self.tb.msg_connect(
(self.zeromq_sub_msg_source, 'out'), (self.message_debug, 'store'))
self.tb.start()
time.sleep(0.1)
def tearDown(self):
self.tb.stop()
self.tb.wait()
self.zeromq_sub_msg_source = None
self.message_debug = None
self.tb = None
self.zmq_sock.close()
self.context.term()
def test_valid_pmt(self):
"""Test receiving of valid PMT messages"""
msg = pmt.to_pmt('test_valid_pmt')
self.zmq_sock.send(pmt.serialize_str(msg))
for _ in range(10):
if self.message_debug.num_messages() > 0:
break
time.sleep(0.2)
self.assertEqual(1, self.message_debug.num_messages())
self.assertTrue(pmt.equal(msg, self.message_debug.get_message(0)))
def test_invalid_pmt(self):
"""Test receiving of invalid PMT messages"""
self.zmq_sock.send_string('test_invalid_pmt')
time.sleep(0.1)
self.assertEqual(0, self.message_debug.num_messages())
if __name__ == '__main__':
gr_unittest.run(qa_zeromq_sub_msg_source)
|
Halogen ions and NO+ in the mass spectra of aerosols in the upper troposphere and lower stratosphere Mass spectra of individual aerosol particles were acquired at altitudes up to 19 km during the WB57 Aerosol Mission. Fluorine and chlorine were more abundant in tropospheric aerosols than in stratospheric aerosols. Chlorine in tropospheric aerosols was often associated with organics, soot, and mineral dust. Small amounts of perchlorate were observed in stratospheric sulfate aerosols, but aerosols do not represent a significant sink for total fluorine or chlorine in the lower stratosphere. Bromine was most common in aerosols just above the tropopause, where it may represent a significant fraction of inorganic Br. Both bromine and iodine were highly correlated with organics and probably were present in particles with Hg. The OH− and NO+ peak areas increased at temperatures below 195 K, providing evidence for the uptake of H2O and HNO3 by aerosols near a cold tropopause. There was evidence for uptake of chlorine but not the other halogens below 190 K. |
//#####################################################################
// Copyright 2004-2009, <NAME>, <NAME>, <NAME>, <NAME>.
// This file is part of PhysBAM whose distribution is governed by the license contained in the accompanying file PHYSBAM_COPYRIGHT.txt.
//#####################################################################
// Class OPENGL_COMPONENT_RIGID_GEOMETRY_COLLECTION_2D
//#####################################################################
#ifndef __OPENGL_COMPONENT_RIGID_GEOMETRY_COLLECTION_2D__
#define __OPENGL_COMPONENT_RIGID_GEOMETRY_COLLECTION_2D__
#include <PhysBAM_Tools/Arrays/ARRAY.h>
#include <PhysBAM_Tools/Data_Structures/PAIR.h>
#include <PhysBAM_Geometry/Solids_Geometry/RIGID_GEOMETRY_COLLECTION.h>
#include <PhysBAM_Rendering/PhysBAM_OpenGL/OpenGL/OPENGL_SELECTION.h>
#include <PhysBAM_Rendering/PhysBAM_OpenGL/OpenGL/OPENGL_VECTOR_FIELD_2D.h>
#include <PhysBAM_Rendering/PhysBAM_OpenGL/OpenGL_Components/OPENGL_COMPONENT.h>
namespace PhysBAM{
template<class T> class OPENGL_SEGMENTED_CURVE_2D;
template<class T> class OPENGL_TRIANGULATED_AREA;
template<class T> class OPENGL_LEVELSET_2D;
template<class T> class OPENGL_AXES;
template<class T,class RW=T>
class OPENGL_COMPONENT_RIGID_GEOMETRY_COLLECTION_2D : public OPENGL_COMPONENT
{
protected:
typedef VECTOR<T,2> TV;
std::string basedir;
int frame_loaded;
bool valid;
bool show_object_names;
bool output_positions;
bool draw_velocity_vectors;
bool draw_individual_axes;
bool draw_node_velocity_vectors;
bool draw_segmented_curve;
bool draw_triangulated_area;
bool draw_implicit_curve;
bool has_init_destroy_information;
ARRAY<int> needs_init,needs_destroy;
public:
RIGID_GEOMETRY_COLLECTION<TV>* rigid_geometry_collection;
ARRAY<int> colors;
protected:
ARRAY<OPENGL_SEGMENTED_CURVE_2D<T>*,int> opengl_segmented_curve;
ARRAY<OPENGL_TRIANGULATED_AREA<T>*,int> opengl_triangulated_area;
ARRAY<OPENGL_LEVELSET_2D<T>*,int> opengl_levelset;
ARRAY<ARRAY<OPENGL_COMPONENT*>,int> extra_components;
ARRAY<OPENGL_AXES<T>*,int> opengl_axes;
ARRAY<bool,int> draw_object;
ARRAY<bool,int> use_object_bounding_box;
ARRAY<VECTOR<T,2> > positions;
ARRAY<VECTOR<T,2> > velocity_vectors;
ARRAY<VECTOR<T,2> > node_positions;
ARRAY<VECTOR<T,2> > node_velocity_vectors;
OPENGL_VECTOR_FIELD_2D<ARRAY<TV> > velocity_field;
OPENGL_VECTOR_FIELD_2D<ARRAY<TV> > node_velocity_field;
OPENGL_SELECTION* current_selection;
bool need_destroy_rigid_geometry_collection;
public:
OPENGL_COMPONENT_RIGID_GEOMETRY_COLLECTION_2D(RIGID_GEOMETRY_PARTICLES<TV>* particles_input,const std::string& basedir);
OPENGL_COMPONENT_RIGID_GEOMETRY_COLLECTION_2D(RIGID_GEOMETRY_COLLECTION<TV>& rigid_geometry_collection,const std::string& basedir);
~OPENGL_COMPONENT_RIGID_GEOMETRY_COLLECTION_2D();
bool Valid_Frame(int frame_input) const PHYSBAM_OVERRIDE;
void Set_Frame(int frame_input) PHYSBAM_OVERRIDE;
void Set_Draw(bool draw_input = true) PHYSBAM_OVERRIDE;
void Display(const int in_color=1) const PHYSBAM_OVERRIDE;
bool Use_Bounding_Box() const PHYSBAM_OVERRIDE;
virtual RANGE<VECTOR<float,3> > Bounding_Box() const PHYSBAM_OVERRIDE;
virtual OPENGL_SELECTION *Get_Selection(GLuint *buffer, int buffer_size);
void Highlight_Selection(OPENGL_SELECTION *selection) PHYSBAM_OVERRIDE;
void Clear_Highlight() PHYSBAM_OVERRIDE;
void Print_Selection_Info(std::ostream &output_stream, OPENGL_SELECTION *selection) const PHYSBAM_OVERRIDE;
void Read_Hints(const std::string& filename);
void Set_Draw_Object(int i, bool draw_it); // Need to call Reinitialize after changing draw objects
bool Get_Draw_Object(int i) const;
void Set_Object_Color(int i, const OPENGL_COLOR &color);
void Set_Use_Object_Bounding_Box(int i, bool use_it);
void Set_Vector_Size(double size);
void Toggle_Velocity_Vectors();
void Toggle_Individual_Axes();
void Toggle_Output_Positions();
void Toggle_Show_Object_Names();
void Toggle_Node_Velocity_Vectors();
void Toggle_Draw_Mode();
void Increase_Vector_Size();
void Decrease_Vector_Size();
DEFINE_COMPONENT_CALLBACK(OPENGL_COMPONENT_RIGID_GEOMETRY_COLLECTION_2D, Toggle_Velocity_Vectors, "Toggle velocity vectors");
DEFINE_COMPONENT_CALLBACK(OPENGL_COMPONENT_RIGID_GEOMETRY_COLLECTION_2D, Toggle_Individual_Axes, "Toggle individual axes");
DEFINE_COMPONENT_CALLBACK(OPENGL_COMPONENT_RIGID_GEOMETRY_COLLECTION_2D, Toggle_Output_Positions, "Toggle output positions");
DEFINE_COMPONENT_CALLBACK(OPENGL_COMPONENT_RIGID_GEOMETRY_COLLECTION_2D, Toggle_Show_Object_Names, "Toggle show object names");
DEFINE_COMPONENT_CALLBACK(OPENGL_COMPONENT_RIGID_GEOMETRY_COLLECTION_2D, Toggle_Node_Velocity_Vectors, "Toggle node velocity vectors");
DEFINE_COMPONENT_CALLBACK(OPENGL_COMPONENT_RIGID_GEOMETRY_COLLECTION_2D, Toggle_Draw_Mode, "Toggle draw mode");
DEFINE_COMPONENT_CALLBACK(OPENGL_COMPONENT_RIGID_GEOMETRY_COLLECTION_2D, Increase_Vector_Size, "Increase vector size");
DEFINE_COMPONENT_CALLBACK(OPENGL_COMPONENT_RIGID_GEOMETRY_COLLECTION_2D, Decrease_Vector_Size, "Decrease vector size");
public:
virtual void Reinitialize(const bool force=false,const bool read_geometry=true); // Needs to be called after some state changes
protected:
void Set_Draw_Mode(const int mode);
int Get_Draw_Mode() const;
void Create_Geometry(const int id);
void Update_Geometry(const int id);
void Destroy_Geometry(const int id);
virtual void Update_Object_Labels();
};
template<class T>
class OPENGL_SELECTION_COMPONENT_RIGID_GEOMETRY_COLLECTION_2D : public OPENGL_SELECTION
{
public:
int body_id;
OPENGL_SELECTION *body_selection;
OPENGL_SELECTION_COMPONENT_RIGID_GEOMETRY_COLLECTION_2D(OPENGL_OBJECT *object,const int body_id,OPENGL_SELECTION* body_selection)
:OPENGL_SELECTION(OPENGL_SELECTION::COMPONENT_RIGID_BODIES_2D,object),body_id(body_id),body_selection(body_selection)
{}
virtual OPENGL_SELECTION::TYPE Actual_Type() const
{return body_selection->Actual_Type();}
virtual RANGE<VECTOR<float,3> > Bounding_Box() const PHYSBAM_OVERRIDE;
};
}
#endif
|
/*
* This data object represents a single turn for a single pirate.
*/
public class Plan implements Serializable
{
private static final long serialVersionUID = -59384977547432959L;
/*
* The turn number of the plan (1-MAX_TURNS).
*/
private int turn;
/*
* The number of steps of rest that this plan bleeds over into the next
* turn.
*/
private int carryOverRests;
/*
* Holds the name of the pirate this plan applies to
*/
private String pirateName;
/*
* Data that holds the orders assigned in this plan
*/
private Order[] orders;
/*
* Tells whether the plan has been submitted and accepted by the server
*/
private boolean locked = false;
/*
* Generates an unplanned plan. Used for initializing plan histories.
*/
public static Plan createUnplannedPlan(int turn)
{
return expandAndBuildPlan(turn, "", Order.UNPLANNED, Order.UNPLANNED, Order.UNPLANNED, Order.UNPLANNED,
Order.UNPLANNED, Order.UNPLANNED);
}
/*
* Builds a plan out of the given set of orders. The orders do not include
* mandatory rests. Rests are expanded before the plan is validated. If the
* plan is not valid, returns null. This method does not guarantee that the
* plan is valid given the current game state, only that it is generally
* valid under no assumptions.
*/
// TODO: it is the server's job to determine illegal actions based on
// character state and validate plans against these conditions. The client
// should be warned and asked to resubmit their plan in any case where the
// pre-resolution plan is invalid. This is for security reasons. In other
// words, if somebody is trying to cheat, the server should recognize this.
public static Plan expandAndBuildPlan(int turn, String pirateName, Order... orders)
{
ArrayList<Order> expandedPlan = new ArrayList<>();
for (Order order : orders)
{
expandedPlan.add(order);
for (int i = 0; i < order.getRests(); i++)
expandedPlan.add(Order.REST);
}
return buildPlan(turn, pirateName, expandedPlan);
}
/*
* Builds a new plan out of orders that already include mandatory rests.
* Same as expandAndBuildPlan, but with the rests already included.
*/
public static Plan buildPlan(int turn, String pirateName, List<Order> expandedPlan)
{
if (expandedPlan.size() < 6)
return null;
int carryOverRests = 0;
while (expandedPlan.size() > 6)
{
Order lastElement = expandedPlan.get(expandedPlan.size() - 1);
if (lastElement == Order.REST)
{
expandedPlan.remove(expandedPlan.size() - 1);
carryOverRests++;
}
else
return null;
}
Order[] builtPlan = new Order[6];
for (int i = 0; i < expandedPlan.size(); i++)
builtPlan[i] = expandedPlan.get(i);
return new Plan(turn, pirateName, builtPlan, turn == Engine.MAX_TURNS ? 0 : carryOverRests);
}
private Plan(int turn, String pirateName, Order[] orders, int carryOverRests)
{
this.turn = turn;
this.orders = orders;
this.pirateName = pirateName;
this.carryOverRests = carryOverRests;
}
@Override
public String toString()
{
StringBuilder sb = new StringBuilder("Turn " + turn + ": | ");
for (Order order : orders)
sb.append(order.getAbbreviation()).append(" | ");
return sb.append("+ " + carryOverRests).toString();
}
public String getPirateName()
{
return pirateName;
}
public int getCarryOverRests()
{
return carryOverRests;
}
public void addCarryOverRest()
{
carryOverRests++;
}
public void resetCarryOverRests()
{
carryOverRests = 0;
}
public int getTurn()
{
return turn;
}
public Order[] getOrders()
{
return orders;
}
public void lock()
{
locked = true;
}
public boolean isLocked()
{
return locked;
}
} |
<reponame>natemc/qiss<gh_stars>1-10
#include <detect.h>
|
Rep. Marsha Blackburn (R-Tenn.) said she was "appaled [sic]" that the EPA administrator was unaware of the spending.
The EPA has offered $30,000 in prize money for videos on environmental issues in the past few years, but the contests have a pair of Congressional chafing over what they call wasteful spending--and they've entered the contest themselves to fight it.
Furthermore, Rep. Marsha Blackburn (R-Tenn.) said in a statement that she was "appaled [sic]" that the EPA administrator Lisa Jackson told Congress in a hearing she was unaware of the spending.
So Blackburn and Rep. Pete Olson (R-Texas) submitted their own video to one of the contests, touting citizen participation in the regulatory process. The video is shot in the U.S. Capitol and plugged on Blackburn's Congressional website.
If the video--mostly a series of statements by the two politicians--wins the EPA "Rulemaking Matters!" contest, the pair promise to return the prize money to the U.S. Treasury.
"Congressman Blackburn's office has identified six separate video contests initated [sic] since 2009 offering prizes of more than $30,000," her office said in a press release.
"In the great scheme of things, $30,000 may not seem like much, but Congress trusts that the executive agencies will be good stewards of every taxpayer dollar. Clearly Administrator Jackson is not," Blackburn said in the release. "To claim ignorance of one small contest and it's [sic] $2,500 prize is one thing; but to be ignorant of six contests involving tens of thousands of taxpayer dollars is negligence pure and simple. Her agency is throwing money away hand over fist and I am appaled [sic] that she is ignorant of it."
"Since neither Administrator Jackson or the President have responded to my request to end this wasteful spending, I have only one immediate recourse; enter the contest, win it, and return the prize money to the treasury myself. I am greatful [sic] that my friend and colleague, Pete Olson, has joined me in this important project."
Their video submission directs viewers to www.regulations.gov, where they can participate in Executive Branch rulemaking processes. The pair decry "silly over-regulation" and say that an early version of a carbon production rule would have affected even large churches.
It's a one-stop shop for all things influenza.
"Based on the city's size, location, and amount of critical infrastructure, it is an important part of the nation's fight on terrorism," said Dave Owen, CEO of ICOP Digital.
Around $65 million worth of marketable fish is thrown back into the North Sea every year from Scottish vessels.
If only there were some enormous, centralized clearinghouse of public information, with answers to questions and descriptions of what out federal and state governments are doing!
Both sides must agree to a spending bill by March 4 to avoid a government shutdown. |
Netflix spent a bundle on “The Get Down” — its most expensive series ever — and so far Baz Luhrmann’s epic ’70s hip-hop drama hasn’t come close to being as popular as several of the company’s other recent originals, according to third-party research.
While Netflix has steadfastly refused to release data about its shows, other providers have sprung up to try to estimate viewership of and buzz about its original productions. The initial results for “The Get Down” indicate that the show has not been a big hit, a likely disappointment for the streamer given that it cost at least $120 million to produce, as Variety reported in July.
The first six episodes of the 12-part “Get Down” premiered Aug. 12. According to Symphony Advanced Media, “The Get Down” in the first 31 days of release garnered 3.2 million total viewers among U.S. adults 18-49, with an average audience rating in the demo of 2.33.
That’s less than half the audience of several other Netflix originals over the same 31-day time frame after premiere. “Orange Is The New Black” season 4, for example, had 15.56 million 18-49 viewers in that window (with a rating of 11.25), followed by “Fuller House” (15.23 million, 11.01), “Stranger Things” (13.23 million, 9.56), “Making a Murderer” (12.28 million, 8.87) and “Marvel’s Daredevil” season 2 (8.18 million, 5.92), per SymphonyAM.
Related Inside the Troubled Production of Baz Luhrmann’s ‘The Get Down,’ Netflix’s Most Expensive Series Yet
Another data provider, Parrot Analytics, tracks demand for TV shows as an indicator of intent to view. Among U.S. consumers, the company measured 22.2 million total “demand expressions” for “The Get Down” in the week following its release. That put it at No. 6 for Aug. 14-20 for all TV shows, behind “Game of Thrones” (43.7 million), “Stranger Things” (38.9 million), “Mr. Robot” (33.6 million), “Preacher” (23.9 million), and “The Walking Dead” (23.1 million).
But the buzz for “Get Down” quickly died down, falling 40% in the second week and 21% and 30%, respectively, over the next two weeks, to 7.46 million demand expressions for the week of Sept. 4-10 (trailing “Stranger Things,” “Narcos” and “OITNB” among digital originals), according to Parrot Analytics.
Netflix didn’t respond to a request for comment on the data for “The Get Down,” which was produced by Sony Pictures Television. But company execs have routinely dismissed estimates about video viewing on its platform as inaccurate. In addition, Netflix measures the performance of titles over the entire lifespan of their run on the service, not just in the first few weeks after it debuts. And it’s also worth noting that the data from SymphonyAM and Parrot Analytics covers just the U.S., and Netflix is streaming “Get Down” worldwide.
Meanwhile, critics have been mixed on the show. “The Get Down” has a 74% critics score on Rotten Tomatoes, compared with 95% for “Stranger Things” and 96% for “Orange Is the New Black.” “‘Get Down’ is a beautiful mess, a flawed show interspersed with moments of remarkable brilliance,” Variety‘s Sonia Saraiya wrote in her review.
To collect its data, SymphonyAM uses audio-code recognition software that passively measures viewing habits of a panel of more than 15,000 people. Parrot Analytics measures hundreds of billions of data points across multiple platforms, weighting them based on relevance, including YouTube and other video services, social networks like Facebook, Instagram and Tumblr, fan and critic rating sites, and file-sharing piracy services.
Daniel Holloway contributed to this report. |
#########################################################
# 2020-01-28 17:43:32
# AI
# ins: XCH A, Rn
#########################################################
import random
from .. import testutil as u
from ..asmconst import *
p = u.create_test()
def test_rs(rs, psw_rs, p):
p += ";; set rs"
p += atl.move(SFR_PSW, atl.I(psw_rs))
return ""
def test_rn(RN, p):
a = random.getrandbits(8)
value = random.getrandbits(8)
p += atl.move(SFR_A, atl.I(a))
p += atl.move(atl.D(RN.addr), atl.I(value))
p += f'XCH A, {RN}'
p += atl.aste(SFR_A, atl.I(value))
p += atl.aste(atl.D(RN.addr), atl.I(a))
return ""
for x in range(64):
p.iter_rn(test_rs, test_rn)
|
/** Creates an assumption with an associated declaration (perhaps in a
* different file), adding it to 'currentStatements' */
public JmlStatementExpr addAssume(
DiagnosticPosition pos,
Label label,
JCExpression translatedExpr,
@Nullable DiagnosticPosition associatedPosition,
@Nullable JavaFileObject associatedSource,
@Nullable JCExpression info,
Object ... args) {
JmlStatementExpr stt = null;
if ((infer || esc)) {
if (label != Label.ASSUME_CHECK && currentStatements != null
&& Strings.feasibilityContains(Strings.feas_debug,context)) {
addAssumeCheck(translatedExpr,currentStatements,"Extra-Assume");
}
JmlStatementExpr st = treeutils.makeAssume(pos,label,translatedExpr);
st.source = log.currentSourceFile();
st.associatedPos = associatedPosition == null ? Position.NOPOS : associatedPosition.getPreferredPosition();
st.associatedSource = associatedSource;
st.optionalExpression = info;
st.id = Strings.assumePrefix + (++assertCount);
if (currentStatements != null) currentStatements.add(st);
else classDefs.add(st);
stt = st;
if (label != Label.ASSUME_CHECK && currentStatements != null
&& Strings.feasibilityContains(Strings.feas_debug,context)) {
addAssumeCheck(translatedExpr,currentStatements,"Extra-Assume");
}
}
if (rac && racCheckAssumeStatements) {
stt = addAssert(true,pos,label,translatedExpr,associatedPosition,associatedSource,info,args);
}
return stt;
} |
Hezbollah's missiles were capable of striking "every part" of the self-proclaimed Jewish state.
Hezbollah leader Hassan Nasrallah has said that his group possesses types of weapons that Israel "could not imagine."
"The resistance in Lebanon has all imaginable types of weapons," Nasrallah told the private Al-Mayadeen news channel in a Tuesday interview.
"We have weapons the enemy can't even conceive of," he asserted.
Nasrallah had previously warned Israel against exploiting the ongoing civil war in Syria – in which Hezbollah is involved – to strike Lebanon.
He also said that Hezbollah's missiles were capable of striking "every part" of the self-proclaimed Jewish state.
Last month, the local press quoted a Hezbollah source as saying that the Shiite group had detained a high-ranking group member – named Mohamed Shurba – who had been working for Israel's Mossad intelligence agency since 2007.
War erupted between Hezbollah and Israel in the summer of 2006. The conflict lasted 34 days, during which Hezbollah targeted major Israeli cities, including Acre and Haifa, causing significant material damage.
More than a thousand Lebanese were killed in the conflict, while much of southern Lebanon – a Hezbollah stronghold – was devastated by the Israeli onslaught. |
Increasing chemotherapy dose density and intensity: phase I trials in non-small cell lung cancer and non-Hodgkin's lymphoma. Dose densification and dose escalation of cytotoxic chemotherapy may be important in improving the cure rates of chemotherapy-responsive cancers. We conducted two phase I studies, in non-small cell lung cancer (NSCLC) and in lymphoma, to explore the possibility of intensifying chemotherapy by compressing the delivery of and escalating the dose of standard combination chemotherapy. One study used etoposide and cisplatin chemotherapy in patients with unresectable stage III or IV NSCLC, intensifying chemotherapy by reducing the cycle length. The second study used cyclophosphamide, doxorubicin, vincristine, and prednisone, CHOP chemotherapy, in the treatment of stage II-IV intermediate or immunoblastic high-grade lymphoma, intensifying chemotherapy first by reducing the cycle length and then by escalating the dosages of cyclophosphamide and doxorubicin. Filgrastim support was used during dose intensification. Fifty-five patients with NSCLC and 49 with non-Hodgkin's lymphoma (NHL) were enrolled and treated in successive cohorts. At standard dosages and intervals of chemotherapy, filgrastim support resulted in incidences of grade 3 and 4 neutropenia that were between 62% and 77% lower than those in the no-filgrastim control; the mean duration of neutropenia was, likewise, more than 80% lower. Absolute neutrophil counts were >/=2 x 10/l at day 14 in virtually 100% of patients receiving filgrastim. In the NSCLC trial, etoposide and cisplatin were intensified by >50%, and in the lymphoma trial, cyclophosphamide was intensified by 270% and doxorubicin was intensified by 87%. Chemotherapy reductions or delays for neutropenia were rare in the groups receiving filgrastim; but at higher chemotherapy intensities, dose-limiting thrombocytopenia was encountered. We conclude that the delivery of myelosuppressive chemotherapy in both a dose-intense and a dose-dense manner is feasible with filgrastim support. |
President Trump's chief economic advisor Gary Cohn said Thursday middle-class Americans would benefit significantly from the GOP tax reform proposal, including renovating a kitchen with $1,000.
The former Goldman Sachs CEO said families earning $100,000 with two children would save about $1,000 under the tax plan.
"If we allow a family to keep another $1,000 of their income, what does that mean? They can renovate their kitchen, they can buy a new car, they can take a family vacation, they can increase their lifestyle," he said.
A family income of $100,000 is well above the national median household income of roughly $59,000. According to HomeAdvisor.com, the average price of a kitchen renovation in 2017 is north of $21,000.
Cohn was responding to a question at the daily White House press briefing from a reporter who asked if Trump would personally save millions of dollars under the plan. He did not directly assess Trump's potential savings. |
import React from 'react'
import ReactDOM from 'react-dom'
import { Editor } from '@mometa/editor/editor'
function App() {
// @ts-ignore
const config = global.__mometa_editor_config__
return <Editor {...config} />
}
ReactDOM.render(<App />, document.getElementById('root'))
|
Strong stochastic stability for non-uniformly expanding maps Abstract We consider random perturbations of discrete-time dynamical systems. We give sufficient conditions for the stochastic stability of certain classes of maps, in a strong sense. This improves the main result in Alves and Arajo , where the stochastic stability in the $\mathrm {weak}^*$ topology was proved. Here, under slightly weaker assumptions on the random perturbations, we obtain a stronger version of stochastic stability: convergence of the density of the stationary measure to the density of the SinaiRuelleBowen (SRB) measure of the unperturbed system in the $L^1$-norm. As an application of our results, we obtain strong stochastic stability for two classes of non-uniformly expanding maps. The first one is an open class of local diffeomorphisms introduced in Alves, Bonatti and Viana and the second one is the class of Viana maps. |
Plasma sE-cadherin and the plasma sE-cadherin/sVE-cadherin ratio are potential biomarkers for chronic obstructive pulmonary disease Abstract Background: Chronic obstructive pulmonary disease (COPD) is characterized by airway inflammation with endothelial dysfunction. Cadherins are adhesion molecules on epithelial (E-) and vascular endothelial (VE-) cells. Soluble (s) cadherin is released from the cell surface by the effects of proteases including matrix metalloproteinases (MMPs). Objective: The aim of this study was to examine the associations of sE-/sVE-cadherin levels in plasma with the development of COPD. Methods: Plasma sE-/VE-cadherin levels were measured by an enzyme-linked immunosorbent assay in 115 patients with COPD, 36 symptomatic smokers (SS), 63 healthy smokers (HS) and 78 healthy non-smokers (HN). sE-cadherin and MMP-7 levels in epithelial lining fluid (ELF) were measured in 24 patients (12 COPD and 12 control). Results: Plasma sE-cadherin levels and sE-cadherin/sVE-cadherin ratios were significantly higher in COPD and SS than in HS and HN groups, while plasma sVE-cadherin levels were lower in COPD than in HS and HN groups (p<0.0001). sE-cadherin levels paralleled the severity of airflow limitation in both plasma (p<0.01) and ELF (p<0.05), while plasma sVE-cadherin levels were inversely correlated with the extent of emphysema (p<0.05). MMP-7 levels were correlated with sE-cadherin levels in ELF. Conclusions: Plasma sE-cadherin levels and sE-cadherin/sVE-cadherin ratios are potential biomarkers for COPD. |
<gh_stars>1-10
import assert from 'static-type-assert'
import * as sfc from 'simple-fake-console'
assert<sfc.Console>(global.console)
assert<sfc.Console>(new sfc.ConsoleInstance())
|
from typing import Tuple, Optional, Dict
from math import pi, floor
from types import SimpleNamespace
import toolz
from datacube.utils.geometry import CRS
from datacube.model import GridSpec, Dataset
from odc.io.text import split_and_check, parse_range_int
epsg3577 = CRS("epsg:3577")
epsg6933 = CRS("epsg:6933")
# Origin was chosen such that there are no negative indexed tiles for any valid
# point within a given CRS's valid region, and also making sure that x=0,y=0
# lines fall on tile edges.
#
# au = gridspec_from_crs(CRS("epsg:3577"),
# tile_size=(96_000, 96_000),
# pad_yx=(5, 5))
#
# So AU tiles with index `y < 5 or x < 5` are outside of the valid range of EPSG:3577.
#
GRIDS = {
"albers_au_25": GridSpec(
crs=epsg3577, tile_size=(100_000.0, 100_000.0), resolution=(-25, 25)
),
"au": GridSpec(
crs=epsg3577,
tile_size=(96_000.0, 96_000.0),
resolution=(-96_000, 96_000),
origin=(-5472000.0, -2688000.0),
),
**{
f"au_{n}": GridSpec(
crs=epsg3577,
tile_size=(96_000.0, 96_000.0),
resolution=(-n, n),
origin=(-5472000.0, -2688000.0),
)
for n in (10, 20, 30, 60)
},
"global": GridSpec(
crs=epsg6933,
tile_size=(96_000.0, 96_000.0),
resolution=(-96_000, 96_000),
origin=(-7392000, -17376000),
),
**{
f"global_{n}": GridSpec(
crs=epsg6933,
tile_size=(96_000.0, 96_000.0),
resolution=(-n, n),
origin=(-7392000, -17376000),
)
for n in (10, 20, 30, 60)
},
}
# Inject aliases for Africa
GRIDS["africa"] = GRIDS["global"]
for r in (10, 20, 30, 60):
GRIDS[f"africa_{r}"] = GRIDS[f"global_{r}"]
def web_gs(zoom: int, tile_size: int = 256) -> GridSpec:
"""
Construct grid spec compatible with TerriaJS requests at a given level.
Tile indexes should be the same as google maps, except that Y component is negative,
this is a limitation of GridSpec class, you can not have tile index direction be
different from axis direction, but this is what google indexing is using.
http://www.maptiler.org/google-maps-coordinates-tile-bounds-projection/
"""
R = 6378137
origin = pi * R
res0 = 2 * pi * R / tile_size
res = res0 * (2 ** (-zoom))
tsz = 2 * pi * R * (2 ** (-zoom)) # res*tile_size
return GridSpec(
crs=CRS("epsg:3857"),
tile_size=(tsz, tsz),
resolution=(-res, res), # Y,X
origin=(origin - tsz, -origin),
) # Y,X
def extract_native_albers_tile(
ds: Dataset, tile_size: float = 100_000.0
) -> Tuple[int, int]:
ll = toolz.get_in(
"grid_spatial.projection.geo_ref_points.ll".split("."), ds.metadata_doc
)
return (int(ll["x"] / tile_size), int(ll["y"] / tile_size))
def extract_ls_path_row(ds: Dataset) -> Optional[Tuple[int, int]]:
full_id = ds.metadata_doc.get("tile_id")
if full_id is None:
full_id = toolz.get_in(["usgs", "scene_id"], ds.metadata_doc)
if full_id is None:
return None
return (int(full_id[3:6]), int(full_id[6:9]))
def bin_by_native_tile(dss, cells, persist=None, native_tile_id=None):
"""Group datasets by native tiling, like path/row for Landsat.
:param dss: Sequence of datasets (can be lazy)
:param cells: Dictionary to populate with tiles
:param persist: Dataset -> SomeThing mapping, defaults to keeping dataset
id only
:param native_tile_id: Dataset -> Key, defaults to extracting `path,row`
tuple from metadata's `tile_id` field, but could be anything, only
constraint is that Key value can be used as index to python dict.
"""
def default_persist(ds):
return ds.id
def register(tile, val):
cell = cells.get(tile)
if cell is None:
cells[tile] = SimpleNamespace(idx=tile, dss=[val])
else:
cell.dss.append(val)
native_tile_id = native_tile_id or extract_ls_path_row
persist = persist or default_persist
for ds in dss:
ds_val = persist(ds)
tile = native_tile_id(ds)
if tile is None:
raise ValueError("Missing tile id")
register(tile, ds_val)
yield ds
def _parse_gridspec_string(s: str) -> GridSpec:
"""
"epsg:6936;10;9600"
"epsg:6936;-10x10;9600x9600"
"""
crs, res, shape = split_and_check(s, ";", 3)
try:
if "x" in res:
res = tuple(float(v) for v in split_and_check(res, "x", 2))
else:
res = float(res)
res = (-res, res)
if "x" in shape:
shape = parse_range_int(shape, separator="x")
else:
shape = int(shape)
shape = (shape, shape)
except ValueError:
raise ValueError(f"Failed to parse gridspec: {s}") from None
tsz = tuple(abs(n * res) for n, res in zip(res, shape))
return GridSpec(crs=CRS(crs), tile_size=tsz, resolution=res, origin=(0, 0))
def _norm_gridspec_name(s: str) -> str:
return s.replace("-", "_")
def parse_gridspec(s: str, grids: Optional[Dict[str, GridSpec]] = None) -> GridSpec:
"""
"africa_10"
"epsg:6936;10;9600"
"epsg:6936;-10x10;9600x9600"
"""
if grids is None:
grids = GRIDS
named_gs = grids.get(_norm_gridspec_name(s))
if named_gs is not None:
return named_gs
return _parse_gridspec_string(s)
def parse_gridspec_with_name(
s: str, grids: Optional[Dict[str, GridSpec]] = None
) -> Tuple[str, GridSpec]:
if grids is None:
grids = GRIDS
named_gs = grids.get(_norm_gridspec_name(s))
if named_gs is not None:
return (s, named_gs)
gs = _parse_gridspec_string(s)
s = s.replace(";", "_")
return (s, gs)
def gridspec_from_crs(
crs: CRS,
tile_size: Tuple[float, float] = (96_000, 96_000),
pad_yx: Tuple[int, int] = (0, 0),
resolution: Optional[Tuple[float, float]] = None,
):
"""
Compute GridSpec such that there are no negative tiles overlapping with the
valid region of the target CRS.
:param crs: Coordinate System used to define the grid
:param tile_size: (Y, X) size of each tile, in CRS units
:param pad_yx: (Y, X) safety margin in number of tiles
:param resolution: (Y, X) size of each data point in the grid, in CRS units. Y will
usually be negative.
"""
if resolution is None:
resolution = (-tile_size[0], tile_size[1])
x0, y0, x1, y1 = crs.valid_region.to_crs(crs).boundingbox
# index of the tile containing bottom left corner
iy, ix = (int(floor(v / tsz)) for v, tsz in zip((y0, x0), tile_size))
y0_, x0_ = [
float((idx - pad) * tsz) for (idx, pad, tsz) in zip((iy, ix), pad_yx, tile_size)
]
return GridSpec(crs, tile_size, resolution=resolution, origin=(y0_, x0_))
|
<filename>template/src/features/counter/CounterSlice.tsx
import { createSlice, createAsyncThunk } from "@reduxjs/toolkit";
import axios from "axios";
const sleep = (t = Math.random() * 200 + 300) =>
new Promise((resolve) => setTimeout(resolve, t));
interface InitialState {
value: number;
loading: boolean;
error: string | null;
}
export const initialState: InitialState = {
value: 0,
loading: false,
error: null,
};
export const fetchInitial = createAsyncThunk(
"counter/fetchInitial",
async (_, { rejectWithValue }) => {
try {
// For demo purpose let's say out value is the length
// of the project name in manifest and the api call is slow
await sleep();
const response = await axios.get("/manifest.json");
return response.data.name.length;
} catch (err) {
return rejectWithValue("Something went wrong.");
}
}
);
export const slice = createSlice({
name: "counter",
initialState,
reducers: {
increment: (state) => {
state.value += 1;
},
decrement: (state) => {
state.value -= 1;
},
},
extraReducers: {
[fetchInitial.pending.type]: (state) => {
state.loading = true;
},
[fetchInitial.fulfilled.type]: (state, action) => {
state.value = action.payload;
state.loading = false;
},
[fetchInitial.rejected.type]: (state, action) => {
state.error = action.payload;
state.loading = false;
},
},
});
export const { increment, decrement } = slice.actions;
export default slice.reducer;
|
def sampling_query(sql, context, fields=None, count=5, sampling=None, udfs=None,
data_sources=None):
return Query(_sampling.Sampling.sampling_query(sql, fields, count, sampling), context=context,
udfs=udfs, data_sources=data_sources) |
<reponame>joebhaktiarDOL/Section14C<gh_stars>10-100
import { Component } from '@angular/core';
@Component({
selector: 'dol-header',
styleUrls: ['./dol-header.component.css'],
template: `
<a pageScroll href="#mainContent" class="dol-skip-to-main">skip to main content</a>
<header class="dol-header" role="header">
<a class="brand" href="/">
<img
class="brand--img"
src="images/dol-logo.png"
alt="Seal of the United States Department of Labor"
width="70"
height="70"
/>
<div class="brand--text">
UNITED STATES<br>DEPARTMENT OF LABOR
</div>
</a>
</header>
`
})
export class DolHeaderComponent {}
|
<filename>chapter_005/src/main/java/ru/job4j/map/SimpleMap.java
package ru.job4j.map;
import java.util.Iterator;
import java.util.NoSuchElementException;
/**
* @author <NAME> (<EMAIL>)
* @version 1
* @since 02.04.2019
*/
public class SimpleMap<K, V> implements Iterable<V> {
private int size = 0;
private static class Node<K, V> {
final K key;
final V value;
Node(K key, V value) {
this.key = key;
this.value = value;
}
public final String toString() {
return key + "=" + value;
}
}
private Node<K, V>[] table;
static int hash(Object key) {
int h;
if (key == null) {
h = 0;
} else {
h = key.hashCode();
h = h ^ (h >>> 16);
}
return h;
}
public SimpleMap() {
//noinspection unchecked
table = (Node<K, V>[]) new Node[16];
}
/**
* Определяет индекс в массиве по хешу ключа
*
* @param hash хеш ключа
* @return индекс в масссиве
*/
private int indexFor(int hash) {
return hash & (table.length - 1);
}
/**
* Увеличивает размер массив Node[]
*
* @param size новый размер массива
*/
private void resize(int size) {
Node<K, V>[] oldTab = table;
//noinspection unchecked
table = (Node<K, V>[]) new Node[size];
for (Node<K, V> node : oldTab) {
if (node != null) {
K key = node.key;
V value = node.value;
int hash = hash(key);
int index = indexFor(hash);
table[index] = new Node<>(key, value);
}
}
}
/**
* Вставка значения.
* По одинаковым ключам перезаписвает значение
*
* @param key ключ
* @param value значение
* @return результат вставки
*/
public boolean insert(K key, V value) {
boolean result = false;
if (size == table.length) {
resize(size * 2);
}
int hash = hash(key);
int index = indexFor(hash);
Node<K, V> oldVal = table[index];
if (oldVal == null) {
table[index] = new Node<>(key, value);
result = true;
size++;
} else if (oldVal.key.equals(key)) {
table[index] = new Node<>(key, value);
result = true;
}
return result;
}
/**
* Получение значения по ключу
*
* @param key ключ
* @return значение по ключу
*/
public V get(K key) {
int hash = hash(key);
int index = indexFor(hash);
V value = null;
Node<K, V> node = table[index];
if (node != null) {
if ((node.key == null && key == null) || (node.key != null && node.key.equals(key))) {
value = node.value;
}
}
return value;
}
/**
* Удаление значения по ключу
*
* @param key ключ
* @return результат удаления
*/
public boolean delete(K key) {
boolean result = false;
if (table.length > 0) {
int hash = hash(key);
int index = indexFor(hash);
Node<K, V> node = table[index];
if (node != null && key.equals(node.key)) {
table[index] = null;
result = true;
size--;
}
}
return result;
}
private class SimpleMapIterator implements Iterator<V> {
private int index = 0;
Node<K, V> node = null;
@Override
public boolean hasNext() {
boolean hasNext = false;
if (index < table.length) {
do {
node = table[index++];
} while (node == null && index < table.length);
hasNext = (node != null);
index--;
}
return hasNext;
}
@Override
public V next() {
if (!hasNext()) {
throw new NoSuchElementException("Simple map");
}
return table[index++].value;
}
}
@Override
public Iterator<V> iterator() {
return new SimpleMapIterator();
}
}
|
Modelling and Programming Evolutions of Surfaces In recent years, a lot of work has been done on modelling natural phenomena and simulating the evolution of natural objects. For instance, procedural methods have been developed for simulating corpuscular phenomena and tree growth. In this paper we present a new procedural method for simulating evolutions of subdivisions of surfaces (i.e. partitions of surfaces into vertices, edges and faces). The representations of topology, embedding and photometry are clearly distinguished in the geometric model used for the representation of such subdivisions and thus, each of these features may be evolved independently (as in natural metamorphoses). Evolutions are achieved by applying topological and embedding operations on the geometric model. Control of these evolutions is based upon the behaviour concept. Behaviours (i.e. sets of operations) are associated with cells of the modelled subdivision. At each step, and for each cell, the corresponding behaviour is applied to the cell. The definition and computation of parameters have been studied, in order to control such evolutions. The method has been implemented and tested with many examples of surface evolutions (mainly evolutions of vegetal surfaces: leaves, flowers). Based on the method, a language has been defined for programming surface evolutions. |
Relationship between socioeconomic status and HIV infection in a rural tertiary health center Background There is a scarcity of data in rural health centers in Nigeria regarding the relationship between socioeconomic status (SES) and HIV infection. We investigated this relationship using indicators of SES. Methods An analytical case-control study was conducted in the HIV clinic of a rural tertiary health center. Data collection included demographic variables, educational attainment, employment status, monthly income, marital status, and religion. HIV was diagnosed by conventional methods. Data were analyzed with the SPSS version 16 software. Results A total of 115 (48.5%) HIV-negative subjects with a mean age of 35.49±7.63 years (range: 1554 years), and 122 (51.5%) HIV-positive subjects with a mean age of 36.35±8.31 years (range: 1553 years) were involved in the study. Participants consisted of 47 (40.9%) men and 68 (59.1%) women who were HIV negative. Those who were HIV positive consisted of 35 (28.7%) men and 87 (71.3%) women. Attainment of secondary school levels of education, and all categories of monthly income showed statistically significant relationships with HIV infection (P=0.018 and P<0.05, respectively) after analysis using a logistic regression model. Employment status did not show any significant relationship with HIV infection. Conclusion Our findings suggested that some indicators of SES are differently related to HIV infection. Prevalent HIV infections are now concentrated among those with low incomes. Urgent measures to improve HIV prevention among low income earners are necessary. Further research in this area requires multiple measures in relation to partners SES (measured by education, employment, and income) to further define this relationship. Introduction Low socioeconomic status (SES) and its correlates -lower education, poverty, and poor health -characterize low-and middle-income countries such as Nigeria. According to the Central Intelligence Agency's World Factbook, Nigeria has one of the lowest gross domestic products in the world, with income of $2,800 per capita as of July 2012. 1 Domestically and internationally, human immunodeficiency virus (HIV) is a disease that is embedded in social and economic inequities, as it affects those of lower SES at a disproportionately high rate. 2 Previous research suggests that a person's SES may affect his or her likelihood of contracting HIV and developing acquired immunodeficiency syndrome (AIDS). Furthermore, SES is a key factor in determining the quality of life for individuals after they are affected by the virus. 6 A lack of socioeconomic resources is linked to the practice of risky sexual behaviors, which can lead to becoming infected. submit your manuscript | www.dovepress.com 62 Ogunmola et al This link has been described to have a complex relationship with religion and marital status. Nigeria has the second-largest population of people living with HIV in the world after South Africa, with only one-third of treatment-eligible individuals receiving HIV treatment. 13 In 2011, the Nigerian government commissioned The President's Comprehensive Report Plan for HIV/AIDS in Nigeria 14 to set target coverage levels for priority interventions. These included, for example, a 140% increase in HIV prevention efforts among key populations. A committee of this nature requires scientific data to inform its work, and such data can provide a nexus for further investigation. Like many low-and middle-income countries, Nigeria is predominantly rural. However, most HIV-related studies in Nigeria have targeted the urban-based population rather than the rural population that constitutes the majority of Nigerians. To the best of the authors' knowledge, studies of this nature in a rural setting such as Ekiti State are yet to be undertaken. We therefore investigated the relationship between indicators of SES and HIV prevalence in a rural tertiary hospital in Ekiti State, Nigeria. The two research questions that were tested include: 1) What are the independent effects of education, income, and employment on HIV infection? 2) How does the effect of these SES indicators change after controlling for possible confounders? Materials and methods This study was conducted at the HIV clinic of the Federal Medical Center of Ido Ekiti in Ekiti State. The clinic serves as a tertiary care center located in the southwest geopolitical region of Nigeria. However, large numbers of patients from Ekiti and neighboring states seek medical treatment in this hospital as a first point of contact. The HIV clinic receives patients referred as HIV-positive following a screening test with rapid assessment kits. This study was designed as an analytical case-control study to determine indicators of SES, measured as level of education attained, monthly income earned, and employment status. 6 The populations studied consisted of HIV-positive patients (case group) who were compared with age-and sex-matched HIV-negative subjects (control group). The latter group was drawn from the patients' relatives, hospital staff, and volunteer members of the community. The analytical sample for this study was limited to those with conventional evaluation of HIV diagnosis using enzyme-linked immunosorbent assay and Western blot assay techniques. Exclusion criteria were subjects who had an indeterminate HIV test result, or subjects with incomplete evaluation or data relevant to this study. All participants were recruited consecutively. Age, religion, and marital status were considered as confounders. The ethics committee of the Federal Medical Center, Ido Ekiti, Ekiti State approved the study. Individuals gave informed consent to participate in the study. All data were anonymized in the analysis. Individual participant written consent was obtained after thorough explanation was conducted and understanding about the study was established. Confidentiality was assured to all participants, and data utilized for this study were stripped of personally identifiable information. The minimum sample size was calculated using a formula for estimating proportions with populations of less than 10,000: nf = n/1 + n/N. The value nf is the desired sample size when the population is less than 10,000; N is the estimated population size (this was estimated as the average of 168 new HIV patients seen annually in the HIV clinic); n is obtained using the formula n = z 2 pq/d 2, where z is the normal standard deviation using a 95% confidence level of 1.96; p is the proportion of the target population estimated to have a particular characteristic (the prevalence of HIV in Nigeria is 3.6%); 15 So, the minimum sample size for this study is 40. To increase the probability that our study would be able to detect an effect, the sample size was increased to 115 and 122 subjects in the control and case groups, respectively. Eligible participants were personally interviewed and enrolled using a structured questionnaire to collect data on the demographic characteristics and variables of interest. These included age, sex, marital status (classified as single, married, separated, divorced, widowed, or remarried), educational attainment (classified as none, primary, secondary, or tertiary), employment status (categorized as full-time, part-time, or unemployed), and monthly income in Naira (categorized as low income,,40,000 Naira; middle income, 40,000-80,000 Naira; or high income,.80,000 Naira). This categorization was based on the Federal Civil Service structure of Nigeria. Religious affiliation was categorized as Christian, Muslim, or other. 63 HIV and socioeconomic status anticoagulated blood samples at the National Blood Transfusion Service Laboratory (owned by the Federal Government of Nigeria to provide safe blood). Reactive samples were confirmed using Western blot I and II confirmation kits (New Lav-Blot I and II; Bio-Rad Laboratories). All data collection was undertaken by the same set of trained research personnel and completed in the same laboratories using identical instruments and assays for the two groups. Data analysis The proportions of categorical variables were calculated, and tests of statistical significance performed using the chi-square test or Fisher's exact test. Means and standard deviations of the continuous variables were calculated, and the Student's t-test was used to assess statistical significance. A multivariate binary logistic regression model was applied to test the independent role of different confounders. In these tests, a P-value of,0.05 was considered statistically significant. The data were analyzed using the Statistical Package for the Social Sciences version 16 (SPSS Inc., Chicago, IL, USA). Results HIV-negative and HIV-positive subjects accounted for 115 and 122 subjects of the control and case groups studied as shown in Table 1. In addition, Table 1 shows the univariate characteristics of the study groups, both of which were age and sex matched (P=0.219 and P.0.05, respectively). In the HIV-negative subjects, the mean age was 35.49±7.63 years, and the range was 15-54 years. For the HIV-positive subjects the mean age was 36.35±8.31 years, and the range was 15-53 years. The highest number of HIV-positive individuals was found in the group aged 30-39 years. In educational attainment, those without education were comparable in both groups (P=0.388). However, those with tertiary education were found more frequently among the HIV-negative subjects (P,0.001), in contrast to the HIV-positive subjects who were more likely to have primary or secondary school education (P=0.004 and P=0.001, respectively). Analysis of the monthly income of participants showed that, in contrast to HIV-negative subjects, HIV-positive subjects were found predominantly in the low-income category (P,0.05). There was no statistically significant difference in employment status (P.0.05), marital status (P.0.05), or religion (P.0.05). Binary logistic regression analysis (Table 2) showed that the age group of 30-39 years, secondary school educational attainment, and all categories of monthly income were independent predictors of HIV infection (P,0.05). An addi-tional finding was that the lower the education level attained and the lower the income earned per month, the higher the risk of HIV infection. Figure 1 shows the distribution of education by age group according to HIV status. In HIV-positive subjects, no education or primary school education predominated in most of the age groups, in contrast to HIV-negative subjects where tertiary education predominated. Similarly, low or intermediate income predominated in HIV-positive subjects, in contrast to HIV-negative subjects where high income predominated (Figure 2). Discussion To our knowledge, this study was the first exploration of the relationship between SES and HIV infection in a rural tertiary hospital in Ekiti State, Nigeria. Although it has been 27 years since HIV was first reported in Nigeria in 1986, hospital Our study was consistent with the current knowledge indicating that the preponderance of HIV-positive individuals are female. 15 However, the peak age group in this study was 30-39 years, unlike the documented peak age group of 25-29 years in Nigeria. 15 The age group found in this study may be related to the late hospital presentation that is common in our environment. 16 Nonetheless, a study undertaken in Tanzania reported a similar peak age group. 17 Understanding the relationship between SES and HIV risk can have important implications for designing and 65 HIV and socioeconomic status Limited parental involvement seems to be generally associated with higher levels of premarital sexual activity and problem behaviors. 19 This may be translated into a higher risk of HIV infection, and therefore more people living with HIV/AIDS, in the future. Furthermore, these same people are likely to marry men or women of their own educational level, who are also likely to engage in risky sexual behavior and incur the possibility of HIV infection. It is common knowledge in rural Nigeria's social context that many secondary school dropouts are linked to premature or unplanned pregnancies in women and to negative social behaviors in men. Further study at the secondary school level and programs that address the predilection to HIV infection (with the involvement of parentteacher associations) may be worthwhile. Previous reports in Zambia and Tanzania showed that education bears an inverse relationship to the risk of HIV infection. 20,21 The difference in our findings may be because of the different methodologies, particularly in relation to differences in the confounders considered. Several reports have shown a similarly mixed result, 22 which suggests the complexity of the relationship to risk at the individual, household, and community levels. Employment status in our investigation did not show any relationship to risk of HIV infection. This is not unexpected, because the majority of our subjects were female. Culturally, Nigerian women are psychologically attached to Above 80,000 Income in Naira implementing prevention programs. It has been reported that people with higher SES have a greater risk for HIV during the early stages of the epidemic, but that as the epidemic matures, people of lower SES become disproportionately affected. 18,19 We investigated the relationship between commonly used indicators of SES and HIV infection, namely education attainment, employment status, and monthly income. 6,18 In Nigeria, particularly in the southwest, education attainment is a key marker of socioeconomic position. In our study, the relationship between various levels of educational attainment and HIV infection was statistically significant except for those without education. After a logistic regression model was applied, this relationship was maintained only with a secondary school level of educational attainment. This lack of association between HIV infection and primary and tertiary school levels of education may reflect the possibility that the most important mediating factors were not included in our model. Those included may also have some peculiar relationship with other factors. The finding that there is a significant relationship between secondary school attainment and risk for HIV infection may reflect poor parental involvement in adolescence, because the socialization that accompanies puberty and adolescent life adventures evolves during the secondary school stage. 66 Ogunmola et al the employment status of their husband. This was not evaluated in this study but may serve as a future area of research. In addition, male-partner employment status was not explored. Consideration of this status may also yield different results, because many unemployed men may be married to women with highly lucrative jobs that may effectively cater to their family's needs. Monthly income bears a statistically significant inverse relationship with HIV infection. The lower the monthly income, the higher the risks of HIV infection even after the effects of confounders have been considered. This finding may be related to the high vulnerability of lowincome earners to many social vices in our environment. In sub-Saharan Africa, poverty has been associated with the distribution of HIV infection and high-risk sexual behaviors. 23,24 As a result, one of the strategies used by some HIV prevention programs in sub-Saharan Africa has been to empower HIV patients, and particularly women, to become more economically independent through microfinance loan schemes. 25 Low income may make an individual vulnerable to accepting a risky situation that will provide for his or her daily needs. This includes multiple sexual exposures for financial gain. People with low incomes are also prone to unstable housing. This has been linked to the risk for HIV infection. 9 A number of factors might have contributed to the limitations of our study. These include other potential confounders and effect modifiers, such as the number of partners participants have or had, the partner's SES, the participant's history of sexually transmitted disease, and their ethnicity. We would maintain that sexually transmitted diseases and number of partners are on the causal pathway under investigation between HIV and SES and should not be adjusted for as confounders in any analysis. Our study center is located in the southwest of Nigeria, where the population is predominantly from the Yoruba ethnic group. Therefore, introducing ethnicity may bias our study because of skewed ethnic population groups that may not adequately capture differences across ethnic groups. This may result in a low power to detect interethnic variation in HIV prevalence. In conclusion, our findings suggest that education, income, and employment status have different relationships to HIV infection. While employment status showed no relationship to HIV infection, having a secondary school level of education showed a significant relationship. Income earned suggested an inverse relationship in all categories. The prevalence of HIV infections is now concentrated among those with low incomes. Urgent measures to improve HIV prevention among low-income earners are necessary. Future studies should use multiple measures in relation to partners' SES (measured by education, employment, and income) to further define this relationship. Disclosure The authors report no conflicts of interest in this work. |
The mom who’d been involved in a car accident on her way to the Driehoek school tragedy, has finally had her dream wedding.
Debbie Coetzee (46) from Vanderbiljpark, Gauteng, wed the love of her life on the banks of the Vaal River on Sunday 30 March.
“She was the most beautiful woman I’d ever seen,” the groom, Kruger Crause (46), told YOU about the moment he saw his bride.
Debbie can’t stop gushing about Sunday’s wedding ceremony and reception. Everything – from the flowers and table decorations, to the cake, her dress and Kruger’s suit – had been sponsored by local suppliers.
“Everyone went out of their way to make it special for us. We couldn’t have asked for a better day. It was perfect. We can only say thank you,” Debbie tells us.
On 1 February this year an elevated walkway at Hoërskool Driehoek in Vanderbiljpark collapsed, killing four learners and injuring more than 20 others. Debbie had been on her way there to pick up her daughter and Kruger’s son when she was in a car accident.
Thankfully, Debbie’s daughter, Rizaan (14), and Kruger’s son, Johan (15), weren’t among those injured in the walkway collapse.
But Debbie would only find this out four days later when she woke up in hospital.
Another car had allegedly cut her off at a traffic light. The impact caused Debbie to be flung about 30m from her car. She sustained serious head injuries and was hospitalised for more than two weeks.
Debbie and Kruger had been planning to get married at the end of February but because of the accident, they had to postpone their plans.
Lindie van Niekerk and her daughter Jeanne Jacobs own the family restaurant Mimi se Plaaskombuis in Vanderbijlpark. Lindie had read about Debbie’s accident in YOU’s sister magazine Huisgenoot and decided she wanted to help. She reckoned the venue would fit the couple’s original plan for a “small, intimate farm wedding” to a T.
Lindie and Jeanne immediately started organising the wedding, calling around for sponsors.
“It was awesome. Crazy,” says Kruger about the fantastic wedding that was organised for them."
Ford in Vanderbiljpark provided transport from the nearby Clivia Lodge, where the wedding party got dressed, to the venue. Clivia Lodge also provided a night’s accommodation for the couple, as well as breakfast the next morning.
The couple have been together for three years.
Debbie says she’ll never forget the look on Kruger’s face when he first saw her in her wedding dress, which had been provided by local designer Coleen Pienaar.
Though Debbie hasn’t fully recovered from her injuries, she says she made it through the busy wedding day.
“By 3pm I was exhausted but I managed,” she says.
Her head injury still causes dizziness and balance problems and she hasn’t regained full range of motion in her right arm. The brain trauma to the left side of her brain had caused a stroke, which still causes pins and needles in her right arm.
But she’s back at work with Kruger at Herza Auctioneers.
She says the Friday before the wedding she’d had her hair done at a salon and it was the first time she’d driven a car again since the accident. |
/// Instantiates `self` with empty caches.
///
/// Does not connect to the eth1 node or start any tasks to keep the cache updated.
pub fn new(config: Eth1Config, log: Logger, spec: ChainSpec) -> Self {
Self {
core: HttpService::new(config, log.clone(), spec),
log,
_phantom: PhantomData,
}
} |
Even during the summer offseason, LSU of Alexandria coach Larry Cordaro is still busy trying to build the Generals basketball program into a champion.
"The summer's come and gone," Cordaro said. "We've been wrapping up our summer workouts and getting prepared for the next season."
In just four seasons, LSUA has made it to the NAIA Tournament four times, the Fab Four twice and reached the national title game last season.
This is just part of the success that the Generals have had as they are a state-best 115-17 from 2014-15 to 2017-18, regardless of the level of competition.
Just do not expect Cordaro to gloat about it.
"We're very humble about it, but we do want the word to be out there," Cordaro said. "We've won a lot of games and we've been fortunate. It's no secret anymore."
LSUA is the only Louisiana team to win 100 games in this four-year stretch, which is better than fellow Central Louisiana schools Louisiana College and Northwestern State, than solid mid-major teams Louisiana Tech and UL Lafayette and better than the flagship school in the state — LSU.
The funny thing is that does not take into account the pair of wins the program has against Division I foes Southeastern Louisiana and NSU, nor does it include the close calls against similar Division I teams.
This success can be a blessing and a curse, though.
"We're kind of a program not to be played, with and we really struggle to schedule games," Cordaro said. "But we're proud to represent Louisiana throughout the nation. We just want to continue to be the best that we can be."
Being that means off the court as well. LSUA has won 87 percent of its games and has graduated 87 percent of its players.
"It's a privilege to have the expectations that we now have," Cordaro said. "Hopefully, we can continue to build it with the players and coaching staff. I told the players that we have the best coaching staff."
While he has been holding his summer camps at The Fort, entering the locker room is a simple message that reads from bottom to top: "0-1, 1-1, 3-1, 4-1, 5-0."
The first four records are LSUA's performance at the NAIA Tournament in Kansas City, Missouri, while the fifth is what it is aiming for: winning five games in a week to a national championship.
If not for a miraculous shot at the buzzer by Graceland in the NAIA title game in March, the Generals would have had that elusive title, but that has only fueled their desire.
"We know the date (of the title game) and there's a picture of the building," Cordaro said. "We've gotten to that Tuesday night, but we have to get back there and finish. The word for this year is 'finish.'" |
SHANGHAI, April 2, 2019 /PRNewswire/ -- Today, Frost & Sullivan (hereinafter referred to as "F&S"), the world's largest growth consulting firm, released the "2018 China Pet Industry Report." This is the first time that F&S has released a report on China's pet industry. Prior to that, the authoritative data cited by listed companies such as PetSmart, a leading chained-brand in the U.S. pet industry, was also from F&S's research report.
The report has four parts, including the overview of China's pet industry, the portrait of consumers in the industry, the consumption of pet products, pet service and the consumption of live pets in China. The report fully shows the latest development of China's pet industry in 2018.
According to F&S's report, the number of pet owner households has increased from 69.3 million in 2013 to 99.8 million in 2018, showing an increment of 43.9% over the past five years. The penetration rate of household pet ownership in China has also grown from 16% in 2013 to 22% in 2018.
By the end of 2018, there were approximately 67 million pet cats and 74 million pet dogs in China. The annual sales of live pet cats and dogs were over 5 million, excluding the adopted and donated ones. In addition to cats and dogs, Chinese pet owners also keep 110 million other animals, including 84 million fish, 9 million birds, 7 million reptiles, 7 million rodents, etc., showing the various interests of Chinese pet owners.
The market size of China's pet industry reached RMB172.2 billion in 2018, more than three times as the market size of RMB49.4 billion in 2013.
The market size of pet dogs was RMB98.5 billion in 2018. Pet food, including staple foods, snacks and health products, was the largest segment in the market with a revenue of RMB38.3 billion; the market size of vet care, pet supplies, pet service including grooming, boarding and other services, and live animal purchase was RMB19.8 billion, RMB15.1 billion, RMB15.6 billion and RMB9.7 billion, respectively.
By 2018, the market size of pet cats reached RMB60.2 billion. The segments of pet food, vet care, pet supplies, pet service and live animal purchase was RMB22.3 billion, RMB12.4 billion, RMB8.7 billion, RMB8.5 billion and RMB8.3 billion, respectively.
Industry experts generally believe that the pet industry in China will further develop along with the growing number of pets and increasing purchasing power of pet owners. It is estimated that by 2023, the market size of the China's pet industry would reach RMB472.3 billion.
The living standard of pets in China has been gradually improving in recent years. According to F&S's report, the average annual spending of pet owners on each pet cat or dog was RMB3,969 in 2018.
Specific to pet dogs, the annual average spending on each pet dog in 2018 was RMB4,723, of which RMB2,040 was spent on food, RMB800 on supplies, RMB1,055 on vet care, and RMB828 on other services.
In 2018, the annual average spending on each pet cat was RMB3,117, of which RMB1,340 was spent on food, RMB525 on supplies, RMB742 on vet care, and RMB510 on other services. In comparison, the cost of raising a cat is lower than that of raising a dog.
Pet Owners in China Show the Characteristics of "Three Highs and One Low"
According to the report, pet owners in China usually have characteristics of middle-to-high income level and an advanced degree, and are middle-to-high class and younger in age.
Specific to gender, the gender ratio of China's pet owners was about 4:6 in 2018. Regarding the age distribution, 2% of the pet owners were born after 2000; 48% of pet owners were born after the 1990s; 35% of pet owners were born after the 1980s; 10% of pet owners were born after the 1970s; and 5% of pet owners were born before the 1970s. Obviously, young pet owners have become the mainstream, driving the development of China's pet industry in recent years.
Different from the "stereotype" of "single people are more interested in raising pets", F&S pointed out that 61% of pet owners in China are married, and only 39% of them are single. The percentage of married pet owners that are not living with their parents was 43.8% in 2018. The fact shows that although pets are able to keep single people company, a stable economic foundation is still needed for raising pets.
In terms of the income level of pet owners, more than one-third of pet owners have an average monthly income of more than RMB10,000. Pet owners that have an average monthly income of over RMB15,000 accounted for 12.8% of all pet owners, while pet owners that have an average monthly income between RMB10,000 to RMB14,999, pet owners that have an average monthly income between RMB5,000 to RMB9,999, and those with monthly income below RMB5,000 accounted for 21.5%, 39.5% and 26.2%, respectively. The number of owners with a high level of income and stronger ability to guarantee a certain living standard for pets is gradually increasing.
In addition, the report pointed out that pet owners with a bachelor's degree and those with a master's degree or above account for 65.5% and 5.8% of all pet owners. Meanwhile, pet owners that are company employees, management level staff and public institution employees accounted for 29.1%, 23.1% and 14.2% of all pet owners. An advanced degree and stable career will make it easier for pet owners to accept new and healthy concepts and habits of raising pets.
Unlike pet owners in Europe and the U.S., who prefer to buy pet products offline, online consumption has become the major channel for Chinese pet owners.
According to the report, 89% of pet owners have purchased pet products online. The major factors are quality guarantee, a wide range of products, high discounts, promotions and convenience.
Among all the pet products consumed online, pet staple food is an inelastic demand. Around 88.5% of pet owners choose to buy staple food online. Pet snacks, daily necessities, travel equipment, vet care supplies, pet toys, pet grooming supplies, pet medicines and health care products, and live pets followed pet staple food on the list.
When purchasing pet staple food, 71.7% and 61.6% of the pet owners give priority to whether the raw materials and ingredients of staple foods meet nutritional needs and whether the food is easy to digest, showing that pet owners have paid special attention to the nutritional ingredients of pet food.
As for the frequency of purchasing staple food, 61.5% of pet owners buy staple food 6 to 12 times per year. Obtaining nutrients such as protein through professional staple food has become the main lifestyle for pets in China.
In addition to purchasing pet products online, some pet owners also choose to buy pet products in offline stores. About 55.4%, 50.8%, and 47.4% of the pet owners choose community pet stores, chain pet stores, and hospitals, respectively, to purchase pet products. The main considerations for pet owners to choose offline stores are a better shopping experience and a variety of services, such as boarding service, grooming service, etc.
Meanwhile, offline trading dominates the live animal purchase since pets are shown directly and "physically" in offline stores. 46.4% of the pet owners bought their pets from offline pet stores, and 34.3% of them received pets as gifts from friends.
Among all offline consumption, about 78.4% of pet owners have purchased vet care, 76.1% have purchased pet grooming service, 42.2% have purchased boarding service, and 27.3% have purchased pet training service. Due to the restrictions on raising dogs in urban regions and frequent conflicts between people and pets, pet training service, which may reduce the possible contradictions in public places, is expected to become a compulsory service for pet owners. |
/**
* @jest-environment jsdom
*/
import { render } from "@testing-library/react";
import React from "react";
import { EntryHistory } from "components/entry/EntryHistory";
import { TestWrapper } from "utils/TestWrapper";
test("should render a component with essential props", function () {
const histories = [
{
attr_name: "test",
prev: {
created_user: "admin",
created_time: new Date().toDateString(),
value: "before",
},
curr: {
created_user: "admin",
created_time: new Date().toDateString(),
value: "after",
},
},
];
expect(() =>
render(<EntryHistory histories={histories} />, { wrapper: TestWrapper })
).not.toThrow();
});
|
/*
* Copyright (C) 2012 Intel Corporation
* All rights reserved.
*/
package com.intel.mtwilson.policy.fault;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.intel.dcsg.cpg.crypto.AbstractDigest;
import com.intel.mtwilson.model.PcrIndex;
//import com.intel.mtwilson.model.Sha1Digest;
import com.intel.mtwilson.policy.Fault;
import com.intel.dcsg.cpg.crypto.Sha1Digest;
import com.intel.dcsg.cpg.crypto.Sha256Digest;
import com.intel.dcsg.cpg.crypto.DigestAlgorithm;
/**
*
* @author jbuhacoff
* @param <T>
*/
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonIgnoreProperties(ignoreUnknown=true)
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS,
include = JsonTypeInfo.As.PROPERTY,
property = "digest_type")
@JsonSubTypes({
@JsonSubTypes.Type(value = XmlMeasurementValueMismatchSha1.class),
@JsonSubTypes.Type(value = XmlMeasurementValueMismatchSha256.class)
})
public abstract class XmlMeasurementValueMismatch<T extends AbstractDigest> extends Fault {
private T expectedValue;
private T actualValue;
public XmlMeasurementValueMismatch() { } // for desearializing jackson
protected XmlMeasurementValueMismatch(T expectedValue, T actualValue) {
super("Host XML measurement log final hash with value %s does not match expected value %s", actualValue.toString(), expectedValue.toString());
this.expectedValue = expectedValue;
this.actualValue = actualValue;
}
public static XmlMeasurementValueMismatch newInstance(DigestAlgorithm bank, AbstractDigest expectedValue, AbstractDigest actualValue) {
switch(bank) {
case SHA1:
return new XmlMeasurementValueMismatchSha1((Sha1Digest)expectedValue, (Sha1Digest)actualValue);
case SHA256:
return new XmlMeasurementValueMismatchSha256((Sha256Digest)expectedValue, (Sha256Digest)actualValue);
default:
throw new UnsupportedOperationException("Not supported yet");
}
}
public T getExpectedValue() { return expectedValue; }
public T getActualValue() { return actualValue; }
}
|
import { Component } from '@angular/core';
import { trigger, style, animate, transition, keyframes } from '@angular/animations';
import { NavController } from 'ionic-angular';
import { Subject } from "rxjs/Subject";
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
import { AnimationsProvider } from '../../providers/animations/animations';
export interface Animation {
type: string,
options: [{
name: string
}]
}
@Component({
selector: 'page-home',
templateUrl: 'home.html',
animations: [
trigger('animationType', [
transition('* => bounceIn', [
style({
'animation-timing-function': 'cubic-bezier(0.215, 0.610, 0.355, 1.000)',
transition: 'opacity ease-in-out',
transform: 'scale3d(.3, .3, .3)',
opacity: 0
}),
animate('600ms', keyframes([
style({opacity: 0.4, transform: 'scale3d(1.1, 1.1, 1.1)', offset: 0.2}),
style({opacity: 0.8, transform: 'scale3d(.9, .9, .9)', offset: 0.4}),
style({opacity: 1, transform: 'scale3d(1.03, 1.03, 1.03)', offset: 0.6}),
style({transform: 'scale3d(.97, .97, .97)', offset: 0.8}),
style({transform: 'scale3d(1, 1, 1)', offset: 1.0})
]))
]),
transition('* => bounceInUp', [
style({
'animation-timing-function': 'cubic-bezier(0.215, 0.610, 0.355, 1.000)',
transition: 'opacity ease-in-out',
transform: 'translate3d(0, 3000px, 0)',
opacity: 0
}),
animate('600ms', keyframes([
style({opacity: 1, transform: 'translate3d(0, -20px, 0)', offset: 0.6}),
style({transform: 'translate3d(0, 10px, 0)', offset: 0.75}),
style({transform: 'translate3d(0, -5px, 0)', offset: 0.9}),
style({transform: 'translate3d(0, 0, 0)', offset: 1.0})
]))
]),
transition('* => bounceInRight', [
style({
'animation-timing-function': 'cubic-bezier(0.215, 0.610, 0.355, 1.000)',
transition: 'opacity ease-in-out',
transform: 'translate3d(3000px, 0, 0)',
opacity: 0
}),
animate('600ms', keyframes([
style({opacity: 1, transform: 'translate3d(-25px, 0, 0)', offset: 0.6}),
style({transform: 'translate3d(10px, 0, 0)', offset: 0.75}),
style({transform: 'translate3d(-5px, 0, 0)', offset: 0.9}),
style({transform: 'none', offset: 1.0})
]))
]),
transition('* => bounceInDown', [
style({
'animation-timing-function': 'cubic-bezier(0.215, 0.610, 0.355, 1.000)',
transition: 'opacity ease-in-out',
transform: 'translate3d(0, -3000px, 0)',
opacity: 0
}),
animate('600ms', keyframes([
style({opacity: 1, transform: 'translate3d(0, 25px, 0)', offset: 0.6}),
style({transform: 'translate3d(0, -10px, 0)', offset: 0.75}),
style({transform: 'translate3d(0, 5px, 0)', offset: 0.9}),
style({transform: 'translate3d(0, 0, 0)', offset: 1.0})
]))
]),
transition('* => bounceInLeft', [
style({
'animation-timing-function': 'cubic-bezier(0.215, 0.610, 0.355, 1.000)',
transition: 'opacity ease-in-out',
transform: 'translate3d(-3000px, 0, 0)',
opacity: 0
}),
animate('600ms', keyframes([
style({opacity: 1, transform: 'translate3d(25px, 0, 0)', offset: 0.6}),
style({transform: 'translate3d(-10px, 0, 0)', offset: 0.75}),
style({transform: 'translate3d(5px, 0, 0)', offset: 0.9}),
style({transform: 'none', offset: 1.0})
]))
]),
transition('* => fadeIn', [
style({
transition: 'opacity ease-in-out',
opacity: 0
}),
animate('600ms', style({
transition: 'opacity ease-in-out',
opacity: 1
}))
]),
transition('* => fadeInUp', [
style({
transition: 'opacity ease-in-out',
transform: 'translate3d(0, 100%, 0)',
opacity: 0
}),
animate('600ms', style({
transition: 'opacity ease-in-out',
transform: 'none',
opacity: 1
}))
]),
transition('* => fadeInUpBig', [
style({
transition: 'opacity ease-in-out',
transform: 'translate3d(0, 2000px, 0)',
opacity: 0
}),
animate('600ms', style({
transition: 'opacity ease-in-out',
transform: 'none',
opacity: 1
}))
]),
transition('* => fadeInRight', [
style({
transition: 'opacity ease-in-out',
transform: 'translate3d(100%, 0, 0)',
opacity: 0
}),
animate('600ms', style({
transition: 'opacity ease-in-out',
transform: 'none',
opacity: 1
}))
]),
transition('* => fadeInRightBig', [
style({
transition: 'opacity ease-in-out',
transform: 'translate3d(2000px, 0, 0)',
opacity: 0
}),
animate('600ms', style({
transition: 'opacity ease-in-out',
transform: 'none',
opacity: 1
}))
]),
transition('* => fadeInDown', [
style({
transition: 'opacity ease-in-out',
transform: 'translate3d(0, -100%, 0)',
opacity: 0
}),
animate('600ms', style({
transition: 'opacity ease-in-out',
transform: 'none',
opacity: 1
}))
]),
transition('* => fadeInDownBig', [
style({
transition: 'opacity ease-in-out',
transform: 'translate3d(0, -2000px, 0)',
opacity: 0
}),
animate('600ms', style({
transition: 'opacity ease-in-out',
transform: 'none',
opacity: 1
}))
]),
transition('* => fadeInLeft', [
style({
transition: 'opacity ease-in-out',
transform: 'translate3d(-100%, 0, 0)',
opacity: 0
}),
animate('600ms', style({
transition: 'opacity ease-in-out',
transform: 'none',
opacity: 1
}))
]),
transition('* => fadeInLeftBig', [
style({
transition: 'opacity ease-in-out',
transform: 'translate3d(-2000px, 0, 0)',
opacity: 0
}),
animate('600ms', style({
transition: 'opacity ease-in-out',
transform: 'none',
opacity: 1
}))
]),
transition('* => flip', [
style({
transform: 'perspective(400px) rotate3d(0, 1, 0, -360deg)',
'animation-timing-function': 'ease-out'
}),
animate('600ms', keyframes([
style({transform: 'perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg)',
'animation-timing-function': 'ease-out', offset: 0.4}),
style({transform: 'perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg)',
'animation-timing-function': 'ease-out', offset: 0.5}),
style({transform: 'perspective(400px) scale3d(.95, .95, .95)',
'animation-timing-function': 'ease-out', offset: 0.8}),
style({transform: 'perspective(400px)', offset: 1.0})
]))
]),
transition('* => flipInX', [
style({
transform: 'perspective(400px) rotate3d(1, 0, 0, 90deg)',
'animation-timing-function': 'ease-out',
opacity: 0
}),
animate('600ms', keyframes([
style({transform: 'perspective(400px) rotate3d(1, 0, 0, -20deg)',
'animation-timing-function': 'ease-out', offset: 0.4}),
style({transform: 'perspective(400px) rotate3d(1, 0, 0, 10deg)', opacity: 1, offset: 0.6}),
style({transform: 'perspective(400px) rotate3d(1, 0, 0, -5deg)', offset: 0.8}),
style({transform: 'perspective(400px)', offset: 1.0})
]))
]),
transition('* => flipInY', [
style({
transform: 'perspective(400px) rotate3d(0, 1, 0, 90deg)',
'animation-timing-function': 'ease-out',
opacity: 0
}),
animate('600ms', keyframes([
style({transform: 'perspective(400px) rotate3d(0, 1, 0, -20deg)',
'animation-timing-function': 'ease-out', offset: 0.4}),
style({transform: 'perspective(400px) rotate3d(0, 1, 0, 10deg)', opacity: 1, offset: 0.6}),
style({transform: 'perspective(400px) rotate3d(0, 1, 0, -5deg)', offset: 0.8}),
style({transform: 'perspective(400px)', offset: 1.0})
]))
]),
transition('* => flipOutX', [
style({
transform: 'perspective(400px)',
opacity: 1
}),
animate('600ms', keyframes([
style({transform: 'perspective(400px) rotate3d(1, 0, 0, -20deg)', opacity: 1, offset: 0.3}),
style({transform: 'perspective(400px) rotate3d(1, 0, 0, 90deg)', opacity: 0, offset: 1.0})
]))
]),
transition('* => flipOutY', [
style({
transform: 'perspective(400px)',
opacity: 1
}),
animate('600ms', keyframes([
style({transform: 'perspective(400px) rotate3d(0, 1, 0, -15deg)', opacity: 1, offset: 0.3}),
style({transform: 'perspective(400px) rotate3d(0, 1, 0, 90deg)', opacity: 0, offset: 1.0})
]))
]),
transition('* => lightSpeedIn', [
style({
transform: 'translate3d(100%, 0, 0) skewX(-30deg)',
opacity: 0
}),
animate('1000ms', keyframes([
style({transform: 'skewX(20deg)', opacity: 1, offset: 0.6}),
style({transform: 'skewX(-5deg)', offset: 0.8}),
style({transform: 'none', offset: 1.0})
]))
]),
transition('* => lightSpeedOut', [
style({
opacity: 1
}),
animate('1000ms', style({
'animation-timing-function': 'ease-in',
transform: 'translate3d(100%, 0, 0) skewX(30deg)',
opacity: 0
}))
]),
transition('* => rotateIn', [
style({
'transform-origin': 'center',
transform: 'rotate3d(0, 0, 1, -200deg)',
opacity: 0
}),
animate('600ms', style({
'transform-origin': 'center',
transform: 'none',
opacity: 1
}))
]),
transition('* => rotateInDownLeft', [
style({
'transform-origin': 'left bottom',
transform: 'rotate3d(0, 0, 1, -45deg)',
opacity: 0
}),
animate('600ms', style({
'transform-origin': 'left bottom',
transform: 'none',
opacity: 1
}))
]),
transition('* => rotateInDownRight', [
style({
'transform-origin': 'right bottom',
transform: 'rotate3d(0, 0, 1, 45deg)',
opacity: 0
}),
animate('600ms', style({
'transform-origin': 'right bottom',
transform: 'none',
opacity: 1
}))
]),
transition('* => rotateInUpLeft', [
style({
'transform-origin': 'left bottom',
transform: 'rotate3d(0, 0, 1, 45deg)',
opacity: 0
}),
animate('600ms', style({
'transform-origin': 'left bottom',
transform: 'none',
opacity: 1
}))
]),
transition('* => rotateInUpRight', [
style({
'transform-origin': 'right bottom',
transform: 'rotate3d(0, 0, 1, -90deg)',
opacity: 0
}),
animate('600ms', style({
'transform-origin': 'right bottom',
transform: 'none',
opacity: 1
}))
]),
transition('* => rotateOut', [
style({
'transform-origin': 'center',
opacity: 1
}),
animate('600ms', style({
'transform-origin': 'center',
transform: 'rotate3d(0, 0, 1, 200deg)',
opacity: 0
}))
]),
transition('* => rotateOutDownLeft', [
style({
'transform-origin': 'left bottom',
opacity: 1
}),
animate('600ms', style({
'transform-origin': 'left bottom',
transform: 'rotate3d(0, 0, 1, 45deg)',
opacity: 0
}))
]),
transition('* => rotateOutDownRight', [
style({
'transform-origin': 'right bottom',
opacity: 1
}),
animate('600ms', style({
'transform-origin': 'right bottom',
transform: 'rotate3d(0, 0, 1, -45deg)',
opacity: 0
}))
]),
transition('* => rotateOutUpLeft', [
style({
'transform-origin': 'left bottom',
opacity: 1
}),
animate('600ms', style({
'transform-origin': 'left bottom',
transform: 'rotate3d(0, 0, 1, -45deg)',
opacity: 0
}))
]),
transition('* => rotateOutUpRight', [
style({
'transform-origin': 'right bottom',
opacity: 1
}),
animate('600ms', style({
'transform-origin': 'right bottom',
transform: 'rotate3d(0, 0, 1, 90deg)',
opacity: 0
}))
]),
transition('* => slideInUp', [
style({
transform: 'translate3d(0, 100%, 0)',
visibility: 'visible'
}),
animate('600ms', style({
transform: 'translate3d(0, 0, 0)'
}))
]),
transition('* => slideInDown', [
style({
transform: 'translate3d(0, -100%, 0)',
visibility: 'visible'
}),
animate('600ms', style({
transform: 'translate3d(0, 0, 0)'
}))
]),
transition('* => slideInLeft', [
style({
transform: 'translate3d(-100%, 0, 0)',
visibility: 'visible'
}),
animate('600ms', style({
transform: 'translate3d(0, 0, 0)'
}))
]),
transition('* => slideInRight', [
style({
transform: 'translate3d(100, 0, 0)',
visibility: 'visible'
}),
animate('600ms', style({
transform: 'translate3d(0, 0, 0)'
}))
]),
transition('* => slideOutUp', [
style({
transform: 'translate3d(0, 0, 0)'
}),
animate('600ms', style({
visibility: 'hidden',
transform: 'translate3d(0, -100%, 0)'
}))
]),
transition('* => slideOutDown', [
style({
transform: 'translate3d(0, 0, 0)'
}),
animate('600ms', style({
visibility: 'hidden',
transform: 'translate3d(0, 100%, 0)'
}))
]),
transition('* => slideOutLeft', [
style({
transform: 'translate3d(0, 0, 0)'
}),
animate('600ms', style({
visibility: 'hidden',
transform: 'translate3d(-100%, 0, 0)'
}))
]),
transition('* => slideOutRight', [
style({
transform: 'translate3d(0, 0, 0)'
}),
animate('600ms', style({
visibility: 'hidden',
transform: 'translate3d(100%, 0, 0)'
}))
])
])
]
})
export class HomePage {
public animation: string = 'bounceIn';
/** selected animation type */
private _animationType: Subject<string> = new BehaviorSubject<string>(null);
public animationType: Subject<string> = this._animationType;
/** animations object of possible animations to loop through */
public animations: Array<Animation>;
constructor(public navCtrl: NavController, private animationsProvider: AnimationsProvider) {
// default select value to animate
this._animationType.next('bounceIn');
}
ionViewDidEnter() {
/** retrive list of possible animations */
this._getAnimations();
}
/** get list of animations from data.json */
private _getAnimations() {
this.animationsProvider.getAnimations()
.then(data => {
/** set animations to the response */
this.animations = data;
});
}
public doAnimate(animationType: string) {
this._animationType.next('');
setTimeout(() => {
this._animationType.next(animationType);
}, 300);
}
public bounceIn = `
import { trigger, style, animate, transition, keyframes } from '@angular/animations';
@Component({
selector: "page-home",
templateUrl: "home.html",
animations: [
trigger("animationName", [
transition("* => bounceIn", [
style({
"animation-timing-function": "cubic-bezier(0.215, 0.610, 0.355, 1.000)",
transition: "opacity ease-in-out",
transform: "scale3d(.3, .3, .3)",
opacity: 0
}),
animate("600ms", keyframes([
style({opacity: 0.4, transform: "scale3d(1.1, 1.1, 1.1)", offset: 0.2}),
style({opacity: 0.8, transform: "scale3d(.9, .9, .9)", offset: 0.4}),
style({opacity: 1, transform: "scale3d(1.03, 1.03, 1.03)", offset: 0.6}),
style({transform: "scale3d(.97, .97, .97)", offset: 0.8}),
style({transform: "scale3d(1, 1, 1)", offset: 1.0})
]))
])
]);
]
})
export class HomePage {
public animationName: string;
}
`
public bounceInUp = `
import { trigger, style, animate, transition, keyframes } from '@angular/animations';
@Component({
selector: "page-home",
templateUrl: "home.html",
animations: [
trigger("animationName", [
transition('* => bounceInUp', [
style({
'animation-timing-function': 'cubic-bezier(0.215, 0.610, 0.355, 1.000)',
transition: 'opacity ease-in-out',
transform: 'translate3d(0, 3000px, 0)',
opacity: 0
}),
animate('600ms', keyframes([
style({opacity: 1, transform: 'translate3d(0, -20px, 0)', offset: 0.6}),
style({transform: 'translate3d(0, 10px, 0)', offset: 0.75}),
style({transform: 'translate3d(0, -5px, 0)', offset: 0.9}),
style({transform: 'translate3d(0, 0, 0)', offset: 1.0})
]))
])
]);
]
})
export class HomePage {
public animationName: string;
}
`
public bounceInRight = `
import { trigger, style, animate, transition, keyframes } from '@angular/animations';
@Component({
selector: "page-home",
templateUrl: "home.html",
animations: [
trigger("animationName", [
transition('* => bounceInRight', [
style({
'animation-timing-function': 'cubic-bezier(0.215, 0.610, 0.355, 1.000)',
transition: 'opacity ease-in-out',
transform: 'translate3d(3000px, 0, 0)',
opacity: 0
}),
animate('600ms', keyframes([
style({opacity: 1, transform: 'translate3d(-25px, 0, 0)', offset: 0.6}),
style({transform: 'translate3d(10px, 0, 0)', offset: 0.75}),
style({transform: 'translate3d(-5px, 0, 0)', offset: 0.9}),
style({transform: 'none', offset: 1.0})
]))
])
]);
]
})
export class HomePage {
public animationName: string;
}
`
public bounceInDown = `
import { trigger, style, animate, transition, keyframes } from '@angular/animations';
@Component({
selector: "page-home",
templateUrl: "home.html",
animations: [
trigger("animationName", [
transition('* => bounceInDown', [
style({
'animation-timing-function': 'cubic-bezier(0.215, 0.610, 0.355, 1.000)',
transition: 'opacity ease-in-out',
transform: 'translate3d(0, -3000px, 0)',
opacity: 0
}),
animate('600ms', keyframes([
style({opacity: 1, transform: 'translate3d(0, 25px, 0)', offset: 0.6}),
style({transform: 'translate3d(0, -10px, 0)', offset: 0.75}),
style({transform: 'translate3d(0, 5px, 0)', offset: 0.9}),
style({transform: 'translate3d(0, 0, 0)', offset: 1.0})
]))
])
]);
]
})
export class HomePage {
public animationName: string;
}
`
public bounceInLeft = `
import { trigger, style, animate, transition, keyframes } from '@angular/animations';
@Component({
selector: "page-home",
templateUrl: "home.html",
animations: [
trigger("animationName", [
transition('* => bounceInLeft', [
style({
'animation-timing-function': 'cubic-bezier(0.215, 0.610, 0.355, 1.000)',
transition: 'opacity ease-in-out',
transform: 'translate3d(-3000px, 0, 0)',
opacity: 0
}),
animate('600ms', keyframes([
style({opacity: 1, transform: 'translate3d(25px, 0, 0)', offset: 0.6}),
style({transform: 'translate3d(-10px, 0, 0)', offset: 0.75}),
style({transform: 'translate3d(5px, 0, 0)', offset: 0.9}),
style({transform: 'none', offset: 1.0})
]))
])
]);
]
})
export class HomePage {
public animationName: string;
}
`
public fadeIn = `
import { trigger, style, animate, transition, keyframes } from '@angular/animations';
@Component({
selector: "page-home",
templateUrl: "home.html",
animations: [
trigger("animationName", [
transition('* => fadeIn', [
style({
transition: 'opacity ease-in-out',
opacity: 0
}),
animate('600ms', style({
transition: 'opacity ease-in-out',
opacity: 1
}))
])
]);
]
})
export class HomePage {
public animationName: string;
}
`
public fadeInUp = `
import { trigger, style, animate, transition, keyframes } from '@angular/animations';
@Component({
selector: "page-home",
templateUrl: "home.html",
animations: [
trigger("animationName", [
transition('* => fadeInUp', [
style({
transition: 'opacity ease-in-out',
transform: 'translate3d(0, 100%, 0)',
opacity: 0
}),
animate('600ms', style({
transition: 'opacity ease-in-out',
transform: 'none',
opacity: 1
}))
])
]);
]
})
export class HomePage {
public animationName: string;
}
`
public fadeInUpBig = `
import { trigger, style, animate, transition, keyframes } from '@angular/animations';
@Component({
selector: "page-home",
templateUrl: "home.html",
animations: [
trigger("animationName", [
transition('* => fadeInUpBig', [
style({
transition: 'opacity ease-in-out',
transform: 'translate3d(0, 2000px, 0)',
opacity: 0
}),
animate('600ms', style({
transition: 'opacity ease-in-out',
transform: 'none',
opacity: 1
}))
]),
]);
]
})
export class HomePage {
public animationName: string;
}
`
public fadeInRight = `
import { trigger, style, animate, transition, keyframes } from '@angular/animations';
@Component({
selector: "page-home",
templateUrl: "home.html",
animations: [
transition('* => fadeInRight', [
style({
transition: 'opacity ease-in-out',
transform: 'translate3d(100%, 0, 0)',
opacity: 0
}),
animate('600ms', style({
transition: 'opacity ease-in-out',
transform: 'none',
opacity: 1
}))
])
]);
]
})
export class HomePage {
public animationName: string;
}
`
public fadeInRightBig = `
import { trigger, style, animate, transition, keyframes } from '@angular/animations';
@Component({
selector: "page-home",
templateUrl: "home.html",
animations: [
transition('* => fadeInRightBig', [
style({
transition: 'opacity ease-in-out',
transform: 'translate3d(2000px, 0, 0)',
opacity: 0
}),
animate('600ms', style({
transition: 'opacity ease-in-out',
transform: 'none',
opacity: 1
}))
])
]);
]
})
export class HomePage {
public animationName: string;
}
`
public fadeInDown = `
import { trigger, style, animate, transition, keyframes } from '@angular/animations';
@Component({
selector: "page-home",
templateUrl: "home.html",
animations: [
transition('* => fadeInDown', [
style({
transition: 'opacity ease-in-out',
transform: 'translate3d(0, -100%, 0)',
opacity: 0
}),
animate('600ms', style({
transition: 'opacity ease-in-out',
transform: 'none',
opacity: 1
}))
])
]
})
export class HomePage {
public animationName: string;
}
`
public fadeInDownBig = `
import { trigger, style, animate, transition, keyframes } from '@angular/animations';
@Component({
selector: "page-home",
templateUrl: "home.html",
animations: [
transition('* => fadeInDownBig', [
style({
transition: 'opacity ease-in-out',
transform: 'translate3d(0, -2000px, 0)',
opacity: 0
}),
animate('600ms', style({
transition: 'opacity ease-in-out',
transform: 'none',
opacity: 1
}))
])
]
})
export class HomePage {
public animationName: string;
}
`
public fadeInLeft = `
import { trigger, style, animate, transition, keyframes } from '@angular/animations';
@Component({
selector: "page-home",
templateUrl: "home.html",
animations: [
transition('* => fadeInLeft', [
style({
transition: 'opacity ease-in-out',
transform: 'translate3d(-100%, 0, 0)',
opacity: 0
}),
animate('600ms', style({
transition: 'opacity ease-in-out',
transform: 'none',
opacity: 1
}))
]),
]
})
export class HomePage {
public animationName: string;
}
`
public fadeInLeftBig = `
import { trigger, style, animate, transition, keyframes } from '@angular/animations';
@Component({
selector: "page-home",
templateUrl: "home.html",
animations: [
transition('* => fadeInLeftBig', [
style({
transition: 'opacity ease-in-out',
transform: 'translate3d(-2000px, 0, 0)',
opacity: 0
}),
animate('600ms', style({
transition: 'opacity ease-in-out',
transform: 'none',
opacity: 1
}))
])
]
})
export class HomePage {
public animationName: string;
}
`
}
|
Incidence of Pharyngeal Hypophysis in Neonates a Histologic Study The presence of adenohypophysial tissue in the nasopharynx is no longer disputed. This study was performed in 50 neonatal cadavers subjected to medical autopsy within 6 hours of death. The aim was to study the incidence of extrasellar pituitary tissue in the nasopharynx and its various histologic cell types. The transpalatal approach was used to obtain the specimens. The specimens were stained with hematoxylin and eosin and periodic acid-Schifforange G for selective demonstration of adenohypophysial cells. Histopathologic evaluation led to the detection of pituitary tissue in 16% of the examined specimens. Selective staining demonstrated a 6% positive incidence of adenohypophysial cells. The pharyngeal hypophysis exists in 2 forms: a typical adenohypophysial collection of cells and an atypical subepithelial cluster. The incidence of hypophysial tissue was higher in the older neonates, perhaps because of hormonal stimulation of the caudal remnant of Rathke's pouch. |
Q:
Why don't airliner winglets have consumer advertising on them?
I was looking over the wikipedia article for the 737NG when I came across this picture:
As you can see, the operator of the jet has written their companies web address on the winglet. Which seems like a waste, I'm already on their airplane, there's no need to sell me, it's not so much an ad as a reminder at that point...
So, I couldn't help but think, when looking at it, that it would be somewhat clever if RedBull bought the rights to advertise on a 737NG and wrote something on that spot that said, "Redbull gives you winglets" (rimshot).
Sillines aside, there is a serious question here. Generally speaking if there is a public surface that many many people will be forced to stare at for any length of time, then there is an advertisement there. Bus stops, billboards, the sides of buildings, there are ads virtually everywhere. Heck, commercial aviation equipment even has a few already with some of the jetways you see at airports:
There are tens of thousands of people who see winglets every day (and even more who see winglets in travel pictures, blogs, etc), so why aren't advertisers taking advantage of the space and, further, why aren't airlines trying to sell the space in order to increase revenue?
I'm wondering if perhaps there are regulations that might make this difficult? A good advertising spot will change images and products fairly frequently. On a winglet that would necessitate either a new paint job or, perhaps, a new vinyl wrap (like what is used in NASCAR.) And I'm wondering if the regulations for commercial aircraft regarding how the winglets are painted would prohibit this sort of "quick switch" activity (are wraps even legal)? Or perhaps there is a certification process for all new paint jobs that would make it so the amount spent to advertise would never match the increase in sales?
Or is it just that airlines have a sense of pride about their aircraft and respect their passengers enough to not bombard them with ads? (...yeah, I doubt it's this last one as well ;-) ).
Edit: I did mark this one for FAA Regulations, but I feel EASA regulations should be similar enough to give some insight as well, so if you want to answer with those regs feel free.
A:
Why airlines don't put third-party ads on winglets
I would assume that a significant part of the answer is that it would look and feel cheap (i.e. not good for the airline's brand image.) They don't usually sell advertising elsewhere on their livery for much the same reason (though they do occasionally dedicate a livery to advertising some charity or some such thing, but that doesn't normally hurt their brand image.) On the other hand, putting the airline's brand image there can possibly help to improve it.
While you are already on the airline's flight, they'd be quite happy if you purchased more flights with them in the future and even more happy if you purchase the tickets directly from their website where they don't have to share the revenue with a travel agent. An additional benefit of mentioning the website is that many airlines now have on-board Wi-Fi and allow you to access their website from it even if you haven't paid for the Wi-Fi. As such, if they can get you thinking about their website and you happen to hop on it and book your next trip while cruising around at 30,000 feet, that's a win for them.
Finally, while they do already have you on board, they're well aware that lots of people post pictures taken while they were on a flight, especially pictures that include the wing (such as the one in the question.) Now your pictures are free (and usually positive) advertising for them.
Vinyl Wraps / Decals
As far as wraps are concerned, as far as I know, yes, they're legal and actually pretty common, even for the fuselage livery. My understanding is that lessors use them pretty frequently. They've also been used for temporary liveries like this one:
It appears that several companies exist for the sole purpose of making aircraft wraps. A quick search found the following:
AdGraphics
AircraftWraps
Plane Vinyl
It appears that 3M makes a lot of the materials used for the wraps.
I also found an FAA document on aircraft coatings that talks about how to apply vinyl decals to aircraft (along with how to paint aircraft, etc.) From page 18:
Vinyl Film Decals
To apply vinyl film decals, separate the paper backing from the plastic film. Remove any paper backing adhering to the adhesive by rubbing the area gently with a clean cloth saturated with water. Remove small pieces of remaining paper with masking tape.
Place vinyl film, adhesive side up, on a clean porous
surface, such as wood or blotter paper.
Apply recommended activator to the adhesive in firm,
even strokes to the adhesive side of decal.
Position the decal in the proper location, while
adhesive is still tacky, with only one edge contacting
the prepared surface.
Work a roller across the decal with overlapping strokes
until all air bubbles are removed.
This page from signindustry.com goes into more detail about how to apply vinyl decals to aircraft from a professional installer standpoint.
A:
I doubt the space is worth very much. The interior side of the winglet is really only visible to people on the plane and even most people on the plane can't see it well. You're only advertising to people with window seats at or behind the wing, plus a few people in non-window seats close to the wing who can see the winglet while looking almost perpendicularly out of the plane. That's only a few tens of people per flight who can see the ad. Multiply that by a few round-trips per day per plane and your ad is only reaching a couplefew hundred people a day. Given the cost of applying the ad to the winglets, I doubt that's economically viable, when you consider that a billboard ad can be seen by thousands of people an hour and is much cheaper to produce. |
<reponame>rahuly247/Game<gh_stars>10-100
package com.sdsmdg.game.GameWorld;
import android.graphics.RectF;
/**
* Created by <NAME> on 5/24/2016.
*/
public interface Ball {
RectF rectFBall = new RectF();
RectF rectFSecondBall = new RectF();
boolean initializeBallPosition(int x, int y);
boolean initializeBallVelocity(int x, int y);
boolean updateBall();
boolean collide(int x);
float velocityBooster(float x);
}
|
Gene Copy Number Estimation from Targeted Next-Generation Sequencing of Prostate Cancer Biopsies: Analytic Validation and Clinical Qualification Purpose: Precise detection of copy number aberrations (CNA) from tumor biopsies is critically important to the treatment of metastatic prostate cancer. The use of targeted panel next-generation sequencing (NGS) is inexpensive, high throughput, and easily feasible, allowing single-nucleotide variant calls, but CNA estimation from this remains challenging. Experimental Design: We evaluated CNVkit for CNA identification from amplicon-based targeted NGS in a cohort of 110 fresh castration-resistant prostate cancer biopsies and used capture-based whole-exome sequencing (WES), array comparative genomic hybridization (aCGH), and FISH to explore the viability of this approach. Results: We showed that this method produced highly reproducible CNA results (r = 0.92), with the use of pooled germline DNA as a coverage reference supporting precise CNA estimation. CNA estimates from targeted NGS were comparable with WES (r = 0.86) and aCGH (r = 0.7); for key selected genes (BRCA2, MYC, PIK3CA, PTEN, and RB1), CNA estimation correlated well with WES (r = 0.91) and aCGH (r = 0.84) results. The frequency of CNAs in our population was comparable with that previously described (i.e., deep deletions: BRCA2 4.5%; RB1 8.2%; PTEN 15.5%; amplification: AR 45.5%; gain: MYC 31.8%). We also showed, utilizing FISH, that CNA estimation can be impacted by intratumor heterogeneity and demonstrated that tumor microdissection allows NGS to provide more precise CNA estimates. Conclusions: Targeted NGS and CNVkit-based analyses provide a robust, precise, high-throughput, and cost-effective method for CNA estimation for the delivery of more precise patient care. Clin Cancer Res; 23; 60707. ©2017 AACR. |
The impact of cognitive inertia on postconsumption evaluation processes This study sheds some light on the role of memory in satisfaction judgments. The author's findings indicate that consumers might fail to form satisfaction evaluations in an online manner in typical repeat-consumption situations. Instead of consciously reevaluating familiar products or services, consumers may choose to engage in judgment updating/formation processes only when faced with a postpurchase satisfaction inquiry. Surprise performances or inconsistent service delivery, however, greatly reduce the consumer's reliance on prior judgments. Under these conditions, consumers are motivated to spontaneously update their summary evaluations stored in memory. The implications of the memory-based nature of satisfaction judgments to service and retail managers are briefly discussed. |
A Constrained EM Algorithm for Principal Component Analysis We propose a constrained EM algorithm for principal component analysis (PCA) using a coupled probability model derived from single-standard factor analysis models with isotropic noise structure. The single probabilistic PCA, especially for the case where there is no noise, can find only a vector set that is a linear superposition of principal components and requires postprocessing, such as diagonalization of symmetric matrices. By contrast, the proposed algorithm finds the actual principal components, which are sorted in descending order of eigenvalue size and require no additional calculation or postprocessing. The method is easily applied to kernel PCA. It is also shown that the new EM algorithm is derived from a generalized least-squares formulation. |
Identification of Hard Ticks in the United States: A Practical Guide for Clinicians and Pathologists Abstract: According to guidelines published by the Infectious Disease Society of America, Lyme disease prophylaxis is possible if a tick can be identified as Ixodes scapularis (nymphal or adult) within 72 hours of tick removal. However, a recent survey of medical practitioners indicates generally poor proficiency in tick identification. In this study, we provide a simple, practical guide to aid medical practitioners in identifying the most commonly encountered human biting ticks of North America. |
Development of a Shared Environment Model with Dynamic Trajectory Representation for Multiple Mobile Robots The productivity of groups can be increased by enabling group members to share their perceptions of the environment. We adapt this concept for mobile robots by presenting an object-oriented approach to a shared environmental model. The objects are stored in a graph, which saves memory and computing power and allows the representation of hierarchical and topological relationships. Each object can contain geometric and semantic data as well as information about its current, past, and planned or estimated future movements. An example application shows that modeling future motion can prevent collisions. Motivation Product customization and shortening of production life cycles increase the demand for flexible manufacturing systems. Mobile robots show great potential due to their high configurability and scalability as well as their freedom of movement. The applications are diverse and range from logistics and cleaning or inspecting to operation at multiple workstations. The large number of mobile resources means that future production facilities will require decentralized intelligence to handle the increasing complexity. In order to navigate and interact safely and efficiently in such facilities, robots need an understanding of their environment that is technically enabled by environmental models. The combination of the limited perceptions of individual robots into a common knowledge base enables collective intelligence. Those shared models enable improvements firstly in safety, e.g. warning of imminent danger, and secondly in efficiency, e.g. avoiding traffic jams. Existing models lack the ability to represent object dynamics. At critical points in a production facility, such as intersections and pedestrian crossings, information about the dynamics of surrounding objects can improve overall performance and safety. Dynamic information could either be directly integrated into the map by the performing robot or estimated by observers for agents with no connection to the shared model, e.g. human workers. This work presents a novel approach for integrating object dynamics into world models. The suggested solution consists of a client-server architecture and a graph-based data model supporting geometry, semantic classification, topology and object dynamics, including past and present as well as predicted and planned future trajectories. First, an overview of environment models with focus on papers related to this work is given in section 2. Then, our approach is presented in section 3. Section 4 describes a proof-of-concept application offering a technical implementation and illustrating the added value of the approach. Finally, the results are discussed in section 5 and perspectives for future research are given. Related Work Research on shared environmental models focuses on three main areas: methods for obtaining new data and integrating them into an environmental model, solutions for contributing and distributing data in multi-user scenarios and lastly, the actual data modeling, which uses data structures, itself. Obtaining New Data This area includes the various methods from the fields of perception, data fusion and pattern recognition and is considered only briefly below. Standard approaches to mapping in mobile robotics are "Simultaneous Localization and Mapping" (SLAM) or "HectorSLAM", which generate grid-based maps. Alternatively, the raw sensor data can also be processed by object recognition and integrated into an object-oriented data model. There are several applications in the field of service robotics. Furthermore, data can be processed to form topological graphs, e.g. transforming a 2D grid-based map of a building into a graph with nodes representing rooms. Applications to path planning for multiple mobile robots are given in. Due to inaccuracy in perception, objects need to be registered to their absolute position in the environmental model, referred to as "anchoring" or "data association". Context-based classification improves anchoring by considering existing knowledge. Data Distribution This area integrates the methods from the fields of network architecture, consistency management and synchronization and, again, is considered only briefly below. In contrast to fully centralized map storage and fully synchronized maps with all participants, intermediate stages are a trade-off between latency and consistency. A client-server structure can be applied to an object-oriented distribution model, preserving consistency by predefined access rights to object changes. Multi-server architectures with environmental subsets enable scalability. Moreover, there are approaches that are tolerant to inconsistency by assuming it to be acceptable at certain points of the data model. Data Structures for Environment Mapping Our approach focuses on data structures, therefore the related work is discussed in detail. Common approaches for geometric relationships can be classified as grid-based or object-oriented. In addition to geometric data, environmental models can represent semantics or uncertainty. Grid-based Structures A fundamental concept of map generation is the "Occupancy Grid Map" (OGM), discretizing 2D or 3D space into independent cells assigned with the estimated occupancy, e.g. "free", "occupied" or "unknown". The storage effort can be reduced by structuring the grid cells in a hierarchical manner, the so-called "octree". Combinations of several octrees enable object hierarchies and multiple resolutions. Object-oriented Structures With object trees, not only cubes, but any geometric object can be described. Gregor et al. use homogeneous transformations to indicate the relative spatial arrangement of parent and child objects. Semantic information can be represented by linking the nodes of the object tree to corresponding elements of a "conceptual hierarchy". An extension to graph structures holding geometric and transformation nodes is presented by Blumenthal et al.. Here, nodes can contain semantic information via key-value pairs and past object movements are traced by transformationtimestamp pairs. The graph structure allows several transformation nodes to point to the same geometry node, which enables the modeling of competing perceptions in multi-robot scenarios. Multi-user operation is considered unproblematic because geometric objects, as well as transformation-timestamp pairs, are invariant. In addition, there is an interface for distributed storage of a graph, but possible consistency problems are not considered. Other approaches extend geometric models by separately stored ontologies, which are not in the scope of this work. Further graph structures, such as in, focus on the shared use of the map by several actors. For this purpose, a so-called "generative grammar" is set up, which regulates how parts of the model may change. The emphasis of the research can also be on a systematic class-based representation of geometric information. Modelling of Uncertainty Predictions or measurements result in uncertain data, which must be correctly modeled. By augmenting coordinates with one standard deviation per dimension, locations can be stored as Gaussian distributions. Likewise, uncertain occupancies in octrees can be expressed by probability values and spatial transformations can be extended by additional covariance matrices, expressing 6D spatial deviation. Different approaches introduce confidence values for graph attributes and links. Object classification algorithms provide a classification probability, which is integrated into the class structure by Papp et al.. Additionally, generic uncertainty models can be linked to physical quantities here. Scientific Approach The overview of the scientific approaches to environmental modeling shows that so far there are only solutions that are specialized in one field. If several robots with a shared environmental model are used, their activities and perceptions are very homogeneous. This in turn leads to restrictions in the representation of the perceived world in the model. Comprehensive environmental models, on the other hand, are not prepared for multi-user or distributed systems. It is not possible to enter predicted trajectories of robots or dynamic obstacles into the world model in any of the considered solutions. Requirements From the shortcomings of the existing solutions mentioned in the previous section and the generally necessary characteristics of an environmental model, we can derive some requirements for a new, comprehensive system for mapping the environment. Geometry and Dynamics Real world objects should be depicted in terms of their position and shape. In order to adequately reproduce movements of objects, a distinction must be made between past, present and future movements. The latter must be further subdivided into planned and estimated movements. Combination of Topological, Geometrical and Hierarchical Relations Three types of relations are defined in the literature: hierarchical, indicating a dependency of the function and location of subordinate objects on their parent, geometrical, indicating a spatial relation, and topological, indicating neighborhoods that are not necessarily directly connected to the spatial location. For compact storage, a single data structure should represent these three types of relations. Scientific Concept Our system is based on a client-server architecture similar to those in and. Each instance contains a copy of the shared environmental data. In the following, we describe how the data is structured and represented, focusing on motion modeling. Structure of the Data Model Our approach is based on object-oriented representation. Geometric or abstract objects of the real world are mapped to nodes of a data structure whose edges reflect relationships between the objects. The data structure has two types of object links, vertical and horizontal. The relative position of two objects is stored in vertical links. They form a tree-like structure and therefore also show hierarchies between objects. In contrast to a conventional tree, objects can have more than one parent node in the superordinate level, resulting in a directed acyclic graph (DAG). This means that multiple memberships can be mapped, for example a workpiece that is jointly transported by two robots. If an object has more than one parent node, its absolute position is ambiguous because there are several paths to the root node. The second type of object connection is the horizontal link. It shows the topological neighborhood of two objects. Horizontal links may interconnect any objects in the DAG of vertical links. The collection of all horizontal links in a data model forms one or more graphs. Contents of the Data Model Each node of the data model represents a real physical object or a group of several subordinate objects. Thus a node does not necessarily have to contain a geometry. The assignment of a classification and a trajectory is also possible so that all use cases can be covered. Geometry and Classification In our approach, several types of geometry representation can be stored. Point clouds provide a storage option close to the sensor, while octrees provide a storage-efficient solution. Moreover, triangle meshes can be stored, which are very suitable for the visualization of objects. The technical details are not discussed in detail here; instead, readers are referred to the literature. In addition to geometries, the results of classification algorithms can be stored in the nodes. Object Dynamics Present and past object dynamics are modeled according to. This is applicable to the linear and angular velocity stored in each object node, as well as to the location of objects stored in the vertical links. For interfering objects, future motions can be predicted based on present and past motions. Our approach includes an uncertainty model for representing predicted trajectories. Figures 1(a) and 1(b) show dispersing trajectories of velocity and orientation angle, expressed as the mean value and standard deviation. Accordingly, discrete trajectories are formed by time-sampled points where the position is assigned an uncertainty in the form of a covariance matrix, see Figure 1(c). This representation of an uncertain trajectory has the advantage that time and location components are separated. In an environmental model which is based on geometric relationships, the trajectory can therefore be seamlessly inserted. In case of robots, future motions are predictable. Therefore, our approach includes planned trajectories as continuous paths (NURBS: Non-Uniform Rational B-Spline) mapped to time. Proof of Concept A typical system has been created using open-source software. Due to the early stage of development, an industry-like application has been simulated in an office environment, e.g. an order picking robot in a small parts warehouse. Implementation The described object-oriented data model has been written in C++. Several hierarchical classes represent the different nodes and edges as well as the optional information about classification, geometry and trajectory. They are depicted on the left side of Figure 2. Linux-based client programs were implemented for reading sample geometries from a database, inserting a trajectory and visualizing the model. Another ROS-based client makes the world model accessible to the mobile robot. The clients communicate via a WLAN with a linux-based server application. If a client makes a change to its instance of the data model, it informs the server. The server forwards the change to the other clients. Experiment and Observation The use example consists of a mobile robot driving along a narrow alley. At a hard-to-observe intersection a human worker crosses the robot's pathway. The robot, which is only equipped with on-board sensors, would need to reduce its speed at such locations to ensure safety. Therefore the robot's performance decreases even if no interference occurs. In this scenario it is assumed that a second robot beyond the junction can perceive the person and estimate their future movement. The expected trajectory is fed into the environmental model available to the first robot. The setup is illustrated in Figure 1(d). Experiments prove that the first robot can react to the interference by stopping before being able to perceive the human worker based on onboard sensors alone. Figure 2 shows the crossing situation in reality and in the model. Results, Discussion and Conclusion In this work, a novel shared environmental model for mobile robots was presented. The graph-based data model can represent geometry as point clouds or triangle meshes and semantic information as classification results. The proposed solution is suitable to represent future or past object dynamics and to consider the uncertainty in predicted trajectories, as demonstrated in the section above. Furthermore, the environmental model offers advantages in the operation of mobile robots. By communicating with other robots, a robot can react to a moving obstacle before it has detected it with it's on-board sensors. Robots must normally drive at an appropriate speed to be able to brake at dangerous points such as hard-to-observe intersections. It is also conceivable to install stationary sensors at danger points so that potentially interfering objects are always reported to the shared environmental model. Thus overall performance can be increased while maintaining safety. Fulfillment of Requirements Current movements can be stored in the model as single values with a timestamp. When a value with a newer timestamp is added, the previous one moves to the history. Future movements can be stored continuously or discretely with uncertainty. In this way, the degree of detail and the time horizon can be varied arbitrarily. This covers a large number of applications. Combining hierarchies and location relationships makes the modeling of location-independent hierarchies more difficult. On the other hand, it simplifies changing the location of object groups as only the position of the parent node must be updated. Outlook Further Aspects of Modeling for Multiple Robots In addition to the aspects described above, the presented concept contains mechanisms to ensure consistency and efficient distribution of data. These are of great importance in a shared environmental model. The mechanisms are based on the existence of a central, superordinate server that decides on the approval and distribution of updates. To limit network traffic, it is possible to subdivide the environmental model into several regions. In this way, each robot receives updates matched to its location instead of receiving updates for the whole map. The horizontal links between the model objects that are described above are decisive for the subdivision. Future Work Several possibilities for geometry storage were mentioned in sec. 3.2. It should be investigated whether further methods need to be added to this selection. Since most types of information occurring in a virtual environment are uncertain, the modeling of uncertainty should also be further investigated. Finally, tests of the environmental model with large amounts of content must be carried out to assess storage efficiency and speed so that the results can be compared with other solutions. Acknowledgements The results presented in this article were developed within the FORobotics (AZ-Open Access This chapter is licensed under the terms of the Creative Commons Attripermits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made. The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. |
U.S. Pat. No. 5,478,499 discloses a blue emitting phosphor that can be used in a vacuum fluorescent display, a field emission display, a write head of a printer, a back light for a liquid crystal display, etc. The phosphor of the '499 patent is capable of emitting a blue luminous color at a voltage of 100V or less. The phosphor is a ZnO--Ga.sub.2 O.sub.3 matrix doped with Li (lithium) and P (phosphorus).
FIG. 2 shows a flow chart of a method for preparing the above blue emitting phosphor of the '499 patent. First, ZnO, Ga.sub.2 O.sub.3, and Li.sub.3 PO.sub.4 are mixed. Next, the resulting mixture is subjected to a first sintering step for approximately 3 hours at a temperature of 1200.degree. C. and in a normal air atmosphere. The matrix is then milled, preferably with a ball mill, such that lumped matrix particles are evenly dispersed. To remove excess Li.sub.3 PO.sub.4, the dispersed matrix particles are washed with nitric acid. Subsequently, the washed matrix is subjected to a second sintering step for 1 to 3 hours at a temperature of 1100.degree. C. under a reducing atmosphere. Subsequently, the matrix is classified using a sieve, thereby obtaining the phosphor. The phosphor has an x value of 0.08 to 0.20 and a y value of 0.05 to 0.25 in a CIE chromaticity diagram. However, the blue emitting phosphor produced as described above has a low brightness, i.e., a low light emitting efficiency. |
John Hampton—a record producer, musician, mixer, and Grammy-award winning recording engineer—has died of complications from cancer. He was 61. Hampton was a longtime employee of Ardent Studios in Memphis, eventually working his way up to part owner. In his nearly 40 years in the music business, he had a hand in making records by Jimmie and Stevie Ray Vaughan, Travis Tritt, Gin Blossoms, Mudhoney, Todd Snider, George Thorogood, Alex Chilton, The Replacements, and The White Stripes, among many others.
Hampton began his career working with several of Memphis’ rock and power-pop luminaries, including engineering Alex Chilton’s first post-Big Star solo album Like Flies on Sherbert. He worked on a host of classic alternative albums in the late 1980s and early 1990s, including The Cramps’ Psychedelic Jungle/Gravest Hits, Mojo Nixon & Skid Roper’s Root Hog Or Die, Tommy Keene’s Based On Happy Times, The Afghan Whigs’ Gentlemen, and The Replacements’ Pleased To Meet Me.
Hampton’s biggest success as a producer came from working with a then-unknown power-pop group from Arizona, the Gin Blossoms. The band had self-released the Dusted cassette in 1989 to local acclaim, but Hampton’s considerable acumen at merging their jangly pop with gritty rock helped make their major label debut, New Miserable Experience, a multi-platinum hit, spawning five singles and three Top 40 hits, beginning with “Hey Jealousy.”
Hampton also worked on the Gin Blossoms’ follow-up, 1996’s Congratulations I’m Sorry, before the band splintered. He returned to produce the band’s 2006 reunion album Major Lodge Victory and also worked on post-Gin Blossoms projects from guitarist Jesse Valenzuela and singer Robin Wilson. The Memphis Flyer recently posted this nice recollection written by Hampton about his work with the band.
Advertisement
More recently, he engineered three Jack White projects: The Raconteurs’ Broken Boy Soldiers, The Dead Weather’s Sea of Cowards, and The White Stripes’ Get Behind Me Satan, which gave Hampton his second Grammy win. (His first came for engineering Jimmie Vaughan’s Do You Get The Blues? in 2001.) |
import requests
import json
import os
from bs4 import BeautifulSoup
from config import app_config
# 获取地图掉落信息
def get_map_reward():
url = "https://wiki.biligame.com/pcr/地图掉落#.E6.99.AE.E9.80.9A.E9.9A.BE.E5.BA.A6"
response = requests.get(url)
soup = BeautifulSoup(response.text, "lxml")
map_reward_tables = soup.select(".wikitable")
result = {}
for mp in map_reward_tables:
tr_units = mp.select('tr')
for i in range(1, len(tr_units)):
map_name = tr_units[i].select('th a')[0]["title"].strip() # 地图名称
primary_reward_tag = tr_units[i].select('td')[0].select('a')
second_reward_tag = tr_units[i].select('td')[1].select('a')
primary_reward = []
second_reward = []
for item in primary_reward_tag:
primary_reward.append(item["title"].strip())
for item in second_reward_tag:
second_reward.append(item["title"].strip())
result[map_name] = {
"primary_reward": primary_reward,
"second_reward": second_reward
}
save_path = os.path.join(app_config["data_path"], "reward.json")
with open(save_path, "w") as file:
file.write(json.dumps(result, indent=4, ensure_ascii=False))
return result
|
New England Patriots owner Robert Kraft joined CBS’s “This Morning” on Friday and touched on various topics, including his fourth Super Bowl title and Deflategate.
Kraft recalled his thoughts right before Butler’s interception: “We have great confidence in our coach and our team, but we were not in a good position at second and 1 [from the New England 1-yard line]. Thank goodness for Malcolm Butler, who came in and did something he’ll forever be in Boston sports lore for.”
Soon after, Kraft tackled a topic many Patriots fans would love to know: How long can he keep Tom Brady and Bill Belichick around?
Advertisement
“As long as the good Lord lets me breathe,” Kraft replied. “That’s my objective. We’ve been able to keep it together for 15 years. I don’t recall another head coach-ownership relationship like that. And [Brady] is so special. We’re so lucky to have him.”
Get Sports Headlines in your inbox: The most recent sports headlines delivered to your inbox every morning. Sign Up Thank you for signing up! Sign up for more newsletters here
When asked if he had any sympathy for Pete Carroll, who coached the Patriots prior to Belichick, Kraft didn’t bite.
“Well, we had two Super Bowls where we lost right at the end,” he recalled. “It’s sort of cruel. When we lost to the Giants, we were 18-0.”
As expected, it didn’t take too long for Deflategate to be brought up.
When asked by interviewer Charlie Rose to reflect on the “deflated balls,” the Patriots owner was quick to make a joke.
Advertisement
“I think Tom Brady is healthy and vibrant, I don’t think there’s any relevance to that comment,” he said.
The Patriots owner was also asked about how Deflategate might have affected the team before the Super Bowl.
“Whenever you’re privileged enough to get to this big game, there’s always a lot of distractions that come about,” he said. “Bottom line is, we won our championship game, 45-7, and we won our Super Bowl game, 28-24, when the league pretty much had full charge of the footballs.”
But not even a week later, Kraft is already thinking about next year.
“Nobody has won back-to-back Super Bowls since we did it in 2003-04,” he said. “And we’d sure like to add to that.”
Follow Sebastian Lena on Twitter @GlobeSPL |
/*
* Copyright 2000-2009 JetBrains s.r.o.
*
* 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.
*/
/*
* Author: max
* Date: Oct 9, 2001
* Time: 8:43:17 PM
*/
package com.intellij.codeInspection.ex;
import com.intellij.codeInsight.daemon.impl.actions.AbstractBatchSuppressByNoInspectionCommentFix;
import com.intellij.codeInspection.*;
import com.intellij.icons.AllIcons;
import com.intellij.ide.impl.ContentManagerWatcher;
import com.intellij.ide.ui.search.SearchableOptionsRegistrar;
import com.intellij.openapi.application.Application;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.Messages;
import com.intellij.openapi.util.NotNullLazyValue;
import com.intellij.openapi.wm.ToolWindow;
import com.intellij.openapi.wm.ToolWindowAnchor;
import com.intellij.openapi.wm.ToolWindowId;
import com.intellij.openapi.wm.ToolWindowManager;
import com.intellij.profile.codeInspection.ui.InspectionToolsConfigurable;
import com.intellij.psi.PsiElement;
import com.intellij.ui.content.ContentFactory;
import com.intellij.ui.content.ContentManager;
import com.intellij.ui.content.TabbedPaneContentUI;
import com.intellij.util.Function;
import com.intellij.util.IncorrectOperationException;
import com.intellij.util.containers.ContainerUtil;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.TestOnly;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.regex.Pattern;
public class InspectionManagerEx extends InspectionManagerBase {
private GlobalInspectionContextImpl myGlobalInspectionContext = null;
private final NotNullLazyValue<ContentManager> myContentManager;
private final Set<GlobalInspectionContextImpl> myRunningContexts = new HashSet<GlobalInspectionContextImpl>();
public InspectionManagerEx(final Project project) {
super(project);
if (ApplicationManager.getApplication().isHeadlessEnvironment()) {
myContentManager = new NotNullLazyValue<ContentManager>() {
@NotNull
@Override
protected ContentManager compute() {
return ContentFactory.SERVICE.getInstance().createContentManager(new TabbedPaneContentUI(), true, project);
}
};
}
else {
myContentManager = new NotNullLazyValue<ContentManager>() {
@NotNull
@Override
protected ContentManager compute() {
ToolWindowManager toolWindowManager = ToolWindowManager.getInstance(project);
ToolWindow toolWindow =
toolWindowManager.registerToolWindow(ToolWindowId.INSPECTION, true, ToolWindowAnchor.BOTTOM, project);
ContentManager contentManager = toolWindow.getContentManager();
toolWindow.setIcon(AllIcons.Toolwindows.ToolWindowInspection);
new ContentManagerWatcher(toolWindow, contentManager);
return contentManager;
}
};
}
}
@NotNull
public static SuppressIntentionAction convertBatchToSuppressIntentionAction(@NotNull final SuppressQuickFix fix) {
return new SuppressIntentionAction() {
@Override
public void invoke(@NotNull Project project, Editor editor, @NotNull PsiElement element) throws IncorrectOperationException {
PsiElement container = fix instanceof AbstractBatchSuppressByNoInspectionCommentFix
? ((AbstractBatchSuppressByNoInspectionCommentFix )fix).getContainer(element) : null;
boolean caretWasBeforeStatement = editor != null && container != null && editor.getCaretModel().getOffset() == container.getTextRange().getStartOffset();
try {
ProblemDescriptor descriptor =
new ProblemDescriptorImpl(element, element, "", null, ProblemHighlightType.GENERIC_ERROR_OR_WARNING, false, null, false);
fix.applyFix(project, descriptor);
}
catch (IncorrectOperationException e) {
if (!ApplicationManager.getApplication().isUnitTestMode() && editor != null) {
Messages.showErrorDialog(editor.getComponent(),
InspectionsBundle.message("suppress.inspection.annotation.syntax.error", e.getMessage()));
}
else {
throw e;
}
}
if (caretWasBeforeStatement) {
editor.getCaretModel().moveToOffset(container.getTextRange().getStartOffset());
}
}
@Override
public boolean isAvailable(@NotNull Project project, Editor editor, @NotNull PsiElement element) {
return fix.isAvailable(project, element);
}
@NotNull
@Override
public String getText() {
return fix.getName();
}
@NotNull
@Override
public String getFamilyName() {
return fix.getFamilyName();
}
};
}
@Nullable
public static SuppressIntentionAction[] getSuppressActions(@NotNull InspectionProfileEntry tool) {
if (tool instanceof CustomSuppressableInspectionTool) {
return ((CustomSuppressableInspectionTool)tool).getSuppressActions(null);
}
if (tool instanceof BatchSuppressableTool) {
LocalQuickFix[] actions = ((BatchSuppressableTool)tool).getBatchSuppressActions(null);
return ContainerUtil.map2Array(actions, SuppressIntentionAction.class, new Function<LocalQuickFix, SuppressIntentionAction>() {
@Override
public SuppressIntentionAction fun(final LocalQuickFix fix) {
return convertBatchToSuppressIntentionAction((SuppressQuickFix)fix);
}
});
}
return null;
}
@NotNull
public ProblemDescriptor createProblemDescriptor(@NotNull final PsiElement psiElement,
@NotNull final String descriptionTemplate,
@NotNull final ProblemHighlightType highlightType,
@Nullable final HintAction hintAction,
boolean onTheFly,
final LocalQuickFix... fixes) {
return new ProblemDescriptorImpl(psiElement, psiElement, descriptionTemplate, fixes, highlightType, false, null, hintAction, onTheFly);
}
public GlobalInspectionContextImpl createNewGlobalContext(boolean reuse) {
final GlobalInspectionContextImpl inspectionContext;
if (reuse) {
if (myGlobalInspectionContext == null) {
myGlobalInspectionContext = inspectionContext = new GlobalInspectionContextImpl(getProject(), myContentManager);
}
else {
inspectionContext = myGlobalInspectionContext;
}
}
else {
inspectionContext = new GlobalInspectionContextImpl(getProject(), myContentManager);
}
myRunningContexts.add(inspectionContext);
return inspectionContext;
}
public void setProfile(final String name) {
myCurrentProfileName = name;
}
public void closeRunningContext(GlobalInspectionContextImpl globalInspectionContext){
myRunningContexts.remove(globalInspectionContext);
}
public Set<GlobalInspectionContextImpl> getRunningContexts() {
return myRunningContexts;
}
public static boolean inspectionResultSuppressed(@NotNull PsiElement place, @NotNull LocalInspectionTool tool) {
if (tool instanceof CustomSuppressableInspectionTool) {
return ((CustomSuppressableInspectionTool)tool).isSuppressedFor(place);
}
if (tool instanceof BatchSuppressableTool) {
return ((BatchSuppressableTool)tool).isSuppressedFor(place);
}
String alternativeId;
String id;
return SuppressionUtil.isSuppressed(place, id = tool.getID()) ||
(alternativeId = tool.getAlternativeID()) != null &&
!alternativeId.equals(id) &&
SuppressionUtil.isSuppressed(place, alternativeId);
}
@NotNull
@Deprecated
public ProblemDescriptor createProblemDescriptor(@NotNull final PsiElement psiElement,
@NotNull final String descriptionTemplate,
@NotNull final ProblemHighlightType highlightType,
@Nullable final HintAction hintAction,
final LocalQuickFix... fixes) {
return new ProblemDescriptorImpl(psiElement, psiElement, descriptionTemplate, fixes, highlightType, false, null, hintAction, true);
}
@TestOnly
public NotNullLazyValue<ContentManager> getContentManager() {
return myContentManager;
}
private final AtomicBoolean myToolsAreInitialized = new AtomicBoolean(false);
private static final Pattern HTML_PATTERN = Pattern.compile("<[^<>]*>");
public void buildInspectionSearchIndexIfNecessary() {
if (!myToolsAreInitialized.getAndSet(true)) {
final SearchableOptionsRegistrar myOptionsRegistrar = SearchableOptionsRegistrar.getInstance();
final InspectionToolRegistrar toolRegistrar = InspectionToolRegistrar.getInstance();
final Application app = ApplicationManager.getApplication();
if (app.isUnitTestMode() || app.isHeadlessEnvironment()) return;
app.executeOnPooledThread(new Runnable(){
@Override
public void run() {
List<InspectionToolWrapper> tools = toolRegistrar.createTools();
for (InspectionToolWrapper toolWrapper : tools) {
processText(toolWrapper.getDisplayName().toLowerCase(), toolWrapper, myOptionsRegistrar);
final String description = toolWrapper.loadDescription();
if (description != null) {
@NonNls String descriptionText = HTML_PATTERN.matcher(description).replaceAll(" ");
processText(descriptionText, toolWrapper, myOptionsRegistrar);
}
}
}
});
}
}
private static void processText(@NotNull @NonNls String descriptionText,
@NotNull InspectionToolWrapper tool,
@NotNull SearchableOptionsRegistrar myOptionsRegistrar) {
if (ApplicationManager.getApplication().isDisposed()) return;
final Set<String> words = myOptionsRegistrar.getProcessedWordsWithoutStemming(descriptionText);
for (String word : words) {
myOptionsRegistrar.addOption(word, tool.getShortName(), tool.getDisplayName(), InspectionToolsConfigurable.ID, InspectionToolsConfigurable.DISPLAY_NAME);
}
}
}
|
Agrammatic but numerate. A central question in cognitive neuroscience concerns the extent to which language enables other higher cognitive functions. In the case of mathematics, the resources of the language faculty, both lexical and syntactic, have been claimed to be important for exact calculation, and some functional brain imaging studies have shown that calculation is associated with activation of a network of left-hemisphere language regions, such as the angular gyrus and the banks of the intraparietal sulcus. We investigate the integrity of mathematical calculations in three men with large left-hemisphere perisylvian lesions. Despite severe grammatical impairment and some difficulty in processing phonological and orthographic number words, all basic computational procedures were intact across patients. All three patients solved mathematical problems involving recursiveness and structure-dependent operations (for example, in generating solutions to bracket equations). To our knowledge, these results demonstrate for the first time the remarkable independence of mathematical calculations from language grammar in the mature cognitive system. |
<reponame>RochBlondiaux/minishell
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* messages.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rblondia <<EMAIL>> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/01/20 20:57:04 by rblondia #+# #+# */
/* Updated: 2022/01/29 16:57:17 by rblondia ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef MESSAGES_H
# define MESSAGES_H
# define APP_INITIALIZATION_FAILED "Application initialization failed!"
# define COMMAND_NOT_FOUND "🦄 Command not found!"
# define EXIT_MESSAGE "🌈 Goodbye buddy! 🌈"
# define TOO_MANY_ARGUMENTS "Too many arguments!"
# define SYNTAX_ERROR "❌ Syntax error"
# define UNSET_ERROR "unset: invalid parameter name"
# define OLDPWD_UNDEFINED "OLDPWD not set"
# define NOT_ENOUGH_ARGS "👌 Not enough arguments"
# define PERMISSION_DENIED "✋ Permission denied"
# define FORK_ERROR "🍴 Fork error"
# define PIPE_ERROR "🔩 PIPE error"
# define HOME_UNDEFINED "🏚 You don't have a house!"
# define PWD_UNDEFINED "PWD not set"
# define ENV_ERROR "Unable to fetch env variables."
# define AMBIGUOUS_REDIRECTION "😏 Ambiguous redirect"
# define INVALID_CONTEXT "not valid in this context: "
# define MALLOC_ERROR "malloc error"
# define IS_DIRECTORY "🧼 is a directory!"
#endif |
public class Foo {
{
foo<caret>(x);
}
} |
Researchers at North Carolina State University in the US have developed a new type of armour that not only withstands bullets, but turns them to dust upon impact. The armour in question is constructed from a substance known as composite metal foam (CMF) and opens up possibilities for new types of lightweight protection for both vehicles and personnel.
CMFs are both lighter and stronger than the plate armour typically used for body and vehicle protection and have also been proven highly effective at withstanding various types of radiation, including X-rays, gamma rays and neutron radiation. Most recently, researchers at NCSU have been testing CMFs for their projectile-stopping properties.
The team, led by mechanical and aerospace engineering professor Afsaneh Rabiei, constructed a composite armour made from CMFs measuring less than one inch thick and put it to the test against an armour-piercing round. The bullet being used in the video below is a 7.62 x 63 millimetre M2 projectile and was fired according to the National Institute of Justice's (NIJ) standard testing procedures. Not only did the CMF armour stop the round, it completely pulverised it.
Rabiei said: "We could stop the bullet at a total thickness of less than an inch, while the indentation on the back was less than eight millimetres. To put that in context, the NIJ standard allows up to 44 millimetres indentation in the back of an armour."
Beyond offering new types of ultra-lightweight body armour, CMFs are also highly effective at blocking heat, opening up potential use cases in space travel and for transporting explosives and other hazardous materials.
You can find out more about the awesome properties of CMFs in NCSU's 2015 research paper, titled Composite Structures. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.