content
stringlengths
7
2.61M
package frc.robot.wrappers; import edu.wpi.first.wpilibj.Joystick; import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; import edu.wpi.first.wpilibj.DriverStation; public class JoystickWrapper extends Wrapper{ Joystick js; double deadZone; int port; public JoystickWrapper(int port) { try{ this.port = port; js = new Joystick(this.port); deadZone = 0.1; isInitialized = true; } catch (RuntimeException ex ) { DriverStation.reportError("Error Initiating Joystick: " + ex.getMessage(), true); } } public double getRawAxis(int ID) { if (isInitialized) { SmartDashboard.putNumber("Joystick"+ID, js.getRawAxis(ID)); if (Math.abs(js.getRawAxis(ID)) < deadZone) { return 0.0; } return js.getRawAxis(ID); } return 0; } public boolean getRawButton(int ID) { if (isInitialized) return js.getRawButton(ID); return false; } public double getPOV() { if (isInitialized) return js.getPOV(); return -1; } }
<gh_stars>100-1000 /* * arch/sh/mm/cache-sh2.c * * Copyright (C) 2002 <NAME> * * Released under the terms of the GNU GPL v2.0. */ #include <linux/init.h> #include <linux/mm.h> #include <asm/cache.h> #include <asm/addrspace.h> #include <asm/processor.h> #include <asm/cacheflush.h> #include <asm/io.h> void __flush_wback_region(void *start, int size) { unsigned long v; unsigned long begin, end; begin = (unsigned long)start & ~(L1_CACHE_BYTES-1); end = ((unsigned long)start + size + L1_CACHE_BYTES-1) & ~(L1_CACHE_BYTES-1); for (v = begin; v < end; v+=L1_CACHE_BYTES) { /* FIXME cache purge */ ctrl_outl((v & 0x1ffffc00), (v & 0x00000ff0) | 0x00000008); } } void __flush_purge_region(void *start, int size) { unsigned long v; unsigned long begin, end; begin = (unsigned long)start & ~(L1_CACHE_BYTES-1); end = ((unsigned long)start + size + L1_CACHE_BYTES-1) & ~(L1_CACHE_BYTES-1); for (v = begin; v < end; v+=L1_CACHE_BYTES) { ctrl_outl((v & 0x1ffffc00), (v & 0x00000ff0) | 0x00000008); } } void __flush_invalidate_region(void *start, int size) { unsigned long v; unsigned long begin, end; begin = (unsigned long)start & ~(L1_CACHE_BYTES-1); end = ((unsigned long)start + size + L1_CACHE_BYTES-1) & ~(L1_CACHE_BYTES-1); for (v = begin; v < end; v+=L1_CACHE_BYTES) { ctrl_outl((v & 0x1ffffc00), (v & 0x00000ff0) | 0x00000008); } }
One of the great debates in the social science of poverty asks what accounts for the decline in marriage and the increase in out-of-wedlock births. There is a broad consensus among scholars of diverse ideological persuasions that children born into stable marriages tend to fare better in life than those raised by single mothers. The question is why the institution of marriage has declined so precipitously among lower-income Americans even while it remains strong and vibrant among affluent Americans. In a new paper, “Male Earnings, Marriageable Men, and Nonmartial Fertility: Evidence from the Fracking Boom,” Melisa S. Kearney and Riley Wilson frame the issue this way: In 2014, over 40 percent of all births in the U.S. were to an unmarried mother, with an even higher rate of 62 percent among non-college educated mothers. A leading conjecture as to why so many less-educated women are choosing motherhood without marriage points to the weak economic prospects of their male partners. The idea is that changing labor market structures and economic conditions have adversely affected the economic prospects of less educated men, making them less “marriageable” from the perspective of the women with whom they sexually partner. Kearney and Wilson have flipped that conjecture around and hypothesize that improving earnings prospects by non-college educated males would be associated with an increase in marriage and marital childbirth. They tested that hypothesis by examining family formation between 1997 and 2012 in Census micro-areas experiencing a natural gas fracking boom, where non-college educated males experienced a jump in earnings compared to their peers in the rest of the country. The result: “This analysis does not indicate shift toward marriage in response to an increase in the potential wages of less-educated men associated with localized fracking booms. But both marital and non-marital births increase significantly.” The authors compared the fracking boom of the 2000s to the Appalachian coal boom of the 1970s and 1980s. Back then, in a different cultural era, increased earnings led to an increase in marriage rates, an increase in the marital birth rate, and a decline in the non-marital birth rate.” In other words, the conjecture linking men’s income with their marriage prospects may have been valid 4o years ago, but it’s less valid today. Write Kearney and Wilson: “As non-martial births have become increasingly common, individuals are more likely to respond to increased income with increased fertility, whether or not they are married, and not necessarily an increased likelihood of marriage.” Bacon’s bottom line: The interplay of economics and culture is incredibly complex. But the findings suggest that among a large portion of the American population, marriage is increasingly viewed as optional — regardless of the father’s economic circumstances. Further, out-of-wedlock birth is no longer stigmatized. This research calls into question the idea that blue-collar male earnings are the main stumbling block to family stability. We have passed a cultural Rubicon, and there may be no going back without a major change in values. Like this: Like Loading... Related There are currently no comments highlighted.
/** * An encoded rating value id. */ public ProductReviewRatingValueMetadataQuery valueId() { startField("value_id"); return this; }
Cytotoxic Barrigenol-like Triterpenoids from an Extract of Cyrilla racemiflora Housed in a Repository. Two new and four known barrigenol-like triterpenoids, along with betulinic acid and (+)-3-O-trans-feruloylbetulinic acid, were isolated from a sample-restricted CH2Cl2-soluble extract of the bark of Cyrilla racemiflora, collected in Dominica. The structures of the new compounds were elucidated by interpretation of their spectroscopic data, and the absolute configuration of the cyclic 1,2-diol unit of (+)-cyrillin A was ascertained by analysis of the electronic circular dichroism (ECD) spectrum induced with . In the case of (+)-cyrillin B, which was found to contain a diangeloylated glucose residue, the structure proposed was supported by analysis of its MS and MS spectra. All compounds isolated were evaluated for their cytotoxicity against HT-29 human colon cancer cells, and the known compound, (+)-barringtogenol B, was found to be the most potent, exhibiting an IC50 value of 1.7 M. This compound also showed inhibitory activity toward the CCD-112CoN human normal colon cell line, with an IC50 value of 5.9 M, indicating a lack of cytotoxic selectivity.
The present invention relates to a method of and to an apparatus for making so-called soft-core cigarettes and analogous rod-shaped articles of the tobacco processing industry wherein the central portion of the fibrous filler is softer than the surrounding portion. The invention also relates to rod-shaped articles which are obtained in accordance with the improved method and by using the improved apparatus. German Pat. No. 11 64 907 discloses the making of cigarettes which are provided with axially extending holes as a result of the utilization of a stationary mandrel which is embedded in the tobacco stream and continuously discharges a stabilizer in order to avoid clogging or filling of the hole which is formed by the mandrel. British Pat No. 1,086,443 discloses a cigarette which has a centrally located hole bounded by a cylindrical surface, or which has a centrally located core of lesser density. Published British patent application No. 2 150 408 discloses a method of forming a cigarette filler with a less densified inner region. The method includes forming a tobacco stream having a U-shaped cross-sectional outline and closing the stream by bending the legs of the U toward each other. Published British patent application No. 2 150 008 discloses a method which is also used to form a tobacco filler having a softer central portion. The filler is obtained by forming two tobacco streams each of which has a U-shaped cross-sectional outline and by superimposing one of the streams upon the other. The thus superimposed streams are then densified while surrounding a stationary mandrel. A drawback of heretofore known proposals is that the cigarettes must be produced in specially designed machines deviating completely from those which are used for the making of conventional cigarettes.
With the rise of virtual reality, spatial (three-dimensional) audio has proven to be of utmost importance for crafting truly immersive experiences, which is why OSSIC has launched its Kickstarter campaign to fund the production of the world’s most advanced 3D headphones. Having raised over 13 times its initial goal for $100,000 USD [which was reached in two and a half hours after the page was published] to develop the world-class technology, its evident that there’s a clear market need for OSSIC X. We talked with founder and CEO Jason Riggs for the lowdown on how they work and what sets these headphones apart.
<filename>src/pi_timer_gpio.c /********************************************************************** // Copyright (c) 2016 <NAME> & <NAME> // // 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. // **********************************************************************/ #pragma clang diagnostic push #pragma ide diagnostic ignored "UnusedImportStatement" #include "pi_timer_gpio.h" #include "pi_timer_settings.h" #include "pi_utils.h" #include "version_config.h" // Checking to see if we are on a Raspberry PI // #ifndef BCMHOST #define ENABLE_PI_EMULATOR 1 #endif #ifndef ENABLE_PI_EMULATOR #include <wiringPi.h> #else #define gpio_pin_count 26 gpio_signal gpio_list[gpio_pin_count]; #endif void setup_wring_pi() { DEBUG_LOG("Setting output pin mode on %d", get_pin()); #ifndef ENABLE_PI_EMULATOR wiringPiSetup(); pinMode((int) get_pin(), OUTPUT); #else INFO_LOG("WARNING: Running in emulation mode"); for (int i = 0; i < gpio_pin_count; i++) { gpio_list[i] = LOW_SIGNAL; } #endif } gpio_signal get_gpio(unsigned char pin) { gpio_signal result = LOW_SIGNAL; #ifndef ENABLE_PI_EMULATOR result = digitalRead((int) pin) == LOW ? LOW_SIGNAL : HIGH_SIGNAL; #else if (pin < gpio_pin_count) { result = gpio_list[pin]; } #endif return result; } const char *get_gpio_str(unsigned char pin) { return get_gpio(pin) == LOW_SIGNAL ? "LOW" : "HIGH"; } gpio_signal set_gpio(unsigned char pin, gpio_signal value) { gpio_signal result = LOW_SIGNAL; #ifndef ENABLE_PI_EMULATOR result = digitalRead((int) pin); digitalWrite((int) pin, value == LOW_SIGNAL ? LOW : HIGH); #else if (pin < gpio_pin_count) { result = gpio_list[pin]; gpio_list[pin] = value; } #endif return result; } #pragma clang diagnostic pop
""" Quick and dirty MQTT door sensor """ import time import network import ubinascii import machine from umqttsimple import MQTTClient import esp import adcmode try: import secrets except: import secrets_sample as secrets try: ### Create wifi network sta_if = network.WLAN(network.STA_IF) sta_if.active(True) print("wifi: connecting") sta_if.connect(secrets.SSID, secrets.PASSWD) # Connect to an AP try: sta_if.ifconfig((secrets.IPADDR, secrets.MASK, secrets.GW, secrets.DNS)) except: print("using DHCP...") ### Setup ADC to measure VCC if not adcmode.set_adc_mode(adcmode.ADC_MODE_VCC): print("ADC mdode changed in flash - restart needed") machine.reset() vcc = machine.ADC(1).read()/1024.0 while not sta_if.isconnected(): time.sleep(0.5) print("wifi connected: ", sta_if.ifconfig()) ### connect to MQTT CLIENT_ID = ubinascii.hexlify(machine.unique_id()) client = MQTTClient(CLIENT_ID, secrets.MQTT_SVR, user=secrets.MQTT_USER, password=<PASSWORD> ) client.connect() print("mqtt: connected") payload = secrets.MQTT_PAYLOAD.format(vcc) client.publish(secrets.MQTT_TOPIC, payload) print("mqtt: published %s: %s"%(secrets.MQTT_TOPIC, payload)) client.disconnect() print("mqtt: disconnected") except Exception as e: print( "FATAL: ", type(e) ) print( " ", repr(e) ) time.sleep(0.1) # without this, deepsleep doesn't work well esp.deepsleep(0)
/** Class to transmit RTCP packets. Called inside RtpSession. @see RtpSession */ class RtcpTransmitter { public: RtcpTransmitter (uint16 tos, uint32 priority, const string& local_ip, const string& local_dev_to_bind_to, const char* remoteHost, int remoteMinPort, int remoteMaxPort, RtcpReceiver* receiver); RtcpTransmitter (uint16 tos, uint32 priority, const string& local_ip, const string& local_dev_to_bind_to, const char* remoteHost, int remotePort, RtcpReceiver* receiver); void constructRtcpTransmitter (); ~RtcpTransmitter (); int transmit (RtcpPacket& packet); void updateInterval (); int checkInterval (); int addSR (RtcpPacket* packet, int npadSize = 0); int addSDES (RtcpPacket* packet, RtcpSDESType item, int npadSize = 0); int addSDES (RtcpPacket* packet, int npadSize = 0); int addSDES (RtcpPacket* packet, RtcpSDESType* SDESlist, int npadSize = 0); int addBYE (RtcpPacket* packet, char* reason = NULL, int npadSize = 0); int addBYE (RtcpPacket* packet, RtpSrc* list, int count, char* reason = NULL, int npadSize = 0); int addAPP (RtcpPacket* packet, int newpadbyeSize = 0); u_int32_t calcLostFrac (Sptr<RtpTranInfo> source); u_int32_t calcLostCount (Sptr<RtpTranInfo> source); void setSdesCname (); void setSdesName (char* text); void setSdesEmail (char* text); void setSdesPhone (char* text); void setSdesLoc (char* text); void setSdesTool (char* text); void setSdesNote (char* text); char* getSdesCname (); char* getSdesName (); char* getSdesEmail (); char* getSdesPhone (); char* getSdesLoc (); char* getSdesTool (); char* getSdesNote (); Sets RTP transmitter if one is used void setRTPtran (RtpTransmitter* tran); Sets RTCP transmitter if one is used void setRTPrecv (RtpReceiver* recv); Sets RTCP receiver if one is used void setRTCPrecv (RtcpReceiver* rtcpRecv); Port this tramsitter is sending it singal int getPort (); Socket File Descriptor used for select() int getSocketFD (); get the ptr of my UdpStack Sptr<UdpStack> getUdpStack() { return myStack; } NetworkAddress* getRemoteAddr () { return &remoteAddr; } void setRemoteAddr (const NetworkAddress& theAddr) ; private: Next time to submit RTCP packet NtpTime nextInterval; Transmission interval in ms static const int RTCP_INTERVAL; SDESdata* SDESInfo; RtpTransmitter* tran; RtpReceiver* recv; RtcpReceiver* rtcpRecv; my UDP stack Sptr<UdpStack> myStack; NetworkAddress remoteAddr; }
The environment and minor-party insurgency in Australian politics: the case of logging and the liberals for forests It is known that many LiberalNational voters are environmentally conscious. However, the lack of importance of environmentalism in influencing voter behaviour in Australia, compared with socio-economic ideologies and issues, means that few LiberalNational identifiers are likely to find appeal in the parties which place most emphasis on protecting the natural environment, as these parties are generally Left-leaning with regard to socio-economic policy. Given the balance of influences on the vote, LiberalNational vulnerability on environmental issues would seem to be most exploitable by a Right-of-Centre environmental party. This article examines the case of the liberals for forests, a rare example of just such a party, which had some success in Western Australian State elections in 2001. The paper supports the notion that environmental issues, including those such as logging often linked with Left partisan ship, have the potential to influence vote choice, in a positive sense, on the Right as well as the Left of Australian politics. Implications for the Liberal Party and the party system are discussed.
/** * @author Pradyot H Adavi */ @Data public class Name implements Serializable { private String firstName; private String middleName; private String lastName; }
<reponame>xcmyz/FastVocoder<filename>bin/preprocess.py import argparse import os import numpy as np import data.audio as audio import hparams as hp import random from tqdm import tqdm from functools import partial from concurrent.futures import ProcessPoolExecutor from multiprocessing import cpu_count CPU_NUM = cpu_count() // 2 MULTI_PROCESS = True def preprocess(data_path_file, save_path): os.makedirs(save_path, exist_ok=True) audio_index = [] mel_index = [] with open(data_path_file, "r") as f: lines = f.readlines() for i in tqdm(range(len(lines))): filename = lines[i] try: wav_filepath = os.path.join(filename[:-1]) wav_filename = filename[:-1].split("/")[-1] mel_filepath = os.path.join(save_path, f"{wav_filename}.mel.npy") y = audio.load_wav(wav_filepath, encode=False) new_wav_filepath = os.path.join(save_path, f"{wav_filename}.npy") mel = audio.melspectrogram(y) np.save(mel_filepath, mel) np.save(new_wav_filepath, y) audio_index.append(new_wav_filepath) mel_index.append(mel_filepath) except Exception as e: print(f"ERROR: {str(e)}") return audio_index, mel_index def kernel(wav_filepath, mel_filepath, new_wav_filepath): try: y = audio.load_wav(wav_filepath, encode=False) mel = audio.melspectrogram(y) np.save(mel_filepath, mel) np.save(new_wav_filepath, y) return mel.shape[1] except Exception: pass def preprocess_multiprocessing(data_path_file, save_path): executor = ProcessPoolExecutor(max_workers=CPU_NUM) futures = [] os.makedirs(save_path, exist_ok=True) audio_index = [] mel_index = [] with open(data_path_file, "r") as f: lines = f.readlines() for i in tqdm(range(len(lines))): filename = lines[i] wav_filepath = os.path.join(filename[:-1]) wav_filename = filename[:-1].split("/")[-1] mel_filepath = os.path.join(save_path, f"{wav_filename}.mel.npy") new_wav_filepath = os.path.join(save_path, f"{wav_filename}.npy") audio_index.append(new_wav_filepath) mel_index.append(mel_filepath) futures.append(executor.submit(partial(kernel, wav_filepath, mel_filepath, new_wav_filepath))) length_list = [future.result() for future in tqdm(futures)] print(f"min length of mel spectrogram is {min(length_list)}.") return audio_index, mel_index def write_file(audio_index, mel_index, index_list, file_name, audio_index_path, mel_index_path): with open(os.path.join(audio_index_path, file_name), "w", encoding="utf-8") as f: for index in index_list: f.write(audio_index[index] + "\n") with open(os.path.join(mel_index_path, file_name), "w", encoding="utf-8") as f: for index in index_list: f.write(mel_index[index] + "\n") def run_preprocess(): parser = argparse.ArgumentParser() parser.add_argument('--data_path', type=str, default=os.path.join("dataset", "ljspeech.txt")) parser.add_argument('--save_path', type=str, default=os.path.join("dataset", "processed")) parser.add_argument('--audio_index_path', type=str, default=os.path.join("dataset", "audio")) parser.add_argument('--mel_index_path', type=str, default=os.path.join("dataset", "mel")) args = parser.parse_args() audio_index, mel_index = 0, 0 if MULTI_PROCESS: audio_index, mel_index = preprocess_multiprocessing(args.data_path, args.save_path) else: audio_index, mel_index = preprocess(args.data_path, args.save_path) os.makedirs(args.audio_index_path, exist_ok=True) os.makedirs(args.mel_index_path, exist_ok=True) assert len(audio_index) >= (hp.train_size + hp.valid_size + hp.eval_size) index_list = [i for i in range(hp.train_size + hp.valid_size + hp.eval_size)] random.shuffle(index_list) index_list_train = index_list[0:hp.train_size] index_list_valid = index_list[hp.train_size:hp.train_size + hp.valid_size] index_list_eval = index_list[hp.train_size + hp.valid_size:hp.train_size + hp.valid_size + hp.eval_size] write_file(audio_index, mel_index, index_list_train, "train", args.audio_index_path, args.mel_index_path) write_file(audio_index, mel_index, index_list_valid, "valid", args.audio_index_path, args.mel_index_path) write_file(audio_index, mel_index, index_list_eval, "eval", args.audio_index_path, args.mel_index_path)
Prevalence and Predictors of High Sexual Prejudice Among Medical Students From Two Colombian Cities Around the world, sexual prejudice is still a concerning attitude present in health care providers and institutions. Identification of sexual prejudice during medical training could be an initial strategy to improve health care assistance to this particular population. Despite significant knowledge in the area, almost all previous studies were based on samples from developed countries, and there are no studies evaluating sexual prejudice and its conditionings among Latin American medical students. Objectives of the study were to estimate prevalence and predictors of sexual prejudice among medical students from two large cities in Colombia. This research found that 22.9% of medical students had a high sexual prejudice. Males and individuals with high religiosity were associated with a higher sexual prejudice and may require more sensitization and education in the area. Medical training represents a very good opportunity to approach the problem and decrease sexual prejudice in future physicians. Introduction Homophobia is generally understood as a negative attitude or disposition to homosexual people. However, there is controversy about this name, not only about the term itself but also on the dimensions covered by the construct (Ahmad & Bhugra, 2010;Chonody, 2013;Herek, 2000Herek,, 2004. The greatest objection to the name of homophobia lies in the point that this negative attitude toward homosexual people is not really a phobia, but a prejudice. According to the American Psychiatric Association and the World Health Organization, a phobia is a clinical disorder characterized by a marked and persistent fear that is excessive or unreasonable beliefs that trigger an object, event, or situation; in most cases, people presenting these statements recognize the nature of this unfounded and disproportionate fear. However, people showing a negative attitude toward homosexuals do not do so because they perceive that their physical and emotional integrity is compromised, and they also consider their attitudes as justified. Consequently, authors have proposed several nominations for the unfavorable attitude toward homosexual people. First, K. T. Smith introduced the term homophobia in the medical context (Medline) as a "negative," "repressive," or "fearful" response toward homosexuality. However, in some academic circles, it is said that Weinberg coined and first used the term homophobia prior to Smith. Given the etymological and conceptual vagueness of the term homophobia, other names were proposed: homonegativity (Hudson & Ricketts, 1980), homoprejudice, heterosexism, and sexual prejudice (Chonody, 2013;Herek, 2000Herek,, 2004. Herek defined sexual prejudice as having opposing attitudes toward a person because of his or her sexual orientation. Heterosexuals' aversive attitudes also include homosexual behavior and the community of gay, lesbian, bisexual, transsexual, and transgender people. In this study, the authors prefer to use the term sexual prejudice rather than homophobia as it is a more neutral term and makes no assumptions about underlying reasons that account for the negative attitudes toward homosexuals (Herek, 2000(Herek,, 2004. This conceptualization is consistent with the perspective of social psychology that considers that stigma, prejudice, and discrimination are widely interrelated. Then, sexual stigma implies a negative differentiation by non-heterosexual sexual orientation. This point of view translates into negative stereotyping of homosexual people (prejudicial attitudes) that, finally, aims to social exclusion or discriminatory behaviors (Phelan, Link, & Dovidio, 2008). Despite significant knowledge in the area, previous studies were based on samples from developed countries (;;;;;Parker & Bhugra, 2000;;;). To the best of our knowledge, there are no studies evaluating sexual prejudice and its conditionings among medical students from Latin America or other developing countries. Besides local implications, this is a relevant issue since the majority of migration of health care professionals and physicians in particular occurs from developing to developed countries (Gadit, 2008;Scott, Whelan, Dewdney, & Zwi, 2004). Indeed, about a quarter of board certified doctors in the United States received medical education in a foreign country (National Residency Matching Program, 2011; U.S. Department of Health and Human Services, Centers for Disease Control and Prevention, National Center for Health Statistics, 2009), with a large part of them being from Latin America (Association of American Medical Colleges, Diversity Policy and Programs, 2010). We hypothesized that sexual prejudice in a sample from medical students in Colombia would be at least as high as in developed countries, with similar predictors as for their counterparts from developed countries. To examine this hypothesis, we designed a study which aimed to estimate the prevalence and predictors of sexual prejudice among medical students from two large Colombian Andean cities. Participants The study sample consisted of 948 medical students above 18 years old from Bogota and Bucaramanga, a large city and a medium-sized city, respectively, in the Colombian Andean region. Informed consent was provided by all the participants according to Institutional Review Board regulations. Procedure As part of a cross-sectional study, researchers asked medical school students to take part in a survey regarding their attitudes toward homosexual men and women. Study participation was voluntary, without compensation and under conditions of confidentiality and anonymity. Students received an envelope containing the questionnaires; they completed the questionnaires in a classroom and returned them in a closed envelope. The questionnaire gathered information regarding age, gender, medical school year, religion, and socioeconomic status (SES) according to the city's classification of neighborhoods' public service fees. In addition, participants completed the Spanish version of the five-item Francis Scale of Attitude Toward Christianity (Campo-Arias, Oviedo, & Cogollo, 2009;Miranda-Tapia, Cogollo, Herazo, & Campo-Arias, 2010) and the Homophobia Scale by Bouton et al.. All procedures received full ethical review and approval from the Institutional Review Board. Measurements The five-item Francis Scale of Attitude Toward Christianity is a Likert-type scale that assesses attitudes toward key aspects of religiosity (;). It allows quantification of intrinsic religiosity in relation to Catholicism and Christianity, which are highly prevalent in Colombia, as well as other Latin American countries (Central Intelligence Agency, Office of Public Affairs, 2012). Each item gives five options measured from 1 to 5, ranging from strongly disagree to strongly agree. Higher final scores represent higher religiosity. Scores above 16 were considered "high religiosity." This instrument has been used in previous studies showing high internal consistency and stability (;). The original English version of the Homophobia Scale proposed by Bouton et al. was translated into Spanish by two professionals. In addition, a native speaker back translated into English. Differences between the original and the back-translated English versions were discussed and resolved, resulting in corrections of the initial Spanish translations. The Homophobia Scale is a seven-item scale that assesses attitudes toward homosexuality, including behavior, values, rights, penalty, and contribution to society of nonheterosexual men and women. Scores range from 7 to 35. Higher scores represent less acceptability of homosexuality. We dichotomized scores above 22 as "high sexual prejudice," after observing score distribution. Statistical Data Analyses Prevalence of all the covariates and the dependent variables was calculated for the sample. Odds ratios (ORs) with a 95% confidence interval were used to measure the association of the covariates with "high sexual prejudice" as the dependent variable in a simple logistic regression model according to Greenland. Those analyses were followed by a binomial logistic regression model to account for confounders. The Hosmer-Lemeshow test of goodness of fit was obtained for the model (Hosmer, Taber, & Lemeshow, 1991). All the analyses were obtained using SPSS version 19.0 (SPSS Inc., 2010). Results A total of 779 students (82.2%) completed questionnaires; however, 112 questionnaires (11.8%) with missing data were excluded from the analysis. Then, the study sample consisted of 667 medical students. The overall survey response rate was 70.3%. According to city, 51.1% of students were from Bogota and 48.9% from Bucaramanga. Regarding their year of education, 407 (61.0%) of the participants were in their first or second year of medical school, while 260 (39.0%) were completing clinical rotations in their third to fifth year. Sociodemographic Characteristics, Religious, and Sexual Prejudice in the Sample The ages of the respondents ranged between 18 and 31 years, with a mean of 20.1 years (SD = 2.7 years). A total of 361 participants (54.1%) were between 18 and 20 years old and 306 (45.9%) were older than 20; 404 participants (60.6%) were women and 263 (39.4%) were men; and 150 students (22.5%) reported a high SES as opposed to 517 (77.5%) who reported a non-high SES. Scores on the Homophobia Scale ranged from 7 to 34 (M = 17.9, median = 18, mode = 1 8, SD = 5.5). Data did not show a normal distribution (Shapiro-Francia test, p =.003), so interquartile range (IQR) was taken as a cut-off point (IQR = 14 to 21). Values lower than 14 were categorized as low sexual prejudice; between 14 and 21, medium; and 22 or above, high sexual prejudice. Internal consistency as estimated by Cronbach's alpha was very good (.79). A total of 146 students (21.6%) reported low sexual prejudice; 368 (55.2%), medium; and 153 (22.9%), high. So, the group of students who scored low and medium sexual prejudice was as similar as in terms of age, gender, clinical rotation, SES, religious affiliation, and religiosity, and they were taken as one category in the analysis. Association of Predictors to "High Sexual Prejudice" The associations between the assessed variables and sexual prejudice are presented in Tables 1 and 2. In the bivariate model, male gender, high religiosity, and Protestant religion other than Catholic and other affiliation were significantly associated with high sexual prejudice. The multivariate model that followed included high religiosity, Protestants other than Christian religion, and male gender, which significantly increased the risk for high sexual prejudice about twofold. Discussion An estimated 22.9% of medical students from two Colombian cities had a high sexual prejudice. Of several investigated predictors for sexual prejudice in this population, high religiosity, Protestant affiliation more than other affiliations, and male gender were found to be significant and potentially relevant targets of intervention for sensitization of medical students toward sexual prejudice and homosexuality. In our study, 22.9% of medical students reported a high sexual prejudice. Ranges of sexual prejudice in previous studies in medical students are from around 15% in samples from the United States and the United Kingdom (;Parker & Bhugra, 2000;;) to 25% in samples from Hong Kong, Austria, and a sample from the Midwest of the United States (;Dhaliwal, Crane, Valley, & Lowenstein, 2013;;). According to our findings, sexual prejudice is highly prevalent among physicians in training in Colombia. Different cultural and societal factors could explain the higher sexual prejudice among Hispanic societies. Stronger male roles, conservatism, and high religiosity could explain part of the difference (Estrada, Rigali-Oiler, Arciniega, & Tracey, 2011;Seltzer, 1992;Torres, Solberg, & Carlstrom, 2002;). The lack of association between age and sexual prejudice in the present study is inconsistent with previous research among college students. Jenkins, Lambert, and Baker ;Johnson, Brems, and Alford-Keating ; and Parker and Bhugra reported that older age was associated with more positive attitudes toward homosexuality. However, Lambert, Ventura, Hall, and Cluse-Tolar did not find any association. It is uncertain how chronological age contributes for attitudes toward homosexuality in college students. In our study, the predictors of high sexual prejudice were male gender and high religiosity. The finding that male medical students had a higher sexual prejudice than women has also been found in previous studies (;). Given the higher visibility of homosexuality among men compared with women, it could be possible for men to report sexual prejudice more than women. It has also been proposed that males have much more to lose than females by challenges to traditional sex roles (Baker & Fishbein, 1998), and it could be represented as more sexual prejudice (Herek & Gonzalez-Rivera, 2006). Regarding years of medical training, we did not find any difference between students in preclinical years and students in the clinical stage who had regular contact with all kinds of patients. Similarly, in China, Hon et al. found no significant differences between attitudes of medical students in the clinical stage and those in their preclinical years. However, Jenkins et al. observed in college students in the United States that upper-level students showed significantly more positive views toward homosexuality than lower-level students. In the general population, years of education is clearly associated with more positive attitudes toward homosexuality (;Lemelle & Battle, 2004). Higher education is related to liberal opinion, so these ideas make people more tolerant (Ohlander, Batalova, & Treas, 2005). But, it seems that medical students are more conservative than students of other careers (), and academic training does not strongly affect the opinion about homosexuality. Before starting college, medical students may have more traditional gender attitudes (Baker & Fishbein, 1998;Herek & Gonzalez-Rivera, 2006) due to heterosexism and heteronormative assumptions. In the present research, SES was not related to sexual prejudice in medical students as it was previously shown by Barrientos and Crdenas in college students from Chile; SES did not affect scores for attitude toward homosexuality. Nevertheless, McKelvey et al. in medical students and Teney and Subramanian in adolescents found that higher SES was associated with more positive attitudes toward homosexuality. It is possible that in Hispanic countries, the misunderstandings and stereotypes of homosexuality may be beliefs that are culturally ingrained, independently of SES (;). In our study, other predictors of high sexual prejudice were high religiosity and Protestant affiliation. In accordance with previous studies (;Parker & Bhugra, 2000), we found that high religiosity was a predictor of sexual prejudice among medical students. This association can be explained by two mechanisms: social causation and social selection (). As some religions do not consider homosexual behavior as acceptable, this idea may be transmitted to their followers. Also, consistent with previous research, it is well accepted that the more fundamentalist religious affiliation, the more aversive attitude toward homosexuality (Francis & Hermans, 2000;Gromer, Campbell, Gomori, & Maynard, 2013;Herek & Gonzalez-Rivera, 2006;M. Smith & Marden, 2013). Identifying the predictors of sexual prejudice among medical students is very important as it allows the identification of groups in which the prejudice may be present to facilitate the implementation of preventive programs to decrease it. Education directed at understanding diversity and discussions concerning beliefs associated with this subject may be implemented in males and students with a high religiosity to improve their future patients' health care ). The finding of this level of sexual prejudice in future physicians is particularly alarming because, if left unchanged, such attitudes are likely to substantially affect patient care in sexual minorities (). During graduate education, it is important to enable students to realize that their sexual prejudice might affect their clinical judgment and prevent them from delivering optimal care to their patients (). There is a highlight need for addressing sexual prejudice in Colombian medical schools curricula. In other countries, attempts to improve medical education concerning sexual prejudice were promising. Furthermore, discussing homosexuality openly with patients who are willing to do so may not only benefit the patient but also the physician in training to decrease sexual prejudice. However, positive attitudes rolemodeled by teachers and mentors are essential. To accomplish this, faculty and attending physicians may demonstrate clinical empathy for homosexual patients (;Lock, 1998;Robb, 1996). The limited knowledge of faculty and staff on homosexuality should also be addressed in similar ways as previously proposed. Our study could present at least two limitations: First, results were obtained from students of two universities in the Andean region of Colombia, so these results cannot be generalized to the rest of the population of Colombian medical schools due to the sociocultural diversity of the country, and second, its own limitation of a cross-sectional study, which cannot permit inferences making about the causality, causes, and effects of the associations that were observed. In conclusion, high sexual prejudice is a frequent attitude among medical students. Specific groups like males and individuals with high religiosity may require more sensitization and education in the area. Medical training represents a very good opportunity to approach the problem and implement strategies to decrease sexual prejudice in future physicians. Different strategies mostly involving teaching for sexual stigma, prejudice, and discrimination and reinforcement by the example of faculty and staff are essential to decrease sexual prejudice among medical students. Declaration of Conflicting Interests The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article. Funding The author(s) disclosed receipt of the following financial support for the research and/or authorship of this article. This research was supported by Human Behavioral Research Institute, Bogota, Colombia.
Interleukin 3 stimulates proliferation and triggers endothelial-leukocyte adhesion molecule 1 gene activation of human endothelial cells. Proliferation and functional activation of endothelial cells within a tissue site of inflammation are regulated by humoral factors released by cells, such as T lymphocytes and monocytes, infiltrating the perivascular space. In the present study we investigated the effects of interleukin 3 (IL-3), an activated T lymphocyte-derived cytokine, on cultured human umbilical vein endothelial cells (HUVEC). Proliferative activity, evaluated both by estimation of the fraction of cells in the S phase and by direct cell count demonstrated that IL-3, at the dose of 25 ng/ml, enhances more than threefold both DNA synthesis and cell proliferation above baseline control conditions. Binding studies with radioiodinated ligand demonstrated that HUVEC constitutively express a smaller number of IL-3 binding sites (approximately 99 binding sites per cell, with an apparent Kd of 149 pM). Accordingly, molecular analysis showed the presence of transcripts for both alpha and beta subunits of the IL-3 receptor. Functional activation of endothelial cells was evaluated by the expression of the endothelial-leukocyte adhesion molecule 1 (ELAM-1) transcript and by leukocyte adhesion. The ELAM-1 gene transcript was clearly detectable 4 h after IL-3 addition and started to decrease after 12 h. Moreover, IL-3-induced ELAM-1 transcription was followed by enhanced adhesion of neutrophils and CD4+ T cells to HUVEC. The findings that IL-3 can stimulate both proliferation and functional activation of endothelial cells suggest that this cytokine can be involved in sustaining the process of chronic inflammation.
Criteria and processes for identifying the poor as beneficiaries of programs in developing countries Since the 1980s, most developing countries have adopted a policy of user fees for health care services. Such policies, however, reduce access to services for those unable to pay. A variety of options have been explored to mitigate this negative effect, and these are the subject of three policy briefs that complement this one. One option is to eliminate this type of policy by abolishing health services user fees altogether. Other options consist of leaving user fees in place but developing mechanisms to shelter the poor from their negative effects: exempting the poorest from user fees (with or without health equity funds); developing health insurance that includes special measures for the poor. In this case, it becomes necessary to identify the poor who are eligible for such initiatives.
<gh_stars>0 package settings type SubtitleSources struct { AssrtSettings AssrtSettings `json:"assrt_settings"` } func NewSubtitleSources() *SubtitleSources { return &SubtitleSources{} }
In the beginning – there were bad lending practices. And they are at the core of this extraordinary mess. What was at the heart of the bad lending practices? The Federal Government!! Under both the Clinton and Bush administrations, it was government policy to encourage the private sector to ease underwriting standards in order to expand housing ownership in the U.S. The Federal Reserve under Alan Greenspan was an enabler in that development, by employing a monetary policy that kept interest rates exceedingly low, to the benefit of mortgage seekers. So lay blame on the US Government for bad policy. The mortgage industry jumped on that bandwagon creating millions of new homeowners by advertising ‘no income verification’ mortgages and luring unsophisticated and sometimes barely literate would-be homeowners into debt obligations they did not understand. So lay blame on the mortgage industry for duplicity and greed. Wall Street found a way to ‘create a silk purse out of a sow’s ear”. They employed their best and brightest - sophisticated software programmers and brilliant mathematicians - to package all that junky mortgage paper and create investment vehicles that suited many sophisticated investors’ risk appetites. They convinced the credit agencies that a million pieces of junk all bundled together really are riskless. So lay blame on the credit rating agencies for stupidity. Wall Street then leveraged their shareholders’ balance sheets to the hilt to capitalize on the spread between low short term interest rates and the higher rates available from these new investment vehicles they created from all the junk mortgage paper. So lay blame on Wall Street for [w]recklessness. And then SOME Wall Street firms paid their employees with illiquid stock and made it difficult if not impossible for them to diversify their assets. Their employees were enslaved – trapped by a system that penalized them for doing what they advised all their clients to do: make sure to diversify your assets and do not have all your eggs in one basket. So lay criminal blame on SOME (not all) Wall Street firms for destroying the livelihoods and the assets of their own employees. Back in 2002, the US Government added a deadly long tailed fuse to the fire which has now exploded. By responding to abuses then in existence, it found an expedient solution that sowed the seeds of today’s crisis. That ‘solution’ was Sarbanes Oxley. By forcing companies to mark-to-market investments – something that was decried by many sound economists and academicians – the Federal Government ignored all the logical accounting rules that support pricing models that utilize different pricing rules for different types of assets. Be it naïveté, ignorance or the need to provide their constituencies with a politically aggrandizing ‘solution’ to the ‘evils of corporate America’, it was BAD POLICY and it is wreaking havoc today. So lay blame again on the Federal Government for creating bad policy and bad law. One can already envision the new wave of regulation that the Government will emerge from this current crisis. Don’t for a moment think it won’t come. And because this financial crisis is bigger than those others we have experienced in our lifetimes – Long Term Capital in 1998, Savings & Loans in the late 1980s and early 1990s, portfolio insurance in the late 1980s, Penn Central in the mid- 1970s – the regulatory response will be far greater than Sarbanes Oxley. Well be warned – the seeds of a future crisis are just now being sown in the halls of Washington. The Government needs to learn from its own mistakes that cinching capitalism too tightly will only create a balloon-like response, causing another bubble which too will be burst.
<reponame>lenileiro/react-express-boilerplate import React from "react"; import { shallow } from "enzyme"; import Home from "./index"; describe("HomePage", () => { it("It should render", () => { const component = shallow(<Home />); const wrapper = component.find(".homepage"); expect(wrapper.length).toBe(1); }); });
Two Factors are Quite Enough: A Response to Molloy External variables and measurable aspects of human behaviour, biology, mind, emotions, and whatever else one cares to name are all that psychologists and other professionals concerned with behaviour change have to respond to and manipulate. A two factor model thus is proposed to maintain attention and action on goals and methods. In the course of arguing this position, some common misconceptions of the operant model are corrected.
In vitro activity of antibacterial agents on Haemophilus influenzae isolates. One hundred and eight clinical isolates of Haemophilus influenzae, consecutively occurring and epidemiologically unrelated, were examined for susceptibility against twelve antibacterial agents by disc diffusion and agar dilution. These were also serotyped and tested for beta-lactamase production. All isolates were sensitive to erythromycin, trimethoprim, chloramphenicol and cefotaxime. Six (5.5%) strains were ampicillin resistant (MIC 128 mg/1), and five of them were beta-lactamase producers. Tetracycline resistance was seen in 52.8% of the isolates. This is probably related to the high consumption of tetracyclines in our population. Cefotaxime (modal MIC 0.03 mg/1) and cefaclor (modal MIC 0.03 mg/1) were the most active parenteral and oral cephalosporins respectively.
<reponame>xiaochong44/S2 /* eslint-disable max-classes-per-file */ import { Group, type IElement } from '@antv/g-canvas'; import { getAllChildCells } from '@/utils/get-all-child-cells'; class MockDataCell extends Group {} class MockTableRowCell extends Group {} describe('getAllChildCells test', () => { const scrollGroup = new Group({ name: 'panelScrollGroup', }); Array.from(new Array(10)).forEach(() => { scrollGroup.add(new MockDataCell({})); }); const group = new Group({ name: 'panelGroup', }); group.add(scrollGroup); Array.from(new Array(5)).forEach(() => { group.add(new MockDataCell({})); }); Array.from(new Array(5)).forEach(() => { group.add(new MockTableRowCell({})); }); test('should return getAllChildCells of DataCell', () => { expect( getAllChildCells(group.getChildren() as IElement[], MockDataCell).length, ).toBe(15); }); test('should return getAllChildCells of TableRowCell', () => { expect( getAllChildCells(group.getChildren() as IElement[], MockTableRowCell) .length, ).toBe(5); }); });
We had no idea what the Oculus Rift was. When we were emailed with an invitation to see it behind closed doors, we agreed out of intrigue. What came from that was our Best Tech at PAX award. It’s a virtual reality headset. Now, I know that automatically makes a person skeptical, but I can assure you that this was the best VR headset I’ve seen. I can sit here and pretend to be dismissive of it when in reality I would be jumping up and down telling you about it. I mean, it’s virtual reality. It’s the endgame of gaming and it’s there in prototype form. For being such an early build (the headset looks like a death trap), it shows off a lot of promise and potential. Obviously, we can’t show you guys footage, but we did compile this impressions video to better explain our excitement for it. Some notable things about it are that when you turn your head completely around you’ll actually see the game behind you, not just a mirror image of what’s in front. Another interesting thing they said the headset could do was adjust to a person’s eyesight without the need for glasses. Development kits are set to ship later this year for those that donated to the Kickstarter. I am way too excited for this.
Analysis of melanoma tumor antigens and immune subtypes for the development of mRNA vaccine Melanoma has a high degree of malignancy and mortality. While there are some hopeful clinical trials for melanoma treatment in progress, they have not yet to yield significant long-term cure rates. Cancer vaccines including mRNA are currently one of the most promising strategy for tumor immunotherapy. The aim of this study was to analyze the potential tumor antigens in melanoma that could be used to develop mRNA vaccines and identify suitable vaccine populations. The gene expression data and complete clinical information of 471 melanoma samples and 1 normal tissue were retrieved from TCGA. Then, 812 samples of normal skin and their corresponding gene expression data were obtained from GTEx. Overexpressed genes, mutated genes and IRDEGs are used to identify potential tumor antigens. The relationship between the expression level of potential antigen and prognosis was analyzed in GEPIA, and then the immune cell infiltration was estimated based on TIMER algorithm. The expression profiles of IRDEGs were used to identify consensus clusters and immune subtypes of melanoma. Finally, mutational status and immune microenvironment characterization in immune subtypes were analyzed. Five tumor antigens (PTPRC, SIGLEC10, CARD11, LILRB1, ADAMDEC1) were identified as potential tumor antigens according to overexpressed genes, mutated genes and immune-related genes. They were all associated with OS, DFS and APCs. We identified two immune subtypes of melanoma, named IS1 and IS2, which exhibit different clinical features and immune landscapes. Based on the different immune landscape, we may conclude that IS1 is immunophenotypically cold, while IS2 is "hot". The present research implicates that PTPRC, SIGLEC10, CARD11, LILRB1 and ADAMDEC1 may be the antigenic targets for melanoma mRNA vaccines and IS2 patients may be more effective to these vaccines. Introduction Melanoma has a high degree of malignancy and mortality, it is produced by malignant transformation of melanocytes. The incidence of melanoma has steadily increased in the past few years. Although melanoma is not as common in tumors, it accounts for the majority of skin cancer deaths. Ultraviolet exposure is the most important risk factor for cutaneous melanoma, while other risk factors often include a personal history or family history of cutaneous melanoma, multiple benign naevi or atypical naevi, phenotypic characteristics including freckling, blue eyes and so on. So far, the primary treatment for early primary melanoma is surgery. Other adjunctive therapies include immune checkpoint blockade and RAF and MEK kinase inhibitors. As for metastatic melanoma, effective systemic therapies are still lacking. Whatsmore, due to the little progress made in medical treatment for metastatic melanoma, its prognosis and survival rate are poor. Therefore, identifying novel strategies to improve the prognosis of melanoma patients are of great clinical significance. As an ideal immunotherapy target, tumor antigen has received more and more attention in recent years. Tumor antigen vaccine has many advantages, including multitarget, safety and broad spectrum. In addition, the tumor immune response it triggers in the body was dynamic and continuous. The sources of tumor neoantigens include single nucleotide variation, insertion and deletion, gene fusion, frameshift mutation, structural variation and so on. Other tumor antigens include tumor-associated antigens, cancer-germline antigens. Among the above tumor antigen vaccine, mRNA vaccines are a more novel class of vaccines and may be a major breakthrough in the future. In fact, the concept of genetic (DNA and RNA) vaccines has been around for decades. But in the last few years, mRNA vaccines have regained widespread interest due to the major technological innovation and research investment. It has several beneficial characteristics compared to other types of vaccines, such as safety, efficacy and high efficiency. In addition, it has the potential for fast, cheap and scalable manufacturing. Currently, some clinical trials have confirmed the positive effect of novel antigen vaccine in the treatment of melanoma. Ugurel et al. found that part of melanoma patients who were treated with the neoantigen vaccine experienced significant tumor reduction or even complete remission. While there are some hopeful clinical trials for melanoma treatment in progress, they have not yet to yield significant long-term cure rates. So, the development of novel treatments still remains both essential and a major challenge. In this article, we aimed to identify potential cancer vaccine against melanoma and determined immune subtypes to identify candidate populations for mRNA cancer vaccination. We hope our findings might lead to new ideas for tumor immunotherapy and provide some new views for tumor vaccine research and development. Dataset and processing The gene expression and full clinical information of 471 melanoma samples and 1 normal tissue were retrieved from The Cancer Genome Atlas(TCGA). Then, 812 samples of normal skin and their corresponding gene expression data were downloaded from Genotype-Tissue Expression (GTEx). And R package "limma" was used to merge the mRNA data in the two databases. To make the data more accurate, the merged data was further normalized. The data of somatic mutation in the VarScan2 platform was downloaded from TCGA. We defined the genes in the merged cohort which were log2 fold change > 2 and adjustable p-value < 0.001 were upregulated. The mutated genes in melanoma and their chromosomal localization were performed with the R package "maftools". Whatsmore, the ESTIMATE algorithm estimates the immune infiltration level (including Immunescore, Stromalscore and ESTIMATEScore) of each melanoma patient. All patients were divided into two groups(high score group and low score group) based on the median cutoff of Immunescore and Stromalscore, respectively. The differentially expressed genes of the two groups were defined as immune-related differentially expressed genes (IRDEGs). All these were caculated by R package. We defined the intersection of upregulated genes, IRDEGs, mutant genes as the possible mRNA tumor antigens in melanoma. GEPIA Gene Expression Profiling Interactive Analysis (GEPIA) contains a large amount of RNA sequencing data from the TCGA and the GTEx datasets. We use this tool to calculate each selected antigen's gene expression and patients' survival information. The OS (overall survival) and disease-free survival (DFS) were performed by Kaplan-Meier method. TIMER Tumor Immune Estimation Resource (TIMER) is a resource to analyze gene expression level and its relationship with tumor-infiltrating immune cells (TIICs). Here, we focused on analyzing the association between the antigen-presenting cell(APCs) and the potential mRNA antigens. Identification of immune subtypes Based on the intersection of stromal score and immune score related DEGs, 910 genes were obtained, which defined as IRDEGs. Based on these IRDEGs' expression profiles, the melanoma patients were clustered into different groups by the optimal k-means clustering. Cluster sets varied from 2 to 9. ConsensusClusterPlus R package was performed to identify a robust cluster, the number of cycle computation times was set to 1,000 to ensure stability and reliability. Immune landscape and differential analysis of ICPs and ICD ESTIMATE was performed to caculated the infiltration of 22 immune cells between different immune subtypes. Then, considering the important role of immune checkpoint (ICP) and immunogenic cell death modulators (ICD) related genes in modulating the host anti-tumor immunity, we further analyzed the expression of ICPs and ICDs related genes in the two immune subtypes. The results were all filtered with p value < 0.05. WGCNA The coexpression modules of the IRDEGs was identified by "WGCNA" package of R software. The bottom-up algorithm and dynamic hybrid cut method were performed to examined coexpression gene modules. Then, the association between genes from different module and immune subtypes was recognize. In the same way, the results were also filtered with p value < 0.05. Screen five genes as possible antigens in melanoma Firstly, we screened out 736 upregulated genes in melanoma compared to normal skin samples with log2 fold change > 2 and p-value < 0.001. Figure 1C showed the distribution of over-expressed genes of melanoma on chromosomes. Subsequently, 941 mutated genes were screened (the number of mutations in melanoma patients was greater than 50). The chromosomal locations of the mutated gene (the number of mutations is greater than or equal to 100) were shown in Fig. 1A and waterfall plot ( Fig. 1B) showed the top 20 genes with the highest mutation frequency. Then, according to the intersecting of stromal related DEGs(1398 genes) and immune related DEGs(1142 genes), we screened out 910 genes as IRD-EGs. 10 genes were obtained based on the intersection of IRDEGs, mutated genes, upregulated genes. To further optimize the results, the 10 genes were incorporated into the univariate cox regression analysis. Finally, five tumor antigens (PTPRC, SIGLEC10, CARD11, LILRB1, ADAMDEC1) were defined as possible cancer antigens for the development of mRNA vaccines. Identification of the five tumor antigens associated with melanoma prognosis and APCs In order to identify the relationship between the five possible tumor antigens and prognosis, we analyzed their association with OS and DFS in melanoma patients. As shown in Fig. 2A-J, higher expressions of PTPRC, SIGLEC10, CARD11, LILRB1 and ADAMDEC1 were all associated with higher OS and DFS. These resuts showed that in melanoma, the higher the level of expression of these genes, the better the patient's clinical prognosis. Then, immune cell infiltration estimation analysis was performed according to the TIMER algorithm, the results were shown in Fig. 3A-E. Dendritic cells, macrophages, and B cells are the main APCs. The expression levels of PTPRC, SIGLEC10, CARD11, LILRB1 and ADAM-DEC1 were positively correlated with infiltration of macrophages and dendritic cells. As for B cells, the higher expressions of these five hub genes were also positively correlated with the levels of it, although the tendency were more variable. Taken together, these results demonstrate that the five tumor antigens can be presented to T cells by antigen-presenting cells(APCs) and initiate further immune responses. Immune subtypes of melanoma The expression profiles of 910 IRDEGs in 471 melanoma patients from TCGA database were used to identify consensus clusters. Based on their accumulative distribution functions as well as function delta area of K value, we selected k = 2. Two immune subtypes were abtained, which defined as immune subtype 1 (IS1) and immune subtype 2 (IS2) respectively ( Fig. 4A-C). As shown in Fig. 4d, the patients in IS1 had a lower probability of survival than patients in the IS2. The heatmap in Fig. 4E shown the clinicopathological features and the expression level of the five tumor antigens among the two subtypes. Subsequently, we analyzed the specific proportions of different clinicopathological characteristics in the two subtypes. The expression levels of PTPRC, SIGLEC10, CARD11, LILRB1 and ADAMDEC1 were higher in samples of IS2 than in IS1 (Fig. 4E). The proportion of dead patients and male patients in IS1 were higher than in IS2 (Fig. 4F, H), while the differences were not significant in the proportion of patients over 65 years old and stage I-II patients (Fig. 4G, I). Mutational status and immune microenvironment characterization in immune subtypes We analyzed mutation for every patient. Among the two subtypes, IS1 had the higher mutation rate (91.75%), while the IS2 was 87.88%. In addition, the TTN mutation proportion was the highest in both subtypes, which is 72%(IS1) and 67%(IS2), respectively (Fig. 5A-B). Besides, TTN, MUC16 and BRAF accounted for the top three mutations in the two immune types. Therefor, we speculate that they might be the potential targets for mRNA vaccine. Next, we investigated whether there were differences in immune landscape between the two subtypes. The results revealed that compared with IS1, IS2 had higher immune score, stromal score and ESTIMATE score (Fig. 5C-E). Then, 22 different immune cell types among the two immune subtypes were performed by CIBERSORT algorithm. The proportion of 22 kinds of immune infiltrating cells were generally low. As shown in Fig. 5H, comparing with IS1, T cells CD4 memory resting, Macrophages M0, Macrophages M2 and mast cells resting were down-regulated in the IS2, while B cells memory, T cells CD8, NK cells resting, T cells CD4 memory activated, T cells follicular helper, Macrophages M1 were significantly up-regulated (p < 0.05). Therefor, we may conclude that IS1 may be an immune "cold"phenotype, while IS2 may be an immune "hot"phenotype. Detection of immune gene coexpression modules of melanoma 910 IRDEGs coexpression modules were identified by the WGCNA. As shown in Fig. 6A, the soft threshold was set at seven based on the scale-free fit index. Different gene clusters were shown in different colors in the hierarchy clustering dendrogram, the modules determined by dynamic tree cuting and merged modules were shown on the bottom of the tree diagram. Similar modules were merged into a new one according to the following criteria: minimum module size = 30 and deep split = 4. Eventually, all IRDEGs were divided into five modules(brown, yellow, blue, green, grey) and the number of genes in each module varies from 49 in the green module to 496 genes in the blue module. We further conducted correlation analysis for modules and immune subtypes. The results were shown in Fig. 6C, MEbrown, MEyellow, MEblue and MEgreen were all negatively correlated with IS1 and the correlation coefficients were -0.64, -0.68, -0.62, -0.33, respectively(P values were all less than 0.05). While the results for IS2 were the opposite, which means the five module were positively correlated with IS2 and the correlation coefficients were the same as above. Discussion Melanoma has a high degree of malignancy and mortality. Malignant melanoma is derived from transformed melanocytes and the skin melanocytes are mainly located in the basal layer of the epidermis and in the hair follicles. At present, there is no long-term effective treatment for malignant melanoma. Immunotherapy has revolutionized oncology in recent years. mRNA vaccines, in particular, have been shown in many studies to be a promising immunotherapy. And therapeutic cancer vaccines are mainly aimed to stimulate cellular immunity. As for melanoma, they are particularly immunogenic due to their high mutation load. These characteristics have led to some advances in tumor immunotherapy for melanoma. For instance, Sahin U introduced the concept of individualized mutanome vaccines and pioneered its use in melanoma. They designed a complete set of procedures for the development of personalized mRNA vaccines, including mutanome identification, novel epitope prediction and selection and the result was also encouraging. Although some clinical trials of melanoma mRNA cancer vaccines are ongoing, the clinical benefits remain limited. Therefore, the potential role of mRNA cancer vaccine in melanoma patients still needs to be explored. In this study, five hopeful melanoma mRNA vaccine antigens were identified from overexpressed genes, mutated genes and immune-related genes, which were PTPRC, SIGLEC10, CARD11, LILRB1 and ADAMDEC1, respectively. The function of these several mRNA vaccine antigens(PTPRC, SIGLEC10, CARD11, LILRB1 and ADAMDEC1) needs to be further verified, but the role of some genes in immune response has been reported in previous studies. For example, Marc Rosenbaum reported that CARD11-BCL10-MALT1 signaling mediates T cell receptor-induced NF-B activation in Tregs and controls the conversion of resting Tregs to effector Tregs under homeostatic conditions. Major Histocompatibility Complex (MHC) class I plays a central role in the control of phagocytosis of macrophages by mediating inhibitory receptor LILRB1, which may be one of the targets of cancer immunotherapy. Upregulation of these five genes' expression were all associated not only with higher OS, but also with DFS, which means that these genes are significantly associated with the prognosis of melanoma. Subsequently, we evaluated the effectiveness and feasibility of these mRNA tumor vaccine antigens by exploring the relationship between antigens and APCs. APCs play an important role in the initiation of antigen-specific immune response. During this process, naive T cells must physically interact with APCs in order to eventually lead to T cell activation, mother cell formation and proliferation. And our results shown that higher expression levels of the five antigens were significantly associated with increased tumor infiltration of macrophages, dendritic cells and B cells, which means the five antigens could be presented to T cells by APCs and initiate further immune responses. To analyzed the most suitable population for mRNA vaccination, the melanoma patients were divided into two immune subtypes based on immune-related gene expression profiles. The clinical characteristics, mutation, survival prognosis and immune landscape of the two subtypes were further analyzed. Patients with IS2 have longer survival than those with IS1, suggesting that immunotype may be predictive of prognosis in patients with melanoma. We further analyzed the immune landscape in the two subtypes. The results of immune microenvironment characterization indicated that IS1 is an immune "cold" phenotype, while IS2 is an immune "hot" phenotype. Subsequently, the expression level of ICPs and ICD in the two subtypes were further analyzed. Immune checkpoint inhibitors are a new and effective strategy in recent years, PD-1/PD-L1 and CTLA-4 inhibitors have showed promising therapeutic effects and some have been approved for clinical use. Our results showed that PDCD1 (PD-1) and CD274 (PD-L1) were highly expressed in IS2 compared with IS1. These immune characteristics suggest that different immune subtypes may respond differently to mRNA vaccines. IS1 was associated with low expression of B cells memory, T cells CD8, NK cells resting, T cells CD4 memory activated and was characterized by low infiltration of immune cells, therefore represents a tumor microenvironment with low inflammation. In contrast, IS2 is characterized by increased infiltration of immune cells and thus represents an extremely inflammatory microenvironment. Therefore, we speculate that these two subtypes may represent different immune mechanisms and corresponding therapeutic strategies should be different. As for IS1, to ameliorate the hypoimmunogenicity of this subtype, mRNA vaccines that stimulate the immune system by triggering immune cell infiltrating may be effective for these types of patients. The tumor microenvironment of the immune "hot" phenotype(IS2) is more complex. Previous studies have shown a close relationship between inflammation and melanoma. Melanoma cells express a variety of cytokines, such as IL-1, IL-6, IL-8, TNF-, TGF-, and they are essential for tumor progression. Our study showed that the prognosis of IS2 is superior to that of IS1, which further suggests that triggering immune cell infiltration to stimulate the immune system may be a better therapeutic strategy for tumor vaccines. Finally, WGCNA reveals the modules closely related to each immune subtype, which is important for exploring the underlying biological mechanisms of these subtypes. Conclusion The present research implicates that PTPRC, SIGLEC10, CARD11, LILRB1 and ADAMDEC1 may be the antigenic targets for melanoma mRNA vaccines and patients in IS2 may be more effective to these vaccines. And this research provides a theoretical basis for mRNA vaccine development of melanoma. Funding This work were supported by the Natural Science Foundation of China and the Non-profit Central Research Institute Fund of the Chinese Academy of Medical Sciences(2020-PT320-004). Declarations Ethics approval Not applicable.
package ru.otus.controllers; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.view.RedirectView; import ru.otus.core.model.User; import ru.otus.core.service.DBServiceUser; import java.util.ArrayList; import java.util.List; import java.util.Optional; @Controller public class AdminController { private final DBServiceUser userService; public AdminController(DBServiceUser userService) { this.userService = userService; } @GetMapping({"/", "/admin"}) public String userListView(Model model) { Optional<List<User>> allUsers = userService.findAll(); List<User> users = new ArrayList<>(); allUsers.ifPresent(users::addAll); model.addAttribute("users", users); return "adminPanel.html"; } @GetMapping("/user/create") public String userCreateView(Model model) { model.addAttribute("user", new User()); return "userCreate.html"; } @PostMapping("/user/save") public RedirectView userSave(@ModelAttribute User user) { userService.saveUser(user); return new RedirectView("/", true); } }
Measurement and antecedents of national resilience in Filipino adults during coronavirus crisis Abstract Resilience is a broad concept that encompasses individual and social resources to thrive from difficult circumstances. The resilience that occurs as a collective effort or countrywide phenomenon is referred to as national resilience (NR), which connotes the ability of a nation to deal with crises while keeping its social fabric intact. Like the rest of the world, the Philippines has been greatly impacted by the coronavirus pandemic and we argue that a stable and robust NR is needed to bounce back from the challenges and adversities of the crisis. This pioneering study on NR in Filipino adults was conducted to achieve two aims assess the psychometric properties of the Filipino adapted National Resilience Scale (NRSFilipino) and determine demographic and psychological variables that influence NR. Data from 401 participants yielded an exploratory factor analysis with a good model fit for a fourfactor solution that is similar to the original National Resilience Assessment Scale. NRSFilipino also demonstrated acceptable reliability and convergent validity. Among the variables purported to be associated with NR, community resilience, and political attitudes came out as strong predictors. | INTRODUCTION The coronavirus disease (COVID-19) is a severe acute respiratory syndrome caused by coronavirus 2 that originated in Wuhan, China on December 31, 2019 (World Health Organization , 2020a). The virus is primarily transmitted through microdroplets ejected by an infected person to another person through the upper respiratory tract or the eyes, while aerosol transmission remains under investigation (). Within 2-14 days after exposure to COVID-19, infected persons may manifest a wide range of symptoms such as dry cough, shortness of breath or difficulty breathing, fever, muscle or body aches, and lung infiltrates (). On January 30, 2020, WHO declared the COVID-19 outbreak as a "public health emergency of international concern" (WHO, 2020b) and later on March 11, 2020, COVID-19 was considered a pandemic due to the alarming levels of transmission and global inaction (WHO, 2020c). At present, there are >19 million confirmed cases and approximately 700,000 deaths worldwide (WHO, 2020d). Other than a massive loss of life, the pandemic is projected to trigger a global economic recession (International Monetary Fund, 2020) and an increase in the number of individuals experiencing mental health concerns (Fiorillo & Gorwood, 2020;United Nations, 2020). In the Philippines, President Rodrigo Duterte declared a state of public health emergency on March 8, 2020, due to an increasing number of documented COVID-19 cases as early as January 2020. A few days later, the national government implemented the enhanced community quarantine (ECQ) measures that placed the National Capital Region and the entire Luzon island on lockdown to contain the spread of the virus. ECQ totally prohibited mass gatherings and limited movement of people. ECQ guidelines entailed closure of nonessential business establishments, public and private agencies, schools, and local and international transport systems. A work from home scheme was adopted by public and private offices through online delivery of services and transactions. A skeletal workforce consisting of the military, frontline health, and emergency workers, and those ensuring border control were not covered by the ECQ. The rest of the country was placed under general community quarantine (GCQ) that allowed local government units some flexibility in implementing lockdown depending on the risk level of the area. For example, one member in every household is allowed to go out for essential needs within a specific time frame during the day (ECQ and GCQ Guidelines, 2020). Most recent COVID-19 statistics from the Philippine Department of Health reported >120,000 confirmed cases and nearly 2200 deaths. The extreme adversity brought about by the COVID-19 pandemic can be a huge threat to the stability and resilience of the Philippines. Although the Philippines has experienced natural disasters and sociopolitical conflicts, the COVID-19 pandemic that generally placed the Philippines on lockdown for >4 months now is the first crisis on a national scale that required an unprecedented level of response. This study is a pioneer in examining perceptions of Filipinos on national resilience (NR) that may contribute to increasing empirical interest in understanding the concept of NR at a level of global crisis such as the COVID-19. 1.1 | National resilience 1.2 | Measurement of NR Previous studies used the National Resilience Assessment Scale (NRAS; Kimhi, Dror, & Sapir, 2017;Kimhi, Goroshit, & Eshel, 2013) to measure the construct of NR; however, Kimhi noted that validity of NRAS was not adequately substantiated. To fill this gap, Kimhi, Eshel, Lahad, and Leykin investigated the psychometric properties of the 25-item NRAS using data from Jewish Israeli adults. Findings of exploratory factor analysis (EFA) indicated that 24 items clustered into four distinct yet somewhat related factors: identifying with the state, solidarity and social justice, trust in national institutions, and trust in public justice. The reliability of the NRAS was strong, which was replicated in a cross-cultural study () that included student samples from Australia, Germany, Great Britain, Israel, and Greece. In an attempt to develop an efficient measure of NR for use in cross-national research and across adversities, a short version of the NRAS was validated using data from a sample of Israeli adults (). EFA results yielded 13 items to form the National Resilience Scale short version (NR-13) with three independent but related factors describing identification with one's country, solidarity and social justice, and trust in public institutes. In addition, the internal consistency of the NR-13 ranged from adequate to strong across international samples (). | Determinants of NR NR construct has been further studied in terms of association with demographic and psychological factors, which in turn provided support to convergent validity of the NRAS and NR-13. | Demographic factors Past studies (Eshel & Kimhi, 2016a, 2016b, 2016cKimhi et al.,, 2013Kimhi et al.,, 2018 reported the influence of demographic factors on NR. Findings indicated that gender was associated with NR with males reporting a higher level of resilience than females. Age was significantly and positively correlated with NR. Moreover, participants who disclosed as more religious and inclined to right-wing political attitudes reported greater perceived NR. Compared with those residing in more communal areas urban, or city residents had higher perceived NR. | Suppressing factors Distress, sense of danger, and perceived threat were examined in this study as suppressing factors of NR. Distress is defined as having anxiety and depression symptoms. Sense of danger refers to a persisting fear of future danger which can negatively impact postadversity adaptation (Eshel & Kimhi, 2016a, 2016b, 2016c. Studies with Israeli adults and higher education students reported a negative correlation of distress and sense of danger with NR (Eshel, Kimhi, & Marciano, 2020;Kimhi, Eshel, Leykin, & Lahad, 2017;). That is, the more distressed and greater sense of danger, the lower is the perceived NR. Similarly, there was a significant negative relationship of distress and sense of danger with NR in higher education students from Australia, Great Britain, and Israel but not significant in students from Germany and Greece (). Perceived threat refers to a person's evaluation of potential threats of harm or danger to self or others (King, King, Gudanowski, & Vrevren, 1995). This construct has been primarily linked to posttraumatic stress disorder (Huang & Kashubeck-West, 2015) as well as negative emotions such as harm, anxiety, challenge, and distress (Kimhi & Eshel, 2012). A previous study involving college students in Israel indicated that the perceived threat of war was negatively related to public resilience (i.e., a combination of community resilience and NR; Kimhi & Eshel, 2012). No study has examined yet the link between perceived threat of COVID-19 and NR. However, a very recent study in adults from 35 countries reported that the likelihood of feeling threatened by COVID-19 increases significantly with age, number of days in quarantine, emotionality, and hoarding behavior. In addition, the perceived threat of the pandemic was found to be significantly higher in adults from North America compared with their peers from Europe (Garbe, Rau, & Toppe, 2020). | Promoting factors In this study, individual resilience and community resilience were considered as promoting factors of NR. Individual resilience has been the scope of most resilience research and is defined as the capacity of an individual to maintain healthy functioning despite adversities and the ability to adapt to extremely distressing situations (). The individual resilience of Israeli adults was positively linked to NR. Community resilience refers to the reciprocal relationship between individuals and their immediate community, wherein individuals have the capacity to seek help from the community while the community has the capacity to extend help towards individuals ). Higher community resilience translates to higher levels of community strength, which controls stress indicators; while lower community resilience may lead to community vulnerability, thus leading to recovery setbacks after adversities. Consistent in studies involving Israeli adults (Eshel & Kimhi, 2016a, 2016b, 2016cKimhi et al.,, 2013Kimhi et al.,, 2018 and students from Australia, Germany, Great Britain, Israel, and Greece; community resilience is significant and positively associated with NR at a generally moderate level. | RESEARCH AIMS AND HYPOTHESES To the best of our knowledge, no research has been conducted on examining NR in the Philippines. Considering the adversities of the coronavirus crisis, we pursued this study with the primary goal to inquire into the perceptions of NR in Filipinos during a pandemic. To achieve this goal, two aims were proposed. First, since there is no existing measure of NR validated for use with the Philippine population, we examined the psychometric properties of the Filipino adaptation of the National Resilience Scale (NRS-Filipino). Second, we investigated a set of factors that can be associated with NR, including demographic and psychological variables. In light of the foregoing literature and study aims, we posited these hypotheses: NRS-Filipino comprising of 14 items adapted from the original NRAS plus two new items specifically relevant to coronavirus crisis will demonstrate a valid and reliable multidimensional measure of NR. In terms of demographic factors, Filipinos who are older, male, more religious, and inclined to political rightwing attitudes will have greater NR. In addition, those residing in urban communities will have higher NR. In terms of suppressing factors, participants with greater distress, sense of danger, perceived threat, and awareness of individual/s infected with coronavirus within the community will have lower NR. In terms of promoting factors, participants with higher individual and community resilience will have greater NR. | Participants The study involved a convenient sample of 401 adults residing in the Philippines. More than half of the participants were females (63.34%) and single (72.57%). Participants' ages ranged from 18 to 68 years (M = 30.09, SD = 11.14), with a little more than half in the age bracket 22-29 years (55.36%). In terms of educational attainment, the majority of them earned bachelor's degrees (66.83%). More than a third of the participants indicated receiving higher than average income (39.40%). The demographic profile of the participants is presented in Table 1. | Measures 3.2.1 | National resilience NR was measured using a scale composed of 16 items, with 14 items adapted from the original 25-item NRAS and the remaining 2 items (see Items 11 and 12 in Table 1) were developed by Shaul Kimhi and colleagues to increase content relevance of the scale in characterizing participants' perceptions of NR during coronavirus crisis. Items were adapted in Filipino and answered using Likert response options ranging from 1 (strongly disagree) to 5 (strongly agree), with a higher score indicating a greater level of NR. The psychometric properties of the NRS-Filipino is reported in Section 4. | Community resilience The 10-item Filipino version of the Conjoint Community Resilience Assessment Measure (CCRAM-10) was utilized to assess participants' perceptions on the ability of a community to deal with a coronavirus crisis (Leykin, Lahad, Cohen, Goldberg, & Aharonson-Daniel, 2013). Participants responded to each item (e.g., "My community is prepared for an emergency including the Coronavirus crisis") on a 5-point scale (1 = strongly disagree to 5 = strongly agree), with a higher score indicating a greater level of community resilience. The structural validity of the CCRAM-10 demonstrated a stable five-factor model (i.e., leadership, collective efficacy, preparedness, place attachment, and social trust) based on data from two adult samples in Israel () and China (Cui & Han, 2019). CCRAM-10 reliability was adequate for both factor and overall scores, ranging from =.66 to =.86 (Cui & Han, 2019). In this study, we used the overall score as an index of community resilience with a reliability =.90. | Individual resilience The 10-item Filipino version of the Connor-Davidson Resilience Scale (CD-RISC 10) was used to measure a person's capacity to effectively recover from the coronavirus crisis (Campbell-Sills & Stein, 2007;Connor & Davidson, 2003). Participants responded to each item (e.g., "Able to adapt to change") on a 5-point scale (0 = not true at all times to 4 = true nearly all of the time), with a higher score indicating a greater level of individual resilience. | Distress To measure distress in the context of the coronavirus pandemic, the present study used eight items of the Brief Symptoms Inventory (Derogatis & Savitz, 2000;Derogatis & Spencer, 1982) assessing anxiety (e.g., "A feeling of tension") and depression (e.g., "A feeling of worthlessness"). Participants responded on a 5-point scale (1 = not at all to 5 = to a very great extent) with a higher score indicating greater distress symptoms. In the present study, we subjected the item scores to EFA that resulted in a single factor with an eigenvalue of 4.85 and 60.60% variance explained. All factor loadings were significant, ranging from 0.62 (Item 1) to 0.82 (Item 6). Thus, we used the combined score of depression and anxiety items as an index of distress with an overall reliability =.90. | Perceived threat Based on the previous study of Kimhi and Eshel, a Filipino translation of four items were specifically developed to measure the participants' perception of the extent of the threat that the current coronavirus crisis posed to four different domains including the economic, health, security, and political situations. Participants were asked to think of the current coronavirus crisis and were instructed to rate how threatening it was to each of the four domains by responding on a 5-point scale (1 = not threatening at all to 5 = threatening to a very great extent), with a high score indicating greater perceived threats. The present study used the overall score as an index of perceived threat with a reliability =.84. | Sense of danger The 6-item Filipino translated version of Sense of Danger Scale (Solomon & Prager, 1992) was adapted to measure the participants' perception of personal, familial, national, and global dangers brought about by the current coronavirus crisis (e.g., "To what extent do you feel that your life is in danger due to the Coronavirus?"). Participants were requested to describe their feelings in the past 2 weeks by rating each item using a 5-point scale (1 = not at all to 5 = very much). In previous studies, Sense of Danger Scale has demonstrated adequate reliability of =.75 based on Israeli adults (Eshel & Kimhi, 2016a, 2016b, 2016c. In this study, we used the overall score as an index of sense of danger with a reliability =.85. | Demographic factors Participants were asked to provide demographic information such as age (in years), gender, and place of residence that was later coded as either rural or urban based on the classification of the Philippine Statistics Authority. In addition, awareness of person(s) with coronavirus illness, religiosity, and political attitude were also inquired. Awareness of person(s) with coronavirus illness was measured by one item (To the best of your knowledge, is a person with a diagnosis of Coronavirus lives in your community?) wherein participants indicated either a "yes" or "no" response. Religiosity was measured by asking participants to rate an item (How would you define yourself regarding religiosity?) on a scale ranging from 1 = secular to 4 = very religious. The political attitude was measured by a single item (How would you describe yourself politically?) with response options ranging from 1 = strong right to 5 = strong left. | Procedure Before the survey was converted into an online format, items were translated from English to the Filipino language following the double-translation and reconciliation procedure (International Test Commission, 2018). First, two bilingual experts who are Filipino native speakers independently translated the materials from English to Filipino. Second, a third bilingual expert who also is a native speaker of Filipino reviewed item by item the two translations and identified areas for corrections with consideration for linguistic, psychological, and cultural equivalence. Finally, the three experts discussed together and reconciled the corrections, and arrived at the final translated version of the survey. An online survey questionnaire was completed by the participants after consent was obtained. The study was part of cross-national research approved by the Institutional Review Board of the Tel Aviv University in Israel. | Exploratory factor analysis Preliminary analyses indicated that NRS-Filipino scores were normally distributed with skewness and kurtosis values consistently <|2|. Hence, EFA was conducted using the maximum likelihood estimator on Mplus 7 (Muthn andMuthn, 1998-2012). The number of factors to retain was based on multiple criteria: number of factors in the model can explain the data better than a model with one fewer factor, model with one more factor does not improve appreciably in fit, and solution was interpretable and most theoretically sensible (Fabrigar, Wegener, MacCallum, & Strahan, 1999;Floyd and Widaman, 1995). In addition, we were guided by a multiple factor structure of existing NR scales from which items of the NRS-Filipino were adapted. The goodness of data-model fit was determined using a combination of absolute and incremental fit indices. Comparative fit index (CFI) and Tucker-Lewis index (TLI) values between 0.90 and 0.95, and root mean square error approximation (RMSEA) and standardized root mean square residual (SRMR) below 0.08 are considered to suggest acceptable fit; while CFI and TLI values above 0.95 and RMSEA and SRMR values below 0.05 indicate a good model fit. In terms of retaining items, factor loading ≥0.40 on the relevant factor and <0.40 on all other factors is acceptable (Netemeyer, Bearden, & Sharma, 2003). Initial EFA was conducted for one through four-factor solutions and results indicated a good data-model fit for labeled as trust in national government (TNG) with five items (1, 2, 3, 11, and 12). Factor 2 is named as coping with a national crisis (CNC) with three items (4, 5, and 6). Factor 3 is labeled as SSJ with four items (7, 8, 9, and 10). Factor 4 is named as trust in public institutions (TPI) with three items (13, 14, and 16). Table 2 shows the item loadings and explained variance across factors. Intercorrelations of NRS-Filipino scales indicated strong relationships between subscales ranging from r =.64 | Reliability and factor intercorrelations (CNC and SSJ) to r =.76 (TNG and TPI) suggesting overlapping yet distinct aspects of NR construct. In addition, strong relationships were observed between subscales and total NR scores ranging from r =.85 (CNC) to r =.93 (TNG). | Convergent validity Convergent validity of NRS-Filipino was established by correlating subscale and total scores with criterion variables using Pearson correlation. As shown in Table 4, series of bivariate correlations indicated that the NRS-Filipino subscale and total scores were significantly and negatively correlated with a sense of danger, distress, and perceived threats. On the other hand, the NRS-Filipino subscale and total scores were significantly and positively CALLUENG ET AL. correlated with individual resilience and community resilience. The size of correlations ranged from low (r =.10 for SSJ and sense of danger) to strong (r =.67 for community resilience and total NR) across criterion variables. | Multiple regression Sequential multiple regression analysis was conducted to determine the relative contribution of demographic and psychological factors on total NR scores (i.e., subsequently referred to as NR). In Step 1 of the regression equation, demographic characteristics such as age, religiosity, and political attitudes were entered. In Step 2, suppressing factors that included sense of danger, distress, and perceived threat was added to the equation. Finally, in Step 3, promoting factors such as individual resilience and community resilience were added to the equation. To determine possible multicollinearity, indices of tolerance (TOL) and variance inflation factor (VIF) from the regression analysis were referred to. As a general guideline, TOL below 0.10 or VIF above 10 may indicate the presence of multicollinearity of variables (Oakland, Callueng, & Harris, 2012). No multicollinearity was noted in the analysis, with TOLs ranging from 0.71 to 0.99, and VIFs ranging from 1.01 to 1.42. Overall, the total variance of NR explained by the combined demographic and psychological factors was approximately 55%, with community resilience and political attitudes strongly associated with NR relative to other variables in the study. | Group differences Influence of dichotomous categorical variables as possible determinants of NR was analyzed through series of one-way analysis of variance to determine whether NR can be discriminated by participants' gender, type of residence, and awareness of a person infected by coronavirus within the community (see Table 6 T A B L E 5 Sequential multiple regression on the influence of demographic and psychological factors on NR Step | DISCUSSION The overarching goal of the study was to probe into the perceptions of Filipino adults on NR during the coronavirus crisis. Two aims were set forth to achieve this goal: first was to assess the psychometric properties of the NRS-Filipino, and second was to examine demographic and psychological factors as determinants of NR. Data were collected from 401 adults through an online survey conducted during the early phase of coronavirus pandemic in the Philippines. | Measurement of NR Examination of the psychometric characteristics of the NRS-Filipino entailed determining a theoretically sensible factor structure, calculating reliability at the latent and item levels, and establishing convergent validity. Findings from EFA yielded a four-factor solution with a good model fit and strong factor loadings for 15 items that were nonoverlapping in factorability. The final items clearly clustered into four factors that were labeled as TNG, CNS, SSJ, and TPI. These factors are consistent with existing measures of NR, such as the NRAS and NR-13. This is not surprising as 14 of 16 original items of the NRS-Filipino were adapted from the NRAS. The inclusion of two new items that reflects government's ability to protect the country during the coronavirus crisis in the Philippines is in accord to the idea that NR is not a static concept and requires contextual changes to capture meaningful perceptions of people on specific adversity (;Eshel & Kimhi, 2016a, 2016b, 2016cFletcher & Sarkar, 2013). Both items clustered on the factor of TNG, which may be considered as a more valuable component in promoting and supporting NR amid the extreme adverse impact of coronavirus pandemic. The deletion of item, "Trust in educational system," suggests that educational institutions may play a less essential role in helping a nation recover from the adverse effects of the coronavirus health crisis. Moreover, when ECQ/GCQ was implemented in the Philippines sometime in March 2020, the school year was about to end and thus, the educational system has not been much impacted by the early phase of the pandemic. It is possible that if the survey is conducted later or in the aftermath of the pandemic, the educational system can be a pivotal agency to collaborate with the national government in ensuring the safety and well-being of children and youth. Moreover, reliability analyses of the NRS-Filipino subscale and total scores demonstrated strong internal consistency, which is consistent with the NRAS and NR-13. In addition, the significant relations of the NRS-Filipino | Antecedents of NR Our findings partially supported Hypothesis 2 that demographic variables are significantly associated with NR. As expected, we found that Filipino adults who are older, more religious, and those holding more right-wing political attitudes tend to have greater levels of perceived NR, confirming findings in earlier studies (Kimhi et al.,, 2013. However, findings did not support the hypothesis that males and those living in urban areas have higher perceived NR than females and those residing in rural areas. It appears that over time, the experiences of older individuals in facing adversities allow them to develop greater confidence in the capacity of the nation to recover in the midst of crisis (Eshel, Kimhi, Lahad, & Leykin, 2016). Moreover, believing in a higher being that has control over individual and world outcomes tend to promote the greater perception of NR echoes previous research (;). Religion is a highly treasured value that Filipinos consider as a stronghold in times of personal or collective crisis. In a similar vein and confirming previous findings (;Kimhi et al.,, 2013, we found that individuals who held more right-wing political views tend to perceive higher levels of NR. Although the present ruling political party in the Philippines can be characterized by nationalist and liberal ideas, it is possible that the widespread adversity of the coronavirus pandemic may have changed political views of the Filipinos as leaning to a more conservative attitude, at least at the perceptual level. Hibbing, Smith, and Alford described individuals with conservative or right-wing political orientation as more responsive and attuned to negative stimuli such as the threat of the current health pandemic, and there seems to be an emerging pattern on the influence of political ideology on coronavirus pandemic. Similar to the Philippines, a recent study by Dryhurst, Schneider, Kerr, and van der Linden indicated that people from the United Kingdom and the United States that lean more to conservative political orientation reported a lower risk of the coronavirus crisis. Unlike earlier studies (e.g., ) reporting that people from urban areas tend to have a higher level of NR, the present study found that Filipino adults residing in rural communities reported higher levels of NR. One explanation is that rural communities in the Philippines have been characterized to give support to right-wing political movements and policies. Hence resulting in a greater perception of NR, which can be attributed to right-wing political attitudes as previously discussed. In addition, higher NR in participants from rural areas may have become more pronounced due to various provisions of relief assistance and resources from the government during the coronavirus crisis. On the other hand, we believe that compared with people in rural areas, individuals residing in urban areas may have greater exposure to mass media and online information, and thus, tend to be more critical of the responses and management of the national government during the coronavirus crisis. This, in turn, may have resulted in perceived lower levels of NR. In contrast to previous research that reported lower levels of perceived NR in females mostly from Middle Eastern countries (), the current study found that Filipino females had similar levels of NR with Philippine culture also promotes gender equality and empowerment. For example, both men and women take active leadership roles in national and local institutions and egalitarian roles in solving the nation's problems including supporting the nation in facing and recovering during the coronavirus crisis. Our findings partially supported Hypothesis 3 that suppressing factors negatively influence NR. Specifically, we found that participants who felt more distressed, higher perceived threat, and aware of person(s) infected with coronavirus within the community reported lower levels of perceived NR. However, sense of danger was not associated with NR. Earlier studies provided support that greater distress (; and perceived threat () were associated with lower levels of perceived NR. Anxiety and distress are normal responses to such extreme circumstances of the coronavirus crisis. Our stress systems have evolved to respond in highly adaptive ways, thereby enabling humans to deal with these challenges (de Kloet, Sibug, Helmerhorst, & Schmidt, 2005). It is possible that participants' negative feelings may have been affected by their knowledge of someone with COVID-19 illness within one's local community. Such emotional experience also can be explained by construal-level of psychological distance (Trope & Liberman, 2010) However, the present findings did not find support for the hypothesis that sense of danger could have a significant negative influence on NR. One possible explanation is that the survey was conducted during the first 2-3 weeks of lockdown in the Philippines when there were only a few confirmed cases of coronavirus mostly in highly dense areas like Metro Manila; thus, sense of danger of the coronavirus crisis may not have been widespread and to a high degree. Findings may have been different if participants' sense of danger on the coronavirus crisis was assessed later during the lockdown with a possible surge of cases. For example, the study of Eshel and Kimhi (2016a, 2016b, 2016c showed that sense of danger was associated with NR following a disaster such as a missile attack. Finally, our findings confirmed Hypothesis 4 that promoting factors such as individual and community resilience positively influence NR; that is, individuals who reported higher levels of individual and community resilience showed greater levels of perceived NR. This finding is consistent with earlier studies indicating that people who have a greater capacity to bounce back from adversity and perceive the community with capacities for collective action, collaboration, and empowerment are more likely to trust their national leaders and government institutions to resolve crises and maintain stability in the country (;. Overall, the present study found several demographic and psychological factors as antecedents of NR during the coronavirus crisis in the Philippines, which were consistent with findings from previous research in other countries (;Kimhi et al.,, 2018. More importantly, we highlight that community resilience and political attitudes are the strongest predictors of NR in the Philippines. Since NR may be viewed as a collection of resilient individuals and communities, it is not surprising that Filipinos who perceive their local community as resilient would believe that the Philippine society, in general, may be capable to effectively withstand the coronavirus crisis. It is possible that since the response of one's local community during the coronavirus crisis (e.g., strict implementation of lockdown by local authorities, distribution of relief goods, and cash) has been relatively quick and directly observable, people tend to generalize these as indicators of effective management at the national level. Likewise, right-wing political attitude as a significant antecedent of NR explains the importance of trust in the political system during an intractable crisis such as the coronavirus pandemic. CALLUENG ET AL. | Limitations and future research This is the first known study of NR in a Filipino sample and in the context of a pandemic. Although the findings regarding the measurement and antecedents of NR are promising, methodological limitations of the study are acknowledged. First, participants were largely from a limited geographical area and were derived from a convenience sample of adults, findings may not be generalizable to the population studied. To address this shortcoming, we suggest that future research can replicate our findings with larger and more diverse samples, including those from other regions and socioeconomic groups. Second, the survey was conducted during the early phase of the coronavirus pandemic and that participants' perceptions on NR may differ if data were obtained after the crisis. To remedy this limitation, we suggest that additional research can be conducted to investigate Filipinos' perceptions of NR after the pandemic. Finally, the factor structure and psychometric properties of the NRS-Filipino was initially examined based on data from one group of adults and collected at a single point of time. Additional research is recommended to determine the stability and generalization of the structural validity and technical adequacy of the NRS-Filipino across samples and times. PEER REVIEW The peer review history for this article is available at https://publons.com/publon/10.1002/jcop.22438
File photo taken in 2014 shows JPMorgan Chase's corporate headquarters in New York City. (Photo: Getty Images - Andrew Burton) JPMorgan Chase (JPM) is expected to pay at least $125 million to settle federal and state investigations over the U.S. banking giant's collections and sales of consumer credit card debt, according to a news report. The tentative agreement with the U.S. Financial Protection Bureau, 47 states and the District of Columbia could be announced as soon as Wednesday, the Reuters report said, citing unidentified people familiar with the issue. The states are expected to share roughly $95 million, while the CFPB will collect approximately $30 million, according to the report. The settlement is also expected to include about $50 million in consumer restitution. Public filings by the nation's largest bank have said it has been responding to "formal and informal inquiries from various state and federal regulators regarding practices involving credit card collections litigation ... the sale of consumer credit card debt and securities backed by credit card receivables." The investigations focus on alleged "violations of law relating to debt collection practices," the bank said in the Securities and Exchange Commission filings. JPMorgan also reported that California and Mississippi have filed separate civil actions against the bank over similar allegations. The California action, filed in 2013 by state Attorney General Kamala Harris, charged that JPMorgan flooded the state's courts with collection lawsuits against credit card borrowers based on insufficient legal evidence. Separately, the CFPB in 2013 ordered JPMorgan to refund an estimated $309 million to more than 2.1 million customers for illegal credit card practices. The action, which also included allegations by the Office of the Comptroller of the Currency, charged the bank engaged in unfair billing practices for credit card "add-on" products by charging consumers for credit monitoring services they didn't receive. JPMorgan representatives could not immediately be reached for comment on the settlement report late Tuesday. A CFPB spokesperson did not respond to a message seeking comment. Read or Share this story: http://usat.ly/1IIn25W
declare module "ink-spinner" { import React from "react" interface SpinnerProps { type: string } export default class Spinner extends React.Component<SpinnerProps> {} }
Q: How to temporarily straighten very thick and curly hair? My 5 year old daughters hair is very thick and very curly. I am well aware of proper hair care, protective braids and curls. Sometimes she wants it straight. I've encouraged her to embrace her natural beauty (I wish I had her curls!). However she is 5 and very smart. I want to know if there is a way I can temporarily straighten her hair and without it poofing outward without ruining her natural curls? She has very small twists type curls and no straight hair anywhere. I don't want to hurt her hair by chemicals or perms or semi perms. If there's a way I'd love to know it! Just to make her day every now and then and give her that pep in her step. A: Shampoo with keratin will aid with straightening using a flat iron, but I don't recommend it. Getting a professional blow out is her best bet. I'm biracial and occasionally want a temporary change. I feel her pain. It is also possible to use large rollers and relax the curls a lot which is satisfying. There is a web community dedicated to us natural curly peeps. Knowing her curl type (sounds like a 4b) will also help. It's all about products. Curl creme!!! Tame the frizz using the LOC method, and make sure you use sulfate free shampoo. Get her a silk pillow case, It's vital to fighting frizz. And start searching for a stylist who knows curls now. I drive 4hrs for my 2-3 trims a year. If they have never dry cut curls, run away!!! Good luck and post a pic. My babies both have red curls. My son has a baby fro. Lol A: I'd use an electric hair straightening brush for kids. This will give the possibility for her to have straightened hair without damaging her natural locks. This electric hair straightening tools make straightening quick and easy while treating the hair kindly. I use one myself and absolutely love it and I also straighten my daughter's hair for her from time to time too.
/** * * @author Quick Fix Demons */ public class FXMLDocumentController implements Initializable { AccettaClient thread; InviaDomande send; AccettaRisposte receive; @FXML private Label label; @FXML private void handleButtonAction(ActionEvent event) { // Fine accettazione client thread.ferma(); // Ricezione e invio domande e risposte } @Override public void initialize(URL url, ResourceBundle rb) { // Fase accettazione client thread = new AccettaClient(); thread.start(); } }
–Jefferson Davis, First Inaugural Address, Montgomery, Alabama, February 1861. –Abraham Lincoln, First Inaugural Address, March 4, 1861. These two statements by Abraham Lincoln and Jefferson Davis from their respective first inaugural addresses highlight perhaps the main cause of the War to Prevent Southern Independence: Davis believed, as the founding fathers did, that the union of the states was a voluntary union created when the free, independent, and sovereign states ratified the Constitution, as directed by Article 7 of the Constitution; Lincoln asserted that it was not voluntary, and was more like what future generations would come to know as the Soviet Union – held together by force and bloodshed. Murray Rothbard mocked Lincoln’s theory of the involuntary American union a “one-way Venus flytrap” theory of the union in his essay, “Just War.” Indeed, in the same speech Lincoln used the words “invasion” and “bloodshed” to describe what would happen in any state that left his “perpetual” union. His position was that after fighting a long war of secession from the tyrannical British empire, the founders turned around and created a nearly identical, British-style centralized state from which there could never be any escape. To put these statements into context, it is important to understand the North was in the process of more than doubling the average tariff rate on imports at a time when at least 90 percent of all federal tax revenue came from tariffs on imports. The rate of federal taxation was about to more than double (from 15% to 32.7%), as it did on March 2, 1861 when President James Buchanan, the Pennsylvania protectionist, signed the Morrill Tariff into law, a law that was relentlessly promoted by Abraham Lincoln and the Republican Party. (The Pennsylvania delegation was a key to Lincoln’s nomination. Before the Republican convention he sent a private emissary, Judge David Davis, to Pennsylvania with original copies of all of his speeches in defense of protectionist tariffs over the previous twenty-five years in order to convince the Pennsylvania protectionists, led by steel manufacturer/legislator Thaddeus Stevens, that he was their man. He won over the Pennsylvania delegation and he later appointed Davis to the Supreme Court). Ever since the Tariff of 1824, and the even more protectionist 1828 “Tariff of Abominations,” with a 48% average tariff rate, the South had been protesting and even threatening nullification and secession over protectionist plunder, as South Carolina did in 1833 when it formally nullified the “Tariff of Abominations.” The votes in Congress on these tariffs was completely lopsided in terms of Northern support and Southern opposition – although there were small minorities of Southern protectionists and Northern free traders, especially in New York City in the latter case. The South, like the Mid-West, was an agricultural society that was being plundered twice by protection tariffs: Once by paying higher prices for “protected” manufactured goods, and a second time by reduced exports after the high tariffs impoverished their European customers who were prohibited from selling in the U.S. by the high tariffs. Most of the South’s agricultural produce –as much as 75% or so in some years — was sold in Europe. South Carolina nullified the Tariff of Abominations and forced President Andrew Jackson to agree to a lower, compromise tariff rate that was phased in over ten years, beginning in 1833. The North did not yet have the political clout to plunder the South, an act that many Southern statesmen considered to be a gross violation of the constitutional contract that justified secession. But by 1861 the population growth in the North, and the addition of new Northern states, had given the North enough political power to finally plunder the agricultural South and Mid-West with protectionist tariffs. The Morrill Tariff had passed the House of Representatives during the 1859-’60 session, long before any Southern state seceded, and the writing was on the wall that it was only a matter of time before the U.S. Senate would follow suit. The Confederate Constitution outlawed protectionist tariffs altogether, calling only for a modest “revenue tariff” of ten percent or so. This so horrified the “Party of Great Moral Causes” that Republican Party-affiliated newspapers in the North were calling for the bombardment of Southern ports before the war. With a Northern tariff in the 50% range (where it would be after Lincoln signed ten tariff-raising pieces of legislation, and remained in that range for the succeeding fifty years) compared to the Southern 10% average tariff rate, they understood that much of the trade of the world would go through Southern, not Northern, ports and to them, that was cause for war. “We now have the votes and we intend to plunder you mercilessly; if you resist we will invade, conquer, and subjugate you” is essentially what the North, with its election of lifelong protectionist Abraham Lincoln as a sectional president, was saying. Neither Lincoln nor the Republican party opposed Southern slavery during the 1860 campaign. They only opposed the extension of slavery into the new territories. This was not because of any concern for the slaves, but was part of their strategy of perpetual plunder. Mid-West farmers, like Southern farmers, were harshly discriminated against by protectionist tariffs. They, too, were double-taxed by protectionism. This is why the Mid-West (called “the North-West” in the 1860s) provided serious antebellum resistance to the Yankee scheme of protectionist plunder. (The Mid-West also provided some of the most effective opposition to the Lincoln regime during the war, being the home of the “Copperheads,” so named as a slanderous term by the Republican Party). This opposition was watered down, however, when the Republican Party championed the policy of preventing slavery in the territories, preserving them “for free white labor” in the words of Abraham Lincoln himself. Mid-Westerners were as racist as anyone else in the mid nineteenth century, and the overwhelming majority of them did not want black people, free or slave, living among them. Lincoln’s own state of Illinois had amended its constitution in 1848 to prohibit the immigration of free blacks into the state, and Lincoln himself was a “manager” of the Illinois Colonization Society, which used state tax dollars to deport the small number of free blacks who resided in the state. White laborers and farm hands also did not want competition for their jobs by blacks, free or slave, and the Republican Party was happy to pander to them. Then there is the “problem” of slaves in the Territories inflating the congressional representation of the Democratic Party because of the Three-Fifths Clause of the Constitution. With more Democratic representation protectionist plunder would become that much more difficult to achieve. Abraham Lincoln’s first inaugural address was arguably the strongest defense of Southern slavery ever made by an American politician. He began by saying that in “nearly all the published speeches” he had made he declared that “I have no purpose, directly or indirectly, to interfere with the institution of slavery in the States where it exists.” I believe I have no lawful right to do so, and I have no inclination to do so.” He next quoted the Republican Party Platform of 1860, which he fully endorsed, that proclaimed that “the maintenance inviolate of the rights of the States, and especially the right of each State to order and control its own domestic institutions . . . is essential to that balance of power on which the perfection and endurance of four political fabric depend . . .” (emphasis added). “Domestic institutions” meant slavery. In her book Team of Rivals Doris Kearns-Goodwin uses primary sources to document that the source of the amendment was not really Ohio Congressman Thomas Corwin but Abraham Lincoln who, after he was elected but before he was inaugurated, instructed William Seward to get the amendment through the Northern-dominated U.S. Senate, which he did. Other Republicans saw to it that the Northern-dominated House of Representatives would also vote in favor of it. So on the day he was inaugurated Abraham Lincoln offered the strongest, most uncompromising defense of Southern slavery imaginable. He effectively announced to the world that if the Southern states remained in the union and submitted to being plundered by the Yankee-dominated protectionist empire, then nothing would ever be done about slavery by the U.S. government. The U.S. Senate’s War Aims Resolution later echoed Lincoln’s words that the war was NOT about slavery but about “saving the union,” a contention that Lincoln repeated many times, including in his famous letter to New York Tribune editor Horace Greeley in which he said publicly once again that this purpose was to “save the union” and not to do anything about slavery. In reality Lincoln’s regime utterly destroyed the voluntary union of the founding fathers. By “saving the union” they meant forcing the South to submit to protectionist plunder, not preserving the highly decentralized, voluntary union of the founding generation based on such principles as federalism and subsidiarity. Lies My Teacher Told M... Clyde N. Wilson Check Amazon for Pricing. In dramatic contrast, on the issue of tariff collection Abraham Lincoln was violently uncompromising. “Nothing” is more important than passing the Morrill Tariff, he had announced to a Pennsylvania audience a few weeks earlier. Nothing. In his first inaugural address he stated in the eighteenth paragraph that “[T]here needs to be no bloodshed or violence, and there shall be none unless it be forced upon the national authority.” What could he have been talking about? What would cause “the national authority” to commit acts of “bloodshed” and “violence” against its own American citizens? Doesn’t the president take an oath in which he promises to defend the constitutional liberties of American citizens? How would ordering acts of “bloodshed” and “violence” against them be consistent with the presidential oath of office which he had just taken, with his atheistic hand on a Bible, just moments earlier? Lincoln explained in the next sentence: “The power confided in me will be used to hold, occupy, and possess the property and places belonging to the Government, and to collect the duties and imposts; but beyond what may be necessary for these objects, there will be no invasion, no using force against or among the people anywhere” (emphasis added). The “duties and imposts” he referred to were the tariffs to be collected under the new Morrill Tariff law. If there was to be a war, he said, the cause of the war would in effect be the refusal of the Southern states to submit to being plundered by the newly-doubled federal tariff tax, a policy that the South had been periodically threatening nullification and secession over for the previous thirty-three years. In essence, Abraham Lincoln was announcing to the world that he would not back down to Southern secessionists as President Andrew Jackson had done by acquiescing in a negotiated reduction of the Tariff of Abominations (negotiated by Lincoln’s lifelong political idol and inspiration, Henry Clay, the author of the Tariff of Abominations in the first place!). He promised “violence,” “bloodshed,” and war over tariff collection, and he kept his promise.
Radiation exposure, organ and effective dose of CT-guided liver biopsy as a function of lesion depth and size Computed tomography (CT)-guided percutaneous biopsies play an important role in the diagnostic workup of liver lesions. Because radiation dose accumulates rapidly due to repeated image acquisition in a relatively small scan area, analysing radiation exposure is critical for improving radiation protection of CT-guided interventions. The aim of this study was to assess the radiation dose of CT-guided liver biopsies and the influence of lesion parameters, and to establish a local diagnostic reference level (DRL). In this observational retrospective cohort study, dose data of 60 CT-guided liver biopsies between September 2016 and July 2017 were analysed. Radiation exposure was reported for volume-weighted CT dose index (CTDIvol), size-specific dose estimate (SSDE), dose-length product (DLP) and effective dose (ED). Radiation dose of CT-guided liver biopsy was (median (interquartile range)): CTDIvol 9.91 mGy (8.3311.45 mGy), SSDE 10.42 mGy (9.3911.70 mGy), DLP 542 mGy cm (410733 mGy cm), ED 8.52 mSv (7.1713.25 mSv). Radiation exposure was significantly higher in biopsies of deep liver lesions compared to superficial lesions (DLP 679 ± 285 mGy cm vs. 497 ± 167 mGy cm, p = 0.0046). No significant dose differences were observed for differences in lesion or needle size. With helical CT spirals additional to the biopsy-guiding axial CT scans, radiation exposure was significantly increased: 797 ± 287 mGy cm vs. 495 ± 162 mGy cm, p < 0.0001. The local DRL is CTDIvol 9.91 mGy, DLP 542 mGy cm. Radiation dose is significantly increased in biopsies of deeper liver lesions compared with superficial lesions. Interventions with additional biopsy-guiding CT spirals lead to higher radiation doses. This study provides a detailed analysis of local radiation doses for CT-guided liver biopsies and provides a benchmark for optimising radiation protection in interventional radiology.
Pakistan Stock Exchange History The Pakistan Stock Exchange (PSX) came into inception in January 2016 when the Government of Pakistan decided to merge the three large exchange markets of the country into one combined market. Karachi Stock Exchange Founded on 18 September 1947, Karachi Stock Exchange Limited (KSE) was registered in Pakistan. The Karachi Stock Exchange Limited (KSE), was a stock exchange located at the Stock Exchange Building (SEB) on Stock Exchange Road, in the heart of Karachi's Business District, I. I. Chundrigar Road, Karachi, Sindh Province of Pakistan. It was Pakistan's largest and one of the oldest stock exchange in South Asia. Karachi Stock Exchange was also listed among 10 best stock markets in the world in 2015. According to Bloomberg, the Pakistani benchmark stock market index is the third-best performer in the world since 2009. In June 2015, Khaleej Times reported that since 2009, the Pakistani equities delivered 26 percent a year for US dollar investors, making Karachi the best-performing stock exchange in the world. As of 10 July 2015, total market capitalization reached Rs. 7.33 trillion (US$72 billion approximately). Lahore Stock Exchange Lahore Stock Exchange is located in Lahore, Pakistan. It was formally inducted into the national Pakistan Stock Exchange on 11 January 2016. The Lahore Stock Exchange (Guarantee) Limited came into existence in October 1970, under the Securities and Exchange Ordinance of 1969 by the Government of Pakistan in response to the needs of the provincial metropolis of the province of Punjab. It initially had 83 members and was housed in a rented building in the crowded Bank Square area of Lahore. Islamabad Stock Exchange Islamabad Stock Exchange or ISE was the youngest of the three stock exchanges of Pakistan and is located in the capital of Pakistan. Islamabad stock exchange (ISE) was incorporated as a guarantee-limited company on 25 October 1989 in Islamabad. ISE tower is a 22-storey building, which makes it the second highest building of Islamabad after the Telecom Tower. Area covered by the building is 562,629 sq ft (52,269.9 m²), it consists of three levels of basements and ground plus 18 floors above. Merger PSX was launched on 11 January 2016.Prior to the formal launch, the Karachi Stock Exchange held a two-day pre-production mock trading session for all certificate holders of the three bourses. The integration is expected to help reduce market fragmentation and create a strong case for attracting strategic partnerships necessary for providing technological expertise and assistance. The integration of the three exchanges has completed the second phase of the Stock Exchanges Demutualisation and Integration Act 2012, passed by a joint session of parliament.
Weather Forecasting Using Artificial Neural Networks The weather conditions such as Minimum temperature, Precipitation Rate, wind speed, Maximum temperature, pressure etc. have many important roles in the field of cultivation. In a country like India, having precise weather forecasting technology will grant farmers a chance for better productivity of crops. Not only farmers, weather information may by a direct route or not affect industrial sector also. Artificial Neural Network, which is a soft computing technique, is a constructive advance towards building an intuitive system which will be suited for processing the nonlinear conditions of weather and make prognosis. The suggested work focuses on initiating such an intuitive system which can forecast weather with least error rate with a more acceptable architecture.
This invention relates to circuit breakers used to protect an electrical circuit from damage caused by an overload or a short circuit. If a power surge occurs in a circuit protected by the circuit breaker, for example, the breaker will trip. This will cause a breaker that was in the “on” position to flip to the “off” position, and will interrupt the electrical power leading from that breaker. By tripping in this way, a circuit breaker can prevent a fire from starting on an overloaded circuit, and can also prevent the destruction of the device that is drawing the electricity or other devices connected to the protected circuit. A standard circuit breaker has a line and a load. Generally, the line receives incoming electricity, most often from a power company. This is sometimes referred to as the input into the circuit breaker. The load, sometimes referred to as the output, feeds out of the circuit breaker and connects to the electrical components being fed from the circuit breaker. A circuit breaker may protect an individual component connected directly to the circuit breaker, for example, an air conditioner, or a circuit breaker may protect multiple components, for example, household appliances connected to a power circuit which terminates at electrical outlets. In some applications, it is desirable to have a low profile circuit breaker, especially in computer data center applications where space is very limited. However, the new trend in data centers is to require a higher interrupting capacity (“IC”) requirement (e.g. 10,000 amps @ 240 & 277 VAC) due to higher voltage front end feeds for increased system efficiency. Still further, in applications such as computer data centers a bulky terminal barrier is required to be installed to protect the circuit breaker terminals, which requires additional space, and increases costs and the complexity of the installation. What is desired, therefore, is a slim profile circuit breaker with a incorporated terminal barrier. What is further desired is a slim profile circuit breaker design that allows for less complex installations, alleviates the requirement for a separate terminal barrier and which saves money on design, manufacturing and inventory requirements.
<gh_stars>1-10 import { buildProfile } from './utils'; import { IWarband } from './warbands.types'; const LegionsOfNagash: IWarband = { name: '<NAME>', alliance: 'Death', isAos: true, fighters: [ { name: 'Grave Guard (Greatblade)', profiles: [buildProfile(true, 1, 3, 5, 2, 5)], }, { name: 'Grave Guard (Blade & Shield)', profiles: [buildProfile(true, 1, 3, 4, 2, 4)], }, { name: 'Seneschal', profiles: [buildProfile(true, 1, 4, 5, 2, 5)], }, { name: 'Skeleton Warrior (Blade)', profiles: [buildProfile(true, 1, 3, 3, 1, 3)], }, { name: 'Skeleton Warrior (Spear)', profiles: [buildProfile(true, 2, 2, 3, 1, 4)], }, { name: 'Skeleton Champion', profiles: [buildProfile(true, 1, 4, 3, 1, 3)], }, { name: 'Necromancer', profiles: [buildProfile(true, '3-7', 2, 3, 3, 6), buildProfile(false, 2, 3, 4, 1, 4)], }, ], }; export default LegionsOfNagash;
Forward Problem of Near-infrared Optical Tomography Solved by Finite Element Method The solution to forward problem of near-infrared optical tomography (NIR OT) is a vital question. Light propagation in the tissue can be described by the steady-state (time independent) diffusion equation, boundary condition is the Dirichlet condition. The simulation tool based on Finite Element Method (FEM) has been developed to solve the equation quickly and exactly. Some models and the distribution of light intensity around the boundary of models have been given. The BP neural network was used to find the relationship between the data measured by instrument and predicted by FEM. The inverse problem of OT can be solved as optimization problem, so the properties of the fitness function has also been studied.
Q: How to tell Google Chrome to use my Keychain Background: Story: A colleague of mine told me about 1Password and it seems good to me. I am always trying to use tools which Mac OS X itself gives me, so I've given the Keychain a try. It seems satisfying, but I don't know how to tell Google Chrome to use my specific keychain. I need it to separate saved stuff for work and for private (syncing private to work, but separated from work data). Stuff: Google Chrome 21.0.1180.57 (Fully updated) Mac OS X Lion (Fully updated) OS X Mountain Lion (Fully updated) Question: How do I tell to Chrome to use a specific keychain and to save data from/to this keychain? A: Since v. 45 of chrome passwords are not synced to the OSX keychain anymore, the support has been dropped completely. https://code.google.com/p/chromium/issues/detail?id=466638 Remove OS X Keychain integration for saved passwords Starting in OS X 10.9, Apple introduced the iCloud Keychain. This manifests itself as the “Local Items” keychain in Keychain Access. Items in this keychain are only accessible to applications with the keychain-access-groups entitlement [1][2]. This, like other iCloud entitlements, is “available only to apps submitted to the App Store or to the Mac App Store” [3]. The effect of this is that on 10.9 and 10.10, passwords stored in Safari are not accessible to Chrome (but passwords originated in Chrome are still shared to Safari) Later in the doc: All the changes hit the 45 release. The plan is to get rid of the complicated Keychain code, thereby improving the robustness of the Chrome Password manager. A: This answer is no longer correct: OS X Keychain support is being removed from Chrome 45. See @patte8's answer for more information. As far as I can tell, Chrome uses the keychain automatically: Google Chrome can save your usernames and passwords for different websites. The browser can then automatically complete the sign-in fields for you when you next visit these websites. These passwords are stored in the same system that contains your saved passwords from other browsers. On a Mac, Google Chrome uses the Keychain Access to store your login information. Source: https://support.google.com/chrome/bin/answer.py?hl=en&answer=95606 (I'll leave the bit about choosing a specific keychain for Chrome to someone else, I don't know if that can be done)
In the Movie In the Movie Ren is from Chicago. He is from Boston. Ren moves to Bomont with his Mother. They live with his Aunt and Uncle. Ren's mother has died of Leukemia in Boston and his Aunt and Uncle agree to take him in. Ariel asks her father if she can go for a soda with her friends after church. Instead she drives with them and her boyfriend pulls up next to them in his truck. She climbs out the window of the moving car and grabs on to the truck. She is standing between the two cars as they drive down the highway. A transport truck comes and almost kills her. He asks her father if she can go to Rusty's house for an all night study session. Instead they go to the racetrack to watch Chuck win the race and she grabs the checkered flag and jumps into his car and hangs out the side as he races around the track. After church someone approaches the preacher and tells him that they want to have the kids read Kurt Vonnegut's book, Slaughter House Five. Ren says it is a classic, but the people all look at him funny, and say that in other towns it might be a classic, but not there. There is no mention of any books.
A jury found an NYPD officer guilty on Thursday of falsely arresting a man for filming him and illegally searching a woman in Washington Heights in 2014, then lying about the interaction in subsequent court documents to justify the bust. Jonathan Munoz, 33, was convicted of filing a false instrument, official misconduct, and making a false statement, after a trial in Manhattan Supreme Court. "Police officers have one of the most difficult and dangerous jobs in the world, and they are tasked with carrying out their sworn duty to protect with the utmost honesty and integrity," Manhattan District Attorney Cy Vance said in a statement. "These tenets are critical to maintaining public confidence in law enforcement authorities and our criminal justice system as a whole." Munoz arrested a man named Jason Disisto early one morning outside of a Puerto Rican restaurant near West 183rd Street and Saint Nicholas Avenue, after Disisto saw Munoz reaching into a friend's pocket, and Disisto began to record with another friend's phone. As Disisto lined up his shot, Munoz grabbed him, and he and two other officers hauled Disisto off in cuffs. One of the cops threw Disisto's phone out of the car window before they drove off. Police charged Disisto with obstructing police work, disorderly conduct, and resisting arrest, and in a police report, Munoz wrote that Disisto lunged and took a swing at him. Fortunately for Disisto, surveillance footage of the incident showed that this was a lie. The city settled a lawsuit by Disisto for an undisclosed amount of taxpayer money. The official misconduct charged stemmed from the baseless search of the woman, whom Munoz claimed he suspected of buying marijuana. "We are pleased both the jury and the DA's office took this perjury so seriously," Disisto's lawyer David Rankin said in an email (making a false written statement in this context is a form of perjury). "Lying by police has to stop. Maybe this verdict will be a step in that direction." In all, Munoz was convicted of three misdemeanor counts and four felonies. The misdemeanors each carry maximum sentences of a year in prison, and the felonies carry maximum sentences of four years each. Sentencing is set for May 9th. Munoz has worked as a police officer since 2006. In December 2015, an NYPD spokesperson told Gothamist that Munoz had been suspended without pay in connection with the Disisto incident. Payroll records indicate that Munoz made $116,000 last year and $111,000 in 2015, on a base salary of $78,000 and $76,000, respectively. An NYPD spokesperson explained the discrepancy in an email, saying that officers can only be suspended without pay for a maximum of 30 days before they return to being salaried. The spokesperson said the department is reviewing Munoz's status now that he has been convicted. Munoz's attorney was not immediately available for comment. Earlier this week, the Queens District Attorney's Office indicted two NYPD detectives on similar charges for allegedly falsely arresting an innocent man after planting cocaine on him, and swearing out drug-dealing charges that landed the man in jail on Rikers Island for 52 days. The drug case dragged out for a year and seven months before the man cleared his name thanks to surveillance footage, and the city recently agreed to pay out $547,500 to settle its portion of the civil case. The lawsuit against the individual detectives, Kevin Desormeau and Sasha Neve, is ongoing. The pair were arrested last month on charges of falsifying the reasons for a search that led to a gun arrest in Washington Heights. Both had previously been named in federal civil rights lawsuits alleging brutality, misconduct, and false arrests. The Manhattan District Attorney's Office has a Conviction Integrity Program in which it tracks civil rights cases against cops to vet witnesses and identify information that needs to be disclosed to defense attorneys. The NYPD has long been criticized by advocates, as well as city and police officials, for not doing enough to track misconduct allegations and reprimand officers with a record of abuse. The city paid out $228.5 million in awards and settlements for police misconduct suits in 2016, nearly triple the payouts in 2005.
import {Component, ElementRef ,AfterViewInit} from '@angular/core'; declare var componentHandler: any; @Component({ selector: 'right-menu', template: ` <button id="menu-lower-right" class="mdl-button mdl-js-button mdl-button--icon mdl-layout--small-screen-only"> <i class="material-icons">more_vert</i> </button> <ul class="mdl-menu mdl-menu--bottom-right mdl-js-menu mdl-js-ripple-effect" for="menu-lower-right"> <li class="mdl-menu__item">Remane List</li> <li class="mdl-menu__item">Delete List</li> <li class="mdl-menu__item">Clear List</li> <li class="mdl-menu__item">Share List</li> </ul> ` }) export class RightMenu implements AfterViewInit { constructor(private el:ElementRef) {} ngAfterViewInit() { //componentHandler.upgradeAllRegistered(); } }
. OBJECTIVES To compare the effectivity and safety of second-trimester abortion induced by two different types of prostaglandins. TYPE OF STUDY Retrospective study. SETTING Department of Obstetrics and Gynecology, University Hospital Ostrava and Department of Obstetrics and Gynecology, University Hospital Olomouc. METHODS Retrospective analysis of 128 second trimester abortions induced by misoprostol and 82 second trimester abortions induced by dinoprost. Total length of abortion, failure of the method, need for instrumental revision of the uterine cavity, request for epidural analgesia and length of hospital stay were compared. RESULTS In total 210 women were included. Misoprostol was used in 128 cases and dinoprost in 82 cases. The average gestational age was 18+1 in misoprostol group and 20+2 in dinoprost group. Ninety two percent of women with misoprostol aborted within 24 hours while in the dinoprost group it was 68%, withing 16 hours the number of completed abortions was 62% (misoprostol) versus 48% (dinoprost). The method failed in 2% of cases with misoprostol and 7% of cases with dinoprost. CONCLUSION We conclude that induction of second-trimester abortion with the use of misoprostol is safe, quick, non-invasive and comfortable method with low frequency of complications and side effects.
<filename>src/actions/ble.ts // SPDX-License-Identifier: MIT // Copyright (c) 2020 The Pybricks Authors // File: actions/ble.ts // Actions for managing Bluetooth Low Energy connections. import { Action } from 'redux'; /** * Bluetooth low energy device action types. */ export enum BleDeviceActionType { /** * Connecting to a device has been requested. */ Connect = 'ble.device.action.connect', /** * The connection completed successfully. */ DidConnect = 'ble.device.action.didConnect', /** * The connection did not complete successfully. */ DidFailToConnect = 'ble.device.action.didFailToConnect', /** * Disconnecting from a device has been requested. */ Disconnect = 'ble.device.action.disconnect', /** * The device was disconnected. */ DidDisconnect = 'ble.device.action.didDisconnect', } export type BleDeviceConnectAction = Action<BleDeviceActionType.Connect>; /** * Creates an action that indicates connecting has been requested. */ export function connect(): BleDeviceConnectAction { return { type: BleDeviceActionType.Connect }; } export type BleDeviceDidConnectAction = Action<BleDeviceActionType.DidConnect>; /** * Creates an action that indicates a device was connected. */ export function didConnect(): BleDeviceDidConnectAction { return { type: BleDeviceActionType.DidConnect }; } export enum BleDeviceFailToConnectReasonType { NoWebBluetooth = 'ble.device.didFailToConnect.noWebBluetooth', Canceled = 'ble.device.didFailToConnect.canceled', NoGatt = 'ble.device.didFailToConnect.noGatt', NoService = 'ble.device.didFailToConnect.noService', Unknown = 'ble.device.didFailToConnect.unknown', } type Reason<T extends BleDeviceFailToConnectReasonType> = { reason: T; }; export type BleDeviceFailToConnectNoWebBluetoothReason = Reason<BleDeviceFailToConnectReasonType.NoWebBluetooth>; export type BleDeviceFailToConnectCanceledReason = Reason<BleDeviceFailToConnectReasonType.Canceled>; export type BleDeviceFailToConnectNoGattReason = Reason<BleDeviceFailToConnectReasonType.NoGatt>; export type BleDeviceFailToConnectNoServiceReason = Reason<BleDeviceFailToConnectReasonType.NoService>; export type BleDeviceFailToConnectUnknownReason = Reason<BleDeviceFailToConnectReasonType.Unknown> & { err: Error; }; export type BleDeviceDidFailToConnectReason = | BleDeviceFailToConnectNoWebBluetoothReason | BleDeviceFailToConnectCanceledReason | BleDeviceFailToConnectNoGattReason | BleDeviceFailToConnectNoServiceReason | BleDeviceFailToConnectUnknownReason; export type BleDeviceDidFailToConnectAction = Action<BleDeviceActionType.DidFailToConnect> & BleDeviceDidFailToConnectReason; /** * Creates an action that indicates a device failed to connect. */ export function didFailToConnect( reason: BleDeviceDidFailToConnectReason, ): BleDeviceDidFailToConnectAction { return { type: BleDeviceActionType.DidFailToConnect, ...reason }; } export type BleDeviceDisconnectAction = Action<BleDeviceActionType.Disconnect>; /** * Creates an action that indicates disconnecting was requested. */ export function disconnect(): BleDeviceDisconnectAction { return { type: BleDeviceActionType.Disconnect }; } export type BleDeviceDidDisconnectAction = Action<BleDeviceActionType.DidDisconnect>; /** * Creates an action that indicates a device was disconnected. */ export function didDisconnect(): BleDeviceDidDisconnectAction { return { type: BleDeviceActionType.DidDisconnect }; } /** * Common type for all BLE connection actions. */ export type BLEConnectAction = | BleDeviceConnectAction | BleDeviceDidConnectAction | BleDeviceDidFailToConnectAction | BleDeviceDisconnectAction | BleDeviceDidDisconnectAction; /** * High-level BLE actions. */ export enum BLEActionType { Toggle = 'ble.action.toggle', } export type BLEToggleAction = Action<BLEActionType.Toggle>; export function toggleBluetooth(): BLEToggleAction { return { type: BLEActionType.Toggle }; } /** Common type for high-level BLE actions */ export type BLEAction = BLEToggleAction;
Congratulations to the people of TransCanada, Inc., whose long fight to connect the tar-sands-oil-pumping Keystone pipeline to the Gulf Coast of America finally reached fruition on Wednesday. Congratulations to the people of TransCanada, Inc., whose long fight to connect the tar-sands-oil-pumping Keystone pipeline to the Gulf Coast of America finally reached fruition on Wednesday. Even without Keystone XL being approved. The company announced that oil is now flowing through its Gulf Coast pipeline, a 487-mile stretch of pipe running from Cushing, Oklahoma, to Nederland, Texas. It's the orange dotted segment on that map, but dotted/under construction no longer. After four years of intense scientific and regulatory scrutiny and more than 15,000 pages of environmental reviews, we are proud to announce that the Gulf Coast Project, the safest pipeline ever built on U.S. soil, has begun delivering crude oil from Cushing, Okla., to state-of-the-art refineries in Texas. If you follow that map backwards, you see that the oil in Cushing arrives there via the (green) Cushing Extension pipeline, which runs from Steele City, Nebraska, south. Then, the (brown) Keystone Pipeline, original version, which runs from Hardisty, Alberta to Steele City. The reason TransCanada has been pushing for the Keystone XL pipeline is largely that the existing Keystone pipeline, completed in June 2010, runs 2,147 miles and carries 590,000 barrels of oil a day. The very controversial Keystone XL pipeline would almost double the overall capacity — and take a much shorter route. It's been held up as the Obama administration reviews whether or not the expansion will meet environmental standards. As The Hill reports, environmental groups are not happy about the new pipeline churning into action. The head of the Sierra Club: "Today’s announcement is a painful example of President Obama’s all of the above energy plan at work: polluted air and water, carbon pollution, and the ever present threat of poisoned drinking water for millions of Texas and Oklahoma families." Building the southern stretch of pipeline — which, unlike XL, didn't need State Department sign-off, since it didn't cross any international borders — was itself highly controversial. A number of activists and landowners protested its construction every step of the way, drawing renewed attention to the particularly toxic form of oil that TransCanada wants to ship form Alberta. Diluted bitumen (or dilbit) is extracted from tar sands using a carbon-intensive process that some studies indicate makes that form of oil even worse for the environment than conventional crude. As of Wednesday, TransCanada's product is on its way to the Gulf Coast.
RISING RENTS, mounting illegal evictions and an accelerating wave of demolitions and condo conversions have made Los Angeles a nightmare for many renters. In recent months, the City Council has passed several ordinances to strengthen tenant protections. Just last week, for instance, it closed a loophole that had allowed landlords to avoid rent control by tearing down their apartment buildings and replacing them with new and more expensive rental units. What was notable about this "small but significant" victory, according to tenant organizer Larry Gross of the Coalition for Economic Survival, was that it reflected renters' growing political clout. The city of Los Angeles established rent control after tenants protested landlords' refusal to reduce rents to reflect their tax savings from Proposition 13, which passed in 1978. Landlords and developers fought back, pressuring the Legislature to pass the Ellis Act in 1986. The law allows landlords to circumvent local rent controls by getting out of the rental business, mostly by demolishing their buildings. In 1996, the real estate lobby persuaded the Legislature to weaken rent control further by removing local communities' right to limit increases when an apartment is vacated. About three-quarters of the city's 800,000 rental apartments are still regulated. Landlords can annually raise rents to recoup cost increases, but tenants are protected from gouging. Once a tenant leaves, landlords can increase rents for new tenants to current market rates — a provision called vacancy decontrol. Eventually, all apartments will rise to market rates as tenants die or leave. Some landlords, however, don't want to wait. Their attempts to circumvent the laws protecting renters has helped fuel the tenant-organizing movement. One tactic some landlords use to force tenants out so they can raise rents is to intimidate them. These landlords refuse to accept their tenants' monthly rent, then try to evict them for "nonpayment." Others fail to obey the city's health and safety laws, then send tenants eviction notices when they say they want to make major repairs. During the past year, the number of these kinds of illegal evictions increased, according to tenant groups and housing lawyers. Some landlords and developers convert apartments to condominiums to escape rent regulations. The real estate lobby contends that condo conversions improve the housing stock and provide renters with a first step on the homeownership ladder. But this is rarely the case. Converting $800-a-month apartments into $400,000 condos simply makes the existing inventory of housing less affordable. Since 2001, more than 13,000 rent-controlled apartments have been demolished or converted (the city does not distinguish between the two), about three-quarters of them in the last two years. L.A. is losing as many units as it adds, according to a study by Southern California Assn. of Non-Profit Housing. The City Council recently voted to double and triple the amount of relocation money tenants receive when they are evicted because of condo conversions. But with rental vacancy rates below 5% — and in some areas even lower — tenants typically wind up in inferior housing paying higher rents, if they find a place at all. Then there are landlords who have violated the Ellis Act. Under the law, if city officials discover that landlords have demolished apartments and built new units with "for rent" rather than "for sale" signs, authorities can put the buildings back under rent control, starting at current market rates. A 2003 city study identified this tactic as a serious threat to preserving the city's affordable housing stock. But it wasn't until last week that the City Council acted to enforce this provision. Los Angeles certainly needs to expand the supply of affordable housing. To that end, city officials should identify a permanent revenue source for the city's affordable-housing trust fund and require all developers to build mixed-income housing. But officials should also safeguard the existing inventory of affordable rental housing and protect renters from slums and involuntary displacement. Ultimately, this is a political question. In the city's high-priced housing market, most renters — middle class as well as poor — can't afford to buy a home. Faced with the prospect of being long-term renters, tenants have become better organized and bolder, engaging in protest and even civil disobedience to spotlight their grievances. Last month, for instance, several hundred housing activists organized a march to City Hall and a "tent city" encampment outside the building. Earlier this month, about 35 Echo Park tenants paid a surprise visit to UCLA, where their landlord — a professor whose rent increases would force many of them to leave — was teaching a course on real estate finance. A burgeoning coalition of grass-roots community and tenant groups — the Coalition for Economic Survival, ACORN, the L.A. Community Action Network, L.A. Voice, Coalition L.A., the L.A. Coalition to End Hunger & Homelessness, Inquilinos Unidos and East L.A. Community Corp. among them — have enlisted the support of faith-based groups, nonprofit developers and unions to support their cause. Indeed, the issues facing renters and union members — hotel workers, janitors, security guards, garment sewers and grocery clerks, as well as nurses, schoolteachers and firefighters — overlap. A pay raise can be quickly wiped out by a rent increase. An eviction notice can threaten their families' stability. These groups aim to register more tenants to vote and mobilize them to support pro-tenant candidates for city and state offices. They are up against powerful interests — landlords (represented by the Apartment Owners Assn.) and developers (represented by the Central City Assn.). The question boils down to a battle between organized voters and organized money. Few elected officials want voters to think that they are in the pockets of the real estate lobby. But protecting renters isn't just good politics. To strengthen the city's business climate, L.A. needs an adequate supply of affordable housing for its diverse workforce. Housing will increasingly take center stage in city politics, and renters, who make up about 60% of L.A. residents, could become a significant player.
The cytologic diagnosis of gangliocytic paraganglioma: A case report Gangliocytic paragangliomas are rare tumors primarily found in the duodenum. We report a case of a woman who presented with a retroperitoneal lymph node involved by metastatic gangliocytic paraganglioma. Subsequently, fineneedle aspiration (FNA) cytology was used to identify the primary duodenal gangliocytic paraganglioma. The smears of the aspirate material were highly cellular and contained a dominant population of epithelioid cells, a second population of ganglion cells and a third population of small, bland spindled cells. To our knowledge, the cytologic features of gangliocytic paraganglioma have not previously been documented. Diagn. Cytopathol. 2013. © 2011 Wiley Periodicals, Inc.
<reponame>gour/holidata<filename>tests/snapshots/snap_test_holidata/test_holidata_produces_holidays_for_locale_and_year[en_GB-2013] 1.py<gh_stars>10-100 [ { 'date': '2013-01-01', 'description': "New Year's Day", 'locale': 'en-GB', 'notes': '', 'region': '', 'type': 'NF' }, { 'date': '2013-03-29', 'description': 'Good Friday', 'locale': 'en-GB', 'notes': '', 'region': '', 'type': 'NRV' }, { 'date': '2013-04-01', 'description': 'Easter Monday', 'locale': 'en-GB', 'notes': '', 'region': '', 'type': 'NRV' }, { 'date': '2013-05-06', 'description': 'Early May Bank Holiday', 'locale': 'en-GB', 'notes': '', 'region': '', 'type': 'NV' }, { 'date': '2013-05-27', 'description': 'Spring Bank Holiday', 'locale': 'en-GB', 'notes': '', 'region': '', 'type': 'NV' }, { 'date': '2013-08-26', 'description': 'August Bank Holiday', 'locale': 'en-GB', 'notes': '', 'region': '', 'type': 'NV' }, { 'date': '2013-12-25', 'description': 'Christmas Day', 'locale': 'en-GB', 'notes': '', 'region': '', 'type': 'NRF' }, { 'date': '2013-12-26', 'description': 'Boxing Day', 'locale': 'en-GB', 'notes': '', 'region': '', 'type': 'NF' } ]
version https://git-lfs.github.com/spec/v1 oid sha256:3a4281fbb445fa1fa8ddac2ac4887ef5a2cc3b8ffdf854111ba5c3cd2f17a762 size 1665116
/** * The type Cinema filter by availability. */ @Component @Qualifier("FilterByA") public class CinemaFilterByAvailability implements CinemaFilterI { @Override public List<Movie> filerMovie(Cinema cinema, String date, String filter) throws CinemaFilterException { if (!isNumeric(filter)) { throw new CinemaFilterException(CinemaFilterException.ms2); } int availability = Integer.valueOf(filter); List<Movie> moviesByAvailability = new LinkedList<Movie>(); List<CinemaFunction> functions = cinema.getFunctions(); for (CinemaFunction cf : functions) { if (cf.movieAvailability() > availability && cf.getDate().equals(date)) { moviesByAvailability.add(cf.getMovie()); } } return moviesByAvailability; } /** * Is numeric boolean. * * @param str the str * @return the boolean */ public static boolean isNumeric(String str) { try { Double.parseDouble(str); return true; } catch (NumberFormatException e) { return false; } } }
<gh_stars>1-10 import javax.swing.JOptionPane; class JOptionPaneDemo { public static void main(String[] args) { String appleString = JOptionPane.showInputDialog("Enter number of apples:"); int appleCount = Integer.parseInt(appleString); String orangeString = JOptionPane.showInputDialog("Enter number of oranges:"); int orangeCount = Integer.parseInt(orangeString); int totalFruitCount = appleCount + orangeCount; JOptionPane.showMessageDialog(null, "The total number of fruits = " + totalFruitCount); System.exit(0); } }
Surface plasmon excitation and non-zero induced surface current density We study the general conditions for the surface plasmon excitation at the interface between two media with non-zero input electromagnetic fields. Using the boundary conditions for electromagnetic waves allowing for non-zero induced surface charge and surface current densities, we recover the same surface plasmon resonance condition for the cases of dielectric-metal interfaces, but with non-zero surface current densities and therefore discontinuous tangential components of the magnetic field across the boundary. This is in sharp contrast to the conventional understanding of the surface plasmon where the tangential components of both the electrical and magnetic fields are continuous across the boundary. The similarities and differences between the excited surface plasmon involving non-zero surface current densities and the traditional self-sustained surface plasmon are discussed and a united picture is provided.
Analysis of the sorption properties of different soils using water vapour adsorption and potentiometric titration methods Abstract Parameters of specific surface area as well as surface charge were used to determine and compare sorption properties of soils with different physicochemical characteristics. The gravimetric method was used to obtain water vapour isotherms and then specific surface areas, whereas surface charge was estimated from potentiometric titration curves. The specific surface area varied from 12.55 to 132.69 m2 g−1 for Haplic Cambisol and Mollic Gleysol soil, respectively, and generally decreased with pH (R=0.835; = 0.05) and when bulk density (R=−0.736; = 0.05) as well as ash content (R=−0.751; = 0.05) increased. In the case of surface charge, the values ranged from 63.00 to 844.67 mol g−1 Haplic Fluvisol and Mollic Gleysol, respecively. Organic matter gave significant contributions to the specific surface area and cation exchange capacity due to the large surface area and numerous surface functional groups, containing adsorption sites for water vapour molecules and for ions. The values of cation exchange capacity and specific surface area correlated linearly at the level of R=0.985; = 0.05.
Eye Gaze and Perceptual Adaptation to Audiovisual Degraded Speech. Purpose Visual cues from a speaker's face may benefit perceptual adaptation to degraded speech, but current evidence is limited. We aimed to replicate results from previous studies to establish the extent to which visual speech cues can lead to greater adaptation over time, extending existing results to a real-time adaptation paradigm (i.e., without a separate training period). A second aim was to investigate whether eye gaze patterns toward the speaker's mouth were related to better perception, hypothesizing that listeners who looked more at the speaker's mouth would show greater adaptation. Method A group of listeners (n = 30) was presented with 90 noise-vocoded sentences in audiovisual format, whereas a control group (n = 29) was presented with the audio signal only. Recognition accuracy was measured throughout and eye tracking was used to measure fixations toward the speaker's eyes and mouth in the audiovisual group. Results Previous studies were partially replicated: The audiovisual group had better recognition throughout and adapted slightly more rapidly, but both groups showed an equal amount of improvement overall. Longer fixations on the speaker's mouth in the audiovisual group were related to better overall accuracy. An exploratory analysis further demonstrated that the duration of fixations to the speaker's mouth decreased over time. Conclusions The results suggest that visual cues may not benefit adaptation to degraded speech as much as previously thought. Longer fixations on a speaker's mouth may play a role in successfully decoding visual speech cues; however, this will need to be confirmed in future research to fully understand how patterns of eye gaze are related to audiovisual speech recognition. All materials, data, and code are available at https://osf.io/2wqkf/.
# -*- coding: utf-8 -*- """Implementation of ITagWriter.""" import abc import datetime import typing from typing import Any, Awaitable, Dict, Optional, Tuple, Union from systemlink.clients import tag as tbase from systemlink.clients.core._internal._timestamp_utilities import TimestampUtilities from typing_extensions import Literal _VALID_TYPES = { tbase.DataType.BOOLEAN: bool, tbase.DataType.DATE_TIME: datetime.datetime, tbase.DataType.DOUBLE: (float, int), tbase.DataType.INT32: int, tbase.DataType.UINT64: int, tbase.DataType.STRING: str, } # type: Dict[tbase.DataType, Union[type, Tuple[type, type]]] class _ITagWriterOverloads(abc.ABC): """Contains the overloaded methods of ITagWriter. These overloads exist so that ``mypy`` can validate proper data types are used when writing tag values, as long as a literal DataType enum value is given when calling :meth:`get_tag_writer`. But they are hidden away in a base class so that they aren't documented by Sphinx, because Sphinx doesn't properly recognize the type annotations of overloads. See also: https://github.com/sphinx-doc/sphinx/issues/7901 """ @typing.overload def get_tag_writer( self, path: str, data_type: Literal[tbase.DataType.BOOLEAN] ) -> "tbase.TagValueWriter[bool]": pass @typing.overload def get_tag_writer( self, path: str, data_type: Literal[tbase.DataType.DATE_TIME] ) -> "tbase.TagValueWriter[datetime.datetime]": pass @typing.overload def get_tag_writer( self, path: str, data_type: Literal[tbase.DataType.DOUBLE] ) -> "tbase.TagValueWriter[float]": pass @typing.overload def get_tag_writer( self, path: str, data_type: Literal[tbase.DataType.INT32] ) -> "tbase.TagValueWriter[int]": pass @typing.overload def get_tag_writer( self, path: str, data_type: Literal[tbase.DataType.UINT64] ) -> "tbase.TagValueWriter[int]": pass @typing.overload def get_tag_writer( self, path: str, data_type: Literal[tbase.DataType.STRING] ) -> "tbase.TagValueWriter[str]": pass @typing.overload def get_tag_writer( self, path: str, data_type: tbase.DataType ) -> "tbase.TagValueWriter[Any]": pass def get_tag_writer( self, path: str, data_type: tbase.DataType ) -> "tbase.TagValueWriter": """Get a :class:`TagValueWriter` for this path. Args: path: The path of the tag to write. data_type: The data type of the tag to write. """ return self._get_tag_writer(path, data_type) @abc.abstractmethod def _get_tag_writer( self, path: str, data_type: tbase.DataType ) -> "tbase.TagValueWriter": """Get a :class:`TagValueWriter` for this path. Args: path: The path of the tag to write. data_type: The data type of the tag to write. """ ... class ITagWriter(_ITagWriterOverloads): """Provides an interface for writing the current value of a single SystemLink tag.""" def write( self, path: str, data_type: tbase.DataType, value: Union[bool, int, float, str, datetime.datetime], *, timestamp: Optional[datetime.datetime] = None ) -> None: """Write a tag's value. Args: path: The path of the tag to write. data_type: The data type of the value to write. value: The tag value to write. timestamp: A custom timestamp to associate with the value, or None to have the server specify the timestamp. Raises: ValueError: if ``path`` is empty or invalid. ValueError: if ``path`` or ``value`` is None. ValueError: if ``data_type`` is invalid. ValueError: if ``value`` has the wrong data type. ReferenceError: if the writer has been closed. ApiException: if the API call fails. """ self._validate_type(value, data_type) if data_type == tbase.DataType.DATE_TIME: value = TimestampUtilities.datetime_to_str( typing.cast(datetime.datetime, value) ) self._write(path, data_type, str(value), timestamp) def write_async( self, path: str, data_type: tbase.DataType, value: str, *, timestamp: Optional[datetime.datetime] = None ) -> Awaitable[None]: """Asynchronously write a tag's value. Args: path: The path of the tag to write. data_type: The data type of the value to write. value: The tag value to write. timestamp: A custom timestamp to associate with the value, or None to have the server specify the timestamp. Returns: A task representing the asynchronous operation. Raises: ValueError: if ``path`` is empty or invalid. ValueError: if ``path`` or ``value`` is None. ValueError: if ``data_type`` is invalid. ValueError: if ``value`` has the wrong data type. ReferenceError: if the writer has been closed. ApiException: if the API call fails. """ self._validate_type(value, data_type) if data_type == tbase.DataType.DATE_TIME: value = TimestampUtilities.datetime_to_str( typing.cast(datetime.datetime, value) ) return self._write_async(path, data_type, str(value), timestamp) @classmethod def _validate_type( cls, value: Union[bool, int, float, str, datetime.datetime], data_type: tbase.DataType, ) -> None: if data_type == tbase.DataType.UNKNOWN: raise ValueError("data_type is UNKNOWN") if not isinstance(value, _VALID_TYPES[data_type]): raise ValueError( "value has wrong python data type ({}) for SystemLink data type {}".format( type(value).__name__, data_type.name ) ) # python's bool is a subclass of int, so the above check won't catch some cases if isinstance(value, bool) and data_type != tbase.DataType.BOOLEAN: raise ValueError( "value has wrong python data type ({}) for SystemLink data type {}".format( type(value).__name__, data_type.name ) ) if data_type == tbase.DataType.INT32: assert isinstance(value, int) if not -(2 ** 31) <= value < 2 ** 31: raise ValueError( "value {} is not the valid range of an INT32".format(value) ) elif data_type == tbase.DataType.UINT64: assert isinstance(value, int) if not 0 <= value < 2 ** 64: raise ValueError( "value {} is not the valid range of a UINT64".format(value) ) @abc.abstractmethod def _write( self, path: str, data_type: tbase.DataType, value: str, timestamp: Optional[datetime.datetime] = None, ) -> None: """Write a tag's value that's been serialized to a string. Args: path: The path of the tag to write. data_type: The data type of the value to write. value: The tag value to write, serialized as a string. timestamp: A custom timestamp to associate with the value, or None to have the server specify the timestamp. Raises: ValueError: if ``path`` is empty or invalid. ValueError: if ``path`` or ``value`` is None. ValueError: if ``data_type`` is invalid. ReferenceError: if the writer has been closed. ApiException: if the API call fails. """ ... @abc.abstractmethod async def _write_async( self, path: str, data_type: tbase.DataType, value: str, timestamp: Optional[datetime.datetime] = None, ) -> None: """Asynchronously write a tag's value that's been serialized to a string. Args: path: The path of the tag to write. data_type: The data type of the value to write. value: The tag value to write, serialized as a string. timestamp: A custom timestamp to associate with the value, or None to have the server specify the timestamp. Returns: A task representing the asynchronous operation. Raises: ValueError: if ``path`` is empty or invalid. ValueError: if ``path`` or ``value`` is None. ValueError: if ``data_type`` is invalid. ReferenceError: if the writer has been closed. ApiException: if the API call fails. """ ... def _get_tag_writer( self, path: str, data_type: tbase.DataType ) -> "tbase.TagValueWriter": """Get a :class:`TagValueWriter` for this path. Args: path: The path of the tag to write. data_type: The data type of the tag to write. """ return tbase.TagValueWriter(self, tbase.TagData(path, data_type))
Determination of alfentanil in serum by radioimmunoassay or capillary column gas-liquid chromatography. A comparison of the assays. In view of recent controversies about the specificity and accuracy of radioimmunoassays (RIA) for morphine and alfentanil, we assessed the validity of an RIA for alfentanil by comparing it with a novel capillary column gas-liquid chromatographic (GLC) assay. The coefficients of variation for eight determinations of alfentanil in plasma or serum were approximately 2% at 2, 20, and 400 ng/ml with both assays. The assay comparison was done using 85 serum samples from patients given intravenous alfentanil. There was an excellent correlation between the assay results obtained by RIA and by GLC in the range of 10-1 825 ng/ml. The two assays can therefore be used interchangeably in pharmacokinetic studies.
Overlap lattice fermion in a gravitational field We construct a lattice Dirac operator of overlap type that describes the propagation of a Dirac fermion in an external gravitational field. The local Lorentz symmetry is manifestly realized as a lattice gauge symmetry, while it is believed that the general coordinate invariance is restored only in the continuum limit. Our doubler-free Dirac operator satisfies the conventional Ginsparg-Wilson relation and possesses gamma_5 hermiticity with respect to the inner product, which is suggested by the general coordinate invariance. The lattice index theorem in the presence of a gravitational field holds, and the classical continuum limit of the index density reproduces the Dirac genus. Reduction to a single Majorana fermion is possible for 8k+2 and 8k+4 dimensions, but not for 8k dimensions, which is consistent with the existence of the global gravitational/gauge anomalies in 8k dimensions. Other Lorentz representations, such as the spinor-vector and the bi-spinor representations, can also be treated. Matter fields with a definite chirality (with respect to the lattice-modified chiral matrix) are briefly considered. §1. Introduction It is now well-known that a Dirac operator defined on a Euclidean lattice allows an exact chiral symmetry of a lattice-modified form 1) if the lattice Dirac operator satisfies the, 3) Such Dirac operators in lattice gauge theory were discovered in the context of the perfect action approach 3), 4) and in the context of the overlap formulation. 5) The lattice action of a massless Dirac fermion is exactly invariant under the modified lattice chiral transformation, and the functional integration measure is invariant under flavor non-singlet chiral transformations. Under a flavor-singlet U chiral rotation, the integration measure is not invariant and gives rise to a non-trivial Jacobian, just as in the Fujikawa method 6) in the continuum theory; the continuum limit of the Jacobian reproduces the axial U anomaly 7)-11) (see also Ref. 12)). Moreover, the axial anomaly obtained from the Jacobian possesses a topological property and implies the lattice index theorem. (We reproduce the argument demonstrating this point by using our lattice Dirac operator for the gravitational interaction.) This topological property of the axial anomaly allows a cohomological analysis of the anomaly 13) with finite lattice spacings, and this analysis is crucial in the formulation of lattice chiral gauge theories. 14) See Refs. 15) and 16) for related works and a review of these developments. The above describes the situation in lattice gauge theory. Now, it is natural to ask to what extent the above scenario holds in the presence of a gravitational field. In the continuum theory, it is well-known that the chiral symmetry suffers from the quantum anomaly also in the presence of a gravitational field, 17) and this anomaly has a topological meaning expressed by the index theorem. 18)-20) The purpose of this paper is to determine how these points can be naturally understood in a framework of lattice field theory. In this paper, we construct a lattice Dirac operator of overlap type 5) that describes the propagation of a Dirac fermion in an external gravitational field. With suitable modifications for curved space, our lattice Dirac operator satisfies the Ginsparg-Wilson relation in its conventional form and possesses 5 hermiticity. These properties imply the validity of the lattice index theorem and a topological property of the axial U anomaly. Our formulation offers, in a well-defined lattice framework, a conceptually simple way to understand the axial anomaly in the presence of a gravitational field. Here we do not intend to study the non-perturbative dynamics of gravity on a spacetime lattice. We also do not consider a possible non-trivial global topology of spacetime. These problems are beyond the scope of this paper. We believe, however, that studying the interaction of a lattice Dirac field to an external gravitational field will be useful in the investigation of the coupling of matter fields to dynamically discretized gravity. For previous studies of the gravitational interaction of matter fields defined on a lattice, see Ref. 21) and references therein. Our formulation is a natural generalization of the overlap-Dirac operator in lattice gauge theory to a system coupled to external gravitational fields. As easily imagined, the local Lorentz symmetry in curved space can be manifestly realized as an internal gauge symmetry on the lattice, while the general coordinate invariance is not manifest, because our base space takes the form of a conventional hypercubic lattice. With regard to the latter point, our goal is modest, seeking only the situation in which the general coordinate invariance is restored in the limit a → 0, where a denotes the lattice spacing. §2. Preliminaries We consider a 2n-dimensional hypercubic lattice. We regard it as a discretized approximation of a family of coordinate curves on a Riemannian manifold with Euclidean signature. (We consider only torsion-free cases in this paper.) In particular, 4n links emanate from each of the lattice sites. * ) In this sense, our lattice is so primitive that it is not directly related to the Regge calculus or to dynamical triangulation. The spacetime indices are denoted by Greek letters,,,..., and run from 0 to 2n − 1, and the local Lorentz indices are denoted by Roman letters, a, b,..., and run also from 0 to 2n − 1. Summation over repeated indices is implied for expressions in the continuum theory, while for expressions in the lattice theory, we always explicitly indicate a summation over indices. The unit vector along the -direction, for example, is denoted by. In most of expressions below, we set the lattice spacing to unity (i.e., a = 1) for simplicity. The Euclidean gamma matrices satisfy the relations * * ) The chiral matrix and the generator of SO(2n) in the spinor representation are defined by (2. 2) * ) In our present formulation, in which the vielbein e a (x) exists on each lattice site x, it is natural to regard the index of e a (x) as labeling the directions of the links starting from the site x. Then, if the Lorentz index a runs from 0 to 2n − 1, the index should also run from 0 to 2n − 1 for the matrix e a (x) to be invertible. In this sense, the restriction to a hypercubic lattice is natural. * * ) Here we intentionally use a combination of the complex conjugation symbol * and the transpose operation symbol T with respect to the spinor indices instead of the dagger, because we want to use the symbol to represent hermitian conjugation with respect to the inner product (3. 3). This avoids possible confusion concerning the chirality constraint in curved space (see §5). In addition to the lattice Dirac fermion field (x), the vielbein e a (x) is also defined on the lattice sites. The determinant of the vielbein is denoted by (2. 3) and it is assumed to satisfy e(x) > 0, for all x (2. 4) as in the continuum theory. The inverse matrix of the vielbein is denoted by e a (x). As a lattice counterpart of the spin connection, we introduce gauge variables on the lattice links: U(x, ) ∈ spin(2n). (2. 5) In this paper, the vielbein e a (x) and the link variables U(x, ) are treated as external nondynamical fields. They are, however, not independent of each other and are subject to a certain constraint, which is analogous to the metric condition. This constraint is explored in the next subsection. We often use the abbreviated notation Note that a and (x) do not commute with the link variables U(x, ), i.e., = 0. The local Lorentz transformation has a natural realization on the lattice as follows: where the gauge transformation g(x) ∈ spin(2n) is defined on each site x. Note that e(x) is invariant under local Lorentz transformations. Covariance under this transformation is manifest in our construction, exactly as in the case of an internal gauge symmetry in lattice gauge theory. Contrastingly, invariance or covariance under general coordinate transformations is very difficult to implement in a lattice spacetime. We conjecture that this is restored only in the continuum limit. Below, we examine whether the correct index in the continuum limit is reproduced as the classical continuum limit, a → 0, of the lattice chiral anomaly. Our result indicates that the violation of general coordinate invariance is O(a) in our quantum theory of fermion fields coupled to non-dynamical gravitational fields. §3. Overlap-Dirac operator for the Lorentz spinor field Inner product, hermiticity and the metric condition We start our analysis with a lattice Dirac operator which is defined in terms of the nearest-neighbor forward covariant difference: This clearly behaves covariantly, i.e., ∇(x) → g(x) ∇(x), under the local Lorentz transformation (2. 7). Then, setting with a smooth spin connection field ab (x), the naive continuum limit of ∇ coincides with the Dirac operator in the continuum, denoted by D. More precisely, we have lim a→0 ∇(x) = D(x) for any fields (x), e a (x) and ab (x) which vary slowly over the lengthscale a. Now to ensure that the lattice index theorem holds in lattice gauge theory, in addition to the Ginsparg-Wilson relation, the 5 hermiticity of a lattice Dirac operator is very important. 16) We are therefore naturally led to attempt to clarify the meaning of hermiticity in the presence of a gravitational field, because the concept of hermiticity involves the definition of the inner product. In the continuum theory, the inner product is modified in curved space for general coordinate invariance. We introduce the inner product of two functions on the lattice with spinor indices as by using the determinant of the vielbein, e(x). The inner product (3. 3) is a natural lattice counterpart of the general coordinate invariant inner product in curved space, and the norm of any non-zero function with respect to this inner product is positive definite. We believe that inclusion of the vielbein e(x) is important for the restoration of general coordinate invariance in the continuum limit. We next examine 4) where, in the second equality, we have shifted the coordinate x to x −. This manipulation is justified for a lattice with infinite extent or for a finite size lattice with periodic boundary conditions. In the last line, we have introduced a lattice Dirac operator defined in terms of the backward covariant difference, Although its structure is somewhat complicated, ∇ * behaves covariantly under the local Lorentz transformation (2. 7) and coincides with the continuum Dirac operator D in the naive continuum limit. We note that under the parametrization (3. 2), the continuum limit of Eq. (3. 6) becomes This combination vanishes identically if the spin connection and the vielbein are related through the metric condition. Thus, as a lattice counterpart of this property, we postulate that the external vielbein and the link variables satisfy the following constraint: The equality (3. 4) then shows that the combination ∇ * in eq. (3. 5) is precisely the opposite of the hermitian conjugate of ∇ in Eq. (3. 1) with respect to the inner product (3. 3). Using the symbol to express this conjugation, we have * ) The structure of ∇ *, defined in Eq. (3. 5), is more complicated than that of ∇, defined in Eq. (3. 1), and, partially due to this fact, any explicit analytical calculations involving our Dirac operator are expected to become quite involved. Although our choice of ∇ and ∇ * given above is by no means unique, it turns out that one or the other of ∇ and ∇ * constituting such a conjugate pair must be somewhat complicated, as for the choice we consider. Noting this point, we adopt the above choice in this paper. Having clarified the meaning of the hermitian conjugation, it is straightforward to construct a lattice Dirac operator of overlap type with the desired properties. We first define the Wilson-Dirac operator by where the second term is the Wilson term in curved space, which is hermitian with respect to the inner product (3. 3). This Wilson term ensures the absence of species doubling in our overlap-type Dirac operator constructed below. The naive continuum limit of D w coincides with the continuum Dirac operator D. Due to the conjugation property (3. 9), we have the 5 hermiticity of the Wilson-Dirac operator 11) which is crucial in the following analysis. Overlap-Dirac operator, Ginsparg-Wilson relation and the lattice index theorem In analogy to the case of lattice gauge theory, we define the overlap-Dirac operator from the Wilson-Dirac operator (3. 10) as The naive continuum limit of the operator D is D. In the flat space limit, in which we have e a (x) = a and U(x, ) = 1, the free Dirac operator in the momentum space reads where the lattice spacing a has been restored and we have (3. 14) We thus see that D(k) D(k) = 0 implies k = 0, and the free Dirac operator does not suffer from species doubling. From its construction (3. 12) and the 5 hermiticity of the Wilson-Dirac operator (3. 11), we find that the operator satisfying the Ginsparg-Wilson relation in the conventional form, (3. 15) Or, in terms of the lattice-modified chiral matrix 16), 22) the relation (3. 15) is expressed as The Dirac operator D is also 5 hermitian, i.e., 18) with respect to the inner product (3. 3). * ) Thus we have obtained a lattice Dirac operator of overlap type that describes the propagation of a single Dirac fermion in external gravitational fields. Since the forms of the Ginsparg-Wilson relation and the 5 hermiticity are identical to those in lattice gauge theory, we can repeat the same argument for the index theorem in the latter theory with slight modifications for curved space. A natural lattice action for the massless Dirac fermion in curved space is The invariance of this action under the local Lorentz transformation is obvious. This action is also invariant under the modified chiral transformation where is an infinitesimal constant parameter, due to the Ginsparg-Wilson relation (3. 17). The functional integration measure is, however, not invariant under this transformation and gives rise to a non-trivial Jacobian J: where and The operator 5 anti-commutes with the hermitian operator H, again due to the Ginsparg-Wilson relation: We introduce the eigenfunctions of H as 3. 25) and assume that the eigenfunctions are normalized with respect to the inner product (3. 3): ( r, r ) = 1, for all r. (3. 26) Then, by the hermiticity of H with respect to the inner product, we have ( r, s ) = 0, for r = s. (3. 27) The completeness of eigenmodes is expressed as Now we can prove the lattice index theorem. The quantity 3. 29) in the Jacobian (3. 22) is an integer even for finite lattice spacings (i.e., before taking the continuum limit). This can easily be seen by noting that the eigenvalue of 5 r is − r and thus 5 r is orthogonal to r when r = 0. Hence only zero eigenmodes contribute to the sum over r in Eq. (3. 29). Noting finally that 5 → 5 for zero modes of H and the normalization (3. 26), we have 30) where n ± denote the numbers of zero eigenmodes with positive and negative chiralities, respectively. This is the lattice index theorem in the presence of a gravitational field. Classical continuum limit of the lattice index density We next consider the classical continuum limit of the lattice index (3. 29). We consider the classical continuum limit to be the a → 0 limit in which derivatives of the external gravitational fields are assumed to be O(a 0 ). * ) It is desirable to evaluate the continuum limit directly in the same way as in lattice gauge theory, 7), 9)-11) but the actual calculation is quite involved. Instead, here we resort to a powerful argument due to Fujikawa,8) which utilizes the topological nature of the lattice index (3. 29). We slightly modify the original argument to make the reasoning more transparent. First we note that in the expressions of the index (3. 29), 5 can be replaced by 5 e −H 2 /M 2 with an arbitrary mass M, because only zero eigenmodes of H contribute to the index. Thus we have (3. 31) where the lattice spacing a has been restored, and the index density has been defined by From this point, we consider the index density on a lattice with infinite extent, as usual for the classical continuum limit. Then we have 33) * ) Note that we cannot take the naive continuum limit of 5 in Eq. (3. 29) a priori, because the function on which 5 acts (namely yx ) varies rapidly in lengthscale a. where the Brillouin zone is denoted by B: (3. 34) Now suppose that we expand the integrand of Eq. (3. 33) with respect to the external fields h a (x) ≡ e a (x) − a, ab (x) and their derivatives. Formally, this yields where the superscripts of the partial derivatives i and j are used to label multiple partial derivatives , and I denotes the collection of indices:.., p ; a 1,..., a p ; 1,..., q ; b 1,..., b q ; c 1,..., c q }. One can then confirm, through some examination, that the coefficient c I (k; a, M) has the structure where p I (k; k, a, M) is a polynomial ink whose coefficients are bounded functions of k ∈ B and of O(a 0 ). Noting this structure and the inequality 2 |k | ≤ |k | ≤ |k |, for all k ∈ B, (3. 37) we infer that there exists a polynomial of |k | with positive coefficients, b I (k; M), and some positive number such that, for any a ≤, we have for all k ∈ B. where ∆ is a box of size in the Brillouin zone (from this point, the lattice spacing a is assumed to be smaller than ) ∆ ≡ k ∈ R 2n | |k | ≤ < /. That is, the a → 0 limit of the integral of c I (k; a, M) over B is given by an R 2n integration of the a → 0 limit of c I (k; a, M). The latter should be regarded as the naive continuum limit, because the momentum k carried by the plane wave e ikx is kept fixed in this a → 0 limit. Now, by applying Eq. (3. 44) to all terms of the expansion (3. 35), we obtain (3. 45) because lim a→0 H = 5 D in the naive continuum limit. It is interesting that the term proportional to aH/2 does not contribute in this calculational scheme. 8) In this way, we obtain the index density in the continuum theory. The underlying important point in our argument is that the lattice free Dirac operator does not possess doubler's zero, and e −H 2 /M 2 acts as a suppression factor at the boundary of the Brillouin zone for a → 0. The calculation of the index density in the continuum (which can be evaluated in the M → ∞ limit) is well-known. 20) (For a calculation in the plane wave basis, see Ref. 23).) The result is given by the so-called Dirac genus, 18)-20) lim a→0 a 2n 3. 46) where the curvature 2-form is defined by (3. 47) and the determinant, det, is taken with respect to the Lorentz indices ofR. Thus as expected from the absence of the species doubling (which implies the correct number of degrees of freedom) and the topological properties of the lattice index, we find that our formulation reproduces the correct expression of the axial U anomaly in a gravitational field. This demonstration can be regarded as a test of the restoration of the general coordinate invariance in the classical continuum limit. As noted in the introduction, the gauge invariance and the topological nature of the axial anomaly in lattice gauge theory allow a cohomological analysis of the anomaly, 13) as in the continuum theory. 24) It might be possible to carry out this kind of analysis in the present lattice formulation for the gravitational interaction, because the index density (3. 32) is local, Lorentz invariant and possesses a topological property. * ) The absence of a manifest general coordinate invariance in our lattice formulation, however, could be an obstacle for such an analysis. Reduction to the Majorana fermion We now briefly comment on a reduction of the Dirac fermion to the Majorana fermion with our lattice Dirac operator. We can apply the prescription in Euclidean field theory, which is reviewed in Ref. 25) also to the present case of a gravitational interaction. Naively, one expects that the Majorana fermion can be defined in 8k, 8k + 2 and 8k + 4 dimensions (and in the odd number of dimensions 8k + 1 and 8k + 3), because the spinor representation of the Lorentz group is real for these number of dimensions. The prescription starts by setting in Eq. (3. 19), where B denotes the charge conjugation matrix, either B 1 or B 2. (We shall use the notation of Ref. 25)). From the definition (3. 12) and properties of B, 25) it is straightforward to confirm the skew-symmetricity expressed by e(y)(BD) T (y, x) = −e(x)BD(x, y), (3. 49) * ) For a lattice with finite extent, a 2n x A 5 (x) = 0 clearly holds, from the index theorem (3. 30), where denotes an arbitrary variation of gravitational fields. Even for a lattice with infinite extent, this equation is meaningful, provided that the variation has finite support and the Dirac operator is local. (We did not prove the latter for gravitational fields of finite strength.) Then, this topological property can be shown directly from the Ginsparg-Wilson relation for any M. where the transpose T acts on the spinor indices, with B = B 1 for 8k + 2 dimensions and B = B 2 for 8k + 4 dimensions. (To show this, we have to use the constraint (3. 8).) Due to this skew-symmetric property, the action for the Dirac fermion (3. 19) decomposes into two pieces, describing mutually independent systems, for 8k + 2 and 8k + 4 dimensions. Thus, taking either of these two pieces as the action, say, We now consider a generalization of our construction to systems with matter fields in other Lorentz (reducible) representations. This is easily achieved. The link variable in the vector representation is given by which reads U a b (x, ) = b a + a b (x) + with the parametrization (3. 2). For example, the lattice Dirac operators for the spinor-vector field a (x) can be defined by (4. 2) and these operators are conjugate to each other with respect to the following natural inner product for the spinor-vector fields: Thus the overlap-Dirac operator for the spinor-vector fields can be defined by combinations analogous to Eqs. (3. 12) and (3. 10). The lattice action is given by Then, the argument for the axial anomaly and the lattice index proceeds in the same manner as in §3. The continuum limit is easily obtained because, as is clear from Eq. The last trace tr is defined with respect to the Lorentz indices ofR. This is the well-known expression of the index for the spinor-vector representation. 18)-20) Here, we do not claim that we have constructed a lattice action of the Rarita-Schwinger spin 3/2 field. The action for the spinor-vector field (4. 4), however, might be regarded as a gauge-fixed form of the action of the Rarita-Schwinger field, when supplemented with appropriate ghost fields. Similarly, for the bi-spinor field (x), which has two spinor indices, we may take It can be verified that these two operators are conjugate to each other with respect to a natural inner product for the bi-spinor field, if the constraint for the external fields, Eq. (3. 8) is satisfied. The construction of the overlapoperator can be repeated, and the action for the bi-spinor field is given by (4. 8) As is clear from Eq. (4. 6), the link variables on the right-hand side of (which act on one of the spinor indices of the bi-spinor) can be regarded as gauge fields associated with an internal spin(2n) gauge symmetry. Thus, the continuum limit of the index * ) is obtained from Eq. (4. 5) by considering the Chern character in the spinor representation, and we have This is also the well-known expression of the index for the bi-spinor representation. 18)-20) On the basis of the correspondence of the bi-spinor field with a collection of anti-symmetric fields (differential forms), this formulation could be useful for defining anti-symmetric tensor fields coupled to gravity on a lattice. §5. Matter fields with a definite chirality Finally, we briefly consider the chirality projection with our overlap-type lattice Dirac operator. For simplicity, we treat only the Weyl fermion. Generalization to other cases, such as a spinor-vector or a bi-spinor with a definite chirality, is straightforward. We follow the formulation given in Ref. 14) for lattice chiral gauge theories. As in lattice gauge theory, we introduce chirality projection operators in the form where 5 is given in Eq. (3. 16). The chirality for the fermion is asymmetrically imposed asP − = and P + =. The partition function of the Weyl fermion in an external gravitational field is then given by (The lattice action S F takes a form identical to that in Eq. (3. 19).) We next introduce basis vectors v j (x), j = 1, 2, 3,..., which satisf 3) * ) Here, the 5 chirality is understood to be defined with respect to the left spinor index of the bi-spinor. 16 and v k (x), k = 1, 2, 3,..., which satisfy Then we expand the Weyl fermion in terms of these bases as (x) = j v j (x)c j and (x) = k c k v k (x). The functional integration measure is then defined by DD ≡ j dc j k dc k. The partition function is thus given by det M, where the matrix M is Because covariance under the local Lorentz transformation is manifest in our construction, it is easy to study how the partition function changes under the local Lorentz transformation; this provides a lattice counterpart of the local Lorentz anomaly, 28) which is one facet 29) of the gravitational anomalies. 26), 30) Under an infinitesimal local Lorentz transformation, where (x) = 1 2 ab ab (x) ab, the Dirac operator behaves covariantly, as D = . Then, noting the completeness relations * ) we have where The first part, A ab (x), which is covariant under the local Lorentz transformation, corresponds to the covariant form 29), 31) of the local Lorentz anomaly. The second part, L, is the socalled measure term, 14) which parametrizes the manner in which the basis vectors change under a variation of a gravitational field (which in the present context is a variation of an infinitesimal local Lorentz transformation). The measure term cannot be completely arbitrary, because it is subject to the integrability condition, 14) and in Eq. (5. 8), it provides the lattice counterpart of (the divergence of) the 29) which gives rise to a difference between the covariant form and the consistent form 29), 32) of anomalies. For the local Lorentz invariance to hold, basis vectors for which det M = 0 must be used. Whether this is possible is the central question. 13), 14) In any case, the cancellation of the local Lorentz anomaly in the continuum is necessary for this anomaly cancellation in the lattice theory. The covariant anomaly A ab in our lattice formulation is given by the expression of the axial U anomaly (3. 22) with an additional generator of the gauge transformation ab inserted. This correspondence of the two anomalies also exists in the continuum theory. The evaluation of the classical continuum limit of A ab (x), however, can be quite involved, because a lattice sum of A ab (x) is not a topologically invariant quantity, and we cannot apply the argument of Ref. 8). We do not study this problem in the present paper. The local Lorentz anomaly is only one facet of the gravitational anomaly, 29) and it is closely related to the anomaly in the general coordinate invariance. 26) However, a treatment of this anomaly in our lattice formulation, unfortunately, would not be so simple, because the covariance (or invariance) under general coordinate transformations is not manifest in our formulation. This is also a subject of future study. A more ambitious program employing the present formulation is to consider the global gravitational anomalies, 26), 33) as done in Ref. 34) for the global gauge anomaly 35) in lattice gauge theory. §6. Conclusion In this paper, we constructed a lattice Dirac operator of overlap type that describes the propagation of a single Dirac fermion in an external gravitational field. The operator satisfies the conventional Ginsparg-Wilson relation (3. 15) and possesses the 5 hermiticity (3. 18) with respect to the inner product (3. 3). The lattice index theorem holds, as in lattice gauge theory, and the classical continuum limit of the index density reproduces the Dirac genus. Thus, the situation is, as far as the 5 symmetry and associated anomalies are concerned, analogous to the case of lattice gauge theory. However, there remain many points to be clarified. The first is to determine a sufficient condition for the Dirac operator with gravitational fields of finite strength to be local; this is known as the admissibility in the case of lattice gauge theory. 36) To test the restoration of the general coordinate invariance is another important problem. We observed such restoration in a computation of the classical continuum limit of the lattice index. This would not be a good example, however, because the restoration can be guessed from the topological properties and the local Lorentz invariance. One interesting test is to examine the trace anomaly, because its correct form is fixed only when the general coordinate invariance is imposed.
The new Ghostbusters has already attracted more than its share of skeptics and outright haters, despite the fact that it won’t actually hit theaters for another several weeks. But it looks like there are plenty of others who are excited for Paul Feig‘s reboot of the horror-comedy classic. Early tracking numbers indicate Ghostbusters could open to as much as $50 million in North America. It’s not a spectacular number, but it’s not a disastrous one either. According to The Hollywood Reporter, Ghostbusters is estimated to earn between $40 million and $50 million in North America when it lands July 15. The film is tracking best with women over 25 — perhaps not surprisingly, considering the film is also about women over 25. We should point out, though, that all of those details should be taken with a grain of salt at this point. With three weeks to go, Sony has yet to unleash its last big marketing push, which could bump up the excitement. Reviews and word-of-mouth could also impact the final tally for better or for worse. A $50 million debut would put Ghostbusters ahead of Feig’s three most recent films, Spy ($29 million), The Heat ($39 million), and Bridesmaids ($26 million). However, Ghostbusters cost a lot more to make. Its production budget is around $154 million, compared to $65 million for Spy. It may have more international appeal, thanks to its familiar brand name, its emphasis on CG spectacle, and star Melissa McCarthy‘s growing stardom, but it’ll need to earn much more than those other films did just to break even. The studio, however, isn’t worried about the haters. Quite the contrary. “It’s the greatest thing that ever happened. Are you kidding me?” said Sony chief Tom Rothman in a recent interview with THR. “We’re in the national debate, thank you. Can we please get some more haters to say stupid things?” Granted, it’s not as if a studio head is going to go on record predicting gloom and doom ahead of his own film’s release. But their recent announcement of a Ghostbusters animated series suggests they’re feeling pretty optimistic about the brand’s prospects. Personally, I wonder the bigger potential problem that Ghostbusters faces is “sequelitis.” With a few exceptions including Finding Dory, it’s been a rough year for sequels. (Granted, that’s partly because many of them were terrible, but solid reviews couldn’t save Neighbors 2 or Barbershop 3 from tepid returns.) And even before Feig was hired and his stars were cast, I heard plenty of Ghostbusters fans dreading a third movie. But again, a lot could happen between now and July 15 to throw off those box office projections.
//*************************************************************************** // parse latency and throughput // func parseThroughputInfo(rawStr string) lib.Stats { ip := lib.NewInfoParser(rawStr) nodeStats := lib.Stats{} res := map[string]lib.Stats{} for { if err := ip.Expect("{"); err != nil { if _, err := ip.ReadUntil(';'); err != nil { break } continue } ns, err := ip.ReadUntil('}') if err != nil { break } if err := ip.Expect("-"); err != nil { break } op, err := ip.ReadUntil(':') if err != nil { break } if _, err := ip.ReadUntil(','); err != nil { break } if _, err := ip.ReadUntil(';'); err != nil { break } if _, err = ip.ReadUntil(','); err != nil { break } opsCount, err := ip.ReadFloat(';') if err != nil { break } if res[ns] == nil { res[ns] = lib.Stats{ op: opsCount, } } else { res[ns][op] = opsCount } } for _, mp := range res { for op, tps := range mp { if nodeStats[op] == nil { nodeStats[op] = float64(0) } nodeStats[op] = nodeStats[op].(float64) + tps.(float64) } } throughputMap := make(lib.Stats) newNodeStats := make(lib.Stats) newRes := make(lib.Stats) for k, v := range nodeStats { newNodeStats[k] = v } for k, v := range res { newRes[k] = v } throughputMap["namespace"] = newRes throughputMap["total"] = newNodeStats return throughputMap }
<reponame>sebastienblor/arnold-usd // Copyright 2020 Autodesk, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #include "basis_curves.h" #include <constant_strings.h> #include <shape_utils.h> #include "material.h" #include "utils.h" #include <pxr/base/gf/vec2f.h> #include <pxr/base/gf/vec3f.h> #include <pxr/base/gf/vec4f.h> #include <pxr/usd/sdf/assetPath.h> /* * TODO: * - Add support for per instance variables. * - Investigate periodic and pinned curves. * - Convert normals to orientations. * - Allow overriding basis via a primvar and remap all the parameters. * - Correctly handle degenerate curves using KtoA as an example. */ PXR_NAMESPACE_OPEN_SCOPE // clang-format off TF_DEFINE_PRIVATE_TOKENS( _tokens, (pscale) ((basis, "arnold:basis")) ); // clang-format on namespace { } // namespace #if PXR_VERSION >= 2102 HdArnoldBasisCurves::HdArnoldBasisCurves(HdArnoldRenderDelegate* delegate, const SdfPath& id) : HdArnoldRprim<HdBasisCurves>(str::curves, delegate, id), _interpolation(HdTokens->linear) { } #else HdArnoldBasisCurves::HdArnoldBasisCurves( HdArnoldRenderDelegate* delegate, const SdfPath& id, const SdfPath& instancerId) : HdArnoldRprim<HdBasisCurves>(str::curves, delegate, id, instancerId), _interpolation(HdTokens->linear) { } #endif void HdArnoldBasisCurves::Sync( HdSceneDelegate* sceneDelegate, HdRenderParam* renderParam, HdDirtyBits* dirtyBits, const TfToken& reprToken) { TF_UNUSED(reprToken); HdArnoldRenderParamInterrupt param(renderParam); const auto& id = GetId(); // Points can either come through accessing HdTokens->points, or driven by UsdSkel. const auto dirtyPrimvars = HdArnoldGetComputedPrimvars(sceneDelegate, id, *dirtyBits, _primvars) || (*dirtyBits & HdChangeTracker::DirtyPrimvar); if (_primvars.count(HdTokens->points) == 0 && HdChangeTracker::IsPrimvarDirty(*dirtyBits, id, HdTokens->points)) { param.Interrupt(); HdArnoldSetPositionFromPrimvar(GetArnoldNode(), id, sceneDelegate, str::points); } if (HdChangeTracker::IsTopologyDirty(*dirtyBits, id)) { param.Interrupt(); const auto topology = GetBasisCurvesTopology(sceneDelegate); const auto curveBasis = topology.GetCurveBasis(); const auto curveType = topology.GetCurveType(); if (curveType == HdTokens->linear) { AiNodeSetStr(GetArnoldNode(), str::basis, str::linear); _interpolation = HdTokens->linear; } else { if (curveBasis == HdTokens->bezier) { AiNodeSetStr(GetArnoldNode(), str::basis, str::bezier); _interpolation = HdTokens->bezier; } else if (curveBasis == HdTokens->bSpline) { AiNodeSetStr(GetArnoldNode(), str::basis, str::b_spline); _interpolation = HdTokens->bSpline; } else if (curveBasis == HdTokens->catmullRom) { AiNodeSetStr(GetArnoldNode(), str::basis, str::catmull_rom); _interpolation = HdTokens->catmullRom; } else { AiNodeSetStr(GetArnoldNode(), str::basis, str::linear); _interpolation = HdTokens->linear; } } const auto& vertexCounts = topology.GetCurveVertexCounts(); // When interpolation is linear, we clear out stored vertex counts, because we don't need them anymore. // Otherwise we need to store vertex counts for remapping primvars. if (_interpolation == HdTokens->linear) { decltype(_vertexCounts){}.swap(_vertexCounts); } else { _vertexCounts = vertexCounts; } const auto numVertexCounts = vertexCounts.size(); auto* numPointsArray = AiArrayAllocate(numVertexCounts, 1, AI_TYPE_UINT); auto* numPoints = static_cast<uint32_t*>(AiArrayMap(numPointsArray)); std::transform(vertexCounts.cbegin(), vertexCounts.cend(), numPoints, [](const int i) -> uint32_t { return static_cast<uint32_t>(i); }); AiArrayUnmap(numPointsArray); AiNodeSetArray(GetArnoldNode(), str::num_points, numPointsArray); } if (HdChangeTracker::IsVisibilityDirty(*dirtyBits, id)) { param.Interrupt(); _UpdateVisibility(sceneDelegate, dirtyBits); SetShapeVisibility(_sharedData.visible ? AI_RAY_ALL : uint8_t{0}); } auto transformDirtied = false; if (HdChangeTracker::IsTransformDirty(*dirtyBits, id)) { param.Interrupt(); HdArnoldSetTransform(GetArnoldNode(), sceneDelegate, GetId()); transformDirtied = true; } if (*dirtyBits & HdChangeTracker::DirtyMaterialId) { param.Interrupt(); const auto* material = reinterpret_cast<const HdArnoldMaterial*>( sceneDelegate->GetRenderIndex().GetSprim(HdPrimTypeTokens->material, sceneDelegate->GetMaterialId(id))); if (material != nullptr) { AiNodeSetPtr(GetArnoldNode(), str::shader, material->GetSurfaceShader()); } else { AiNodeSetPtr(GetArnoldNode(), str::shader, GetRenderDelegate()->GetFallbackShader()); } } if (dirtyPrimvars) { HdArnoldGetPrimvars(sceneDelegate, id, *dirtyBits, false, _primvars); param.Interrupt(); auto visibility = GetShapeVisibility(); const auto vstep = _interpolation == HdTokens->bezier ? 3 : 1; const auto vmin = _interpolation == HdTokens->linear ? 2 : 4; ArnoldUsdCurvesData curvesData(vmin, vstep, _vertexCounts); for (auto& primvar : _primvars) { auto& desc = primvar.second; if (!desc.NeedsUpdate()) { continue; } if (primvar.first == HdTokens->widths) { if ((desc.interpolation == HdInterpolationVertex || desc.interpolation == HdInterpolationVarying) && _interpolation != HdTokens->linear) { auto value = desc.value; curvesData.RemapCurvesVertexPrimvar<float, double, GfHalf>(value); ArnoldUsdCurvesData::SetRadiusFromValue(GetArnoldNode(), value); } else { ArnoldUsdCurvesData::SetRadiusFromValue(GetArnoldNode(), desc.value); } // For constant and } else if (desc.interpolation == HdInterpolationConstant) { // We skip reading the basis for now as it would require remapping the vertices, widths and // all the primvars. if (primvar.first != _tokens->basis) { HdArnoldSetConstantPrimvar(GetArnoldNode(), primvar.first, desc.role, desc.value, &visibility); } } else if (desc.interpolation == HdInterpolationUniform) { if (primvar.first == str::t_uv || primvar.first == str::t_st) { // This is either a VtVec2fArray or VtVec3fArray (in Solaris). if (desc.value.IsHolding<VtVec2fArray>()) { const auto& v = desc.value.UncheckedGet<VtVec2fArray>(); AiNodeSetArray( GetArnoldNode(), str::uvs, AiArrayConvert(v.size(), 1, AI_TYPE_VECTOR2, v.data())); } else if (desc.value.IsHolding<VtVec3fArray>()) { const auto& v = desc.value.UncheckedGet<VtVec3fArray>(); auto* arr = AiArrayAllocate(v.size(), 1, AI_TYPE_VECTOR2); std::transform( v.begin(), v.end(), static_cast<GfVec2f*>(AiArrayMap(arr)), [](const GfVec3f& in) -> GfVec2f { return {in[0], in[1]}; }); AiArrayUnmap(arr); AiNodeSetArray(GetArnoldNode(), str::uvs, arr); } else { // If it's an unsupported type, just set it as user data. HdArnoldSetUniformPrimvar(GetArnoldNode(), primvar.first, desc.role, desc.value); } } else { HdArnoldSetUniformPrimvar(GetArnoldNode(), primvar.first, desc.role, desc.value); } } else if (desc.interpolation == HdInterpolationVertex || desc.interpolation == HdInterpolationVarying) { if (primvar.first == HdTokens->points) { HdArnoldSetPositionFromValue(GetArnoldNode(), str::curves, desc.value); } else if (primvar.first == HdTokens->normals) { // This should be the same number as points. HdArnoldSetPositionFromValue(GetArnoldNode(), str::orientations, desc.value); } else { auto value = desc.value; if (_interpolation != HdTokens->linear) { curvesData.RemapCurvesVertexPrimvar< bool, VtUCharArray::value_type, unsigned int, int, float, GfVec2f, GfVec3f, GfVec4f, std::string, TfToken, SdfAssetPath>(value); } HdArnoldSetVertexPrimvar(GetArnoldNode(), primvar.first, desc.role, value); } } else if (desc.interpolation == HdInterpolationVarying) { HdArnoldSetVertexPrimvar(GetArnoldNode(), primvar.first, desc.role, desc.value); } } SetShapeVisibility(visibility); } SyncShape(*dirtyBits, sceneDelegate, param, transformDirtied); *dirtyBits = HdChangeTracker::Clean; } HdDirtyBits HdArnoldBasisCurves::GetInitialDirtyBitsMask() const { return HdChangeTracker::Clean | HdChangeTracker::DirtyPoints | HdChangeTracker::DirtyTopology | HdChangeTracker::DirtyTransform | HdChangeTracker::DirtyVisibility | HdChangeTracker::DirtyPrimvar | HdChangeTracker::DirtyNormals | HdChangeTracker::DirtyWidths | HdChangeTracker::DirtyMaterialId | HdArnoldShape::GetInitialDirtyBitsMask(); } PXR_NAMESPACE_CLOSE_SCOPE
package eu.euporias.api.model; import java.io.Serializable; import java.util.Date; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.EntityListeners; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.OneToOne; import org.springframework.data.annotation.CreatedBy; import org.springframework.data.annotation.CreatedDate; import org.springframework.data.jpa.domain.support.AuditingEntityListener; @Entity @EntityListeners(AuditingEntityListener.class) public class OutcomeAccess implements Serializable { private static final long serialVersionUID = 2015313999143591999L; @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; @CreatedDate private Date created = new Date(); @CreatedBy @OneToOne(cascade=CascadeType.ALL, orphanRemoval = true) private RequestDetails createdBy; private String methodName; @Column(length = 2048) private String arguments; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Date getCreated() { return created; } public void setCreated(Date created) { this.created = created; } public RequestDetails getCreatedBy() { return createdBy; } public void setCreatedBy(RequestDetails createdBy) { this.createdBy = createdBy; } public String getMethodName() { return methodName; } public void setMethodName(String methodName) { this.methodName = methodName; } public String getArguments() { return arguments; } public void setArguments(String arguments) { this.arguments = arguments; } @Override public String toString() { return "OutcomeAccess [id=" + id + "]"; } }
// list is a common function for list file/directory. // it takes a slice of file info, returns a portion of it for webdav clients to show. // portion is determined based on total number of file infos, the count and current position of 'File'. func (f *File) list(count int, fis []os.FileInfo) ([]os.FileInfo, error) { old := f.pos if old >= len(fis) { if count > 0 { return nil, io.EOF } return nil, nil } if count > 0 { f.pos += count if f.pos > len(fis) { f.pos = len(fis) } } else { f.pos = len(fis) old = 0 } return fis[old:f.pos], nil }
The Coleman Veterans Memorial will present the seventh annual “United by Sacrifice” concert on Sunday, May 28, featuring classic rock legend Eddie Money with special guests The Sinclairs Band, Jedi Mind Trip and The Rock Show. The concert will be at Coleman Veterans Memorial park, 501 W. Washington St., Coleman. Gates will open at 11:30 a.m., with the first act at noon. Eddie Money will take the stage at 6 p.m. Food and merchandise vendors will be on site, as well as a beer tent and a rib cook-off competition. Tickets are available in advance for $20 online or at the following locations: Chemical Bank, Bomber’s Bar & Grill, Coleman Family Pharmacy, Coleman City Hall, Coleman Auto Parts, New Dimensions Salon, all in Coleman; Chemical Bank in Beaverton; Percha Paint in Mount Pleasant; Miracle Ear in Mount Pleasant, Midland and Saginaw; Jim’s Body Shop in Clare; WUPS 98.5 Radio in Houghton Lake. Tickets will be $30 the day of the show. Visit www.colemanveteransmemorial.org or send an email to [email protected] for more information.
Look, we get that the bullshit surrounding the practice of tipping can suck, especially in industries—most notably food service in the U.S.—where it’s implemented in place of paying workers an actual living wage. Tipping can be awkward, it’s mathematically inconvenient, and it’s rife with opportunities for shitty customers to try to throw their weight around by holding their server’s livelihood hostage because they were slow bringing over that extra cup of ranch. But just as nobody wants to “cure” a skin rash by putting a pistol up to it and gamely pulling the trigger, that doesn’t mean we need the world’s tech bros to try their hand at “disrupting” the only thing keeping a tired waitress from keeping the lights on at home. And yet, that’s the apparent end goal of a new innovation being discussed in a recent Business Insider piece, looking into the efforts of a New York-based tech firm to replace tipping with what they see as a commensurate reward for good service: Gifting every member of the rapidly growing gig economy with an inescapable permanent record that will follow them from job to job. Hooray! Advertisement The idea comes from bus routing company Skedaddle (ugh), which wants to create a system it’s calling the “Kudos Project,” which would basically replace tipping someone with actual money—you, know, the good green stuff what buys things—with giving them a positive or negative rating logged in a global database. Secured by a blockchain, an individual’s Kudos would follow them around to different jobs; the company is already talking to ride-share companies and other would-be tech utopias to spread the omni-present love. In a perverse way, this is actually a pretty fitting system for the gig economy, where those hoping to make ends meet have to work simultaneously as a taxi driver, maintenance person, motel operator, and all-purpose freelance serf. It also sounds like yet another ingredient for the generic cookie-cutter dystopia we all seem to barreling toward, leading us to once again demand Congress step in and save people from themselves by passing a law that forces tech types to ask “Would this idea come up as a joke on Silicon Valley, or a plot point on Black Mirror?” before being allowed to progress with their latest schemes. (Bonus “Don’t Do This” points if it also sounds like something Steve Buscemi would say in Reservoir Dogs):
import { Role, RoleModel } from '@models' import Repository from './repository' export default class RolesRepository extends Repository<Role> { constructor() { super(RoleModel) } }
// BenchmarkLoader measures the performance of loading and // typechecking. // // Run it with: // // go test ./langserver -bench Loader -benchmem func BenchmarkLoader(b *testing.B) { ctx := context.Background() for label, tc := range loaderCases { b.Run(label, func(b *testing.B) { fset, bctx, bpkg := setUpLoaderTest(tc.fs) b.ResetTimer() for i := 0; i < b.N; i++ { if _, _, err := typecheck(ctx, fset, bctx, bpkg, defaultFindPackageFunc, "/src/p"); err != nil { b.Error(err) } } }) } }
The annual Chino Hills Household Hazardous Waste Collection will be held on Saturday. Collection is from 9 a.m. to 1 p.m. at the site of the former City Yard, 14575 Pipeline Ave., Chino Hills. Waste brought before 9 a.m. will not be accepted. Participants must provide identification to confirm they live within San Bernardino County. Bring unwanted motor oil, used oil filters, antifreeze, auto and household batteries, paint products, household cleaners, pesticides, fertilizers, pool chemicals, fluorescent light tubes, and medication. The waste must be properly labeled or in its original container. The containers must not be leaking and may not exceed five gallons. The amount of waste per visit cannot exceed 15 gallons or 125 pounds. Only household hazardous waste will be accepted at the free collection. Commercial or business waste will not be accepted. Radioactive or explosive waste, asbestos, infectious waste, medical waste and microwave ovens are also not accepted. Residents may call 866-238-2444 to arrange for disposal of televisions, computer monitors, and other electronic waste.
import {expectType} from 'tsd'; import toFastProperties from './index.js'; expectType<{}>(toFastProperties()); type Fixture = { a: boolean; b: number; }; const fixture: Fixture = { a: true, b: 1 }; expectType<Fixture>(toFastProperties(fixture));
The Italian Unionist Movement was an Italian political party briefly in action just after the end of World War II. The goal of the party was the annexation of Italy to the United States. On 12 October 1944, former fascist sociologist Corrado Gini, Calabrian activist Santi Paladino, and ISTAT researcher Ugo Damiani founded the party, for which the emblem was the Stars and Stripes, the Italian flag and a world map. According to the three men, the Government of the United States should annex all free and democratic nations worldwide, thereby transforming itself into a world government, and allowing Washington DC to maintain Earth in a perpetual condition of peace. Paladino stated, "With a federation of the United States, Italy and some other nations, and a lot of atomic bombs, there would be no wars. This would solve all of Italy's problems."[1] Paladino argued that closer union with America was necessary to counter the advance of Communism under Soviet Russian leadership.[1] The party had a little success in local elections in Southern Italy in 1946, so they decided to run in the General election of the same year. However, the results were very poor: the party received only 0.3% of votes, and only Ugo Damiani was elected in the Constituent Assembly. As MP, Damiani supported federalistic ideas, but the goal of the party was evidently impossible to reach. Neither did the American government support the party, not being interested in its project, and the Movement was finally disbanded in 1948. References [ edit ]
def iter_radius(self, epsilon_range): for epsilon in epsilon_range: yield self.solve(epsilon)
After the recent release of a gameplay video from Warhammer 40k: Eternal Crusade, the anticipation of the beta has only gotten keener. Read on before heading to the comments to chat. Fast forward a few months to November. In only six months we are now seeing the first gameplay footage of the Eternal Crusade. My favorite thing about these videos is when teams say; please understand it is pre-alpha footage. Okay, that instantly lowers my expectations a bit, but for all of us who work in games, I am just excited to see the video anyway. Then out of nowhere appears this amazing video of a chaos warrior running around a battlefield tearing up Dark Angels. Bolter fire, chain swords, jump packs, every single element that makes 40K what it is appears in under one minute of video. Any fan would be pleased. Read more of Garrett Fuller's Warhammer 40k: Eternal Crusade - Looking Forward to the Beta.
Confirmation diagnosis of influenza A(H1N1)2009 by Belgian sentinel laboratories during the epidemic phase From 13 July onwards, the Interministerial Influenza Coordination Committee announced the switch from the containment phase to a mitigation phase due to the increased number of Influenza A(H1N1)2009 cases. This modified approach means that it is no longer necessary to conduct a virological examination for every suspicious case and that the diagnosis relied on clinical criteria again. It also required the initiation of several surveillance systems allowing the follow-up of the infection. However, for some patients a virological confirmation was still needed due to their clinical evolution or clinical history. Because of the high amount of these requests, it was proposed to decentralise the diagnostic capacity from the Belgian National Influenza Centre (NIC) to a network of 'partner' laboratories. Therefore, all sentinel laboratories were invited to implement the diagnostic tests, to participate in epidemiological surveillance in the frame of the sentinel laboratory network, to participate in virological surveillance by sending laboratory results or strains to be further subtyped at the NIC. A network of 15 laboratories that responded favourably was thus installed and used as an additional tool for the virological surveillance of the Influenza A(H1N1)2009, allowing the identification of circulating types and subtypes. Here we report on the data gathered by this network for the period from week 40 to week 53 of 2009. Introduction From 13 July onwards, the Interministerial Influenza Coordination Committee announced the switch from the containment phase to a mitigation phase due to the increased number of Influenza A(H1N1)2009 cases. This modified approach means that it is no longer necessary to conduct a virological examination for every suspicious case and that the diagnosis relied on clinical criteria again. It also required the initiation of several surveillance systems allowing the follow-up of the infection. However, for some patients a virological confirmation was still needed due to their clinical evolution or clinical history. Because of the high amount of these requests, it was proposed to decentralise the diagnostic capacity from the Belgian National Influenza Centre (NIC) to a network of 'partner' laboratories. Therefore, all sentinel laboratories were invited to implement the diagnostic tests, to participate in epidemiological surveillance in the frame of the sentinel laboratory network, to participate in virological surveillance by sending laboratory results or strains to be further subtyped at the NIC. A network of 15 laboratories that responded favourably was thus installed and used as an additional tool for the virological surveillance of the Influenza A(H1N1)2009, allowing the identification of circulating types and subtypes. Here we report on the data gathered by this network for the period from week 40 to week 53 of 2009. Methods A list with all participating laboratories (n=15) was published on the internet (http://www.wivisp.be/flu-surveillance/) making it available to all requestors. The analysis request form and instructions including the sample collection and transport conditions, the inclusion criteria, as well as the turnaround time for analysis were generated for each laboratory in both Dutch and French and published on the website. Based on the inclusion criteria described in the instruction document, testing focussed on hospitalised patients and patients at risk for severe disease for whom the results of the test could influence decisions regarding care and treatment. To support these laboratories, the analysis procedure and positive controls from positive samples were offered by the NIC. However, no restriction was given on the procedure, neither on the algorithm used. During the study period, following data were collected: sample identifiers, patient birth date, gender and residence, and results of the antigen detection and PCR (typing A/B and subtyping A(H1N1)2009) if available. Results were extracted weekly from the LIMS and collected by WIV-ISP for further data analysis. Results From 28 September 2009 (week 40) until 3 January 2010 (week 53), a total of 5942 samples were collected by 12 out of the 15 laboratories voluntarily participating in the network and providing their data. Different PCR procedures as well as confirmation algorithms were used by these laboratories. Four laboratories performed a screening test (antigen detection and/or Influenza A PCR) before subtyping for Influenza A(H1N1)2009 by PCR, 2 laboratories immediately performed A(H1N1)2009 subtyping, 5 laboratories performed the typing for Influenza A and the subtyping for A(H1N1) 2009 simultaneously, while 1 changed its algorithm during the study period. A median of 308 samples was determined by the 12 participating laboratories, range 41-1596 (IQR 181-532). Two laboratories, one from the Flemish region and one from the Brussels-Capital Region, received together 3190 out of the 5942 samples (53.7%). Since the majority of the laboratories reporting the postal code were localised in the Flemish Region (n=6) and in Brussels (n=2), samples were mainly collected from patients from these regions: 3159 from Flemish region, 1403 from Brussels, 898 from the Walloon region and 482 patients with unknown residence. Two out of the 7 laboratories performing the Influenza B typing detected Influenza B in 8 samples. As no Influenza A subtyping for seasonal H1N1 and H3N2 was performed, no information could be analysed on this matter. For 3139 out of the 5942 samples, an Influenza A(H1N1)2009 PCR was performed according to their confirmation algorithm. Of these, 1464 (46.7%) samples were positive, 1649 (52.5%) negative and 26 (0.8%) indeterminate, the latter mainly due to inhibition. All further data analysis is performed on these 3139 samples. No difference in sex ratio (M/F: 1.08) appeared with 1583 confirmed diagnoses among males and 1459 among females. As demonstrated in figure 1 the study period included the epidemic. The peak of the epidemic was observed in week 43 when 341 cases were detected (positivity rate 65.8%). Although a higher amount of samples were analysed in week 44 (n=545) as compared to week 43 (n=518), a smaller proportion of samples were found positive. The median age of the Influenza A(H1N1)2009 positive cases was 9.8 years (IQR: 3.1-25.9). Nearly sixty-two percent (62%) of the positive cases were found within the age group of 0-15 years and 88% of the confirmed cases were younger than 45 years (data not shown). Based on the proportion of incidence by age group, a similar age distribution profile was observed for all participating laboratories ( Figure 2). Depending on the laboratory, 75 to 99% of the confirmed cases were younger than 45 years, and 95% to 100% was younger than 65 years. The positivity rates (number of positive results on total number of samples tested) were homogeneously distributed between 30.4 and 32.9 for all but one laboratory (n=4) performing the Influenza A and A(H1N1)2009 PCR in one run. The other laboratory reported only positive cases and therefore a positive rate could not be calculated. For the only laboratory changing from algorithm strategy during the study period, a higher positivity rate of 40.9 was notified. Discussion The transfer of the Influenza virus testing to partner laboratories was promoted to increase the diagnostic capacity required to meet the increased demands. This allowed the NIC to focus its activity again on the population based surveillance, the antigenic and genetic characterisation of the strains and the anti-viral resistance monitoring. Although the decentralisation of the activities to the participating laboratories improves the analysis turnaround time and thus the patient care, it reduces the completeness of the cohort database. The missing information for gender, residence and date of birth can be explained by the priorities defined by the individual laboratories. Therefore the decentralisation reduced the capacity and the power of the epidemiological surveillance and this information can only be provided by community-based surveillance programmes such as the SGP network. Patients included in this study were not equally distributed throughout the different regions in Belgium. Since one Walloon laboratory did not report the residence of its patients, the representation of the patients group from the Walloon Region is slightly underestimated. However, the heterogeneous distribution should still be taken into consideration in the generalisation of the results to the diagnosed patients in Belgium. The distribution curve of the number of infected cases as a function of time had the same shape as the one observed by other implemented surveillance systems such as the surveillance SGP network and the paediatric surveillance. The peak of the number of positive cases was observed in week 43, after which, in week 44, the decline of the number of cases was initiated. There is some evidence that the start of school holidays reduces the influenza transmission and that the return to school slightly accelerates the epidemic. As the decline in prevalence occurred before the autumn holidays (week 45) we could not confirm this hypothesis. The similarity in the age distribution of patients at the different laboratories demonstrates the age-independent inclusion criteria for these laboratories (Figure 2). The vulnerability for Influenza A(H1N1)2009 of the younger age groups as shown in this report, was also observed by the national surveillance SGP network and is consistent with other investigations. The very low presence of people over 65 years of age is consistent with other investigations (Health Protection Agency, Centers for Disease Control and Prevention). Data suggest that the elderly may to some extent be protected from infection. As in many other countries, the Influenza A(H1N1)2009 virus was the predominant circulating influenza virus. However 8 Influenza B strains were detected by 2 out of 7 laboratories performing this typing assay. Although these 2 laboratories reported the majority of samples (53.7%), this prevalence of subtype B could still be an underestimation. This is of notice as no Influenza B strain was detected from the samples provided by the SGP network. Whether this difference was due to the selection of patient samples or to the sensitivity or specificity of the assays should still be investigated. These data are an additional tool for the virological surveillance of Influenza A(H1N1)2009 during the epidemic in Belgium. While the epidemiological surveillance by the SGP network selects patients with influenza-like illness (ILI) attending the general practitioner's, this surveillance study is focussed on hospitalised patients and patients at risk of severe diseases. Therefore, the obtained laboratory results provide information on the identification of the infection waves during an epidemic and can be implemented as a confirmation tool of the population-based surveillance. To avoid inappropriate assignment of morbidity to the Influenza A(H1N1)2009 virus, some efforts to detect other respiratory viral agents are warranted. Therefore, it would be of particular interest if this virological surveillance could be enlarged with the monitoring of cocirculating viral agents associated with ILI during the Influenza season. Similarly the link between the cases and the clinical data is lacking in this study and should be considered in a future study. Quality assessments have proven their usefulness to demonstrate similar performances between the different laboratories. Considering the heterogeneous PCR procedures used by the different laboratories, the organisation of such a quality assessment will be of upmost importance to compare the relatedness of the performances between the laboratories. Meanwhile such a quality assessment was organised after the epidemic period by the MolecularDiagnostics.be workgroup for their members including most of the participating laboratories from our study. Results are available for these members through their website. This study demonstrated the fluent decentralisation of the confirmatory analysis from the NIC towards the participating laboratories. The network and websites were successfully organised and implemented allowing the collection of virological data. This network allowed the reduction of the workload at the NIC as well and made the diagnosis more widely available. Despite the differences in testing algorithm and inclusion criteria, similar positivity rates as well as age distributions of the confirmed cases were notified between the laboratories.
$SU$ vs. $SU \times SU$ Breaking in Weak Hyperon Decays We consider the predictions of chiral perturbation theory for $SU$ breaking in weak semileptonic and $s$-wave nonleptonic hyperon decays. By defining an expansion sensitive only to $SU$ breaking, we show that the leading corrections give rise to moderate corrections to $SU$ relations ($\lsim 20\%$), even though the {\it chiral} symmetry $SU \times SU$ appears to be rather badly broken. This explains why $SU$ fits to weak hyperon decays work well even though chiral-symmetry breaking corrections are large. Applying these $SU$-breaking corrections to the analysis of the EMC data, we find that the predicted value of $\bra p\mybar s\gamma_\mu\gamma_5 s\ket p$ is reduced by $\simeq 35\%$, suggesting that the ``EMC effect'' may be less striking than commonly thought. Introduction In this paper, we consider corrections to the SU predictions for weak semileptonic and s-wave nonleptonic hyperon decay rates. The SU predictions are valid in the limit where m u = m d = m s (we neglect electromagnetism), and experimentally they work to better than 20%. This remarkable agreement is certainly not due to the fact that the quark masses are nearly equal; if they were, the 0 and would be nearly degenerate in mass, while we know that m /m ≃ 4. Understanding why some SU predictions work well while others fail completely has been a theoretical challenge since the discovery of these relations. To make progress on this question it is clearly necessary to have a systematic framework to study deviations from SU symmetry. Chiral perturbation theory provides such a framework, giving a rigorous expansion around the chiral limit: m u, m d, m s → 0. In the chiral limit, the octet mesons, K, and are massless Nambu-Goldstone bosons whose couplings are constrained by the low-energy theorems of spontaneous symmetry breaking. These theorems can be encoded in an effective lagrangian with a non-linearly realized SU L SU R symmetry. The lowest-order predictions of chiral perturbation theory embody the SU predictions, and deviations from SU symmetry relations can be studied by considering corrections to the chiral limit. Chiral perturbation theory for baryons was recently reformulated by Jenkins and Manohar using an effective lagrangian in which the baryons are treated as heavy fields. These authors computed the O(m s ln m s ) corrections to the hyperon weak decay form factors and found that corrections to the lowest-order predictions were ∼ 100%. The logarithmically-enhanced corrections are not expected to dominate the uncalculable O(m s ) contributions in the real world. However, the large size of the logarithmically-enhanced corrections does suggest that chiral perturbation theory is breaking down for these processes, and makes the success of the lowest-order predictions difficult to understand. Also puzzling is that the "corrected" predictions still fit the data well, at the price of large shifts in the values of the couplings which define the chiral expansion. For example, in ref., the values to the axial-vector form factors including the corrections were found to give D = 0.56, F = 0.33, while their lowest-order fit gives D = 0.80, F = 0.50. The authors of ref. propose that the breakdown of chiral perturbation theory for baryons coupled to mesons is due to the presence of the nearby decuplet states. They find that including decuplet intermediate states reduces the size of the logarithmicallyenhanced corrections, but they still require large shifts parameters to accommodate the data. We will not consider this point of view here. In this paper, we propose a well-motivated and well-defined resummation of the chiral expansion which is sensitive only to SU breaking. We compute the logarithmicallyenhanced contributions to the weak decay form factors in this expansion, and find that all corrections are < ∼ 20%. We conclude that there is no reason to believe that this SU expansion is breaking down, even though the chiral expansion does not seem to work well. This is somewhat surprising, since both expansions are controlled by m s in the limit m s ≫ m u, m d. Our conclusion is also supported by the fact that predictions for the p-wave nonleptonic decays, which follow from chiral symmetry but not from SU alone, do not work well. We also apply our results to consider the effects of SU breaking on the interpretation of the EMC effect. We find that SU breaking reduces the predicted value of p|s 5 s|p by 35%, reducing the size of the "EMC effect." The plan of this paper is as follows. In section 2, we briefly review the effective lagrangian formalism we will use to carry out our computations. In section 3, we discuss the computation of the semileptonic decay rates. In section 4, we apply our results to the EMC data. In section 5, we discuss the computation of the nonleptonic decay rates. Section 6 contains our conclusions. The Effective Lagrangian In this section, we briefly review the effective lagrangian we use to carry out the computation. The notation and conventions we use are the same as those of ref.. We briefly review the formalism here for completeness. The reader familiar with this formalism is urged to skip to section 3. Mesons The field where this equation implicitly defines U as a function of L, R, and. The meson fields are Since we are interested in matrix elements of the vector-and axial-vector Noether currents, we add source terms by defining the covariant derivatives (Note that (D ) = D.) Here, The effective lagrangian is most conveniently written in terms of which transform under local SU The covariant derivative The chiral symmetry is broken explicitly by the quark masses. (We neglect the effects of electromagnetism in this paper.) We will ignore isospin breaking, so that the quark mass matrix is taken to be It is convenient to define the even-and odd-parity fields The simple transformation rules of the fields defined above makes it easy to write down the effective lagrangian. For example, the leading terms can be written Baryons Because we are interested in processes with characteristic energy much smaller than baryon masses, the baryons may be treated as heavy particles. The basic idea is to write the baryon momentum as P = M v + k, where M is the common baryon mass in the SU limit and v is chosen so that all of the components of the residual momentum k are small compared to hadronic scales,, for the process of interest. The effective lagrangian is then labelled by v and is written in terms of fields B satisfying the positive energy condition / vB = B, and whose momentum modes are the residual momenta of the baryons. This explicitly removes M as a kinematic scale in the problem. Explicitly, we have The lowest order terms in the effective lagrangian involving baryon fields are where the spin matrix is given by and the covariant derivative acts on B as in eq.. Semileptonic Decays In this section, we consider the ∆S = 1 semileptonic decays of hyperons. These decays are governed by the form factors where q ≡ p a − p b. In the SU limit m u = m d = m s, the form factors at zero momentum transfer are determined in terms of two parameters, D and F : Clebsch-Gordan coefficients, and the g 1 are simple linear combinations of D and F (see below). We consider the form factors at zero momentum transfer because the masses of the baryon octet become degenerate in the SU limit, so the q 2 dependence of the form factors is higher order in the SU expansion. We will study deviations from the SU limit using chiral perturbation theory. The contribution of the form factors f 3 and g 3 is suppressed by the electron mass, and can be safely neglected. The corrections to f 1 and the values of f 2 and g 2 are O(m s ) and are not calculable in chiral perturbation theory. The corrections to f 1 are O(m s ) and are calculable due to the Ademollo-Gatto theorem; numerically, they are < ∼ 5%. The corrections to g 1 are O(m s ln m s ), and are therefore formally the largest corrections in the chiral expansion. We therefore focus on g 1 for the remainder of this section. In ref., these corrections were computed, and were found to be ∼ 100%. * Aside from the distinction between SU and chiral symmetry breaking, our calculation differs from that of ref. only in that we keep m = 0. The corrections are expected to be only ∼ 20% of the K and corrections, but setting m = 0 systematically increases the amount of predicted SU violation. We write g abc where the lowest-order results are where d c ab and f c ab are the symmetric and antisymmetric structure constants of SU, respectively. Specifically, * An earlier calculation which found smaller corrections is incorrect. The leading chiral corrections are Here is an arbitrary renormalization scale. The dependence of these results is cancelled by the dependence of O(m s ) terms in the effective lagrangian such as If we take ≃, there are no large logarithms in the higher order coefficients, and the correction is dominated by the logarithmically enhanced terms (computed above) near the chiral limit. In the real world these logarithms are not very large, but we expect that the logarithmic terms will give a good indication of the actual size of the corrections. In the SU limit, using - we find where and m is the common meson mass. This shows that for purposes of evaluating SU breaking in semileptonic hyperon decays, it is misleading to present the results in terms of D and F defined in the effective lagrangian eq., since large corrections to D and F do not necessarily correspond to large SU breaking. We therefore consider an expansion in D and F, where m is chosen to be some appropriate average meson mass (see below) treated as O(m s ) for purposes of power counting. This expansion can easily be made well-defined to all orders, for example by defining the relations eq. to be exact in the limit where all mesons have a common mass m. The parameter m in eq. is a redundant parameter in this expansion analogous to the renormalization scale in conventional perturbation theory. In a world where the quark mass differences are small compared to the average quark mass, it is clear that m should be chosen to be close to the average meson mass. In our world, SU -breaking quark mass differences are of order m s, and it is not clear priori how to choose m. We simply choose m in order to minimize the corrections to the lowest-order results. This choice is justified a fortiori by the fact that we obtain a reasonable value for m (≃ 300 MeV), and by the fact that the corrections expressed in terms of D and F are small. This is a non-trivial feature of the logarithmically-enhanced corrections, since both SU and chiral symmetry breaking are controlled by the same parameter, namely m s. The large corrections to the lowest-order results in terms of D and F indicate that chiral perturbation theory is breaking down for this process. However, we wish to emphasize that this breakdown of chiral perturbation theory does not necessarily imply a breakdown of the expansion in terms of D and F. In, D and F have an absolute physical significance in terms of the couplings of the light mesons to baryons in chiral perturbation theory. In contrast our parameters D and F are defined through SU relations. In order to determine D and F we performed a fit to the decay rates and asymmetry data quoted by the Particle Data group. Because we expect that higher-order terms in the chiral expansion give corrections of order we have increased the uncertainties on the measured values of g 1 by 20%. (More information about our fit is presented in appendix A.) Fitting to the lowest-order results gives with 2 = 6.1 for 9 degrees of freedom. (Recall that D = D, F = F at lowest order.) Using m = 260 MeV and = m, the corrections to g 1 for all decay modes are less than 20%, and we obtain the best-fit values with 2 = 6.3. SU Breaking and the "EMC Effect" SU breaking is important for determining the value of various strange-quark matrix elements of nucleons. In this section, we briefly present the predictions of the expansion discussed in section 3 to the extraction of the matrix element where |p, s is a proton state with spin s. The unexpectedly large value of this matrix element extracted from analysis of EMC data is often called the "EMC effect" and has attracted a good deal of attention in the theoretical literature. Combining a (rigorous, QCD-derived) sum rule with isospin invariance allows us to derive the relation where g A ≃ 1.25 is the nucleon axial coupling. The left-hand side extracted (with extrapolation) from the EMC data is 0.126 ± 0.018, where we have added systematic and statistical errors in quadrature. We have Expressing the results in terms of D and F and using our best-fit values, we obtain ∆s = (−0.13 ± 0.07)M p, whereas we obtain ∆s = (−0.20 ± 0.06)M p and ∆u + ∆d + ∆s = (0.06 ± 0.18)M p if we do not include SU -breaking corrections. We may not trust the predicted SU breaking in eq. quantitatively, since O(m s ) corrections are not included. However, it is worth noting that the corrections we have computed significantly reduce the value of ∆s, suggesting that the "EMC effect" may be less striking than commonly thought. Nonleptonic Decays In this section, we consider nonleptonic decays as another application of the formalism discussed in section 3. We will find that our results tell much the same story as the semileptonic decays: there are large corrections to the lowest-order predictions of chiral symmetry, but corrections to SU relations are < ∼ 10%. We consider only the predictions for the s-wave nonleptonic decay amplitudes here, since the chiral perturbation theory predictions for the p-wave amplitudes do not follow from SU alone. The effective ∆S = 1 lagrangian at the weak scale can be written We follow standard practice and assume the dominance of the ∆I = 1 2 amplitudes. We therefore add to the effective lagrangian the terms where Previous authors have also included a term which is higher order in the derivative expansion on the grounds that its coefficient, h, as measured in ∆S = 1 kaon decays is larger than expected by dimensional analysis. We choose to work to a consistent order in the chiral expansion and will neglect this term. The enhancement of h is attributed to the ∆I = 1 2 rule which may be violated in these decays (see below), making special treatment of this term somewhat suspect. Also, we have no information about other higher order terms which could also have anomalously large coefficients. In any case, we are interested primarily in the question of the size of SU violation, and barring accidental cancellations, we expect that the logarithmically-enhanced corrections to give a good indication of the size of the corrections. The s-wave decay amplitude for B a → B b can be written as where A ab is the dimensionless s-wave (parity violating) amplitude as defined in ref.. Assuming the ∆I = 1 2 rule, there are three isospin relations among the seven decay amplitudes that have been measured: The experimental deviation from these relations is shown in parentheses. (Details on the data and fits can be found in appendix B.) These "isospin" relations do not work significantly better than the SU relations (see below), suggesting that the ∆I = 1 2 rule may not be accurate for these decays. However, since we are interested primarily in the size of SU violation, it is sufficient to assume the ∆I = 1 2 form eq. for the lagrangian. The predictions for the remaining independent s-wave amplitudes are where is the lowest-order prediction, and and are the corrections. contains pion wavefunction renormalization and renormalization of f. These effects are the same for all decays, and therefore do not affect the SU predictions. We will not need the explicit expressions for these corrections. The tree-level results for the four independent amplitudes are n + = 0, At lowest order we can eliminate h D and h F to obtain an SU relation among the three non-vanishing amplitudes: the Lee-Sugawara relation (This relation is often written including a term proportional to A n +.) The leading chiral corrections are Defining h D and h F in analogy to D and F we obtain from - A fit to the data using the lowest-order predictions gives with 2 = 0.06 for 1 degree of freedom. To account for the theoretical error due to O(m s ) terms in the expansion we have again added 20% in quadrature to the experimental errors before doing the fit. With only one degree of freedom the errors quoted should be taken as indicative only, but it is clear that the lowest-order predictions fit the data well. Expressing our results in terms of h D and h F and taking = m and m = 320 MeV, we find that all the logarithmically-enhanced SU corrections are less than 10% and the fit still works well: with 2 = 0.30. Thus there is every indication that the SU expansion is well-behaved. This is to be contrasted to the chiral expansion, in which corrections to the individual decay amplitudes are ∼ 50%. Chiral symmetry also gives a prediction for the p-wave decay amplitudes which does not follow from SU alone. These predictions do not work well, supporting our conclusion that SU may be a better symmetry than chiral symmetry. Including the corrections for the best fit h D and h F the Lee-Sugawara relation becomes ∆ LS = 0.29 ± 0.13, which is to be compared with the experimental value of −0.23 ± 0.03. The expected size of the O(m s ) contributions is ∼ 0.4, so the fact that the predicted sign of ∆ LS is wrong does not imply that our expansion is breaking down. Conclusions We have investigated the question of SU breaking for weak hyperon decays in the context of chiral perturbation theory. One major difference between our work and previous work is that we have emphasized that large explicit chiral symmetry breaking does not necessarily imply large SU breaking. We have found that SU breaking is less than 20%, which is what is expected on the basis of dimensional analysis. Although we cannot conclude from our analysis that the expansion is under control, there is no sign that it is breaking down, unlike the usual chiral expansion. We also used this expansion to analyze the "EMC effect," and showed that the SU breaking corrections reduce the extracted value of the matrix element p|s 5 s|p by 35%. Appendix A. Fit to Semileptonic Decays In this appendix, we present some details of the fit to semileptonic hyperon decays used in this paper. We use both decay rate and asymmetry data taken from the most recent Particle Data Group (PDG) compilation. For the asymmetry data, we directly use the average values for g A /g V quoted by the PDG. To convert the decay rates into values for g 1, we keep the full kinematic dependence on the baryon masses, since these effects turn out to be numerically important. The data we use is displayed in The decay rate and asymmetry determinations of g 1 are inconsistent if we assume only the errors quoted by the PDG. This is either a symptom of systematic errors in the experiments or an indication that higher-order corrections are important. We expect
"I Just Want My Money or My CDs Back" "I just want my money or my CDs back." The owner of a local record label says he was burned by the abrupt closing of a CD store that operated for five months out of an outdoor kiosk at the Fashion Valley mall. When singer/songwriter Greg Laswell opened All the Rest Records in April of last year, Laswell said the store's inventory would focus on local, unsigned artists. All the Rest provided a listening station so music fans could discover new artists for themselves. "Usually independent music is on the back shelf in a music store and no one knows about it," he said last May. "We are just about breaking even. Each month is better than the last." All the Rest closed September 7. "I gave them 35 CDs," said a record label owner who did not want to be identified. "I know they sold because some of them were reorders.... I've tried to contact Laswell through his e-mail. He never called me. I asked him for a receipt, and he sent a receipt for some other band. I always dealt directly with Dustin Shey. He was the guy who worked the booth. Dustin told me he was sorry and that he would take care of it. He told me he had been trying to get a hold of Greg." Calls to both Laswell and Shey were not returned. The label owner said he will go to small claims court for his $280. "I don't want to make a big scene. I just want to take care of it. All he had to do was call and say, 'Give me a couple months' and give me back the CDs he didn't sell. I think the main reason the kiosk isn't there anymore is because they were paying $3000 a month rent and in October it was going up to $8000."
Solvent-resistant microfluidic devices made from PFHDA resins by micro-stereolithography Chemically resistant polymer materials are of great interest due to their versatile implementation in a broad range of applications, including the design of robust microfluidic devices. While flow cells, conventionally fabricated by using poly(dimethylsiloxane) (PDMS), are hardly resistant toward organic solvents, fluorinated materials are chemically inert. However, focusing on the latest developments in microfluidic device design via high-resolution additive manufacturing, e.g., based on micro-stereolithography (SL), only a few resin formulations have been demonstrated suitable for 3D printing chemically resistant polymer objects. Here, we introduce a homemade resin formulation based on 1H,1H,6H,6H-Perfluoro-1,6-hexyl diacrylate (PFHDA) for high-resolution 3D printing utilizing SL. By investigating the optical dose, the wettability, the resistance toward organic solvents, and the minimal resolution achievable, we fabricate inner structures down to 200 m. Finally, water-in-oil (W/O) emulsions are generated in a 3D-printed droplet maker with planar microchannel geometry made from the PFHDA-based resin yielding droplets with an average diameter of 271 m ± 26 m. The presented material is resistant against commonly used organic solvents including THF, DMF and toluene with a swelling below 1.5% and shows no solvent-induced damage to the micro-printed structure, which makes the PFHDA-based resin a promising base material for several potential applications such as organic synthesis in microreactors.
Glycerol decreases the integrity of the perinuclear theca in boar sperm Summary We evaluated the effect of glycerol on the perinuclear theca (PT) of boar sperm. Samples from six ejaculates obtained from three different boars were incubated in the detergent Brij 36-T. Spermatozoa were treated with a glycerol concentration of either 2 or 4%, and incubated for 10 or 30 min; two other samples were treated with protease inhibitors (PI; leupeptin or an inhibitor commercial cocktail), mixed with 4% glycerol, and incubated for 30 min. A third glycerol-free group was used as the control. The samples were processed for electron microscopy evaluation. The PT remained intact in 78% of the control samples while, after addition of glycerol for 30 min, the proportion of spermatozoa with disrupted or absent PT increased (P < 0.05). PT was preserved in PI samples, but PT changes increased (P < 0.05). Differences due to treatment with glycerol (2 or 4%) at 10 or 30 min were not observed. These results show, to our knowledge for the first time, the adverse effect of glycerol on the integrity of the PT.
<reponame>zaion520/ATtomato<filename>release/src-rt-6.x.4708/router/samba3/source4/torture/rap/sam.c /* Unix SMB/CIFS implementation. test suite for RAP sam operations Copyright (C) <NAME> 2010-2011 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "includes.h" #include "libcli/libcli.h" #include "torture/torture.h" #include "torture/util.h" #include "torture/smbtorture.h" #include "torture/util.h" #include "libcli/rap/rap.h" #include "torture/rap/proto.h" #include "../lib/crypto/crypto.h" #include "../libcli/auth/libcli_auth.h" #include "torture/rpc/torture_rpc.h" #define TEST_RAP_USER "torture_rap_user" static char *samr_rand_pass(TALLOC_CTX *mem_ctx, int min_len) { size_t len = MAX(8, min_len); char *s = generate_random_password(mem_ctx, len, len+6); printf("Generated password '%s'\n", s); return s; } static bool test_userpasswordset2_args(struct torture_context *tctx, struct smbcli_state *cli, const char *username, const char **password) { struct rap_NetUserPasswordSet2 r; char *newpass = samr_rand_pass(tctx, 8); ZERO_STRUCT(r); r.in.UserName = username; memcpy(r.in.OldPassword, *password, MIN(strlen(*password), 16)); memcpy(r.in.NewPassword, <PASSWORD>pass, MIN(strlen(newpass), 16)); r.in.EncryptedPassword = 0; r.in.RealPasswordLength = strlen(newpass); torture_comment(tctx, "Testing rap_NetUserPasswordSet2(%s)\n", r.in.UserName); torture_assert_ntstatus_ok(tctx, smbcli_rap_netuserpasswordset2(cli->tree, tctx, &r), "smbcli_rap_netuserpasswordset2 failed"); if (!W_ERROR_IS_OK(W_ERROR(r.out.status))) { torture_warning(tctx, "RAP NetUserPasswordSet2 gave: %s\n", win_errstr(W_ERROR(r.out.status))); } else { *password = <PASSWORD>; } return true; } static bool test_userpasswordset2_crypt_args(struct torture_context *tctx, struct smbcli_state *cli, const char *username, const char **password) { struct rap_NetUserPasswordSet2 r; char *newpass = samr_rand_pass(tctx, 8); r.in.UserName = username; E_deshash(*password, r.in.OldPassword); E_deshash(newpass, r.in.NewPassword); r.in.RealPasswordLength = strlen(newpass); r.in.EncryptedPassword = 1; torture_comment(tctx, "Testing rap_NetUserPasswordSet2(%s)\n", r.in.UserName); torture_assert_ntstatus_ok(tctx, smbcli_rap_netuserpasswordset2(cli->tree, tctx, &r), "smbcli_rap_netuserpasswordset2 failed"); if (!W_ERROR_IS_OK(W_ERROR(r.out.status))) { torture_warning(tctx, "RAP NetUserPasswordSet2 gave: %s\n", win_errstr(W_ERROR(r.out.status))); } else { *password = <PASSWORD>; } return true; } static bool test_userpasswordset2(struct torture_context *tctx, struct smbcli_state *cli) { struct test_join *join_ctx; const char *password; bool ret = true; join_ctx = torture_create_testuser_max_pwlen(tctx, TEST_RAP_USER, torture_setting_string(tctx, "workgroup", NULL), ACB_NORMAL, &password, 14); if (join_ctx == NULL) { torture_fail(tctx, "failed to create user\n"); } ret &= test_userpasswordset2_args(tctx, cli, TEST_RAP_USER, &password); ret &= test_userpasswordset2_crypt_args(tctx, cli, TEST_RAP_USER, &password); torture_leave_domain(tctx, join_ctx); return ret; } static bool test_oemchangepassword_args(struct torture_context *tctx, struct smbcli_state *cli, const char *username, const char **password) { struct rap_NetOEMChangePassword r; const char *oldpass = *password; char *newpass = samr_rand_pass(tctx, 9); uint8_t old_pw_hash[16]; uint8_t new_pw_hash[16]; r.in.UserName = username; E_deshash(oldpass, old_pw_hash); E_deshash(newpass, new_pw_hash); encode_pw_buffer(r.in.crypt_password, newpass, STR_ASCII); arcfour_crypt(r.in.crypt_password, old_pw_hash, 516); E_old_pw_hash(new_pw_hash, old_pw_hash, r.in.password_hash); torture_comment(tctx, "Testing rap_NetOEMChangePassword(%s)\n", r.in.UserName); torture_assert_ntstatus_ok(tctx, smbcli_rap_netoemchangepassword(cli->tree, tctx, &r), "smbcli_rap_netoemchangepassword failed"); if (!W_ERROR_IS_OK(W_ERROR(r.out.status))) { torture_warning(tctx, "RAP NetOEMChangePassword gave: %s\n", win_errstr(W_ERROR(r.out.status))); } else { *password = <PASSWORD>; } return true; } static bool test_oemchangepassword(struct torture_context *tctx, struct smbcli_state *cli) { struct test_join *join_ctx; const char *password; bool ret; join_ctx = torture_create_testuser_max_pwlen(tctx, TEST_RAP_USER, torture_setting_string(tctx, "workgroup", NULL), ACB_NORMAL, &password, 14); if (join_ctx == NULL) { torture_fail(tctx, "failed to create user\n"); } ret = test_oemchangepassword_args(tctx, cli, TEST_RAP_USER, &password); torture_leave_domain(tctx, join_ctx); return ret; } static bool test_usergetinfo_byname(struct torture_context *tctx, struct smbcli_state *cli, const char *UserName) { struct rap_NetUserGetInfo r; int i; uint16_t levels[] = { 0, 1, 2, 10, 11 }; for (i=0; i < ARRAY_SIZE(levels); i++) { r.in.UserName = UserName; r.in.level = levels[i]; r.in.bufsize = 8192; torture_comment(tctx, "Testing rap_NetUserGetInfo(%s) level %d\n", r.in.UserName, r.in.level); torture_assert_ntstatus_ok(tctx, smbcli_rap_netusergetinfo(cli->tree, tctx, &r), "smbcli_rap_netusergetinfo failed"); torture_assert_werr_ok(tctx, W_ERROR(r.out.status), "smbcli_rap_netusergetinfo failed"); } return true; } static bool test_usergetinfo(struct torture_context *tctx, struct smbcli_state *cli) { struct test_join *join_ctx; const char *password; bool ret; join_ctx = torture_create_testuser_max_pwlen(tctx, TEST_RAP_USER, torture_setting_string(tctx, "workgroup", NULL), ACB_NORMAL, &password, 14); if (join_ctx == NULL) { torture_fail(tctx, "failed to create user\n"); } ret = test_usergetinfo_byname(tctx, cli, TEST_RAP_USER); torture_leave_domain(tctx, join_ctx); return ret; } static bool test_useradd(struct torture_context *tctx, struct smbcli_state *cli) { struct rap_NetUserAdd r; struct rap_NetUserInfo1 info1; int i; uint16_t levels[] = { 1 }; const char *username = TEST_RAP_USER; for (i=0; i < ARRAY_SIZE(levels); i++) { const char *pwd; pwd = generate_random_password(tctx, 9, 16); r.in.level = levels[i]; r.in.bufsize = 0xffff; r.in.pwdlength = strlen(pwd); r.in.unknown = 0; switch (r.in.level) { case 1: ZERO_STRUCT(info1); info1.Name = username; memcpy(info1.Password, pwd, MIN(strlen(pwd), 16)); info1.Priv = USER_PRIV_USER; info1.Flags = 0x21; info1.HomeDir = "home_dir"; info1.Comment = "comment"; info1.ScriptPath = "logon_script"; r.in.info.info1 = info1; break; } torture_comment(tctx, "Testing rap_NetUserAdd(%s) level %d\n", username, r.in.level); torture_assert_ntstatus_ok(tctx, smbcli_rap_netuseradd(cli->tree, tctx, &r), "smbcli_rap_netuseradd failed"); torture_assert_werr_ok(tctx, W_ERROR(r.out.status), "smbcli_rap_netuseradd failed"); torture_assert_ntstatus_ok(tctx, smbcli_rap_netuseradd(cli->tree, tctx, &r), "2nd smbcli_rap_netuseradd failed"); torture_assert_werr_equal(tctx, W_ERROR(r.out.status), WERR_USEREXISTS, "2nd smbcli_rap_netuseradd failed"); { struct rap_NetUserDelete d; d.in.UserName = username; smbcli_rap_netuserdelete(cli->tree, tctx, &d); } } return true; } static bool test_userdelete(struct torture_context *tctx, struct smbcli_state *cli) { struct rap_NetUserDelete r; { struct rap_NetUserAdd a; const char *pwd; ZERO_STRUCT(a.in.info.info1); pwd = generate_random_password(tctx, 9, 16); a.in.level = 1; a.in.bufsize = 0xffff; a.in.pwdlength = strlen(pwd); a.in.unknown = 0; a.in.info.info1.Name = TEST_RAP_USER; a.in.info.info1.Priv = USER_PRIV_USER; memcpy(a.in.info.info1.Password, pwd, MIN(strlen(pwd), 16)); torture_assert_ntstatus_ok(tctx, smbcli_rap_netuseradd(cli->tree, tctx, &a), "smbcli_rap_netuseradd failed"); } r.in.UserName = TEST_RAP_USER; torture_comment(tctx, "Testing rap_NetUserDelete(%s)\n", r.in.UserName); torture_assert_ntstatus_ok(tctx, smbcli_rap_netuserdelete(cli->tree, tctx, &r), "smbcli_rap_netuserdelete failed"); torture_assert_werr_ok(tctx, W_ERROR(r.out.status), "smbcli_rap_netuserdelete failed"); torture_assert_ntstatus_ok(tctx, smbcli_rap_netuserdelete(cli->tree, tctx, &r), "2nd smbcli_rap_netuserdelete failed"); torture_assert_werr_equal(tctx, W_ERROR(r.out.status), WERR_USER_NOT_FOUND, "2nd smbcli_rap_netuserdelete failed"); return true; } struct torture_suite *torture_rap_sam(TALLOC_CTX *mem_ctx) { struct torture_suite *suite = torture_suite_create(mem_ctx, "sam"); torture_suite_add_1smb_test(suite, "userpasswordset2", test_userpasswordset2); torture_suite_add_1smb_test(suite, "oemchangepassword", test_oemchangepassword); torture_suite_add_1smb_test(suite, "usergetinfo", test_usergetinfo); torture_suite_add_1smb_test(suite, "useradd", test_useradd); torture_suite_add_1smb_test(suite, "userdelete", test_userdelete); return suite; }
// DO NOT EDIT. This file is machine-generated and constantly overwritten. // Make changes to LMGLDOffer.h instead. #if __has_feature(modules) @import Foundation; @import CoreData; #else #import <Foundation/Foundation.h> #import <CoreData/CoreData.h> #endif NS_ASSUME_NONNULL_BEGIN @class LMGLDBusiness; @class LMGLDLocation; @class LMGLDPagedResultBusiness; @class LMGLDSchedule; @interface LMGLDOfferID : NSManagedObjectID {} @end @interface _LMGLDOffer : NSManagedObject + (instancetype)insertInManagedObjectContext:(NSManagedObjectContext *)moc_; + (NSString*)entityName; + (nullable NSEntityDescription*)entityInManagedObjectContext:(NSManagedObjectContext*)moc_; @property (nonatomic, readonly, strong) LMGLDOfferID *objectID; @property (nonatomic, strong, nullable) NSNumber* bookmarked; @property (atomic) BOOL bookmarkedValue; - (BOOL)bookmarkedValue; - (void)setBookmarkedValue:(BOOL)value_; @property (nonatomic, strong, nullable) NSString* details; @property (nonatomic, strong, nullable) NSNumber* flag; @property (atomic) int16_t flagValue; - (int16_t)flagValue; - (void)setFlagValue:(int16_t)value_; @property (nonatomic, strong) NSString* headline; @property (nonatomic, strong, nullable) NSString* heroImage; @property (nonatomic, strong) NSString* id; @property (nonatomic, strong) NSNumber* isFullyLoaded; @property (atomic) BOOL isFullyLoadedValue; - (BOOL)isFullyLoadedValue; - (void)setIsFullyLoadedValue:(BOOL)value_; @property (nonatomic, strong, nullable) NSString* legal; @property (nonatomic, strong, nullable) NSString* promoCode; @property (nonatomic, strong, nullable) NSString* shareUrl; @property (nonatomic, strong) NSString* subHeadline; @property (nonatomic, strong, nullable) LMGLDBusiness *business; @property (nonatomic, strong, nullable) NSSet<LMGLDLocation*> *locations; - (nullable NSMutableSet<LMGLDLocation*>*)locationsSet; @property (nonatomic, strong, nullable) NSSet<LMGLDPagedResultBusiness*> *pagedResultBusinessIndex; - (nullable NSMutableSet<LMGLDPagedResultBusiness*>*)pagedResultBusinessIndexSet; @property (nonatomic, strong, nullable) LMGLDSchedule *redemptionSchedule; @end @interface _LMGLDOffer (LocationsCoreDataGeneratedAccessors) - (void)addLocations:(NSSet<LMGLDLocation*>*)value_; - (void)removeLocations:(NSSet<LMGLDLocation*>*)value_; - (void)addLocationsObject:(LMGLDLocation*)value_; - (void)removeLocationsObject:(LMGLDLocation*)value_; @end @interface _LMGLDOffer (PagedResultBusinessIndexCoreDataGeneratedAccessors) - (void)addPagedResultBusinessIndex:(NSSet<LMGLDPagedResultBusiness*>*)value_; - (void)removePagedResultBusinessIndex:(NSSet<LMGLDPagedResultBusiness*>*)value_; - (void)addPagedResultBusinessIndexObject:(LMGLDPagedResultBusiness*)value_; - (void)removePagedResultBusinessIndexObject:(LMGLDPagedResultBusiness*)value_; @end @interface _LMGLDOffer (CoreDataGeneratedPrimitiveAccessors) - (nullable NSNumber*)primitiveBookmarked; - (void)setPrimitiveBookmarked:(nullable NSNumber*)value; - (BOOL)primitiveBookmarkedValue; - (void)setPrimitiveBookmarkedValue:(BOOL)value_; - (nullable NSString*)primitiveDetails; - (void)setPrimitiveDetails:(nullable NSString*)value; - (nullable NSNumber*)primitiveFlag; - (void)setPrimitiveFlag:(nullable NSNumber*)value; - (int16_t)primitiveFlagValue; - (void)setPrimitiveFlagValue:(int16_t)value_; - (NSString*)primitiveHeadline; - (void)setPrimitiveHeadline:(NSString*)value; - (nullable NSString*)primitiveHeroImage; - (void)setPrimitiveHeroImage:(nullable NSString*)value; - (NSString*)primitiveId; - (void)setPrimitiveId:(NSString*)value; - (NSNumber*)primitiveIsFullyLoaded; - (void)setPrimitiveIsFullyLoaded:(NSNumber*)value; - (BOOL)primitiveIsFullyLoadedValue; - (void)setPrimitiveIsFullyLoadedValue:(BOOL)value_; - (nullable NSString*)primitiveLegal; - (void)setPrimitiveLegal:(nullable NSString*)value; - (nullable NSString*)primitivePromoCode; - (void)setPrimitivePromoCode:(nullable NSString*)value; - (NSString*)primitiveSubHeadline; - (void)setPrimitiveSubHeadline:(NSString*)value; - (LMGLDBusiness*)primitiveBusiness; - (void)setPrimitiveBusiness:(LMGLDBusiness*)value; - (NSMutableSet<LMGLDLocation*>*)primitiveLocations; - (void)setPrimitiveLocations:(NSMutableSet<LMGLDLocation*>*)value; - (NSMutableSet<LMGLDPagedResultBusiness*>*)primitivePagedResultBusinessIndex; - (void)setPrimitivePagedResultBusinessIndex:(NSMutableSet<LMGLDPagedResultBusiness*>*)value; - (LMGLDSchedule*)primitiveRedemptionSchedule; - (void)setPrimitiveRedemptionSchedule:(LMGLDSchedule*)value; @end @interface LMGLDOfferAttributes: NSObject + (NSString *)bookmarked; + (NSString *)details; + (NSString *)flag; + (NSString *)headline; + (NSString *)heroImage; + (NSString *)id; + (NSString *)isFullyLoaded; + (NSString *)legal; + (NSString *)promoCode; + (NSString *)subHeadline; @end @interface LMGLDOfferRelationships: NSObject + (NSString *)business; + (NSString *)locations; + (NSString *)pagedResultBusinessIndex; + (NSString *)redemptionSchedule; @end NS_ASSUME_NONNULL_END
Software developers fear that the rise of artificial intelligence might take away their jobs. That came out as the top worry of the biggest percentage of respondents to a survey of 550 software developers, conducted by research firm Evans Data. In the survey, 29% of the engineers agreed with the statement that their top fear is “I and my development efforts are replaced by artificial intelligence.” This was more troublesome than their software platform becoming obsolete, which was the second-most-cited worry at 23%, or that the new platforms they’re focusing on fail to gain market acceptance, at 14%. According to the survey, the thought of obsolescence due to AI also was more threatening than becoming old without a pension, being stifled at work by bad managers or by seeing their skills becoming irrelevant. While the developers who worried about AI were found across industries and platforms, one strong correlation was that they were more likely to self-identify with being loners rather than team players. Decades of research and billions of dollars have been poured into the development of artificial intelligence, which is quickly expanding from the tech elite to the smallest startups. Facebook (FB), Alphabet (GOOGL) and IBM (IBM) among other tech leaders have big ambitions for pushing the envelope of artificial intelligence. Facebook is using AI to decipher the best ways to bring Internet service to remote areas of the world and to make its News Feed feature more relevant to users of the social network. Alphabet is using it to enhance Google search abilities, improve voice recognition and to derive more data from images and video. IBM, which has perhaps the deepest investments and most far-reaching ability of any company in the field, now offers AI services through its cloud-based platform, used by companies to improve business decisions and operations, based on its Watson cognitive computing platform. More than 500 companies have deals with IBM to use Watson cloud services to develop commercial products and apps. Since 2010, AI startups have received $967 million in funding, according to CB Insights. Among the most active investors is Intel (INTC), which has invested in 16 AI companies.
#include <kernel/memory.h> #include <kernel/util/atomic.h> static struct pm_page *page_alloc(void) { extern struct memory_info pmemory; int i; i = -1; while (++i < pmemory.cache.pages.number) { // Check if the block are used if (pmemory.cache.pages.list[i].status == PAGE_USED) continue; // Initialize block and return address pmemory.cache.pages.list[i].status = PAGE_USED; pmemory.cache.pages.list[i].next = NULL; return (&pmemory.cache.pages.list[i]); } return (NULL); } void *pm_pages_alloc(int nb_page) { extern struct memory_info pmemory; uint16_t page_entry_id; struct pm_page **head; struct pm_page *new; // Check obvious error. if (nb_page == 0 || nb_page >= pmemory.cache.pages.number) return (NULL); // start atomic operations atomic_start(); // Find block entry. page_entry_id = 0; head = &pmemory.cache.delta; while (*head != NULL) { // Check is it'is the last allocated object. if ((*head)->next == NULL) { // Check potential memory available. if ((*head)->id.end + nb_page >= pmemory.cache.pages.number) { atomic_stop(); return (NULL); } // Get cache entry. page_entry_id = (*head)->id.end; head = &(*head)->next; break; } // Calculate the gap between current allocated object // and the next object and see if we can split the area if ((*head)->next->id.start - (*head)->id.end >= nb_page) { page_entry_id = (*head)->id.end; head = &(*head)->next; break; } // Get next allocated block. head = &(*head)->next; } // Setup new allocated block new = page_alloc(); if (new == NULL) { atomic_stop(); return (NULL); } // Initialize new block new->id.start = page_entry_id; new->id.end = page_entry_id + nb_page; // Insert new block. new->next = *head; *head = new; // stop atomic operations atomic_stop(); // Generate physical memory address return ((void*)((page_entry_id * PM_PAGE_SIZE) + pmemory.cache.pages.base_addr)); }
Favorite places -- Slayton House Gallery in the Wilde Lake Village Green, Columbia, will open a three-person show of paintings and photographs by Columbia artists Bonita Glaser and Natalie Harvey, and Beltsville resident Audrey Hopkins, on Thursday. The collaborative exhibit of familiar Maryland scenes runs through June 9. A reception with refreshments and music is planned from 3 p.m. to 5 p.m. May 20. Gallery hours are from 9 a.m. to 9 p.m. Monday through Thursday, 9 a.m. to 5 p.m. Friday, and 9 a.m. to 2 p.m. Saturday. 410-730-3987 or 301-596-4883.
/** * Writes a file from the source to destination. * * @param source The source file. * @param destination The destination file. * @param outputFileName The output files name. * * @return {@code true} if the file has been written successfully. */ public static boolean writeToFile(@NonNull File source, @NonNull File destination, @NonNull String outputFileName) { boolean success = false; try { if (DynamicFileUtils.verifyFile(destination)) { FileInputStream input = new FileInputStream(source); OutputStream output = new FileOutputStream(destination + File.separator + outputFileName); try { byte[] buffer = new byte[1024]; int length; while ((length = input.read(buffer)) > 0) { output.write(buffer, 0, length); } success = true; } catch (Exception ignored) { } finally { output.flush(); output.close(); input.close(); } } } catch (Exception ignored) { } return success; }
<reponame>mopedjs/moped // Auto generated by @moped/db-schema - do not edit by hand export default interface DbRateLimitStates { /** * Primary Key */ id: string; timestamp: number; value: number; }
Transition from Hepatopulmonary Syndrome to Portopulmonary Hypertension: A Case Series of 3 Patients Hepatopulmonary syndrome (HPS) and portopulmonary hypertension (PPHTN) are the two major pulmonary vascular complications of liver disease. While HPS is characterized by low pulmonary vascular resistance, PPHTN is defined by the presence of elevated pulmonary vascular resistance. Given these seemingly opposing pathophysiologic mechanisms, these conditions were traditionally felt to be mutually exclusive. In this series, we present three patients with severe hepatopulmonary syndrome who had spontaneous resolution of their HPS with the subsequent development of PPHTN. To our knowledge, this is the largest case series presented of this phenomenon in nontransplanted patients. One proposed mechanism for the occurrence of this phenomenon involves dysregulation of the same vascular signaling pathway, which may lead to both pulmonary vascular dilatations and pulmonary arterial remodeling in the same patient. Another theory involves the possible differential binding of endothelin-1, a vasoactive signaling peptide that induces vasoconstriction when bound to receptor A and vasodilation when bound to receptor B. Although the mechanisms for this phenomenon remain unclear, it is important to be vigilant of this phenomenon as it may change the patient's overall treatment plan, especially in regard to appropriateness and timing of liver transplant. Introduction Hepatopulmonary syndrome (HPS) and portopulmonary hypertension (PPHTN) are two of the most common pulmonary complications of liver disease. Although these two conditions may present similarily clinically and are pathologically linked by the presence of portal hypertension, their pathophysiologic mechanisms significantly differ. While HPS is characterized by low pulmonary vascular resistance secondary to intrapulmonary vascular dilatations, PPHTN features elevated pulmonary vascular resistance and constriction of the pulmonary vasculature. Given their seemingly opposing pathophysiologic mechanisms, these conditions were traditionally felt to be mutually exclusive. However, there have been a few reported cases in the literature of these two conditions coexisting in patients with liver disease and one case report of spontaneous conversion from HPS to PPHTN. In this series, we present three patients with severe HPS who had spontaneous resolution of their HPS with the subsequent development of PPHTN. To our knowledge, this is the largest case series published of this phenomenon in nontransplanted patients. Case Reports Case 1. A 57-year-old Caucasian female with a history of cirrhosis secondary to nonalcoholic steatohepatitis as well as mild asthma presented with a two-year history of shortness of breath. The patient had been placed on supplemental oxygen for significant hypoxemia approximately 1 year after the onset of her shortness of breath. At the time of her presentation to our center, the patient was requiring 1 liter of supplemental oxygen per minute at rest and 3 liters per minute (L/min) with exertion. Her asthma was not felt to play a role in her dyspnea as it had been well controlled off bronchodilators for a period of greater than 10 years. Physical exam was notable for an oxygen saturation of 91% on 2 L/min of oxygen and mild digital clubbing. Her Model for End-Stage Liver Disease (MELD) score at the time of presentation to our center was 14. The patient's computed tomography (CT) scan of the chest showed areas of mild ground glass opacities in the right upper lobe with adjacent pleural thickening and no evidence of thromboembolic disease. A wedge lung biopsy had previously been performed and the pathology had returned without evidence of interstitial fibrosis, vascular dilatations, intimal thickening, or arteriovenous malformations but did show nonspecific focal areas of eosinophilic vasculitis. Contrastenhanced echocardiogram showed an estimated right ventricular systolic pressure (RVSP) of 31 to 36 mmHg and evidence of an intrapulmonary shunt. Pulmonary function tests (PFTs) showed an isolated impairment in diffusing capacity (DLCO) of 31% predicted. The patient also underwent a technetium 99-macroaggregate albumin scan that revealed a 17% right to left shunt. An arterial blood gas (ABG) on room air revealed a pH of 7.46, partial pressure of oxygen in the arterial blood (PO2) of 56 millimeters of mercury (mmHg), partial pressure of carbon dioxide in the arterial blood (PCO2) of 26 mmHg, and an alveolar-arterial (A-a) gradient of 61 mmHg. These findings were consistent with a diagnosis of hepatopulmonary syndrome and the patient was placed on the liver transplant (LT) list with a MELD exception for HPS. Prior to listing, the patient underwent a surveillance right heart catheterization (RHC) showing a mean pulmonary artery pressure (mPAP) of 21 mmHg and a normal pulmonary capillary wedge pressure (PCWP). Over the next three years, the patient's shortness of breath and hypoxia gradually improved and she was slowly weaned off of oxygen ( Figure 1). No specific therapy was given over this period of time for her HPS. During this time period, her liver disease remained stable without any treatment and her MELD score improved from 14 to 11. An ABG on room air two years later showed a pH of 7.44, PO2 of 68 mmHg, PCO2 of 33 mmHg, and A-a gradient of 40 mmHg. A subsequent ABG four years later showed a pH of 7.48, PO2 of 83 mmHg, PCO2 of 27 mmHg, and A-a gradient of 33 mmHg. A routine transthoracic echocardiogram (TTE) performed two years later, however, showed an elevated RVSP of 62 mmHg, suggestive of pulmonary hypertension. She therefore underwent repeat RHC, which showed a markedly elevated mPAP of 45 mmHg, a cardiac output (CO) of 5.5 L/min, a pulmonary vascular resistance (PVR) of 372 dynes s −1 cm −5, and a PCWP of 12 mmHg, consistent with pulmonary arterial hypertension. A rheumatologic workup was unrevealing and the patient was subsequently considered for treatment with treprostinil, a prostacyclin analog. She was taken off the liver transplant list until successful treatment of her PPHTN and her care was transferred back to the referring center. Case 2. A 63-year-old Caucasian male with hepatitis C cirrhosis presented with a 4-year history of worsening dyspnea on exertion. He reported a history of platypnea and his symptoms had progressed to severe dyspnea with any activity. Approximately 1 year prior to presentation, the patient had been admitted to an outside hospital for hypoxemia and had been placed on supplemental oxygen. At the time of presentation to our center, the patient was using supplemental oxygen at 2 L/min at rest and 5-6 L/min with exertion. On physical exam, the patient's oxygen saturation was 90% on 3 L/min of oxygen and he had marked digital clubbing and peripheral cyanosis. The patient's MELD score at the time of presentation was 12. The patient's CT scan of the chest showed mild peripheral pulmonary fibrosis and enlargement of the distal pulmonary arterioles and nontapering pulmonary vessels, suggestive of hepatopulmonary syndrome. Contrast-enhanced echocardiography revealed an RVSP of 29 mmHg and an intrapulmonary shunt. The patient's pulmonary function tests demonstrated an isolated severe impairment in DLCO of 31% predicted. An ABG on room air revealed a pH of 7.45, PO2 of 58 mmHg, PCO2 of 28 mmHg, and A-a gradient of 57 mmHg. An oxygen shunt study with 100% oxygen given via face mask also revealed an elevated shunt fraction of 8.7%. Given these findings, the patient was diagnosed with severe HPS and listed for LT with a MELD exception. One year after his initial evaluation, the patient's shortness of breath had improved and he no longer required supplemental oxygen ( Figure 2). A repeat ABG showed significant improvement with pH of 7.41, PO2 of 78 mmHg, PCO2 of 34 mmHg, and A-a gradient of 29 mmHg. He was treated with supplemental garlic at 1 gram twice daily for HPS over that period of time. Repeat imaging of his chest showed unchanged mild peripheral pulmonary fibrosis and he subsequently underwent a surveillance TTE one year after his initial evaluation, which showed a significantly elevated RVSP of 71 mmHg, raising concern for PPHTN. Contrast-enhanced echocardiography at the time showed complete resolution of the previously seen intrapulmonary shunt. The patient subsequently underwent RHC, which showed a markedly elevated mPAP of 40 mmHg, a CO of 7.0 L/min, a PVR of 274 dynes s −1 cm −5, and PCWP of 16 mmHg, consistent with pulmonary arterial hypertension. The patient was started on sildenafil 20 mg three times a day. Two years after his initial evaluation for hypoxemia and one year after his diagnosis of PPHTN, the patient underwent a deceased-donor orthotopic LT. The patient's MELD score prior to transplant was 28. Perioperatively, the patient was treated with intravenous epoprostenol. After liver transplantation, the patient was started on inhaled nitric oxide and subsequently transitioned to sildenafil 100 mg three times a day. His postoperative course was complicated by abdominal bleeding requiring repeat exploratory laparotomy, renal failure necessitating dialysis, and difficulty weaning from the ventilator. Despite these complications, he was discharged home in good condition with no supplemental oxygen requirements. One year later, the patient's dyspnea on exertion almost completely resolved and TTE revealed a time to peak velocity of the right ventricular outflow tract of 126 milliseconds, which was consistent with normal pulmonary artery pressures. Given this finding and resolution of symptoms, the patient's sildenafil was discontinued. and A-a gradient of 48 mmHg. A 100% oxygen shunt study revealed an elevated shunt fraction of 15.7%. A CT scan of the chest demonstrated no evidence of pulmonary parenchymal disease, and a contrast-enhanced echocardiogram performed revealed a pulmonary shunt consistent with HPS and an RVSP of 38 mmHg. Six months after his initial presentation, the patient presented to our center, again without pulmonary symptoms, and his hypoxemia had resolved with a room air oxygen saturation of 96% ( Figure 3). His liver disease was stable with a MELD score of 15. As part of his LT evaluation, he underwent RHC, which showed an elevated mPAP of 44 mmHg, CO of 4.9 L/min, PVR of 462 dynes s −1 cm −5, and a PCWP of 6 mmHg, diagnostic of pulmonary arterial hypertension. Nitric oxide was given during the right heart catheterization and the patient's mean pulmonary artery pressure did decrease to 31 mmHg. Due to the patient's severe PPHTN, he could not be listed for LT. The patient was initiated on ambrisentan and his care was transferred back to the referring center, with plans to reevaluate the patient for LT once his PPHTN is better controlled. Discussion Two of the most common pulmonary complications of end-stage liver disease are hepatopulmonary syndrome and portopulmonary hypertension. Hepatopulmonary syndrome is defined as a triad of liver disease, an elevated A-a gradient on room air, and evidence of intrapulmonary vascular dilatation. For a definitive diagnosis of HPS, patients must meet three criteria: room air PO2 < 80 mmHg or A-a gradient > 15 mmHg, evidence of intrapulmonary shunting (typically on contrast-enhanced echocardiography or a lung perfusion scan), and portal hypertension with or without cirrhosis. Portopulmonary hypertension is defined as the presence of pulmonary arterial hypertension in the setting of portal hypertension, with or without the presence of cirrhosis. Diagnostic criteria for PPHTN include mean pulmonary arterial pressure ≥ 25 mmHg at rest or 30 mmHg on exercise, pulmonary vascular resistance > 240 dynes s −1 cm −5, and pulmonary capillary wedge pressure < 15 mmHg. While the prevalence of HPS ranges between 4% and 29%, portopulmonary hypertension is more rare, with prevalences reported between 0% and 7%. Though HPS and PPHTN are clinically distinct entities with seemingly distinct pathophysiologies, they can very rarely occur simultaneously or sequentially in the same patient. The majority of cases of sequential development of PPHTN after HPS have been reported in patients who have undergone liver transplant. In a sense, patients go from being too "vasodilated" to too "vasoconstricted" after their underlying liver disease is resolved. A review of the literature has shown four cases in which pulmonary hypertension developed after liver transplantation in adult patients with preexisting hepatopulmonary syndrome. In the earliest case report by Kaspar et al., a 33-year-old male had HPS that resolved after OLT but then developed pulmonary hypertension 14 months later. The other cases reported the development of severe pulmonary hypertension months to years after liver transplantation for HPS. The opposite-patients with existing PPHTN and the subsequent development of HPS-has also been reported in two separate case reports, one with a short time interval of days and one with a longer time interval of two years. Additionally, Pham et al. reported a case of a 46-year-old female who was diagnosed with hepatopulmonary syndrome and pulmonary hypertension simultaneously which we have also seen at our center. In the limited literature, there has only been one reported case of pulmonary hypertension developing after resolution of preexisting significant hepatopulmonary syndrome in an adult nontransplanted patient, similar to what we are describing in our series. Why patients with portal hypertension develop both pulmonary complications of liver disease, whether simultaneously or transitioning from one to the other, remains unclear. Both PPHTN and HPS may be the result of abnormal angiogenesis of the pulmonary microcirculation induced by chronic liver disease. As compared to PPHTN which mostly involves small muscular pulmonary arteries, the vascular remodeling process in HPS involves more distal structures such as precapillary and capillary vessels. The dysregulation of the same vascular signaling pathway may lead to both pulmonary vascular dilatations and pulmonary arterial remodeling leading to PPHTN in the same patient. Still, as the overall incidence of PPHTN is considerably lower than that of HPS, pulmonary arteries may be relatively protected against angiogenic stimulation and genetic susceptibility may play a role in the progression of the disease. Elevated portal vein pressures, a characteristic of both disorders, may also lead to increased translocation of gram-negative bacteria and endotoxins which act as inciting factors for the release of vasoactive mediators and activation of the endothelin system. Another proposed theory involves differing expressions of the endothelin-1 receptor. Endothelin-1 (ET1) is a vasoactive signaling peptide that has different effects when bound to its different receptors, A and B. When bound to receptor A, endothelin-1 leads to vasoconstriction and increased pulmonary vascular resistance. In contrast, as seen in rat models of HPS, binding of endothelin-1 to receptor B leads to upregulation of endogenous nitric oxide synthetase and increased nitric oxide production, resulting in pulmonary vasodilation. The susceptibility to ET1 may differ during the course of the disease and the overexpression of a specific receptor and differential binding of ET1 to receptor B in HPS and receptor A in PPH may be one mechanism to explain the resolution of HPS and subsequent development of PPHTN. In addition, one of our patients was given garlic during his HPS course because of its potential benefit. In 1994, Nagae et al. hypothesized that garlic inhibits NO synthesis in macrophages, resulting in a decreased concentration of nitric oxide, therefore decreasing vasodilation. However, a rat study by Ku et al. reported that garlic and its active metabolite allicin induce endothelium-and nitric oxide-dependent relaxation in rat pulmonary arteries. In a clinical study showing the benefit of garlic in HPS, Abrams and Fallon conjectured that garlic results in more uniform vasodilation within the lungs, with improvements in V/Q mismatch in the apical and mid lung fields. This improvement in V/Q mismatch may ultimately decrease NO production resulting in decreased pulmonary vasodilation and the improvement of HPS and its associated hypoxemia. Whether garlic therapy contributes to the subsequent development of PPHTN remains unknown at this time. To our knowledge, this is the largest case series reported of patients with clinically significant severe HPS with subsequent resolution of their HPS and hypoxemia with conversion to significant PPHTN. In every case, it changed the patients' eligibility, status, and treatment plan prior to LT. It is extremely important to be aware of this phenomenon so that patients who have HPS are still continuously monitored for signs and symptoms of PPHTN. At our center, we continue routine screening of these patients with transthoracic echocardiograms annually. Ultimately LT has been shown to lead to resolution of both pulmonary vascular complications of liver disease but the timing is extremely crucial in both situations with LT proven to be high risk in patients with HPS and a PaO2 < 50 mmHg and in patients with PPHTN with a mPAP > 35 mmHg.
/* pid_t is short on BSDI, so don't try to promote it. */ static int resuse_end(pid_t pid, resource_t * resp) { int status; pid_t caught; while ((caught = wait3(&status, 0, &resp->ru)) != pid) { if (caught == -1) return 0; } gettimeofday(&resp->elapsed, (struct timezone *) 0); resp->elapsed.tv_sec -= resp->start.tv_sec; if (resp->elapsed.tv_usec < resp->start.tv_usec) { resp->elapsed.tv_usec += 1000000; --resp->elapsed.tv_sec; } resp->elapsed.tv_usec -= resp->start.tv_usec; resp->waitstatus = status; return 1; }
Israeli jets have attacked a Syrian government anti-aircraft missile launcher after it fired on its aircraft patrolling in Lebanese air space on a photographic reconnaissance mission, the Israeli military said. The incident occurred on Monday morning, according to an Israeli military spokesman, who said it was the first time Israeli aircraft had been targeted by Syrian forces while flying over Lebanon since the Syrian war began. He added that the aircraft were flying inside Lebanon but close to the Syrian border when the missile was fired at them. According to the spokesman, the missile – an SA5 surface-to-air rocket – failed to hit its target, and the anti-aircraft battery located 30 miles from Damascus was then hit by separate Israeli jets, “incapacitating” the launcher with four strikes. There was no information on any casualties. The missile launch is the second time this year Israeli jets have been engaged by Syrian anti-aircraft missiles, with the rocket fired in the previous incident flying into Israel. According to Israel, the same battery that fired on Monday was also involved in that incident. The exchange of fire came as Sergei Shoigu, the defence minister of Russia – a key ally of Bashar al-Assad’s Syrian regime – was due to arrive in Israel for talks with the Israeli prime minister, Benjamin Netanyahu. Netanyahu and other senior Israeli officials are said to want to raise the issue of what they claim is Iran’s growing presence in Syria as well as weapons transfers by Tehran to the Lebanese armed group Hezbollah, a key ally of the Assad regime. The Israeli military said Russia was informed in “real time” about the incident and the subsequent retaliation in line with an Israeli-Russian arrangement. “The Syrian regime is responsible for any firing from its territory. We see this incident as a clear provocation and we will not allow it. If anti-aircraft fire is being carried out for any military activity, we will respond as we did now,” said the Israeli military spokesman. The Israeli admission that it carried out the strikes on the launcher is unusual in that it rarely comments on operations in Syria, where it has reportedly carried out hundreds of strikes against targets associated with Hezbollah, which has been fighting for the Assad regime. In September, the Israeli military hit a base in Syria that has been associated with the Assad regime’s chemical weapons infrastructure and where Hezbollah reportedly stored missiles. • This article was amended on 17 October 2017. An earlier version said Hezbollah had been fighting the Assad regime. This has been corrected to fighting for the Assad regime.
NADPH oxidase of guinea-pig macrophages catalyses the reduction of ubiquinone-1 under anaerobic conditions. The stimulation-specific NADPH-dependent reduction of ubiquinone-1 (Q-1) in guinea-pig macrophages was studied. The activity was due neither to any modified product of the phagocytosis-specific NADPH oxidase nor to non-specific diaphorases of the cells, since the activity was measured in sonicated or detergent-disrupted cells by subtracting the activity in the resting cells from that in cells activated by phorbol 12-myristate 13-acetate. The activity was not mediated by superoxide anions, since strict anaerobic conditions were employed. The anaerobic reduction of Q-1 was NADPH-specific, like superoxide formation under aerobic conditions, and its maximal velocity was also essentially the same as that of superoxide formation. The oxidase does not directly reduce Q-1 under aerobic conditions , and the electron transfer from NADPH to cytochrome c by the oxidase under aerobic conditions was not enhanced by the addition of Q-1. The observations indicate that the phagocytosis-specific NADPH oxidase reduces Q-1 and that oxygen competes with the reduction of Q-1. Q-1 seems to accept electrons not from the intermediary electron carriers of the oxidase but from the terminal oxygen-reducing site of the enzyme.
Effect of an allergy prevention programme on incidence of atopic symptoms in infancy A total of 105 highrisk infants born in 1988 were studied prospectively from birth to 18 months of age. The infants were recommended breastfeeding and/or hypoallergenic formula (Nutramigen or Profylac) combined with avoidance of solid foods during the first 6 months of life. All mothers had unrestricted diet. Avoidance of daily exposure to tobacco smoke, furred pets and dustcollecting materials in the bedroom were advised. This prevention group was compared with a control group consisting of 54 identically defined highrisk infants born in 1985 in the same area. All infants had either severe single atopic predisposition combined with cord blood IgE ≥ 0.5 KU/1 or biparental atopic predisposition. The control group had unrestricted diet and was not advised about environmental factors. Apart from the prevention programme and year of birth the prevention group and the control group were comparable. The parents were highly motivated and compliance was good. The rate of participation was 97%, and 85% followed the dietary measures strictly. The cumulative prevalence of atopic symptoms was significantly lower at 18 months in the prevention group (32%), as compared with the control group (74%) (p<0.01), due to reduced prevalence of recurrent wheezing (13%, versus 37%; p<0.01), atopic dermatitis (14% versus 31%; p<0.01), vomiting/diarrhoea (5% versus 20%; p<0.01) and infantile colic (9% versus 24 %; p<0.01). The cumulative prevalence of food allergy was significantly lower in the prevention group (6% versus 17%; p<0.05). In both highrisk groups daily exposure to tobacco smoke increased the risk of recurrent wheezing significantly (p<0.01). The main difference between the prevention group and the control group was the diet. Thus, feeding with breastmilk and/or hypoallergenic formula combined with avoidance of solid foods until the age of 6 months appeared to reduce the cumulative prevalence of atopic symptoms during the first 18 months of life.
Health care economics is changing--the law is sure to follow. Law is intimately related to economics. As the economic relationships in a market change, the legal landscape evolves accordingly. Even if no health care reform is enacted at the federal level, ever-increasing portions of today's managed indemnity sector will convert to plans constraining enrollee choice and seeking to deliver cost-effective care through risk-sharing relationships (both corporate and contractual) with providers. This is inevitable, given employer and federal government pricing demands, and it is changing the face of health care law. If federal reform is enacted and/or the systems adopted in Minnesota, Maryland, Washington, and Florida (to name a few) are replicated elsewhere, the legal concerns of physicians and other providers will shift even more dramatically. In this article, some of the legal fall-out from these economic developments is discussed.
Oracle's decision in March to stop developing software for Intel's Itanium chips is in violation of "legally-binding commitments" Oracle has made to Hewlett-Packard and the companies' approximately 40,000 shared customers, HP said Wednesday. HP has sent Oracle a formal legal demand to reverse its decision. In a statement, HP hinted that a lawsuit could come next if Oracle doesn't meet its demands. "HP believes that Oracle is legally obligated to continue to offer its software product suite on the Itanium platform and we will take whatever legal actions are available to us necessary to protect our customers' best interests and the significant investments they have made," the company said. Oracle's decision represents an illegal attempt to force customers running Itanium-based HP servers over to its own hardware platforms, HP said. HP spokesman Bill Wohl declined to provide additional details of the legal agreements between Oracle and HP, saying they are "steeped in confidentiality." Oracle spokeswoman Deborah Hellinger declined to comment. While a number of other vendors, including Microsoft and Red Hat, had already stopped developing for Itanium, Oracle's move nonetheless left some HP customers grappling with long-term decisions around their hardware platforms. "This is a very interesting move on HP's part," said Dan Olds, principal analyst at Gabriel Consulting Group. "We're finally seeing another shoe drop." There are some potential reasons for HP taking a couple months to reveal the existence of a legal agreement with Oracle, Olds said. "I'd imagine that they'd want to get their ducks in a row on the legal side before taking this step," he said. "I would also think that HP has also probably tried to talk to Oracle privately about it before taking this step. But this signals a breakdown in negotiations and the start of the legal war," Olds said.
Q: Did either of the other two 'unforgiveable curses' get used during the course of the seven books? We see a lot of Avada Kadavra being thrown around by Death Eaters, and we know that Neville's parents suffered the curses personally, but besides a rather gruesome demonstration on a spider, I don't recall the two other unforgiveable curses being put to much use in the books or movies; though admittedly I only saw the movie version of anything past "Goblet of Fire" (I wasn't much into the angst Harry was going through from Order of the Phoenix and onward). Focusing on the books, were the other two unforgiveable curses ever used on someone in-canon? Not just a reference to a past use, but one that happens to a character in the time of the war against Voldemort and Harry's attendance at Hogwarts? A: Yes, on both counts. (Spoilers for post-GoF) Cruciatus curse The Cruciatus curse gets used by Harry on Bellatrix Lestrange, as she flees the Department of Mysteries in Order of the Phoenix: Hatred rose in Harry such as he had never known before; he flung himself out from behind the fountain and bellowed, “Crucio!” Bellatrix screamed: the spell had knocked her off her feet, but she did not writhe and shriek with pain as Neville had - she was already back on her feet, breathless, no longer laughing. Harry dodged behind the golden fountain again. Her counter-spell hit the head of the handsome wizard, which was blown off and landed twenty feet away, gouging long scratches into the wooden floor. “Never used an Unforgivable Curse before, have you, boy?” she yelled. She had abandoned her baby voice now. “You need to mean them, Potter! You need to really want to cause pain – to enjoy it – righteous anger won’t hurt me for long – I’ll show you how it is done, shall I? I’ll give you a lesson—” This is after Bellatrix has killed Sirius, Harry’s only remaining family member, so he’s understandably angry. If that doesn’t count, then Bellatrix also uses it on Neville in the same fight: Bellatrix raised her wand. “Crucio!” Neville screamed, his legs drawn up to his chest so that the Death Eater holding him was momentarily holding him off the ground. The Death Eater dropped him and he fell to the floor, twitching and screaming in agony. Imperius curse The Imperius curse is used (also by Harry) when the trio break into Gringotts bank. At the time, one of the goblins is about to blow their cover, so Harry needs to stop him doing so. (At this point, the trio have been branded criminals, and in disguise.) Harry raised the hawthorn wand beneath the cloak, pointed it at the old goblin, and whispered, for the first time in his life, “Imperio!” A curious sensation shot down Harry’s arm, a feeling of tingling warmth that seemed to flow from his mind, down the sinews and veins connecting him to the wand and the curse it had just cast. There are plenty of other instances where the curses are used throughout the books (and films), but hopefully the two examples above are sufficient to show that yes, all three curses were used. A: Also Barty Crouch, SR kept Barty Crouch, JR under imperious curse after breaking him out of Azkaban. Draco Malfoy kept Madame Rosmerta under Imperious when undertaking his "task" to kill Dumbledore. Harry also used the cruciatus on Amycus Carrow (successfully, versus when he attempted it on Bellatrix Lestrange)
Browsing Navigator for Efficient Multimedia Information Retrieval In conventional information retrieval systems, the retrieval function consists of a hunting process and browsing process. By a hunting process a set of data items are selected by the user-specified conditions (Keywords, etc.). Each item in the set is checked by a browsing process. In order to handle multimedia data, it is rather difficult to specify required data only by conditions. We may have a set with many items after the hunting process. Thus the browsing process becomes very much time-consuming. In this paper, we will introduce a concept of browsing navigator which will help to improve the efficiency of browsing process. Major functions of browsing navigator are as follows. For a given set of data items, clustering algorithm is applied by automatically generated or user-specified distance definition. Selection of a representative item in each cluster, so that the navigator can generate overview of the search space. Computation of a set of items which are within some distance from the selected item or a set of items. For each set, the set of keywords which specify the characteristics of the set is computed. The result is used in hunting process and browsing process. The items in the set is mapped into twodimensional or three-dimensional space where items are shown by icons and each distance between items corresponds to their similarity. If a set of keywords is specified in the space, the direction for the search is shown by an arrow in 2-D or 3-D space to help navigation using walk-through functions. Using the browsing navigator, efficiency for browsing multimedia data will be improved. Applications to book data and picture data are also shown in the paper.
<reponame>a-sennov/ALS-Refactored<filename>Source/ALS/Public/State/Structures/AlsLocomotionState.h #pragma once #include "AlsLocomotionState.generated.h" USTRUCT(BlueprintType) struct ALS_API FAlsLocomotionState { GENERATED_BODY() UPROPERTY(EditAnywhere, BlueprintReadWrite) bool bHasInput{false}; UPROPERTY(EditAnywhere, BlueprintReadWrite, Meta = (ClampMin = -180, ClampMax = 180)) float InputYawAngle{0.0f}; UPROPERTY(EditAnywhere, BlueprintReadWrite) bool bHasSpeed{false}; UPROPERTY(EditAnywhere, BlueprintReadWrite, Meta = (ClampMin = 0)) float Speed{0.0f}; UPROPERTY(EditAnywhere, BlueprintReadWrite) FVector Velocity{ForceInit}; UPROPERTY(EditAnywhere, BlueprintReadWrite) FVector PreviousVelocity{ForceInit}; UPROPERTY(EditAnywhere, BlueprintReadWrite, Meta = (ClampMin = -180, ClampMax = 180)) float VelocityYawAngle{0.0f}; UPROPERTY(EditAnywhere, BlueprintReadWrite) bool bMoving{false}; UPROPERTY(EditAnywhere, BlueprintReadWrite) FVector Acceleration{ForceInit}; UPROPERTY(EditAnywhere, BlueprintReadWrite) bool bRotationLocked{false}; UPROPERTY(EditAnywhere, BlueprintReadWrite, Meta = (ClampMin = -180, ClampMax = 180)) float TargetYawAngle{0.0f}; UPROPERTY(EditAnywhere, BlueprintReadWrite, Meta = (ClampMin = -180, ClampMax = 180)) float SmoothTargetYawAngle{0.0f}; UPROPERTY(EditAnywhere, BlueprintReadWrite, Meta = (ClampMin = -180, ClampMax = 180)) float ViewRelativeTargetYawAngle{0.0f}; UPROPERTY(EditAnywhere, BlueprintReadWrite) FVector Location{ForceInit}; UPROPERTY(EditAnywhere, BlueprintReadWrite) FRotator Rotation{ForceInit}; UPROPERTY(EditAnywhere, BlueprintReadWrite, Meta = (ClampMin = 0)) float LastRotationYawSpeedApplyTime; UPROPERTY(EditAnywhere, BlueprintReadWrite) float LastRotationYawSpeed; };
// Copyright (c) SimpleStaking, Viable Systems and Tezedge Contributors // SPDX-License-Identifier: MIT //! Tezos binary data writer. pub type BinaryWriterError = crate::enc::BinError;
package com.zy.player; /** * Created by 周阳 * On 2019/01/6 16:17 */ public interface PlayerActionUser extends PlayerAction { int ON_CLICK_START_THUMB = 101; int ON_CLICK_BLANK = 102; int ON_CLICK_START_WIFIDIALOG = 103; }
<gh_stars>1-10 package api import ( "context" "math" "sync" "github.com/google/go-github/v28/github" ) const ( PerPage = 100 ) type Counter struct { n int m sync.Mutex } func (c *Counter) Increment() { c.m.Lock() c.n++ c.m.Unlock() } func (c *Counter) Num() int { return c.n } type PagenationResult struct { i interface{} r *github.Response e error } func (pr *PagenationResult) Interface() interface{} { return pr.i } func (pr *PagenationResult) Response() *github.Response { return pr.r } func (pr *PagenationResult) Error() error { return pr.e } type Pagenation struct { ch chan *PagenationResult wg *sync.WaitGroup cnt Counter } func (p *Pagenation) Request(ctx context.Context, callback func(opt *github.ListOptions) (interface{}, *github.Response, error)) { p.RequestWithLimit(ctx, math.MaxInt64, callback) } func (p *Pagenation) RequestWithLimit(ctx context.Context, maxPage int, callback func(opt *github.ListOptions) (interface{}, *github.Response, error)) { p.cnt.Increment() go func() { o := &github.ListOptions{ Page: 0, PerPage: PerPage, } data, resp, err := callback(o) p.ch <- &PagenationResult{data, resp, err} if err != nil { return } lastPage := resp.LastPage if lastPage > maxPage { lastPage = maxPage } for i := 1; i < lastPage; i++ { p.cnt.Increment() go func(page int) { o.Page = page data, resp, err := callback(o) p.ch <- &PagenationResult{data, resp, err} }(i) } }() } func (p *Pagenation) Done() <-chan *PagenationResult { return p.ch } func (p *Pagenation) RequestedNum() int { return p.cnt.Num() } func NewPagenation() *Pagenation { return &Pagenation{ ch: make(chan *PagenationResult), wg: new(sync.WaitGroup), cnt: Counter{ n: 0, m: sync.Mutex{}, }, } }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // 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 // // Copyright (c) Microsoft Corporation. All rights reserved. // Implementation for STM32F4: Copyright (c) Oberon microsystems, Inc. // // *** USB OTG Full Speed Device Mode Driver *** // //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #include <tinyhal.h> #include <pal\com\usb\USB.h> #ifdef STM32F4XX #include "..\stm32f4xx.h" #else #include "..\stm32f2xx.h" #endif #include <usb_def.h> #define USB_Debug(s) #ifdef DEBUG #define _ASSERT(x) ASSERT(x) #else #define _ASSERT(x) #endif #if !defined(STM32F4_USB_FS_USE_ID_PIN) #define STM32F4_USB_FS_USE_ID_PIN 0 #endif #if !defined(STM32F4_USB_FS_USE_VB_PIN) #define STM32F4_USB_FS_USE_VB_PIN 0 #endif #if !defined(STM32F4_USB_HS_USE_ID_PIN) #define STM32F4_USB_HS_USE_ID_PIN 0 #endif #if !defined(STM32F4_USB_HS_USE_VB_PIN) #define STM32F4_USB_HS_USE_VB_PIN 0 #endif #define MAX_EP0_SIZE 64 // maximum control channel packet size #define DEF_EP0_SIZE 8 // default control channel packet size #define STM32F4_Num_EP_FS 4 // OTG FS supports 4 endpoints #define STM32F4_Num_EP_HS 6 // OTG FS supports 6 endpoints #if TOTAL_USB_CONTROLLER == 2 // USB OTG Full Speed is controller 0 // USB OTG High Speed is controller 1 #define STM32F4_USB_REGS(c) (c ? OTG_HS : OTG_FS) #define STM32F4_USB_IS_HS(c) c #define STM32F4_USB_IDX(c) c #define STM32F4_USB_FS_IDX 0 #define STM32F4_USB_HS_IDX 1 #define STM32F4_USB_DM_PIN(c) (c ? 30 : 11) // B14,A11 #define STM32F4_USB_DP_PIN(c) (c ? 31 : 12) // B15,A12 #define STM32F4_USB_VB_PIN(c) (c ? 29 : 9) // B13,A9 #define STM32F4_USB_ID_PIN(c) (c ? 28 : 10) // B12,A10 #define STM32F4_USB_USE_ID_PIN(c) (c ? STM32F4_USB_HS_USE_ID_PIN : STM32F4_USB_FS_USE_ID_PIN) #define STM32F4_USB_USE_VB_PIN(c) (c ? STM32F4_USB_HS_USE_VB_PIN : STM32F4_USB_FS_USE_VB_PIN) #define STM32F4_USB_ALT_MODE(c) (GPIO_ALT_MODE)(c ? 0xC2 : 0xA2) // AF12,AF10 #if USB_MAX_QUEUES <= STM32F4_Num_EP_FS #define USB_MAX_EP(c) USB_MAX_QUEUES #define USB_MAX_BUFFERS (2 * USB_MAX_QUEUES - 2) #elif USB_MAX_QUEUES <= STM32F4_Num_EP_HS #define USB_MAX_EP(c) (c ? USB_MAX_QUEUES : STM32F4_Num_EP_FS) #define USB_MAX_BUFFERS (USB_MAX_QUEUES + STM32F4_Num_EP_FS - 2) #else #define USB_MAX_EP(c) (c ? STM32F4_Num_EP_HS : STM32F4_Num_EP_FS) #define USB_MAX_BUFFERS (STM32F4_Num_EP_HS + STM32F4_Num_EP_FS - 2) #endif #elif defined(STM32F4_USB_HS) // use USB OTG High Speed #define STM32F4_USB_REGS(c) OTG_HS #define STM32F4_USB_IS_HS(c) TRUE #define STM32F4_USB_IDX(c) 0 #define STM32F4_USB_FS_IDX 0 #define STM32F4_USB_HS_IDX 0 #define STM32F4_USB_DM_PIN(c) 30 // B14 #define STM32F4_USB_DP_PIN(c) 31 // B15 #define STM32F4_USB_VB_PIN(c) 29 // B13 #define STM32F4_USB_ID_PIN(c) 28 // B12 #define STM32F4_USB_USE_ID_PIN(c) STM32F4_USB_HS_USE_ID_PIN #define STM32F4_USB_USE_VB_PIN(c) STM32F4_USB_HS_USE_VB_PIN #define STM32F4_USB_ALT_MODE(c) (GPIO_ALT_MODE)0xC2; // AF12 #if USB_MAX_QUEUES <= STM32F4_Num_EP_HS #define USB_MAX_EP(c) USB_MAX_QUEUES #define USB_MAX_BUFFERS (USB_MAX_QUEUES - 1) #else #define USB_MAX_EP(c) STM32F4_Num_EP_HS #define USB_MAX_BUFFERS (STM32F4_Num_EP_HS - 1) #endif #else // use OTG Full Speed #define STM32F4_USB_REGS(c) OTG_FS #define STM32F4_USB_IS_HS(c) FALSE #define STM32F4_USB_IDX(c) 0 #define STM32F4_USB_FS_IDX 0 #define STM32F4_USB_HS_IDX 0 #define STM32F4_USB_DM_PIN(c) 11 // A11 #define STM32F4_USB_DP_PIN(c) 12 // A12 #define STM32F4_USB_VB_PIN(c) 9 // A9 #define STM32F4_USB_ID_PIN(c) 10 // A10 #define STM32F4_USB_USE_ID_PIN(c) STM32F4_USB_FS_USE_ID_PIN #define STM32F4_USB_USE_VB_PIN(c) STM32F4_USB_FS_USE_VB_PIN #define STM32F4_USB_ALT_MODE(c) (GPIO_ALT_MODE)0xA2; // AF10 #if USB_MAX_QUEUES <= STM32F4_Num_EP_FS #define USB_MAX_EP(c) USB_MAX_QUEUES #define USB_MAX_BUFFERS (USB_MAX_QUEUES - 1) #else #define USB_MAX_EP(c) STM32F4_Num_EP_FS #define USB_MAX_BUFFERS (STM32F4_Num_EP_FS - 1) #endif #endif // FIFO sizes (in 32 bit words) #define USB_RXFIFO_SIZE 64 // 256 bytes #define USB_TX0FIFO_SIZE 64 // 256 bytes #define USB_TXnFIFO_SIZE 64 // 256 bytes // PHY turnaround time // (4 AHB clocks + 1 Phy clock in Phy clocks) #define STM32F4_USB_TRDT ((4 * 48000000 - 1) / SYSTEM_CYCLE_CLOCK_HZ + 2) // State variables for one controller typedef struct { USB_CONTROLLER_STATE state; UINT8 ep0Buffer[MAX_EP0_SIZE]; UINT16 endpointStatus[USB_MAX_QUEUES]; UINT16 EP_Type; UINT8 previousDeviceState; BOOL pinsProtected; } STM32F4_USB_STATE; /* State variables for the controllers */ static STM32F4_USB_STATE STM32F4_USB_ControllerState[TOTAL_USB_CONTROLLER]; /* Queues for all data endpoints */ Hal_Queue_KnownSize<USB_PACKET64,USB_QUEUE_PACKET_COUNT> QueueBuffers[USB_MAX_BUFFERS]; /* * Suspend Event Interrupt Handler */ void STM32F4_USB_Driver_SuspendEvent (OTG_TypeDef* OTG, USB_CONTROLLER_STATE* State) { // SUSPEND event only happened when Host(PC) set the device to SUSPEND // as there is always SOF every 1ms on the BUS to keep the device from // suspending. Therefore, the REMOTE wake up is not necessary at the device side USB_Debug("S"); ((STM32F4_USB_STATE*)State)->previousDeviceState = State->DeviceState; State->DeviceState = USB_DEVICE_STATE_SUSPENDED; USB_StateCallback( State ); } /* * Resume Event Interrupt Handler */ void STM32F4_USB_Driver_ResumeEvent (OTG_TypeDef* OTG, USB_CONTROLLER_STATE* State) { USB_Debug("R"); OTG->DCTL &= ~OTG_DCTL_RWUSIG; // remove remote wakeup signaling State->DeviceState = ((STM32F4_USB_STATE*)State)->previousDeviceState; USB_StateCallback( State ); } /* * Reset Event Interrupt Handler */ void STM32F4_USB_Driver_ResetEvent (OTG_TypeDef* OTG, USB_CONTROLLER_STATE* State) { USB_Debug("!"); // reset interrupts and FIFOs OTG->GINTSTS = 0xFFFFFFFF; // clear global interrupts OTG->GRXFSIZ = USB_RXFIFO_SIZE; // Rx Fifo OTG->DIEPTXF0 = (USB_TX0FIFO_SIZE << 16) | USB_RXFIFO_SIZE; // Tx Fifo 0 UINT32 addr = USB_RXFIFO_SIZE + USB_TX0FIFO_SIZE; for (int i = 0; i < State->EndpointCount; i++) { OTG->DIEPTXF[i] = (USB_TXnFIFO_SIZE << 16) | addr; // Tx Fifo i addr += USB_TXnFIFO_SIZE; OTG->DIEP[i].INT = 0xFF; // clear endpoint interrupts OTG->DOEP[i].INT = 0xFF; OTG->DIEP[i].CTL = OTG_DIEPCTL_EPDIS; // deactivate endpoint OTG->DOEP[i].CTL = OTG_DOEPCTL_EPDIS; } // flush FIFOs OTG->GRSTCTL = OTG_GRSTCTL_RXFFLSH | OTG_GRSTCTL_TXFFLSH | OTG_GRSTCTL_TXF_ALL; // configure control endpoint OTG->DIEP[0].CTL = OTG_DIEPCTL_USBAEP; // Tx FIFO num = 0, max packet size = 64 OTG->DOEP[0].CTL = OTG_DOEPCTL_USBAEP; OTG->DIEP[0].TSIZ = 0; OTG->DOEP[0].TSIZ = OTG_DOEPTSIZ_STUPCNT; // up to 3 setup packets // configure data endpoints UINT32 intMask = 0x00010001; // ep0 interrupts; UINT32 eptype = ((STM32F4_USB_STATE*)State)->EP_Type >> 2; // endpoint types (2 bits / endpoint) UINT32 i = 1, bit = 2; while (eptype) { UINT32 type = eptype & 3; if (type != 0) { // data endpoint UINT32 ctrl = OTG_DIEPCTL_SD0PID | OTG_DIEPCTL_USBAEP; ctrl |= type << 18; // endpoint type ctrl |= State->MaxPacketSize[i]; // packet size if (State->IsTxQueue[i]) { // Tx (in) endpoint ctrl |= OTG_DIEPCTL_SNAK; // disable tx endpoint ctrl |= i << 22; // Tx FIFO number OTG->DIEP[i].CTL = ctrl; // configure in endpoint intMask |= bit; // enable in interrupt } else { // Rx (out) endpoint // Rx endpoints must be enabled here // Enabling after Set_Configuration does not work correctly OTG->DOEP[i].TSIZ = OTG_DOEPTSIZ_PKTCNT_1 | State->MaxPacketSize[i]; ctrl |= OTG_DOEPCTL_EPENA | OTG_DOEPCTL_CNAK; // enable rx endpoint OTG->DOEP[i].CTL = ctrl; // configure out endpoint intMask |= bit << 16; // enable out interrupt } } i++; eptype >>= 2; bit <<= 1; } // enable interrupts OTG->DIEPMSK = OTG_DIEPMSK_XFRCM; // transfer complete OTG->DOEPMSK = OTG_DOEPMSK_XFRCM | OTG_DOEPMSK_STUPM; // setup stage done OTG->DAINTMSK = intMask; // enable ep interrupts OTG->GINTMSK = OTG_GINTMSK_OEPINT | OTG_GINTMSK_IEPINT | OTG_GINTMSK_RXFLVLM | OTG_GINTMSK_USBRST | OTG_GINTMSK_USBSUSPM | OTG_GINTMSK_WUIM; OTG->DCFG &= ~OTG_DCFG_DAD; // reset device address /* clear all flags */ USB_ClearEvent(0, USB_EVENT_ALL); State->FirstGetDescriptor = TRUE; State->DeviceState = USB_DEVICE_STATE_DEFAULT; State->Address = 0; USB_StateCallback( State ); } /* * Data Endpoint Rx Interrupt Handler */ void STM32F4_USB_Driver_EP_RX_Int (OTG_TypeDef* OTG, USB_CONTROLLER_STATE* State, UINT32 ep, UINT32 count) { ASSERT_IRQ_MUST_BE_OFF(); UINT32* pd; if (ep == 0) { // control endpoint USB_Debug(count ? "c" : "0"); pd = (UINT32*)((STM32F4_USB_STATE*)State)->ep0Buffer; State->Data = (BYTE*)pd; State->DataSize = count; } else { // data endpoint USB_Debug("r"); BOOL full; USB_PACKET64* Packet64 = USB_RxEnqueue( State, ep, full ); if (Packet64 == NULL) { // should not happen USB_Debug("?"); _ASSERT(0); } pd = (UINT32*)Packet64->Buffer; Packet64->Size = count; } // read data volatile UINT32* ps = OTG->DFIFO[ep]; for (int c = count; c > 0; c -= 4) { *pd++ = *ps; } // data handling & Rx reenabling delayed to transfer completed interrupt } /* * Data In (Tx) Endpoint Interrupt Handler */ void STM32F4_USB_Driver_EP_In_Int (OTG_TypeDef* OTG, USB_CONTROLLER_STATE* State, UINT32 ep) { ASSERT_IRQ_MUST_BE_OFF(); UINT32 bits = OTG->DIEP[ep].INT; if (bits & OTG_DIEPINT_XFRC) { // transfer completed USB_Debug("3"); OTG->DIEP[ep].INT = OTG_DIEPINT_XFRC; // clear interrupt } if (!(OTG->DIEP[ep].CTL & OTG_DIEPCTL_EPENA)) { // Tx idle UINT32* ps = NULL; UINT32 count; if (ep == 0) { // control endpoint if (State->DataCallback) { // data to send State->DataCallback( State ); // this call can't fail ps = (UINT32*)State->Data; count = State->DataSize; USB_Debug(count ? "x" : "n"); } } else if (State->Queues[ep] != NULL && State->IsTxQueue[ep]) { // Tx data endpoint USB_PACKET64* Packet64 = USB_TxDequeue( State, ep, TRUE ); if (Packet64) { // data to send ps = (UINT32*)Packet64->Buffer; count = Packet64->Size; USB_Debug("s"); } } if (ps) { // data to send // enable endpoint OTG->DIEP[ep].TSIZ = OTG_DIEPTSIZ_PKTCNT_1 | count; OTG->DIEP[ep].CTL |= OTG_DIEPCTL_EPENA | OTG_DIEPCTL_CNAK; // write data volatile UINT32* pd = OTG->DFIFO[ep]; for (int c = count; c > 0; c -= 4) { *pd = *ps++; } } else { // no data // disable endpoint OTG->DIEP[ep].CTL |= OTG_DIEPCTL_SNAK; } } } /* * Handle Setup Data Received on Control Endpoint */ void STM32F4_USB_Driver_Handle_Setup (OTG_TypeDef* OTG, USB_CONTROLLER_STATE* State) { /* send last setup packet to the upper layer */ UINT8 result = USB_ControlCallback(State); switch(result) { case USB_STATE_DATA: /* setup packet was handled and the upper layer has data to send */ break; case USB_STATE_ADDRESS: /* upper layer needs us to change the address */ USB_Debug("a"); OTG->DCFG |= State->Address << 4; // set device address break; case USB_STATE_DONE: State->DataCallback = NULL; break; case USB_STATE_STALL: // setup packet failed to process successfully // set stall condition on the control endpoint OTG->DIEP[0].CTL |= OTG_DIEPCTL_STALL; OTG->DOEP[0].CTL |= OTG_DOEPCTL_STALL; USB_Debug("l"); // ********** skip rest of function ********** return; case USB_STATE_STATUS: break; case USB_STATE_CONFIGURATION: break; case USB_STATE_REMOTE_WAKEUP: // It is not using currently as the device side won't go into SUSPEND mode unless // the PC is purposely to select it to SUSPEND, as there is always SOF in the bus // to keeping the device from SUSPEND. USB_Debug("w"); break; default: _ASSERT(0); break; } // check ep0 for replies STM32F4_USB_Driver_EP_In_Int(OTG, State, 0); // check all Tx endpoints after configuration setup if (result == USB_STATE_CONFIGURATION) { for (int ep = 1; ep < State->EndpointCount; ep++) { if( State->Queues[ep] && State->IsTxQueue[ep] ) { STM32F4_USB_Driver_EP_In_Int(OTG, State, ep); } } } } /* * Data Out (Rx) Endpoint Interrupt Handler */ void STM32F4_USB_Driver_EP_Out_Int (OTG_TypeDef* OTG, USB_CONTROLLER_STATE* State, UINT32 ep) { ASSERT_IRQ_MUST_BE_OFF(); UINT32 bits = OTG->DOEP[ep].INT; if (bits & OTG_DOEPINT_XFRC) { // transfer completed USB_Debug("1"); OTG->DOEP[ep].INT = OTG_DOEPINT_XFRC; // clear interrupt } if (bits & OTG_DOEPINT_STUP) { // setup phase done USB_Debug("2"); OTG->DOEP[ep].INT = OTG_DOEPINT_STUP; // clear interrupt } if (ep == 0) { // control endpoint USB_Debug("$"); // enable endpoint OTG->DOEP[0].TSIZ = OTG_DOEPTSIZ_STUPCNT | OTG_DOEPTSIZ_PKTCNT_1 | State->PacketSize; OTG->DOEP[0].CTL |= OTG_DOEPCTL_EPENA | OTG_DOEPCTL_CNAK; // Handle Setup data in upper layer STM32F4_USB_Driver_Handle_Setup(OTG, State); } else if (!State->Queues[ep]->IsFull()) { // enable endpoint OTG->DOEP[ep].TSIZ = OTG_DOEPTSIZ_PKTCNT_1 | State->MaxPacketSize[ep]; OTG->DOEP[ep].CTL |= OTG_DOEPCTL_EPENA | OTG_DOEPCTL_CNAK; } else { // disable endpoint OTG->DOEP[ep].CTL |= OTG_DOEPCTL_SNAK; USB_Debug("v"); } } /* * Main Interrupt Handler */ void STM32F4_USB_Driver_Interrupt (OTG_TypeDef* OTG, USB_CONTROLLER_STATE* State) { INTERRUPT_START; UINT32 intPend = OTG->GINTSTS; // get pending bits while (intPend & OTG_GINTSTS_RXFLVL) { // RxFifo non empty UINT32 status = OTG->GRXSTSP; // read and pop status word from fifo int ep = status & OTG_GRXSTSP_EPNUM; int count = (status & OTG_GRXSTSP_BCNT) >> 4; status &= OTG_GRXSTSP_PKTSTS; if (status == OTG_GRXSTSP_PKTSTS_PR // data received || status == OTG_GRXSTSP_PKTSTS_SR) { // setup received STM32F4_USB_Driver_EP_RX_Int(OTG, State, ep, count); } else { // others: nothing to do } intPend = OTG->GINTSTS; // update pending bits } if (intPend & OTG_GINTSTS_IEPINT) { // IN endpoint UINT32 bits = OTG->DAINT & 0xFFFF; // pending IN endpoints int ep = 0; while (bits) { if (bits & 1) STM32F4_USB_Driver_EP_In_Int(OTG, State, ep); ep++; bits >>= 1; } } if (intPend & OTG_GINTSTS_OEPINT) { // OUT endpoint UINT32 bits = OTG->DAINT >> 16; // pending OUT endpoints int ep = 0; while (bits) { if (bits & 1) STM32F4_USB_Driver_EP_Out_Int(OTG, State, ep); ep++; bits >>= 1; } } if (intPend & OTG_GINTSTS_USBRST) { // reset STM32F4_USB_Driver_ResetEvent(OTG, State); OTG->GINTSTS = OTG_GINTSTS_USBRST; // clear interrupt } if (intPend & OTG_GINTSTS_USBSUSP) { // suspend STM32F4_USB_Driver_SuspendEvent(OTG, State); OTG->GINTSTS = OTG_GINTSTS_USBSUSP; // clear interrupt } if (intPend & OTG_GINTSTS_WKUPINT) { // wakeup STM32F4_USB_Driver_ResumeEvent(OTG, State); OTG->GINTSTS = OTG_GINTSTS_WKUPINT; // clear interrupt } INTERRUPT_END; } /* * OTG FS Interrupt Handler */ void STM32F4_USB_Driver_FS_Interrupt (void* param) { STM32F4_USB_Driver_Interrupt(OTG_FS, &STM32F4_USB_ControllerState[STM32F4_USB_FS_IDX].state); } /* * OTG HS Interrupt Handler */ void STM32F4_USB_Driver_HS_Interrupt (void* param) { STM32F4_USB_Driver_Interrupt(OTG_HS, &STM32F4_USB_ControllerState[STM32F4_USB_HS_IDX].state); } USB_CONTROLLER_STATE * CPU_USB_GetState( int Controller ) { if ((UINT32)Controller >= TOTAL_USB_CONTROLLER) return NULL; return &STM32F4_USB_ControllerState[STM32F4_USB_IDX(Controller)].state; } HRESULT CPU_USB_Initialize( int Controller ) { if ((UINT32)Controller >= TOTAL_USB_CONTROLLER) return S_FALSE; // enable USB clock if (STM32F4_USB_IS_HS(Controller)) { // HS on AHB1 RCC->AHB1ENR |= RCC_AHB1ENR_OTGHSEN; } else { // FS on AHB2 RCC->AHB2ENR |= RCC_AHB2ENR_OTGFSEN; } USB_CONTROLLER_STATE *State = &STM32F4_USB_ControllerState[STM32F4_USB_IDX(Controller)].state; OTG_TypeDef* OTG = STM32F4_USB_REGS(Controller); GLOBAL_LOCK(irq); // Detach usb port for a while to enforce re-initialization OTG->DCTL = OTG_DCTL_SDIS; // soft disconnect OTG->GAHBCFG = OTG_GAHBCFG_TXFELVL; // int on TxFifo completely empty, int off OTG->GUSBCFG = OTG_GUSBCFG_FDMOD // force device mode | STM32F4_USB_TRDT << 10 // turnaround time | OTG_GUSBCFG_PHYSEL; // internal PHY OTG->GCCFG = OTG_GCCFG_VBUSBSEN // B device Vbus sensing | OTG_GCCFG_PWRDWN; // transceiver enabled OTG->DCFG |= OTG_DCFG_DSPD; // device speed = HS if (STM32F4_USB_USE_VB_PIN(Controller) == 0) { // no Vbus pin OTG->GCCFG |= OTG_GCCFG_NOVBUSSENS; // disable vbus sense } // setup usb state variables ((STM32F4_USB_STATE*)State)->pinsProtected = TRUE; State->EndpointStatus = ((STM32F4_USB_STATE*)State)->endpointStatus; State->EndpointCount = USB_MAX_EP(Controller); //State->DeviceStatus = USB_STATUS_DEVICE_SELF_POWERED; // get max ep0 packet size from actual configuration const USB_DEVICE_DESCRIPTOR* desc = (USB_DEVICE_DESCRIPTOR*)USB_FindRecord(State, USB_DEVICE_DESCRIPTOR_MARKER, 0); State->PacketSize = desc ? desc->bMaxPacketSize0 : DEF_EP0_SIZE; // use defaults for unused endpoints int idx; for (idx = 1; idx < State->EndpointCount; idx++) { State->IsTxQueue[idx] = FALSE; State->MaxPacketSize[idx] = USB_MAX_DATA_PACKET_SIZE; // 64 } UINT32 epType = 0; // set all endpoints to unused UINT32 queueIdx = STM32F4_USB_IDX(Controller) ? USB_MAX_EP(0) - 1 : 0; // first queue buffer // get endpoint configuration const USB_ENDPOINT_DESCRIPTOR *ep = NULL; const USB_INTERFACE_DESCRIPTOR *itfc = NULL; while( USB_NextEndpoint( State, ep, itfc) ) { // Figure out which endpoint we are initializing idx = ep->bEndpointAddress & 0x7F; // Check interface and endpoint numbers against hardware capability if( idx >= State->EndpointCount || itfc->bInterfaceNumber > 3 ) return S_FALSE; if (ep->bEndpointAddress & 0x80) State->IsTxQueue[idx] = TRUE; // Set the maximum size of the endpoint hardware FIFO int endpointSize = ep->wMaxPacketSize; // If the endpoint maximum size in the configuration list is bogus if( endpointSize != 8 && endpointSize != 16 && endpointSize != 32 && endpointSize != 64 ) return S_FALSE; State->MaxPacketSize[idx] = endpointSize; // assign queues QueueBuffers[queueIdx].Initialize(); // Clear queue before use State->Queues[idx] = &QueueBuffers[queueIdx]; // Attach queue to endpoint queueIdx++; // ***************************************** // iso endpoints are currently not supported // ***************************************** if ((ep->bmAttributes & 3) == USB_ENDPOINT_ATTRIBUTE_ISOCHRONOUS) return FALSE; // remember endpoint types epType |= (ep->bmAttributes & 3) << (idx * 2); } // If no endpoints were initialized, something is seriously wrong with the configuration list if (epType == 0) return S_FALSE; ((STM32F4_USB_STATE*)State)->EP_Type = epType; HAL_Time_Sleep_MicroSeconds(1000); // asure host recognizes reattach // setup hardware CPU_USB_ProtectPins(Controller, FALSE); if (STM32F4_USB_IS_HS(Controller)) { // HS CPU_INTC_ActivateInterrupt(OTG_HS_IRQn, STM32F4_USB_Driver_HS_Interrupt, 0); CPU_INTC_ActivateInterrupt(OTG_HS_WKUP_IRQn, STM32F4_USB_Driver_HS_Interrupt, 0); } else { // FS CPU_INTC_ActivateInterrupt(OTG_FS_IRQn, STM32F4_USB_Driver_FS_Interrupt, 0); CPU_INTC_ActivateInterrupt(OTG_FS_WKUP_IRQn, STM32F4_USB_Driver_FS_Interrupt, 0); } // allow interrupts OTG->GINTSTS = 0xFFFFFFFF; // clear all interrupts OTG->GINTMSK = OTG_GINTMSK_USBRST; // enable reset only OTG->DIEPEMPMSK = 0; // disable Tx FIFO empty interrupts OTG->GAHBCFG |= OTG_GAHBCFG_GINTMSK; // gloabl interrupt enable // rest of initializations done in reset interrupt handler USB_Debug("*"); return S_OK; } HRESULT CPU_USB_Uninitialize( int Controller ) { if (STM32F4_USB_IS_HS(Controller)) { // HS CPU_INTC_DeactivateInterrupt(OTG_HS_WKUP_IRQn); CPU_INTC_DeactivateInterrupt(OTG_HS_IRQn); } else { // FS CPU_INTC_DeactivateInterrupt(OTG_FS_WKUP_IRQn); CPU_INTC_DeactivateInterrupt(OTG_FS_IRQn); } CPU_USB_ProtectPins(Controller, TRUE); // disable USB clock if (STM32F4_USB_IS_HS(Controller)) { // HS on AHB1 RCC->AHB1ENR &= ~RCC_AHB1ENR_OTGHSEN; } else { // FS on AHB2 RCC->AHB2ENR &= ~RCC_AHB2ENR_OTGFSEN; } return S_OK; } BOOL CPU_USB_StartOutput( USB_CONTROLLER_STATE* State, int ep ) { if (State == NULL || ep >= State->EndpointCount) return FALSE; OTG_TypeDef* OTG = STM32F4_USB_REGS(State->ControllerNum); USB_Debug("t"); GLOBAL_LOCK(irq); // If endpoint is not an output if( State->Queues[ep] == NULL || !State->IsTxQueue[ep] ) return FALSE; /* if the halt feature for this endpoint is set, then just clear all the characters */ if (State->EndpointStatus[ep] & USB_STATUS_ENDPOINT_HALT) { while (USB_TxDequeue( State, ep, TRUE ) != NULL); // clear TX queue return TRUE; } if (irq.WasDisabled()) { // check all endpoints for pending actions STM32F4_USB_Driver_Interrupt(OTG, State); } // write first packet if not done yet STM32F4_USB_Driver_EP_In_Int(OTG, State, ep); return TRUE; } BOOL CPU_USB_RxEnable( USB_CONTROLLER_STATE* State, int ep ) { // If this is not a legal Rx queue if( State == NULL || State->Queues[ep] == NULL || State->IsTxQueue[ep] ) return FALSE; OTG_TypeDef* OTG = STM32F4_USB_REGS(State->ControllerNum); USB_Debug("e"); GLOBAL_LOCK(irq); // enable Rx if (!(OTG->DOEP[ep].CTL & OTG_DOEPCTL_EPENA)) { OTG->DOEP[ep].TSIZ = OTG_DOEPTSIZ_PKTCNT_1 | State->MaxPacketSize[ep]; OTG->DOEP[ep].CTL |= OTG_DOEPCTL_EPENA | OTG_DOEPCTL_CNAK; // enable endpoint } return TRUE; } BOOL CPU_USB_GetInterruptState() // Controller missing! { return FALSE; } BOOL CPU_USB_ProtectPins( int Controller, BOOL On ) { USB_CONTROLLER_STATE *State = &STM32F4_USB_ControllerState[STM32F4_USB_IDX(Controller)].state; if (((STM32F4_USB_STATE*)State)->EP_Type == 0) return FALSE; // not yet initialized OTG_TypeDef* OTG = STM32F4_USB_REGS(Controller); GLOBAL_LOCK(irq); if (On) { if (!((STM32F4_USB_STATE*)State)->pinsProtected) { USB_Debug("+"); ((STM32F4_USB_STATE*)State)->pinsProtected = TRUE; // detach usb port OTG->DCTL |= OTG_DCTL_SDIS; // soft disconnect // clear USB Txbuffer for(int ep = 1; ep < State->EndpointCount; ep++) { if (State->Queues[ep] && State->IsTxQueue[ep]) { while (USB_TxDequeue( State, ep, TRUE ) != NULL); // clear TX queue } } State->DeviceState = USB_DEVICE_STATE_DETACHED; USB_StateCallback( State ); } } else { if (((STM32F4_USB_STATE*)State)->pinsProtected) { USB_Debug("-"); ((STM32F4_USB_STATE*)State)->pinsProtected = FALSE; GPIO_ALT_MODE altMode = STM32F4_USB_ALT_MODE(Controller); CPU_GPIO_DisablePin(STM32F4_USB_DM_PIN(Controller), RESISTOR_DISABLED, 0, altMode); CPU_GPIO_DisablePin(STM32F4_USB_DP_PIN(Controller), RESISTOR_DISABLED, 0, altMode); if (STM32F4_USB_USE_ID_PIN(Controller)) { CPU_GPIO_DisablePin(STM32F4_USB_ID_PIN(Controller), RESISTOR_DISABLED, 0, altMode); } // attach usb port OTG->DCTL &= ~OTG_DCTL_SDIS; // remove soft disconnect State->DeviceState = USB_DEVICE_STATE_ATTACHED; USB_StateCallback( State ); } } return TRUE; }
There is a large class of applications that depend upon the ability to localize a model of an object in an image, a task known as xe2x80x9cregistration.xe2x80x9d These applications can be roughly categorized into detection, alignment, and tracking problems. Detection problems involve, for example, finding objects in image databases or finding faces in surveillance video. The model in a detection problem is usually generic, describing a class of objects. For example, in a prior art face detection system, the object model is a neural network template that describes all frontal, upright faces. See Rowley et al., xe2x80x9cNeural network-based face detectionxe2x80x9d, IEEE Transactions on Pattern Analysis and Machine Intelligence, 20(1), pages 23-38, January 1998. Another example is locating armored vehicles in images for a military targeting system. An example of an alignment application is mosaicing, in which a single large image is constructed from a series of smaller overlapping images. In this application, each model is simply an image to be added incrementally to the mosaic. The alignment goal is to position each new image so that it is consistent with the current mosaic wherever the two overlap. A description is given in Irani et al., xe2x80x9cMosaic based representations of video sequences and their applications,xe2x80x9d Proceedings of Int. Conference on Computer Vision, pages 605-611, Cambridge, Mass., 1995. Another example is the alignment of plural images obtained from different sensors, e.g. aligning remote-sensed images obtained via normal and infra-red photography, or aligning MRI and SPECT medical images. This allows different regions of an image to be analyzed via multimodal (i.e., vector) measurements instead of scalar pixel intensities. These and other applications are further discussed in the survey on image registration, Brown, xe2x80x9cA survey of image registration techniques,xe2x80x9d ACM Computing Surveys, 24(4), pages 325-376, 1992. In tracking applications, the models are typically specific descriptions of an image object that is moving through a video sequence. Examples include tracking people for surveillance or user-interface purposes. In figure tracking for surveillance, a stick-figure model of a person evolves over time, matched to the location of a person in a video sequence. A representative prior method is Cham et al., xe2x80x9cA multiple hypothesis approach to figure tracking,xe2x80x9d Proceedings Computer Vision and Pattern Recognition, pages 239-245, Fort Collins, Colo., 1999. In user-interface applications, the user""s gaze direction or head pose may be tracked to determine their focus-of-attention. A prior method is described in Oliver et al., xe2x80x9cLAFTER: Lips and face real time tracker,xe2x80x9d Proceedings Computer Vision and Pattern Recognition, pages 123-129, San Juan, PR, Jun. 17-19, 1997. In each of these application areas, there is a desire to handle increasingly sophisticated object models, which is fueled by the increasing demand for sensing technologies. For example, modern user interfaces may be based on tracking the full-body pose of a user to facilitate gesture recognition. As the complexity of the model increases, the computational cost of registration rises dramatically. A naive registration method such as exhaustive search would result in a slow, inefficient system for a complex object like the human figure. However a fast and reliable solution would support advanced applications in content-based image and video editing and retrieval, surveillance, advanced user-interfaces, and military targeting systems. Therefore, there is a need for a registration method which is computationally efficient in the presence of complex object models. There are many situations when different models are used for registering the same object. For example, an image indexing engine may register objects in images with different models using different feature sets such as color or outline shape depending on the query. Another example would be a visual surveillance network which tracks a person in multiple cameras, using separate full-body kinematic models in each camera view. A simple approach is to register each of the models independently. However, this does not take advantage of the redundancy between the models and additionally suffers from: 1. Reduced Accuracy By failing to exchange information between the processes, registration errors can accumulate independently on the different processes, leading to reduced accuracies for all model states; 2. Discrepancies Between Model States Independent registration also results in the violation of inherent constraints between model states. For example, tracking a single object using independent sensors may result in the sensors reporting very different positions for the object after some elapsed time. This may result from one of the sensors being distracted at an earlier instant by outlier noise such as background clutter. If the constraint of common position were enforced, tracking would be more robust as errors are resolved earlier; and 3. Poor Efficiency The overall registration is only as fast as the slowest process. Hence if one of the processes is inefficient due to its features having high matching ambiguities, the overall registration speed is reduced. As an example, consider tracking a human using separate processes in separate cameras in a stereo setup. If the person moves partially out of the field-of-view of one of the cameras, the associated tracking process may be significantly slower if for example only the smaller features such as the arms or legs are visible. The overall tracking speed is reduced even though the second tracking process which has the full view of the person may be running at full speed. Some methods take advantage of the redundancy by enforcing constraints between the states of the different models. This step typically involves correcting the model states after initial estimates have been made by registering all the features. For example, in the case of tracking, this corrective step is taken each time frame after the registration processes have been completed. While this may resolve problems with reduced accuracies and state discrepancies (i.e. items 1 and 2), it does not improve the poor efficiency as the rate limiting step is still dependent on the slowest registration process. The present invention registers a plurality of object models in at least one image, one feature per model at a time. Until now, sequential feature registration has been done in an order predetermined before any registration begins. The Applicants have found that the process of registration can be optimized by determining a feature registration order dynamically, that is, at the beginning of each registration step, selecting the feature whose registration will be most cost effective and searching for that feature. In addition, only a subset of the models are selected for registration during at each cycle in the registration process. After registering features of the selected object models, the other object models"" states are updated according to inter- and intra-constraints. Accordingly, in a preferred method of registering a plurality of object models in at least one image, where each object model has a plurality of features and is described by a model state, an unregistered feature of each object model is selected such that an associated cost function of a subsequent search is minimized. A subset of the object models is selected responsive to the selected features. For each selected object model, a search is performed for a match of the associated selected model feature to the image or images to register the feature, and the model state is updated accordingly. The model states of some or all of the object models are then updated according to a set of constraints. These steps are repeated until all features have been registered. In one embodiment, the selected unregistered features are ranked according to some criterion, such as the number of operations needed to search for a feature, i.e., the matching ambiguity. Object models are then selected according to the ranking. Preferably, a predetermined number of object models is selected each cycle. In a preferred embodiment, just one object model, the object model having the smallest matching ambiguity among all object models, is selected. Constraints can be intra-model constraints and/or inter-model constraints, and restrict the model states to a shared relationship. Preferably, each search is performed in a region of high probability of a match. The cost function for a feature is based on the feature""s basin of attraction, and in particular can be based on the complexity of the search process at each basin of attraction. A search region can be based on a projected state probability distribution. A search is preferably based on maximizing a comparison function. Selecting and searching are preferably responsive to a propagated state probability distribution. The state probability distribution is projected into feature space. For each unregistered feature, the number of search operations required to find a match with at least a predetermined probability is determined, and the feature requiring a least number of search operations is selected. The number of required search operations is determined by first finding search regions within a feature space, where each region has an associated probability density which exceeds some predetermined threshold. A total probability is then formed by summing the probabilities associated with each of the found search regions. If the total probability is less than the predetermined probability, the threshold is lowered and new regions are found and the probabilities summed. This process repeats until the total probability is greater or equal to the predetermined probability. Finally, the number of required search operations is computed, based on the found search regions. Searching can comprise feature-to-feature matching. In this case, the number of search operations is preferably the number of target features located within each search region. The number of target features located within the search region can be based on Mahalanobis distances to potential target features. In a preferred embodiment, target features are approximately uniformly distributed, and the number of features is proportional to the search region""s size. Thus, the features can be ranked according to the sizes of the associated search regions. Alternatively, searching can comprise feature-to-image matching. Here, the number of required search operations is computed, for each search region, by first dividing the region into minimally-overlapping volumes which have the same size and shape as a basin of attraction associated with the feature, and then by counting the number of volumes required to cover the regions. In some embodiments, feature-to-feature matching can be employed for some object models while feature-to-image matching is employed for other object models. In a preferred embodiment, counting the volumes is approximated by obtaining eigenvalues and eigenvectors to a covariance matrix associated with the feature search region. A basin of attraction span is calculated for each eigenvector direction, and a count is approximated from the eigenvalues and the spans. Model states of the selected object models are updated according to a propagated state probability distribution. Preferably, the propagation of the probability distribution for an object model is based on successive registered features. The proposed invention is thus a framework for integrating a plurality of sequential feature registration processes. The processes have separate model states and sets of features. The framework allows only a subset of the processes to carry out feature search during each feature matching cycle. The processes in this subset are referred to as xe2x80x9coperative processes.xe2x80x9d In a preferred embodiment, there is only one operative process during each cycle. The framework chooses the operative processes by ranking the currently selected features in all processes. The operative processes are associated with the smallest matching ambiguities in the selected features. The framework also enforces any given set of constraints which apply to any model state. This may include constraints which restrict a plurality of model states to some shared relationship. Constraint satisfaction is carried out after the operative processes have completed feature search and state update. All model states are then minimally modified such that the given set of constraints is satisfied. In a preferred embodiment, linear constraints are satisfied via the method of Lagrange multipliers.
/** * Execute this mojo. * * @throws MojoExecutionException in the event of failure */ @Override public final void execute() throws MojoExecutionException, MojoFailureException { final JavaLoggingToMojoLoggingRedirector logRedirector = new JavaLoggingToMojoLoggingRedirector(getLog()); logRedirector.activate(); try { final List<String> classpath; try { classpath = createClasspath(); } catch (final DependencyResolutionException e) { throw new MojoExecutionException("Error getting classpath artifacts", e); } final File target = getTarget(); final Properties config = weaverConfig == null ? new Properties() : weaverConfig; getLog().debug(String.format("classpath=%s%ntarget=%s%nconfig=%s", classpath, target, config)); doExecute(target, classpath, config); } finally { logRedirector.deactivate(); } }
Laleh (singer) Background and personal life Laleh was born in the Northern Iranian harbour town of Bandar-e Anzali, but fled the country a year later with her parents to live in Azerbaijan, and later moving on to Minsk and a refugee camp in Tidaholm. Her given name means "tulip" in Persian. She moved to Sweden when she was nine (she has dual citizenship), and in her teenage years moved to Gothenburg to attend school in the multicultural district of Angered. At Hvitfeldtska High School she was enrolled in the music program, growing up with classical music, ballet and circus music. She was later interested in punk, reggae and jazz music. She also learned to play guitar, and as a teenager formed a jazz ensemble with her music teacher named Bejola. She went on to teach herself to play percussion and saxophone. She is the daughter of Houshang Pourkarim, who died in 1994. An opponent of the Islamic regime in Tehran, he was an artist, journalist and prominent Iranian ethnologist and rural sociologist from Bandar-e Anzali. During her appearance on Så mycket bättre, she discussed her tough childhood, moving from country to country, and how she witnessed her father's death. At a summer camp in 1994, he tried to rescue a woman who had fallen from her canoe into the water. As Houshang paddled out to help her, the canoe overturned. The woman survived but Laleh's father drowned. Laleh's mother, Atef, was a refugee from Georgia via Azerbaijan before she went to Iran to study comparative literature at the University of Tehran. Once the family arrived in Sweden, Laleh learned Swedish in eleven days, according to a media account of her biography. Beginning her career in acting, she had a major role in the Swedish movie Jalla! Jalla!, directed by Josef Fares, which was a big success at the Swedish box office in 2000. Laleh moved to Stockholm in 2010 following a short stint in Skellefteå. Until 2011 she was known for her reluctance to give interviews, but more recently she has been more accessible to the media, including appearing on talk shows and other TV programs, a move that has benefited her career. 2003–2005: Early career and Laleh Laleh began her music career in 2003. She founded her own production and publishing company 'Lost Army' and signed a recording and distribution contract with Warner Music Sweden before recording her first studio album. The sound of her early songs have been compared to adult contemporary artists such as Sting and Seal. She wrote, performed, and produced her self-titled debut, which was released in the spring of 2005 and saw a percentage of the proceeds go to charity. It became the highest selling album of the year with a recorded seventy-one weeks in the top sixty and reached number one on the Swedish chart. Critical praise was heaped on the album upon its release, although some noted that the album was too sprawling and genre-hopping. The first single from the album was "Invisible (My Song)", which peaked at number seven in Sweden in February 2012. Follow-up "Storebror" failed to chart, but next single, "Live Tomorrow" had even greater success than "Invisible" and ended up at the top of Sveriges Radio P3's radio show "Tracks" (Trackslistan) for several weeks. It peaked at number twenty on the Sverigetopplistan and also charted in Denmark. During 2005 she won numerous awards, including at the Swedish Grammis, where she received seven nominations and picked up three wins, including Artist of the Year, Producer of the Year, and New Artist of the Year. She was also nominated four times at the 2006 P3 Guld Awards and won Newcomer of the Year and Best Female Artist. 2006–2010: Prinsessor and Me and Simon In 2006, Prinsessor ("Princesses") was released and peaked at number three on the Swedish album chart. The album stayed on the chart for twenty-nine weeks, but failed to yield any charting singles, despite four releases. Unlike its predecessor which won numerous awards, Prinsessor, was met with mixed reviews from Swedish critics, who saw the album as far too sprawling and sensed a loss of her "uniqueness". After taking a break, Laleh returned to release her third studio album in 2009, Me and Simon. It contained a more folk pop sound than previous rock or soul-tinged tracks which has been attributed to the surroundings of moving from a big city to the northern Swedish town of Skellefteå in 2006. One of the nature reserves in the town was her inspiration for "Bjurö klubb". It was met with mixed to positive reviews by Swedish critics. The first single released from the album "Simon Says" peaked at number forty-one on the Swedish Singles Chart. Due to strong downloads from the album, the first track from the LP, "Big City Love", also charted at number thirty-two. It was later released as a single in May 2009 but failed to return to the chart. Two further releases, "Bjurö klubb" and "Mysteries" failed to chart at the time. During these years, Laleh toured in several Scandinavian countries, Britain and Germany but has previously hinted that she is hesitant to launch overseas, saying she wants to be more prepared and develop fully as an artist. 2011–2012: Så mycket bättre and Sjung In 2011 she took part in the second season of Swedish reality TV show Så mycket bättre (So much better) on TV4. The show puts well-known Swedish musicians up against each other to create new interpretations of the other artists songs. She participated along with Timbuktu, Eva Dahlgren, Lena Philipsson, E-Type, Tomas Ledin and Mikael Wiehe and soon emerged as the favourite with her cover versions regularly topping the Swedish iTunes download charts and the official Sverigetopplistan downloads chart following the release of the weekly compilations of the week's covers from the show. Laleh's cover of Eva Dahlgren "Ängeln I Rummet" (Angel in the Room) reached number six on the official Swedish Singles Chart whilst topping the downloads chart in December 2011 to become her most successful song in Sweden to date in terms of peak chart position and until the release of "Some Die Young" sales too. Similarly her renditions of Tomas Ledin's "Just Nu" (Right Now) and Timbuktu's "Alla vill till himmelen men ingen vill dö" (Everyone wants to go to heaven but nobody wants to die) peaked at number 25, whilst "Here I Go Again" peaked at number one on the digital chart. During the showings of Så mycket bättre, Laleh broke a Swedish digital chart record by having ten songs on the top sixty list, including nine inside the top 40, as a number of catalogue songs returned to the chart, including the first placement for "Bjurö klubb". Additionally two interpretations of her songs by other artists appeared, bringing a total of twelve songs with her involvement in the chart at once. Tolkningarna (Interpretations), an extended play of all of the songs she performed on the show was released digitally on 25 December 2011 and was also bundled with the physical release of her following studio album. Her fourth studio album was originally due to be released in December 2011 to coincide with her appearance on Så mycket bättre, but was postponed due to scheduling difficulties with the show. The name, artwork, release date and track listing of the album were announced in December. Sjung ("Sing") was released on 25 January 2012 across Scandinavia to positive reviews, with "Some Die Young" serving as the lead single, released three days earlier. The album peaked at number one on the Swedish chart for four weeks, and also charted at number one in Norway. The single peaked at number nine on the Swedish Singles Chart and number one in Norway for eight consecutive weeks. "Vårens Första Dag" was released as the album's second single in May 2012. A tour to promote the album was performed with fifteen dates across Sweden beginning in March and concluding in April 2012., and one event in Oslo, Norway. The tour was successful, with generally sold out venues, with the Gothenburg concert with 6.400 attendants as the top event. She did a festival tour in Sweden and Norway during the summer of 2012. She performed at the memorial concert for the victims of 2011 Norway attacks and the Nobel Peace Prize Concert, both in Oslo. 2013–2015: Colors and working in the United States In July 2013, it was announced that Laleh had signed with Universal Music Germany. Her first release in the territory was a re-worked version of "Some Die Young", issued on 30 August 2013. Colors, her first international LP followed in the autumn with a mixture of newly recorded tracks and previously released songs. A new music video for "Some Die Young" was created for the German release. In 2014 she moved to Los Angeles, in order to promote her music internationally, and to write and produce songs for other artists. She released her "Boom" EP with Island in September 2014. Her song "Speaking of Truth" was featured in the E! Channel original scripted series The Royals in March 2015. In 2015, Laleh co-wrote "Stone Cold", "Yes" and "Father" from Demi Lovato's fifth studio album, Confident, and two songs for Tori Kelly's first album Unbreakable Smile. She was also featured on Adam Lambert's single "Welcome to the Show". Lambert and Laleh performed live at American Idol. 2016–present: Kristaller and Arena tour in Sweden Even whilst living in US, she wrote, recorded, and produced a new album, called "Kristaller," with ten songs, five of them in Swedish. In late 2016 she toured in Sweden, performing in indoor arenas, including selling out the Ericsson Globe Arena. Her show included a symphony orchestra.
import sys input = sys.stdin.readline sys.setrecursionlimit(10 ** 7) N, M, Q = map(int, input().split()) wv = [0] * N for i in range(N): wv[i] = list(map(int, input().split())) wv = sorted(wv, key=lambda x: x[1], reverse=True) X = list(map(int, input().split())) for _ in range(Q): L, R = map(int, input().split()) L -= 1 R -= 1 available = sorted(X[:L] + X[R+1:]) used = [False] * len(available) ans = 0 for w, v in wv: for i, a in enumerate(available): if w <= a and not used[i]: ans += v used[i] = True break print(ans)