content
stringlengths 7
2.61M
|
---|
import { config, dom, library } from '@fortawesome/fontawesome-svg-core';
import { faTimes, faPlus, faCheck, faTrash } from '@fortawesome/free-solid-svg-icons';
import { Aurum, AurumElement, AttributeValue } from 'aurumjs';
import { AurumData } from '../../utils/types/data_types';
config.autoReplaceSvg = true;
config.observeMutations = true;
// Insert the fontawesome style into the <head>
dom.insertCss();
// Watch the dom for icon changes or additions
dom.watch();
/**
* Step 1: import and add any new icons here
*/
library.add(faTimes, faPlus, faCheck, faTrash);
/**
* Step 2: add icon to predefined class
*/
export const enum IconClass {
ADD = 'fas fa-plus',
CONFIRM = 'fas fa-check',
DELETE = 'fas fa-trash',
CROSS = 'fas fa-times'
}
export function Icon(props: { iconClass: AurumData<IconClass>; className?: AurumData<string>; style?: AttributeValue }): AurumElement {
const { iconClass, className = '', style } = props;
return <i class={`${iconClass} ${className}`} style={style} />;
}
|
Google's new 'Search plus your world' has come under fire for 'warping' the search giant's results.
The feature, which mixes 'standard' Google search results with personalised results from Google's Plus social network, has been criticised by Twitter's general counsel Alex Macgillivray - himself an ex-employee of the search giant.
The feature, which offers users the option to add Google Plus results to search, to create personalised results, was announced by Google yesterday.
'Search is still limited to a universe of webpages created publicly, mostly by people you’ve never met. Today, we’re changing that by bringing your world, rich with people and information, into search,' said the company.
Twitter has criticised Google for showing results for celebrity Google Plus accounts - but not for their Facebook or Twitter accounts.
In an interview with Marketing Land, Google's Eric Schmidt denied that the company's results were made to prioritise Plus over other social services.
Others have criticised Google for the heavy-handed way Plus results are added to Google searches.
The exclusive Plus recommendations in Google's search results are 'exactly the kind of thing that the antitrust people are screaming about,' said Danny Sullivan, an industry expert who has been following Google since the 1990s. |
from PIL import Image
from glob import glob
from os import path
from shutil import copytree, rmtree
def get_all_file_names(dir_name: str) -> list:
"""
Recursively gets all file names from given directory
Args:
dir_name (str): Directory name
Returns:
list: Names of all files in directory
"""
all_names = sorted(glob(path.join(dir_name, "*.png")))
collected_names = []
for name in all_names:
if path.isfile(name):
collected_names.append(name)
elif path.isdir(name):
collected_names += get_all_file_names(name)
return collected_names
def process_images(new_size: tuple) -> None:
"""
Transforms raw image data to processed unit icons. REMOVES ./data directory
Args:
new_size (tuple): Size of cleaned images
"""
if path.exists("./data"):
rmtree("./data")
copytree("./raw_data", "./data")
file_names = get_all_file_names("./data/cards")
for image_name in file_names:
Image.open(image_name).resize(new_size).save(image_name)
if __name__ == "__main__":
process_images((136, 136))
|
/*************************************************************************/
/* godot_js.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 <NAME>, <NAME>. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#ifndef GODOT_JS_H
#define GODOT_JS_H
#ifdef __cplusplus
extern "C" {
#endif
#include "stddef.h"
// Config
extern void godot_js_config_locale_get(char *p_ptr, int p_ptr_max);
extern void godot_js_config_canvas_id_get(char *p_ptr, int p_ptr_max);
// OS
extern void godot_js_os_finish_async(void (*p_callback)());
extern void godot_js_os_request_quit_cb(void (*p_callback)());
extern int godot_js_os_fs_is_persistent();
extern void godot_js_os_fs_sync(void (*p_callback)());
extern int godot_js_os_execute(const char *p_json);
extern void godot_js_os_shell_open(const char *p_uri);
extern int godot_js_os_hw_concurrency_get();
extern int godot_js_pwa_cb(void (*p_callback)());
extern int godot_js_pwa_update();
// Input
extern void godot_js_input_mouse_button_cb(int (*p_callback)(int p_pressed, int p_button, double p_x, double p_y, int p_modifiers));
extern void godot_js_input_mouse_move_cb(void (*p_callback)(double p_x, double p_y, double p_rel_x, double p_rel_y, int p_modifiers));
extern void godot_js_input_mouse_wheel_cb(int (*p_callback)(double p_delta_x, double p_delta_y));
extern void godot_js_input_touch_cb(void (*p_callback)(int p_type, int p_count), uint32_t *r_identifiers, double *r_coords);
extern void godot_js_input_key_cb(void (*p_callback)(int p_type, int p_repeat, int p_modifiers), char r_code[32], char r_key[32]);
// Input gamepad
extern void godot_js_input_gamepad_cb(void (*p_on_change)(int p_index, int p_connected, const char *p_id, const char *p_guid));
extern int godot_js_input_gamepad_sample();
extern int godot_js_input_gamepad_sample_count();
extern int godot_js_input_gamepad_sample_get(int p_idx, float r_btns[16], int32_t *r_btns_num, float r_axes[10], int32_t *r_axes_num, int32_t *r_standard);
extern void godot_js_input_paste_cb(void (*p_callback)(const char *p_text));
extern void godot_js_input_drop_files_cb(void (*p_callback)(char **p_filev, int p_filec));
// Display
extern int godot_js_display_screen_dpi_get();
extern double godot_js_display_pixel_ratio_get();
extern void godot_js_display_alert(const char *p_text);
extern int godot_js_display_touchscreen_is_available();
extern int godot_js_display_is_swap_ok_cancel();
extern void godot_js_display_setup_canvas(int p_width, int p_height, int p_fullscreen, int p_hidpi);
// Display canvas
extern void godot_js_display_canvas_focus();
extern int godot_js_display_canvas_is_focused();
// Display window
extern void godot_js_display_desired_size_set(int p_width, int p_height);
extern int godot_js_display_size_update();
extern void godot_js_display_window_size_get(int32_t *p_x, int32_t *p_y);
extern void godot_js_display_screen_size_get(int32_t *p_x, int32_t *p_y);
extern int godot_js_display_fullscreen_request();
extern int godot_js_display_fullscreen_exit();
extern void godot_js_display_window_title_set(const char *p_text);
extern void godot_js_display_window_icon_set(const uint8_t *p_ptr, int p_len);
extern int godot_js_display_has_webgl(int p_version);
// Display clipboard
extern int godot_js_display_clipboard_set(const char *p_text);
extern int godot_js_display_clipboard_get(void (*p_callback)(const char *p_text));
// Display cursor
extern void godot_js_display_cursor_set_shape(const char *p_cursor);
extern int godot_js_display_cursor_is_hidden();
extern void godot_js_display_cursor_set_custom_shape(const char *p_shape, const uint8_t *p_ptr, int p_len, int p_hotspot_x, int p_hotspot_y);
extern void godot_js_display_cursor_set_visible(int p_visible);
extern void godot_js_display_cursor_lock_set(int p_lock);
extern int godot_js_display_cursor_is_locked();
// Display listeners
extern void godot_js_display_fullscreen_cb(void (*p_callback)(int p_fullscreen));
extern void godot_js_display_window_blur_cb(void (*p_callback)());
extern void godot_js_display_notification_cb(void (*p_callback)(int p_notification), int p_enter, int p_exit, int p_in, int p_out);
// Display Virtual Keyboard
extern int godot_js_display_vk_available();
extern void godot_js_display_vk_cb(void (*p_input)(const char *p_text, int p_cursor));
extern void godot_js_display_vk_show(const char *p_text, int p_multiline, int p_start, int p_end);
extern void godot_js_display_vk_hide();
#ifdef __cplusplus
}
#endif
#endif /* GODOT_JS_H */
|
/**
* Class for parsing text files where each line consists of fields separated by whitespace.
* Code is abstracted into this class so that we can optimize its performance over time.
*
* This class assumes that every line will have the same number of whitespace-separated "words"
* and that lines that start with "#" are comments and should be ignored.
*
* Classes that extend this parser can do so simply by implementing their own constructors and the
* readNextLine(), close(), and getFileName() methods.
*
* @author Kathleen Tibbetts
*/
public abstract class AbstractInputParser
extends AbstractIterator<String[]>
implements Iterable<String[]>, CloseableIterator<String[]> {
private boolean treatGroupedDelimitersAsOne = true; // Whether multiple delimiters in succession should be treated as one
private int wordCount = 0; /* The number of delimiter-separated "words" per line of the file.
We can save a little caclulation, or handle files with varying numbers of
words per line, by specifying this if known in advance */
private boolean skipBlankLines = true;
/**
* Closes this stream and releases any system resources associated with it.
*/
public abstract void close();
/**
* @return the next line of text from the underlying stream(s) or null if there is no next line
*/
protected abstract byte[] readNextLine();
/**
* @return the name(s) of the file(s) being parsed, or null if no name is available
*/
public abstract String getFileName();
/**
* @return an iterator over a set of elements of type String[]
*/
public Iterator<String[]> iterator() {
if (isIterating()) {
throw new IllegalStateException("iterator() method can only be called once, before the" +
"first call to hasNext()");
}
hasNext();
return this;
}
@Override
protected String[] advance() {
byte[] nextLine;
do {
nextLine = readNextLine();
}
while (nextLine != null && ((this.skipBlankLines && isBlank(nextLine)) || isComment(nextLine)));
return nextLine == null ? null : parseLine(nextLine);
}
/**
* This method represents the most efficient way (so far) to parse a line of whitespace-delimited text
*
* @param line the line to parse
* @return an array of all the "words"
*/
private String[] parseLine(final byte[] line) {
if (getWordCount() == 0) {
calculateWordCount(line);
}
final String[] parts = new String[getWordCount()];
boolean delimiter = true;
int index=0;
int start = 0;
try
{
for (int i = 0; i < line.length; i++) {
if (isDelimiter(line[i])) {
if (!delimiter) {
parts[index++] = new String(line,start,i-start);
}
else if(!isTreatGroupedDelimitersAsOne()) {
parts[index++] = null;
}
delimiter=true;
}
else {
if (delimiter) start = i;
delimiter = false;
}
}
if (!delimiter) {
parts[index] = new String(line,start,line.length-start);
}
}
catch (ArrayIndexOutOfBoundsException e) {
throw new PicardException("Unexpected number of elements found when parsing file " +
this.getFileName() + ": " + index + ". Expected a maximum of " +
this.getWordCount() + " elements per line:" + new String(line,0,line.length), e);
}
return parts;
}
/**
* Calculates the number of delimiter-separated "words" in a line and sets the value of <code>wordCount</code>
*
* @param line representative line from the file
*/
protected void calculateWordCount(final byte[] line) {
int words = 0;
boolean delimiter = true;
for (final byte b : line) {
if (isDelimiter(b)) {
if (delimiter && !isTreatGroupedDelimitersAsOne()) words++;
delimiter = true;
} else {
if (delimiter) words++;
delimiter = false;
}
}
if (delimiter && !isTreatGroupedDelimitersAsOne()) {
words += 1;
}
setWordCount(words);
}
/**
* Determines whether a given line is a comment
*
* @param line the line to evaluate
* @return true if the line is a comment (and should be ignored) otherwise false
*/
protected boolean isComment(final byte[] line) {
return line.length > 0 && line[0] == '#';
}
/**
* Determines whether a given line is a comment
*
* @param line the line to evaluate
* @return true if the line is a comment (and should be ignored) otherwise false
*/
protected boolean isBlank(final byte[] line) {
return line.length == 0;
}
/**
* Determines whether a given character is a delimiter
*
* @param b the character to evaluate
* @return true if <code>b</code> is a delimiter; otherwise false
*/
protected boolean isDelimiter(final byte b) {
return b == ' ' || b == '\t';
}
protected int getWordCount() { return wordCount; }
protected void setWordCount(final int wordCount) { this.wordCount = wordCount; }
protected boolean isTreatGroupedDelimitersAsOne() { return treatGroupedDelimitersAsOne; }
protected void setTreatGroupedDelimitersAsOne(final boolean treatGroupedDelimitersAsOne) {
this.treatGroupedDelimitersAsOne = treatGroupedDelimitersAsOne;
}
protected boolean isSkipBlankLines() { return this.skipBlankLines; }
protected void setSkipBlankLines(final boolean skipBlankLines) {
this.skipBlankLines = skipBlankLines;
}
} |
WASHINGTON (Reuters) - The United States said on Friday it was deeply concerned by the sentencing of a Vietnamese dissident to 20 years in prison this week, calling a trend of increased arrests and harsh sentences for peaceful activism troubling.
A U.S. State Department statement on the sentencing of Le Dinh Luong after a one-day trial on Thursday called on Vietnam to release all prisoners of conscience immediately.
Luong, 53, was arrested last year after encouraging people to boycott a National Assembly election, writing Facebook posts that expressed views against the ruling Communist Party and state, and inciting protests against a Taiwanese steel firm. He was charged with attempting to overthrow the state.
“The trend of increased arrests and harsh sentences for peaceful activists in Vietnam is troubling,” the State Department said.
Despite sweeping economic reform and increasing openness to social change, Vietnam’s Communist Party retains tight media censorship and does not tolerate criticism.
The United States has developed close ties with Vietnam in recent years, seeing it as an important regional partner in the face of China’s rapid rise, but Washington has remained critical of Hanoi over human rights.
It has also criticized Hanoi over a cybersecurity law that tightens control of the internet and global technology companies operating in the country, raising fears of economic harm and a further crackdown on dissent.
Vietnamese state media cited police as saying that Luong was a “dangerous” member of Viet Tan, a U.S.-based human rights group that Vietnam regards as a “terrorist” body.
New York-based Human Rights Watch has called the charges against Luong politically motivated. |
//
// Licensed to Green Energy Corp (www.greenenergycorp.com) under one or
// more contributor license agreements. See the NOTICE file distributed
// with this work for additional information regarding copyright ownership.
// Green Energy Corp licenses this file to you under the Apache License,
// Version 2.0 (the "License"); you may not use this file except in
// compliance with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// This file was forked on 01/01/2013 by Automatak, LLC and modifications
// have been made to this file. Automatak, LLC licenses these modifications to
// you under the terms of the License.
//
#include <boost/test/unit_test.hpp>
#include <opendnp3/Util.h>
#include "TestHelpers.h"
#include "BufferHelpers.h"
using namespace std;
using namespace opendnp3;
BOOST_AUTO_TEST_SUITE(UtilSuite)
template <int N>
void TestHex(const std::string& aHex, uint8_t* aCompareBytes, size_t aCount)
{
HexSequence hs(aHex);
BOOST_REQUIRE(hs.Size() <= N);
BOOST_REQUIRE_EQUAL(hs.Size(), aCount );
for ( size_t i = 0; i < aCount; i++ )
BOOST_REQUIRE_EQUAL(hs[i], aCompareBytes[i]);
}
BOOST_AUTO_TEST_CASE(HexToBytes2TestSmall)
{
uint8_t values[] = { 0xAF, 0x23 };
TestHex<2>( "AF23", values, 2 );
}
BOOST_AUTO_TEST_CASE(HexToBytes2Test64)
{
uint8_t values[] = { 0x13, 0xA2, 0x00, 0x40, 0x56, 0x1D, 0x08 };
TestHex<7>( "13A20040561D08", values, 7 );
}
BOOST_AUTO_TEST_CASE(HexToBytes2Test64TooBig)
{
uint8_t values[] = { 0x13, 0xA2, 0x00, 0x40, 0x56, 0x1D, 0x08 };
TestHex<8>( "13A20040561D08", values, 7 );
}
BOOST_AUTO_TEST_CASE(HexToBytes2Test64Hole)
{
uint8_t values[] = { 0x13, 0xA2, 0x00, 0x40, 0x56, 0x1D, 0x08 };
TestHex<8>( "13A200 40561 D08", values, 7 );
}
BOOST_AUTO_TEST_SUITE_END()
|
Ninety-Day Survival of a Calf Implanted with a Continuous-Flow Total Artificial Heart We evaluated the effects of steady state flow and perfusion on end-organ function in a long-term calf model. The animal received a continuous-flow total artificial heart (CFTAH) that we created from two axial-flow ventricular assist devices. Pump flow, blood pressure, and other pump parameters were monitored throughout the study, as were arterial blood gas and hematologic values, including neurohormone levels. Some hematologic values were mildly abnormal transiently after surgery but returned to acceptable levels within the first week. During the 90-day study, the calf showed no signs of hemolysis or thrombosis. Its mental function remained normal, as evidenced by the animals interest in its surroundings and response to stimuli. End-organ and vasomotor function was not adversely affected by 90 days of steady state flow. This was the first study in which CFTAH support of an animal model was maintained for this duration. |
<gh_stars>1-10
import { inspect, InspectOptionsStylized } from "util";
import { JSONAble } from "../types";
export function makeInspectJson(
name: string,
): (depth: number, options: InspectOptionsStylized) => string {
return function (
this: JSONAble,
depth: number,
options: InspectOptionsStylized,
) {
if (depth < 0) {
return options.stylize(`[${name}]`, "special");
}
const newOptions = Object.assign({}, options, {
depth: options.depth == null ? null : options.depth - 1,
});
const inner = inspect(this.toJSON(), newOptions);
return `${name} ${inner}`;
};
}
|
export { default as HeaderSection } from './Header.vue';
|
Study of Incidence of Acute Kidney Injury in Acute Myocardial Infarction and its Impact on Hospital Outcome Introduction: Acute kidney injury(AKI) is a common complication after acute myocardial infarction (AMI), affecting 10 to 55% of the patients.1-4 The mechanisms causing AKI in the first few days after an AMI are multifactorial, including systemic and renal hemodynamic changes secondary to an impaired cardiac output and an imbalance of vasodilators and vasoconstrictors, the use of contrast media, and immunological and inflammatory kidney damage resulting from crosstalk between the heart and the kidney Material and Methods: The study was conducted on 224 ST-segment elevations myocardial infarction (STEMI) patients admitted to a tertiary care hospital during December 2018-December 2020. The patients were divided into two groups depending on the development of AKI according to KDIGO (Kidney disease improving global outcomes) guidelines. Results: Out of 224 patients, 57 patients (25.45%) developed AKI and 167 patients (74.55%) did not develop AKI. So, the incidence in our study was 25.45%. When various risk factors were compared in both the groups diabetes and higher BMI (body mass index) were found to be significantly associated with AKI. The mortality in the AKI group was 28.07% while in the non-AKI it was 1.79%. In-hospital complications like cardiogenic shock left ventricular failure (LVF), arrhythmias were associated with increased incidence of AKI. Using multiple logistic regression analysis, age, presence of diabetes, tachycardia on admission, raised blood sugar on admission, decreased ejection fraction (EF), presence of cardiogenic shock and arrhythmia were independent risk factors for AKI. Conclusion: AKI in STEMI was associated with increased mortality and complications. INTRODUCTION Ischemic heart disease is the leading cause of death among adults in developed as well as in developing countries and accounts for a substantial fraction of the total disease burden globally. AKI (Acute kidney injury) is a common complication after acute myocardial infarction (AMI), affecting from 10 to 55% of the patients. AKI in STEMI has been consistently associated with a worse outcome, and namely with strikingly higher short-term and long-term mortality rates. 3,5,6, The overall survival of patients with ST-elevation myocardial infarction (STEMI) has significantly improved during the past two decades, due to the combined use of novel phar-macologic therapies and aggressive revascularization strategies. 7 The interest of cardiologists is now shifting towards subsets of patients whose mortality remains very high, thus contributing to the overall mortality of STEMI. Those developing AKI represent a critical example of STEMI patients associated with a poor prognosis. A growing amount of data confirms the clinical and prognostic relevance of AKI in this clinical setting. However, it is worth noting that the current guidelines on the management of STEMI patients do not focus much attention on AKI. Surprisingly, while recommendations exist for the management of rare STEMI-associated complications, such as mitral valve rupture or Dressler pericarditis, no clear indications are provided on the management of this frequent complication. 6,7 Indeed, The National Confidential Enquiry into Patient Outcome and Death (NCEPOD) Adding Insult to Injury AKI Study reported, in 2009, that only 50% of patients who died with AKI in different clinical contexts received good care. Therefore, this study was carried out to know the incidence of AKI in acute MI and its impact on hospital outcomes. MATERIAL AND METHODS This prospective observational study was carried out on 224 patients of ST-elevation myocardial infarction (STEMI) in the intensive care unit of the tertiary care centre from December 2018-December 2020. Patients with acute ST-segment elevation myocardial infarction proven by ECG (STsegment elevation > 0.1mV in at least 2 contiguous leads) and cardiac enzymes (Positive Troponin I or CPK-MB) were included in our study. Patients who presented with Non-ST Elevation MI (NSTEMI) /Unstable angina (UA), who had evidence of chronic kidney disease, who were on renal replacement therapy and any prior use of nephrotoxic drugs were excluded from the study. A complete history including sociodemographic characters and risk factors was taken. Detailed clinical examination and relevant investigations were done. Two groups were made according to the development of AKI based on KDIGO guidelines. Various complications and outcomes were compared between the two groups. Statistical analysis-Collected data were entered into a Microsoft Excel spreadsheet. Tables and Charts were generated using Microsoft word and excel software. Continuous variables were presented as Mean ±SD. Categorical variables were expressed in frequency and percentages. Continuous variables were compared between with and without AKI by performing an independent t-test. Categorical variables were compared by performing a chi-square test. For small numbers, Fisher exact test was used. Multiple logistic regression analysis was performed to identify independent risk factors of acute kidney injury in patients of MI. Adjusted Odds ratio, 95%confidence interval & p-values were reported. P-value < 0.05 was considered as statistical significance. Statistical software STATA version 14.0 was used for data analysis. RESULTS Out of 224 patients, 57 patients (25.45%) developed AKI and 167 patients (74.55%) did not develop AKI (Table-1). So, the incidence in our study was 25.45%. The mean age of patients in the AKI Group and Non-AKI Group was 59.97 ±10.96 and 53.97±10.96 respectively (Table-2). There was a statistically significant difference between mean age and incidence of AKI. Out of 224 patients, 137 were males (61.16%) and 87 were females (38.84%). Out of the total of 137 males, 41 males (29.93%) developed AKI. Out of the total of 87 females, 16 females (18.40%) developed AKI (Table-3). There was no significant difference between the two groups. When various risk factors were compared in both the groups, diabetes and higher BMI were found to be significantly associated with AKI. Alcohol, smoking, hypertension and dyslipidemia were not found to be significant (Table-4). The maximum number of patients is 41.9% who had AWMI (anterior wall myocardial infarction). There was no statistically significant difference in the area of myocardium involved and AKI. Various clinical parameters at the time of admission were compared between the two groups. Heart rate, systolic blood pressure, diastolic blood pressure and random blood sugar were found to be highly significant( Figure-1). Mean EF in the AKI group was found to be 38.85±6.65 and in the non-AKI group, it was 44.04±5.29 (Table-5). This indicates that lower EF is significantly associated with the development of AKI. Patients of AKI were divided based on severity (Figure-2). Out of 57 patients, 23 patients were in mild, 22 is moderate and 12 in severe category respectively. Total 44 patients (19.64%) developed cardiogenic shock. 33 patients (75%) developed AKI and 11 patients (25%) did not develop AKI (Table-6). There was a statistically significant increase in the number of patients developing AKI who developed cardiogenic shock. A total of 29 patients (12.94%) had evidence of LVF in the study. Out of the 29 patients, 25 patients (86.20%) developed AKI and 4 patients (13.80%) did not develop AKI. There was a statistically significant difference in both groups. A total of 18 patients (8.03%) in the study developed arrhythmias. 15 patients (83.33%) developed AKI and 3 patients (16.67%) did not develop AKI. This difference was found to be statistically significant. Total 7 patients (3.12%) in the study developed AV blocks. 1 patient (14.29%) developed AKI and 6 patients (85.71%) did not develop AKI. Statistically, there was no significant association of AV blocks with AKI. Total 19 deaths (8.48%) occurred in the study. 16 deaths (28.07%) occurred in AKI and 3 deaths (1.79%) occurred in non-AKI (Table-7). This difference was statistically highly significant. It means that mortality was very high in patients who had AKI. A higher length of hospital stay was seen in deaths and discharge of the AKI group. Using multiple logistic regression age, history of diabetes, tachycardia, hyperglycemia, low EF, presence of cardiogenic shock and arrhythmias were independent risk factors for AKI (Table-8). DISCUSSION In our study out of the total 224, 57 developed AKI (25.45%) and 167 patients did not develop AKI (74.55%). The incidence of AKI in our study was 25.45%. The overall incidence of AKI is reported 10 to 55 % in various studies. 1-4 Wang et al. and Amit Amin et al. reported incidence of 26% and 22.5% respectively which was similar to the present study. 8,9 The mean age in the AKI group was 59.97±10.96 and in the non-AKI group was 53.97±10.96 respectively. When compared statistically the difference was found to be significant. Rodrigues et al., Reinstadler et al. and Bruetto et al. reported similar findings. 1,10,11 So higher the age higher the chance of developing AKI. The reason could be that in the absence of a specific disease, the kidney undergoes agedependent structural and functional alterations leading to a significant decrease in renal mass, functioning nephron numbers, and baseline kidney function. 12 Out of the total 224 patients of STEMI, there were 137 males (61.16%) and 87 females (38.84%). Other studies like Yan Bei Sun et al. and Bruetto et al. also showed male preponderance. 1,13 Various risk factors were compared between both the groups which included hypertension, diabetes, alcohol intake, smoking, BMI and dyslipidemia. Out of this diabetes and increased BMI were significantly associated with AKI. Reinstadler et al. and Moriyama et al. also studied same factors. But the statistically significant difference was found only with diabetes. 11,14 Various clinical and laboratory parameters on admission were considered which included heart rate(HR), systolic blood pressure(SBP), diastolic blood pressure(DBP), random blood sugar(RBS). So, tachycardia, low SBP, low DBP and increased RBS were found to be significantly associated with AKI. Tachycardia was also found significant by Moriyama et al. and Fox et al. 14,15 Increased heart rate could be explained by increased sympathetic activity in left ventricular failure and reactive tachycardia due to cardiogenic shock. Low SBP and DBP were found highly significant in the studies by Moriyama et al. and Wang et al. 9,14 This is explained by the fact that reduction in blood pressure which could be a result of cardiogenic shock reduces renal perfusion thus leading to AKI.In our study stress hyperglycemia was associated with increased incidence of AKI. This fact was also supported by Yan Bei Sun et al. Hyperglycemia may thus represent an epiphenomenon of the stress response mediated by cortisol and catecholamines, whose release is elicited by the hemodynamic compromise or myocardial damage. Hyperglycemia exerts a direct negative impact on renal function. 16 When LV function was assessed by echocardiography there was a significant association of low EF with AKI. There was evidence of arrhythmia in 18 patients (8.03%) out of 224. Out of them, 15 patients (83.33%) developed AKI and 3 patients (16.67%) did not develop AKI. So, the presence of arrhythmia makes the patient prone to the development of AKI. The finding in our study was also supported by Cong Wang et al. 9 The mortality in our study was 28.07% in the AKI group and 1.79% in the non-AKI group. So, the development of AKI in STEMI increases mortality. This observation was also supported by the study of Moriyama et al. 14 CONCLUSION AKI developing in patients with acute myocardial infarction is associated with a higher rate of complications and in-hospital mortality. ACKNOWLEDGEMENT Authors acknowledge the immense help received from the scholars whose articles are cited and included in the references of this manuscript. The authors are also grateful to the authors and publishers of all those articles, journals and books from where the literature for this article has been reviewed and discussed. Source of Funding-None Ethical Clearance-Taken |
Articles of Significant Interest Selected from This Issue by the Editors Studies with several bacteria species have implicated FliL, a flagellar motor-associated protein, as critical to swarming motility and, in Proteus mirabilis, mechanosensing of a surface prior to biofilm formation. Lee and Belas (p. 159 173) have constructed a near-total deletion of P. mirabilis fliL. In contrast with other fliL defects, cells with a deletion of fliL possess temperature-dependent swarming and become more responsive to low-viscosity surfaces. A fliL strain of Escherichia coli phenocopies the P. mirabilis fliL strain in being Swr with an alteration in temperature-dependent motility. These results suggest a role for FliL in modulating motor energetics during biofilm formation. |
// TestKopsUpgrades tests the version logic for kops versions
func TestKopsUpgrades(t *testing.T) {
srcDir := "simple"
sourcePath := path.Join(srcDir, "channel.yaml")
sourceBytes, err := ioutil.ReadFile(sourcePath)
if err != nil {
t.Fatalf("unexpected error reading sourcePath %q: %v", sourcePath, err)
}
channel, err := kops.ParseChannel(sourceBytes)
if err != nil {
t.Fatalf("failed to parse channel: %v", err)
}
grid := []struct {
KopsVersion string
ExpectedUpgrade string
ExpectedRequired bool
ExpectedError bool
}{
{
KopsVersion: "1.4.4",
ExpectedUpgrade: "1.4.5",
ExpectedRequired: true,
},
{
KopsVersion: "1.4.5",
ExpectedUpgrade: "",
},
{
KopsVersion: "1.5.0-alpha4",
ExpectedUpgrade: "1.5.0-beta1",
ExpectedRequired: true,
},
{
KopsVersion: "1.5.0-beta1",
ExpectedUpgrade: "",
},
{
KopsVersion: "1.5.0-beta2",
ExpectedUpgrade: "",
},
{
KopsVersion: "1.5.0",
ExpectedUpgrade: "1.5.1",
ExpectedRequired: false,
},
{
KopsVersion: "1.5.1",
ExpectedUpgrade: "",
},
}
for _, g := range grid {
kopsVersion := semver.MustParse(g.KopsVersion)
versionInfo := kops.FindKopsVersionSpec(channel.Spec.KopsVersions, kopsVersion)
if versionInfo == nil {
t.Errorf("unable to find version information for kops version %q in channel", kopsVersion)
continue
}
actual, err := versionInfo.FindRecommendedUpgrade(kopsVersion)
if g.ExpectedError {
if err == nil {
t.Errorf("expected error from FindRecommendedUpgrade(%q)", g.KopsVersion)
continue
}
} else {
if err != nil {
t.Errorf("unexpected error from FindRecommendedUpgrade(%q): %v", g.KopsVersion, err)
continue
}
}
if semverString(actual) != g.ExpectedUpgrade {
t.Errorf("unexpected result from IsUpgradeRequired(%q): expected=%q, actual=%q", g.KopsVersion, g.ExpectedUpgrade, actual)
continue
}
required, err := versionInfo.IsUpgradeRequired(kopsVersion)
if err != nil {
t.Errorf("unexpected error from IsUpgradeRequired(%q): %v", g.KopsVersion, err)
continue
}
if required != g.ExpectedRequired {
t.Errorf("unexpected result from IsUpgradeRequired(%q): expected=%t, actual=%t", g.KopsVersion, g.ExpectedRequired, required)
continue
}
}
} |
Response-Time Analysis of Synchronous Parallel Tasks in Multiprocessor Systems Programmers resort to user-level parallel frameworks in order to exploit the parallelism provided by multiprocessor platforms. While such general frameworks do not support the stringent timing requirements of real-time systems, they offer a useful model of computation based on the standard fork/join, for which the analysis of timing properties makes sense. Very few works analyse the schedulability of synchronous parallel real-time tasks, which is a generalisation of the standard fork/join model. This paper proposes to narrow the gap by presenting a model that analyses the response-time of synchronous parallel real-time tasks. The model under consideration targets tasks with fixed priorities, composed of several segments with an arbitrary number of parallel and independent units of execution. We contribute to the state-of-the-art by analysing the response-time behaviour of synchronous parallel tasks. To accomplish this, we take into account concepts previously proposed in the literature and define new concepts such as carry-out decomposition and sliding window technique in order to compute the worst-case workload in a window of interest. Results show that the proposed approach is significantly better than current approaches, improving the state-of-the-art analysis of parallel real-time tasks. |
package state
import (
"math/big"
"github.com/FactomProject/FactomCode/factoid/log"
"github.com/FactomProject/FactomCode/factoid/trie"
"github.com/FactomProject/FactomCode/factoid/util"
)
var statelogger = log.NewLogger("STATE")
type State struct {
// The trie for this structure
Trie *trie.Trie
stateObjects map[string]*StateObject
}
// Create a new state from a given trie
func New(trie *trie.Trie) *State {
return &State{Trie: trie, stateObjects: make(map[string]*StateObject)}
}
// Retrieve the balance from the given address or 0 if object not found
func (self *State) GetBalance(addr []byte) *big.Int {
stateObject := self.GetStateObject(addr)
if stateObject != nil {
return stateObject.Balance
}
return util.Big0
}
func (self *State) GetNonce(addr []byte) uint64 {
stateObject := self.GetStateObject(addr)
if stateObject != nil {
return stateObject.Nonce
}
return 0
}
//
// Setting, updating & deleting state object methods
//
// Update the given state object and apply it to state trie
func (self *State) UpdateStateObject(stateObject *StateObject) {
addr := stateObject.Address()
self.Trie.Update(string(addr), string(stateObject.RlpEncode()))
}
// Delete the given state object and delete it from the state trie
func (self *State) DeleteStateObject(stateObject *StateObject) {
self.Trie.Delete(string(stateObject.Address()))
delete(self.stateObjects, string(stateObject.Address()))
}
// Retrieve a state object given my the address. Nil if not found
func (self *State) GetStateObject(addr []byte) *StateObject {
addr = util.Address(addr)
stateObject := self.stateObjects[string(addr)]
if stateObject != nil {
return stateObject
}
data := self.Trie.Get(string(addr))
if len(data) == 0 {
return nil
}
stateObject = NewStateObjectFromBytes(addr, []byte(data))
self.stateObjects[string(addr)] = stateObject
return stateObject
}
// Retrieve a state object or create a new state object if nil
func (self *State) GetOrNewStateObject(addr []byte) *StateObject {
stateObject := self.GetStateObject(addr)
if stateObject == nil {
stateObject = self.NewStateObject(addr)
}
return stateObject
}
// Create a state object whether it exist in the trie or not
func (self *State) NewStateObject(addr []byte) *StateObject {
addr = util.Address(addr)
statelogger.Debugf("(+) %x\n", addr)
stateObject := NewStateObject(addr)
self.stateObjects[string(addr)] = stateObject
return stateObject
}
// Deprecated
func (self *State) GetAccount(addr []byte) *StateObject {
return self.GetOrNewStateObject(addr)
}
//
// Setting, copying of the state methods
//
func (s *State) Cmp(other *State) bool {
return s.Trie.Cmp(other.Trie)
}
func (self *State) Copy() *State {
if self.Trie != nil {
state := New(self.Trie.Copy())
for k, stateObject := range self.stateObjects {
state.stateObjects[k] = stateObject.Copy()
}
return state
}
return nil
}
func (self *State) Set(state *State) {
if state == nil {
panic("Tried setting 'state' to nil through 'Set'")
}
self.Trie = state.Trie
self.stateObjects = state.stateObjects
}
func (s *State) Root() interface{} {
return s.Trie.Root
}
// Resets the trie and all siblings
func (s *State) Reset() {
s.Trie.Undo()
// Reset all nested states
for _, stateObject := range s.stateObjects {
if stateObject.State == nil {
continue
}
//stateObject.state.Reset()
stateObject.Reset()
}
s.Empty()
}
// Syncs the trie and all siblings
func (s *State) Sync() {
// Sync all nested states
for _, stateObject := range s.stateObjects {
//s.UpdateStateObject(stateObject)
if stateObject.State == nil {
continue
}
stateObject.State.Sync()
}
s.Trie.Sync()
s.Empty()
}
func (self *State) Empty() {
self.stateObjects = make(map[string]*StateObject)
}
func (self *State) Update() {
for _, stateObject := range self.stateObjects {
if stateObject.remove {
self.DeleteStateObject(stateObject)
} else {
stateObject.Sync()
self.UpdateStateObject(stateObject)
}
}
// FIXME trie delete is broken
valid, t2 := trie.ParanoiaCheck(self.Trie)
if !valid {
statelogger.Infof("Warn: PARANOIA: Different state root during copy %x vs %x\n", self.Trie.Root, t2.Root)
self.Trie = t2
}
}
// Debug stuff
func (self *State) CreateOutputForDiff() {
for _, stateObject := range self.stateObjects {
stateObject.CreateOutputForDiff()
}
}
|
No matter your politics, it’s important that we don’t let ourselves be relegated to the sidelines and forget about the important role we can all play in making the world a better, kinder, more fun and healthier place.
According to a recent survey by Mintel, “The Ethical Consumer,” 63% of consumers agree that ethical issues are becoming more important and 31% say that a company’s ethics often or always influence whether or not they will purchase its products. A 2014 study from Nielsen found that 55% of global respondents said they were willing to pay extra when companies are committed to positive social and environmental impact.
While our nation may find itself widely divided on many issues, these strong consumer beliefs are a reminder that travel businesses should be embracing corporate social responsibility and proactively developing programs that positively impact our local communities, society in general and the planet as a whole.
As a subscriber to Mintel’s research, we get to observe how destinations and brands are creatively responding to this call to make the world a better place for all of us. Here are a few cool and creative things they’ve shared — some small and nuanced, others big and audacious — that reflect what’s possible.
Travel brands have an opportunity to help people get more perspective on issues and experience different viewpoints (especially in a world of alternative facts), discover far-off places and escape the everyday. These are among the outcomes of a viral program in China called “Mobook” that encourages people to read. Over 10,000 books were intentionally left on the subways in Beijing, Shanghai and Guangzhou. Famous Chinese celebrities have even joined in leaving handwritten notes in the books. Interestingly, the campaign was actually inspired by Emma Watson who has been known to hide books on public transit in London and New York.
While many travel brands regularly encourage donations and some host drop boxes for charitable contributions, there’s a need in this hyper-mobile, time-starved world for brands to further lower the barriers to giving. In the UK, rather than ask donors to trek to a central location to give a gift, Uber and their partner Age UK made it possible to arrange for an Uber driver to come to your home and pick up the donation, which they then delivered to an Age UK shop. Since many people would prefer to give to their local community, this is a great way for a brand to step up and play an important role in the giving process.
Today’s consumer wants to feel like they are making a difference and travel brands should be looking for ways to measure, share and even gamify the impact that’s being made. A great example is the bike-sharing program Bluegogo in China that now allows for riders to track the amount of carbon emissions they have saved by cycling and it lets them play a measurable role in the country’s battle against air pollution. Bluegogo gathers, tracks and scores each rider’s performance and then rewards the top contributors. So far, over 100,000 users have registered since October of last year and it’s already in use in several cities.
Think that people are feeling unusually stressed and uptight? No doubt your spa or health club could easily take some aspect of its soothing message to places outside the hotel where it could be a welcomed respite from the distractions around us. Just look at what Lululemon did in London where they launched a meditation bus to help bring serenity to the masses. Themed as “Meditation Om the Move,” the double-decker bus ran for a week and offered 45-minute sessions designed to calm those getting on board, complete with relaxing scents, juices and healthy snacks, steamed face towels and noise-blocking headphones.
As traffic gets heavier and more unbearable in many cities, and concerns continue over the threat of air pollution, we are starting to see more municipalities (and even businesses) sponsor free access to public transportation. It’s estimated that 92% of the world breathes substandard air, according to the World Health Organization. In response, the city of Warsaw broadcast a message on Radio Poland offering free public transportation for a day and the City of Paris offered two free days of public transport this past December.
Want to make the world a cleaner and healthier place, while also reducing waste? These are the goals of the partnership between Clean the World and Choice Hotels that focuses on collecting, recycling and donating soap and bottled amenities that can be used to help reduce the spread of hygiene-related illnesses across the globe.
From food banks and charitable causes, to random acts of kindness and eco-friendly initiatives, there’s no shortage of ways to show that your brand not only understands the challenges our world confronts, but that we’re willing to do something about them.
Now, more than ever, travelers are clamoring for opportunities to give and receive, to express altruism and benevolence, and to remind one another that there are basic human values and traits that we can all stand behind.
For travel brands, it’s our responsibility to show travelers that we truly care. |
Valosin-containing protein (VCP/p97) plays a role in the replication of West Nile virus Highlights Inhibition of VCP by chemical inhibitors decreased WNV infection in a dose-dependent manner. Knockdown of endogenous VCP level using siRNA suppressed WNV infection. Depletion of VCP levels suppressed WNV infection at the early stages of WNV replication cycle. Depletion of VCP levels lowered nascent WNV genomic RNA. VCP participates in early stages and viral genomic RNA replication. WNV attaches to host cells through the interaction of the viral E protein and cellular receptors on the surface of host cells (). Several attachment receptors of WNV have been reported and include the laminin receptor (;;;), TIM (T cell/transmembrane, immunoglobulin and mucin) and TAM (Tyro3, Axl and Mer) families (;Morizono and Chen, 2014;), DC-SIGN/L-SIGN (dendritic cell-specific intercellular adhesion molecule-3-grabbing non-integrin) (;;;) and integrin ␣v3 (;;;;). Following attachment, the virus is then internalized into the cytoplasm via clathrin-mediated endocytosis (Brinton, 2014;Chu and Ng, 2004;). WNV particles are delivered to early or intermediate endosomes, which mature into late endosomes, following a conformational change of the viral E protein dimer triggered by the acidic environment in late endosomes. Membrane fusion between viral particles and endosomal membranes then occurs and, thereafter, WNV genomic RNA is released into the cytosol, with subsequent translation and replication (;Chu and Ng, 2004;;Heinz and Allison, 2000;). Host cell membrane rearrangements are induced during replication of flaviviruses, including WNV, to coordinate the processes of genomic RNA replication and virus assembly. Viral genomic RNA replication is thought to occur in endoplasmic reticulum (ER) membrane-derived vesicles (in structures termed vesicle packets) (;;). Encapsidation of nascent viral genomic RNA is achieved by the capsid protein and budding into the ER yielding a viral envelope coated with prM and E proteins (Brinton, 2014;;;). The immature virions are transported via the host secretory pathway and virion maturation then occurs in the acidic compartments of the Golgi by cleavage of the prM protein by a furin-like protease (;;). Mature virions are then released from the infected cells through exocytosis (;Samuel and Diamond, 2006). It has been reported that several cellular pathways and host factors are involved in WNV infection (Ambrose and Mackenzie, 2011;Brinton, 2014;;Chu and Ng, 2004;;;;;a;;); however, the role of valosin-containing protein (VCP) has remained controversial. VCP, also known as CDC48 in Saccharomyces cerevisiae, is well conserved among eukaryotes with orthologues in archaea, protozoa, insects and plants Wolf and Stolz, 2012), and is classified as a member of the type II AAA + ATPase (adenosine triphosphatase-associated with diverse cellular activities) family (Koller and Brownstein, 1987;;;Wolf and Stolz, 2012;). VCP is a homohexameric complex composed of six protomers organized as two concentricrings with a central pore. VCP conformational changes, driven by adenosine triphosphate hydrolysis, acts as a chaperone in protein homeostasis systems, which include ER-associated degradation (ERAD) (Wolf and Stolz, 2012;;Zhong and Pittman, 2006) and mitochondria-associated degradation and autophagy Dargemont and Ossareh-Nazari, 2012;;) to prevent accumulation of misfolded-proteins and turnover of certain proteins. Recently, a role of VCP in the disassembly of stress granules (SGs) has also been reported (;). Generally, after removal of stress stimuli, SGs are disassembled by VCP and mRNA in the SGs could be restored allowing mRNA translation to proceed. Otherwise, depletion of VCP causes persistence of SGs leading to blockage of mRNA restoration and an arrest of mRNA translation (). It has also been reported that VCP is involved in chromatin-associated degradation and several nuclear substrates of VCP have been described (;;Wilcox and Laney, 2009). Furthermore, VCP also participates in membrane fusion and vesicular trafficking events ;Ramanathan and Ye, 2012;;). VCP binds to endocytic components, and silencing of VCP leads to a failure of maturation and enlargement of the early endosome (Ramanathan and Ye, 2012). Interestingly, VCP has also been implicated in the life cycle of several (+)ssRNA viruses. It has been previously reported that VCP facilitates the replication of poliovirus (PV) (). Depletion of VCP caused a reduction of PV infection, whereas, a mutant PV, which has a secretion inhibition-negative phenotype, increases the affinity of binding to VCP and resists VCP-knockdown compared to wild-type PV, suggesting that VCP may play a role in PV replication through cellular secretion pathways (). In addition, other roles for VCP have been described in other picornaviruses (). Although VCP knockdown strongly inhibits PV infection, inhibition of VCP does not affect the replication of Coxsackievirus B3 (), which is also a member of the same genus Enterovirus. In contrast, replication of Aichivirus A, genus Kobuvirus, another member of family Picornaviridae, is enhanced when VCP is depleted (). A relationship between VCP and Sindbis virus (SINV) replication has also been reported (). VCP is involved in trafficking of the entry receptor of SINV, which is the natural resistance-associated macrophage protein 2 (NRAMP2). Deficiency of VCP suppresses SINV replication through alteration of trafficking routes of NRAMP2 leading to degradation of NRAMP2 by lysosomes. Studies of infectious bronchitis virus (IBV), family Coronaviridae, have suggested that VCP is engaged in the internalization steps of IBV (). Depletion of VCP using siRNA knockdown, resulted in accumulation of IBV particles in early endosomes as maturation of the endosome and acidification was disrupted. Failure of the acidification of virus-containing endosomes inhibited fusion between the virus envelope and endosomal membrane and prevented IBV exit from the endosomes to the cytosol () In the present study, we investigated whether VCP is involved in WNV infection. Specifically, we employed VCP inhibitors and siRNA knockdown to elucidate a potential role of VCP in WNV replication. Cell and viruses Human cervical adenocarcinoma cells, HeLa, were grown in Dulbecco's Modified Eagle's Medium (DMEM) supplemented with 10% fetal bovine serum (FBS) and 2 mM l-glutamine. Human embryonic kidney cells, HEK293T, were grown in high glucose DMEM supplemented with 110 mg/L sodium pyruvate, 2 mM l-glutamine and 5% FBS. African green monkey kidney cells, Vero, were grown with Minimum Essential Media (MEM) supplemented with 5% FBS and 2 mM l-glutamine. Human neuroblastoma cells, SK-N-SH, were grown with Minimum Essential Media (MEM) supplemented with 10% FBS and 2 mM l-glutamine. Cells were grown at 37 C with 5% supplemented CO 2. The mosquito cell line, Aedes albopictus clone C6/36, were grown in MEM supplemented with 10% FBS, 1% nonessential amino acid and 2 mM l-glutamine at 28 C. WNV New York strain (NY99 6-LP) was propagated in C6/36 at 28 C. WNV-NY99 6-LP was kindly provided by Dr. Takashima (Laboratory of Public Health, Graduate school of Veterinary Medicine, Hokkaido University, Sapporo, Japan) (;a;b). Viral titer was measured by plaque assay and stock of viruses were stored at −80 C until use. All experiments with WNV were performed in the Biosafety level-3 facility at the Research Center for Zoonosis Control, Hokkaido University in accordance with institutional guidelines. Pseudotyped vesicular stomatitis virus (VSV) was provided by Dr. Takada (Research Center for Zoonosis Control, Hokkaido University) (). Plaque assay Virus suspensions were diluted in a series of 10-fold dilutions and inoculated onto monolayers of Vero cells. The WNV-inoculated Vero cells were grown with MEM containing 1.25% methyl cellulose, 5% FBS and 2 mM l-glutamine at 37 C for 4 days. Fixation was done after 4 days using 10% formalin for 10 min at room temperature. The fixed cells were stained with 1% crystal violet in 70% ethanol for 30 min. The number of plaques was counted and the virus titer was determined in plaque forming unit per milliliter (PFU/ml). Immunofluorescence assay (IFA) The WNV-infected cells grown on coverslips were fixed at various times after infection. The infected cells were fixed in 4% paraformaldehyde for 10 min and permeabilized using 0.1% Triton X-100 for 5 min at room temperature. Blocking was performed with 1% bovine serum albumin (BSA) for 30 min before incubation with primary antibody. The cells were incubated with primary antibody (rabbit anti-JEV serum; 1:1500) (;) that have cross-reactivity with the WNV antigens at 4 C overnight, followed by incubation with Alexa Fluor 488-conjugated secondary antibody against rabbit IgG (1:2000; Life technologies, Rockville, MD) for 1 h at room temperature. The cells were washed three times with phosphate buffered saline (PBS) before fluorescence microscopy examination. The cells were visualized using an inverted fluorescence microscope (IX70, Olympus, Tokyo, Japan) and images were processed using DP manager software (Olympus). WNV inoculation in the presence of VCP inhibitors Based on the results of MTT assays, we determined the optimal concentration of EerI (2.5 and 5 M) and MDBN (6.25 and 12.5 M) without cytotoxicity in HeLa cells. Multiplicity of infection (MOI) of 1 of WNV NY99 6-LP strain was inoculated into HeLa cells. After 1 h of incubation at 37 C with rocking, the inocula were removed. Suspensions of either EerI or MDBN diluted in normal cultured medium were added to the WNV-inoculated cells and incubated at 37 C for 24 h. Thereafter, the inoculated-cells and the supernatants were prepared for IFA, plaque assay and immunoblotting analysis to measure the number of WNV-infected cells, production of infectious WNV and expression of WNV proteins, respectively. WNV inoculation in siRNA-treated cells At 48 h post transfection with either siRNA against VCP or control siRNA (Catalogue No: 439084, Thermo Fisher Scientific), HeLa cells were inoculated with WNV NY99 6-LP strain (MOI = 1) and incubated at 37 C for 1 h with rotation. Thereafter, supernatants of the cells were removed, and normal HeLa culture medium was added to the cells and incubated at 37 C for 12, 24 and 48 h. The inoculated cells and the supernatants were prepared for IFA, plaque assay and immunoblotting analysis, respectively. To investigate the role of VCP in the early stages of the WNV replicative cycle, the siRNA-transfected cells were inoculated with WNV as described above. After inoculation of WNV, cells were incubated on ice for 1 h, and then washed with PBS five times. The cells were then placed at 37 C and incubated for 1 h. Thereafter, the inoculatedcells were harvested using trypsin. The detached cells from cell culture plates were centrifuged at 1500 g for 3 min. After removal of supernatants, total RNA was extracted from cell pellets using Trizol (Thermo Fisher Scientific). Extracted total RNAs were analyzed for WNV genome using real-time reverse transcription PCR (qRT-PCR) analysis. Pseudotyped VSV inoculation in siRNA-treated cells It has been previously reported that VCP knockdown did not affect VSV infection (). Therefore, control experiments using pseudotyped VSV were performed. The pseudotyped VSV encoding GFP was kindly provided by Dr. Takada (Hokkaido University) (). Approximately 30% infectivity of pseudotyped VSV was inoculated into HeLa cells transfected with either siRNA against VCP or control siRNA. The cells were incubated at 37 C with rotation for 1 h. Thereafter, supernatants of the cells were removed, normal growth media was added to the cells and incubated at 37 C for 8 h. The percentage positivity following pseudotyped VSV infection was measured by counting the number of GFP-positive cells using an inverted fluorescence microscope (IX70, Olympus, Tokyo, Japan). Production of WNV virus-like particles (WNV-VLPs) WNV-VLPs with reporter DsRed protein were produced following transfection. Three plasmid vectors carrying WNV sequences: pCMV-WNrep-DsRed, pCMV-SVP and pCSXN-C were transfected into HEK293T cells using lipofectamine 2000 (Thermo Fisher Scientific). These plasmids were constructed as follows. A plasmid encoding WNV replicon cDNA, pCMV-WNrep-DsRed encodes the WNV non-structural (NS1-NS5) proteins. Almost all of the sequences encoding structural proteins, including C, prM and E, were deleted and replaced by the gene encoding the DsRed protein. The 3 -terminus of the WNV genome was accomplished by containing sequences enabling ribozyme-mediated post-transcriptional cleavage of the RNA (b). The fragment of prM-E was amplified by PCR from pCAGGS-C-prM-E, which was a gift from Dr. Takashima (Hokkaido University) () as a template, and subcloned into the pCMV vector, and the plasmid was named pCMV-SVP. For the pCSXN-C, the C fragment with restriction sequences of Xho I and Not I (Takara Bio, Kyoto, Japan) were amplified by PCR and inserted into pCSXNflag which was generated from pCMV-myc (Clontech Laboratories, Mountain View, CA) as previously described (), using Xho I and Not I restriction sites. The plasmid was named as pCXSN-C. The transfected cells were incubated at 37 C for 72 h. The supernatants from transfected cells were collected and filtered through a 0.45 m filter (Sigma Aldrich). The WNV-VLPs were concentrated by ultracentifugation at 4 C, 68,000 g for 2 h. The supernatant was discarded and only the pellet was collected after ultracentrifugation. The pellet was resuspended with normal HeLa culture medium and the titers of WNV-VLPs were measured by hemagglutination assay as previously described (). The titer of VLPs was calculated as hemagglutination units (HAU)/50 l based on the highest dilution of VLP suspension causing agglutination of chicken red blood cells. Inoculation of WNV-VLPs in VCP knockdown HeLa cells WNV-VLPs (16 HAU/50 l) were inoculated into siRNA-treated HeLa cells 48 h post transfection. After 1 h incubation at 37 C, the inocula were discarded and normal HeLa culture medium was added and incubated for 72 h. Comparison of the quantity of WNV-RNA between VCP knockdown and control was determined using qRT-PCR. WNV-VLP production and transfection of pCMV-WNrep-DsRed to siRNA-treated HeLa cells Plasmid transfection to generate WNV-VLPs has been reported to investigate the role of VCP in the late steps of viral life cycle, from genome replication to virus release (a). The results obtained employing the plasmid-encoded VLPs would not be attributable to early steps of WNV infection, including attachment and entry. WNV-VLPs were used to investigate the role of VCP in distinct steps (early and genome replication steps) of WNV infection cycle. At 24 h after siRNA transfection, the plasmid set (pCMV-WNrep-DsRed, pCMV-SVP and pCSXN-C) was transfected into siRNA-treated HeLa cells using FuGENE HD (Promega, Madison, WI). The plasmid transfected-cells were incubated at 37 C for 72 h. Thereafter, the supernatants from transfected cells were collected and inoculated onto Vero cells monolayers in 10-fold serial dilutions. WNV-VLP titer was calculated as infectious units (IFU)/ml based on the total number of DsRed-positive cells (Fig. 3C). To investigate the role of VCP in WNV genomic RNA replication, only pCMV-WNrep-DsRed (b) was transfected into the siRNA-treated cells. The procedure and time of transfection are similar to plasmid transfection for VLP production. After 72 h incubation, the total RNAs were extracted and prepared for qRT-PCR. Real-time reverse transcription-PCR (qRT-PCR) Total RNA was isolated by Trizol and chloroform according to the manufacturer's protocol. The RNA samples were treated with DNase I (Thermo Fisher Scientific) to remove genomic DNA. qRT-PCR was performed with a Brilliant III Ultra-Fast qRT-PCR master mix (Agilent Technologies, Santa Clara, CA) following the manufacturer's protocol. The oligonucleotide primers and fluorescent probe targeting the 3 UTR of WNV, 5 -AAGTTGAGTAGACGGTGCTG-3 and 5 -AGACGGTTCTGAGGGCTTAC-3, WNV probe, FAM-5 -GCTCAACCCCAGGAGGACTGG-3 -BHQ, were used for detection of WNV-RNA. A TaqMan Gene expression assays kit corresponding to human -actin (Thermo Fisher Scientific) was used as an endogenous control. The expression level of viral RNA was normalized to the expression of human -actin. Statistical analysis The statistical significance was calculated using one-way ANOVA. WNV infection is inhibited in the presence of VCP inhibitors To determine if VCP is involved in WNV infection, the effect of VCP inhibitors, both EerI (;) and MDBN (Chou and Deshaies, 2011) at concentrations without cytotoxicity were assayed in WNV infection. The cytotoxicity of either EerI or MDBN treatment in HeLa cells was examined using a MTT assay ( Supplementary Fig. 1). Each VCP inhibitor was added to HeLa cells at 1 h.p.i. with WNV. WNV-inoculated cells and cultured supernatants were harvested at 24 h.p.i. The number of WNV-infected cells was examined by IFA, and this revealed that the number of WNV-infected cells was significantly decreased in a dose-dependent manner in the presence of either EerI or MDBN ( Fig. 1A and B). Viral titers of supernatants from WNV-inoculated cells were also measured by plaque assay. Consistently, this demonstrated that viral titers of supernatants from WNV-inoculated cells were significantly decreased in a dose-dependent manner in the presence of either EerI or MDBN (Fig. 1C). We also confirmed the inhibitory effects of EerI in WNV infection in a different cell line, human neuroblastoma SK-N-SH cells. Inhibition of VCP by EerI both decreased the percentage of WNV-infected cells and viral titer in SK-N-SH cells (Supplementary Fig. 2). These findings suggest that VCP may play a role in WNV infection. WNV infection is inhibited by knockdown of VCP To confirm that the inhibition of WNV infection was caused by perturbation of VCP activity, small interfering RNAs (siRNAs) were employed to deplete endogenous VCP. HeLa cells were transfected with either of three siRNAs targeting three different regions of the VCP gene or a control siRNA (siCont) and then inoculated with WNV 48 h post transfection and incubated for 24 h. The expression level of VCP after silencing was confirmed by immunoblotting. Reverse transfection of siVCP and for 48 h strongly decreased expression levels of endogenous VCP in HeLa cells ( Fig. 2A). Furthermore, depletion of endogenous VCP reduced expression levels of WNV-E protein at 24 h.p.i. of WNV ( Fig. 2A). Thereafter, we examined siRNA targeting of VCP which significantly reduced the percentage of WNV-infected cells ( Fig. 2B and C). However, siRNA failed to knockdown endogenous VCP. HeLa cells were inoculated with WNV (MOI = 1) and then treated with EerI or MDBN at 1 h.p.i. Cells were harvested at 24 h.p.i. and stained with anti-JEV antibody (;) that has cross reactivity with WNV antigen (green). Cell nuclei were counterstained with DAPI (blue). (B) Positivity of WNV-infected cells from (A). Mean ± SD from triplicate experiments is shown; * p < 0.05, ** p < 0.01 (one-way ANOVA). (C) The culture supernatants from (A) were collected at 24 h.p.i. and the viral titers of the harvested supernatants were examined by plaque assay. Mean ± SD from three independent experiments is shown; * p < 0.05, ** p < 0.01 (one-way ANOVA). as shown in the immunoblotting and IFA results ( Fig. 2A-C). We further measured viral titers in supernatants of WNV-inoculated HeLa cells treated by the siRNAs against VCP. Plaque assays revealed that the viral release was significantly inhibited by siRNA treatment (Fig. 2D). We also examined the effect of siRNA against VCP on WNV infection by IFA at different time points (12, 24 and 48 h). A decrease in the immunofluorescence signals between cells transfected with control and VCP siRNAs was detected (Supplementary Fig. 3). These results indicate that a depletion of VCP significantly inhibits WNV infection. In contrast, VCP-knockdown did not affect infection by pseudotyped VSV ( Supplementary Fig. 4). and ] or control siRNA (siCont). The siRNA-treated cells were inoculated with WNV (MOI = 1) at 48 h.p.i. The inoculated cells were harvested at 24 h.p.i. The expression of endogenous VCP protein and WNV envelope protein after treatment with the indicated siRNA were examined by immunoblotting with mouse anti-VCP antibody and mouse anti-WNV/Kunjin envelope protein. The expression of actin was examined after reprobing as an endogenous control. (B) WNV-infected cells from (A), after 24 h incubation with WNV, the cells were harvested and examined by immunofluorescence assay. WNV-infected cells were stained with anti-JEV antibody (green) and cell nuclei were counterstained with DAPI (blue). (C) Positivity of WNV-infected cells from (B). Mean ± SD from three independent experiments is shown; ** p < 0.01 (one-way ANOVA). (D) The culture supernatants from (A) were collected at 24 h.p.i. and the viral titers of the harvested supernatants were determined using plaque assay. Mean ± SD from three independent experiments is shown; ** p < 0.01 (one-way ANOVA). VCP participates in the early and genome replication steps during the WNV life cycle We next investigated the specific role of VCP in the life cycle of WNV. The intracellular life cycle of WNV is divided into two major steps, early and late (;Kaufmann and Rossmann, 2011). The early step consists of viral attachment, entry and uncoating (;Kaufmann and Rossmann, 2011), while the late step involves genome translation, genome replication, viral assembly and release (a). WNV-VLPs were employed to determine whether VCP participates in the early or late replication steps (). WNV-VLPs are unable to produce progeny virions because of the absence of WNV structural protein coding sequences in their genome. Therefore, our results are independent of the assembly and virionreleasing steps (;). Thus, WNV-VLPs allow the determination of whether VCP plays a role in either an early step or during the genomic replication of the WNV life cycle. WNV-VLPs were inoculated into both VCP and control siRNA-transfected cells and monitored by expression of DsRedencoded in the WNV-VLP replicon. qRT-PCR demonstrated that the quantity of WNV-RNA in VCP-knockdown (siVCP ) cells was significantly lower than that in control siRNA-treated cells (Fig. 3A). These results suggest that VCP knockdown significantly inhibits infection of WNV-VLPs through an inhibition of early step and/or genome replication steps of the WNV life cycle. To confirm the role of VCP in the early stages of WNV replication, the siRNA-treated cells were inoculated with WNV and viral RNA was investigated at an early time point of WNV infection, at 2 h post infection. The result revealed that silencing of VCP (siVCP ) significantly decreased the quantity of WNV-RNA at 2 h post inoculation of WNV compared to control siRNA treated-cells (Fig. 3B). This suggests that VCP plays a role in the early step of WNV replication cycle, including attachment or entry into cells. To examine whether VCP plays a role in the late step of the WNV life cycle, three plasmids encoding WNV Relative quantification of WNV-RNA normalized to human -actin from (A) examined by qRT-PCR. Mean ± SD from three independent experiments is shown; ** p < 0.01 (one-way ANOVA). (B) Relative quantification of WNV-RNA expression levels normalized to human -actin of siRNA-treated cells inoculated with WNV at the early time point of infection. siRNA-treated HeLa cells were inoculated with WNV after 48 h post siRNA transfection. The inoculated cells were incubated on ice for 1 h, followed by washing 5 times with PBS and then transferred to 37 C. After 1 h incubation, the cells were harvested by trypsin and prepared for qRT-PCR. Mean ± SD from two independent experiments in triplicate is shown; * p < 0.05 (one-way ANOVA). (C) HeLa cells were treated with siRNA against VCP, siVCP or control siRNA (siCont). After 24 h post transfection, the cells were transfected with plasmid set for WNV-VLP production and incubated for 72 h. The culture supernatants were harvested and inoculated on Vero cell monolayers in 10-fold serial dilutions. The viral titers of the harvested supernatants were determined as IFU/ml. Mean ± SD from three independent experiments is shown; ** p < 0.01 (one-way ANOVA). (D) HeLa cells were treated with siRNA, either siVCP or siCont, and then transfected with plasmid containing WNV DNA replicon, pCMV-WNrep-DsRed at 24 h post siRNA treatment and incubated. The transfected cells were harvested at 72 h post transfection of pCMV-WNrep-DsRed. Relative quantification of WNV-RNA normalized to expression of human -actin was examined by qRT-PCR. Mean ± SD from three independent experiments is shown; ** p < 0.01 (one-way ANOVA). sequences (pCMV-C, pCMV-SVP and pCMV-WNrep-DsRed) were co-transfected into either VCP-knockdown (siVCP ) or control siRNA-treated cells. The plasmid transfection protocol for VLP production has been previously employed to investigate the role of host factor(s) in the late stages of viral infection, including genome replication and virus release (a). The components of the VLP are transfected into cells, therefore, the results obtained employing the plasmid-encoded VLPs were not associated with the early steps of WNV replication (a). At 72 h after plasmid transfection, we examined the WNV-VLP titers in the supernatants from plasmid transfected-cells. The titer of WNV-VLPs was significantly decreased in VCP-knockdown (siVCP ) cells compared with control siRNA-treated cells (Fig. 3C). These data suggest that VCP is also involved in the genome replication and/or assembly and release steps of the WNV life cycle. To confirm that VCP is important for WNV genome replication, the WNV DNA-based replicon pCMV-WNrep-DsRed was introduced into both VCP knockdown and control siRNA-treated cells. This replicon consists of coding sequences of WNV non-structural proteins, while almost all of the sequences encoding WNV structural proteins were deleted and replaced by sequences encoding DsRed. The replicon can replicate and translate to synthesize viral genomic RNA and the non-structural proteins of WNV, respectively. However, it is not capable of producing viral progeny because of the absence of structural protein sequences of WNV. The results of qRT-PCR of the plasmid-transfected cells at 72 h post transfection demonstrated a 10-fold reduction of synthesized WNV-RNA in the VCP-knockdown cells (siVCP ) compared to control siRNA-treated cells (Fig. 3D). Taken together, these data indicate that VCP plays a role in the genome replication of the WNV life cycle. Discussion In the present study, we have investigated the roles of VCP during WNV infection. We found that perturbation of endogenous VCP using a potent VCP inhibitor or siRNA targeting VCP significantly inhibited WNV infection. We could confirm that the expression of endogenous VCP in HeLa cells is depleted after 48 h siRNA transfection , while another siRNA siVCP did not silence expression of endogenous VCP. Silencing of endogenous VCP, by siVCP and, demonstrated that depletion of VCP significantly suppressed WNV infection. This finding suggests that VCP is required for WNV infection and, thereafter, we employed the most potent siRNA to investigate the roles of VCP in WNV replication. A previous report indicated that silencing of endogenous VCP and nuclear protein localization 4 (NPL4), a VCP cofactor, did not inhibit WNV infection, whereas depletion of ubiquitin fusion degradation 1-like (UFD1L) and p47, other cofactors of VCP, suppressed WNV infection (). We suggest that the differences between this previous report and the present results may be related to the use of different strains of WNV or could be related to the silencing efficiency of the siRNA employed in the experiments. In addition, control experiments from the present study using pseudotyped VSV demonstrated that depletion of VCP did not suppress pseudotyped VSV infection. These results suggest that VCP plays a role in WNV infection specifically and inhibition of WNV infection in VCP knockdown cells is not a consequence of cellular cytotoxicity. Employing VLPs, we demonstrated that perturbation of VCP suppressed the infectivity of WNV-VLPs (Fig. 3A). This indicates that VCP is potentially involved in either the early steps or during genome replication of WNV. Using plasmid transfection to generate WNV-VLPs, to bypass early steps of the WNV life cycle, we next examined whether VCP plays a role in the late steps (from genome replication until virus release) of the viral life cycle. Knockdown of VCP reduced the yield of WNV-VLPs compared to control siRNA-treated cells (Fig. 3C) and this finding suggests that VCP also participates in the late steps of WNV life cycle. Taken together, we hypothesized that VCP may be implicated in the genome replication steps of WNV. Therefore, a WNV DNA-based replicon was employed to clarify whether VCP is required for genome replication of WNV. Depletion of VCP significantly decreased expression levels of synthesized WNV-RNA (Fig. 3D) and this finding indicates that VCP is engaged in WNV genomic RNA replication. It has been previously reported that VCP was found to be localized in the cytosol, ER and nucleus, and can play a role in several cellular processes (;;Meyer and Weihl, 2014;). The possible mechanism(s) of VCP involvement in WNV infection may be based on the localization and physiological function of VCP. Functional roles of VCP in the replication of the WNV-related virus in the family Flaviviridae, hepatitis C virus (HCV) have been reported (). VCP knockdown significantly decreased expression of HCV RNA levels and VCP was found to be colocalized with the HCV replication complex. It is thus possible that this function of VCP in the HCV life cycle is also required for WNV genome replication, however, no direct evidence currently exists for an interaction between WNV replicase components and VCP and further investigations are required. Apart from during the genome replication of the WNV life cycle, VCP might potentially be involved in other steps. The present study demonstrates that VCP may also function in the early steps, during either attachment or entry, of the viral life cycle (Fig. 3B). The results of an entry assay revealed that silencing of endogenous VCP caused a significant reduction in the expression levels of WNV-RNA compared to control siRNA-treated cells. This suggests that VCP may also play a role in either the binding or entry steps of the WNV life cycle. A role for VCP in early stages of viral infection has previously been reported for coronavirus and Sindbis virus (;). Depletion of VCP inhibited coronavirus infection through a failure in the maturation of virus-loaded endosomes leading to accumulation of coronavirus particles in the early endosomal compartment (). Studies on Sindbis virus indicated that VCP functioned as a regulator of viral entry as knockdown of VCP caused an alteration of trafficking and resulted in the degradation of Sindbis virus entry receptor (). However, the possible function of VCP on early stages of WNV replication has not been investigated and will require further study. In conclusion, our findings suggest that VCP is required for replication of WNV at a number of different stages of the viral life cycle, thus, VCP potentially represents a candidate for the therapeutic inhibition of WNV infection. |
AUSTIN,Texas — From the time the first piles of dirt and rock were moved to start paving a new Formula One track in Texas, the owners of the Circuit of the Americas eyed a future with IndyCar.
It may have taken longer than fans had hoped, but they finally have one. And with the first IndyCar Classic this weekend, the mission now is to develop what organizers hope will be the second-biggest race of the IndyCar calendar.
"I think it can happen," track President Bobby Epstein said. "It just has to get bigger every year."
Epstein has insisted the IndyCar Classic will make a splash in its debut as the second race of the 2019 season, including a unique $100,000 bonus if the driver who wins the pole position also wins the race. The drivers first learned of the bonus on Thursday.
"Sweet!" James Hinchcliffe said while wringing his hands at the prospect. "That will be a nice bottle of wine."
Built for Formula One, the 3.41-mile Circuit of the Americas opened in 2012 and has catered primarily to the European-based racing series F1 and MotoGP, hosting the U.S. Grand Prix and the Grand Prix of the Americas, respectively, every year. While Epstein also wanted to host IndyCar, the Austin track had been frozen out by a geographic exclusivity clause the American series had in its contract with Texas Motor Speedway just three hours north in Fort Worth.
The restriction frustrated some fans, but it also gave the Circuit of the Americas time to mature as a track and gain exposure as a global and national destination for drivers and fans, Epstein said.
Relations between the two Texas tracks had been touchy for years, but now that both host IndyCar races about 10 weeks apart, Epstein sees no reason why both can't thrive.
"Their heath is as important to the health of racing as ours is," Epstein said. "They didn't really roll out the welcome mat because they didn't know what we would become. Everybody has the right to be protective of their investment. (But) I don't think their success comes at our loss and I would hope they feel the same way."
Texas Motor Speedway President Eddie Gossage said he wants the IndyCar Classic to be a hit.
"I would expect their crowd to top 100,000 people. It's a new thing, a novelty, and for their first visit there they should draw a huge crowd," Gossage said. "When we first ran IndyCar, we drew well over 100,000 people for the race for many years. That kind of success Sunday will be good for all racing in Texas."
IndyCar has pushed to boost its new track's profile in the offseason, hosting its preseason media days and two days of testing here in February. Several drivers were already familiar with the circuit, having turned laps in F1 or in private visits in years past. Andretti Autosports' Alexander Rossi, Arrow Schmidt Peterson's Marcus Ericsson and Carlin's Max Chilton all raced in Austin in F1. Ericsson finished 10th at the U.S. Grand Prix last year.
Ericsson said the F1 experience is of little value in his new series.
"I had all my reference points and did the first round (of practice) and it didn't really work," Ericsson said. "The Indy car today is very different to drive with grip and power steering. Things that worked in an F1 car don't really work in an Indy car."
The most tantalizing aspect for the former F1 drivers is returning with a chance to win. Rossi had little chance of even making the podium when he raced the U.S. Grand Prix for Marussia in 2015. Rossi finished 12th that year after eight other cars retired and still was more than 1 minute, 15 seconds off the winning pace.
Since joining IndyCar, Rossi is a five-time race winner, including the 2016 Indianapolis 500, and finished second in the championship last season. Rossi finished fifth in the season opener at St. Petersburg, Florida, on March 10, a race won by Team Penske's Josef Newgarden.
"When I've come here in the past, I came into the weekend fully knowing there really wasn't any chance," Rossi said. "To able to come in here this weekend, competing on a level where we have as good a shot as anybody to win the race, is pretty cool. There's almost unfinished business box we'd like to tick here."
NOTES: Ed Carpenter Racing's Ed Jones has been cleared to race Sunday after dislocating his left ring finger when his car made contact with the wall in St. Petersburg. Jones met with a hand surgeon in Miami and had the finger splinted. He was cleared after a meeting with IndyCar Medical Director Dr. Geoffrey Billows. ... Indy Lights 2018 champion Patricio O'Ward of Mexico, who abruptly left Harding-Steinbrenner Racing in February, makes his IndyCar season debut this week after signing a 13-race deal with Carlin. O'Ward finished ninth at Sonoma last year in his first IndyCar start, but didn't take part in preseason testing and missed the race in St. Petersburg. |
The Origin of Corrosion Resistance Change Induced by Sn and Nb Alloying in Zr Alloys As nuclear fuel cladding, Zr alloys have need for a good corrosion resistance. For decades, through adjusting content of Sn and Nb, several generations of Zr alloys with excellent corrosion resistance are developed. However, the mechanism of Sn and Nb influencing the corrosion resistance is still not clear. Here, our computational simulations indicate, the segregations of Sn or Nb at grain boundary (GB) can occur, and results in variation of GB cohesion, which influences the difficulty of the formation of micro-cracks in oxide film and then changes protectiveness of oxide film which determines the corrosion resistance. Using the first-principles method, we find that Sn segregation can reduce GB cohesion, and results in a potency of reduction of oxide film protectiveness; however, Nb segregation can enhance GB cohesion, and results in a potency of enhancement of oxide film protectiveness; the results are well consistent with the previous experimental observations that reducing Sn and adding Nb can promote corrosion resistance of Zr alloys. These findings provide a basis for understanding the roles of alloying elements in Zr alloys, which is very useful to future design of new Zr alloys with more excellent corrosion resistance. |
Foreign Minister Abba S. Eban invited the French ambassador, Bertrand de la Sabliere, to the Foreign Ministry today and handed him an official copy of the text of the Israel Cabinet’s statement on President de Gaulle’s anti-Israel, anti-Jewish utterances last Monday.
Mr. Eban told the French envoy that Gen. de Gaulle’s remarks had aroused emotions in this country and explained why the French chief of state’s words had aroused feelings here. He asked that the envoy transmit Israel’s protest to Paris and, at the same time, expressed the hope that Franco-Israel relations would improve and soon return to their traditional state.
In Tel Aviv today, members of the rightwing Herut Party put up posters today near the French Embassy bearing the slogan: “Long Live France! Down With de Gaulle!” This protest, as with most criticism here of the anti-Israel statements by President de Gaulle at his press conference in Paris, Monday, attempted to draw a distinct line between the French chief of state and the French people.
Gen. de Gaulle’s statements are considered to be anti-Semitic and derogatory of the entire Jewish people as well as hostile to the State of Israel, but most people here believe that the people of France have been and remain friendly and sympathetic to Israel and the Jewish nation.
Student groups are planning a mass demonstration on Sunday in the vicinity of the French Embassy at which they will protest Gen. de Gaulle’s statements and voice continued friendship for France. |
class Pluginable:
"""
Pluginable
This is a metaprogrammaming class intended to safely manage the addition of
new methods and attributes at runtime to classes derived from this class.
Can be viewed as an implementation of the Strategy pattern.
Methods
-------
load_plugin(plugin, *args, **kwargs) :
Will bound the methods returned by plugin.__pluginmethods__() to self
and then call plugin.__initplugin__(self, *args, **kwargs) on self.
"""
def load_plugin(self, plugin, *args, **kwargs):
"""
load_plugin
Will bound the methods returned by plugin.__pluginmethods__() to self
and then call plugin.__initplugin__(self, *args, **kwargs) on self.
When designing a plugin, each element returned by
plugin.__pluginmethods__() should be a dictionary with the following
elements:
'method': function
Reference to actual function to bind to self.
'name':str
Name of the function which will be used to call bound method.
(Does not have to be the name as the original method name).
'conflictMode' : either 'append', 'prepend', 'replace' or 'abort'
This specifies the behavior if self has already a method called
'name' when trying to bind a new method.
'append' : old method will be called first, then the new one.
'prepend' : new method will be called first, then the old one.
'replace' : new method replaces old method
'abort' : abort binding without error
Using any other value will raise an exception, but only if there
is a conflict.
Parameters
----------
plugin : class
plugin class to be applyed to self
/!\ No instance of plugin will be created. Instead, the methods
will be added to this object, and a __initplugin__ method will
be called. The __initplugin__ method may add or modify arguments
in this object.
args, kwargs :
Arguments to be passed down to plugin.__initplugin__
"""
for method in plugin.__pluginmethods__():
# Building new method with respect to the insertMode
if hasattr(self, method['name']):
if method['conflictMode'] == 'append':
setattr(self, method['name'],
MethodCompound([getattr(self, method['name']),
MethodType(method['method'], self)]))
elif method['conflictMode'] == 'prepend':
setattr(self, method['name'],
MethodCompound([MethodType(method['method'], self),
getattr(self, method['name'])]))
elif method['conflictMode'] == 'replace':
setattr(self, method['name'],
MethodType(method['method'], self))
elif method['conflictMode'] == 'abort':
pass
else:
raise ValueError("Invalid conflictMode")
else:
setattr(self, method['name'],
MethodType(method['method'], self))
# Initializing the plugin on this object with args and kwargs parameters
plugin.__initplugin__(self, *args, **kwargs) |
<reponame>SicherLokal/app<filename>src/app/market-admin/market-admin-routing.module.ts<gh_stars>1-10
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { RegistrationComponent } from './registration/registration.component';
import { IdentificationComponent } from './identification/identification.component';
import { ProductMaintenanceComponent } from './product-maintenance/product-maintenance.component';
import { DashboardComponent } from './dashboard/dashboard.component';
const routes: Routes = [
{
path: 'identification',
component: IdentificationComponent
},
{
path: 'product-maintenance',
component: ProductMaintenanceComponent
},
{
path: 'dashboard',
component: DashboardComponent
},
{
path: '',
component: RegistrationComponent
}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class MarketAdminRoutingModule { }
|
package io.jshift.buildah.core.commands;
import io.jshift.buildah.core.CliExecutor;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import java.util.ArrayList;
import java.util.List;
import static io.jshift.buildah.core.commands.CommandTransformer.transform;
import static org.assertj.core.api.Assertions.assertThat;
@ExtendWith(MockitoExtension.class)
public class ConfigCommandTest {
@Mock
CliExecutor buildahExecutor;
@Test
public void should_execute_config_command() {
List<String> ports = new ArrayList<>();
ports.add("8008");
ports.add("8090");
final BuildahConfigCommand buildahConfigCommand = new BuildahConfigCommand.Builder(buildahExecutor, "containerName").workingDir("workDir").port(ports).build();
List<String> cliCommand = buildahConfigCommand.getCliCommand();
assertThat(cliCommand).containsExactly(transform("config --workingdir workDir --port 8008 --port 8090 containerName"));
}
}
|
/**
* @author marcus@openremote.org
*
* TODO: See MODELER-266 -- should share a common base implementation with controller
*/
public class KnxGroupAddress {
private String name;
private String groupAddress;
private String dpt;
private String command = "N/A";
private Boolean importGA = Boolean.FALSE;
public KnxGroupAddress(String dpt, String groupAddress, String name) {
super();
this.dpt = dpt;
this.groupAddress = groupAddress;
this.name = name;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getGroupAddress() {
return groupAddress;
}
public void setGroupAddress(String groupAddress) {
this.groupAddress = groupAddress;
}
public String getDpt() {
return dpt;
}
public void setDpt(String dpt) {
this.dpt = dpt;
}
public Boolean getImportGA() {
return importGA;
}
public void setImportGA(Boolean importGA) {
this.importGA = importGA;
}
public String getCommand() {
return command;
}
public void setCommand(String command) {
this.command = command;
}
} |
package mail
import (
"net/mail"
qlang "qlang.io/spec"
)
// Exports is the export table of this module.
//
var Exports = map[string]interface{}{
"_name": "net/mail",
"ErrHeaderNotPresent": mail.ErrHeaderNotPresent,
"parseAddressList": mail.ParseAddressList,
"Address": qlang.StructOf((*mail.Address)(nil)),
"parseAddress": mail.ParseAddress,
"Message": qlang.StructOf((*mail.Message)(nil)),
"readMessage": mail.ReadMessage,
}
|
UK Ultraspeed
UK Ultraspeed was a proposed high-speed magnetic-levitation train line between London and Glasgow, linking 16 stations including Edinburgh, Birmingham, Manchester and Newcastle and six airports. It was rejected in 2007 by the UK government, in favour of conventional high-speed rail. The company behind the proposal ceased efforts to promote it in early 2013.
Proposal
The 2005 UK Ultraspeed proposal was submitted as part of the UK's general effort to upgrade train service. German company Transrapid, developers of the only operational high-speed maglev system, backed the Ultraspeed group to promote their technology as an alternative to conventional high-speed train sets like those being used on High Speed 1. Transrapid is a joint venture of Siemens and ThyssenKrupp, both major suppliers to the transportation industry.
The proposed 800 km (500 mi) route would have served cities currently served by both the West Coast Main Line and East Coast Main Line, with a spur serving Liverpool. Three stations were to serve London: Heathrow Airport, a Park and Ride at the M1/M25 junction, and either Stratford or Kings Cross station. The route roughly followed the West Coast line from London to Manchester, then turned slightly east towards Newcastle before roughly following the East Coast line to Edinburgh and Glasgow.
Inter-city speeds would be as high as 500 km/h (310 mph), reducing a London-Manchester trip by half, from about 128 minutes to a claimed 54. The savings in time were possible due to rapid acceleration, new station locations, and greatly simplified loading and unloading procedures. These advantages would reduce total trip time to below that of regional aircraft serving the same route. The projected total cost was £29 billion including all guideways, land and 27 train sets.
Ultraspeed was deliberately aimed at the same market as the proposed High Speed 2 (HS2). HS2's mainline runs from London to Birmingham, with branches to Manchester and Leeds respectively. In spite of being much shorter, at 531 km (330 mi), HS2 was estimated to cost between £52 billion (UK Government) and £80 billion (Institute of Economic Affairs).
Initial support
The proposal caught the eye of then-Prime Minister Tony Blair, who was said to be clearly excited by it. This led to comments from the transport minister, Alistair Darling, that the issue of north-south links had to be re-considered. This was the latest in a series of flip-flops on the matter, which started with a 2004 report from the Strategic Rail Authority that stated that new high-speed line was "urgently needed", a report that the government had attempted to bury. Blair was noted as saying that a cross-country link of this sort would "bring Britain together", although this was called "pie in the sky" by critics. Alan James, director of UK Ultraspeed, took the opportunity to claim that it was the fastest and safest system in the world.
Competing political interests initially claimed that Blair's sudden support for the issue was nothing more than electioneering. However, this was soon followed by a Commons All-Party Rail Group visit to China and Japan to visit the maglev systems there. Shadow transport secretary Chris Grayling returned "positively bouncing with enthusiasm", noting that even at full speed the train was quieter than a Virgin Voyager. This led to full party support for the proposal on both sides of the aisle. Blair's support led to an official study into the Ultraspeed concept, as well as competing long-distance lines using TGV-like equipment.
This was all taking place just after the well-reported opening of the Shanghai system, and the announcement that the Chinese government was examining a 170 km extension of that line. Transrapid was also actively pitching the system for several other lines. It appeared that the maglev's day had finally come. It was also noted that the maglev system had originally been invented in the UK, and the first maglev system built and operated there – the Birmingham Maglev of 1984.
Scepticism
Shortly after James' comments on safety, the Transrapid test system in Emsland suffered the fatal Lathen train collision in late 2006. This quickly revealed "major safety failings" and led to the German transport minister asking "Whether the Transrapid's safety measures were adequate". The company quickly responded by noting the accident had nothing to do with the technical aspects of the system.
When Ultraspeed was being proposed, only two Transrapid tracks existed; the original Emsland test facility, and the 30.5 km (19.0 mi) Shanghai Maglev Train. Transrapid was also part of a number of other active proposals at the time, notably a 37 km (23 mi) airport link in Munich similar to the Shanghai installation. All of these were much shorter than the Ultraspeed line, so there was an increased element of technical risk involved in the UK proposal.
Much of the proposal's claimed advantage was based on the cost of installing the tracks. As the maglev line is elevated, many of the problems with ground-based high-speed rail are mitigated. There is no need to fence off an area on either side of the track, and the total amount of land removed from use is lower, as farming can take place below the track. The Ultraspeed promoters claimed the cost would be £20M–24.75M per kilometre, about the same as Shanghai's £28M/km, and dramatically lower than High Speed 1's known £46M–48M/km price. However, rail experts were quick to point out that the actual price of the Shanghai system was £33M/mile, or £21M/km. This was in stark contrast to the known $11M/mile (~$7M/km) cost of recent extensions to the French TGV network.
More damning was the Munich system's rapidly inflating price throughout this period, from the original €1.85bn complete with train sets and stations, to a new price of €3.4bn. Most of the increase was attributed to increased costs of track construction. The cost overruns alone, €1.85bn, represented €50M/km which is more than the predicted cost per km in the Ultraspeed system. Cost overruns on the Munich system ultimately led to its cancellation.
As part of the preparation for a major white paper on the topic, in early 2007 the government commissioned Roderick Smith and Roger Kemp to study the Ultraspeed proposal in depth. In addition to the issues with technical risk and cost estimates, they noted that once other factors were considered a number of the secondary advantages of the system either did not exist or were actually the opposite of those claimed.
For instance, the promoters were claiming that the much higher speeds of the Ultraspeed system would allow it to take some traffic off aircraft, in contrast to other high-speed routes where aircraft traffic was actually seen to increase after the rail links opened. As a result, total CO₂ emissions would be lowered. However, the reviewers said that the total CO₂ emissions of the system, largely due to the coal-based electricity that would provide the majority of the power, were higher than conventional high-speed rail. More importantly, the suburban locations of the new stations that were part of the proposal would mean travellers would drive to the stations. Such was the case for the Shanghai system, where the end stations are "in the middle of nowhere". Total CO₂ emissions on inter-city trips were predicted to be higher than a car making the same trip.
Cancellation
The official white paper, "Delivering a Sustainable Railway", was published on 24 July 2007. It strongly rejected the Ultraspeed proposal, outlining a wide variety of reasons. Primary among these was the estimated construction costs of £60 billion, over double that predicted by the company, and more in-line with known costs from the Munich system.
The promoters responded with a note demonstrating that a major amount of the additional costs in the government estimate, £29 billion, were due to "excluded land-take", and that these were not included in the estimates for the competing HS2 proposal. Their complaints fell on deaf ears, and despite numerous attempts to have this issue reconsidered, HS2 continued to move forward. The company eventually gave up, and ceased operations in 2013.
After decades of development and sales efforts, the Transrapid group also decided to fold operations starting in 2010. In 2012, the Emsland track and the associated factories and facilities were slated for removal or redevelopment. |
/**
* Tests whether the renderers update their views when the graph changes.
*/
@Test
public void testGraphUpdates() {
final ListenableGraph<LengthData> graph = new ListenableGraph<>(
new TableGraph<LengthData>());
Graphs.addPath(graph, new Point(0, 0), new Point(10, 0), new Point(10,
10), new Point(0, 10), new Point(0, 0));
final Simulator sim = Simulator.builder()
.addModel(RoadModelBuilders.dynamicGraph(graph)
.withCollisionAvoidance()
.withDistanceUnit(SI.METER))
.addModel(
View.builder()
.with(WarehouseRenderer.builder()
.withMargin(0)
.withOneWayStreetArrows()
.withNodeOccupancy()
.withNodes())
.with(GraphRoadModelRenderer.builder()
.withDirectionArrows()
.withNodeCoordinates()
.withMargin(1)
.withNodeCircles())
.withAutoPlay()
.withAutoClose()
.withSpeedUp(8)
.withTitleAppendix("testGraphUpdates()"))
.build();
final long timeMul = 6000L;
sim.register(new TickListener() {
@Override
public void tick(TimeLapse timeLapse) {
if (timeLapse.getTime() == 10 * timeMul) {
Graphs.addPath(graph, new Point(0, 10), new Point(0, 20),
new Point(20, 20), new Point(20, 0), new Point(10, 0));
} else if (timeLapse.getTime() == 16 * timeMul) {
Graphs.addBiPath(graph, new Point(20, 0), new Point(40, 0),
new Point(40, 20), new Point(20, 20));
} else if (timeLapse.getTime() == 20 * timeMul) {
Graphs.addBiPath(graph, new Point(20, 20), new Point(40, 35),
new Point(60, 20), new Point(60, 10), new Point(40, 20));
} else if (timeLapse.getTime() == 25 * timeMul) {
Graphs.addPath(graph, new Point(60, 10), new Point(60, 6),
new Point(56, 6), new Point(60, 2), new Point(40, 0));
} else if (timeLapse.getTime() == 30 * timeMul) {
Graphs.addBiPath(graph, new Point(20, 20), new Point(20, 30),
new Point(20, 40));
} else if (timeLapse.getTime() == 35 * timeMul) {
Graphs.addBiPath(graph, new Point(0, 0), new Point(-10, 0),
new Point(-10, -10), new Point(0, -10), new Point(0, 0));
} else if (timeLapse.getTime() == 40 * timeMul) {
graph.removeNode(new Point(0, 0));
} else if (timeLapse.getTime() == 45 * timeMul) {
graph.addConnection(new Point(20, 40), new Point(20, 400));
} else if (timeLapse.getTime() == 50 * 60000L) {
graph.removeConnection(new Point(20, 40), new Point(20, 400));
} else if (timeLapse.getTime() >= 55 * timeMul) {
sim.stop();
}
}
@Override
public void afterTick(TimeLapse timeLapse) {}
});
sim.start();
} |
Q:
Can we please change the "lose reputation on downvoting" thing?
Ok, I get that we don't want people down-voting indiscriminately - or because the guy being down-voted was rude about an answer someone gave - or any one of a hundred other invalid reasons for a down-vote.
But occasionally I see anwers to questions that are mis-leading, teach bad-practices, or are just plain wrong. And I'm becoming more and more inclined to not down-vote them. I even got a comment on a comment the other day asking why I didn't downvote if I felt that way. And it's rare, when I do downvote, for anyone else to downvote as well, presumably because someone else already has so why should they waste their reputation.
Some of the reasons given here are about wanting to encourage upvoting rather than downvoting. Funny, I thought this website was a technical resource, not a mutual back-slapping club.
Why can't we have a simple, reputation-based mechanism for rewarding good downvoting? How about the first person to downvote gets penalised 2 reputation, and the next guy to downvote gets penalised 1. But if, say, 4 people in total downvote then clearly they were right to downvote, so remove the penalty.
There have been times when people have upvoted a question I downvoted. I disagree with that obviously, but this is a community. So maybe instead of removing the downvote penalty if 4 people downvote, it should be to remove the downvote penalty if the total vote is -4 or worse.
As a programmer, I can't see that the impact of this solution on the system would be particularly huge. And the result would be to encourage people to downvote on questions which are so bad that others would be likely to support that decision. Resulting in a website where bad questions are marked as such as clearly as good answers are marked as good. Hopefully.
A:
Losing 1 reputation isn't really a significant penalty - just enough of an irritant to prevent indiscriminate downvoting.
Seriously, posting an answer with a single upvote "buys" you 10 downvotes. In the time it took you to write this post, I suspect you could have answered a question or two and garnered multiple upvotes.
How much do you really care about losing 1 rep?
Personally I've been in favour of raising the cost of downvotes rather than removing it. |
FORT DIX, N.J. (Reuters) - President Barack Obama used a holiday season visit to a U.S. military base on Monday to issue a tough warning to Islamic State militants, saying a U.S.-led coalition will permit no safe haven to the group and will destroy it eventually.
Obama spoke to hundreds of camouflage-wearing troops in a hangar at Fort Dix to thank the U.S. military for its actions around the world. In a display of bipartisan support for the troops, Obama was joined by New Jersey’s Republican Governor Chris Christie, a potential candidate to succeed Obama in 2016.
The U.S.-led coalition in Syria and Iraq has had some successes against the Islamic State group but has yet to force a major rollback from the territorial gains the extremists made in seizing large swathes of Iraq last summer.
“Make no mistake. Our coalition isn’t just going to degrade this barbaric terrorist organization. We’re going to destroy it,” Obama said.
Obama said gains are being made. Hundreds of vehicles and tanks and more than 1,000 fighting positions have been taken out, he said.
“We are hammering these terrorists,” he said.
“They may think that they can chalk up some quick victories, but our reach is long. We do not give up. You threaten America, you will have no safe haven. We will find you and like petty tyrants and terrorists before you, the world is going to leave you behind and keep moving on without you, because we will get you,” Obama said.
Obama also said the United States is on track to end its combat mission in Afghanistan at year’s end, leaving behind a force dedicated to training Afghan security forces and carrying out counter-terrorism operations.
Obama last month approved a slight expansion in the U.S. role in the counter-terrorism operations. There are concerns in Afghanistan, however, about increasing Taliban attacks in the capital, Kabul.
Obama, who made ending the war in Afghanistan a priority, said challenges remain there.
“Afghanistan is still a dangerous place,” he said. |
A former UK banking communicator has joined the energy industry trade body Energy UK as director of comms and public affairs.
Lesley McLeod, who left the British Bankers' Association after heading comms for six years last October, took over the position from the departing Christine McGourty at the end of March.
She will report to Angela Knight, the chief executive of Energy UK and former chief executive of the British Bankers' Association. |
Last week, newly arrived in Athens as part of the U.S. Boat to Gaza project, our team of activists gathered for nonviolence training. We are here to sail to Gaza, in defiance of an Israeli naval blockade, in our ship, The Audacity of Hope. Our team and nine other ships’ crews from countries around the world want Israel to end its lethal blockade of Gaza by letting our crews through to shore to meet with Gazans. The U.S. ship will bring over 3,000 letters of support to a population suffering its fifth continuous decade of de facto occupation, now in the form of a military blockade controlling Gaza’s sea and sky, punctuated by frequent deadly military incursions, that has starved Gaza’s economy and people to the exact level of cruelty considered acceptable to the domestic population of our own United States, Israel’s staunchest ally.
The international flotilla last year was brutally attacked and the Turkish ship fired on from the air, with a cherry-picked video clip of the resulting panic presented to the world to justify nine deaths, one of a United States citizen, most of them execution-style killings. So it’s essential, albeit a bit bizarre, to plan for how we will respond to military assaults. Israeli news reports say that their naval commandos are preparing to use attack dogs and snipers to board the boats. In the past, they have used water cannons, Taser guns, stink bombs, sound bombs, stun guns, tear gas, and pepper spray against flotilla passengers. I’ve tried to make a mental list of plausible responses: remove glasses, don life jacket, affix clip line (which might prevent sliding off the deck), carry a half onion to offset effect of tear gas, remember to breathe.
Israel Defense Forces are reportedly training for a fierce assault intended to “secure” each boat in the Freedom Flotilla 2. As passengers specifically on the U.S. boat, we may be spared the most violent responses, although Secretary of State Hillary Clinton has not ruled out such violent responses and has preemptively certified that any response we may “provoke” (in sailing from international waters to a coastline that is not part of Israel) is an expression of Israel’s “right to defend themselves.” Israel says it is prepared for a number of scenarios, ranging “from no violence” (which it knows full well to expect) to “extreme violence.” We are preparing ourselves not to panic and to practice disciplined nonviolence whatever scenario Israel decides to enact.
If they overcome our boat swiftly, they will presumably handcuff us and possibly hood us before commandeering our ship toward an Israeli port, removing us from the ship, jailing us, and (judging from their past actions) deporting us. I don’t know what country I would be deported to, but I would eventually return to my home city of Chicago and to a safety I cannot share with the desperate people of Gaza, or friends from throughout this region so troubled by war, much of it instigated by my own country.
My fellow passenger John Barber recently visited Gaza, and this morning he told me a harrowing story of a Gazan family, that of a farmer named Nasr, living near the Gaza-Israel buffer zone. The first attack took place in June 2010. To quote John’s Web site: “the Israeli army attacked the family home while the children were playing outside.… Nasr’s wife, Naama, was in the front yard when a tank 500 meters from the home fired shells packed with nails at the home. Nasr’s wife, torn to ribbons, bled to death in the yard when ambulances were not permitted down the narrow dirt road to his home.” Ambulance stoppages are a frequent punitive measure used against Palestinians in the West Bank and Gaza.
“After the second attack,” which occurred in April 2011, “Nasr’s family moved to a house in the village, near to the cemetery where his wife was buried. One night, around midnight, Nasr woke to find his children gone. He went outside and found them at their mother’s grave.” The next day he took them away from that village and back to their land, to try and put the past behind them, and await a future they can barely hope will be kind.
I hope that our ship will make it to Gaza. I hope Johnny Barber can again visit Nasr, and that I can visit the family and the trapped young men who sheltered me during the final days of the crushing December 2008 Operation Cast Lead bombardment. I hope that our ship will make it out of dock—acting on an “anonymous complaint,” the government here has demanded an inspection of several days before they will allow our (entirely seaworthy) ship to sail. With its world-headline-producing economic troubles, Greece seems incredibly vulnerable to the intense pressure that the Israeli and U.S. governments seem openly prepared to exert. We hope that neither economic nor political blackmail will succeed at stopping our ship from leaving the spot near Athens where it is waiting to receive us.
“Please don’t lose the human capacity for happiness.” My Afghan friends in the video urge us to stay human. Ali, who speaks in the video, has been harassed by Afghan security forces since becoming active with the Afghan Youth Peace Volunteers. So has his family. Other of his companions have faced death threats, interrogation, arson, and theft. Their persistence encourages and guides me, and I struggle to let their persistence urge me on, because staying human is also about doing what is right.
I think of Nasr’s children watching their mother die, and I think that if they’re going to stay human then I and my countrymen ought to help. We have to become more human than we’ve so far managed to be: We have to make sacrifices to stop the crimes that are ultimately being committed in our names. In different ways, we have to risk the consequences of being where we need to be when we need to be there. We have to stand up to injustice and with the victims of injustice and rely on our opponents to find their humanity in time, given enough examples of what it can look like. When we find ourselves, against all odds, staying human, that example surprises us and helps sustain us in hope for the power of humanity. We hope we will be allowed through to Gaza, we hope that the siege will be lifted, and we hope that in this time when humankind can so little afford the nightmares of greed and ignorance that rend the Middle East and that render our leaders incapable of uniting to address ever more desperate, ever more frightening global crises, we as a species, one with no assurance of its perpetual survival, will somehow find some way to stay human. |
We knew this was coming, and just like that, the LG G Pro 2 has now become official, without much fanfare. You may remember our review of the initial G Pro smartphone, a direct competitor of the Galaxy Note 2. With it, LG made a notable jump in market share in Korea with that phone and since the LG G2 doesn’t really cover the “large display phone” segment that the G Pro compete in, it was time for an update and LG is happy to oblige with a G Pro 2, which will compete against the Galaxy Note 3 and other big phones.
The G Pro seems to add some improvements to already excellent G2 photo capabilities. This is something that is somewhat missing from the G Flex for example. Now that LG has been developing on the Snapdragon 800 platform for a while, its team has been able to tap into things that were left aside in the G2. For example, the G Pro 2 can record video at 120 frames per second, enabling users to play it back as a 4X slow-motion at 30FPS. This is a good addition to easy and high-impact camera effects.
When recording at normal speed, the G Pro 2 can capture videos with a 4K resolution. This probably works best for bright nature scenes that have a lot of details. LG has also introduced Magic Focus, an post-photo option that gives the user some degree of control about what will appear sharp or blurry. Natural Flash also seems to be a good addition: it works by modulating the flash color and intensity to make the photos look more natural and less “washed out”. It sounds very similar to Apple’s flash technique in the iPhone 5S.
The G Pro 2 is very similar to the 5.2-inch G2 in terms of hardware platform. It uses a Snapdragon 800 (2.26 GHz) which has an Adreno 330 graphics processor integrated in it. The display size is the main difference with a 5.9” 1080p IPS display vs. a 5.2” display for the G2. Since LG can’t seem to do anything wrong with the displays as of late, I’ll assume that the G Pro 2 display is just as awesome as the G Pro and G2 handsets.
The whole system is powered by a 3200 mAh battery, which is nice, but not quite impressive as the G-Flex 3500 mAh battery or the Huawei Mate 2 4000mAh monster battery. In the back, there’s a 13 Megapixel main camera with optical image stabilization, which seems identical to the LG G2 camera which is an excellent baseline.
With a size of 157,9 x 81.9 x 8.3mm (172g), it’s no small phone obviously, but the thickness and over form-factor should be very much manageable. Design-wise, it uses the same design language as its G2 cousin. It’s not something that people will trample themselves over, but it’s clean and it works. If the G2 is of any indication, I would recommend the white version, although I’m looking forward to seeing what the silver one looks like in the real world.
Interestingly enough, the LG Tab 8 looks much better in black, since LG has used a slightly metallic finish. I guess that you never know before seeing one or having someone you trust take a look on your behalf. Keep an eye on Ubergizmo. By the way, LG says that thus phone will come in Titan (gray) White and Red – there’s obviously a black version as well.
As usual, this is an LTE phone, and it falls back to HSPA+ when roaming in non-Korean countries. In the USA, you should get HSPA+ with AT&T. I’m not sure about T-Mobile, but I will try if I can. At this point, this is a Korean phone only, but if history has taught us something, it is that a phone like this will eventually make its way out to the rest of the world. LG has no further announcement for now, but MWC 2014 may shed some new light on this.
Filed in Breaking >Cellphones. Read more about LG and Lg G Pro 2. |
Have you ever wondered what to do with that wedding dress after the big day?
IsOver.com, a Web site that allows newlyweds to sell items they no longer want after saying "I do."
"All the planning goes up to the wedding and then it ceases," said Vazquez, who met King a year ago at the University of Connecticut's Stamford branch while looking for a job. "It's good to give people the follow-through so that they can recoup some of the expenses."
The site, which was launched July 1, is designed to allow people in the United States and overseas to buy or sell items related to the wedding industry, such as a once-worn gown and contracts for wedding services never used, Vazquez said.
"A few other sites did this, but they just focused on jewelry from American weddings," said Vazquez, 32, who graduated from UConn in 2007 with a degree in corporate and organizational studies.
MyWeddingIsOver.com also serves as a place where people looking to start a business can sell their wares, Vazquez said.
"This site really is for everybody," he said, adding that a clothing retailer from India has put a collection of saris on the site.
The idea also came out of necessity, said Vazquez, who was having trouble finding a job after graduation and is living with his mother.
"The minute I get a degree, I can't find a job," he said. "I'm stuck between a rock and a hard place."
Vazquez and King have launched two additional sites with self-explanatory names for those who may not be Googling wedding planners at the moment: MyRelationshipIsOver.com and MyEngagementIsOver.com. Both lead back to the original site. They also have started versions of the original for the United Kingdom, China and India.
"We're hoping to get on Oprah,' " said King, who will graduate later this year from UConn-Stamford with a bachelor's degree in economics. "We've been doing whatever we can to get our name out there."
MyWeddingIsOver.com and its fellows, which will draw revenue from advertising and fees for placing items, hopefully will help consumers come up with some extra cash, King said.
"Especially in these economic times, everyone wants to make a few extra bucks," he said.
Vazquez and King's business idea should do well with proper marketing because so many wedding items are used only once by the bride and groom, said Gerard Monaghan, co-founder of the Association of Bridal Consultants in New Milford.
"It makes perfect sense," he said. |
More New Yorkers have died from committing suicide than motor vehicle accidents or homicides between 2000 to 2014, according to a new report.
The Health Department released the findings Wednesday suggesting that suicide rates have risen throughout the area over the years, with 565 suicides reported in 2014.
The rate increased from 5.5 in 200 to 6.3 per 100,000 people in 2014, according to the report. The increase mirrors the nationwide trend of the suicide rate rising. However, New York City remains well below the national average of 13 per 100,000 in 2014.
The report also found that men represent the majority of suicides, with 393 men taking their lives in 2014 compared to 172 women, WCBS 880 Peter Haskell reported.
However, the increased rate from 2000 to 2014 was primarily among women (56 percent increase), while the suicide rate among men remained steady.
The suicide rate was highest among women between the ages of 45 and 64, the study found.
“The data released today on suicide in New York City makes clear that a person’s untreated mental illness can result in premature and tragic death,” said First Lady Chirlane McCray.
McCray said that the city is expanding mental health resources to treat mental illness before they become more serious. She emphasizes that people need more help fighting the stigma against mental illness and emotional distress.
The Health Department found that suicide rates in New York City are highest among white men and that rates have increased in Manhattan and Queens over the years, while other boroughs have remained steady.
The most recent data shows that 10 percent of all suicides in New York City were due to firearm deaths.
“This is an alarming study showing that we need to do more to slow down the increase in suicide rates, both nationally and in New York City. However, we can take some comfort from the fact that New York City suicide rates are well below the national average. Clearly we are doing something right,” said Council Member Andrew Cohen, Chair of the Committee on Mental Health.
ThriveNYC, an initiative led by McCray and the Health Department, has launched 54 programs to raise awareness about the need to seek help while increasing access to mental health services across the city.
You can help prevent suicide by learning the warning signs. The following signs may mean someone is at risk for suicide. The risk of suicide is greater if a behavior is new or has increased and if it seems related to a painful event, loss, or change.
• Talking about wanting to die or to kill themselves
• Looking for a way to kill themselves, such as searching online or buying a gun
• Talking about feeling hopeless or having no reason to live
• Talking about feeling trapped or in unbearable pain
• Increasing the use of alcohol or drugs
• Acting anxious or agitated; behaving recklessly
• Sleeping too little or too much
• Withdrawing or isolating themselves
• Showing rage or talking about seeking revenge
• Displaying extreme mood swings
If you or someone you know needs help, call 1-800-LIFENET. If someone is in imminent danger, call 911. |
Some Vancouver Police officers may be wearing body-mounted video cameras while on duty next year, as part of a pilot project to test their usefulness as a policing tool.
An internal report endorsed by Chief Jim Chu that will be considered by the Vancouver Police Board today, says that officers began studying the potential use of the cameras last year and found "numerous benefits related to the use of body-worn video."
Edmonton police have shelved body cameras but it may not be forever. (CBC )
The report identified several benefits such as increased transparency, greater officer safety due a reduction in incidents requiring the use of force, and better and additional evidence. The report suggests that a pilot test-run could be in place by mid-2014.
It says that positive experiences with the technology among the Edmonton Police Service, the Victoria Police Department and the Albuquerque Police Department in New Mexico point to the possibility of body-mounted cameras as an effective way to reduce reliance on conflicting accounts of particular events.
The video cameras, which are about the size of a smartphone and are mounted on an officer's left shoulder, have also been tested in Toronto, Calgary and Ottawa. The Los Angeles Police Department are also field-testing 60 cameras this month.
The report notes there are civil liberties concerns, but points out that the American Civil Liberties Association supports the use of video cameras "conditional on a framework which protects the rights of citizens."
The Canadian and B.C. Civil Liberties Associations have not yet released an official position on the technology, the report says. |
The psychological reactions after witnessing a killing in public in a Danish high school Background School killings attract immense media and public attention but psychological studies surrounding these events are rare. Objective To examine the prevalence of posttraumatic stress disorder (PTSD) and possible risk factors of PTSD in 320 Danish high school students (mean age 18 years) 7 months after witnessing a young man killing his former girlfriend in front of a large audience. Method The students answered the Harvard Trauma Questionnaire (HTQ), the Crisis Support Scale (CSS), and the Trauma Symptom Checklist (TSC). Results Prevalence of PTSD 7 months after the incident was 9.5%. Furthermore, 25% had PTSD at a subclinical level. Intimacy with the deceased girl; feeling fear, helplessness, or horror during the killing; lack of expressive ability; feeling let down by others; negative affectivity; and dissociation predicted 78% of the variance of the HTQ total scores. Conclusion It is possible to identify students who are most likely to suffer from PTSD. This knowledge could be used to intervene early on to reduce adversities. A lthough they are less frequent than other types of trauma, school shootings and killings result in massive public attention because it is easy to imagine yourself or your children as targets in daily environments. Nevertheless, rather few studies have been performed on this phenomenon and its psychological consequences for the witnesses. Some studies have been carried out on witnessed killings in the workplace or in public, mainly with adults (Creamer, 1989;Elklit, 1994;Johnson, North, & Smith, 2002;North, Smith, McCool, & Shea, 1989;North, Smith, & Spitznagel, 1994, 1997North, Spitznagel, & Smith, 2001) but also with children (Pynoos, Frederick, Nader, & Arroyo, 1987;Schwarz & Kowalski, 1991). All of the studies pointed to symptoms of posttraumatic stress disorder (PTSD) as a possible consequence of witnessing killings or murders in public. Also, being a witness to a killing had a significant impact on most people, but the degree of trauma was influenced by individual factors. Most importantly, the effects of witnessing a killing at school and possible risk factors for development of PTSD have to our knowledge never been studied within a high school population. Although there is some research on the effect of disasters on adolescents (e.g., Dogan, 2011;Ghazali, Elklit, Yaman, & Ahmad, 2012) and we know quite a lot about the negative effects of community violence (i.e., witnessing of killing, robbing, threats with weapons, etc.) on adolescents' development, studies of community violence are normally conducted in high-risk adolescent populations, who have experienced multiple traumatic events, and where the possible risk factors for the development of psychopathology are confounded, for example, living in high-risk neighborhoods, having low socioeconomic status, living with parents involved in criminal activity, and possible substance abuse (Foy, Ritchie, & Conway, 2012;Stein, Jaycox, Kataoka, Rhodes, & Vestal, 2003). Almost nothing is known about the effects of witnessing of a single incident of high school killing in typical (non-high-risk) adolescent populations. The goal of the current study was to identify demographic, peri-traumatic, and psychosocial factors that influenced the degree to which the experience of the high school killing affected psychological adjustment (expressed by severity of PTSD symptoms) in adolescent students, 7 months after the incident. Well-established risk and protective factors from the PTSD literature were chosen for investigation in the present study. Gender plays an important role in the risk of traumatization. Two meta-analyses (Brewin, Andrews, & Valentine, 2000;Tolin & Foa, 2006) concluded that women are more likely than men to meet the criteria for PTSD after a traumatic event, even though they are less likely to experience potentially traumatic events (see also Olff, Langeland, Draijer, & Gersons, 2007). The twofold risk for PTSD among women could not be attributed solely to a higher frequency of specific, highly pathogenic potentially traumatic events such as sexual assault, but seemed to exist across trauma categories. In relation to witnessing public killings, North et al. reported a corresponding difference with 20 and 36% of the men and women, respectively, having PTSD 1 month after the incident. The participants in their study had all witnessed a gunman shooting in a cafeteria, but early in the gunfire it became obvious that the shooter favored killing females. Therefore, it is unclear whether this gender-related risk affected the difference in the level of traumatization in male and female witnesses in this particular study. The level of intimacy with the victim has been shown to influence the witnesses' PTSD severity. Dyregrov, Frykholm, Lilled, Broberg and Holmberg investigated 563 adolescents' reactions (aged 1319 years; mean age 15.4) 7 months after a discotheque fire in Sweden that killed 63 young people. The levels of the participants' traumatic reaction increased with increased intimacy, that is, knowing the deceased personally. The same results have been found in other studies of child, adolescent, and young adult witnesses of mass killings, natural disasters, and peers to adolescent suicide victims (;Parslow, Jorm, & Christensen, 2006;). This indicates that particular attention should be given to those who perceived themselves to be psychologically close to the deceased. The A2 criterion in the PTSD diagnosis: The exposure criterion in the PTSD diagnosis in DSM-IV has two elements: Criterion A1 specifies that the person experienced, witnessed, or was confronted with events involv-ing actual or threatened death, physical injury, or other threats to the physical integrity of the self or others; criterion A2 requires that the initial response to the event involves fear, helplessness, or horror (American Psychiatric Association, 1994). Criterion A2 is known to be a very good predictor of subsequent PTSD (e.g., Brewin, Andrews, & Rose, 2000;). In general, it appears that social support from family and friends has a positive influence on the ability to cope with a trauma. Out of 14 separate risk factors for PTSD investigated in a meta-analysis, social support was the strongest predictor accounting for 40% of variance in PTSD severity. When studies investigated both positive and negative support elements, a negative social environment was a better indicator of PTSD symptomatology than lack of positive support (Brewin & Holmes, 2003). The perception of social support is also important in the prediction of PTSD. In a study of 150 undergraduate students aged 1722 years (mean age 19.3) who reported having experienced different types of trauma, Haden, Scarpa, Jones, and Ollendick investigated the moderating effect of perceived social support on PTSD and perceived injury. The researchers concluded that the concept of support, perceiving it or seeking it out, was one of the most powerful variables essential for minimizing the severity of PTSD in young adults. Dissociation may be understood as responses occurring in the course of a traumatic event, which cause a disruption in the usually integrated functions of perception of the environment, memory, consciousness, or identity (American Psychiatric Association, 1994;Bryant, 2007). Dissociative responses that occur at the time of trauma (peritraumatic dissociation) have been described as the largest known risk factor for subsequent PTSD (Ozer, Best, Lipsey, & Weiss, 2003). However, Briere, Scott, and Weathers showed that the less-investigated, trauma-specific dissociation, that occurs during or after an event and continues until the time of assessment (persistent dissociation), when taken into account, pushes aside the effect of peritraumatic dissociation on PTSD. Trauma-related persistent dissociation is also found to be a substantial predictor of PTSD in other studies Ask Elklit and Sessel Kurdahl (Ehlers & Clark, 2000;Halligan, Michael, Clark, & Ehlers, 2003;Murray, Ehlers, & Mayou, 2002). In spite of the fact that this is a retrospective study (conducted 7 months after the incident), its importance is highlighted by the lack of other recorded studies of this specific trauma-type in adolescents. Given the relatively rare occurrence of public high school killings, and even more rare scientific investigation of them, identification of possible risk factors of PTSD in this particular incident can be of value in guiding future screening programs to prevent chronification of symptoms in the adolescent victims. The incident The killing at the Hasseris High School in Aalborg, Denmark, occurred on Friday, March 3, 2006, just when the annual Shrovetide party was getting started. A female student ran through the front door into the open wardrobe area closely followed by her former boyfriend with whom she had broken up with 2 days earlier. He held a bloodstained knife in his hand and she was screaming. After overpowering her in the middle of the student crowd, he stabbed her several times in the chest. Most of the students thought that what they saw was some kind of theater performance and did not interfere. They slowly became aware of the severity, when the stabber fled and the police and an ambulance arrived. Almost 200 party participants were detained inside the assembly hall and a classroom for 3 hours until the police had found the killer, who had hung himself in a shed near his home. In the meantime, it was difficult for the students to find out what had happened, and students and family members outside the high school had problems contacting their friends and relatives inside the school because of an overloaded mobile telephone network. The next day, the headmaster and a crisis psychologist held an information meeting for all of the students, relatives, and teachers about the incident and three local psychologists offered counseling for those in need during the following days. Method Participants All 415 students, who were attending the high school at the time of the incident, were asked to participate in the study. A total of 320 (77%) returned the questionnaire. The respondents were aged 1620 years, with a mean age of 17.99 years (SD01.05). Of these, 62.2% were female (199 persons). The parents of the students were well educated: 36% of the fathers and 26% of the mothers had a university degree, and only 11% of the fathers and 9% of the mothers had ended their education after 9 years in public school. Just five (2%) of the students did not have Danish citizenship and 19 (6%) were born outside Denmark. The majority of the students (220069%) lived with both of their parents, and 76 (24%) lived with only one parent. One fourth (82 persons) of the students had experienced at least one potential traumatic event in their life and 45% (128 persons) had experienced, as a minimum, one important life event during the past year. Procedure The study took place 7 months after the incident. The questionnaires were handed out to the students in second and third grade at the high school and sent to the parents' addresses of those students who graduated in June (Danish high schools, ''gymnasiums'', have three grade levels). Instruments The questionnaire included questions concerning demography and peri-traumatic factors (e.g., spatial proximity to the killing, psychological closeness to the victim) along with the following instruments: The Harvard Trauma Questionnaire*Part IV (HTQ; Mollica, Caspi-Yavin, Bollini, & Truong, 1992) consists of 16 items scored on a 4-point Likert scale. It measures the intensity of the three core symptom groups (intrusion, avoidance, and arousal) of PTSD. The Danish version of the HTQ has good psychometric properties, comparable to the original. The alpha values for three scales in the present study were 0.83 (intrusion), 0.70 (avoidance), and 0.82 (arousal); the total scale with alpha was 0.93. To qualify for the full diagnosis, the appropriate number of core symptoms should be]3 (''often''). The Crisis Support Scale (CSS) was used for rating the experience of perceived social support after a traumatic event through seven items (Joseph, Andrews, Williams, & Yule, 1992). The items include: perceived availability of someone to listen; contact with people in a similar situation; the ability to express oneself; received sympathy and support; practical support; the experience of being let down; and general satisfaction with social support. The items are rated on a 7-point Likert scale, ranging from ''never'' to ''always.'' The CSS has been used in several disaster studies*it has good internal consistency as well as good discriminatory power. Elklit, Pedersen, and Jind have confirmed the psychometrical reliability and validity of the CSS in Danish. Alpha for the total CSS score in the present study was 0.73. The Trauma Symptom Checklist (TSC) (Briere & Runtz, 1989) measures the occurrence of psychological symptoms associated with trauma. In the present study, a Danish version with 26 items (TSC-26) was used (Krog & Duel, 2003). The Danish TSC has good psychometric qualities and is a valid instrument measuring the effects of traumatization (ibid.). The TSC covers three dimensions and is scored on a 4-point Likert scale. The alpha values in the present study were a 00.83 (negative affectivity; 11 items), a 00.83 (somatization; 10 items), and a 00.70 (dissociation; 5 items); total TSC a 00.91. Data analyses Rates are reported as raw numbers and percentages. Means are reported with standard deviations. The following preliminary tests were conducted to test the association between the presumed risk-factors and symptoms of PTSD: x 2 -analyses were performed to test associations between dichotomous variables. Correlations were estimated with Pearson's correlation coefficient. ANOVA analyses were used to investigate associations between dichotomous and scale variables and to assess effect sizes. Variables that had significant associations with PTSD symptoms were subsequently entered in a hierarchical regression analysis. Results Exposure to the killing Sixty-four persons (19%) were eyewitnesses to the crime; 71 (22%) were in the assembly hall next to the wardrobe area; 48 (15%) were elsewhere in the high school; 18 (6%) were outside, but went inside; 38 (12%) were outside and never got in; 85 (27%) did not take part in the party; one person did not answer. The students outside could see the dead body as the front door was made of glass. During the killing, 189 (59%) reported feeling helpless and powerless, 161 (50%) felt horror and 8 (3%) thought they were going to die. These feelings from now on referred to as ''A2''. Posttrauma social support The CSS total score had an average of 40 (SD05.7) indicating that the students in general experienced good social support. During the following days, there were mourning ceremonies and class talks with counselors. In addition, 35% (112 persons) spoke individually with a psychologist at the high school, 19% (61 persons) with their curriculum counselor, and 10% (32 persons) with the principal. Eight percent (25 persons) were in contact with a crisis psychologist outside the school and 7% (21 persons) with their general practitioner. Six percent (16 persons) indicated that they still felt in need of psychological treatment 7 months after the killing. PTSD symptomatology Seven months after the killing, 28 persons (9.5%) met the three symptom-cluster criteria of a PTSD diagnosis. In addition, 74 persons (25%) met the criteria for two PTSD symptom clusters and for a diagnosis of subclinical PTSD. Regression analysis The first step consisted of gender, and the second step of peri-traumatic factors (intimacy and A2), because these three factors were assumed to stay constant across the course of the 7 months since the exposure to the incident. The third step consisted of aspects of social support (CSS item three and CSS item six), and the fourth step of individual differences in reactions to trauma (TSC negative affectivity and dissociation). The final model included six variables, which in all explained 78% of the total HTQ score ( Table 1). The contribution of gender was no longer significant in the last step. The variables with the strongest individual contribution to the level of PTSD symptoms were (in order of appearance) negative affectivity, persistent dissociation, and lack of social support (''feeling let down''). Discussion Seven months after the incident, 35% of the students were traumatized to at least a subclinical degree. This degree of traumatization existed in spite of the fact that every student in addition to the collective interventions was offered individual sessions with a crisis psychologist closely after the incident (which 1/3 accepted). The Cochrane Collaboration made a comprehensive review (Rose, Bisson, Churchill, & Wessely, 2002) of a single session individual debriefing and found no evidence of Ask Elklit and Sessel Kurdahl it as a useful treatment for the prevention of PTSD after traumatic incidents. We found that a considerable amount (78%) of the variance in the level of traumatic response could be predicted with six well-known risk factors from the general PTSD literature. First, because of the crosssectional nature of this study and the delayed measurement of the traumatic effects, some of the significant predictors could be interpreted as a result of the traumatization, rather than risk factors. That is, lack of social support can be seen as a consequence of having developed PTSD symptoms, which in turn hinders social support seeking (Kaniasty & Norris, 2008). Also, at the time of the measurement, the dissociation levels can be seen as a representation of pathogenic traumatic reactions akin to PTSD. This is the most logical explanation because the very definition of PTSD includes some dissociative symptoms. In natural remission from trauma, dissociation symptoms fade away with time (Dalenberg & Carlson, 2012). Persistent dissociation can therefore, in the present population, like in many other traumatized populations (see the introduction), most likely be indicative of a treatment demanding reaction to trauma exposure. This is an important point, because it enables us to identify adolescents in need of more intensive treatment. Contrary to this, negative affectivity and lack of expressive ability can almost certainly be interpreted as stable individual factors (i.e., personality traits) and therefore possible risk factors that influence the individual reactions to trauma. Difficulties in labeling and communicating emotions are central ingredients of alexithymia. Negative affectivity/neuroticism is related to alexithymia (Wise & Mann, 1994), and the lack of ability to express emotions about the traumatic event might very well be the facet of the overall neurotic reaction pattern. Although no firm conclusions about the causality of the factors can be made because of the cross-sectional design of this study, negative affectivity seems to act as a predisposing factor to more severe traumatic reactions in the present adolescents. This is the most likely interpretation in light of the abundant former research with adults that points to the same associations between trauma and stable traits like negative affectivity. In light of the retrospective nature of this study, the predictive power of the peri-traumatic factors (A2 criterion, and the intimacy with the victim) might have been overridden by the simultaneous measuring of factors, which at the time of the assessment (7 months after the trauma), are probably indicators of developing pathological reactions to trauma (e.g., dissociation, and lack of social support). This means that the feeling of horror and helplessness during the trauma, and intimate knowledge of the victim, might have had stronger predictive power than dissociation and feelings of being let down, had they been measured more closely to the incident itself. As pointed out in the introduction, the A2 criterion and the intimate knowledge of the victim are also well-known risk factors for the development of PTSD in other traumatized populations. In addition, they are both easily assessed. Therefore, we propose that they be used as the first line of screening in the more immediate aftermath of similar incidents. Furthermore, the possibility that witnesses in risk of developing PTSD to some degree might have a lack of expressive ability needs to be considered when offering crisis intervention as this might lower the probability of the witnesses seeking help. In Denmark, after a potentially traumatic event such as rape, death of loved ones, physical assault, accidents, and others, crisis intervention is available for the general population (Elklit & Nielsen, 2008). Taking a lack of expressive ability into account, those at risk should then not only be offered help but also be strongly advised to seek help in a proactive way. This is an especially important consideration in relation to adolescent witnesses, whose further development might be jeopardized by persistent traumatic symptoms. Ehlers and Clark support the need for strategies to identify people who are unlikely to recover on their own. Similarly, the Cochrane review () concludes that the compulsory debriefing of victims of trauma should cease and the focus of early intervention should instead, like we suggest, be targeted at the risk group. The development of screening instruments and intervention programs is therefore of great importance. The generalizability of the results of this study is limited by: the cross-sectional design, lack of control group, and the time between incident and assessment, as well as the use of self-reporting. Further research is therefore needed of killings in a school context to investigate the predictors of PTSD in adolescent witnesses to killings and other types of public traumas. Even so, the associations between aspects of trauma and subsequent traumatic reactions, which are known from the adult populations, are being confirmed in adolescent witnesses of public killings in the present study. This provides us with valuable information that can be acted upon, until we have better studies to inform us. Conclusion This study confirms that being a witness to a killing can be a very traumatic experience and identifies six central peri-and posttraumatic variables, which explain a substantial amount of the variation in PTSD. Screening for the variables, that is, intimacy with the deceased, A2 criterion, lack of expressive ability, feeling let down by others, negative affectivity, and dissociation in the witnesses after a similar incident may well be useful to identify those who will develop PTSD and thereby constitute a group on which further psychological treatment should be concentrated. |
Multiple pterygium syndrome: neuromuscular findings in a case. A woman with multiple congenital joint deformities and webbing (multiple pterygium syndrome) is described. The electrophysiologic study revealed normal sensory and motor nerve conduction velocities. However, the compound muscle action potential amplitude and the voluntary motor unit size were reduced, suggesting a decrease in the number of muscle fibers. The muscle biopsy was otherwise unremarkable histologically and histochemically. Possible explanations for these findings are discussed. |
1. Field of the Invention
The present invention relates to a power unit mount assembly.
2. Description of the Related Art
One power unit mount device equipped with a dynamic damper is disclosed in Japanese Utility Model Publication of Unexamined Application No. 58-44222. This mount device comprises annular external and internal cylindrical bodies with a resilient material such as rubber inserted between these two bodies. The external cylindrical body is mounted on the power unit through a bracket. The internal cylindrical body is mounted on the vehicle body. A projection is provided on the external circumferential surface of the external cylindrical body, at a location opposite the bracket. In this projection, a mass member is installed so that an elastic member is positioned between the projection and the mass member. That is, the mass member is resiliently supported by the external cylindrical body at a portion remote from the bracket, and functions as dynamic damper.
In this type of fabrication, the power unit is resiliently supported on the vehicle body while at the same time receiving the action of the mass member as a dynamic damper. As a result, it is possible to shift from the resonant frequency of the mount device of 200 to 400 Hz to a frequency band where the problem of the vibrational sound entering the vehicle body does not occur.
In this type of conventional mount device, because the mass member is resiliently supported on the external cylindrical body to avoid resonance at a specific frequency, the resonant frequency, fo, obtained by the formula ##EQU1## is reduced to the low frequency side through the reduction of the k value or the increase of the m value, so that there is a restraint on the set degrees of freedom of the resonant frequency, fo. For example, it is essentially impossible to set a resonance point in the low frequency range of 6 to 50 Hz, and the problem exists that this type of conventional mounting device cannot be applied to the vibration damping of engine shake, etc. |
#include "client.h"
static gint scroll(gpointer data) {
t_s_glade *gui = (t_s_glade *)data;
GtkScrolledWindow *w = GTK_SCROLLED_WINDOW(gui->s_w_messages);
GtkAdjustment *ad = gtk_scrolled_window_get_vadjustment(w);
double l_pos =
gtk_adjustment_get_upper(ad) + gtk_adjustment_get_page_increment(ad);
gtk_adjustment_set_value(ad, l_pos);
return false;
}
static const char *json_to_str(json_object *jobj, char *key) {
const char *value = NULL;
value = json_object_get_string(json_object_object_get(jobj, key));
return value;
}
gboolean mx_success_public_message(void *data) {
t_s_glade *gui = (t_s_glade *)data;
json_object *jobj = json_tokener_parse(gui->recv_data);
const char *message = json_to_str(jobj, "Message");
const char *group = json_to_str(jobj, "Chat_name");
const char *sender = json_to_str(jobj, "Sender");
if (gui->send_to) {
if(!mx_strcmp(gui->send_to, group))
mx_p_owned(gui->l_messages, message, sender);
g_timeout_add(10, scroll, gui);
}
return 0;
}
|
Kaspar Taimsoo
2004–2008
Taimsoo made his first international appearance in the Junior World Championships in 2004 achieving 14th position in the double sculls event. In 2005 he won a bronze medal in the single sculls event at the Junior World Championships. His first appearance at the World Rowing Championships was in 2007 in Munich, Germany where he competed in the quadruple sculls event with Allar Raja, Igor Kuzmin and Vladimir Latin finishing on 8th position. The same team achieved 5th place at the 2007 European Rowing Championships held in Poznań, Poland.
Taimsoo made his first appearance at the Olympic Games in Beijing 2008 competing in the quadruple sculls event with Raja, Kuzmin and Latin. The men were 4th in their preliminary heat and won the repechage. In the semifinals they finished fourth and did not get to Final A. Their final place was 9th as they finished third in Final B. The same team also won the Queen Mother Challenge Cup at the Henley Royal Regatta. In September 2008 Taimsoo won his first European Championships medal, a silver, in the double sculls event with Vladimir Latin.
2009–2012
In 2009 Taimsoo won his first World Championships medal, a bronze, competing in the double sculls event with Allar Raja in Poznań. The same duo also won the gold medal at the 2009 European Rowing Championships, held in Brest, Belarus. Raja and Taimsoo finished 8th at the 2010 World Rowing Championships held at Lake Karapiro, New Zealand. The same crew finished second at the 2010 European Championships. Taimsoo and Raja finished 7th at the 2011 World Rowing Championships. For the 2011 European Championships Taimsoo and Raja formed a new quad scull team with Tõnu Endrekson and Andrei Jämsä. The crew finished second after Russia and won the silver medals.
At the 2012 Summer Olympics, held in London, Taimsoo made his second olympic appearance in the quadruple sculls event. This time with Raja, Endrekson and Jämsä. The crew finished second in their preliminary heat and also in the semifinal, thus earning a place in Final A. In the final they finished just outside the medals in 4th place behind crews from Germany, Croatia and Australia, respectively. The same quadruple sculls crew won a gold medal at the 2012 European Championships.
2013–2016
The 2013 season started off with a good result as Taimsoo and Raja won a silver medal at the World Cup event held in Sydney, Australia. The 2013 European Championships, held in Seville, Spain was a disappointment as the men did not reach Final A and finished in 7th place overall.
In the summer of 2013 Taimsoo and Raja formed a new quadruple scull crew with young prospects Sten-Erik Anderson and Kaur Kuslap. The new crew had an immediate success winning bronze medals at the World Cup events held at Eaton and Lucerne. They also finished 5th at the 2013 World Rowing Championships held at Tangeum Lake, Chungju in South Korea. The same team repeated their 5th place at the 2014 World Rowing Championships held in Amsterdam.
In the summer of 2015 Taimsoo and Raja reunited with Tõnu Endrekson and Andrei Jämsä in preparation for the 2016 Olympic Games. The crew went on to win a bronze medal at the 2015 World Rowing Championships held in France. In the spring of 2016 they also won a gold medal at the 2016 European Championships. At the 2016 Summer Olympics, held in Rio de Janeiro, Taimsoo made his third olympic appearance in the quadruple sculls event, with Raja, Endrekson and Jämsä. The crew won their preliminary heat, thus earning a place in Final A. In the final they finished third winning the bronze medals, behind crews from Germany and Australia, respectively. |
<filename>packages/components/src/Menu/MenuGroup.tsx
/*
MIT License
Copyright (c) 2020 Looker Data Sciences, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
import React, { CSSProperties, FC, ReactNode, useState } from 'react'
import styled from 'styled-components'
import {
color,
CompatibleHTMLProps,
reset,
SpaceProps,
space,
} from '@looker/design-tokens'
import { BackgroundColorProps } from 'styled-system'
import { HeadingProps } from '../Text/Heading'
import { List } from '../List'
import { MenuItemStyleContext } from './MenuContext'
import { MenuGroupLabel } from './MenuGroupLabel'
import { MenuSharedProps, useMenuItemStyleContext } from './MenuItem'
export interface MenuGroupProps
extends Omit<CompatibleHTMLProps<HTMLElement>, 'label'>,
BackgroundColorProps,
SpaceProps,
MenuSharedProps {
label?: ReactNode
labelProps?: HeadingProps
labelStyles?: CSSProperties
}
const MenuGroupInternal: FC<MenuGroupProps> = ({
children,
compact,
label,
labelProps,
labelStyles,
customizationProps,
...boxProps
}) => {
const [renderIconPlaceholder, setRenderIconPlaceholder] = useState(false)
const mergedContextValue = useMenuItemStyleContext({
compact,
customizationProps,
})
const context = {
...mergedContextValue,
renderIconPlaceholder,
setRenderIconPlaceholder,
}
return (
<MenuItemStyleContext.Provider value={context}>
<MenuGroupWrapper
{...boxProps}
backgroundColor={customizationProps && customizationProps.bg}
py="small"
>
{label && (
<MenuGroupLabel
backgroundColor={customizationProps && customizationProps.bg}
labelStyles={labelStyles}
labelContent={label}
{...labelProps}
/>
)}
<List nomarker>{children}</List>
</MenuGroupWrapper>
</MenuItemStyleContext.Provider>
)
}
const MenuGroupWrapper = styled.li<MenuGroupProps>`
${reset}
${space}
${color}
`
export const MenuGroup = styled(MenuGroupInternal)``
|
A Study on Comparison of CK-MB, LDH and CRP Levels in Asphyxiated and Non-Asphyxiated Neonates Background: Perinatal asphyxia is a common neonatal problem and contributes significantly to neonatal morbidity and mortality. Only a third of deliveries in India are institutional and many asphyxiated babies are brought late to hospitals. In the absence of perinatal records, it is difficult to retrospectively diagnose perinatal asphyxia. There is a need to identify neonates with asphyxia who will be at high risk for hypoxic ischemic encephalopathy and multi-organ dysfunction. Subjects and Methods: The study was conducted on 60 neonates comprising the cases and 30 neonates comprising the controls meeting the inclusion and exclusion criteria. The blood samples for CK-MB and CRP, LDH was drawn at 24±2 and 72±2 hours of age respectively y and sent for analysis. Result: CK-MB value of >60 U/L was found to 43(71.7%) of cases, LDH >580U/L was found in 40(66.7%) of cases and CRP >1mg/dl was found in 5(8.3%) cases. Conclusion: CK-MB and LDH were found to be elevated in asphyxiated neonates compared to non asphyxiated neonates. Introduction Perinatal asphyxia is a common perennial neonatal problem and contributes significantly to neonatal morbidity and mortality. Globally, hypoxia of the newborn (birth asphyxia) is estimated to account for 23% of the 4 million neonatal deaths and26% of the 3.2 million stillbirths each year. An estimated 1 million children who survive birth asphyxia live with chronic neurodevelopmental morbidities -cerebral palsy, mental retardation, and learning disabilities. Every hour, 104 children die as aresult of asphyxia. That is, approximately 8% of the total global pediatric mortality (age less than five years) making it a serious problem. Due to a lack of resources, developing countries are worse off. In India, between 250,000 to 350,000 neonates die each year due to birthasphyxia, mostly within the first three days of life. Data from National Neonatal Perinatal database (NNPD) suggests that perinatal asphyxia contributes to almost 20%of neonatal deaths in India. Ante-partum and intra-partum asphyxia contributes to asmany as 300,000 to 400,000 stillbirths. In India, 8.4% of inborn babies have a one minute Apgar score less than 7 and 1.4% suffer from hypoxic ischemicencephalopathy (HIE). Accurate estimates of the proportion of neonatal mortality attributable to birth asphyxia are limited by the lack of a consistent definition for use in community-based settings and the absence of vital registration in communities where the majority of neonatal deaths occur. Only a third of deliveries in India are institutional and many asphyxiated babies have a delayed presentation to hospitals. The signs of asphyxial injury are nonspecific and overlap with other illnesses. In the absence of perinatal records, it is difficult to retrospectively diagnose perinatal asphyxia. Although asphyxia is associated with multiple organ injuries, especially with adverse neurological outcomes, management still focuses on supportive care. So, if the adverse effects of hypoxia on the newborn are considered, there is a need to identify infants who will be at high risk for hypoxic ischemic encephalopathy and early neonatal death as a consequence of perinatal hypoxia. A variety of markers have been examined to identify perinatal hypoxia including electronic fetal heart monitoring, low Apgar scores, cord pH, electroencephalograms (EEG), computed tomography (CT) and magnetic resonance imaging (MRI) scans and Doppler flow studies. The current problem then is the inability to precisely distinguish the false positive affected from the true positive asphyxiated or compromised fetus. Several studies have been conducted to evaluate better markers that help distinguish an asphyxiated from a nonasphyxiated neonate. Perinatal asphyxia may result in adverse effects on all major body systems. Many of these complications are potentially In a term infant with perinatal asphyxia renal, neurologic, cardiac and lung dysfunction occur in 50%, 28%, 25%and 23% cases respectively 4. The extent of multiorgan dysfunction (MOD) determines the early outcome of an asphyxiated neonate with either the neonate succumbing as a consequence of organ damage or recovering completely. Generally there are no long term sequelae associated with these organ system derangements. HIE refers to the central nervous system (CNS) dysfunction associated with perinatal asphyxia.Transient myocardial ischemia (TMI) with myocardial dysfunction may occur in any neonate with a history of perinatal asphyxia. An elevated serum creatine kinase muscle-brain fraction (CK-MB) or cardiac troponin T (cTnT) level may be helpful in determining the presence of myocardial damage. An elevation of serum CK-MBfraction of >5% to 10% may indicate myocardial injury. Myocardial damage may also be determined by 2D Echo changes in ejection fraction (EF), fractional shortening (FS), Mitral or tricuspid regurgitation, ventricular hypokinesia. ECG also may depict changes in ST segment, T wave and Q wavechanges. subjects and Methods Leakage of intracellular enzymes such as alanine aminotransferase (ALT), aspartate aminotransferase (AST) and lactate dehydrogenase (LDH) signaling multiorgan dysfunction is seen together with HIE after perinatal asphyxia. Elevation in inflammatory mediators like interleukin 6, soluble intercellular adhesion molecule-1 and CRP is seen in stressful conditions like infection andperinatal asphyxia. A sample of 60 neonates (>37 weeks) with perinatal asphyxia having base excess of-12mEq/L and above or atleast 1 non-specific sign of sickness-tachypnea, chest retractions, grunt, lethargy, poor feeding, hypotonia, The control group It included 30 term apparently healthy neonates appropriate for gestational age without signs of perinatal asphyxia as evidenced by normal fetal heart rate patterns and one minute Apgar score ≥7. Discussion In the present study, gender distribution of neonates is statistically similarbetween two groups and the results are comparable to Reddy S et al. The incidence of birth asphyxia is more in males in both the studies. There is neither a previous study available on this aspect nor a plausible mechanism has been proposed for thesame. The social belief in the Indian setup that male babies are cared better and female babies are usually neglected and are managed at home even if they are very sick did not have any interference with the study population as none of the parents of the cases included in the study refused admission at birth. In the present study the number of neonates with CK-MB levels >60 U/L is significantly more in cases when compared to controls with P<0.001. 28.3% of the cases in the present study had CK-MB levels >60 U/L. This is comparable to Reddy Set al 8 in which 36% of cases had CK-MB levels >60 U/L (P=0.006). In the present study the mean CK-MB levels were significantly higher in casescompared to controls with P<0.001 which is comparable to Reddy S et al 8 andRajakumar PS et al Raised levels of CK-MB among asphyxiated neonates was also observed instudies conducted by Primhaket al, Omokhodion SI et al 11, Fonseca E et al,Barberi et al 13.66.7% of the cases in the present study had LDH levels >580 U/L. This islower when compared to Reddy S et al 8 in which 100% of cases had LDH levels >580U/L. In both the studies, the number of neonates with LDH levels >580 U/L is significantly more in cases when compared to controls. This is statistically significant in both the studies with P<0.001.In the present study the mean LDH levels in cases were significantly higher in cases compared to controls with P<0.001 which iscomparable to Reddy S et al. In the present study CRP >1mg/dl was found only in 5(8.3%) of cases and 2(6.7%) of controls. There is no statistically significant difference in CRP levelsamong cases and controls. This is similar to study of Xanthouet al in which CRP levels were higher in infected neonates compared to asphyxiated neonates and controls. Conclusion Estimation of CK-MB at 24 hours of life and LDH at 72 hours of life can help distinguish an asphyxiated from a non-asphyxiated term neonate. Raised levels of CK-MB, LDH was more significant in cases with moderate to severe HIE. |
n=input()
ini=map(int,raw_input().split())
mx=0
cnt=1
mn=0
while cnt<len(ini):
if ini[cnt-1]<=ini[cnt]:
mn+=1
else:
mn=0
if mn>mx:
mx=mn
cnt+=1
print mx+1
|
Enhancement of cellular uptake, transport and oral absorption of protease inhibitor saquinavir by nanocrystal formulation. AIM Saquinavir (SQV) is the first protease inhibitor for the treatment of HIV infection, but with poor solubility. The aim of this study was to prepare a colloidal nanocrystal suspension for improving the oral absorption of SQV. METHODS SQV nanocrystals were prepared using anti-solvent precipitation-high pressure homogenization method. The nanocrystals were characterized by a Zetasizer and transmission electron microscopy (TEM). Their dissolution, cellular uptake and transport across the human colorectal adenocarcinoma cell line (Caco-2) monolayer were investigated. Bioimaging of ex vivo intestinal sections of rats was conducted with confocal laser scanning microscopy. Pharmacokinetic analysis was performed in rats administered nanocrystal SQV suspension (50 mg/kg, ig), and the plasma SQV concentrations were measured with HPLC. RESULTS The SQV nanocrystals were approximately 200 nm in diameter, with a uniform size distribution. The nanocrystals had a rod-like shape under TEM. The dissolution, cellular uptake, and transport across a Caco-2 monolayer of the nanocrystal formulation were significantly improved compared to those of the coarse crystals. The ex vivo intestinal section study revealed that the fluorescently labeled nanocrystals were located in the lamina propria and the epithelium of the duodenum and jejunum. Pharmacokinetic study showed that the maximal plasma concentration (Cmax) was 2.16-fold of that for coarse crystalline SQV suspension, whereas the area under the curve (AUC) of nanocrystal SQV suspension was 1.95-fold of that for coarse crystalline SQV suspension. CONCLUSION The nanocrystal drug delivery system significantly improves the oral absorption of saquinavir. Introduction Poor aqueous solubility is a major hurdle in achieving adequate bioavailability for a majority of new drug candidates and for drugs in clinical use. It has been reported that approximately 40% of marketed drugs have low solubility, while approximately 80%-90% of drug candidates in development could fail because of solubility problems. Thus, the development of safe and effective formulations that improve the oral absorption of poorly soluble drugs may increase the success rate of drugs in development. Colloidal nanodrug formulations (nanocrystal suspensions) are typically composed of drug particles with an average diameter of less than 1 m and stabilizers (surfactants or polymers). The dissolution rate of drugs is proportional to the surface area available for dissolution, as described by the Noyes-Whitney equation. According to the Ostwald-Freundlich equation, an increase in the surface area can also be expected to increase the equilibrium solubility of a drug. Thus, a nanocrystal formulation is generally considered an effective strategy for enhancing the solubility of poorly soluble or insoluble drugs. Nanocrystals possess a drug loading capacity of almost 100% in contrast to matrix nanoparticles such as polymeric nanoparticles, liposomes, and solid lipid nanoparticles. The high drug loading capacity and enhanced drug dissolution make nanocrystals an efficient drug delivery system into or across cells, thereby reaching a therapeutic plasma concentration. However, our understanding of the oral absorption of nanocrystals has not greatly improved over the past two decades. In particular, there is a lack of microscopic evidence to show that nanocrystals are internalized in their intact form or are www.nature.com/aps He Y et al Acta Pharmacologica Sinica npg transported as dissolved molecules with subsequent accumulation within the cells. Intestinal absorption mechanisms have been proposed to be related to the enhanced dissolution rate and improved bioadhesion of nanocrystals due to their large surface area and absorption through mesenteric lymph transport. However, the fate of nanosuspensions within the body is still poorly understood. Saquinavir (SQV) is the first protease inhibitor to be approved for the treatment of HIV infection. Over the last decade, SQV has become a major component of combination HIV chemotherapies, which are highly active antiretroviral therapies. The molecular weight of SQV is 670.8, and its partition coefficient (LogP) is 4.1. The solubility of SQV is highly pH-dependent, and the drug is usually administered in its salt form (SQV mesylate). The solubility of SQV mesylate at pH 3.5 is 2.27-2.70 mmol/L. This solubility is much higher than that of the base (0.07-1.98 mmol/L) over the same pH range. Although the free base exhibits superior solubility at a low pH, the solubility decreases as the pH increases. Solubility would be especially poor in the intestine, where the physiological pH is above 5. Thus, low solubility is still a limiting factor in the oral absorption of SQV. In addition to its poor solubility, SQV is metabolized by both human hepatic and small intestinal enzymes, which results in low oral bioavailability (0.7%-4.0%), depending upon the dosage form. The aim of the present study was to prepare a colloidal nanodrug suspension to enhance the oral absorption of SQV. A stable suspension of nanocrystals was prepared by a precipitation-high pressure homogenization method. The physical properties of the prepared SQV nanocrystals were characterized by transmission electron microscopy (TEM) and X-ray powder diffraction (XRPD). The dissolution rate of the nanocrystals was also determined. The absorption of the nanocrystals were studied in Caco-2 cells and an ex vivo rat intestinal tract model. In addition, the oral bioavailability of the nanosuspension was evaluated in Sprague-Dawley rats. Therefore, in the present study, we focused on the development of nanocrystals as an oral formulation aimed at improving the oral bioavailability of SQV. Materials and methods Materials Saquinavir (SQV) mesylate was obtained from Chembest Research Laboratories (Shanghai, China). Poly (sodium 4-styrenesulfonate) (PSS) was purchased from Sigma-Aldrich (St Louis, MO, USA). Ethyl rhodamine B was obtained from Sinopharm Chemical Reagent Co, Ltd (Shanghai, China). All other chemicals and reagents were commercially obtained and were of analytical grade. Animal preparation Male Sprague-Dawley rats (body weight, 250-280 g) were provided by SLAC Lab Animal Ltd (Shanghai, China). The experiments were performed under guidelines approved by the Institutional Animal Care and Use Committee of the Shanghai Institute of Materia Medica, Chinese Academy of Sciences (IACUC, 2013-07-GY-12). The rats were maintained on a 12 h light/dark cycle and given fresh rat chow daily with free access to food and water. The rats were acclimated for at least 5 d prior to the experiments. The rats were fasted for 12 h prior to the experiments with free access to water. Preparation of saquinavir nanocrystals SQV nanocrystals were prepared using an anti-solvent precipitation-high pressure homogenization method. Briefly, 400 mg of coarse SQV crystals were dissolved in 2 mL dimethyl sulfoxide (DMSO). This solution was rapidly added to 50 mL of phosphate buffered saline (PBS), pH 7.4, containing 0.12% PSS, using magnetic stirring (500 rounds per minute) to obtain a starting suspension. After anti-solvent precipitation, the suspension was placed in a high pressure homogenizer (ATS Engineering Inc, Shanghai, China) equipped with a cooling device that was connected to a circulating water bath (Julabo F12, Seelbach, Germany) and maintained at 4 °C. The homogenization occurred at 800 bars for 20 cycles, yielding a milky suspension of SQV nanocrystals as shown in Figure 1. The nanocrystal suspension was concentrated by centrifugation at 21 752g for 30 min (Beckman Coulter Allegra 64R centrifuge, USA). The supernatant was removed, and the precipitate was dispersed in 50 mL of PBS (pH 7.4) containing 0.12% PSS. To label the nanocrystals with fluorescein, hybrid nanocrystals containing ethyl rhodamine B incorporated in crystal lattice were prepared according to the method described by Zhao et al, with a slight modification. Briefly, 20 mg of ethyl rhodamine and 400 mg of coarse SQV crystals were dissolved in 2 mL DMSO, and the same process was used as described for the preparation of the SQV nanosuspension. Characterization of nanocrystals The particle size and zeta potential of the SQV nanocrystals were determined using a Zetasizer (Nano-ZS, Malvern instruments, UK). Particle size measurements were performed at 25 °C at a scattering angle of 173°. The SQV nanosuspensions were diluted five-fold using purified water (Milli-Q Integral, Millipore, USA) prior to determination, and each sample was measured in triplicate. The morphology of the coarse crystals and nanocrystals were observed using a scanning electron microscope (SEM, Agilent 8500, Santa Clara, CA, USA) and TEM (Hitachi H-600, Tokyo, Japan), respectively. After diluting the samples 10-fold with purified water, a drop of the suspension was spread on a copper grid, and the excess liquid was removed with filter paper. The samples were dried at room temperature for 10 min and observed using TEM. The crystalline form of the SQV nanocrystals was examined by XRPD using a Bruker AXS D8 Advance diffractometer www.chinaphar.com He Y et al Acta Pharmacologica Sinica npg (Karlsruhe, Germany). The samples were freeze dried before analysis. The samples were placed on zero-background silicon plates and measured at ambient conditions in reflection mode. A continuous 2 scan was performed in the range of 5°-45° with a step size of 0.02° using copper K- radiation (=1.540629) with a scanning speed of 0.067° 2/s. The voltage and current applied were 40 kV and 40 mA, respectively. The data were collected and analyzed using DIFFRAC SUITE™ Software (Bruker). Drug dissolution study Dissolution experiments were performed using the USP35-NF30 paddle method (Symphony 7100, Distek, Inc, USA). PBS (pH 6.8) was used as the dissolution medium, the temperature was maintained at 37.0±0.5 °C, and the paddle speed was 100 rounds per minute. Samples containing 5 mg of drug were dispersed in 200 mL of dissolution medium, and then samples of the solution (3 mL each) were withdrawn at different time and passed through a 0.1 m syringe filter (Millipore Filters, USA). The SQV concentration was quantified using a UV spectrophotometer (Mode TU-1901, Purkinje General, China) at 239 nm. In addition, the fluorescence intensity of ethyl rhodamine B released from the ethyl rhodamine B-stained SQV crystals was determined using a microplate reader (SYNER-GY TM H1, BioTek, USA) at the excitation and emission wavelengths of 535 nm and 580 nm, respectively. Cellular uptake of nanocrystals in Caco-2 cells To track the cellular uptake of the nanocrystals, the fluorescein-labeled nanocrystals were prepared by physically incorporating ethyl rhodamine B into the crystal lattice of SQV. This was accomplished using anti-solvent precipitation as mentioned in the previous section. This method (without high-pressure homogenization) was also used to prepare fluorescein-labeled microcrystals with the same particle size as that of the coarse powder. Before the cellular uptake study, the fluorescein intensities of both formulations were adjusted to the same level. Caco-2 cells were seeded in 12-well plates (110 5 cells per well) and grown for 5 d, with feeding every 2 d. The fluorescent-labeled nanocrystals were dispersed in Hank's balanced salt solution (HBSS) to form a test suspension (50 g/mL). The cells were pre-incubated with HBSS alone at 37 °C for 30 min. After removing the HBSS, the cells were exposed to the test suspension (1 mL) at 37 °C for 2 h. Then, the test suspension was removed, and the cell layer was washed three times with 2 mL of HBSS. The cells were fixed with 4% buffered paraformaldehyde for 10 min, stained with 4',6-diamidino-2-phenylindole (DAPI) (5 g/mL, Beyotime, Haimen, China), and finally imaged under a confocal laser scanning microscope (CLSM) (FluoView FV10i, Olympus, Japan). The average fluorescence intensity of cells was quantified by ImageJ 1.49n (Wayne Rasband, National Institutes of Health, USA). The fluorescent images were converted to 8-bit before being quantified by threshold analysis. Transport of saquinavir across the Caco-2 cell monolayers Caco-2 cells were seeded onto Transwell polycarbonate cell culture inserts (12-mm diameter, 3-m pore size, Costar ®, Corning Costar Co, Cambridge, MA, USA) at a density of approximately 110 5 cells per well. The cells were cultured for 21-25 d to attain confluence and full maturation, including P-glycoprotein (P-gp) expression and the formation of tight junctions in the cell monolayer. The culture medium was replaced every other day for the first week and daily thereafter. The apical (AP) and basolateral (BL) compartments contained 0.5 and 1.5 mL of culture medium, respectively. The integrity of the Caco-2 cell monolayers was evaluated both before and immediately after the transport studies using Millicell ® -ERS (Millipore, Bedford, MA, USA). Monolayers presenting trans-epithelial electric resistance (TEER) values below 300 cm 2 were excluded from the experiments. The npg resistance of the transport medium (HBSS) alone was considered as background resistance and subtracted from each TEER value. Prior to the experiments, the culture medium was replaced with warm HBSS (37 °C). The cell monolayer was equilibrated at 37 °C for 30 min before conducting the transport studies. HBSS was removed and the test solutions (nanocrystal or coarse drug crystal suspension containing 50 g/mL SQV in HBSS ) were added to the AP or BL (donor) compartments. At predetermined time points (30, 60, 90, and 120 min), aliquots (200 L) were withdrawn from the receiver chamber, and an equivalent volume of HBSS was added to maintain a constant volume. The drug concentration in the samples was determined by high performance liquid chromatography (HPLC) with the same method described below for analyzing plasma samples, and all experiments were performed in triplicate. The apparent permeability coefficient (P app, cm/s) was calculated using the following equation : P app =dQ/dt1/AC 0 where dQ/dt is the transport rate (g/s), C 0 is the initial drug concentration on the apical side (g/mL), and A is the surface area of the membrane filter (1.12 cm 2 ). Histological examination of nanocrystal absorption in the intestinal mucosa The fluorescent-labeled nanocrystal suspensions were administered to rats at a dose of 50 mg/kg of SQV by intragastric gavage. After 1 h, the animals were anesthetized by intraperitoneal injection of 25% urethane (1 g/kg), and a 3 cm midline incision was made in the abdomen; segments of the duodenum, jejunum, and ileum of the small intestine were then identified. The proximal jejunum was located by identifying the ligament of Trietz; the distal jejunum and the beginning of the proximal ileum were located by visualizing an increase in the density of gut-associated lymphatic tissue (GALT); and the distal ileum was identified by locating the cecum. The identified segments were removed and washed extensively with a large amount of cold saline. In vivo absorption study in rats Dosing Two groups of rats (4 per group) were orally administered two formulations, namely the coarse crystalline SQV suspension and nanocrystal SQV suspension, at a dose of 50 mg/kg. The rats were allowed access to food at 4 h after the oral drug administration, and had free access to water during the entire experiment. Blood samples of 400 L were collected via the orbital venous plexus under isoflurane anesthesia at 0.5, 1, 1.5, 2, 3, 4, 6, 8, 10, and 12 h after dosing. The whole blood was transferred into heparinized tubes, and the plasma was separated by centrifugation at 6500g for 5 min and frozen at -20 °C until analysis. Plasma sample analysis The SQV concentrations in plasma were determined by HPLC. The samples for analysis were prepared by liquidliquid extraction with a slight modification. Briefly, 30 L of an internal standard solution (ketoconazole 8 g/mL, in acetonitrile) and 150 L of 0.5 mol/L sodium hydroxide were added to 150 L of rat plasma. The mixture was vortexed for 20 s, and 0.5 mL of a methyl tert-butyl ether:dichloromethane mixture (90:10, v/v) was added to extract the drug. The extraction process was conducted three times. The organic layer was separated by centrifugation at 6500g for 5 min and transferred to another tube. Following solvent evaporation under a stream of nitrogen at 40 °C, the residue was reconstituted in 50 L of the mobile phase. The drug concentrations were analyzed with an Agilent 1100 series HPLC (Agilent Technologies, Santa Clara, CA, USA) with an Agilent Extend C18 column (3.5 cm, 250 mm5 mm; Agilent Technologies). The mobile phase contained acetonitrile and water (55/45, v/v, pH 7.5) with a flow rate of 1 mL/min. UV-detection was performed at 239 nm. SQV quantification was based on the linear regression between the HPLC peak area ratio of SQV to the internal standard and the SQV concentration in plasma. Linearity was observed in the concentration range of 0.04-1.6 g/mL with a correlation coefficient of 0.9946. The limit of quantification (LOQ) for SQV in rat plasma was 40.0 ng/mL. Intra-day and inter-day variability was below 10%, and the recovery of SQV met the requirement for plasma sample analysis. Pharmacokinetic analysis Pharmacokinetic parameters were derived from drug concentration-time data with nonlinear modeling software (Phoenix ® WinNonlin 6.3, Pharsight Corporation, USA) using a noncompartmental analysis model. The parameters determined include the maximal plasma concentration of the drug (C max ), the time taken to reach the maximum plasma concentration (T max ), and the area under the plasma drug concentration-time curve (AUC 0-12 h ). Statistical analysis The experimental data were analyzed using Microsoft Excel 2013 (Microsoft, Redmond, WA, USA). Student's t-test was used to determine the significance of differences between the two groups. The difference was considered to be statistically significant if the probability (P) value was less than 0.05 (P<0.05) and to be very significant if the P value was less than 0.01 (P<0.01). All data were expressed as the mean±standard deviation (SD) unless otherwise indicated. Nanocrystal characterization Colloidal SQV nanocrystals were prepared by an anti-solvent precipitation-high pressure homogenization method. The Figure 1A. The zeta potential of the SQV nanocrystals was -53.5±2.42 mV ( Figure 1B). The zeta potential is an important characteristic of the electrical double layer and is a key parameter that is widely used to predict the stability of suspensions. In general, the higher the absolute value of the zeta potential, the more stable the suspension. The high zeta potential of the SQV nanocrystals indicates the high degree of stability of the formulation. In the pilot study, nanocrystal flocculation was observed when non-ionic stabilizers, such as hydroxypropyl methylcellulose, d-alpha tocopheryl polyethylene glycol 1000 succinate, and polyvinylpyrrolidone, were used. In this study, we used poly(sodium 4-styrenesulfonate) (PSS), an anionic polymer, as the stabilizer. PSS was adsorbed onto the surface of the nanocrystals, thereby providing steric hindrance and electrostatic repulsion between the particles. A pilot study indicated that 0.12% PSS was sufficient to stabilize the nanocrystals in suspension for several months at 4 °C (data not shown). The particle morphology of the coarse powder was examined under an SEM. The coarse powder presented an irregular shape and a particle size of approximately 2-5 m, as shown in Figure 2A. By contrast, the examination of the nanocrystals by TEM revealed rod-shaped particles, as shown in Figure 2B. The length of the nanocrystals measured by TEM was in agreement with the particle size measured by the Zetasizer. The XRPD was used to determine the crystallinity of the SQV nanocrystals. As shown in Figure 3, the crystalline form of the SQV nanocrystals was identical to that of the coarse powder. However, the lower intensity observed for the nanocrystals may be attributed to the lower crystallinity of the samples. Aqueous solubility and dissolution of the nanocrystals The solubility of the nanocrystals in PBS (pH 6.8) was 40.85±11.36 g/mL, which was lower than the solubility of the coarse powder 72.61±17.86 g/mL. This difference in solubility was most likely because, while the coarse drug powder was in the mesylate salt form, the drug could have been converted to the free base during the preparation of the nanocrystal formulation. The dissolution profiles of the nanocrystals and the coarse crystals are shown in Figure 4. Only 20% of the coarse crystals were dissolved during a 2 h test period, while approximately 60% dissolution was observed for the SQV nanocrystals. A state of equilibrium was achieved in 30 min. The results demonstrate that the dissolution rate of the SQV nanocrystals is faster than the coarse powder. The promising results of the drug release studies prompted cellular and in vivo studies in rats with the nanocrystal formulation. The SQV crystals were stained by fluorescein ethyl rhodamine B. The release profiles of ethyl rhodamine B from the SQV nanocrystals and the coarse crystals were also determined. As shown in Figure 4, the release percentage of ethyl rhodamine B from the coarse SQV crystals was lower than the SQV nanocrystals, and the release of ethyl rhodamine B from the two types of crystal showed the same trend as that of SQV from the corresponding crystals. The results demonstrated that ethyl rhodamine B was entrapped in the SQV crystal lattice and released from the crystals as the SQV crystals dissolved. Figure 2C and 2D show the CLSM images of the ethyl rhodamine B stained coarse crystals and nanocrystals. Individual SQV coarse crystals and nanocrystals were clearly observed under high magnification (60 objective lens), demonstrating that the fluorescent intensity of an individual crystal was significantly higher than the free fluorescent molecules, although some fluorescent molecules may be dissolved in the medium. Cellular uptake and the intestinal mucosa absorption of the SQV crystals were subsequently studied using the ethyl rho- Figure 5A shows the CLSM images of Caco-2 cells incubated with the SQV nanocrystal suspension and the coarse SQV crystal suspension for different lengths of time. The fluorescent intensity of the SQV nanocrystal suspension was higher than the coarse crystals, indicating increased drug uptake. After 2 h, individual high-intensity red fluorescent particles could be observed in the cytoplasm of the cells exposed to the nanocrystal suspension. These particles were most likely to be "the nanocrystals." However, very few individual particles were observed in the cytoplasm of the cells exposed to the coarse crystal suspension detected at the same excitation intensity and exposure time as that of nanocrystals. The fluorescence intensity of the cells incubated with nanocrystals was 2.19-fold higher than the coarse crystals, and revealed the significant advantage of nanocrystal uptake by the Caco-2 cells ( Figure 5B). Cellular uptake of SQV in Caco-2 cells and its transport across Caco-2 cell monolayers To evaluate the effect of the particle size of the crystals (coarse crystals vs nanocrystals) on SQV transport through cell monolayers, we determined the drug transport across Caco-2 cell monolayers from the AP side to the BL side. In all the experiments, the TEER measurements showed no cellular damage. Figure 6A shows the time profiles of SQV permeation through the Caco-2 cell monolayers. The amount of drug in the receiving chamber (BL side) increased with time for both formulations. It was clear that the amount of drug in the receiving chambers of monolayers treated with the nanocrystals was much higher than the amount in the receiving chambers of monolayers treated with the coarse crystals at each time point. These results indicated that the drug transport for the nanocrystals was faster than the coarse crystals. The P app of SQV from the apical side to the basolateral side was calculated after incubating Caco-2 cells with the two formulations for 0.5 to 2.0 h. As shown in Figure 6B, the P app of the nanocrystal SQV formulation was significantly higher than the corresponding value of the coarse SQV crystals . Bioimaging study of SQV nanocrystal absorption in the intestine To study the uptake of SQV nanocrystals in intestinal tract, the nanocrystals were labeled with ethyl rhodamine B, and the intestinal mucosal absorption was studied by CLSM. Figure 7 shows the representative CLSM images of different intestinal segments (duodenum, jejunum, and ileum) at 1 h after oral administration of fluorescein labeled SQV nanocrystals and coarse SQV crystals. The crystals in the intestinal lumen were As shown in Figure 7, the coarse SQV crystals were not completely dissolved in the gastrointestinal tract 1 h after administration. Some large coarse SQV crystals were clearly observed on the luminal side of the intestinal tract (indicated by white arrows in the coarse SQV images). This is presumably because the sink condition is difficult to attain due to the low solubility and absorption rate for the coarse SQV crystals. The fluorescent intensity was extremely low in the epithelial cells, indicating that the drug uptake from the coarse SQV crystals was inefficient. For the nanocrystal SQV formulation, the images showed that strong fluorescent signals were observed in the epithelial cells (EC) and the lamina propria (LP) of the duodenum and jejunum, as indicated by the yellow arrows in the nanocrystal group in Figure 7. The intensity of the fluorescent signals was higher than those observed for the coarse SQV crystals. These results demonstrate that the nanocrystals entered into the epithelial cells more easily than the coarse crystals. The low fluorescent intensity of the ileum (lower part of intestinal tract) for both suspensions may be due to the slow gastric emptying rate in rats and an insufficient time for intestinal transit. Pharmacokinetic studies of SQV in rats The pharmacokinetics of SQV were studied in rats to assess the absorption efficiency of the nanocrystals. The pharmacokinetic parameters are shown in Table 1, and the plasma drug concentration-time profiles of SQV are presented in Figure 8. Following oral administration, there were significant differences in the pharmacokinetic profiles of the SQV nanocrystals and coarse SQV crystals. The C max of the nanocrystals was 2.16-fold of that for coarse crystals (P<0.01). The AUC for the SQV nanocrystals was 1.95-fold of that for the AUC (0-12 h) for coarse crystals (P<0.01). Discussion Saquinavir is a very important class of anti-HIV drugs, however the poor solubility and low bioavailability of this drug has presented a substantial challenge to pharmaceutical scientists. During our research, we prepared a nanocrystal SQV formulation by an anti-solvent precipitation-high pressure homogenization method. This method has two important steps include precipitation and homogenization. If the precipitated nanoparticle suspension was not subjected to highpressure homogenization, the nanoparticles were found to be extremely unstable and subsequently grew into micro-particles within a day. It is likely that the amorphous SQV nanoparticles were obtained by anti-solvent precipitation at 4 °C. Even with the addition of a stabilizer, the amorphous nanoparticle suspension was extremely unstable under ambient conditions. The amorphous to crystalline transformation progressed with an increase in particle size and a change in polymorphism, causing the precipitated drug particles to develop into large particles within a few days. High-pressure homogenization has been shown to convert materials from thermodynamically unstable amorphous particles into more stable crystalline nanoparticles. As a result, SQV nanocrystals with a particle size of approximately 200 nm and a uniform particle size distribution (PDI ~0.1) were successfully prepared with the combination of anti-solvent precipitation and high-pressure homogenization. Though the dissolution studies, we find that the dissolution rate of nanocrystals was faster that the coarse powder. The enhanced dissolution rate can be attributed to the increased surface area of nanocrystals available for interaction with the solvent and the decreased diffusion layer thickness of the nanocrystals compared with the coarse crystals. As submicron particles can easily pass through a line filter, overestimation of the dissolution rate is possible. However, visual observation of the immediate disappearance of turbidity in the dissolution vessel suggests that the solid particles that passed through the filter were of little consequence. Although the dissolution rate of SQV nanocrystals was faster than the coarse powder, only approximately 60% dissolution was observed for the nanocrystals. There is a high probability that the dissolution medium was completely saturated by the dissolved drug because the solubility of the nanocrystals is lower than the coarse powder. It is reported that particles with a size of 200 nm or smaller. Therefore, in addition to passive diffusion of the dissolved free molecules across the cell membrane, the SQV nanocrystals may be directly taken up by the cells via multiple endocytosis pathways, which may include clathrin-mediated or caveolae-mediated pathways. The enhanced transport of the nanocrystal SQV formulation across the Caco-2 monolayer was likely due to the increased cellular uptake of the nanocrystals, as shown in previous experiments in this study. The efficient transport of SQV across Caco-2 monolayer was increased by the enhanced release of SQV from the nanocrystals, and the rapid accumulation of the drug in cells was caused by the potential uptake of individual nanocrystals via multiple endocytosis pathways. When pharmacokinetic studies were conducted in male Wistar rats, a significant increase of SQV plasma concentration was observed when the drug was administered orally in nanocrystals. The enhanced oral absorption of the SQV nanocrystals was a result of the increased drug dissolution rate and improved epithelial uptake via multiple potential endocytosis pathways, including clathrin-mediated or caveolae-mediated pathways. It has been reported that SQV is the substrate for P-gp, which may also greatly limit its intestinal uptake. In addition, the hepatic and intestinal first pass metabolism may also contribute to its low bioavailability. The nanocrystal formulation technique, in combination with P-gp inhibition and avoidance of intestinal and hepatic first pass effects, may Conclusion In this study, SQV nanocrystals were formulated to improve oral drug absorption. The particle size, dissolution, cellular uptake, and transport across Caco-2 cell monolayers were studied. The uptake of SQV nanocrystals in the intestinal tract was imaged ex vivo, and oral drug absorption was examined in vivo. The results showed that oral absorption of SQV was significantly improved by increased cellular uptake and transport resulting from enhanced drug dissolution and the cellular uptake of individual nanocrystals compared with the coarse crystals. However, to further improve the bioavailability of SQV, the nanocrystal formulation technique in combination with P-gp inhibition and avoidance of intestinal and hepatic first pass effects are needed, and these factors are a major focus of our future studies. |
Symbolic manipulation and biomedical images Discrete Morse theory is an e cient method which allows one to study the topology of discrete objects. The instrumental tool in the algebraic setting of this theory is the notion of admissible discrete vector eld. In this paper, we present a formally veri ed implementation of an algorithm in charge of building an admissible discrete vector eld from a digital image. Such a program will play a key role to analyze biomedical images. |
<reponame>MathiasSeguy-Android2EE/PremierProjetOntomantics
package com.android2ee.formation.intra.ontomantics.smslistener;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.Toast;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
if(getIntent().getExtras()!=null){
if(getIntent().getExtras().getString(MySmsService.ACTION)!=null){
Toast.makeText(this, "Action Love !!!!", Toast.LENGTH_LONG).show();
}
}else{
Toast.makeText(this, "No Action Notif normale!!!!", Toast.LENGTH_LONG).show();
}
}
}
|
Generalising Event Forensics Across Multiple Domains In cases involving computer related crime, event oriented evidence such as computer event logs, and telephone call records are coming under increased scrutiny. The amount of technical knowledge required to manually interpret event logs encompasses multiple domains of expertise, ranging from computer networking to forensic accounting. Automated methods of classifying events and patterns of events into higher level terminology and vocabulary hold promise for assisting investigators to cope with voluminous, low-level event oriented evidence. In a previous paper, we showed that the semantic web language OWL was an effective means of representing domain-specific event based knowledge, and when combined with a rule language, was sufficient to apply standard correlation techniques to the task of automated forensic investigation. We also described a prototype implementation of this approach, called FORE. In this paper, we demonstrate that the approach can be extended to be rapidly applied to events sourced from new domains, enabling cross-domain correlation, and that the new approach will accommodate standardised component ontologies which model the separate domains under consideration. |
<reponame>GUMI-golang/giame
package main
import (
"github.com/GUMI-golang/giame/tools/kernel"
"github.com/GUMI-golang/gumi/gcore"
"image"
"image/draw"
"image/png"
"os"
"reflect"
"github.com/GUMI-golang/giame/tools"
)
func main() {
//f, err := os.Open("./example/4Pix.png")
//f, err := os.Open("./example/binarysmall.png")
f, err := os.Open("./example/jellybeans.png")
//f, err := os.Open("./example/text.png")
//f, err := os.Open("./example/largetext.png")
//f, err := os.Open("./example/binary.png")
//f, err := os.Open("./example/Pix16.png")
//f, err := os.Open("./example/_out_fill.png")
if err != nil {
panic(err)
}
defer f.Close()
img, err := png.Decode(f)
if err != nil {
panic(err)
}
sz := img.Bounds().Size()
//
var scale = 4.
src := image.NewRGBA(image.Rect(0, 0, sz.X, sz.Y))
draw.Draw(src, src.Bounds(), img, img.Bounds().Min, draw.Src)
quad := image.NewRGBA(image.Rect(0, 0, int(float64(sz.X)*scale), int(float64(sz.Y)*scale)))
for _, k := range []kernel.Kernel{
kernel.NearestNeighbor,
kernel.Bilinear,
kernel.Bell,
kernel.Hermite,
kernel.BicubicHalf,
kernel.MitchellOneThird,
kernel.Lanczos2,
kernel.Lanczos3,
} {
tools.Resampling(k, quad, quad.Rect, src, src.Rect.Min)
gcore.Capture("_out_"+reflect.ValueOf(k).Type().Name(), quad)
}
}
//func Resample(src image.Image, dst draw.Image, k kernel.Kernel) {
// cvsrc, ok0 := src.(*image.RGBA)
// cvdst, ok1 := dst.(*image.RGBA)
// if ok0 && ok1 {
// resampleRGBA(cvsrc, cvdst, k)
// return
// }
// resampleImage(src, dst, k)
//}
//func resampleImage(src image.Image, dst draw.Image, k kernel.Kernel) {
// srcbd := src.Bounds()
// dstbd := dst.Bounds()
// srcsz := srcbd.Size()
// dstsz := dstbd.Size()
// //
// delta := mgl64.Vec2{
// float64(srcsz.X) / float64(dstsz.X),
// float64(srcsz.Y) / float64(dstsz.Y),
// }
//
// a := float64(k.Rad())
// for x := 0; x < dstsz.X; x++ {
// for y := 0; y < dstsz.Y; y++ {
// sx := delta[0] * float64(x) - .5
// sy := delta[1] * float64(y) - .5
// //
// var temp [5]float64
// var hori = [2]int{int(sx - a), int(sx + a + .5)}
// var vert = [2]int{int(sy - a), int(sy + a + .5)}
// for tx := hori[0]; tx <= hori[1]; tx ++ {
// for ty := vert[0]; ty <= vert[1]; ty ++ {
// rx := iclamp(tx, 0, srcsz.X - 1)
// ry := iclamp(ty, 0, srcsz.Y - 1)
// r, g, b, a := src.At(rx, ry).RGBA()
// kr := k.Do(float64(tx) - sx) * k.Do(float64(ty) - sy)
// temp[0] += float64(r) / math.MaxUint16 * kr
// temp[1] += float64(g) / math.MaxUint16 * kr
// temp[2] += float64(b) / math.MaxUint16 * kr
// temp[3] += float64(a) / math.MaxUint16 * kr
// temp[4] += kr
// }
// }
// alpha := iclamp(int(temp[3] / temp[4] * math.MaxUint8), 0, math.MaxUint8)
// green := iclamp(int(temp[2] / temp[4] * math.MaxUint8), 0, alpha)
// blue := iclamp(int(temp[2] / temp[4] * math.MaxUint8), 0, alpha)
// red := iclamp(int(temp[2] / temp[4] * math.MaxUint8), 0, alpha)
// dst.Set(x, y, color.RGBA{
// R:uint8(red),
// G:uint8(green),
// B:uint8(blue),
// A:uint8(alpha),
// })
// }
// }
//}
//func resampleRGBA(src *image.RGBA, dst *image.RGBA, k kernel.Kernel) {
// srcbd := src.Bounds()
// dstbd := dst.Bounds()
// srcsz := srcbd.Size()
// dstsz := dstbd.Size()
// //
// delta := mgl64.Vec2{
// float64(srcsz.X) / float64(dstsz.X),
// float64(srcsz.Y) / float64(dstsz.Y),
// }
//
// a := float64(k.Rad())
// for x := 0; x < dstsz.X; x++ {
// for y := 0; y < dstsz.Y; y++ {
// sx := delta[0] * float64(x) - .5
// sy := delta[1] * float64(y) - .5
// //
// var temp [5]float64
// var hori = [2]int{int(sx - a), int(sx + a + .5)}
// var vert = [2]int{int(sy - a), int(sy + a + .5)}
// for tx := hori[0]; tx <= hori[1]; tx ++ {
// for ty := vert[0]; ty <= vert[1]; ty ++ {
// rx := iclamp(tx, 0, srcsz.X - 1)
// ry := iclamp(ty, 0, srcsz.Y - 1)
// off := src.PixOffset(rx, ry)
// kr := k.Do(float64(tx) - sx) * k.Do(float64(ty) - sy)
// temp[0] += float64(src.Pix[off + 0]) / math.MaxUint8 * kr
// temp[1] += float64(src.Pix[off + 1]) / math.MaxUint8 * kr
// temp[2] += float64(src.Pix[off + 2]) / math.MaxUint8 * kr
// temp[3] += float64(src.Pix[off + 3]) / math.MaxUint8 * kr
// temp[4] += kr
// }
// }
// off := dst.PixOffset(x,y)
// dst.Pix[off + 3] = uint8(iclamp(int(temp[3] / temp[4] * math.MaxUint8), 0, math.MaxUint8))
// alpha := int(dst.Pix[off + 3])
// dst.Pix[off + 2] = uint8(iclamp(int(temp[2] / temp[4] * math.MaxUint8), 0, alpha))
// dst.Pix[off + 1] = uint8(iclamp(int(temp[1] / temp[4] * math.MaxUint8), 0, alpha))
// dst.Pix[off + 0] = uint8(iclamp(int(temp[0] / temp[4] * math.MaxUint8), 0, alpha))
// }
// }
//}
|
#pragma once
#include "../../JObject.hpp"
class JString;
class JString;
namespace android::text
{
class Html : public JObject
{
public:
// Fields
static jint FROM_HTML_MODE_COMPACT();
static jint FROM_HTML_MODE_LEGACY();
static jint FROM_HTML_OPTION_USE_CSS_COLORS();
static jint FROM_HTML_SEPARATOR_LINE_BREAK_BLOCKQUOTE();
static jint FROM_HTML_SEPARATOR_LINE_BREAK_DIV();
static jint FROM_HTML_SEPARATOR_LINE_BREAK_HEADING();
static jint FROM_HTML_SEPARATOR_LINE_BREAK_LIST();
static jint FROM_HTML_SEPARATOR_LINE_BREAK_LIST_ITEM();
static jint FROM_HTML_SEPARATOR_LINE_BREAK_PARAGRAPH();
static jint TO_HTML_PARAGRAPH_LINES_CONSECUTIVE();
static jint TO_HTML_PARAGRAPH_LINES_INDIVIDUAL();
// QJniObject forward
template<typename ...Ts> explicit Html(const char *className, const char *sig, Ts...agv) : JObject(className, sig, std::forward<Ts>(agv)...) {}
Html(QJniObject obj);
// Constructors
// Methods
static JString escapeHtml(JString arg0);
static JObject fromHtml(JString arg0);
static JObject fromHtml(JString arg0, jint arg1);
static JObject fromHtml(JString arg0, JObject arg1, JObject arg2);
static JObject fromHtml(JString arg0, jint arg1, JObject arg2, JObject arg3);
static JString toHtml(JObject arg0);
static JString toHtml(JObject arg0, jint arg1);
};
} // namespace android::text
|
use std::str::FromStr;
pub enum Areas {
Belgium,
London,
Pyrenees,
Dummy,
}
impl FromStr for Areas {
type Err = &'static str;
fn from_str(s: &str) -> Result<Self, Self::Err> {
match s {
"belgium" => Ok(Areas::Belgium),
"london" => Ok(Areas::London),
"pyrenees" => Ok(Areas::Pyrenees),
"dummy" => Ok(Areas::Dummy),
_ => Err("no match"),
}
}
}
|
<gh_stars>0
import {Quantity} from "./Quantity"
import {Unit} from "./Unit"
import * as Verify from "./Verify";
const SUPERSCRIPT_DIGITS: string = "\u2070\u2071\u00b2\u00b3\u2074\u2075\u2076\u2077\u2078\u2079"
export type Map = { [key: string]: any };
export interface Scripted {
toScript(accent: string): string;
}
export let precision = 8;
// export let language = "en-US";
export function required<Any>(value: Any, message?: string): Any {
if (value !== undefined) {
return value;
}
if (typeof message === "string") {
throw new Error(message);
}
throw new Error("Required value is not defined")
}
export function requiredNotNull<Any>(value: Any, message?: string): Any {
if ((value !== undefined) && (value !== null)) {
return value;
}
if (typeof message === "string") {
throw new Error(message);
}
if (value === undefined) {
throw new Error("Required value is not defined")
}
throw new Error("Required value is null")
}
export function toScript(accent: string, object: any): string {
if (object === undefined) {
return "undefined";
}
if (object === null) {
return "null";
}
if (typeof object === "boolean") {
return object.toString();
}
if (typeof object === "number") {
return object.toString();
}
if (typeof object === "string") {
return toEscapedStringWithQuotes(object as string);
}
if (typeof object["toScript"] === "function") {
return (object as Scripted).toScript(accent);
}
if (Array.isArray(object)) {
return `[${(object as any[]).map((item) => indent(toScript(accent, item))).join(", ")}]`;
}
//return `{${(object as {[key: string]: any}).map((item) => indent(describe(item, language))).join(", ")}]`;
let map = object as { [key: string]: any };
let keys = Object.keys(map);
if (keys.length === 0) {
return "{}";
}
return `{${Object.keys(map).map((key) => `\n\t${toEscapedStringWithQuotes(key)}: ${indent(toScript(accent, map[key]))}`).join("")}\n}`;
}
export function round(n: number, accuracy: number): number {
if (accuracy === 0) {
return n;
}
return Math.round(n / accuracy) * accuracy;
}
export function floor(n: number, accuracy: number): number {
if (accuracy === 0) {
return n;
}
return Math.floor(n / accuracy) * accuracy;
}
export function ceil(n: number, accuracy: number): number {
if (accuracy === 0) {
return n;
}
return Math.ceil(n / accuracy) * accuracy;
}
export function toKey(s: string): string {
if ((s === undefined) || (s === null)) {
return s;
}
if (Verify.isIdentifier(s)) {
return s;
}
return toEscapedStringWithQuotes(s);
}
export function toEscapedStringWithQuotes(s: string): string {
if ((s === undefined) || (s === null)) {
return s;
}
return "\"" + toEscapedString(s) + "\"";
}
export function toEscapedString(s: string): string {
if ((s === undefined) || (s === null)) {
return s;
}
let result: string = "";
for (let i = 0; i < s.length; i += 1) {
let ch = s.charAt(i);
switch (ch) {
case "\n":
result += "\\n";
break;
case "\r":
result += "\\r";
break;
case "\t":
result += "\\t";
break;
case "\\":
result += "\\\\";
break;
case "\'":
result += "\\\'";
break;
case "\"":
result += "\\\"";
break;
case "\`":
result += "\\\`";
break;
case "\b":
result += "\\b";
break;
case "\f":
result += "\\f";
break;
default:
let code = ch.charCodeAt(0);
if (((code >= 32) && (code <= 126)) || (code >= 161)) {
result += ch;
}
else {
let hex = code.toString(16);
while (hex.length < 4) {
hex = "0" + hex;
}
result += "\\u" + hex;
}
}
}
return result;
}
export function toSuperscriptNumber(n: number): string {
if ((n === undefined) || (n === null)) {
return n.toString();
}
let s = n.toFixed(0);
let result = "";
for (let i = 0; i < s.length; i++) {
let code = s.charCodeAt(i);
if (code === 45) { // -
s += "\u207b";
}
else if ((code >= 48) && (code <= 57)) {
s += SUPERSCRIPT_DIGITS[code - 48];
}
else {
throw new Error(`Unsupported superscript digit: ${code}`);
}
}
return result;
}
export function formatError(line: number, column: number, message: string, cause?: any) {
let result = `[Ln ${line}, Col ${column}] ${message}`;
if (cause) {
result += `\n\tcaused by ${indent(cause.stack.toString())}`;
}
return result;
}
export function indent(s: string, t: string = " ") {
if ((s === undefined) || (s === null)) {
return s;
}
return s.replace(/\n/g, "\n" + t);
}
|
Approximation Method of Tool Path Oriented to Five-axis CNC Machining with NURBS Curve 8 www.ijeas.org AbstractFor the case of the advancement of Non-Uniform Rational B-Spline (NURBS) curve to represent a complex freeform shape, the NURBS method has been applied in Computer Numerical Control (CNC) machine tools to express the tool path curve. In order to achieve higher approximation accuracy in five-axis CNC machining, the approximation principle was firstly proposed based on the time division and the tool path curve was approximated by a group of chord lines. To avoid the federate fluctuation, the federate correction method is also proposed. The relation methods for realizing the approximation of tool path curve was also presented in this paper. The given example and the cutting result show that the proposed methods are feasibility of being applied to CNC trajectory approximation to achieve high-speed and high-accuracy multi-axis machining. I. INTRODUCTION Five-axis computer numerical control (CNC) machine tools have been more and more applied in performing a cutting task of complex work-pieces such as molds, dies, etc. to meet the requirements of high speed and high accuracy. To realize the multi-axis CNC machining, the work-pieces have to be firstly designed using computer-aided design (CAD) system, and then cutter contacting path is converted to the cutter location (CL) path and tool path by computer-aided manufacturing (CAM) system . The controlling algorithm of CNC system is a type of location and federate controlled method. The most important and functional kernel module is tool path approximation method, which is also the so-called interpolation method in applied mathematics. In order to guide the CNC machine to perform cutting along the CL path or tool path, the path is traditionally divided into a set of line or circular segments (also called NC codes). These segments will approximate the original tool path to a desired accuracy if sufficient numbers of segments are used. To obtain more approximation accurate and to reduce the contour error, the number of the segments should be increased. However, these methods could lead to several drawbacks . Based on the above observation and analysis, it is evident that accurate high-speed manufacturing is hard to achieve if the conventional line and circular interpolators are used in CNC systems. Therefore, developing a new type of interpolator for CNC machine tools is of importance. Since non-uniform rational B-spline (NURBS) uses fewer data to represent the designed curves and if both the CAD/CAM and CNC systems adopt NURBS as the geometric representation, a considerable amount of time spent on transferring data between CAD/CAM and CNC machine can be saved. Because of the advantages of NURBS method, a tool path approximation method is proposed in this paper for machining a complex curves (or surfaces). And the relation algorithm of NURBS method is also introduced and presented to help realizing the controlling software of the multi-axis CNC system. Consequently, a trial cutting is performed in our research work to validate that the methods in this paper is succeed and applicable and the approximation theory can dramatically increase the machining accuracy and decrease the machining time. II. NURBS REPRESENTATION A general form to describe a parametric curve in the 3-D space can be expressed as where u is an arbitrary parameter, i, j, k is the unit vector of axis orientation of x, y, z respectively. A p-degree NURBS curve with parameter u can be defined as follows: where C i is the i th 3-D control point; w i is the corresponding weight factor of C i ; (n+1) is the number of control points; B i,p (u), B-spline basis function with degree of p, can be calculated by the following formula: where u i (i=0,1,2,,n+p+1) is corresponding parametric value of control point which can be formed a non-decrease serial K. K is also called the knot vector and can be expressed as the following style. www.ijeas.org III. APPROXIMATION METHOD OF A NURBS CURVE As shown in Fig.1, if the tool path curve r(u) is to be approximated, the approximation point should be interpolated onto the curve according to certain rules. After the above process, the distance between chord line formed by the adjacent two approximation points and original curve is the approximation error. In this article, we use the following time-division rule to generate the approximation points. And now, the approximation process of the method is described as follows. The key to approximate a parametric tool path curve represented by NURBS in real time (namely command generation) is that the segmentation should be based on equal increments of sampling period T s, rather than equal increments of the parameter u. Accordingly, a method is needed to determine successive values of parameter u (at each sampling period) such that the ratio between △s (increment of curve length during each sampling period) and T is equal to a desired profile V(t) in a federate control problem. The procedures for determining successive values of u are summarized as follows. Considering the federate V(t) along the curve, r(u) in Eq., V(t) can be expressed as Using 1st order Taylor expansion method, Eq. can be processed as the following equation where u k and u k+1 denote the value of u at t=t k =kT s and t=t k+1 =(k+1)T s, respectively. And also, the 2nd order approximate algorithm is The 1st and 2nd derivative of () u r with u can be respectively obtained as where the general algorithm for m th order derivative of and Using Eqs.,, and, then y and '' z can be calculated and using Eqs. Assumed that the acceleration and deceleration is a and destination federate is v as shown in Fig.2. Fig.2 Mathematical model of linear acceleration and deceleration During the process of accelerating, the following method can be used While the decelerating course, the key problem to be solved is evaluation of deceleration point. In Fig.2, S D, distance of deceleration, can be calculated as follows The distance of deceleration, which is also the length between deceleration point and destination point along the spline curve, can be calculated as follows where u D is corresponding parameter of the deceleration point. The following Newton-Rapson method can be used to calculate the value of u D. If Assumed that initial value of u D is u 0 and the initial value is 1.0, that is, 0 () fu = -S D, then we have the following equation where i is set as an integer. Eq. can be equivalent to the following formula is enough small, such that the error is smaller than the given tolerance, then the iterative calculation described in Eq. will be stopped and let The above approximation calculation method has some important algorithms such as arbitrary order derivative of NURBS curve r(u) and total length of r(u) between arbitrary two parameters. In the rest of this article, we have concentrated our efforts for getting the calculation results. A. Arbitrary order derivative of r(u) According to the Eq., the following first order derivative can be obtained According to the Eq., the following first order derivative can be obtained For the solution of Eq., the follow iterative method is proposed and applied in this paper. B. Calculation of approximated tool path curve During the course of acceleration and deceleration controlling method mentioned above, there are two types of computational problems: 1) total length of r(u) between arbitrary two parameters(i. e. a and b); 2) one of parameter Assumed that the total length (L) between the parameter u d and the parameter 1 is given, the destination is to calculate the value of u d. that is where is the allowable error of iterative calculation. Fig.3 shows the tool path curve to be approximated, which is a quarter of circle with radius of 10 mm represented in 3 rd order NURBS form, and its control points are P 0, P 1 and P 2 with weights 1, 0.707 and 1 respectively. Table 2 has described that the approximation accuracy when different iterative allowable errors are given. From the Table 2, we can find that with the increase of the accuracy requirement, the computational result is by and by approximating the real parameter value of the given point. When the allowable error is set as 0.01, the number of iterative calculation is only three enough to skip the iterative cycle. It can also be seen that the algorithm presented in the paper has high computational efficiency and convergence speed. The proposed method has been realized in our developing 3-axis CNC machine tool, which is equipped with an open architecture controller. The NURBS curve depicted in Fig.4 is transformed the format of NC code and then input into the CNC system to cut the paraffin blank. The cutting result of the NURBS curve is shown in Fig.5 and the tool path approximation accuracy is under 0.5m when the time interval is set as 1ms. Through our deep research in this paper, we can conclude the following meaningful and valuable conclusions: NURBS method widely used in the field of CAD can also be directly applied in CNC system. Through adding approximation algorithm to the controlling software of CNC machines, one can achieve the higher approximation accuracy to tool path curve than the traditional line or circular arc segments approximation method. The iterative calculation methods presented in the paper have higher computational efficiency and convergence speed. The proposed methods can also provide the theoretic reference for the similar applications of NURBS approximation technology. |
WASHINGTON — The special counsel, Robert S. Mueller III, removed a top F.B.I. agent this summer from his investigation into Russian election meddling after the Justice Department’s inspector general began examining whether the agent had sent text messages that expressed anti-Trump political views, according to three people briefed on the matter.
The agent, Peter Strzok, is considered one of the most experienced and trusted F.B.I. counterintelligence investigators. He helped lead the investigation into whether Hillary Clinton had mishandled classified information on her private email account, and then played a major role in the investigation into links between President Trump’s campaign and Russia.
But Mr. Strzok was reassigned this summer from Mr. Mueller’s investigation to the F.B.I.’s human resources department, where he has been stationed since. The people briefed on the case said the transfer followed the discovery of text messages in which Mr. Strzok and a colleague reacted to news events, like presidential debates, in ways that could appear critical of Mr. Trump.
“Immediately upon learning of the allegations, the special counsel’s office removed Peter Strzok from the investigation,” said a spokesman for the special counsel’s office, Peter Carr. |
<filename>src/.ipynb_checkpoints/preprocess-checkpoint.py
import numpy as np
import pandas as pd
data = pd.read_table('../dataset/u1.base', sep=" ", header = None,)
print(data)
|
Young volcanoes in the Coprates Chasma region of Mars’ enormous Valles Marineris canyon system, as seen by NASA’s Mars Reconnaissance Orbiter.
Volcanoes erupted inside Mars' enormous equatorial canyon in the not-too-distant past, a new study suggests.
Photos taken by NASA's Mars Reconnaissance Orbiter (MRO) reveal 130 small volcanoes on the eastern floor of the nearly 2,500-mile-long (4,000 kilometers) Valles Marineris, the largest canyon in the solar system, according to the study.
Such 1,300-foot-high (400 meters) cones could theoretically be made of mud, but that does not seem to be the case here, the researchers said. [Latest Photos from NASA's Mars Reconnaissance Orbiter]
"We observed morphological details such as bulging of solidified lava caused by the injection of more-recent lava beneath the hardened crust, as well as characteristic surface patterns identical to lava fields on Earth," lead author Petr Brož, from the Institute of Geophysics of the Czech Academy of Science, said in a statement. "This reinforces our assumption that we are looking at magmatic rock volcanism and not liquid mud."
Other details bolster this interpretation, study team members said. For example, the 130 volcanoes appear to cluster along tectonic fault lines, where magma would have a route to the surface. The cones also are very similar morphologically to known lava volcanoes on Mars and Earth, the researchers added.
Valles Marineris in the east of Mars’ Tharsis volcanic region. Higher regions are marked red in this topographic map, while yellow and green indicate moderate elevations; the lowest points are shown in blue. (Image: © MOLA, NASA/JPL/University of Arizona)
Mars has many volcanic features, the most famous of which is Olympus Mons, the largest mountain in the solar system. Olympus Mons is about 16 miles (25 km) high and 375 miles (625 km) wide, meaning it covers about as much ground as the state of Arizona.
Olympus Mons and a number of large neighboring volcanoes are found on a plateau called Tharsis. Most known Martian volcanoes lie in Tharsis and another province called Elysium, so discovering more than 100 of them inside Valles Marineris was a surprise, researchers said.
Another surprise is the age of the Valles Marineris volcanoes, which the researchers estimated via crater-counting. (The more crater-scarred an area is, the older it is; high crater counts mean the region has been around longer to absorb impacts.)
"In geological terms, the volcanic cones are very young, just 200 [million] to 400 million years in age," co-author Gregory Michael, of the Freie Universität Berlin in Germany, said in the same statement.
Most volcanic activity on Mars took place in the much more distant past — about 3.5 billion years ago, the researchers said. (There are exceptions, however; for example, lava may have flowed from Olympus Mons just in the last few million years.)
Brož and his colleagues also analyzed MRO spectrometer data about the part of Valles Marineris where the 130 volcanoes lie, a region known as Coprates Chasma.
The valleys of Coprates Chasma in the east of Valles Marineris. This perspective view was created using stereo image data from DLR’s High Resolution Stereo Camera on board the European Space Agency’s Mars Express spacecraft. (Image: © ESA/DLR/FU Berlin, CC-BY-SA 3.0 IGO)
"In doing so, we encountered minerals with high silica content, and even opaline-like substances at one of the peaks," said co-author James Wray, from the Georgia Institute of Technology.
Such minerals can form when hot water moves through rock, suggesting that Coprates Chasma may have been a habitable environment in the ancient past, study team members said. For this and several other reasons, the area would be a good site to visit with a future Mars rover, they added.
"Here, we could investigate many scientifically important and interesting topics," said co-author Ernst Hauber, from the German Aerospace Center (known by its German acronym, DLR). "Analyzing samples for their elemental isotopic fractions would allow us to determine with far greater precision when the volcanoes were actually active. On the towering, steep walls, the geologic evolution of the Valles Marineris is presented to us almost like a history book — gypsum strata and layers of old, crustal rocks can be observed, as well as indications for liquid water trickling down the slopes even today during the warm season. That is as much Mars geology as you can get!"
Follow Mike Wall on Twitter @michaeldwall and Google+. Follow us @Spacedotcom, Facebook or Google+. Originally published on Space.com. |
package br.com.gointerop.hapi.fhir.repository;
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.Locale;
import java.util.Map;
import java.util.Properties;
import java.util.stream.Collectors;
import org.jetbrains.annotations.NotNull;
import ca.uhn.fhir.context.ConfigurationException;
public class PersistenceProperties {
static final String PERSISTENCE_PROPERTIES = "persistence.properties";
static final String DATASOURCE_DRIVER = "datasource.driver";
static final String DATASOURCE_MAX_POOL_SIZE = "datasource.max_pool_size";
static final String DATASOURCE_PASSWORD = "<PASSWORD>";
static final String DATASOURCE_URL = "datasource.url";
static final String DATASOURCE_USERNAME = "datasource.username";
private static Properties ourProperties;
private static String getProperty(String propertyName) {
String env = "HAPI_" + propertyName.toUpperCase(Locale.US);
env = env.replace(".", "_");
env = env.replace("-", "_");
String propertyValue = System.getenv(env);
if (propertyValue != null) {
return propertyValue;
}
Properties properties = PersistenceProperties.getProperties();
if (properties != null) {
propertyValue = properties.getProperty(propertyName);
}
return propertyValue;
}
private static Properties getProperties() {
if (ourProperties == null) {
Properties properties = loadProperties();
PersistenceProperties.ourProperties = properties;
}
return ourProperties;
}
@NotNull
private static Properties loadProperties() {
// Load the configurable properties file
Properties properties;
try (InputStream in = PersistenceProperties.class.getClassLoader().getResourceAsStream(PERSISTENCE_PROPERTIES)) {
properties = new Properties();
properties.load(in);
} catch (Exception e) {
throw new ConfigurationException("Could not load HAPI properties", e);
}
Properties overrideProps = loadOverrideProperties();
if (overrideProps != null) {
properties.putAll(overrideProps);
}
properties.putAll(System.getenv().entrySet().stream()
.filter(e -> e.getValue() != null && properties.containsKey(e.getKey()))
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)));
return properties;
}
private static Properties loadOverrideProperties() {
String confFile = System.getProperty(PERSISTENCE_PROPERTIES);
if (confFile != null) {
try {
Properties props = new Properties();
props.load(new FileInputStream(confFile));
return props;
} catch (Exception e) {
throw new ConfigurationException("Could not load HAPI properties file: " + confFile, e);
}
}
return null;
}
private static String getProperty(String propertyName, String defaultValue) {
String value = getProperty(propertyName);
if (value != null && value.length() > 0) {
return value;
}
return defaultValue;
}
public static String getDataSourceDriver() {
return PersistenceProperties.getProperty(DATASOURCE_DRIVER, "org.postgresql.Driver");
}
public static Integer getDataSourceMaxPoolSize() {
return PersistenceProperties.getIntegerProperty(DATASOURCE_MAX_POOL_SIZE, 10);
}
private static Integer getIntegerProperty(String propertyName, Integer defaultValue) {
String value = PersistenceProperties.getProperty(propertyName);
if (value == null || value.length() == 0) {
return defaultValue;
}
return Integer.parseInt(value);
}
public static String getDataSourceUrl() {
return PersistenceProperties.getProperty(DATASOURCE_URL,
"jdbc:postgresql://localhost:5433/esus");
}
public static String getDataSourceUsername() {
return PersistenceProperties.getProperty(DATASOURCE_USERNAME, "postgres");
}
public static String getDataSourcePassword() {
return PersistenceProperties.getProperty(DATASOURCE_PASSWORD, "<PASSWORD>");
}
}
|
Searching for repetitions in biological networks: methods, resources and tools We present here a compact overview of the data, models and methods proposed for the analysis of biological networks based on the search for significant repetitions. In particular, we concentrate on three problems widely studied in the literature: 'network alignment', 'network querying' and 'network motif extraction'. We provide (i) details of the experimental techniques used to obtain the main types of interaction data, (ii) descriptions of the models and approaches introduced to solve such problems and (iii) pointers to both the available databases and software tools. The intent is to lay out a useful roadmap for identifying suitable strategies to analyse cellular data, possibly based on the joint use of different interaction data types or analysis techniques. |
<filename>urule-core/src/main/java/com/bstek/urule/model/rule/NamedReferenceValue.java
/*******************************************************************************
* Copyright 2017 Bstek
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy
* of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
******************************************************************************/
package com.bstek.urule.model.rule;
import com.bstek.urule.model.library.Datatype;
/**
* @author Jacky.gao
* @since 2016年8月16日
*/
public class NamedReferenceValue extends AbstractValue {
private String referenceName;
private String propertyLabel;
private String propertyName;
private Datatype datatype;
@Override
public String getId() {
String id = "[REF]" + referenceName + "." + propertyLabel;
if (arithmetic != null) {
id += arithmetic.getId();
}
return id;
}
@Override
public ValueType getValueType() {
return ValueType.NamedReference;
}
public String getReferenceName() {
return referenceName;
}
public void setReferenceName(String referenceName) {
this.referenceName = referenceName;
}
public String getPropertyLabel() {
return propertyLabel;
}
public void setPropertyLabel(String propertyLabel) {
this.propertyLabel = propertyLabel;
}
public String getPropertyName() {
return propertyName;
}
public void setPropertyName(String propertyName) {
this.propertyName = propertyName;
}
public Datatype getDatatype() {
return datatype;
}
public void setDatatype(Datatype datatype) {
this.datatype = datatype;
}
}
|
1. Field of the Invention
The present invention relates to an electrophotographic photosensitive member, a method of producing the electrophotographic photosensitive member, a process cartridge, and an electrophotographic apparatus.
2. Description of the Related Art
In recent years, for the purpose of extending the life and improving image quality of an electrophotographic photosensitive member and increasing the processing speed of an electrophotographic apparatus, it has been desired to improve the mechanical durability (abrasion resistance) of an organic electrophotographic photosensitive member containing an organic photoconductive substance (hereinafter referred to as an “electrophotographic photosensitive member”). In order to improve the mechanical durability, according to one technique, a surface layer of an electrophotographic photosensitive member contains a polymer produced by polymerization of a compound having a polymerizable functional group.
Japanese Patent Laid-Open No. 2000-066425 discloses a technique of improving the abrasion resistance and electric potential stability of an electrophotographic photosensitive member by adding a polymer obtained by polymerizing a charge transporting compound having two or more chain-polymerizable functional groups to the surface layer of the electrophotographic photosensitive member. Japanese Patent Laid-Open No. 2010-156835 discloses a technique of improving the polymerizability of a charge transporting compound having a chain-polymerizable functional group (methacryloyloxy group) by adding a polymer obtained by polymerizing an electron transporting compound having two or more methacryloyloxy groups to the surface layer.
However, if a charge transporting compound having two or more chain-polymerizable functional groups is used, the charge transporting structure is easily distorted in chain polymerization. As a result, high electric potential stability is sometimes not achieved. Accordingly, Japanese Patent Laid-Open No. 2007-241140 discloses a technique of adding, to the surface layer, a polymer obtained by polymerizing a composition including a charge transporting compound having a single chain-polymerizable functional group and a compound that has three or more chain-polymerizable functional groups and that does not have a charge transporting structure. Japanese Patent Laid-Open No. 2009-015306 discloses a technique of achieving high electric potential stability by using a charge transporting compound which has a single chain-polymerizable functional group and in which an alkylene group is inserted between the chain-polymerizable functional group and a charge transporting structure.
However, the following has been found from studies conducted by the inventors of the present invention. That is, in the charge transporting compound having a single chain-polymerizable functional group disclosed in Japanese Patent Laid-Open Nos. 2007-241140 and 2009-015306, the ratio of a chain-polymerizable functional group that contributes to a chain polymerization reaction in one molecule is low, and the probability that a polymerization reaction does not proceed is higher in the charge transporting compound having a single chain-polymerizable functional group than in a charge transporting compound having two or more chain-polymerizable functional groups. Therefore, the residual potential tends to increase. |
package com.dlink.daemon.entity;
import java.util.LinkedList;
public class TaskQueue<T> {
private final LinkedList<T> tasks = new LinkedList<>();
private final Object lock = new Object();
public void enqueue(T task) {
synchronized (lock) {
lock.notifyAll();
tasks.addLast( task );
}
}
public T dequeue() {
synchronized (lock) {
while (tasks.isEmpty()) {
try {
lock.wait();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
T task = tasks.removeFirst();
return task;
}
}
public int getTaskSize() {
synchronized (lock) {
return tasks.size();
}
}
}
|
. For ENT specialists it is good to become familiar with the basics of acupuncture, as in our times this method of treatment has been spread and accepted worldwide. Modern pain research has succeeded in scientific exploring and verifying acupuncture effects. Any medical specialist having understood the facts and implications of acupuncture as laid out in this paper, may take the chance to try and put acupuncture into practice in his/her daily work. One of the challenges of doctors nowadays is the increase of functional disorders, of myofascial pain syndromes, of patients' general ill-feeling of health. Particularly in pain management, as regards to the considerable toxic by-effects of long-term prescribed analgetics, there is a need of gentle therapies such as acupuncture, free from side-effects. It is the patients who demand alternative concepts. For ENT-doctors running a busy office, microsystem acupuncture in particular may be recommended. Inserting a couple of needles at the auricle, or injecting a few drops into the oral mucosa is a quick action which in most cases will provide beneficial results. |
<filename>api/main.py
from typing import Optional
from fastapi import FastAPI
import redis
import json
from models.team_member import Team_Member
app = FastAPI()
r = redis.StrictRedis(host='localhost', port=6379, db=0, password="<PASSWORD>", socket_timeout=None, connection_pool=None, charset='utf-8', errors='strict', unix_socket_path=None)
@app.get("/")
def read_root():
return {"Hello": "World"}
@app.get("/teammember/{item_id}")
def read_teammember(item_id: int):
head = {"item_id": item_id}
data = r.get(f"TeamMember_{item_id}")
memberData = json.loads(data)
rdict = head | memberData
return rdict
@app.put("/teammember/{item_id}")
def put_teammember(item_id: int, item: Team_Member):
head = {"item_id": item_id}
return r.set(f"TeamMember_{item_id}", json.dumps(head|item.dict()))
@app.get("/teammembers/")
def get_list_all_members():
return None |
Experiments on PMMA models to predict the impact of corneal refractive surgery on corneal shape. Flat and spherical PMMA surfaces were ablated with a standard refractive surgery laser system. The ratio of profiles on flat to spherical PMMA surfaces was used to estimate experimentally the radial change in ablation efficiency for PMMA and cornea. Changes in ablation efficiency accounted for most of the asphericity increase found clinically, using the same laser system. This protocol is useful to obtain a correction factor for any ablation algorithm and laser system, and to estimate the contribution of biomechanics to the increase of corneal asphericity in myopic refractive surgery. |
Holiday cheer! Did I drink too much this season?
Between the eggnog filled get-togethers around Christmas and the champagne infused parties surrounding New Year’s Eve, ’tis the season for drinking, drinking, and drinking some more. Holiday time isn’t just for grown-ups though, with both my teenage daughters having full social calendars including team dinners, “Secret Santa” bashes, and every other sort of party. Even for teenagers, it is clear to me, the alcohol flows right along with the incessant seasonal music.
Regardless of the law, my under-age children don’t have any trouble getting drinks into their hands. I have been struck in these past few weeks by how common drinking is among the under-21 set and how accepted and out in the open it seems.
At the same time, I’m aware of a number of my friends who have stopped drinking, standing forlornly at celebrations with a glass of seltzer or Diet Coke because of the ill effects of alcohol on their lives. Those who can handle the spirits of Christmas and those who can’t seems arbitrary, and it makes me worry about my girls.
Looking back on my teenage years, I can’t say things were much different. There were plenty of opportunities to get hold of beer and drink way too much of it. Of the kids I knew, though, who moved on and who ended up in rehab or AA seems like a crapshoot. The problem is a real one with the Substance Abuse and Mental Health Services Administration, a federal agency, estimating that 17 million Americans 12-years-old and up in 2014 had an Alcohol Use Disorder and more than a quarter of all those who imbibe count as heavy or binge drinkers. The National Council on Alcoholism and Drug Dependence, at the same time says that, “No single factor can predict whether a person will become addicted,” which means it is just a little less than random whose life will get messed up and whose won’t.
I’m not thinking of pouring out all the bottles in the liquor cabinet and advocating the life of a teetotaler, but my kids certainly pay attention to the adults around them and the things we do. When I’m out to dinner with friends there is always a bottle of wine with the meal, often after cocktails. Over the holidays I went bowling with friends and somehow a pitcher of beer appeared.
The example being set around my girls suddenly seems pretty poor. It isn’t the mistletoe or the kiss at midnight that is an excuse for bad behavior, it is the bottles of liquid cheer pouring throughout the evening that is used to pardon dancing on tables or puking on someone’s rug. Laughing about misdeeds the next day gives my kids the message that this behavior is all right.
Wishes, charms and prayers may not be enough to ensure my daughters’ health but showing them that not every social interaction needs to involve alcohol may be a tool that can work. I need to do more than just hope that my daughters keep a healthy relationship with the eggnog and champagne and don’t end up being the ones who start swimming in the punch bowl.
Well, you shouldn't worry too much. When they turn 18 they'll be able to make their own decisions about whether to... oh wait, your generation raised the drinking age from 18 to 21 in the 1980's because "screw anyone who isn't a baby boomer" ...yeah, I forgot that. That might be the reason that under 21 but over 18 year olds don't give a crap about the drinking age when they get the "it was ok for me but not for you" bull from you boomers. I thankfully was quite used to knowing about alcoholic beverages thanks to growing up in an Italian family where wine at the dinner table was a standard and there wasn't some social hangup about it.
When I did turn 18 and went to a SUNY close enough to the Canadian border to regularly purchase liquor quite legally in Quebec, I made tons of money reselling it to idiot 19 year olds who had never had a dink in their life and had no idea how it was going to affect them (a $120 text book for a bullcrap natural science requirement isn't going to pay for itself). Yeah, you keep Carrie Nationing your kids, and when they turn 21 they'll have access to as much as they can buy, and no idea what it will do to them. Smart move jerk face.
I agree that 21 is wrong - kids who can die for their country should be allowed to drink.
As to setting an example, that was pretty much taken care of by the time they reached their teens. Judging by what you've written in the past, I'd reckon that your behavior has already given your kids a moderate outlook on life, the universe & everything.
It's fairly obvious- you're not a good father.
21 yo drinking age is silly. my daughter is 20 and if she wants a drink she can have it. |
Internet of Things Frameworks for Smart City ApplicationsA Systematic Review The advent of smart monitoring and cyber-physical systems in civil engineering has significantly propelled a broad wealth of smart city applications. Representing a vital technological basis of smart city applications, Internet of Things (IoT) frameworks have been an increasing topic of research in recent years. However, different definitions of the terms smart city and IoT framework are used without consensus, and the technical aspects of IoT frameworks for smart city applications have not been fully reviewed, causing ambiguities and redundant developments in the community. This paper aims to condense the definitions of the terms smart city and IoT framework by summarizing and comparing concepts. Besides critical IoT technologies, sensor node hardware utilized in IoT frameworks is summarized in a systematic review. As a result of this study, IoT framework trends for smart city applications are provided. It is expected that the findings of trends of IoT frameworks for smart city applications presented in this study may serve as a basis for future IoT framework implementations that advance smart city applications. |
import { MdiReactIconComponentType } from './dist/typings';
declare const PinterestBoxIcon: MdiReactIconComponentType;
export default PinterestBoxIcon;
|
IoT based Monitoring and Controlling of Environmental Parameter for Implementing Intelligent Irrigation System The Solar Powered Drip Irrigation Method was designed to reduce agricultural water consumption. The proposed module utilizes a microcontroller and several sensors such as soil moisture sensors put in root system belts, temperature sensors, and ultrasonic sensors positioned at the tank's roof. The water volume in the tank is maintained using the on and off operation of the pump. Then the moisture content and temperature are regulated by opening and closing of the solenoid valve. A Wi-Fi module is connected to the control unit that processes sensor data, initiates actuators, and broadcasts data over the internet, allowing the user to watch the farm in real-time from whatever distant area. The programmed code was designed depending on the soil moisture, humidity, and temperature values and is programmed into the central controller to regulate the amount of water delivered to the area for irrigation and the pump to fill the water in the tank. Renewable solar power the entire system. The sensing unit, actuating unit, and the central control unit are wired together, and the control unit communicates with the app through a wireless link. The primary goal of the research is to reduce the farmer's manual intervention, which saves money and resources. |
Hard drives are currently used in many consumer electronic devices other than personal computers. For example, they are used in personal video recorders, cable set top boxes, external storage devices, and audio jukeboxes. Many concerns arise when integrating a disc drive into a consumer electronic device. For example, an operating temperature range of the disc drive should be maintained, acoustic emission from the electronic device should be minimized, and the effects of external shocks and vibrations on the disc drive should be minimized.
Designing a disc drive mounting system to address one such concern can adversely affect another. For example, a system fan installed to cool the disc drive can produce unwanted acoustic emissions. Additionally, hard mounting the disc drive directly to the frame of the electronic device may facilitate heat transfer from the disc drive. However, hard mounting directly to the frame may also facilitate acoustic emissions from the disc drive and the transfer of shocks and vibrations to the disc drive.
Accordingly there is a need for a disc drive mounting system that increases heat transfer away from a disc drive, decreases acoustic emissions from the disc drive, and decreases the effects of external shocks and vibrations on the disc drive. The present invention provides a solution to this and other problems, and offers other advantages over the prior art. |
<gh_stars>0
/*
* Copyright (C) 2010-2020, <NAME> and contributors
* listed in the main project's alchemist/build.gradle.kts file.
*
* This file is part of Alchemist, and is distributed under the terms of the
* GNU General Public License, with a linking exception,
* as described in the file LICENSE in the Alchemist distribution's top directory.
*/
package it.unibo.alchemist.boundary.gui.view.cells;
import com.jfoenix.controls.JFXDrawer;
import com.jfoenix.controls.JFXDrawersStack;
import com.jfoenix.controls.JFXToggleButton;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import it.unibo.alchemist.boundary.gui.controller.EffectBarController;
import it.unibo.alchemist.boundary.gui.effects.EffectGroup;
import it.unibo.alchemist.boundary.gui.utility.DataFormatFactory;
import it.unibo.alchemist.boundary.gui.utility.FXResourceLoader;
import it.unibo.alchemist.boundary.interfaces.FXOutputMonitor;
import it.unibo.alchemist.model.interfaces.Position2D;
import javafx.scene.control.ContextMenu;
import javafx.scene.control.Label;
import javafx.scene.control.MenuItem;
import javafx.scene.input.MouseButton;
import org.jetbrains.annotations.Nullable;
import java.io.IOException;
import static it.unibo.alchemist.boundary.gui.utility.ResourceLoader.getStringRes;
/**
* This ListView cell implements the {@link AbstractEffectCell} for containing
* an {@link EffectGroup}. It has a name that identifies the EffectGroup and
* when clicked should open a {@link javafx.scene.control.ListView}
* to show the {@link it.unibo.alchemist.boundary.gui.effects.EffectFX effects} the group is composed of.
*
* @param <P> the position type
*/
public class EffectGroupCell<P extends Position2D<? extends P>> extends AbstractEffectCell<EffectGroup<P>> {
private static final String DEFAULT_NAME = getStringRes("effect_group_default_name");
private final JFXDrawersStack stack;
private JFXDrawer effectDrawer;
private EffectBarController<P> effectBarController;
/**
* Default constructor.
*
* @param stack the stack where to open the effects lists
*/
public EffectGroupCell(final JFXDrawersStack stack) {
this(DEFAULT_NAME, stack);
}
/**
* Constructor.
*
* @param monitor the graphical {@link it.unibo.alchemist.boundary.interfaces.OutputMonitor}
* @param stack the stack where to open the effects lists
*/
public EffectGroupCell(final @Nullable FXOutputMonitor<?, ?> monitor, final JFXDrawersStack stack) {
this(stack);
setupDisplayMonitor(monitor);
}
/**
* Constructor.
*
* @param groupName the name of the EffectGroup
* @param stack the stack where to open the effects lists
*/
@SuppressFBWarnings("EI_EXPOSE_REP2")
public EffectGroupCell(final String groupName, final JFXDrawersStack stack) {
super(DataFormatFactory.getDataFormat(EffectGroup.class), new Label(groupName), new JFXToggleButton());
this.stack = stack;
setupLabel(getLabel(), (observable, oldValue, newValue) -> this.getItem().setName(newValue));
setupToggle(getToggle(), (observable, oldValue, newValue) -> this.getItem().setVisibility(newValue));
initDrawer();
this.getPane().setOnMouseClicked(event -> {
if (event.getButton() == MouseButton.PRIMARY) {
// Drawer size is modified every time it's opened
if (effectDrawer.isClosing() || effectDrawer.isClosed()) {
effectDrawer.setDefaultDrawerSize(stack.getWidth());
}
this.stack.toggle(effectDrawer);
if (effectDrawer.isOpened() || effectDrawer.isOpening()) {
this.stack.setContent(new JFXDrawer());
}
}
});
final ContextMenu menu = new ContextMenu();
final MenuItem rename = new MenuItem(getStringRes("menu_item_rename"));
rename.setOnAction(event -> {
if (getItem() != null) {
rename(
getStringRes("rename_group_dialog_title"),
getStringRes("rename_group_dialog_msg"),
null,
getLabel().textProperty()
);
}
event.consume();
});
final MenuItem delete = new MenuItem(getStringRes("menu_item_delete"));
delete.setOnAction(event -> {
removeItself();
event.consume();
});
menu.getItems().addAll(rename, delete);
this.setContextMenu(menu);
}
/**
* Constructor.
*
* @param monitor the graphical {@link it.unibo.alchemist.boundary.interfaces.OutputMonitor}
* @param groupName the name of the EffectGroup
* @param stack the stack where to open the effects lists
*/
public EffectGroupCell(
final @Nullable FXOutputMonitor<?, ?> monitor,
final String groupName,
final JFXDrawersStack stack
) {
this(groupName, stack);
setupDisplayMonitor(monitor);
}
/**
* Configures the graphical {@link it.unibo.alchemist.boundary.interfaces.OutputMonitor}.
*
* @param monitor the graphical {@link it.unibo.alchemist.boundary.interfaces.OutputMonitor}
*/
private void setupDisplayMonitor(final @Nullable FXOutputMonitor<?, ?> monitor) {
setDisplayMonitor(monitor);
getToggle().selectedProperty().addListener((observable, oldValue, newValue) ->
this.getDisplayMonitor().ifPresent(d -> {
if (!oldValue.equals(newValue)) {
d.repaint();
}
})
);
}
/**
* Initializes a new side {@link JFXDrawer drawer} that represents the
* {@link EffectGroup} contained in this {@code Cell} and let the user edit
* it.
*/
private void initDrawer() {
effectDrawer = new JFXDrawer();
effectDrawer.setDirection(JFXDrawer.DrawerDirection.LEFT);
if (getDisplayMonitor().isPresent()) {
effectBarController = new EffectBarController<>(
getDisplayMonitor().get(),
this,
this.stack,
this.effectDrawer
);
} else {
effectBarController = new EffectBarController<>(this, this.stack, this.effectDrawer);
}
try {
effectDrawer.setSidePane(
FXResourceLoader.getLayout(
effectBarController,
EffectBarController.EFFECT_BAR_LAYOUT
)
);
} catch (final IOException e) {
throw new IllegalStateException("Could not initialize side pane for effects", e);
}
effectBarController.groupNameProperty().bindBidirectional(this.getLabel().textProperty());
effectDrawer.setOverLayVisible(false);
effectDrawer.setResizableOnDrag(false);
}
/**
* Returns the label with the effect name.
*
* @return the label
*/
protected final Label getLabel() {
return (Label) super.getInjectedNodeAt(0);
}
/**
* Returns the toggle of the visibility.
*
* @return the toggle
*/
protected final JFXToggleButton getToggle() {
return (JFXToggleButton) super.getInjectedNodeAt(1);
}
/**
* {@inheritDoc}
* <p>
* The side drawer opened by this cell is also rebuilt.
*/
@Override
protected void updateItem(final EffectGroup<P> item, final boolean empty) {
super.updateItem(item, empty);
if (empty || item == null) {
setGraphic(null);
} else {
this.getLabel().setText(item.getName());
this.getToggle().setSelected(item.isVisible());
initDrawer();
item.forEach(effectBarController::addEffectToGroup);
}
}
}
|
Sequential Indirect Dual Immunohistochemistry with Primary Rabbit Antibodies on Cochlear Sections Using an Intermediate HeatDenaturation Step Advanced immunohistochemical (IHC) protocols aim to visualize different molecules in situ simultaneously. These techniques are of utmost importance as a first step in studying possible interactions of proteins at the subcellular level. Colocalized stains in tissue sections indicate proximity of two proteins of interest. Frequently, double staining protocols are restricted by the lack of primary antibodies generated in different animal species for indirect IHC visualization. Here, we present a detailed protocol for mouse inner ear tissue using two different primary rabbit antibodies directed against transmembrane ion channel proteins of cochlear neurons. The two antibodies are combined for fluorescence (confocal) as well as dual multiplex colorimetric visualization in two sequential single IHC stainings. A heatdenaturation step is performed in between. Primary antibody specificity is tested by preadsorption with the immunogenic peptide, and positive and negative tissue controls are performed to confirm the reliability of the antibody detection. We describe the whole procedure in detail beginning with tissue extraction of the mouse inner ear and continuing with chemical fixation, cryoembedding, and preparation for manual and fully automated immunostaining, including steps for heatinduced antigen retrieval. The potential to use antibodies from the same host species for single and double IHC staining opens up multiple possibilities for detecting different targets in the same tissue section using resources and materials that are widely available. © 2021 The Authors. Current Protocols published by Wiley Periodicals LLC. INTRODUCTION Double and multiple immunostaining procedures are limited by the lack of available primary antibodies raised in different animal species. Previous studies have demonstrated various sequential staining protocols based on directly conjugated antibodies. Strategies such as blocking with serum from the species in which the antibodies were raised (Lewis Carl, Gillete-Ferguson, & Ferguson, 1993;Owen, Hakkinen, Wu, & Larjava, 2010;Shindler & Roth, 1996;Tornehave, Hougaard, & Larsson, 2000) or heat denaturation of the antibodies from the first immunostaining using a microwave oven have also been reported (Lan, Mu, Nikolic-Paterson, & Atkins, 1995;). Here, we present a double staining protocol based on this intermediate step of heat-induced protein denaturation. After the first indirect immunostaining is performed, sections are covered with buffer and heated. The denaturation temperature depends on the antibody isotype. Our protocol is designed for use with the IgG isotype because it is frequently used for immunohistochemistry, and uses a temperature of 65°C that is suitable for this isotype (Akazawa-Ogawa, Nagai, & Hagihara, 2018). We perform protein denaturation for 8 min at 81°C to ensure the complete denaturation of all IgG domains. The main advantages of the protocols presented here, as compared to previous ones, are the lower expenditures of time, costs, and laboratory equipment that are needed. No reagents for direct antibody conjugation or additional blocking sera are required; moreover, the heatdenaturation step is applied for only 8 min between the two sequential stainings, saving time compared with primary antibody blocking procedures, which can be very time consuming. This study presents both an automated double staining protocol using multiplex colorimetric chromophores with an automated slide stainer (Roche ®, Ventana ® Discovery) and a manual protocol using fluorescent antibodies. Inner ear tissue was used for both protocols, which sets high demands for tissue adherence to the slide. We describe how to extract, fix, decalcify, and embed the inner ear from mouse-which houses the vestibular system and the cochlea, the organ responsible for sound detection in mammals that includes the sensory epithelia and the spiral ganglion neurons (SGNs)-and include a detailed description of all the necessary steps. Finally, we present an example of the immunohistochemical procedure using antibodies localizing to two hyperpolarization-activated cyclic nucleotide-gated (HCN) channels in the neuronal membrane, HCN2 and HCN4 (). TISSUE PREPARATION, CRYOEMBEDDING, AND SECTIONING This protocol describes the extraction and postmortem perfusing fixation of the inner ear in mice. Before working with animals, appropriate ethical approvals may be required. After whole inner ears are extracted, natural openings as well as additional holes in the otic capsule allow perfusion of fixative through the fluid compartments to enable proper fixation. A subsequent ethylenediaminetetraacetic acid (EDTA)-based decalcification of the bony tissue enables proper sectioning of the samples with a cryostat. Bone removal is accelerated with a rapid microwave histoprocessor. Once the bone has been decalcified, samples are cryoembedded and cut at 5-to 10-m thickness on a cryostat. The mouse strain we selected to use in this protocol is CBA/J, which is commonly used in auditory research because of its relatively good hearing performance with age (). The inner ear extraction and postmortem fixation are critical steps for tissue preservation. Conservation of the 3D protein structure and especially the antibody epitopes in the cochlear tissue is important to obtain better results in immunostaining. We used young adult mice aged 21 days here because older mice presented lower staining intensities with these antibodies (). Materials CBA/J strain mice, 21 days old (JAX no. 000656; Charles River) 4% (w/v) paraformaldehyde (formalin, PFA; see recipe) 0.1 M phosphate-buffered saline (PBS; see recipe) 1 g/L Na + azide in 0. 2. Cut off the head and remove the skin after making an incision along the sagittal suture from dorsal to lateral. 3. Cut the skull with sharp scissors in the medial plane sagittally, and carefully remove the two halves of the brain with a small spoon. 4. Extract the right and left inner ears, located on each side of the skull. The vestibule will be extracted together with the cochlea and a small part of the cerebellum during the inner ear removal. These tissues will be present on cochlear sections and may be used as positive control tissue for the immunostaining if applicable. 5. Penetrate the round window with fine forceps and remove the stapes (oval window). 6. Make a small hole in the apical turn with fine forceps, close to the helicotrema. 7. Using a disposable 1-ml Pasteur pipet, gently perfuse ice-cold 4% PFA through the openings created in steps 5 and 6 to ensure that all perilymphatic compartments are flushed with fixative solution (Fig. 1). 8. Transfer the specimens in 4% PFA to 5-ml glass vials with plastic lids and keep them overnight (16-18 hr) at 4°C with constant movement on a horizontal shaker set at 300 rpm. 9. Rinse the specimens five times for 5 min each time with 0.1 M PBS while agitating them gently on a circular rotator (Stuart Tube Rotator SB2, 20 rpm). Figure 1 Inner ear fixation. After the inner ear is extracted from the mouse, fixation with 4% paraformaldehyde (PFA) is performed for 16-18 hr at 4°C. The 4% PFA is perfused through the cochlea via three openings of the otic capsule: the round and oval windows as well as a small puncture in the apical turn close to the helicotrema that are opened without damaging the sensorineural tissue. Subsequently, the fixative is gently perfused with a small pipet through each opening. Always maintain the samples in 0.1 M PBS to prevent drying of the tissue. 11. Place the cassettes into the cassette holder. The cassette holder attaches to a magnetic stirrer to allow agitation of the EDTA solution added in the next step (Fig. 2B). Using multi-compartment cassettes can increase the number of inner ears that can be decalcified in one run. 12. Transfer the cassette holder into a beaker without a spout and fill the beaker up to 200 ml with 20% (w/v) EDTA in 0.1 M PBS, pH 7.2-7.4. 13. Cover the beaker with a lid and place it into a microwave support ( Fig. 2C and D). 14. Transfer the microwave support with the samples into the microwave (Fig. 2E). Irradiate the samples at 800 W microwave power with stirring for 220 min at 37°C to decalcify the inner ears (Fig. 2F). TM compound has a low viscosity. In later steps, the tissue will be frozen, which would cause water inside the tissue to freeze and expands when transformed to ice; cryopreservatives such as sucrose adhere to tissue structures to diminish local ice crystal formation and thereby improve cellular preservation. The cryoembedding protocol is adapted from previous studies (Coleman, Rickard, de Silva, & Shepherd, 2009 To manipulate the tissue and move it between containers, use a 5-ml pipet. As the bone is decalcified, the tissue will become susceptible to mechanical damage during handling. Cut off the tip of a 5-ml disposable Pasteur pipet and gently suck up the ear to transfer it between molds without touching it with any instrument. 23. Place the inner ear inside the mold. Use the stereomicroscope to orient the cochlea appropriately. The selected orientation depends on what the researcher wants to study; the two most common orientations for sectioning are parallel to the midmodiolar and horizontal plane (Fig. 3). In the "midmodiolar orientation," the ear is placed with the oval window facing the base of the mold and the round window facing up ( Fig. 3A and 3B). For the "horizontal orientation," the vestibule is instead positioned towards the upper part of the mold and the cochlea on the base ( Fig. 3C-E). "Midmodiolar orientation" is useful to study the transition between peripheral and central nervous system. The three cochlear turns can be observed in only one section. "Horizontal orientations" are more useful to study and count hair cells and investigate sensory innervation. 24. Fill up the mold containing the oriented cochlea completely with O.C.T. TM. Pour the medium down slowly inside the mold to avoid changing the position of the cochlea and transfer it into the slurry mix prepared in step 21. The sample will be frozen within seconds. of 18 Current Protocols CAUTION: Dry ice is toxic when inhaled, so this embedding protocol must be performed under a fume hood. The alcoholic slurry improves thermal conductivity and accelerates freezing compared to gas-phase-mediated freezing. 25. After 1 min, the samples will be completely frozen. Place the O.C.T. TM blocks containing the ears on dry ice for 20 min to allow the adhesive alcohol to dry. When several tissue blocks are embedded at once, it is necessary to dry them (remove the remaining ethanol) for storage at −20°C or −80°C. The blocks are processed with a commercial vacuum sealer to prevent humidity loss through sublimation. Avoiding freezer burns by storing specimen blocks in evacuated and sealed plastic bags ensures good consistency for cryosectioning over longer periods. Cryosectioning 26. Section the samples with a cryomicrotome. For inner ear sectioning, the temperature of the chamber is set at −20°C and object temperature at −22°C. When the tissue is frozen at −80°C, leave the specimen blocks inside the cryomicrotome for at least 1 hr to temper until the temperature of the blocks is fully equalized to the chamber temperature (-20°C). When blocks are stored at −20°C, sectioning can be started directly after the microtome reaches the selected temperatures. 27. Collect sections sequentially on Superfrost TM slides until approximately a 25-slide distance from the apex (at 10-m section thickness). Then, start a second column in each slide with sections from the central modiolar region with good presentation of the middle turn. Collect a third column with the basal turn and a fourth and fifth column with the basal hook region of the tonotopic axis. In this case, all the slides present a section from each cochlear turn, apart from the vestibule and the cerebellum. Slides should be stored at −20°C in freezer slides boxes. Leave them at room temperature for 10 min before use. DOUBLE COLORIMETRIC IMMUNOSTAINING WITH AN AUTOMATIC IMMUNOSTAINER This protocol details double colorimetric immunostaining with 3,3 diaminobenzidine (DAB) and Fast Red salt chromophores. Many epitopes require an antigen retrieval before immunostaining is performed. This pretreatment of the sections is needed to make the epitopes accessible for the antibodies especially after aldehyde fixation. After a heat pretreatment in buffer solutions, immunostaining with colorimetric or fluorometric detection techniques are performed. 8. Incubate the primary antibody from the first immunostaining for 1 hr. Use antibodies diluted in Ventana antibody diluent, which contains 0.3% protein in 0.1 M PBS (pH 7.3) and 0.05% ProClin 300 as preservative. Materials The primary antibody used in our study was anti-rabbit HCN2 diluted to 1:3000 in antibody diluent. 100 l of this solution is applied on each slide. As the incubation is performed in LCS, it is necessary to prepare a four times more concentrated stock dilution for the antibody (e.g., 1:750) to reach the desired final dilution on the slide. 10. Incubate the secondary antibody for the first immunostaining for 30 min. The secondary antibody we used was a biotinylated donkey anti-rabbit antibody at a dilution of 1:400. 11. Perform DAB incubation. First, apply blocker D (high-protein salt blocking solution) for 2 min to reduce background staining, and then incubate with the enzyme streptavidin-horse peroxidase for 16 min. Rinse slides four times and then add diaminobenzidine (DAB) D and DAB H 2 O 2 (substrate for the peroxidase) for 8 min. Staining with DAB is performed first because the staining with this chromophore is highly stable in order to survive heating steps and further processing. 12. Heat the slide to 85°C and incubate for 8 min. The primary and secondary antibody complexes will be denatured, but the DAB precipitate will survive this treatment. 13. Rinse the slide with reaction buffer and apply the second primary antibody for the second immunostaining raised in the same species. Incubate for 1 hr. In this case, we apply anti-rabbit HCN4 at a 1:3000 dilution. 14. Incubate the sections for 30 min with the secondary antibody, biotinylated donkey anti-rabbit at a 1:400 dilution. 15. Apply the streptavidin alkaline phosphatase and incubate 30 min. Rinse the slide with reaction buffer and incubate 4 min with Activator R and Naphthol R (substrate for alkaline phosphatase). Apply Fast R and fast R 2 (Fast Red salts) sequentially to the slide, incubating for 8 min each (Fig. 4E). 17. Apply bluing reagent for 2 min to turn hematoxylin staining into blue color. 18. Rinse the slides with reaction buffer and remove them from the immunostainer. 19. Rinse slides with distilled water and soapy water to remove the oily coating applied by the immunostainer. Rinse three more times for at least 1 min each in distilled water. 20. Leave the slides to dry overnight at room temperature, as Fast Red salts are soluble in alcohols (or alternatively use an aqueous mounting medium). 21. Mount slides the next day as follows. First, incubate slides in xylol for 2 min. Let the slides dry for 10 min and mount with Entellan ® mounting medium. Gently apply 4-5 drops of the mounting solution and cover them with coverslips (24 50 mm). Let them dry. It takes at least 24 hr for the mounting medium to dry and the refractive index to change for optimal microscopic imaging. After that point, the slides can be analyzed under the microscope. of 18 Current Protocols DOUBLE MANUAL FLUOROMETRIC IMMUNOSTAINING WITH FLUORESCENCE This protocol details double fluorescence immunostaining with Alexa Fluor ® 488 and Dylight 649 as fluorophores. Antigen retrieval may be also necessary for fluorescent staining. This pretreatment can be performed in a Ventana immunostainer. Some antibodies, such as HCN antibodies, do not require antigen retrieval; Triton X-100 permeabilization on the slide is sufficient for the antibody to access its epitope. 2. Place slides in a humid chamber and introduce wet paper towels into the chamber to generate moisture (Fig. 6A). Materials 3. Place the slides in distilled water inside a staining jar to rehydrate them and remove the cryoembedding medium from the sections. 4. Carefully apply 300-400 l of blocking solution to the areas of the slides marked by the hydrophobic pen, and incubate the slides inside the humid chamber for 1 hr. 5. Prepare dilutions of primary antibody in a suitable solution that also contains some protein to avoid antibody aggregation and a detergent for permeabilization (see recipe for primary antibody solution). Usually, the concentration used for fluorescent staining is roughly double that used for colorimetric staining. The most suitable concentration needs to be tested before for each antibody. 6. Discard the blocking solution. Pipet 300 l of primary antibody dilution onto the slide. Keep overnight inside the humid chamber at 4°C to allow the antibody solution to slowly penetrate the section with a low binding affinity due to the cold temperature. This reduces nonspecific binding of the primary antibody. Avoid allowing the sections to dry during the change of solutions. A preincubation at 4°C will increase the intensity of staining. A preincubation over a weekend is also a possible option for antibodies that present lower signals or for thicker sections. 7. Incubate the primary antibody for 1 hr at room temperature. At room temperature the antibody will bind to the epitope with maximum affinity. For low-intensity signals or "weak" antibodies (with low affinity to epitope), the primary antibody incubation time can be increased up to several hours. 8. Working in the dark, prepare dilutions of secondary antibody in secondary antibody solution. The fluorochromes attached to the secondary antibodies quench when of 18 Current Protocols exposed to light so that the staining signal decreases. Use specific microcentrifuge tubes for fluorescence that protect the antibodies against light. When this is not possible, aluminum foil can be used to wrap standard microcentrifuge tubes to prevent the antibodies from being exposed to light. The primary antibody used in our study was rabbit anti-HCN2 at a 1:500 dilution. 9. Discard primary antibody solution and rinse the slides in 0.1 M PBS three times for 5 min each. 10. Apply secondary antibody dilution and incubate the sections for 2 hr at room temperature in the dark. Alexa Fluor ® 488 secondary antibodies are applied during the first immunostaining as this fluorochrome is very resistant to heat and further processing. The dilution used for this anti-rabbit secondary antibody is 1:2000. 11. Thoroughly rinse the slides five times with 0.1 M PBS for 10 min each time. To decrease background fluorescence, slides may be rinsed in large staining jars with 200 ml buffer each time. This step stabilizes the antibody-fluorochrome complex and is required because the specific antibody bonds are weak and would not be maintained through the later protocol steps. 13. Rinse the slides twice with 0.1 M PBS for 5 min each. 14. Heat the slides in a heating plate for 8 min at 81°C. To avoid allowing the sections to dry out, apply 0.1 M PBS to the slide surface after 5 min ( Fig. 6B and 6C). 15. Let the slide equilibrate to room temperature. Discard the remaining 0.1 M PBS from the slide. 16. Perform a second immunostaining with a second primary antibody raised in the same species as the first primary antibody applied in step 6. The second primary antibody used in our study was rabbit anti-HCN4 at a 1:200 dilution. 17. Repeat steps 6-11 using the antibodies selected for the second immunostaining. The second secondary antibody used in our study was an anti-rabbit DyLight ® 649 at a dilution of 1:500. 18. Rinse the slides in 0.1 M PBS five times for 10 min each. 19. Mount the slides with an aqueous mounting medium such as Vectashield TM with DAPI. Apply two to three drops to each slide, and cover them with 24 50-mm coverslips. 20. Keep the slides at 4°C for 10 min. Seal the coverslips to the slide with nail polish. Store the slides at 4°C until ready to check the slides on the microscope. The nail polish selected should be transparent and without any components that may introduce autofluorescence to the slide. 21. Check the slides under a microscope to assess the staining quality, and proceed to imaging the slides. Slides should be imaged at room temperature. For this purpose, leave the slides at room temperature for at least 10 min before using them. Sample results of HCN2 and HCN4 staining are presented in Figure 7. Double staining with HCN2 and HCN4 showed coexpression of both ion channels in SGNs of mouse tissue (Fig. 7A). Single-channel expression for HCN2 (Fig. 7A1) and HCN4 (Fig. 7A2) located both ion channels in SGNs. High magnification of a neuron specifically showed coexpression of both ion channels in the soma membrane of the SGN (Fig. 7B) To prepare 10 ml, pipet 3 ml NDS and 30 l Triton X-100 in 7 ml of 0.1 M PBS. Cut off the tip of the pipet before adding Triton X-100, which is a highly viscous detergent, so a bigger opening of the pipet tip facilitate its addition to the sample. Prepare solution fresh every time as needed. M PBS: To prepare 1 l, dilute 100 ml of 1 M PBS in 900 ml distilled water. Store at 4°C for 2-3 weeks. For longer periods, check the pH and check that no fungi have grown inside. PBS + Na + azide Dissolve 1 g/L Na + azide in 1 L distilled water. This solution should be stored at 4°C for longer periods. Paraformaldehyde (PFA), 4% To prepare 1 l of solution, dissolve 40 g paraformaldehyde in 600 ml distilled water. Add 4-6 pearls of solid NaOH and stir while heating until the solution reaches 60°C. Stop the heating and wait until it reaches room temperature. Filter the solution with filter paper and a funnel. Add 24.37 g/L NaH 2 PO 4 2H 2 O. Adjust the pH to between 7.2 and 7.4 with NaOH and fill up to 1 l with distilled water. Background Information Different approaches have been reported for performing double stainings with two antibodies raised in the same species, specially using fluorescence antibodies. Strategies such as the use of direct conjugated primary antibodies are frequently employed (Mao & Mullins, 2010). In this case, the first immunostaining can be performed along with the incubation with the primary antibody and detection with a fluorochrome-labeled secondary antibody. After blocking the sections with serum derived from the species in which the secondary antibody is raised, the directly conjugated primary fluorochrome complex is applied (). Indirect methods including separate primary and secondary antibody incubations are preferred, however, because the direct methods have been demonstrated to have lower antibody sensitivities (Im, Mareninov, Diaz, & Yong, 2019). Another approach is to block the sections after the first indirect immunostaining for 3 hr with normal serum derived from the same host species as the primary antibodies (Ansorg, Bornkessel, Witte, & Urbach, 2015;Lewis Orbach ). A final option is to apply denaturation treatments using a microwave, as we have done here (). The main advantages of our technique compared to previous ones are the shorter timeframe and lack of special reagents or materials. Fixation time and temperature The staining intensity obtained depends on the fixative and the duration and temperature of fixation. Improper fixation of the specimen results can decrease the quality of the tissue considerably. Longer fixation times reduce staining intensity because more epitopes are covered by aldehyde-mediated crosslinks. We found the best conditions to be overnight fixation (16-18 hr) at 4°C, and 4% PFA proved to provide the best compromise between slowing down autolysis and allowing tissue penetration of the fixative. Shorter fixation times (such as 1-2 hr) at room temperature could also be used with similar intensities of staining, but different antibodies need to be tested to find the best conditions for each. Movement and perfusion While samples are being fixed with 4% PFA or incubated with sucrose and O.C.T. TM, it is important to agitate the tissue to facilitate penetration, independently of the temperature. Higher temperatures will always accelerate the process, but agitation of the samples is very beneficial. Other pretreatment options Depending on the antibody used and the antigen involved, different protocols for slide pretreatment can be used, and these are critical for the immunostaining results. Other options besides those detailed in the protocols here include the following. Citrate buffer. Some antibodies performed better after the slide was heated (steps 5 and 6, Basic Protocol 2) while being incubated with citrate buffer (CC2m). pH 6 is slightly acidic. Heat pretreatment with Tris-EDTA buffer, pH 9, using an autoclave. After the sections are fixed onto the slide (step 1, Basic Protocol 2), slides are placed in a slide-staining jar (75 25 mm) with 70 ml EDTA buffer and covered with a glass lid. The jar is then placed inside the autoclave and the slides are incubated for 50 min at 1 bar (the maximum temperature applied is 121°C for 20 min). The sections should be allowed to cool down inside the autoclave for 90 min before immunostaining is begun. Longer pretreatment. The pretreatment may be lengthened by increasing the number of heating cycles. Increasing the antigen retrieval time elicits the detachment of tissue from the slide and a decrease in tissue preservation. It is important to find a good compromise between high staining intensity and conservation of tissue sections. Positive and negative controls In both immunostaining protocols, negative and positive controls need to be carried out in parallel with the double staining. These controls are summarized in Tables 1 (controls performed for Basic Protocol 2) and 2 (controls performed for Basic Protocol 3). The antibodies used in these protocols were previously described, and positive and Low signal even at high antibody concentrations Try different antigen retrieval protocols described here (Critical Parameters, section on pretreatment). This usually uncovers the epitope and yields higher staining signal. Each protocol needs to be tested due to possible nonspecific binding of the antibody. Longer incubations with the primary and secondary antibodies may also be performed. For fluorescence IHC, incubation with the primary antibody for 48-72 hr at 4°C and 2 hr at room temperature are suitable. In colorimet-ric staining, incubation times can also be prolonged, but need to be tested for each antibody. Signal from the first DAB staining is lost or reduced due to the secondary immunostaining; post-fixative step 30 min If the intensity of the staining from the first antibody used decreases with colorimetric staining, a fixation step can be performed between the two immunostaining steps. For HCN2-HCN4, this was not necessary because the staining precipitates adhered well within the delicate cytoskeleton meshwork of the neurons, but other combinations may require a "fixative meshwork" to retain DAB stain. A fixation step with 4% PFA for 30 min better preserves the staining with the DAB chromophore. Nonspecific background in the sections In colorimetric IHCs, a blocking step before the primary antibody incubation may be added to the protocol. Blocking with up to 2% (w/v) bovine serum albumin gave good results. Other commercially available blockers may be applied. Understanding Results It is important to validate the specificity of the staining after each run. Positive control staining should be carried out in parallel with the experimental staining to confirm the specificity of the antibodies and exclude the presence of cross-reactivity between different proteins on the sections. To test the specificity of the primary antibody staining, a preabsorption of specific binding sites of the antibody with the peptide that was used to generate it (immunogenic peptide) can be performed (1 hr at 37°C with movement). The primary antibody without the control peptide should be diluted to the same volume and incubated in parallel. Finally, cochlear sections can be incubated with the primary antibody with and without previous immunogenic peptide incubation. If the staining is specific, no signal should be detected when the staining is performed with the antibody-control peptide complex because the variable sites of the antibodies should be saturated with the control peptide. Secondary antibody specificity is checked in each experiment using a slide incubated without the primary antibody. No staining should be observed on this control slide. Time Considerations See Figure 8 for a summary of the timing for different steps of the three protocols. Preparing the tissue to perform the im-munohistochemical protocols takes 6 days. After days 1, 2, and 3, the specimens may be stored in 0.1 M PBS with Na + azide until needed. The first protocol with colorimetric staining is performed in 1 day, and results may be checked the same day. The staining protocol with fluorescence secondary antibodies takes longer as it depends on the primary antibody incubation time that is different for each antibody. In total, for the colorimetric staining the protocol will take 7 days, whereas at least 8-9 days are needed for the manual fluorescence immunostaining. Times may be shortened at some steps: e.g., the day of cryosectioning could be the first day of the manual immunofluorescence, or cryosectioning could be performed after the blocks are dried from the embedding. |
def renew(self, cfgstr=None, product=None):
from ubelt import util_time
products = self._rectify_products(product)
certificate = {
'timestamp': util_time.timestamp(),
'product': products,
}
if products is not None:
if not all(map(exists, products)):
raise IOError(
'The stamped product must exist: {}'.format(products))
product_hash = self._product_file_hash(products)
certificate['product_file_hash'] = product_hash
self.cacher.save(certificate, cfgstr=cfgstr)
return certificate |
<gh_stars>1-10
import * as React from "react";
import Input from "./ui/input/input";
interface IProjectInputProps {
project: string;
handleChange: (key: string, value: string) => void;
projectRef: (element: HTMLInputElement) => void;
}
interface IProjectInputState {
error: string;
}
export class Project extends React.Component<IProjectInputProps, IProjectInputState> {
constructor(props) {
super(props);
this.state = {
error: null,
};
}
public render() {
return (
<div>
<p className="help-block">
Project Title / Location can be used to help organize your submissions
</p>
<Input
label="Project Title / Location"
value={this.props.project}
error={this.state.error}
required={true}
maxLength={256}
onChange={this._onChange}
inputRef={this.props.projectRef}
/>
</div>
);
}
private _onChange = (e: React.ChangeEvent<HTMLInputElement>) => {
const value = e.target.value;
this._validate(value);
this.props.handleChange("project", value);
}
private _validate = (v: string) => {
let error = null;
if (v.trim() === "") {
error = "The project Title is required";
}
this.setState({ error });
}
}
|
import { combineReducers, configureStore, Reducer } from "@reduxjs/toolkit";
import { createWrapper } from "next-redux-wrapper";
import logger from "redux-logger";
import catsReducer from "./Slices/catSlice";
import { HYDRATE } from "next-redux-wrapper";
const reducer: Reducer = (state, action) => {
if (action.type === HYDRATE) {
return { ...state, ...action.payload };
}
return combineReducers({
catsReducer,
})(state, action);
};
const makeStore = () =>
configureStore({
reducer,
middleware: (getDefaultMiddleware) => getDefaultMiddleware().concat(logger),
devTools: process.env.NODE_ENV !== "production",
});
export const wrapper = createWrapper(makeStore, {
debug: process.env.NODE_ENV !== "production",
});
export type RootState = ReturnType<typeof reducer>;
|
Georgia Tech B-back KirVonte Benson was injured in loss to the South Florida Bulls Sept. 8, 2018, in Tampa.
Georgia Tech B-back KirVonte Benson is out for the season with a knee injury, coach Paul Johnson said Tuesday at his weekly news conference. Benson suffered the injury in Tech’s 49-38 loss to South Florida on Saturday.
Benson was an All-ACC selection last season after rushing for 1,053 yards in his first season as a starter. Benson, a junior, could apply for a medical hardship waiver and receive an extra season of eligibility in 2020.
Johnson said that Benson will have surgery next week. He said it was not necessarily a tear of the ACL. There was hope for another productive season, recognized in his being named to the watch lists for the Doak Walker Award (top running back) and the Maxwell Award (player of the year).
Benson tore his ACL in his final season at Marietta High School. Benson was a surprise last season, taking over for the No. 1 job after Dedrick Mills was dismissed from the team. Despite never having played a snap at B-back as a redshirt freshman, Benson collected five 100-yard games last season, showing power to break tackles with speed and agility to bounce runs to the outside for big gains.
Redshirt freshman Jordan Mason will most likely be elevated into the starting position with Jerry Howard as his backup. Mason was the third-string B-back going into the preseason behind Benson and Howard but moved past Howard with strong play in camp. Johnson said that freshman Christian Malloy may also play as the third-string B-back, depending on the circumstances.
“Well, I said at the start that we had depth there and we’re going to find out,” Johnson said.
The Yellow Jackets open their ACC slate at 12:15 p.m. Saturday at Pittsburgh.
Mason has played well in two games, having gained 180 yards with a touchdown on 24 carries. He started the season opener against Alcorn State when Benson was held out for the first quarter for a violation of team rules and then played most of the final three quarters against USF after Benson’s injury.
Howard gained considerable experience last season as a freshman, playing nine games and rushing 23 times for 175 yards as the backup to Benson.
Benson appeared to suffer the injury on his fifth and final carry of the USF game. Benson took a pitch from quarterback TaQuon Marshall and then stepped awkwardly with his left foot as he ran upfield. He underwent an MRI Monday, with the results returned Tuesday morning. |
package sparkengine.plan.model.builder;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import sparkengine.plan.model.component.Component;
import sparkengine.plan.model.component.catalog.ComponentCatalog;
import sparkengine.plan.model.component.catalog.ComponentCatalogException;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Optional;
class ModelFactoryTest {
@Test
void testYaml() throws IOException, ComponentCatalogException, ModelFormatException {
// given
File yamlSource = new File("src/test/resources/components.yaml");
ComponentCatalog catalog = ModelFactory.readComponentCatalogFromYaml(() -> new FileInputStream(yamlSource));
// when
Optional<Component> sourceComponent = catalog.lookup("tx");
// then
Assertions.assertNotNull(sourceComponent);
Assertions.assertTrue(sourceComponent.isPresent());
}
} |
def generate(passphrase, compressed = True, coin = coins.Bitcoin):
address = Address.generate(compressed, coin)
return EncryptedAddress.encrypt_address(address, passphrase, compressed) |
A study of the relationship between susceptibility to skin stinging and skin irritation In an evaluation of the safety of new chemicals, of products containing them, or of novel formulations of existing chemicals which may come into contact with the skin, it is important to incorporate an assessment of specially susceptible subpopulations. Such a group is represented by those who are more likely to experience sensory effects such as stinging. Since these individuals are easily and rapidly identifiable, we investigated whether they represented a group who were also more susceptible to the effects of an irritant. The primary purpose was to discover whether stingersmight represent an easily and rapidly identifiable subpopulation with a more generally increased tendency to give skin responses. The response to a 0.3% sodium dodecyl sulphate patch test was assessed in a group of 25 stingersand compared to the response in 25nonstingers. There was no difference in either the pattern or strength of the irritant response assessed by subjective erythema and dryness scores. Thus the data suggest that there is no correlation between the susceptibility of an individual to a skin stinging response and an irritation reaction. |
// Boost.Geometry (aka GGL, Generic Geometry Library)
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
// This file was modified by Oracle on 2013, 2014, 2015, 2017, 2018.
// Modifications copyright (c) 2013-2018 Oracle and/or its affiliates.
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
// Use, modification and distribution is subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_GET_TURN_INFO_HELPERS_HPP
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_GET_TURN_INFO_HELPERS_HPP
#include <boost/geometry/algorithms/detail/direction_code.hpp>
#include <boost/geometry/algorithms/detail/overlay/turn_info.hpp>
#include <boost/geometry/algorithms/detail/recalculate.hpp>
#include <boost/geometry/core/assert.hpp>
#include <boost/geometry/geometries/segment.hpp> // referring_segment
#include <boost/geometry/policies/relate/direction.hpp>
#include <boost/geometry/policies/relate/intersection_points.hpp>
#include <boost/geometry/policies/relate/tupled.hpp>
#include <boost/geometry/policies/robustness/no_rescale_policy.hpp>
#include <boost/geometry/strategies/intersection_result.hpp>
namespace boost { namespace geometry {
#ifndef DOXYGEN_NO_DETAIL
namespace detail { namespace overlay {
enum turn_position { position_middle, position_front, position_back };
template <typename Point, typename SegmentRatio>
struct turn_operation_linear
: public turn_operation<Point, SegmentRatio>
{
turn_operation_linear()
: position(position_middle)
, is_collinear(false)
{}
turn_position position;
bool is_collinear; // valid only for Linear geometry
};
template
<
typename TurnPointCSTag,
typename UniqueSubRange1,
typename UniqueSubRange2,
typename SideStrategy
>
struct side_calculator
{
typedef typename UniqueSubRange1::point_type point1_type;
typedef typename UniqueSubRange2::point_type point2_type;
inline side_calculator(UniqueSubRange1 const& range_p,
UniqueSubRange2 const& range_q,
SideStrategy const& side_strategy)
: m_side_strategy(side_strategy)
, m_range_p(range_p)
, m_range_q(range_q)
{}
inline int pk_wrt_p1() const { return m_side_strategy.apply(get_pi(), get_pj(), get_pk()); }
inline int pk_wrt_q1() const { return m_side_strategy.apply(get_qi(), get_qj(), get_pk()); }
inline int qk_wrt_p1() const { return m_side_strategy.apply(get_pi(), get_pj(), get_qk()); }
inline int qk_wrt_q1() const { return m_side_strategy.apply(get_qi(), get_qj(), get_qk()); }
inline int pk_wrt_q2() const { return m_side_strategy.apply(get_qj(), get_qk(), get_pk()); }
inline int qk_wrt_p2() const { return m_side_strategy.apply(get_pj(), get_pk(), get_qk()); }
// Necessary when rescaling turns off:
inline int qj_wrt_p1() const { return m_side_strategy.apply(get_pi(), get_pj(), get_qj()); }
inline int qj_wrt_p2() const { return m_side_strategy.apply(get_pj(), get_pk(), get_qj()); }
inline int pj_wrt_q1() const { return m_side_strategy.apply(get_qi(), get_qj(), get_pj()); }
inline int pj_wrt_q2() const { return m_side_strategy.apply(get_qj(), get_qk(), get_pj()); }
inline point1_type const& get_pi() const { return m_range_p.at(0); }
inline point1_type const& get_pj() const { return m_range_p.at(1); }
inline point1_type const& get_pk() const { return m_range_p.at(2); }
inline point2_type const& get_qi() const { return m_range_q.at(0); }
inline point2_type const& get_qj() const { return m_range_q.at(1); }
inline point2_type const& get_qk() const { return m_range_q.at(2); }
// Used side-strategy, owned by the calculator,
// created from .get_side_strategy()
SideStrategy m_side_strategy;
// Used ranges - owned by get_turns or (for robust points) by intersection_info_base
UniqueSubRange1 const& m_range_p;
UniqueSubRange2 const& m_range_q;
};
template<typename Point, typename UniqueSubRange, typename RobustPolicy>
struct robust_subrange_adapter
{
typedef Point point_type;
robust_subrange_adapter(UniqueSubRange const& unique_sub_range,
Point const& robust_point_i, Point const& robust_point_j,
RobustPolicy const& robust_policy)
: m_unique_sub_range(unique_sub_range)
, m_robust_policy(robust_policy)
, m_robust_point_i(robust_point_i)
, m_robust_point_j(robust_point_j)
, m_k_retrieved(false)
{}
std::size_t size() const { return m_unique_sub_range.size(); }
//! Get precalculated point
Point const& at(std::size_t index) const
{
BOOST_GEOMETRY_ASSERT(index < size());
switch (index)
{
case 0 : return m_robust_point_i;
case 1 : return m_robust_point_j;
case 2 : return get_point_k();
default : return m_robust_point_i;
}
}
private :
Point const& get_point_k() const
{
if (! m_k_retrieved)
{
geometry::recalculate(m_robust_point_k, m_unique_sub_range.at(2), m_robust_policy);
m_k_retrieved = true;
}
return m_robust_point_k;
}
UniqueSubRange const& m_unique_sub_range;
RobustPolicy const& m_robust_policy;
Point const& m_robust_point_i;
Point const& m_robust_point_j;
mutable Point m_robust_point_k;
mutable bool m_k_retrieved;
};
template
<
typename UniqueSubRange1, typename UniqueSubRange2,
typename RobustPolicy
>
struct robust_points
{
typedef typename geometry::robust_point_type
<
typename UniqueSubRange1::point_type, RobustPolicy
>::type robust_point1_type;
typedef robust_point1_type robust_point2_type;
inline robust_points(UniqueSubRange1 const& range_p,
UniqueSubRange2 const& range_q,
RobustPolicy const& robust_policy)
: m_robust_policy(robust_policy)
, m_range_p(range_p)
, m_range_q(range_q)
, m_pk_retrieved(false)
, m_qk_retrieved(false)
{
// Calculate pi,pj and qi,qj which are almost always necessary
// But don't calculate pk/qk yet, which is retrieved (taking
// more time) and not always necessary.
geometry::recalculate(m_rpi, range_p.at(0), robust_policy);
geometry::recalculate(m_rpj, range_p.at(1), robust_policy);
geometry::recalculate(m_rqi, range_q.at(0), robust_policy);
geometry::recalculate(m_rqj, range_q.at(1), robust_policy);
}
inline robust_point1_type const& get_rpk() const
{
if (! m_pk_retrieved)
{
geometry::recalculate(m_rpk, m_range_p.at(2), m_robust_policy);
m_pk_retrieved = true;
}
return m_rpk;
}
inline robust_point2_type const& get_rqk() const
{
if (! m_qk_retrieved)
{
geometry::recalculate(m_rqk, m_range_q.at(2), m_robust_policy);
m_qk_retrieved = true;
}
return m_rqk;
}
robust_point1_type m_rpi, m_rpj;
robust_point2_type m_rqi, m_rqj;
private :
RobustPolicy const& m_robust_policy;
UniqueSubRange1 const& m_range_p;
UniqueSubRange2 const& m_range_q;
// On retrieval
mutable robust_point1_type m_rpk;
mutable robust_point2_type m_rqk;
mutable bool m_pk_retrieved;
mutable bool m_qk_retrieved;
};
template
<
typename UniqueSubRange1, typename UniqueSubRange2,
typename TurnPoint, typename IntersectionStrategy, typename RobustPolicy>
class intersection_info_base
: private robust_points<UniqueSubRange1, UniqueSubRange2, RobustPolicy>
{
typedef robust_points<UniqueSubRange1, UniqueSubRange2, RobustPolicy> base;
public:
typedef typename base::robust_point1_type robust_point1_type;
typedef typename base::robust_point2_type robust_point2_type;
typedef robust_subrange_adapter<robust_point1_type, UniqueSubRange1, RobustPolicy> robust_subrange1;
typedef robust_subrange_adapter<robust_point2_type, UniqueSubRange2, RobustPolicy> robust_subrange2;
typedef typename cs_tag<TurnPoint>::type cs_tag;
typedef typename IntersectionStrategy::side_strategy_type side_strategy_type;
typedef side_calculator<cs_tag, robust_subrange1, robust_subrange2,
side_strategy_type> side_calculator_type;
typedef side_calculator
<
cs_tag, robust_subrange2, robust_subrange1,
side_strategy_type
> robust_swapped_side_calculator_type;
intersection_info_base(UniqueSubRange1 const& range_p,
UniqueSubRange2 const& range_q,
IntersectionStrategy const& intersection_strategy,
RobustPolicy const& robust_policy)
: base(range_p, range_q, robust_policy)
, m_range_p(range_p)
, m_range_q(range_q)
, m_robust_range_p(range_p, base::m_rpi, base::m_rpj, robust_policy)
, m_robust_range_q(range_q, base::m_rqi, base::m_rqj, robust_policy)
, m_side_calc(m_robust_range_p, m_robust_range_q,
intersection_strategy.get_side_strategy())
{}
inline typename UniqueSubRange1::point_type const& pi() const { return m_range_p.at(0); }
inline typename UniqueSubRange2::point_type const& qi() const { return m_range_q.at(0); }
inline robust_point1_type const& rpi() const { return base::m_rpi; }
inline robust_point1_type const& rpj() const { return base::m_rpj; }
inline robust_point1_type const& rpk() const { return base::get_rpk(); }
inline robust_point2_type const& rqi() const { return base::m_rqi; }
inline robust_point2_type const& rqj() const { return base::m_rqj; }
inline robust_point2_type const& rqk() const { return base::get_rqk(); }
inline side_calculator_type const& sides() const { return m_side_calc; }
robust_swapped_side_calculator_type get_swapped_sides() const
{
robust_swapped_side_calculator_type result(
m_robust_range_q, m_robust_range_p,
m_side_calc.m_side_strategy);
return result;
}
// Owned by get_turns
UniqueSubRange1 const& m_range_p;
UniqueSubRange2 const& m_range_q;
private :
// Owned by this class
robust_subrange1 m_robust_range_p;
robust_subrange2 m_robust_range_q;
side_calculator_type m_side_calc;
};
template
<
typename UniqueSubRange1, typename UniqueSubRange2,
typename TurnPoint, typename IntersectionStrategy
>
class intersection_info_base<UniqueSubRange1, UniqueSubRange2,
TurnPoint, IntersectionStrategy, detail::no_rescale_policy>
{
public:
typedef typename UniqueSubRange1::point_type point1_type;
typedef typename UniqueSubRange2::point_type point2_type;
typedef typename UniqueSubRange1::point_type robust_point1_type;
typedef typename UniqueSubRange2::point_type robust_point2_type;
typedef typename cs_tag<TurnPoint>::type cs_tag;
typedef typename IntersectionStrategy::side_strategy_type side_strategy_type;
typedef side_calculator<cs_tag, UniqueSubRange1, UniqueSubRange2, side_strategy_type> side_calculator_type;
typedef side_calculator
<
cs_tag, UniqueSubRange2, UniqueSubRange1,
side_strategy_type
> swapped_side_calculator_type;
intersection_info_base(UniqueSubRange1 const& range_p,
UniqueSubRange2 const& range_q,
IntersectionStrategy const& intersection_strategy,
no_rescale_policy const& /*robust_policy*/)
: m_range_p(range_p)
, m_range_q(range_q)
, m_side_calc(range_p, range_q,
intersection_strategy.get_side_strategy())
{}
inline point1_type const& rpi() const { return m_side_calc.get_pi(); }
inline point1_type const& rpj() const { return m_side_calc.get_pj(); }
inline point1_type const& rpk() const { return m_side_calc.get_pk(); }
inline point2_type const& rqi() const { return m_side_calc.get_qi(); }
inline point2_type const& rqj() const { return m_side_calc.get_qj(); }
inline point2_type const& rqk() const { return m_side_calc.get_qk(); }
inline side_calculator_type const& sides() const { return m_side_calc; }
swapped_side_calculator_type get_swapped_sides() const
{
swapped_side_calculator_type result(
m_range_q, m_range_p,
m_side_calc.m_side_strategy);
return result;
}
protected :
// Owned by get_turns
UniqueSubRange1 const& m_range_p;
UniqueSubRange2 const& m_range_q;
private :
// Owned here, passed by .get_side_strategy()
side_calculator_type m_side_calc;
};
template
<
typename UniqueSubRange1, typename UniqueSubRange2,
typename TurnPoint,
typename IntersectionStrategy,
typename RobustPolicy
>
class intersection_info
: public intersection_info_base<UniqueSubRange1, UniqueSubRange2,
TurnPoint, IntersectionStrategy, RobustPolicy>
{
typedef intersection_info_base<UniqueSubRange1, UniqueSubRange2,
TurnPoint, IntersectionStrategy, RobustPolicy> base;
public:
typedef segment_intersection_points
<
TurnPoint,
typename geometry::segment_ratio_type
<
TurnPoint, RobustPolicy
>::type
> intersection_point_type;
typedef typename UniqueSubRange1::point_type point1_type;
typedef typename UniqueSubRange2::point_type point2_type;
// NOTE: formerly defined in intersection_strategies
typedef policies::relate::segments_tupled
<
policies::relate::segments_intersection_points
<
intersection_point_type
>,
policies::relate::segments_direction
> intersection_policy_type;
typedef IntersectionStrategy intersection_strategy_type;
typedef typename IntersectionStrategy::side_strategy_type side_strategy_type;
typedef model::referring_segment<point1_type const> segment_type1;
typedef model::referring_segment<point2_type const> segment_type2;
typedef typename base::side_calculator_type side_calculator_type;
typedef typename intersection_policy_type::return_type result_type;
typedef typename boost::tuples::element<0, result_type>::type i_info_type; // intersection_info
typedef typename boost::tuples::element<1, result_type>::type d_info_type; // dir_info
intersection_info(UniqueSubRange1 const& range_p,
UniqueSubRange2 const& range_q,
IntersectionStrategy const& intersection_strategy,
RobustPolicy const& robust_policy)
: base(range_p, range_q,
intersection_strategy, robust_policy)
, m_result(intersection_strategy.apply(
segment_type1(range_p.at(0), range_p.at(1)),
segment_type2(range_q.at(0), range_q.at(1)),
intersection_policy_type(),
robust_policy,
base::rpi(), base::rpj(),
base::rqi(), base::rqj()))
, m_intersection_strategy(intersection_strategy)
, m_robust_policy(robust_policy)
{}
inline result_type const& result() const { return m_result; }
inline i_info_type const& i_info() const { return m_result.template get<0>(); }
inline d_info_type const& d_info() const { return m_result.template get<1>(); }
inline side_strategy_type get_side_strategy() const
{
return m_intersection_strategy.get_side_strategy();
}
// TODO: it's more like is_spike_ip_p
inline bool is_spike_p() const
{
if (base::m_range_p.is_last_segment())
{
return false;
}
if (base::sides().pk_wrt_p1() == 0)
{
// p: pi--------pj--------pk
// or: pi----pk==pj
if (! is_ip_j<0>())
{
return false;
}
// TODO: why is q used to determine spike property in p?
bool const has_qk = ! base::m_range_q.is_last_segment();
int const qk_p1 = has_qk ? base::sides().qk_wrt_p1() : 0;
int const qk_p2 = has_qk ? base::sides().qk_wrt_p2() : 0;
if (qk_p1 == -qk_p2)
{
if (qk_p1 == 0)
{
// qk is collinear with both p1 and p2,
// verify if pk goes backwards w.r.t. pi/pj
return direction_code(base::rpi(), base::rpj(), base::rpk()) == -1;
}
// qk is at opposite side of p1/p2, therefore
// p1/p2 (collinear) are opposite and form a spike
return true;
}
}
return false;
}
inline bool is_spike_q() const
{
if (base::m_range_q.is_last_segment())
{
return false;
}
// See comments at is_spike_p
if (base::sides().qk_wrt_q1() == 0)
{
if (! is_ip_j<1>())
{
return false;
}
// TODO: why is p used to determine spike property in q?
bool const has_pk = ! base::m_range_p.is_last_segment();
int const pk_q1 = has_pk ? base::sides().pk_wrt_q1() : 0;
int const pk_q2 = has_pk ? base::sides().pk_wrt_q2() : 0;
if (pk_q1 == -pk_q2)
{
if (pk_q1 == 0)
{
return direction_code(base::rqi(), base::rqj(), base::rqk()) == -1;
}
return true;
}
}
return false;
}
private:
template <std::size_t OpId>
bool is_ip_j() const
{
int arrival = d_info().arrival[OpId];
bool same_dirs = d_info().dir_a == 0 && d_info().dir_b == 0;
if (same_dirs)
{
if (i_info().count == 2)
{
return arrival != -1;
}
else
{
return arrival == 0;
}
}
else
{
return arrival == 1;
}
}
result_type m_result;
IntersectionStrategy const& m_intersection_strategy;
RobustPolicy const& m_robust_policy;
};
}} // namespace detail::overlay
#endif // DOXYGEN_NO_DETAIL
}} // namespace boost::geometry
#endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_GET_TURN_INFO_HELPERS_HPP
|
<reponame>dslab-epfl/state-merging<gh_stars>0
//===-- BitArray.h ----------------------------------------------*- C++ -*-===//
//
// The KLEE Symbolic Virtual Machine
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef KLEE_UTIL_BITARRAY_H
#define KLEE_UTIL_BITARRAY_H
#include <assert.h>
namespace klee {
// XXX would be nice not to have
// two allocations here for allocated
// BitArrays
class BitArray {
private:
uint32_t *bits;
unsigned length;
protected:
static uint32_t lengthForSize(unsigned size) { return (size+31)/32; }
public:
BitArray(unsigned size, bool value = false)
: bits(new uint32_t[lengthForSize(size)]), length(lengthForSize(size)) {
memset(bits, value?0xFF:0, sizeof(*bits)*length);
}
BitArray(const BitArray &b)
: bits(new uint32_t[b.length]), length(b.length) {
memcpy(bits, b.bits, sizeof(*bits) * b.length);
}
BitArray(const BitArray &b, unsigned size)
: bits(new uint32_t[b.length]), length(b.length) {
memcpy(bits, b.bits, sizeof(*bits)*length);
assert(length == lengthForSize(size));
}
const BitArray& operator=(const BitArray &b) {
if (this != &b) {
delete[] bits; bits = new uint32_t[b.length]; length = b.length;
memcpy(bits, b.bits, sizeof(*bits) * length);
}
return *this;
}
~BitArray() { delete[] bits; }
bool get(unsigned idx) const { return (bool) ((bits[idx/32]>>(idx&0x1F))&1); }
void set(unsigned idx) { bits[idx/32] |= 1<<(idx&0x1F); }
void unset(unsigned idx) { bits[idx/32] &= ~(1<<(idx&0x1F)); }
void set(unsigned idx, bool value) { if (value) set(idx); else unset(idx); }
};
} // End klee namespace
#endif
|
/*
* Copyright (c) 2011-2021, The DART development contributors
* All rights reserved.
*
* The list of contributors can be found at:
* https://github.com/dartsim/dart/blob/master/LICENSE
*
* This file is provided under the following "BSD-style" License:
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef DART_COMMON_MEMORYALLOCATOR_HPP_
#define DART_COMMON_MEMORYALLOCATOR_HPP_
#include <cstddef>
#include <iostream>
#include <string>
#include "dart/common/Castable.hpp"
namespace dart::common {
/// Base class for std::allocator compatible allocators.
class MemoryAllocator : public Castable<MemoryAllocator>
{
public:
/// Returns the default memory allocator
static MemoryAllocator& GetDefault();
/// Default constructor
MemoryAllocator() noexcept = default;
/// Destructor
virtual ~MemoryAllocator() = default;
/// Returns type string.
[[nodiscard]] virtual const std::string& getType() const = 0;
/// Allocates @c size bytes of uninitialized storage.
///
/// @param[in] size: The byte size to allocate sotrage for.
/// @return On success, the pointer to the beginning of newly allocated
/// memory.
/// @return On failure, a null pointer
[[nodiscard]] virtual void* allocate(size_t size) noexcept = 0;
// TODO(JS): Make this constexpr once migrated to C++20
template <typename T>
[[nodiscard]] T* allocateAs(size_t n = 1) noexcept;
/// Deallocates the storage referenced by the pointer @c p, which must be a
/// pointer obtained by an earlier cal to allocate().
///
/// @param[in] pointer: Pointer obtained from allocate().
virtual void deallocate(void* pointer, size_t size) = 0;
// TODO(JS): Make this constexpr once migrated to C++20
/// Allocates uninitialized storage and constructs an object of type T to the
/// allocated storage.
///
/// @param[in] args...: The constructor arguments to use.
template <typename T, typename... Args>
[[nodiscard]] T* construct(Args&&... args) noexcept;
template <typename T, typename... Args>
[[nodiscard]] T* constructAt(void* pointer, Args&&... args);
template <typename T, typename... Args>
[[nodiscard]] T* constructAt(T* pointer, Args&&... args);
/// Calls the destructor of the object and deallocate the storage.
template <typename T>
void destroy(T* object) noexcept;
/// Prints state of the memory allocator
virtual void print(std::ostream& os = std::cout, int indent = 0) const;
/// Prints state of the memory allocator
friend std::ostream& operator<<(
std::ostream& os, const MemoryAllocator& allocator);
};
} // namespace dart::common
#include "dart/common/detail/MemoryAllocator-impl.hpp"
#endif // DART_COMMON_MEMORYALLOCATOR_HPP_
|
Understanding the Solution Chemistry of Lead Halide Perovskites Precursors Identifying the composition of the solvated iodoplumbate complexes that are involved in the synthesis of perovskites in different solution environments is of great relevance in order to link the type and quantity of precursors to the final optoelectronic properties of the material. In this paper, we clarify the nature of these species and the involved solution equilibria by combining experimental analysis and high-level theoretical calculations, focusing in particular on the DMSO and DMF solvents, largely employed in the perovskites synthesis. The specific molecular interactions between the iodoplumbate complexes and the solvent molecules were analyzed by identifying the most thermodynamically stable structures in various solvent solutions and characterizing their optical properties trough DFT and TD-DFT calculations. A comparison with the experimental UVvis absorption spectra allows us to define the number of iodide and solvent ligands bonded to the Pb2+ ion and the complex formation constants of the i... |
Jordan Hamlett, left, leaves federal court with his attorney, Michael Fiser, following his guilty plea in Baton Rouge on Dec. 11. (Gerald Herbert/AP)
In September 2016, as the heated presidential election between Hillary Clinton and Donald Trump swung into a final phase, a Louisiana private investigator repeatedly attempted to access the Republican candidate’s tax returns.
According to court documents, Jordan Hamlett used Trump’s Social Security number to apply for federal student aid in hopes of gaining access to the candidate’s tax records. But the breach was detected by federal authorities.
Investigators confronted the 32-year-old Lafayette resident before the November election. At the time, they were unsure whether he was working with hackers or even if Hamlett had discovered the returns — a potential game-changer for the election, according to court records.
Hamlett pleaded guilty in U.S. district court to a charge of misuse of a Social Security number. He faces five years in prison and a $250,000 fine.
According to a plea agreement filed in federal court, Hamlett was unable to access the tax records, a hotly contested issue during the election after Trump declined to release the information, unlike most major party candidates over the past several decades.
Hamlett’s attorney, Michael Fiser, has maintained Hamlett only attempted to access the records “out of sheer curiosity,” the Associated Press reported. Before changing his plea, the defendant had argued in court documents he was simply acting as a “white hat” hacker testing the federal system for vulnerabilities.
“We felt like, under the circumstances, it was time to accept full responsibility and move forward to get closure,” Fiser told the AP after Monday’s guilty plea.
According to the plea agreement, on Sept. 13, Hamlett created an application on the U.S. Department of Education’s Free Application for Federal Student Aid website using Trump’s Social Security number and other information. Part of the process of applying for the financial student aid involved accessing tax records through an Internal Revenue Service Data Retrieval Tool.
“After obtaining the FSA ID, the defendant, using the IRS Data Retrieval Tool, unlawfully attempted to obtain the presidential candidate’s federal tax information from the Internal Revenue Service,” the plea agreement stated. “The defendant made six separate attempts to obtain the federal tax information from IRS servers, but he was unsuccessful.”
Hamlett and his attorneys argued in motions to the court that he was only trying to see if he had discovered a potential crack in the system. In a court filing from earlier this year, his attorney noted Hamlett previously had discovered a flaw in the Livingston Parish Sheriff’s Office website allowing public access to open investigation reports. “Hamlet tipped the Sheriff’s Office to the flaw and was met with thanks and appreciation, not an arrest,” his attorney wrote in a court filing.
On the day he attempted to access Trump’s details, Hamlett claimed he tried to call the IRS to alert them to the student aid application shortcut. “Hamlett abandoned the attempt to notify the IRS when he could not reach a human, only recorded messages,” his attorney wrote.
Federal investigators, however, learned about the potential breach.
At a court hearing in March, Treasury Department Special Agent Samuel Johnson testified investigators were particularly worried Hamlett might be working with Anonymous, the global hacker collective who had promised to release Trump’s tax returns.
“There was thoughts this could be something that would affect the election if the information had been received,” Johnson told the court, according to a transcript of the hearing. “We also were not aware of whether he was working with somebody, or if somebody had hired him to attempt to access President Trump’s tax returns for release, or if he had done it, and he had a plan to sell the information out and distribute the information for some type of purpose.”
On Oct. 27, investigators set up an undercover operation to confront Hamlett. An agent contacted the private investigator posing as a potential client. The two arranged a meeting at a hotel, where investigators then approached Hamlett about accessing the material.
“We advised him that someone had a genius idea to attempt to access President Trump’s tax returns through the financial aid website,” Johnson testified. “At that point, Mr. Hamlett acknowledged that it was him. He was in agreement that it was a genius idea to attempt to get Mr. Trump’s returns through that site.”
Hamlett’s sentencing hearing has yet to be scheduled.
Read the plea agreement
More from Morning Mix:
Bible talk with Jake Tapper leaves Roy Moore’s spokesman speechless
A singer spoke up about sexual harassment in country music. Now she’s being sued.
Men charged in terror plot to kill Muslims want Trump voters on their jury
‘Top Chef’ cuts John Besh from episode due to sexual harassment allegations against him
Judge bars disgraced former House speaker Dennis Hastert from being alone with children |
My speed skating memories haunt me.
Although I have achieved more than the majority of athletes — most with far more talent than I had — I will eternally feel as though I have overpromised and underdelivered in my career. My heart vacillates between bittersweet nostalgia and gratitude as I struggle to define the real meaning of victory. In a sport that is defined by tangible results and races won by thousandths of a second, how do you measure the metaphysical lessons learned from a 24-year career?
My resume includes two Olympic Games, six world championships, and a lifetime’s worth of World Cups — but in comparison to my famous athletic friends, my sporting accomplishments are meagre. I have never won an Olympic medal or a world title. I have tried my hardest and fallen short of a goal, and yet through that longing and pursuit, I have been granted an inalienable clarity on the meaning of life.
I am now faced with untangling the mess of having rock-solid self-belief contrasted with mediocre results. How am I to forgive myself for “what could have been?” I wish I had an answer; I can only offer my ability to be vulnerable and honest.
There were times when my career was tracking in the direction of being the next “great” Canadian sprinter. However, both physical injury and struggles with my mental health derailed that trajectory. I qualified for Vancouver 2010 as a dark horse; a 20-year-old who didn’t know much about life and who could have stood to gain 20 pounds.
I was naïve, and when I realized that the label of being “an Olympian” wasn’t going to cure the internal turmoil I was wrestling with regarding my sexual orientation and the crippling loneliness and shame that accompanied living in the closet, I became riddled with anxiety.
Feeling as though I was hiding my true self, I attached all of my self-worth to my results — further eroding my mental health and my love for sport. My focus shifted from enjoying the process to being solely transfixed by the outcome. Regardless of my placing or time, I would cross the finish line hating myself; knowing full well that the work I had put in, the hours of training, the time at the oval, skating around in a circle was never going to be enough to cure my cancerous lack of self-love.
When I had a good race, my smile didn’t touch my eyes; when I skated poorly, I would rather have been dead. I was looking for external rewards to cure my soul. It was the loneliest feeling in the world. It took years to live outside of the closet. It was an all-encompassing process, and although I am ashamed to admit how much I struggled to live an authentic life, to disregard that internal conflict would be a disservice to anyone struggling to come out. I know it’s 2018, but it is still an arduous process to find the courage to be true to yourself — if you don’t think it is, you need to educate yourself on the statistics regarding LGBTQ youth and suicide rates. For years I flirted with the idea of ending it all.
After years of paralyzing, internalized homophobia, I came out to my parents; my mother replied with tears: “We’re here to love, not judge.” It is — and will always be — the most eloquent thing I have ever heard. I am the humble product of two supportive parents who never pushed me to do anything that I didn’t want to do. Win or lose, they were always there. Ross and Anita Bucsis are two human beings who truly understand that cheering on the efforts of good people always makes the world a better place.
I have independent and confident women like Clara Hughes, Cindy Klassen, and Kristina Groves to guide me through stormy waters. I am blessed to have the Caroline Ouellettes, the Patrick Chans, the Mark Tewksburys, and the Brian Burkes of the world — people who have pulled me aside, hugged me hard, and reaffirmed that “small, bigoted minds never succeed.” All of these people came into my life because of sport.
When I was a kid I wanted to grow up to be Catriona Le May Doan. I failed in reaching that goal.
I didn’t end up winning three Olympic medals, and I have never had Steve Armitage so eloquently catapult my name into Canadian Olympic lore.
But I am truly grateful that I was given the privilege to try, and grateful that I was given the privilege to fail. Through failing, I learned how to succeed.
“Olympism” is not inherent in winning a medal, but in showing the strength and tenacity of the human spirit. Where I once saw sport as something that alienated and disconnected me during my struggles of self-acceptance, I now see it for what it can be: a catalyst to repair the frailty of the human spirit.
Sport shows us that our similarities far outweigh our differences, and teaches us that it’s the people in life that make it work, not the things.
Speed skating has opened up a world of opportunities for me that far surpass the cold cement walls of the Calgary Olympic Oval. It was my ultimate vehicle for self-exploration and self-love. Speed skating is the love of my life, and has introduced me to every significant relationship I have had. I would be nothing without it.
I now realize that it was never about the races or results. It was about the values that those races and results taught me. The fickleness of sport teaches you that integrity is everything, and that the strongest thing you can do is live your values in the face of uncertainty.
And now — after the party is over — I’m granted the opportunity to reflect back on a career that “could have been.” It is daunting, and I do not have all the answers as to how my past will shape my future. Change is exhausting, but it is also electrifying. It offers unheralded opportunities; and through all this, I am not alone. I have friends who are in fact walking next to me, looking for the after party.
A: Ladies Locker Room by Tessa Bonhomme.
A: "People will forget what you said, people will forget what you did, but people will never forget how you made them feel."
A: Just a simple Catholic girl with a guilty conscience.
A: "12/10,"; "No drama,"; "I'm not trying to be a dink."
A: I hate playing board games.
A: Cher, Jennifer Lawrence, Bette Midler, Meryl Streep, Adele, and Jennifer Aniston ... and I'm sure we'd get into the wine so I don't know how influential this dinner party would be.
A: Soldiers returning home to family.
A: To educate myself on investing and the stock market. |
import { AmqpFrameReader } from '../amqp-frame-reader'
class Bind {
public readonly reserved1: number
public readonly destination: string
public readonly source: string
public readonly routingKey: string
public readonly noWait: boolean
public readonly arguments: object
constructor(data: Buffer) {
const amqpReader = new AmqpFrameReader(data)
// re-read class and method ids
amqpReader.readShort()
amqpReader.readShort()
this.reserved1 = amqpReader.readShort()
this.destination = amqpReader.readShortstr()
this.source = amqpReader.readShortstr()
this.routingKey = amqpReader.readShortstr()
const bits = amqpReader.readByte()
this.arguments = amqpReader.readTable()
this.noWait = (bits & 1) === 1
}
}
export { Bind }
|
class HallOfFameAPI:
r"""
API to access data on ``facebook.com`` in its basic version.
* :attr:`BASE_URL` (str): URL used to scrape data.
* :attr:`LOGIN_URL` (str): URL used to login.
* :attr:`executable_path` (str): Path to the executable driver. It should be something like `geckodriver.exe`.
Find one at `this repo <https://github.com/mozilla/geckodriver/releases>`__.
* :attr:`driver` (selenium.webdriver): The driver used to connect on facebook.
* :attr:`reaction2href` (dict): Dictionary where the keys are the reactions (``"LIKE"``, ``"AHAH"`` etc.)
and values are ``href`` pointing to a single reaction. As Facebook is constantly changing the ids for their reaction icons,
they cannot be scrapped. The workaround here is to scrape known reactions, and save their classes in cache.
Then, this final dictionary linking classes to reactions is used to scrape unknown reactions.
* :attr:`class2reaction` (dict): Dictionary mapping classes to their reaction. E.g. ``"sx_973dvziD"`` may link to the reaction ``"AHAH"``.
Note that reaction classes always start with ``"sx_"``.
.. note::
You should provide the ``reaction2href`` data. To do so, simply create posts with you facebook account,
and manually add a single unique reaction on all of them (e.g. ``"LIKE"`` for the first post, ``"AHAH"`` for the second etc.).
Then, click on the reaction icon, and save the href (everything after ``https://m.facebook.com``).
Note that the href must start with a back slash.
Finally, copy & paste all these hrefs to the ``reaction2href`` dict, and provide it when you connect to ``HallOfFameAPI``.
"""
BASE_URL = "https://m.facebook.com"
LOGIN_URL = "https://mbasic.facebook.com"
def __init__(self, executable_path="geckodriver.exe", reaction2href={}):
self.executable_path = executable_path
self.driver = webdriver.Firefox(executable_path=executable_path)
self.reaction2href = reaction2href
self.class2reaction = {}
def login(self, email, password):
self._login(email, password)
try:
self._reconnect(email, password)
except Exception:
pass
def _login(self, email, password):
self.driver.get(self.LOGIN_URL)
form = self.driver.find_element_by_xpath("//form[@id ='login_form']")
email_input = form.find_element_by_name("email")
password_input = form.find_element_by_name("pass")
email_input.send_keys(email)
password_input.send_keys(password)
submit_button = self.driver.find_element_by_xpath("//input[@type ='submit']")
submit_button.click()
def _reconnect(self, email, password):
login_button = self.driver.find_element_by_xpath('/html/body/div/div/div[2]/div/div[2]/div[2]/a[1]')
login_button.click()
self.login(email, password)
def _get_reaction_class(self, href):
# Connect to a single reaction page
self.driver.get(f"https://m.facebook.com/{href}")
page = self.driver.page_source
soup = BeautifulSoup(page, 'lxml')
# Get the emoji
reaction = soup.select("._1uja._59qr")[0]
react_classes = reaction.select("i.img._59aq")[0].get("class")
# Search for the class that defines the emoji ("LIKE", "AHAH", "WOW", etc.)
for react_class in react_classes:
if react_class[:3] == "sx_":
return react_class
return None
def init_reactions(self):
self.class2reaction = {}
for reaction, href in self.reaction2href.items():
self.class2reaction[self._get_reaction_class(href)] = reaction.upper()
def scroll_end(self, sleep=3, scroll_max=None):
"""Scroll down until the end of the current document is reached.
Args:
driver (selenium.webdriver.firefox.webdriver.WebDriver): WebDriver used to connect to facebook.
The current supported driver is only limited to Firefox.
sleep (int, optional): Sleep delay between each scroll.
If the sleep delay is too small, the function may exit before the end of the document is reached.
Defaults to ``3``.
scroll_max (int, optional): Number of maximum scroll to make. If ``None``, will scroll until the end. Defaults to ``None``.
.. note::
The function modify the ``driver`` in place.
"""
# Get scroll height
last_height = self.driver.execute_script("return document.body.scrollHeight")
if scroll_max is None:
scroll_max = 99
while scroll_max > 0:
scroll_max -= 1
# Scroll down to bottom
self.driver.execute_script("window.scrollTo(0, document.body.scrollHeight);")
# Wait to load page
time.sleep(sleep)
# Calculate new scroll height and compare with last scroll height
new_height = self.driver.execute_script("return document.body.scrollHeight")
if new_height == last_height:
break
last_height = new_height
def get_reactions(self, post_id):
"""Get the reaction from a page's post.
Args:
driver (selenium.webdriver.firefox.webdriver.WebDriver): WebDriver connected to the post page.
The current supported driver is only limited to Firefox.
Returns:
list: list of reactions (dict) conaining the user and reaction.
"""
self.driver.get(f"{self.BASE_URL}/ufi/reaction/profile/browser/?ft_ent_identifier={post_id}")
page = self.driver.page_source
soup = BeautifulSoup(page, 'lxml')
# get the total number of reactions
try:
num_reactions = int(soup.find("span", {"data-sigil": "reaction_profile_sigil"}).text.split(" ")[1])
except IndexError:
num_reactions = 0
# If > 50 reactions, load all the pages of reactions (scroll down + load more button)
if num_reactions > 50:
while True:
try:
# Find the "load more" button, and click
load_more_soup = soup.select(".primarywrap strong")[0]
load_more = WebDriverWait(self.driver, 5).until(EC.element_to_be_clickable((By.XPATH, xpath_soup(load_more_soup))))
load_more.click()
# One scroll down to go to the next "load more" button, if any
self.scroll_end(sleep=3, scroll_max=None)
except Exception:
break
# Load the entire page with Beautiful Soup
page = self.driver.page_source
soup = BeautifulSoup(page, 'lxml')
# Load the item (content of the reaction)
raw_reactions = soup.select(".item")
reactions = []
for reaction in raw_reactions:
# Get the name of the person who reacted
user = reaction.select("span strong")[0].text
user_id = reaction.select("a")[0].get("href").split("/")[1].split("&")[0].split("?groupid")[0]
# Find the reaction emoji
react_classes = reaction.parent.select("i.img._59aq")[0].get("class")
# Convert the emoji class to id
react_type = None
# While loop in case the ids changed (facebook change id, for security reasons)
while react_type is None:
for react_class in react_classes:
if react_class in self.class2reaction.keys():
react_type = self.class2reaction[react_class]
# If ids changed, update the reaction to class dict
if react_type is None:
self.init_reactions()
# Add the reaction
reactions.append({
"user": user,
"user_id": user_id,
"reaction": react_type
})
return reactions
def _unfold_comments(self):
"""Function used to unfold all discussions from a thread.
Args:
driver (selenium.webdriver.firefox.webdriver.WebDriver): WebDriver connected to the post page.
The current supported driver is only limited to Firefox.
"""
unfolded_comments = self.driver.find_elements_by_class_name("_2b1h.async_elem")
for comment in unfolded_comments:
comment.click()
def get_comments(self, group_id, post_id):
"""Retrieve all comments from a page post.
Args:
driver (selenium.webdriver.firefox.webdriver.WebDriver): WebDriver connected to the post page.
The current supported driver is only limited to Firefox.
.. note::
This function can be slow as it also extracts reactions for all comments.
"""
self.driver.get(f"{self.BASE_URL}/groups/{group_id}/permalink/{post_id}/?anchor_composer=false")
self._unfold_comments()
page = self.driver.page_source
soup = BeautifulSoup(page, 'lxml')
# Search for all comments
all_comments = []
comments = soup.findAll("div", {"data-sigil": "comment"})
for comment in comments:
comment_user = comment.select("._2b05 a")[0].text
comment_user_id = comment.select("._2b05 a")[0].get("href").split("/")[1].split("&")[0].split("?groupid")[0]
comment_date = comment.select("abbr")[0].text
comment_href = comment.select("._2b05 a")[0].get("href")
comment_id = comment.get("data-uniqueid")
comment_text = comment.find("div", {"data-sigil": "comment-body"}).text
# Search for reactions
comments_reactions = []
reactions_soup = comment.select("._14v5 a._14v8._4edm")
if reactions_soup:
comment_href = reactions_soup[0].get("href")
comment_group_id, comment_id = comment_href.split("ft_ent_identifier=")[1].split("&")[0].split("_")
comments_reactions = self.get_reactions(comment_id)
# Search for replies
replies = []
reply_comments = comment.findAll("div", {"data-sigil": "comment inline-reply"})
for reply_comment in reply_comments:
reply_user = reply_comment.select("._2b05 a")[0].text
reply_user_id = reply_comment.select("._2b05 a")[0].get("href").split("/")[1].split("&")[0].split("?groupid")[0]
reply_date = reply_comment.select("abbr")[0].text
reply_href = reply_comment.select("._2b05 a")[0].get("href")
reply_id = reply_comment.get("data-uniqueid")
reply_text = reply_comment.find("div", {"data-sigil": "comment-body"}).text
# Search for reactions
reply_reactions = []
reply_reactions_soup = reply_comment.select("._14v5 a._14v8._4edm")
if reply_reactions_soup:
reply_href = reply_reactions_soup[0].get("href")
reply_group_id, reply_id = reply_href.split("ft_ent_identifier=")[1].split("&")[0].split("_")
reply_reactions = self.get_reactions(reply_id)
# Update the reply comment
replies.append({
"href": reply_href,
"comment_id": reply_id,
"text": reply_text,
"user": reply_user,
"user_id": reply_user_id,
"date": convert_date(reply_date).isoformat(),
"reactions": reply_reactions
})
# Add the comment and all the replies
all_comments.append({
"href": comment_href,
"comment_id": comment_id,
"text": comment_text,
"user": comment_user,
"user_id": comment_user_id,
"date": convert_date(comment_date).isoformat(),
"reactions": comments_reactions,
"replies": replies
})
return all_comments
def _find_posts(self, group_id, sleep=3, scroll_max=None, topk=-1):
self.driver.get(f"https://m.facebook.com/groups/{group_id}")
self.scroll_end(sleep=sleep, scroll_max=scroll_max)
page = self.driver.page_source
soup = BeautifulSoup(page, 'lxml')
articles = soup.find_all("article")
posts, raw_articles = [], []
for article in articles:
try:
# Retrieve the text (paragraphs) of the post
text = ""
text_soup = article.select(".story_body_container ._5rgt._5nk5 p")
if text_soup:
text = "\n".join([paragraph_soup.text for paragraph_soup in text_soup])
# Search for the ids
features = eval(article["data-ft"])
post_id = features["top_level_post_id"]
group_id = features["group_id"]
user = article.select("h3 strong a")[0].text
user_id = article.select("h3 strong a")[0].get("href").split("/")[1].split("&")[0].split("?groupid")[0]
date = article.select("abbr")[0].text
posts.append({
"post_id": post_id,
"group_id": group_id,
"user": user,
"user_id": user_id,
"date": convert_date(date).isoformat(),
"text": text
})
raw_articles.append(article)
# Break ?
if topk > 0 and len(raw_articles) >= topk:
return posts, raw_articles
except Exception:
continue
return posts[:topk], raw_articles[:topk]
def get_posts(self, group_id, sleep=3, topk=-1, scroll_max=None):
all_posts = []
posts, _ = self._find_posts(group_id, sleep=sleep, scroll_max=scroll_max, topk=topk)
for post in tqdm(posts, desc="Retrieving Data", leave=True, position=0, total=len(posts)):
try:
comments = self.get_comments(group_id, post["post_id"])
# Get the reactions for the post
reactions = self.get_reactions(post["post_id"])
all_posts.append({
"post_id": post["post_id"],
"group_id": group_id,
"user": post["user"],
"user_id": post["user_id"],
"date": post["date"],
"text": post["text"],
"comments": comments,
"reactions": reactions
})
except Exception:
continue
return all_posts
def publish_post(self, group_id, message):
"""Publish a post to a facebook group/page.
Args:
driver (selenium.webdriver.firefox.webdriver.WebDriver): WebDriver connected to the post page.
The current supported driver is only limited to Firefox.
message (str): Message to post.
"""
self.driver.get(f"https://m.facebook.com/groups/{group_id}")
self.driver.find_elements_by_class_name("_4g34._6ber._78cq._7cdk._5i2i._52we")[0].click()
page = self.driver.page_source
soup = BeautifulSoup(page, 'lxml')
text_soup = soup.select("textarea")[-2]
textarea = WebDriverWait(self.driver, 30).until(EC.element_to_be_clickable((By.XPATH, xpath_soup(text_soup))))
textarea.send_keys(message)
post_soup = soup.findAll("div", {"data-sigil": "upper_submit_composer"})[-1].select("button")[0]
try:
post_button = WebDriverWait(self.driver, 30).until(EC.element_to_be_clickable((By.XPATH, xpath_soup(post_soup))))
except Exception as error:
print(f"Could not publish. Retrying... {error}")
return self.publish_post(group_id, message)
post_button.click()
# Wait for the message to be posted
time.sleep(5)
# Return the id of the last post (likely to be the published one)
posts, _ = self._find_posts(group_id, sleep=0, scroll_max=1)
return posts[0]["post_id"]
def edit_post(self, group_id, post_id, message):
"""Edit a post to a facebook group/page.
Args:
driver (selenium.webdriver.firefox.webdriver.WebDriver): WebDriver connected to the post page.
The current supported driver is only limited to Firefox.
post_id: (str): ID of the post to edit. (e.g. `"745393222993590"`)
message (str): New message.
.. note::
This function will erase the previous post's text, and rewrite it with the new message.
"""
posts, raw_articles = self._find_posts(group_id, sleep=0, scroll_max=1)
for post, raw_article in zip(posts, raw_articles):
if str(post_id) == post["post_id"]:
break
# Click the option menu to edit the post
options = raw_article.select("._4s19")[0]
self.driver.find_element_by_xpath(xpath_soup(options)).click()
time.sleep(2)
page = self.driver.page_source
soup = BeautifulSoup(page, 'lxml')
option_buttons = soup.select("._56bz._54k8._55i1._58a0.touchable._53n6")
edit_buttons = []
for option in option_buttons:
if "editPostButton" in option.get("data-sigil"):
edit_buttons.append(option)
edit_button = edit_buttons[-1]
self.driver.find_element_by_xpath(xpath_soup(edit_button)).click()
# Edit
page = self.driver.page_source
soup = BeautifulSoup(page, 'lxml')
text_soup = soup.select("textarea")[-2]
textarea = WebDriverWait(self.driver, 30).until(EC.element_to_be_clickable((By.XPATH, xpath_soup(text_soup)))) # id can change ! ex id="uniqid_1"
textarea.clear()
textarea.send_keys(message)
# Save
page = self.driver.page_source
soup = BeautifulSoup(page, 'lxml')
save_soup = soup.select("#modalDialogHeaderButtons button")[0]
try:
save_button = WebDriverWait(self.driver, 30).until(EC.element_to_be_clickable((By.XPATH, xpath_soup(save_soup))))
except Exception as error:
print(f"Could not edit. Retrying... {error}")
return self.edit_post(group_id, post_id, message)
save_button.click()
def quit(self):
self.driver.quit()
def __repr__(self):
return "<Facebook Hall-Of-Fame API>" |
Bacterial challenge initiates endosome-lysosome response in Drosophila immune tissues An effective innate immune response is critical for the protection of an organism against pathogen and environmental challenge. There is emerging evidence that an effective immune response depends heavily on the traffic and function of endosomes and lysosomes. However, there is very little understanding of the dynamics of an innate immune response, especially in vivo. Toward this aim, we have used two-photon microscopy to visualize the response to bacterial infection of the endosome-lysosome system in immune response tissues using intact Drosophila larvae. First, we set up the conditions to image intact larva in vivo and more specifically GFP-labeled endosomes-lysosomes in the fat body, and compared their distribution and size with those in tissue explanted ex vivo. Notably, we observed significant expansion of both Rab5 and Rab7 endosomal compartments upon both tissue isolation and minor aseptic wounding, indicating significant differences between live and explanted tissue. We also observed changes in endosome-lysosome vesicles within internal immune response tissues following in vivo bacterial infection by the oral route (to avoid a wounding response). We conclude that there are significant changes to the architecture of endosomes and lysosomes during an innate immune response, setting the scene for mechanistic studies to identify the signaling pathways that orchestrate this process. |
// Every response from server app to client app is performed by this function.
OCStackResult OCPlatform::sendResponse(const std::shared_ptr<OCResourceResponse> pResponse)
{
size_t requestNumber = reinterpret_cast<size_t>(pResponse->getRequestHandle());
OCRepresentation ocRep = pResponse->getResourceRepresentation();
OCEntityHandlerResult result = pResponse->getResponseResult();
HeaderOptions serverHeaderOptions;
PendingRequest::Ptr pendingRequest;
{
std::lock_guard<std::recursive_mutex> lock(g_globalMutex);
if (g_requestList.find(requestNumber) == g_requestList.end())
{
return OC_STACK_ERROR;
}
pendingRequest = g_requestList[requestNumber];
}
switch (pendingRequest->method)
{
case OC_REST_POST:
{
OCStackResult ocResult = OC_STACK_ERROR;
if ((result == OC_EH_OK) || (result == OC_EH_RESOURCE_CREATED))
{
ocResult = OC_STACK_OK;
}
std::string newResourcePath = pResponse->getNewResourceUri();
if (!newResourcePath.empty())
{
if (newResourcePath.length() > MAX_URI_LENGTH)
{
return OC_STACK_ERROR;
}
HeaderOption::OCHeaderOption headerOption(
HeaderOption::LOCATION_PATH_OPTION_ID,
newResourcePath);
serverHeaderOptions.push_back(headerOption);
}
std::thread postCallbackThread(pendingRequest->postCallback,
serverHeaderOptions,
ocRep,
ocResult);
postCallbackThread.detach();
break;
}
case OC_REST_GET:
{
std::thread getCallbackThread(pendingRequest->getCallback,
serverHeaderOptions,
ocRep,
(result == OC_EH_OK) ? OC_STACK_OK : OC_STACK_ERROR);
getCallbackThread.detach();
break;
}
case OC_REST_DELETE:
{
OCStackResult ocResult = OC_STACK_ERROR;
if ((result == OC_EH_OK) || (result == OC_EH_RESOURCE_DELETED))
{
ocResult = OC_STACK_OK;
}
std::thread deleteCallbackThread(pendingRequest->deleteCallback,
serverHeaderOptions,
ocResult);
deleteCallbackThread.detach();
break;
}
default:
{
assert(false);
return OC_STACK_ERROR;
}
}
if (pendingRequest->method & (OC_REST_POST | OC_REST_GET | OC_REST_DELETE))
{
std::lock_guard<std::recursive_mutex> lock(g_globalMutex);
g_requestList.erase(pendingRequest->requestNumber);
}
return OC_STACK_OK;
} |
Detection and control of microorganisms are important in many fields including health care, environmental regulation, bio-warfare, pathogen identification, food and drug testing, and in a variety of industrial systems. In industry, presence of undesirable microorganisms decreases the efficiency of operating equipment and ultimately increases the cost of associated goods or services. Furthermore, since microorganisms multiply rapidly, presence of microbial activity also causes health risks to the public. There is an increasing concern with pathogenic organisms infecting water and process system and creating increased human, animal, and environmental health risk.
In cooling towers, for example, water borne pathogenic microorganisms such as Legionella sp. may be present. If not properly treated with preferred biocides, aerosolized particles containing the microorganisms can create extreme health concerns from inhalation of the aerosolized microorganisms leading to disease such as Pontiac fever or the sometimes fatal Legionnaire's disease caused by Legionella pneumophila. Detection of this microorganism is difficult in the case of open recirculation water systems such as cooling towers because low concentrations represent serious health risk, and large water volumes must be concentrated into smaller sample volumes in order to perform the desired analytical test and obtain accurate and reproducible results. |
Under Canada’s new impaired-driving laws, it’s a criminal offence to have “any detectable amount” of cocaine, methamphetamine, magic mushrooms, LSD, ketamine or PCP in your blood while driving.
For decades, it has been a criminal offence to drive while impaired by alcohol or drugs or both. Last December, when Bill C-46 came into force, the Department of Justice added specific limits for particular drugs.
Editorial: Are expanded drunk-driving laws needed?
It’s accepted that a driver with 80 milligrams or more of alcohol per 100 millilitres of blood is impaired. But what about the college student who used mushrooms two weeks ago?
“You can do a very careful analysis of blood and detect a minute amount of some drug, but there’s no reason to think that’s connected to driving problems,” said Mulligan, who is concerned that setting the limits at “any detectable level” will result in convictions of people who are not impaired or driving dangerously.
Scott Macdonald, a scientist with the Canadian Institute for Substance Use Research at the University of Victoria, said there have been few studies on how long such drugs can be detected in the blood. He believes LSD and PCP leave the system quickly, but that might depend on the person. According to one study, amphetamines can be detected for up to 46 hours in blood.
“There doesn’t seem to be a lot of scientific backbone behind the drug-impaired driving laws,” Macdonald said. “For cocaine, in many studies, it’s a performance enhancer. But if you’re using cocaine on a daily basis over the long term, there can be more longer-term deficits associated with it. People get jittery and impulsive.
Bill C-46 sets very low thresholds for limits for THC, the primary psychoactive component of cannabis, Mulligan said.
Drivers with a THC level between two and five nanograms face a summary conviction with a $1,000 fine. Above five nanograms, they face mandatory minimum penalties of a $1,000 fine on a first offence, 30 days’ imprisonment on a second offence and 120 days’ imprisonment on a third offence.
Drivers with a THC level of more than 2.5 nanograms and having a blood-alcohol concentration above 50 mg per 100 ml will face the same mandatory minimum penalties.
“It’s controversial, because there’s no consensus that people are drug-impaired in their ability to operate a car at those levels of THC,” Mulligan said.
Macdonald, who recently published Cannabis Crashes: Myths and Truths, also believes the government is overreaching with the impairment levels it has set for cannabis.
“THC is fat-soluble and stays a long time in the blood. THC has been detected for daily users who are abstinent for five days at levels between two and five nanograms,” he said.
Tim Stockwell, director of the Canadian Institute for Substance Use Research, agreed with Macdonald that it’s unclear if stimulants actually impair driving ability.
“At lower levels, my view is they might actually improve your driving,” Stockwell said.
But even if it’s unclear whether someone would be impaired in every case, he believes most people support the legislation to deter people from driving impaired.
“It’s deterrence. But you keep it a civil penalty, not a criminal offence,” said Stockwell.
Mulligan pointed out that the new legislation also increases the maximum penalty for impaired-driving offences, such as refusing to provide a breath sample, to 10 years in prison.
That could mean that a permanent resident or a refugee claimant who is convicted and sentenced to six months or more in jail for a crime with a 10-year penalty would be subject to deportation with no appeal mechanism, he said.
Convicting people who aren’t dangerous is problematic, he said — the government risks undermining the social pressure that’s effective in getting people to stop engaging in dangerous behaviour.
“People are smart and they’ll talk about these things. If you convict people who have a minute quantity of drugs in their system because they consumed something a week ago, people are going to realize what is going on,” Mulligan said. |
Joint reconstruction of compressively sensed ultrasound RF echoes by exploiting temporal correlations In this paper, the principles of compressive sensing are exploited for the joint reconstruction of an ensemble of biomedical ultrasound RF echoes, using a highly reduced set of random measurements. Temporal correlations between the distinct RF echoes are taken into account during the reconstruction, which results in a reduction of the required number of measurements, while also increasing the reconstruction quality. The efficiency of recent state-of-the-art methods is evaluated on a set of real ultrasound data, to highlight the importance of accounting for temporal correlations during reconstruction. Our experimental evaluation reveals an improved performance, both visually and in terms of quality metrics, such as the SSIM and PSNR, when such correlations are extracted during the joint reconstruction of RF echoes, compared with previous methods based on the separate recovery of each RF echo. |
/// This is a very basic "encoder" that records the video as a series of numbered PNGs
/// Good if you're having problems with container-based formats and need extra flexibility.
class VideoEncoderPNG : public VideoEncoder
{
U32 mCurrentFrame;
public:
bool begin()
{
mPath += "\\";
mCurrentFrame = 0;
return true;
}
bool pushFrame( GBitmap * bitmap )
{
FileStream fs;
String framePath = mPath + String::ToString("%.6u.png", mCurrentFrame);
if ( !fs.open( framePath, Torque::FS::File::Write ) )
{
Con::errorf( "VideoEncoderPNG::pushFrame() - Failed to open output file '%s'!", framePath.c_str() );
return false;
}
mCurrentFrame++;
bool result = bitmap->writeBitmap("png", fs, 0);
pushProcessedBitmap(bitmap);
return result;
}
bool end()
{
return true;
}
void setResolution( Point2I* resolution )
{
mResolution = *resolution;
}
} |
Arsenal are ready to recall Reiss Nelson from his loan with Hoffenheim.
The 18-year-old starred for the Bundesliga club since joining in August, having scored six times in 13 appearances.
According to teamTALK, Gunners boss Unai Emery wants to bring Nelson back to the Emirates in January.
The club has decided allow Danny Welbeck to leave on a free transfer at the end of the season, and with the 29-year-old having suffered a long-term injury, Emery is keen on Nelson replacing him. |
<filename>kernel/src/rvm/structs.rs
//! Wrappers of rvm::Guest and rvm::Vcpu
use alloc::sync::Arc;
use spin::Mutex;
use rcore_memory::{memory_set::MemoryAttr, PAGE_SIZE};
use rvm::{DefaultGuestPhysMemorySet, GuestPhysAddr, HostVirtAddr, RvmResult};
use rvm::{Guest as GuestInner, Vcpu as VcpuInner};
use super::memory::RvmPageTableHandlerDelay;
use crate::memory::GlobalFrameAlloc;
pub(super) struct Guest {
gpm: Arc<DefaultGuestPhysMemorySet>,
pub(super) inner: Arc<GuestInner>,
}
pub(super) struct Vcpu {
pub(super) inner: Mutex<VcpuInner>,
//#[cfg(any(target_arch = "riscv32", target_arch = "riscv64"))]
//inner_id: usize,
#[cfg(any(target_arch = "riscv32", target_arch = "riscv64"))]
pub(super) irq: Arc<rvm::InterruptState>,
}
impl Guest {
pub fn new() -> RvmResult<Self> {
let gpm = DefaultGuestPhysMemorySet::new();
Ok(Self {
inner: GuestInner::new(gpm.clone())?,
gpm,
})
}
pub fn add_memory_region(&self, gpaddr: GuestPhysAddr, size: usize) -> RvmResult<HostVirtAddr> {
self.inner.add_memory_region(gpaddr, size, None)?;
let thread = crate::process::current_thread().unwrap();
let hvaddr = thread.vm.lock().find_free_area(PAGE_SIZE, size);
let handler =
RvmPageTableHandlerDelay::new(gpaddr, hvaddr, self.gpm.clone(), GlobalFrameAlloc);
thread.vm.lock().push(
hvaddr,
hvaddr + size,
MemoryAttr::default().user().writable(),
handler,
"rvm_guest_physical",
);
Ok(hvaddr)
}
}
impl Vcpu {
pub fn new(entry: u64, guest: Arc<GuestInner>) -> RvmResult<Self> {
#[cfg(any(target_arch = "x86_64"))]
{
Ok(Self {
inner: Mutex::new(VcpuInner::new(entry, guest)?),
})
}
#[cfg(any(target_arch = "riscv32", target_arch = "riscv64"))]
{
let inner = VcpuInner::new(entry, Arc::clone(&guest))?;
let inner_id = inner.get_id();
let irq = guest.get_irq_by_id(inner_id);
return Ok(Self {
inner: Mutex::new(inner),
//inner_id,
irq,
});
}
}
}
|
Teraflops Supercomputer: Architecture and Validation of the Fault Tolerance Mechanisms Intel Corporation developed the Teraflops supercomputer for the US Department of Energy (DOE) as part of the Accelerated Strategic Computing Initiative (ASCI). This is the most powerful computing machine available today, performing over two trillion floating point operations per second with the aid of more than 9,000 Intel processors. The Teraflops machine employs complex hardware and software fault/error handling mechanisms for complying with DOE's reliability requirements. This paper gives a brief description of the system architecture and presents the validation of the fault tolerance mechanisms. Physical fault injection at the IC pin level was used for validation purposes. An original approach was developed for assessing signal sensitivity to transient faults and the effectiveness of the fault/error handling mechanisms. Dependency between fault/error detection coverage and fault duration was also determined. Fault injection experiments unveiled several malfunctions at the hardware, firmware, and software levels. The supercomputer performed according to the DOE requirements after corrective actions were implemented. The fault injection approach presented in this paper can be used for validation of any fault-tolerant or highly available computing system. |
Music Preferences, Friendship, and Externalizing Behavior in Early Adolescence: A SIENA Examination of the Music Marker Theory Using the SNARE Study Music Marker Theory posits that music is relevant for the structuring of peer groups and that rock, urban, or dance music preferences relate to externalizing behavior. The present study tested these hypotheses, by investigating the role of music preference similarity in friendship selection and the development of externalizing behavior, while taking the effects of friends externalizing behavior into account. Data were used from the first three waves of the SNARE (Social Network Analysis of Risk behavior in Early adolescence) study (N=1144; 50% boys; Mage=12.7; SD=0.47), including students who entered the first-year of secondary school. Two hypotheses were tested. First, adolescents were expected to select friends based both on a similarity in externalizing behavior and music genre preference. Second, a preference for rock, urban, or dance, music types was expected to predict the development of externalizing behavior, even when taking friends influence on externalizing behavior into account. Stochastic Actor-Based Modeling indicated that adolescents select their friends based on both externalizing behavior and highbrow music preference. Moreover, both friends externalizing behavior and a preference for dance music predicted the development of externalizing behavior. Intervention programs might focus on adolescents with dance music preferences. Introduction Music is a highly significant and meaningful medium, particularly in adolescence. Compared to older people, adolescents and young adults attribute more importance to music, and listen to music more often and in a wider variety of contexts (). Particularly in adolescence, music is not only important for mood management, but also for identity and social identity development (North and Hargreaves 1999;). Music, its lyrics and visuals on TV, and the internet can be defining elements in the development of adolescent identity and social identity, particularly among those adolescents that are highly involved in music (;Ter ). Empirical evidence confirms that music is a factor in the formation of friendships, peer groups and peer culture (;). Not only has music preference been linked to selecting friends with a similar music taste, particular preferences for several types of music have also been linked to the development of externalizing behavior. However, the impact of friends' externalizing behavior on the link between music preference and externalizing behavior remains understudied. Several types of music preference have been linked to externalizing behavior. For example, a preference for rock music, such as heavy metal, has been linked to externalizing behavior (e.g., Arnett 1996, North and Hargreaves 2007;;Ter ;, Weinstein 1991. Similarly, a preference for urban music, such as rap or hip-hop, has been associated with externalizing behavior (Miranda and Claes 2004;;North and Hargreaves 2007;;;Ter ). Moreover, in ten countries across Europe a preference for dance music emerged as the most potent musical indicator for externalizing behaviors such as substance use (Ter ). This latter study also indicates that currently, dance music was most consistently associated with several types of externalizing behavior (Ter ). In their Music Marker Theory, Ter Bogt et al. conceptualize the mechanisms through which music preferences translate into externalizing behavior. A fundamental hypothesis within Music Marker Theory states that it is not primarily the music itself or its lyrics that promote adolescent externalizing behavior. Instead, music preferences may work as a badge (Frith 1981), communicating values, attitudes and opinions. Adolescents are sensitive to the images that they themselves and their peers project and hold normative expectations about the characteristics of fans of particular musical styles (North and Hargreaves 1999;Rentfrow and Gosling 2006). Through showing their badge, adolescents identify themselves as belonging to or desiring to belong to specific peer groups and they may be drawn to other youth with similar taste. As such, peer involvement is thought to mediate between music and externalizing behavior. Through music, adolescents are drawn to specific crowds varying in externalizing behavior, which may influence their behaviors positively or negatively. In particular, listening to music types such as rock, urban, or dance music, is expected to lead to befriending others with similar music tastes. Among such friends, in turn, externalizing behavior is expected to occur more frequently and escalate more quickly (see Ter ). In support of the Music Marker Theory, several studies suggest that music preference plays a central role in friendship formation. From the seventies onward, a series of ethnographic studies among youth involved in sub-cultures revealed the central role of music in the structuring of peer groups or scenes (e.g., Willis 1978;Hebdige 1979;Bennett 2000Bennett, 2004. Indeed, similarity in music preferences has been shown to increase the likelihood of friendship (Frith 1981,. Selfhout and colleagues have shown that, over time, among stable friends there is high similarity in liking rock (divergent types of rock music), urban (i.e., Hip hop, R&B and reggae), pop/dance (mainstream music and the most popular forms of electronic dance music) and highbrow music (classical music and jazz). Furthermore, the study indicated that future friendships were created based on similarity in music preference. Thus, preferences for specific genres seem to indicate friendship similarity selection in early adolescence. However, a proper test of the Music Marker Theory should control for effects of friends' externalizing behavior. Indeed, like music preference, externalizing behavior has been shown to be important for both friendship creation and further development of externalizing behavior (see Moffitt 1993;Moffitt and Caspi 2001;). Moreover, externalizing behavior itself might work as a badge, portraying a mature status among peers (Moffitt 1993). Therefore, it is important to take the effects of friends' externalizing behavior into account when studying how music preference impacts friendship selection and the development of externalizing behavior. To study the co-development of friendship and (externalizing) behavior, Stochastic Actor-Based Modeling (SABM) has been developed. Such modeling allows to simultaneously study both friendship similarity selection and influence processes (for an overview see ). Similarity selection takes place when adolescents select their friends based on similarities in behavior. Friendship influence processes take place when adolescents become more similar to their friends over time. It is important to disentangle these processes as they both lead to the same outcome: friends are similar to one another. Moreover, SABM controls for the increased likelihood of adolescents to reciprocate friendship, to become friends with classmates, or to become friends with their friends' friends. To our knowledge, only one study has simultaneously investigated the role of music preference and externalizing behavior in friendship formation and the development of externalizing behavior. Illustrating their Stochastic Actor-Based Modeling approach, Steglich et al. studied 129 adolescents and showed that, while taking friendship selection based on alcohol use into consideration, adolescents select their friends based on a similarity in classical music preference but not based on similarity in techno or rock music preference. Controlling for friendship selection based on similarity in music preference and the positive effects of adolescents' friends' alcohol use, the researchers did not find any effects for techno, rock, or classical music on the development of alcohol consumption. The Current Study This study will investigate assumptions of the Music Marker Theory (Ter ) that adolescents are likely to select friends based on similarity in music preference and that especially rock, urban, and dance music preferences are predictive of development of externalizing behavior. Listening to music types such as rock, urban, or dance music is expected to lead to befriending others with the same music preference and externalizing behavior is expected to occur more frequently among such friends, and as such, music preference may work as a badge, communicating values, attitudes and opinions (Frith 1981). Therefore, it was expected that adolescents who prefer rock, urban, or dance music are more likely to develop externalizing behavior. Most importantly however, since externalizing behavior is known to affect friendship selection and friends' externalizing behavior is known to affect the development of externalizing behavior (e.g., ), this will be controlled for. Two hypotheses were tested. First, adolescents were expected to select friends based both on a similarity in externalizing behavior and music genre preference. Second, a preference for rock, urban, or dance, music types was expected to predict the development of externalizing behavior, even when taking friends' influence effects on externalizing behavior into account. Participants and Procedure As this study focused on the entrance to secondary education, participants were 1144 first grade students (50% boys), aged between 11.1 and 15.6 at Time 1 (Mean 12.7, SD = 0.47). A total of 97% of participants were born in the Netherlands (as were 87% of their fathers and 88% of their mothers). Data stem from the SNARE (Social Network Analysis of Risk behavior in Early adolescence) study; a longitudinal project on the social development of early adolescents with a specific focus on adolescents' involvement in risk behavior. Two secondary schools were asked and were willing to participate: one in the middle and one in the north of the Netherlands. Subsequently, all firstand second-year secondary school students (i.e., similar to 7th-8th grades in the US) from these schools were approached for enrollment in SNARE. All eligible students received an information letter for themselves and their parents, inviting them to participate in the study. If students wished to refrain from participation, or if their parents disagreed with their children's participation, they were requested to send a note or email within 10 days to this effect. One year later, all new first year students were again approached for participation in the study. In total, 1826 students were approached for this study, of which 40 students (2.2%) refused to participate for several reasons, for example, the parent and/or adolescent had no interest, the adolescent was dyslectic, or it was too time consuming. A total of 1786 students participated in SNARE (M age Time 1 = 12.91 years, SD = 0.70, 50.1% male, 83.9% Dutch). Thus there were four samples, two cohorts coming from two schools (see also ;). In September 2011, just when participants entered the first or second year of secondary school, we started with a pre-assessment. Subsequently, in 2012, all new first-year students also completed a pre-assessment. After the preassessment there were follow-up regular measurement waves in October (Time 1), December (Time 2), and April (Time 3). After 2 years, data collection was continued for another 2 years among the participating students. During the assessments, a teacher and research assistants were present. The research assistant gave a brief introduction followed by the students filling in a questionnaire on the computer during class. The questionnaire contained both self-reports as well as peer nominations (participants could indicate who their friends were). Data were collected via the questionnaires using CS socio software (www.sociometricstudy.com). This software was particularly developed for this study and allowed students to fill in sociometric questions. The assessment of the questionnaires took place during regular school hours within approximately 45 min. The students that were absent were, if possible, assessed within a month. The anonymity and privacy of the students were warranted. The study was approved by the Internal Review Board of one of the participating universities. Self-reported externalizing behaviors (Time 1-Time 3) At all three time points, participants reported their engagement in three forms of externalizing behavior: Antisocial behavior, alcohol use, and tobacco use. Participants were asked if they engaged in the behavior during the previous month. Antisocial behavior was measured with 17 items by asking participants how often (between 0-12 or more times) they had been involved in 17 types of delinquent behavior; including stealing, vandalism, burglary, violence, weapon carrying, threatening to use a weapon, truancy, contact with the police, and fare evasion in public transport (see also, ;Van der ). For alcohol use, participants used a 13 point scale (ranging from 0 to over 40 times) to report on how many occasions they had consumed alcohol (). For tobacco use, participants used a seven-point scale (ranging from never to more than 20) to indicate how many cigarettes they had smoked daily (e.g., ). Based on recommendations of Farrington and Loeber, all three externalizing behavior scales were recoded as binary, indicating no engagement at all or any engagement in antisocial behavior, alcohol use, or tobacco use, respectively. As externalizing behaviors are known to cluster together during early adolescence (e.g., ), an exploratory factor analysis (using maximum likelihood estimations and oblique rotation) revealed that the externalizing behaviors loaded on a single factor, explaining 55.3% of the variance. Therefore, a composite variable, representing the number of different externalizing behaviors participants engaged in (i.e., antisocial behavior, alcohol, tobacco use), was computed resulting in scores between zero (no externalizing behaviors) and three (all externalizing behaviors). Friendship nominations (Time 1-Time 3) Participants were asked to name their best friends. Participants could nominate friends in their own class and, in addition, friends from their grade. Grade networks were used for the current analyses. Thus, there were four networks (i.e., two schools and two cohorts per school). Music preference (Time 1) Participants were asked to indicate their music preferences. Fifteen music types were presented: international popular, Dutch popular, rock, alternative rock, heavy metal, gothic, rap/hip-hop, RnB, reggae, house/dance/trance, techno/dubstep, hardhouse, classical music, jazz, and folk. For each type of music, participants could tick a box, indicating their preference for this type of music. Thus for each music type participants had a score of either zero, indicating no preference, or one, indicating a preference for this type of music. A factor analysis (principle component analyses with oblimin rotation) revealed that 12 of these items can be meaningfully integrated into a five factor structure (see Table 1) similar to ones that that have been found in earlier studies on the structure of music preferences (e.g., ;;Ter ). On the basis of these results we created five overall music preference scores: popular, rock, urban, dance and highbrow music. Three less popular or less well known music types were not included in the current analyses: folk, reggae, and Dutch popular music. Analytic Strategy Correlations between the music preference types and externalizing behavior were calculated. For each of the four friendship networks (i.e., 2 cohorts in 2 schools), descriptive statistics were also calculated including the average age, percentage of boys, average externalizing behavior level, and the percentage of absent participants of the networks. Furthermore, the Jaccard index, showing the relative stability of the friendship network over time, was calculated. Participants were allowed to indicate who their friends were at each assessment and these nominations were combined into the same grade friendship networks within the school. The friendship network analyses were conducted using SIENA (Simulation Investigation for Empirical Network Analyses), version 4, in R. SIENA is an actor based model for the longitudinal co-evolution of social networks and individual behavior (). SIENA estimates changes in friendship nominations and externalizing behavior between two points in time; in this study, changes were calculated between Time 1 and Time 2 (Period 1), and between Time 2 and Time 3 (Period 2). While controlling for structural network effects (which take the structure of friendships in the network into account, such as the likelihood of being friends with the friends of your friends), SIENA estimates both network dynamics (i.e., changes in the network) and behavior dynamics (i.e., changes in behavior) longitudinally. The outcomes of SIENA analyses are based on an iterative Markov Chain Monte Carlo approach (;). For all analyses, the dependent variables consist of the network ties (friendship nominations) and the number of externalizing behaviors participants engaged in (antisocial behavior, alcohol use, and tobacco use). Two analyses were run. The first analysis only contained the estimated effects of music preferences on similarity selection (indicating whether participants were more likely to befriend each other based on similar music preferences) and the development of externalizing behaviors (indicating whether some music preferences are associated with a faster development of externalizing behavior). In the second analysis, externalizing behavior similarity selection effects (i.e., if participants select their friends based on similarity in externalizing behavior) and influence effects (i.e., if participants adapt their externalizing behavior based on their friends' externalizing behavior) were added. Both models contained commonly used structural network effects, effects which capture friendship relations (;). Controlling for structural network effects is important as they explain why some adolescents become friends; for example adolescents are more likely to befriend the friends of their friends. Furthermore, additional network effects were added to optimally capture the friendship structure in the current networks. These included density (i.e., the number of present vs. absent friendship ties in the network), reciprocity (i.e., the likelihood to befriend those who befriend you), the likelihood to befriend friends of friends (transitive triplets), hierarchy (three-cycles), the likelihood for participants who receive many friendship nominations to receive extra friendship nominations (indegree popularity, square root version), the likelihood for participants who receive many friendship nominations to send extra friendship nominations (indegree activity, square root version), and the likelihood for participants who send out many friendship nominations to send out extra friendship nominations (outdegree activity, square root version); for more details see Ripley et al.. To improve model fit, density and indegree popularity were allowed to vary between assessment periods. Furthermore, transitive reciprocated triplets were modeled to estimate the likelihood for triads (a group of three friends) to reciprocate friendships. Additionally, several factors potentially affecting the friendship selection in the social networks (i.e., network dynamic effects) were estimated as covariates (see ). These effects are important as they may further explain friendship selection. Specifically, the effects of same-gender friendship selection (i.e., girls nominate girls, boys nominate boys; girls were coded as 0, boys as 1) were estimated as well as the effects of proximity by using adolescents' classroom and school locations as covariates (School 1 consisted of four locations). The effects of gender and music preference on sending (called an ego effect) and receiving (called an alter effect) friendship nominations was also controlled for. To assess the first hypothesis that adolescents select friends based on similarity in music preference and externalizing behavior, selecting similar friends was modeled based on the different music preferences for the first and second analyses, and on externalizing behavior for the second analysis. Behavior dynamic effects modelled changes in externalizing behavior, and include the effects from music preference and friends' externalizing behavior on the development of externalizing behavior (see ). These effects are important as they capture the development of externalizing behavior and the impact of friendship and music preference on this development. In both analyses, these dynamics include the rate of change, and whether externalizing behavior changes conform to linear or quadratic trends. Furthermore, the effects from music preference (effect from) on the development of externalizing behavior were included in both analyses. These effects from music preference assess the second hypothesis, that rock, urban, or dance music preference predicts the development of externalizing behavior. The second analysis included effects from friends' externalizing behavior (influence average alters); assessing whether participants change their externalizing behavior to become more similar to their friends' externalizing behavior. In a final step, after having estimated all these effects for the four networks separately, the estimated effects were summarized using the SIENA likelihood based method for meta-analyses (for more information see ). The means and variances were normal, which indicates trustworthy outcomes of such a meta-analysis. Descriptive Statistics Over the whole sample, there were significant and positive correlations (p's < 0.01) between preferences for dance (r = 0.24) and urban (r = 0.09) music, and externalizing behavior. The correlations for highbrow (r = −0.10) and popular (r = −0.09) music with externalizing behavior were negative and significant (p's < 0.01). A preference for rock music (r = 0.03) was not correlated with engagement in externalizing behavior. Table 2 lists descriptive statistics for each of the four networks examined in this study. Results at Time 1 suggested that all four networks did not differ in age, and that there were only some small differences in gender distribution, and externalizing behavior. Table 2 also includes network characteristics for each cohort. Per network and measurement moment, there were between 1 and 5% absent participants during the assessments. The Jaccard index indicates the relative stability of each friendship network over time. The Jaccard indices were between 0.44 and 0.48, well within the desired range for longitudinal social network analyses (). This indicates that friendships are relatively stable, while some changes in friendships occur. Therefore, it is possible to study changes in both friendship connections (making and losing friends) and to study changes in behavior among stable friends. SIENA Estimates of Friends' Influence The outcomes of the meta-analysis of SIENA analyses of four networks are shown in Table 3 for both analyses. First, the structural network effects model the friendship network structure, and optimize the goodness of fit of the networks. It is important to model these effects as they help explain creation and maintenance of friendship. These effects were similar for both analyses and will therefore be explained once. There was a negative density effect ( 1A ), indicating that participants are likely to be selective in their friendship nominations. There was a positive reciprocity effect ( 1B ), indicating that participants are likely to reciprocate friendship nominations. There was a positive transitive triplet effect ( 1C ), which shows that participants are likely to be friends with the friends of their friends. Furthermore, triads were less likely to have reciprocated ties than dyads, which is an indication of hierarchy in the network, as shown by a negative transitive reciprocated triplet effect ( 1D ). Moreover, there was a negative three-cycle effect ( 1E ). In combination with the positive transitive triplet effect this indicated that there was hierarchy in the networks (within triads few participants receive many nominations, while many participants receive fewer nominations). Particularly in period 2, between Time 2 and Time 3, we found a negative indegree -popularity effect ( 1F ). This indicated that those with many friends were less likely to increase their number of friends. The negative effects of indegree-activity ( 1G ) indicated that those participants who received many friendship nominations were less likely to send out nominations themselves. The outdegree activity ( 1H ) was positive, indicating that those with a higher outdegree were more likely to increase the number of friends they select. Second, to examine the first hypotheses that adolescents select their friends both on music preference and on externalizing behavior, the similarity selection effects were estimated for both analyses (Table 3). These effects indicate how adolescents create and maintain friendship, based on several characteristics such as gender or physical proximity (i.e., being in the same classroom). It is important to take such selection effects into account, as they help explain why friends are similar to one another. Three types of effects are important for this part of the model. First, received (or alter) effects ( 2A ); which model whether participants are nominated as friends more frequently based on certain characteristics. Second, sent (or ego) effects ( 2B ); which model whether participants with certain characteristics are more likely to nominate friends. Third, similarity selection effects ( 2C ); which model whether participants are likely to select friends based on similarity in certain characteristics. The main effects of the control variables were generally consistent with prior research. While controlling for the number of friends adolescents select (sent effects) and the number of times they are selected as friends (received effects), participants' selection of friends was significantly associated with similarity in gender and class. Therefore, participants were more likely to befriend peers with the same gender, and those who were part of the same class in school. Partial support was found for the first hypothesis that friendship selection is based on music preferences. These effects indicate whether participants were more likely to befriend others who are similar to them in music preference or externalizing behavior. In the first analysis, without taking effects of friends' externalizing behavior into account, participants were likely to select their friends based on a similarity in both highbrow and urban music preference (positive highbrow and urban similarity selection). Therefore, adolescents who had a preference for highbrow or urban music were more likely to select friends who also had a preference for highbrow or urban music, respectively. The second analysis also took friendship selection based on externalizing behavior into account. Participants were likely to select friends based on a similarity in externalizing behavior. While controlling for this friendship selection based on externalizing behavior (positive externalizing behavior similarity effect), similarity selection based on urban music became non-significant (p = 0.06), but the effect of friendship selection based on similarity in preferences of highbrow music remained significant (positive highbrow similarity selection effect). There was no selection based on similarity in other types of music. Third, to enable a test of the second hypothesis, the change in externalizing behavior was estimated (Table 3). Behavior dynamics (i.e., changes in behavior) model the change in externalizing behavior. The first effects ( 3A ) estimate the change of participants' externalizing behavior. There was a negative linear effect, and a positive quadratic effect for the development of externalizing behavior. The combination of a negative linear effect and a positive quadratic effect indicates that externalizing behavior has a tendency to escalate once it develops: participants were likely to either engage in no externalizing behavior, or to engage in multiple externalizing behaviors. To test the second hypothesis that rock, urban, and dance music preference would be associated with an increased likelihood to develop externalizing behavior ( 3B ), effects from music preference on the development of externalizing behavior were tested. In the first analysis, without taking effects of friends' externalizing behavior into account, music preference in rock, highbrow, popular, or urban music did not affect the development of externalizing behavior (non-significant effects from these types of music preference on externalizing behavior). However, preference for dance music was positively associated with the development of externalizing behavior. Thus, participants who had a preference for dance music were more likely to increase their externalizing behavior. In the second analysis, taking effects of friends' externalizing behavior into account, participants were likely to be influenced by their friends' externalizing behavior in the development of externalizing behavior (positive externalizing behavior average alter ( 3C )), and a preference for dance music still predicted an increase in externalizing behavior. This indicates that participants were likely to adapt their engagement in externalizing behavior to become more similar to their friends, and that there is an additional likelihood for participants who listen to dance music to develop externalizing behavior. In sum, in partial support of the first hypothesis, adolescents were likely to select friends based both on music preference and on externalizing behavior. However, the selection of music preference was limited to a similarity in highbrow music, when taking selection based on externalizing behavior into account. Furthermore, partially supporting the second hypotheses, above and beyond the effects of friends' externalizing behavior, adolescents who listen to dance music were likely to develop externalizing behavior. No friendship influence effects were found for preferences for rock or urban music. Discussion Externalizing behavior is expected to occur more frequently and escalate more quickly among adolescents who prefer rock, urban, or dance music. According to the Music Marker Theory (Ter ), such music preferences might work as a badge, communicating values, attitudes, and opinions (Frith 1981). Peer involvement is expected to mediate between music preference and externalizing behavior. Although similarity in music preference has been associated with friendship (e.g., ;), a proper test of the Music Marker Theory should control for the effects of friends' externalizing behavior. Moreover, effects of friendship selection (adolescents befriend similar others) and influence (adolescents become similar to their friends) have to be disentangled. Therefore, this study set out to investigate whether adolescents select friends based on music preference and/or on a similarity in externalizing behavior, and whether adolescents' preference for rock, urban, or dance music adds to the development of externalizing behavior beyond the influence effects of friends' externalizing behavior. The results were based on two analyses, one excluding and one including the effects of externalizing behavior on friendship selection and on the development of externalizing behavior. The results provide partial support for both hypotheses. Adolescents were likely to select friends based on similarity in music preference, both on a preference for urban and on preference for highbrow music in the model excluding effects of friendship selection based on externalizing behavior. However, in the model taking similarity selection based on externalizing behavior into account, friendships selection was only based on a similarity in highbrow music preference. Moreover, irrespective of friends' externalizing behavior, dance music was indicative for a faster increase in externalizing behavior. This study provides some support for claims by the Music Marker Theory (Ter ) that music preference for certain music styles is an important indicator for externalizing behavior development, but this was limited to dance music only. Both a preference for dance music and friends who engage in externalizing behavior may influence adolescents' engagement in externalizing behavior. Although it was expected that a preference for rock, urban, and dance music would all be associated with externalizing behavior development, only dance music significantly predicted the development of externalizing behavior. Interestingly, dance music has recently also been specifically identified as most consistently associated with several types of externalizing behavior in Europe (Ter ). Therefore, our findings support the idea that dance music, rather than rock or urban music, is currently the music type most associated with externalizing behavior. Moreover, the finding that dance music predicts future externalizing behavior also adds to the claim that music preference works through a badge rather than directly through the music itself or the lyrics. Dance music's lyrics and visuals on TV are much less associated with externalizing behavior, compared to for example, rock or urban music. Thus, the values, attitudes, and opinions transmitted through dance music might be important especially to adolescents. This study took into account that adolescents are likely to befriend peers who are similar in music preference and in externalizing behavior and controlled for the effect of friends' externalizing behavior on participants' own externalizing behavior. Even while controlling for these alternative explanations of the development of externalizing behavior, music preference predicted future externalizing behavior. This is in line with the findings of Ter Bogt and colleagues. However, this is in contrast to the study of Steglich et al. who did not find such influence effects from music preference while investigating alcohol use among 129 adolescents of the age of 13 year, using three yearly assessments. This may possibly be because Steglich et al. focused on alcohol use rather than a more global construct of externalizing behavior. Furthermore, there may have been too few participants, other music preferences such as hip-hop or RnB could have been more important at the time of the study (data was collected starting 1995), or measurement moments could have been too far apart. During secondary school, friends may change their classrooms from one year to another. Friendship selection was not based on similarity in rock, dance, popular, or urban music preferences when taking friendship selection based on externalizing behavior into account. Urban music, however, was associated with friendship selection if friendship selection on externalizing behavior was not taken into account. Thus, friendship selection based on externalizing behavior partially explains friendship selection based on a preference for urban music. In both models with and without externalizing behavior, friendship similarity selection was based on externalizing behavior and on a preference for highbrow music. The selection effect based on highbrow music is in line with the finding of Steglich and colleagues and might indicate that there is a strong basis for early adolescents to select one another on a similarity in preference for highbrow music. When looking at these findings from the perspective of music and externalizing behavior working as badges (Frith 1981), it is possible that externalizing behavior takes over the role of badge that urban music would otherwise have. Possibly the badge of engagement in externalizing behavior, which Moffitt expects to signal social maturity, is more prominent than the musical badge in early adolescence. This would help explain why similarity selection based on a preference for urban music lost its significance when taking friendship selection based on externalizing behavior into account, as urban music preference was positively associated with externalizing behavior. Highbrow music was negatively associated with externalizing behavior, which may help explain why, next to externalizing behavior, adolescents select friends with a similar preference for highbrow music. It would be interesting to further investigate these friendship similarity selection processes, and their underlying motivations. For example, comparing which roles group formation based on music preference and externalizing behavior fulfill would allow a better understanding of these underlying motivations. Both externalizing behavior and urban music might serve to signal friendship selection based on a more mature status or badge, but there might also be different reasons for such friendship selection. For example, in the case of highbrow music preference, music preference might help adolescents obtain a different social goal. Future studies could further investigate these mechanisms. The main strength of this longitudinal network study is that both music preference and externalizing behavior were estimated while taking friendship, embeddedness of friendship in networks, and changes of friendship and externalizing behavior into account. This was done every 3 months after adolescents entered a new network of friends; thus the effects found in this study are likely based on current music preference and externalizing behavior rather than pre-existing friendships. Therefore, this provides a stringent test of the assumption that music preference plays an important role explaining both friendship selection and the development of externalizing behavior during adolescence. Moreover, these analyses were done in two models: one with and one without the effects of externalizing behavior. A second strength of the current study is that we identified profiles of music preference, using principal component analyses. This allowed adolescents to have a profile of music preference, which is more informative compared to basing music preference solely on some exemplary items. As any study, this study also has some limitations. One important limitation is that changes in music preference were not accounted for. It would be interesting to investigate how externalizing behavior and friendship affect changes in music preferences, and how these changes in turn impact externalizing behavior and friendship. Secondly, although friendship similarity selection was modeled, the Music Marker Theory might even better explain effects based on friendship groups or cliques, rather than individual friendships. Thirdly, this study focused on the occurrence of adolescents' externalizing behaviors rather than the frequency with which adolescents engage in such behaviors. Future studies should investigate this frequency, perhaps during later years in adolescence when there is more engagement in externalizing behavior. In such a sample of late adolescents, it might also be possible to compare friendship influence processes with regard to different kinds of externalizing behaviors. Moreover, the current study focused on music preference and the influence of friends. Future studies should take other important aspects for the development of externalizing behavior into account, such as self-control (see Gottfredson and Hirschi 1990) or pubertal development. With the complexity of these findings, future studies should aim to study the impact of musical preference on externalizing behavior in alternative ways. Comparing more detailed differences in music preference, for example differentiating between different types of dance music, might build on these findings and be a good start to further study how music is associated with externalizing problems. Conclusions This study showed that both music preference and friends' externalizing behavior are important in explaining the spread of early adolescent externalizing behavior, and that they do so in an additive manner. Both dance music and friends' externalizing behavior predicted increases in externalizing behavior. Therefore, it is important to take adolescent preference for dance music into account when studying the development of early adolescent externalizing behavior. Adolescents who listen to dance music especially, are more likely than their peers to develop externalizing behaviors. Prevention programs could aim prevention efforts at adolescents who listen to dance music, as they can be easily targeted through their music stations or dance related events. |
<filename>StatePerception/StandardModels.py
"""
@author: <NAME>
"""
# Keras and Tensorflow Imports
from keras.layers import Input, Dense, Dropout, GRU, Multiply, Flatten, CuDNNGRU
from keras.layers import Lambda, Add, Concatenate, Reshape
from keras.layers import GaussianDropout
from keras.layers import Softmax
from keras.callbacks import ReduceLROnPlateau
from keras import regularizers
from keras.optimizers import Adam
from keras import backend as K
import numpy as np
# Custom Imports
from .Model import SPModel
from .KerasLayer import mean_squared_error_convtime100, DerivativeLayer, mse_conv100_w2, BetaFromVyVx, ConstantNormalizationLayer
#class SP_SSE_Gra18(SPModel):
#
# def __init__(self,n_features,n_outputs,name='SSE_Gra18',custom_objects={'mean_squared_error_convtime100':mean_squared_error_convtime100},settings={'loss':mean_squared_error_convtime100,'metrics':[mean_squared_error_convtime100],'opt':Adam,'n_dense':50,'n_gru':10,'activation':'relu','drop_in':0,'drop':0,'l1_reg':0},settings_opt={'lr':0.01}):
# # Init Super
# super().__init__(n_features=n_features,n_outputs=n_outputs,name=name,custom_objects=custom_objects,settings=settings,settings_opt=settings_opt,num_gpus=num_gpus)
# # Model
# self.model_inputs_outputs = self.build_graph(settings)
# self.models, self.models_gpu = self.build_models()
#
# def build_graph(self,settings):
# # Inputs
# inputs_X = Input(batch_shape=(None,None,self.n_features[0]))
# inputs_I = Input(batch_shape=(None,None,1))
# # Keras Core Model
# inputs_drop = Dropout(settings['drop_in'])(inputs_X)
# l1 = Dense(settings['n_dense'],activation=settings['activation'],kernel_regularizer=regularizers.l1(settings['l1_reg']))(inputs_drop)
# l1_drop = Dropout(settings['drop'])(l1)
# l4 = GRU(settings['n_gru'],return_sequences=True,kernel_regularizer=regularizers.l1(settings['l1_reg']))(l1_drop)
# l4_drop = Dropout(settings['drop'])(l4)
# prediction = Dense(self.n_outputs[0],activation='linear',kernel_regularizer=regularizers.l1(settings['l1_reg']))(l4_drop)
# # Multiply Invalid Data Points with Zero
# prediction_valid = Multiply()([prediction,inputs_I])
# # Return Tensors
# Inputs=[inputs_X,inputs_I]
# Outputs0=[prediction_valid]
# Inputs1=[inputs_X]
# Outputs1=[prediction]
# return [[Inputs,Outputs0],[Inputs1,Outputs1]]
#
#class SP_SSE_Gra18_ActReg(SPModel):
#
# def __init__(self,n_features,n_outputs,name='SSE_Gra18',custom_objects={'mean_squared_error_convtime100':mean_squared_error_convtime100},settings={'loss':mean_squared_error_convtime100,'metrics':[mean_squared_error_convtime100],'opt':Adam,'n_dense':50,'n_gru':10,'activation':'relu','drop_in':0,'drop':0,'l1_reg':0,'l2_reg_activation':0.0001},settings_opt={'lr':0.01},num_gpus=None):
# # Init Super
# super().__init__(n_features=n_features,n_outputs=n_outputs,name=name,custom_objects=custom_objects,settings=settings,settings_opt=settings_opt,num_gpus=num_gpus)
# # Model
# self.model_inputs_outputs = self.build_graph(settings)
# self.models, self.models_gpu = self.build_models()
#
# def build_graph(self,settings):
# # Inputs
# inputs_X = Input(batch_shape=(None,None,self.n_features[0]))
# inputs_I = Input(batch_shape=(None,None,1))
# # Keras Core Model
# inputs_drop = Dropout(settings['drop_in'])(inputs_X)
# l1 = Dense(settings['n_dense'],activation=settings['activation'],kernel_regularizer=regularizers.l1(settings['l1_reg']))(inputs_drop)
# l1_drop = Dropout(settings['drop'])(l1)
# l4 = GRU(settings['n_gru'],return_sequences=True,kernel_regularizer=regularizers.l1(settings['l1_reg']))(l1_drop)
# l4_drop = Dropout(settings['drop'])(l4)
# prediction = Dense(self.n_outputs[0],activation='linear',kernel_regularizer=regularizers.l1(settings['l1_reg']))(l4_drop)
# prediction_pp = DerivativeLayer(dt=0.01,order=2,factor=settings['l2_reg_activation'])(prediction)
# # Multiply Invalid Data Points with Zero
# prediction_valid = Multiply()([prediction,inputs_I])
# # Return Tensors
# Inputs=[inputs_X,inputs_I]
# Outputs0=[prediction_valid,prediction_pp]
# Inputs1=[inputs_X]
# Outputs1=[prediction]
# return [[Inputs,Outputs0],[Inputs1,Outputs1]]
#
#class SP_SSE_Gra18_ActReg_InitState(SPModel):
#
# def __init__(self,n_features,n_outputs,name='SSE_Gra18',custom_objects={'mean_squared_error_convtime100':mean_squared_error_convtime100},settings={'loss':mean_squared_error_convtime100,'metrics':[mean_squared_error_convtime100],'opt':Adam,'n_dense':100,'n_gru':20,'activation':'relu','drop_in':0,'drop':0,'l1_reg':0.0001,'l2_reg_activation':0.0001},settings_opt={'lr':0.001},settings_init={'feed_init_state':False,'init_batch_size':1},num_gpus=None):
# # Init Super
# super().__init__(n_features=n_features,n_outputs=n_outputs,name=name,custom_objects=custom_objects,settings=settings,settings_opt=settings_opt,settings_init=settings_init,num_gpus=num_gpus)
# # Model
# self.model_inputs_outputs = self.build_graph()
# self.models, self.models_gpu = self.build_models()
#
# def build_graph(self):
# # Inputs
# if self.settings_init['feed_init_state']:
# inputs_X = Input(batch_shape=(self.settings_init['init_batch_size'],None,self.n_features[0]))
# inputs_I = Input(batch_shape=(self.settings_init['init_batch_size'],None,1))
# else:
# inputs_X = Input(batch_shape=(None,None,self.n_features[0]))
# inputs_I = Input(batch_shape=(None,None,1))
# # Keras Core Model
# inputs_drop = Dropout(self.settings['drop_in'])(inputs_X)
# l1 = Dense(self.settings['n_dense'],activation=self.settings['activation'],kernel_regularizer=regularizers.l1(self.settings['l1_reg']))(inputs_drop)
# l1_drop = Dropout(self.settings['drop'])(l1)
# if self.num_gpus is not(None):
# l4 = GRU(self.settings['n_gru'],return_sequences=True,kernel_regularizer=regularizers.l1(self.settings['l1_reg']),stateful=self.settings_init['feed_init_state'])(l1_drop)
# else:
# l4 = GRU(self.settings['n_gru'],return_sequences=True,kernel_regularizer=regularizers.l1(self.settings['l1_reg']),stateful=self.settings_init['feed_init_state'])(l1_drop)
# l4_drop = Dropout(self.settings['drop'])(l4)
# prediction = Dense(self.n_outputs[0],activation='linear',kernel_regularizer=regularizers.l1(self.settings['l1_reg']))(l4_drop)
# prediction_pp = DerivativeLayer(dt=0.01,order=2,factor=self.settings['l2_reg_activation'])(prediction)
# # Multiply Invalid Data Points with Zero
# prediction_valid = Multiply()([prediction,inputs_I])
# # Return Tensors
# Inputs=[inputs_X,inputs_I]
# Inputs1=[inputs_X]
# Outputs0=[prediction_valid,prediction_pp]
# Outputs1=[prediction]
# return [[Inputs,Outputs0],[Inputs1,Outputs1]]
class SP_SSE_Gra18_ActReg_InitState_WeightedLoss(SPModel):
def __init__(self,n_features,n_outputs,name='SSE_Gra18',custom_objects={'mean_squared_error_convtime100':mean_squared_error_convtime100},settings={'loss':[[mse_conv100_w2,'mse'],[mse_conv100_w2]],'metrics':[mean_squared_error_convtime100],'opt':Adam,'n_dense':100,'n_gru':20,'activation':'relu','drop_in':0,'drop':0,'l1_reg':0.00001,'l2_reg_activation':0.00001},settings_opt={'lr':0.001},settings_init={'feed_init_state':False,'init_batch_size':1},additional_fit_args={'callbacks':[ReduceLROnPlateau(monitor='val_loss', factor=0.1, patience=50, verbose=1, cooldown=100)]},num_gpus=None):
# Init Super
super().__init__(n_features=n_features,n_outputs=n_outputs,name=name,custom_objects=custom_objects,settings=settings,settings_opt=settings_opt,settings_init=settings_init,num_gpus=num_gpus,additional_fit_args=additional_fit_args)
# Model
self.model_inputs_outputs = self.build_graph()
self.models, self.models_gpu = self.build_models()
def build_graph(self):
# Inputs
if self.settings_init['feed_init_state']:
inputs_X = Input(batch_shape=(self.settings_init['init_batch_size'],None,self.n_features[0]))
inputs_I = Input(batch_shape=(self.settings_init['init_batch_size'],None,1))
else:
inputs_X = Input(batch_shape=(None,None,self.n_features[0]))
inputs_I = Input(batch_shape=(None,None,1))
# Keras Core Model
inputs_drop = GaussianDropout(self.settings['drop_in'])(inputs_X)
l1 = Dense(self.settings['n_dense'],activation=self.settings['activation'],kernel_regularizer=regularizers.l1(self.settings['l1_reg']))(inputs_drop)
l1_drop = GaussianDropout(self.settings['drop'])(l1)
if self.num_gpus is not(None):
l4 = CuDNNGRU(self.settings['n_gru'],return_sequences=True,kernel_regularizer=regularizers.l1(self.settings['l1_reg']),stateful=self.settings_init['feed_init_state'])(l1_drop)
else:
l4 = GRU(self.settings['n_gru'],return_sequences=True,kernel_regularizer=regularizers.l1(self.settings['l1_reg']),stateful=self.settings_init['feed_init_state'])(l1_drop)
l4_drop = GaussianDropout(self.settings['drop'])(l4)
prediction = Dense(self.n_outputs[0],activation='linear',kernel_regularizer=regularizers.l1(self.settings['l1_reg']))(l4_drop)
prediction_pp = DerivativeLayer(dt=0.01,order=2,factor=self.settings['l2_reg_activation'])(prediction)
# Multiply Invalid Data Points with Zero
prediction_valid = Multiply()([prediction,inputs_I])
# Return Tensors
Inputs=[inputs_X,inputs_I]
Inputs1=[inputs_X]
Outputs0=[prediction_valid,prediction_pp]
Outputs1=[prediction]
return [[Inputs,Outputs0],[Inputs1,Outputs1]]
class SP_SSE_Gra18_ActReg_InitState_WeightedLoss_AddOutputBeta(SPModel):
def __init__(self,n_features,n_outputs,request_scaled_data=False,name='SSE_Gra18',custom_objects={'mean_squared_error_convtime100':mean_squared_error_convtime100},settings={'loss':[[mse_conv100_w2,mean_squared_error_convtime100,'mse'],[mse_conv100_w2,mean_squared_error_convtime100]],'metrics':[mean_squared_error_convtime100],'opt':Adam,'n_dense':100,'n_gru':20,'activation':'relu','drop_in':0,'drop':0,'l1_reg':0.00001,'l2_reg_activation':0.00001},settings_opt={'lr':0.00001},settings_init={'feed_init_state':False,'init_batch_size':1},additional_fit_args={'callbacks':[]},num_gpus=None):
# Init Super
super().__init__(n_features=n_features,n_outputs=n_outputs,request_scaled_data=request_scaled_data,name=name,custom_objects=custom_objects,settings=settings,settings_opt=settings_opt,settings_init=settings_init,num_gpus=num_gpus,additional_fit_args=additional_fit_args)
# Model
self.model_inputs_outputs = self.build_graph()
self.models, self.models_gpu = self.build_models()
def build_graph(self):
# Inputs
if self.settings_init['feed_init_state']:
inputs_X = Input(batch_shape=(self.settings_init['init_batch_size'],None,self.n_features[0]))
inputs_I = Input(batch_shape=(self.settings_init['init_batch_size'],None,1))
else:
inputs_X = Input(batch_shape=(None,None,self.n_features[0]))
inputs_I = Input(batch_shape=(None,None,1))
# Keras Core Model
inputs_drop = GaussianDropout(self.settings['drop_in'])(inputs_X)
l1 = Dense(self.settings['n_dense'],activation=self.settings['activation'],kernel_regularizer=regularizers.l1(self.settings['l1_reg']))(inputs_drop)
l1_drop = GaussianDropout(self.settings['drop'])(l1)
if self.num_gpus is not(None):
l4 = CuDNNGRU(self.settings['n_gru'],return_sequences=True,kernel_regularizer=regularizers.l1(self.settings['l1_reg']),stateful=self.settings_init['feed_init_state'])(l1_drop)
else:
l4 = GRU(self.settings['n_gru'],return_sequences=True,kernel_regularizer=regularizers.l1(self.settings['l1_reg']),stateful=self.settings_init['feed_init_state'])(l1_drop)
l4_drop = GaussianDropout(self.settings['drop'])(l4)
# Predictinos
prediction_pre = Dense(self.n_outputs[0],activation='linear',kernel_regularizer=regularizers.l1(self.settings['l1_reg']))(l4_drop)
prediction_pre = ConstantNormalizationLayer(scale=np.array([1,2.5]),position='output')(prediction_pre)
# prediction_pre_unscaled = ConstantNormalizationLayer(scale=self.vxy_scale,mean=self.vxy_mean,position='output')(prediction_pre)
# Add Mean Wheel Speeds to v_x prediction
dvx = Lambda(lambda x: K.expand_dims(x[:,:,0],axis=2))(prediction_pre)
vy = Lambda(lambda x: K.expand_dims(x[:,:,1],axis=2))(prediction_pre)
mean_wheelspeeds = Lambda(lambda x: K.expand_dims(K.mean(x[:,:,4:8],axis=2),axis=2))(inputs_X)
vx = Add()([mean_wheelspeeds,dvx])
prediction = Concatenate(name='vxy')([vx,vy])
# Calculate Side Slip Angle
beta = BetaFromVyVx(name='beta')(prediction)
# Derivative of Prediction
prediction_pp = DerivativeLayer(dt=0.01,order=2,factor=self.settings['l2_reg_activation'],name='vxypp')(prediction)
# Multiply Invalid Data Points with Zero
prediction_valid = Multiply(name='vxy_v')([prediction,inputs_I])
beta_valid = Multiply(name='beta_v')([beta,inputs_I])
# Return Tensors
Inputs0=[inputs_X,inputs_I]
Inputs1=[inputs_X]
Outputs0=[prediction_valid,beta_valid,prediction_pp]
Outputs1=[prediction,beta]
return [[Inputs0,Outputs0],[Inputs1,Outputs1]]
#class SP_SSE_Gra18_2X_2Y(SPModel):
#
# def __init__(self,n_features,n_outputs,name='SSE_Gra18',custom_objects={'mean_squared_error_convtime100':mean_squared_error_convtime100},settings={'loss':mean_squared_error_convtime100,'metrics':[mean_squared_error_convtime100],'opt':Adam,'lr':0.01,'n_dense':50,'n_gru':10,'activation':'relu','drop_in':0,'drop':0,'l1_reg':0}):
# # Init Super
# super().__init__(n_features=n_features,n_outputs=n_outputs,name=name,custom_objects=custom_objects,settings=settings)
# # Model
# self.model_inputs_outputs = self.build_graph(settings)
# self.models, self.models_gpu = self.build_models()
#
# def build_graph(self,settings):
# # Inputs
# inputs_X1 = Input(batch_shape=(None,None,self.n_features[0]))
# inputs_X2 = Input(batch_shape=(None,None,self.n_features[1]))
# inputs_X = Concatenate()([inputs_X1,inputs_X2])
# inputs_I = Input(batch_shape=(None,None,1))
# # Keras Core Model
# inputs_drop = Dropout(settings['drop_in'])(inputs_X)
# l1 = Dense(settings['n_dense'],activation=settings['activation'],kernel_regularizer=regularizers.l1(settings['l1_reg']))(inputs_drop)
# l1_drop = Dropout(settings['drop'])(l1)
# l4 = GRU(settings['n_gru'],return_sequences=True,kernel_regularizer=regularizers.l1(settings['l1_reg']))(l1_drop)
# l4_drop = Dropout(settings['drop'])(l4)
# prediction1 = Dense(self.n_outputs[0],activation='linear',kernel_regularizer=regularizers.l1(settings['l1_reg']))(l4_drop)
# prediction2 = Dense(self.n_outputs[1],activation='linear',kernel_regularizer=regularizers.l1(settings['l1_reg']))(l4_drop)
# # Multiply Invalid Data Points with Zero
# prediction_valid1 = Multiply()([prediction1,inputs_I])
# prediction_valid2 = Multiply()([prediction2,inputs_I])
# # Return Tensors
# Inputs=[inputs_X1,inputs_X2,inputs_I]
# Outputs0=[prediction_valid1,prediction_valid2]
# Inputs1=[inputs_X1,inputs_X2]
# Outputs1=[prediction1,prediction2]
# return [[Inputs,Outputs0],[Inputs1,Outputs1]]
class SP_WindowedFeedForward(SPModel):
def __init__(self,
n_features,
n_outputs,
name='SSE_WindowedFF',
request_scaled_X=True,
request_scaled_Y=True,
scales_X=None,
means_X=None,
scales_Y=None,
means_Y=None,
seq2seq_prediction=False,
settings={'loss':['mse'],
'metrics':['mse'],
'opt':Adam,
'window_length':100,
'n_dense':[50],
'activation':'relu',
'drop_in':0,
'drop':0,
'l1_reg':0.0001},
settings_opt={'lr':0.001},
settings_init=None,
additional_fit_args={},
custom_objects=None,
num_gpus=None):
# Init Super
super().__init__(n_features=n_features,
n_outputs=n_outputs,
request_scaled_X=request_scaled_X,
request_scaled_Y=request_scaled_Y,
scales_X=scales_X,
means_X=means_X,
scales_Y=scales_Y,
means_Y=means_Y,
seq2seq_prediction=seq2seq_prediction,
name=name,
custom_objects=custom_objects,
settings=settings,
settings_opt=settings_opt,
settings_init=settings_init,
num_gpus=num_gpus,
additional_fit_args=additional_fit_args)
# Model
self.model_inputs_outputs = self.build_graph(settings)
self.models, self.models_gpu = self.build_models()
def build_graph(self,settings):
# Inputs
inputs_X = Input(batch_shape=(None,
self.settings['window_length'],
self.n_features[0]))
inputs_I = Input(batch_shape=(None,1,1))
# Normalization and Flatten
if self.request_scaled_X is False and self.scales_X_:
inputs_X_scaled = ConstantNormalizationLayer(scale=self.scales_X_[0],
mean=self.means_X_[0],
position='input')(inputs_X)
inputs_flat = Flatten()(inputs_X_scaled)
else:
inputs_flat = Flatten()(inputs_X)
l_drop = Dropout(settings['drop_in'])(inputs_flat)
for n_dense in settings['n_dense']:
l = Dense(n_dense,
activation=settings['activation'],
kernel_regularizer=regularizers.l1(settings['l1_reg']))(l_drop)
l_drop = Dropout(settings['drop'])(l)
prediction = Dense(self.n_outputs[0],
activation='linear',
kernel_regularizer=regularizers.l1(settings['l1_reg']))(l_drop)
# De-Normalization
if self.request_scaled_Y is False and self.scales_Y_:
prediction = ConstantNormalizationLayer(scale=self.scales_Y_[0],
mean=self.means_Y_[0],
position='output')(prediction)
# Multiply Invalid Data Points with Zero
prediction_valid = Multiply()([prediction,inputs_I])
# Return Tensors
Inputs0=[inputs_X,inputs_I]
Outputs0=[prediction_valid]
Inputs1=[inputs_X]
Outputs1=[prediction]
return [[Inputs0,Outputs0],[Inputs1,Outputs1]]
class SP_WindowedFeedForward_Classifier(SPModel):
def __init__(self,
n_features,
n_outputs,
name='SSE_WindowedFF_Class',
request_scaled_X=False,
request_scaled_Y=False,
scales_X=None,
means_X=None,
scales_Y=None,
means_Y=None,
seq2seq_prediction=False,
settings={'loss':['categorical_crossentropy'],
'metrics':['categorical_crossentropy'],
'opt':Adam,
'window_length':100,
'n_dense':[50],
'activation':'relu',
'drop_in':0,
'drop':0,
'l1_reg':0.0001},
settings_opt={'lr':0.001},
settings_init=None,
additional_fit_args={},
custom_objects=None,
num_gpus=None):
# Init Super
super().__init__(n_features=n_features,
n_outputs=n_outputs,
request_scaled_X=request_scaled_X,
request_scaled_Y=request_scaled_Y,
scales_X=scales_X,
means_X=means_X,
scales_Y=scales_Y,
means_Y=means_Y,
seq2seq_prediction=seq2seq_prediction,
name=name,
custom_objects=custom_objects,
settings=settings,
settings_opt=settings_opt,
settings_init=settings_init,
num_gpus=num_gpus,
additional_fit_args=additional_fit_args)
# Model
self.model_inputs_outputs = self.build_graph(settings)
self.models, self.models_gpu = self.build_models()
def build_graph(self,settings):
# Inputs
inputs_X = Input(batch_shape=(None,
self.settings['window_length'],
self.n_features[0]))
inputs_I = Input(batch_shape=(None,1,1))
# Normalization and Flatten
if self.request_scaled_X is False and self.scales_X_:
inputs_X_scaled = ConstantNormalizationLayer(scale=self.scales_X_[0],
mean=self.means_X_[0],
position='input')(inputs_X)
inputs_flat = Flatten()(inputs_X_scaled)
else:
inputs_flat = Flatten()(inputs_X)
l_drop = Dropout(settings['drop_in'])(inputs_flat)
for n_dense in settings['n_dense']:
l = Dense(n_dense,
activation=settings['activation'],
kernel_regularizer=regularizers.l1(settings['l1_reg']))(l_drop)
l_drop = Dropout(settings['drop'])(l)
prediction = Dense(self.n_outputs[0],
activation='linear',
kernel_regularizer=regularizers.l1(settings['l1_reg']))(l_drop)
prediction = Softmax()(prediction)
# Multiply Invalid Data Points with Zero
#inputs_I = Flatten()(inputs_I)
prediction_valid = Multiply()([prediction,inputs_I])
# Return Tensors
Inputs0=[inputs_X,inputs_I]
Outputs0=[prediction_valid]
Inputs1=[inputs_X]
Outputs1=[prediction]
return [[Inputs0,Outputs0],[Inputs1,Outputs1]] |
import React from 'react'
import { Accordion, AccordionButton, AccordionIcon, AccordionItem, AccordionPanel, Box } from '@chakra-ui/react'
import { Store } from 'effector'
import { mountComponents } from '../../common/utils/mountComponents'
import { getAccessor } from '../utils/dataAccess'
import { useCreateTestId } from '../../django-spa/aspects/test-id/TestIdProvider'
/**
* Render props.widgets in data-grid by their layout-properties
* props.widgets: DetailFieldDescription[]
*
* @param props - widget props
*/
const ContainerWidget = (props: any): JSX.Element => {
const {
setInitialValue,
submitChange,
resourceName,
mainDetailObject,
provider,
setMainDetailObject,
refreshMainDetailObject,
notifier,
user,
analytics,
ViewType,
containerStore,
containerErrorsStore,
widgets,
name,
isCollapsible = false,
helpText = '',
style,
accordionProps,
accordionItemProps,
accordionPanelProps,
AccordionButton: UserAccordionButton,
setCurrentState,
} = props
const containerContent = mountComponents({
setInitialValue,
submitChange,
resourceName,
mainDetailObject,
elements: widgets,
provider,
setMainDetailObject,
refreshMainDetailObject,
notifier,
user,
analytics,
ViewType,
containerStore,
containerErrorsStore,
setCurrentState,
})
const context = (containerStore as Store<object>).getState()
const isContainerCollapsible = getAccessor(isCollapsible, mainDetailObject, context)
const { getDataTestId } = useCreateTestId()
return isContainerCollapsible ? (
<Accordion allowToggle pt={4} {...accordionProps} {...getDataTestId(props)}>
<AccordionItem {...accordionItemProps}>
{UserAccordionButton ? (
<UserAccordionButton>{helpText}</UserAccordionButton>
) : (
<h2>
<AccordionButton>
<Box flex="1" textAlign="left">
{helpText}
</Box>
<AccordionIcon />
</AccordionButton>
</h2>
)}
<AccordionPanel pb={4} {...accordionPanelProps}>
{containerContent}
</AccordionPanel>
</AccordionItem>
</Accordion>
) : (
<Box data-name={name} {...getDataTestId(props)} {...style}>
{containerContent}
</Box>
)
}
export { ContainerWidget }
|
Update 2-4-12: A pleasant surprise. Reports say Alicia did NOT lip sync. Wow if true that was incredible live singing.
========================
I haven’t worried too much about the cord cutting angle on this year’s Superbowl. It doesn’t take much work to find out that CBS will offer a live stream this year. And for many more details about Supbowl 2013 streams I defer to this excellent review by Janko at Gigaom.
And I really don’t care that much about Ravens or 49ers except that being on the West Coast it would be nice to see a team from our side of the country win.
But what actually I find more interesting is the hoopla and big money that surrounds the Superowl and yes, whether or not Beyonce is willing and capable of performing the her half time show live – without the benefit of lip syncing. Well according to recent reports, despite the recent kerfuffle about her inaugural performance, Beyonce says she will not be lip syncing during the half time show.
Actually that’s not such a big deal. Why? Because the half time show is typically a muddy noisy mash-up with so many people on a movable stage that little slips get lost in the sauce. I didn’t even know about Janet Jackson’s famous wardrobe failure in 2004 until I heard about it after the game.
What really takes guts – and talent – is to sing the national anthem live. In that couple of minutes you have the world listening to basically just your voice. This year we have Alicia Keys kicking off so to speak and my bet is that this performance is going to be lip synced. Unfortunately I don’t see one of those novelty bets for that or I’d be putting some money down. It will be easy to tell. Live performances seldom sound flawless. Lip synced ones almost always do.
Take this most famous performance by Whitney Houston in 1991 (embedded below). It’s perfect. If Alicia sounds that impeccable she’ll be lip syncing. If she stutters a bit, drifts just a little off key, then that’s live, and that’s really what I’d like to see. Enjoy the game. |
Effects of dietary supplementation with vitamin E, riboflavin and selenium on central nervous system oxygen toxicity. We attempted to modify the resistance of rats to hyperbaric oxygen (HBO)-induced central nervous system (CNS) toxicity, by increasing the tissue antioxidant potential through dietary factors. Groups of rats were fed excesses of vitamin E (VIT E) alone or in combinations with riboflavin (RIB), selenium (Se) or both, for 30 days. A control group was maintained on an unsupplemented diet. On the 23rd day animals to be exposed were implanted with chronic electrodes for electrocorticographic (ECoG) recording. Later, each group was divided into two subgroups, of which one was exposed to 4.5 atmospheres absolute (ATA) of 100% oxygen (O2) for 30 min., hereafter referred to as "exposed", noting the time of appearance of first electrical discharge (FED) in their ECoG. The remaining subgroups were left unexposed. Forty-eight hours later, all animals were sacrificed and some of their tissues were analyzed for glutathione (GSH). The GSH level in the liver, brain, lungs and blood of all experimental subgroups were significantly higher than in the control unexposed counterparts. Combinations of RIB and/or Se with VIT E failed to show a greater increase in GSH over VIT E alone. This increase was, however, not accompanied by a meaningful delay in the appearance of FED. Forty-eight hours post-exposure, the brain GSH levels of all exposed subgroups were still lower than the respective pre-exposure levels. Yet, in the treated exposed subgroups the GSH levels observed 48 hr after exposure were already higher than in the untreated unexposed controls.(ABSTRACT TRUNCATED AT 250 WORDS) |
Ecological Footprint Scenario Based on Dynamic System Model in Gerbangkertosusila Region Surabaya Metropolitan Area (SMA) comprising Gerbangkertosusila Region in East Java is the prime driver for the regional economic activity at the provincial and national scales. However, increasing regional economic growth has insignificantly contributed to environmental sustainability as shown by the ecological deficit. A suitable scenario should be formulated within this region during sustainability development. In general, carrying capacity is closely related to resource usage limits of people in a particular area. This study aimed to examine several scenarios using the dynamic systems method of ecological footprint approach analysis to formulate a strategy for environmental sustainability within SMA. An ecological footprint approach was used to identify natural resource consumption components and resource availability for each land use. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.