content
stringlengths
7
2.61M
import { AuthAPI } from '@api' import { AUTH_TOKEN_KEY } from '@interface/constant' import { User } from '@interface/entity.interface' import { APIResponse, LoginResponse, ServiceResponse } from '@interface/http.interface' import { getTokenCookie, getUserCookie, removeTokenCookie, removeUserCookie, setTokenCookie, setUserCookie } from '@services/cookie.service' import { AxiosResponse } from 'axios' import { useRouter } from 'next/router' import { ComponentType, createContext, FC, useContext, useEffect, useState } from 'react' const DefaultUser: User = { id: 0, name: '', email: '', } type AuthContextType = { isAuthenticated: boolean loading: boolean user: User login: (username: string, password: string) => Promise<ServiceResponse> logout: () => void } const AuthContext = createContext<AuthContextType>({ isAuthenticated: false, user: DefaultUser, loading: true, login: async (username: string, password: string) => { try { if (!username && !password) { throw new Error('Login failed') } return { success: true, message: '' } } catch (error: any) { return { success: false, message: error.message } } }, logout: () => { // This function is purposely left blank // because it is only used for // the createContext default value } }) export const AuthProvider: FC<{ children: any }> = ({ children }) => { const [user, setUser] = useState<User>(DefaultUser) const [loading, setLoading] = useState(true) useEffect(() => { async function loadUserFromCookies() { const token = getTokenCookie() if (token) { const user = getUserCookie() if (user) setUser(JSON.parse(user)) } setLoading(false) } loadUserFromCookies() }, []) const login = async ( email: string, password: string ): Promise<ServiceResponse> => { // Login user try { const { data, headers, status }: AxiosResponse<APIResponse<LoginResponse>> = await AuthAPI.post('/auth/login', { email, password }) const { data: userData } = data const loginResponse = userData as LoginResponse const user: User = { id: loginResponse.id || 0, name: loginResponse.name, email: loginResponse.email, } const token: string = headers[AUTH_TOKEN_KEY] || '' if (token) { setTokenCookie(token) setUserCookie(user) setUser(user) window.location.pathname = '/' } return { success: true, message: 'Login success' } } catch (error: any) { if (error.response) return { success: false, message: error.response.data.error ? error.response.data.error : error.response.data.message } return { success: false, message: error.message ? error.message : "Error when login" } } } const logout = () => { removeTokenCookie() removeUserCookie() setUser(DefaultUser) window.location.pathname = '/login' } return ( <AuthContext.Provider value={{ isAuthenticated: !!user.id, user, login, loading, logout }} > {children} </AuthContext.Provider> ) } export default function useAuth(): AuthContextType { const context = useContext(AuthContext) return context } export const ProtectRoute = ( Page: ComponentType, isAuthRoute = false, ): (() => JSX.Element) => { return () => { const router = useRouter() const { isAuthenticated, loading, user } = useAuth() useEffect(() => { if (!isAuthenticated && !loading) router.push('/login') if (isAuthRoute && isAuthenticated) router.push('/') }, [loading, isAuthenticated, user]) return <Page /> } }
<gh_stars>0 package fyi.foobar.nytcorpus.docs; /** * NYT Corpus document. * * @author <NAME> (<EMAIL>). * @version May 2020. */ public class Document implements Comparable<Document> { private String docno; private String yyyymmdd; private String dateline; private String headline; private String leadpara; private String summary; private String fulltext; public Document(String docno, String yyyymmdd, String dateline, String headline, String leadpara, String summary, String fulltext) { this.docno = docno; this.yyyymmdd = yyyymmdd; this.dateline = dateline; this.headline = headline; this.leadpara = leadpara; this.summary = summary; this.fulltext = fulltext; } public int compareTo(Document o) { if (yyyymmdd.equals(o.yyyymmdd)) return docno.compareTo(o.docno); else return yyyymmdd.compareTo(o.yyyymmdd); } public String docno() { return docno; } public String yyyymmdd() { return yyyymmdd; } public String dateline() { return dateline; } public String headline() { return headline; } public String leadpara() { return leadpara; } public String summary() { return summary; } public String fulltext() { return fulltext; } /** TREC <DOC>. */ public String trecdoc() { StringBuilder sb = new StringBuilder(); sb.append("<DOC>\n"); sb.append("<DOCNO>" + docno + "</DOCNO>\n"); sb.append("<YYYYMMDD>" + yyyymmdd + "</YYYYMMDD>\n"); sb.append("<DATELINE>" + dateline + "</DATELINE>\n"); sb.append("<HEADLINE>" + headline + "</HEADLINE>\n"); sb.append("<LEADPARA>" + leadpara + "</LEADPARA>\n"); sb.append("<SUMMARY>" + summary + "</SUMMARY>\n"); sb.append(fulltext + "\n"); sb.append("</DOC>\n\n"); return sb.toString(); } }
import * as React from "react"; import { JSX } from "react-jsx"; import { IFluentIconsProps } from '../IFluentIconsProps.types'; const Multiplier2X28Regular = (iconProps: IFluentIconsProps, props: React.HTMLAttributes<HTMLElement>): JSX.Element => { const { primaryFill, className } = iconProps; return <svg {...props} width={28} height={28} viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg" className={className}><path d="M8.49 10.9v-.03l.05-.15c.06-.13.15-.3.3-.49.28-.33.82-.73 1.9-.73.97 0 1.57.31 1.91.75.35.44.53 1.14.36 2.12-.1.58-.39.93-.84 1.22-.38.24-.8.4-1.3.61l-.63.26c-.74.32-1.57.75-2.2 1.5A4.9 4.9 0 007 19.26a.75.75 0 00.75.75h6a.75.75 0 000-1.5h-5.2c.1-.73.34-1.22.63-1.57.4-.48.96-.79 1.65-1.09l.5-.2c.54-.22 1.15-.47 1.65-.79a3.18 3.18 0 001.5-2.22 4.11 4.11 0 00-.65-3.31C13.13 8.44 12.04 8 10.75 8c-1.53 0-2.5.6-3.06 1.27a3.33 3.33 0 00-.67 1.32v.02a.75.75 0 001.47.29zm0 0zm8.79 3.32a.75.75 0 00-1.06 1.06L17.94 17l-1.72 1.72a.75.75 0 101.06 1.06L19 18.06l1.72 1.72a.75.75 0 101.06-1.06L20.06 17l1.72-1.72a.75.75 0 10-1.06-1.06L19 15.94l-1.72-1.72z" fill={primaryFill} /></svg>; }; export default Multiplier2X28Regular;
ESTIMATING AND DEALING WITH DETECTABILITY IN OCCUPANCY SURVEYS FOR FOREST OWLS AND ARBOREAL MARSUPIALS Abstract Surveys that record the presence or absence of fauna are used widely in wildlife management and research. A false absence occurs when an observer fails to record a resident species. There is a growing appreciation of the importance of false absences in wildlife surveys and its influence on impact assessment, monitoring, habitat analyses, and population modeling. Very few studies explicitly quantify the rate of these errors. Quantifying the rate of false absences provides a basis for estimating the survey effort necessary to assert that a species is absent with a pre-specified degree of confidence and allows uncertainty arising from false absences to be incorporated in inference. We estimated the rate of false absences for 2 species of forest owl and 4 species of arboreal marsupial based on 8 repeat visits to 50 survey locations in south-eastern Australia. We obtained estimates using a generalized zero-inflated binomial model. We presented detectability curves for each species to convey the number of visits required to achieve a specified level of confidence that resident species will be detected. The observation error rates we calculated were substantial but varied between species. For the least detectable species, the powerful owl (Ninox strenua), our standard surveys returned false absences on 87% of visits. However, our surveys of the more detectable sugar glider (Petaurus breviceps) returned a 45% false absence rate. We predict that approximately 18 visits would be required to be 90% sure of detecting resident owls and approximately 5 visits would provide 90% confidence of detecting resident sugar gliders. We fitted hierarchical logistic regression models to the data to describe the variation in detection rates explained by environmental variables. We found that temperature, rainfall, and habitat quality influenced the detectability of most species. Consideration of observation error rates could result in important changes to resource management and conservation planning.
Massive project reveals complexity of gene regulation. When the human genome was sequenced almost 20 years ago, many researchers were confident they9d be able to quickly home in on the genes responsible for complex diseases such as diabetes or schizophrenia. But they stalled fast, stymied in part by their ignorance of the system of switches that govern where and how genes are expressed in the body. Such gene regulation is what makes a heart cell distinct from a brain cell, for example, and distinguishes tumor from healthy tissue. Now, a massive, decadelong effort has linked the activity level of the 20,000 protein-coding human genes, as shown by levels of their RNA, to variation in millions of stretches of regulatory DNA. By looking at up to 54 kinds of tissue in hundreds of recently deceased people, the $150 million Genotype-Tissue Expression project has begun to connect the dots of how our genome works. The analysis drives home just how convoluted the interconnections between genes and their regulatory DNA can be.
Although he was back in Dallas last week, McClain did not join the team for the flight to training camp on Thursday as expected and was placed on reserve/did not report list. McClain missed the entire offseason program, including organized team activities _ though he showed up out of shape for mini camp to avoid being fined. It all raises questions about his future in the NFL and whether he wants to play at all. His continued use of the purple drank could prompt a longer suspension from the NFL. McClain subjected to be fined $40,000 a day for missing training camp, per the NFL collective bargaining agreement. The Cowboys have not decided whether to levy the fine. The Cowboys could release McClain, costing them $750,000 against the cap. As of now, the situation remains in limbo. McClain has retired twice before and the owner Jerry Jones had to coax him out of retirement to join the Cowboys in 2014. Cowboys coach Jason Garrett declined comment when asked about McClain on Tuesday. “We are focused on the guys who are here,” Garrett said. McClain is one of three Cowboys who will begin 2016 on suspension for violating the NFL’s substance abuse policy, joining defensive ends DeMarcus Lawrence and Randy Gregory. Lawrence, who will miss the first four games, is in training camp with the rest of his teammates. Gregory, who has been suspended for the first 10 games like McClain, is in a drug treatment center and may not play at all this year.
White House press secretary Sean Spicer acknowledged the delay on Thursday, saying the administration is taking great care with the revised to ensure a “flawless” roll-out of the new order. Whether that’s a credit to an administration learning a lesson from the embarrassing roll-out of the original order or to department leaders’ unwillingness to risk their own careers by introducing a document that violates a federal court order was uncertain. “It’s not a question of delaying it; it’s a question of getting it right,” Spicer said. According to a person who’s been briefed on the administration’s deliberations, three issues have complicated the revision. First, officials are debating whether the new order should again revoke the visas of some 60,000 to 100,000 people from the seven countries. Those visas were reinstated after a federal judge in Seattle blocked the initial executive order. Some officials worry that revoking them again would run afoul of the judge’s order. A second complication is comment made by a senior White House aide, Stephen Miller, that the revised order would be basically the same as the original, with “mostly minor technical differences.” Some officials are concerned that those comments also will anger the judge since he had already ruled against it, though a senior White House official defended Miller’s comments, saying they were not much different from what the president had said during a news conference last week. “The president’s comments are clearer, but they mean the same thing,” the official said. A third issue is the administration’s search for support from Republican leaders on Capitol Hill, such as House Speaker Paul Ryan and House Majority Leader Kevin McCarthy of California, who are demanding more information about the 60,000 to 100,000 visas. They’re less sure legally than they were before. “We are acting with appropriate haste and diligence to make sure that the order is done in an appropriate manner,” Spicer said. Citing national security concerns, Trump had said that he would issue a new executive order this week “tailored” to a federal appeals court decision that blocked his Jan. 27 executive order that temporarily suspended entry into the United States by citizens of Iran, Iraq, Libya, Sudan, Somalia, Syria and Yemen. In issuing his decision blocking the order, U.S. District Judge James Robart sided with the states of Washington and Minnesota who argued that Trump’s travel ban targeted Muslims and violated the constitutional rights of immigrants and their families. Homeland Security and Justice Department officials are debating whether the court’s ruling would apply to a new executive order or only to the original. Homeland Security and White House officials want to revoke the visas while Justice Department lawyers worry about running afoul of the Seattle judge’s order. Alex Nowrasteh, an immigration policy analyst at the libertarian Cato Institute, sees an administration that’s less sure of itself legally after arrogantly arguing they had the “absolute legal authority” to do this. A new order will need to address two key aspects of the Seattle judge’s order in order to prevent another suspension, according to Polly Price, an Emory University law professor. She said the new order must honor the permanent resident status of so-called green-card holders and not apply to the temporary visas of people who are already in the United States. It must also provide a better justification why these countries are being singled out so that it doesn’t appear to be a ban based on religion. The government could decide to revoke the temporary visas of people who are still overseas and have not started traveling to the United States, she said. “It’s reasonable to believe that green card holders would have constitutional rights, at least to some degree,” she said. On the other hand, temporary visitors who haven’t yet entered the United States “don’t have any rights that we can review,” she said.
package rfc5545 import ( "bytes" "errors" "fmt" ) var ( ErrUnexpectedEOL = errors.New("rfc5545: unexpected eol") ErrUnexpectedChar = errors.New("rfc5545: unexpected char") ) func unexpectedCharError(line []byte, i int, expected string) error { return fmt.Errorf("%w: '%c' in %q[%d]: expected %s", ErrUnexpectedChar, line[i], line, i, expected) } type Param struct { Name []byte Values [][]byte } type ContentLine struct { Name []byte Params []Param Value []byte } func (c *ContentLine) appendParam(name []byte) { c.Params = append(c.Params, Param{Name: name}) } func (c *ContentLine) appendParamValue(value []byte) { p := c.Params i := len(c.Params) - 1 p[i].Values = append(p[i].Values, value) } func (c *ContentLine) unmarshal(line []byte) error { const ( _ = iota sName sParamName sParamValueAny sParamValueQuote sParamValueUnquote sValue cSafeChar = "SAFE-CHAR" cQsafeChar = "QSAFE-CHAR" cValueChar = "VALUE-CHAR" ) c.Params = c.Params[:0] // reset params state := sName offset := 0 for i, b := range line { switch state { case sName: if b == semicolon || b == colon { c.Name = line[offset:i] offset = i + 1 if b == semicolon { state = sParamName } else { state = sValue } } case sParamName: if b == equals { c.appendParam(line[offset:i]) offset = i + 1 state = sParamValueAny } case sParamValueAny: if i == offset && b == dquote { state = sParamValueQuote } else if b == semicolon || b == colon || b == comma { c.appendParamValue(line[offset:i]) offset = i + 1 if b == semicolon { state = sParamName } else if b == colon { state = sValue } else { state = sParamValueAny } } else if !isSafeChar(b) { return unexpectedCharError(line, i, cSafeChar) } case sParamValueQuote: if b == dquote { state = sParamValueUnquote } else if !isQsafeChar(b) { return unexpectedCharError(line, i, cQsafeChar) } case sParamValueUnquote: if b == semicolon || b == colon || b == comma { c.appendParamValue(line[offset:i]) offset = i + 1 if b == semicolon { state = sParamName } else if b == colon { state = sValue } else { state = sParamValueAny } } else { return unexpectedCharError(line, i, `";", "," or ":"`) } case sValue: if !isValueChar(b) { return unexpectedCharError(line, i, cValueChar) } } } if state != sValue { return ErrUnexpectedEOL } c.Value = line[offset:] return nil } func (c *ContentLine) marshal(b *bytes.Buffer) { b.Reset() b.Write(c.Name) for _, param := range c.Params { b.WriteByte(semicolon) b.Write(param.Name) b.WriteByte(equals) for i, value := range param.Values { if i > 0 { b.WriteByte(comma) } b.Write(value) } } b.WriteByte(colon) b.Write(c.Value) }
Tension subcutaneous emphysema during laparoscopic surgery treatment of colon cancer: a case report. Carbon dioxide (CO2) insufflation is now essential for most endoscopic surgeries, such as abdominal, pelvic, and neck endoscopic surgery. It is not uncommon for CO2 leaks to occur unintentionally into subcutaneous tissue, later diffusing into a patient's bloodstream and resulting in hypercarbia. Regardless of the etiology of subcutaneous emphysema, a similar clinical management is required. Herein, we report on a case of tension subcutaneous emphysema and subsequent fatal ventilatory failure due to massive subcutaneous emphysema during laparoscopy. A timely blowhole incision is an effective intervention in an emergent setting like this case, although the patient had endotracheal intubation.
<filename>pyaavso/parsers/__init__.py from .webobs import WebObsResultsParser
<reponame>ryanloney/openvino-1 // Copyright (C) 2018-2022 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #pragma once #include "ngraph/pass/graph_rewrite.hpp" #include "openvino/pass/convert_fp32_to_fp16.hpp" namespace ngraph { namespace pass { using ov::pass::ConvertFP32ToFP16; } // namespace pass } // namespace ngraph
export { default as Modal } from './Modal.svelte'; export * as ModalStyles from './Modal.styles';
# coding: utf-8 """ paramiko の SSHClient.exec_command は内部で stdin のみ binary-mode で 処理しているが、stdout と stderr はテキストモードで処理している。 そのため、euc-jp な環境で動かすと UnicodeDecodeError が発生してしまう。 それを防ぐために、stdout, stderr を binary-mode で処理するパッチ関数を以下に定義している。 以下の情報を参考にした。 https://gist.github.com/smurn/4d45a51b3a571fa0d35d """ import paramiko def monkey_patch(): paramiko.SSHClient.exec_command = _patched_exec_command def _patched_exec_command( self, command: str, bufsize: int = -1, timeout: int = None, get_pty: bool = False, environment: dict = None, ) -> tuple: """ 元の exec_command の処理そのままで stdout, stderr を binary-mode で処理します。 """ chan = self._transport.open_session(timeout=timeout) if get_pty: chan.get_pty() chan.settimeout(timeout) if environment: chan.update_environment(environment) chan.exec_command(command) stdin = chan.makefile('wb', bufsize) stdout = chan.makefile('rb', bufsize) stderr = chan.makefile_stderr('rb', bufsize) return stdin, stdout, stderr
Devices and Desires Plot overview Commander Adam Dalgliesh, having published his second volume of poetry, retreats to the remote Larksoken headland where his recently deceased aunt, Jane Dalgliesh, has left him a converted windmill. However, a psychopathic serial killer, known as the Norfolk Whistler, is on the loose and seems to have arrived at Larksoken when Dalgliesh finds the body of the nearby nuclear power plant's Acting Administrative Officer during an evening stroll on the beach. Major themes The book deals at length with such issues as nuclear power and its dangers/benefits; the loss of a wife and the effect it has on a family; the bond of siblings; the use and manifestations of both psychosis and duty; and, finally, the love among family members. The book is also notable in that Dalgliesh himself does not actually solve the crime; the book instead begins with different characters carrying on their lives with the bleak backdrop of a controversial power station and a prowling serial killer. Soon, however, after the copycat murder that propels the book along, we watch the characters interact, react, and strike out at one another, although very little actual detecting takes place. Reception In a 1990 book review for The New York Times, Judith Crist wrote "Her newest mystery, 'Devices and Desires,' is P. D. James at better than her best... She has not failed us, and she has exceeded herself." Adaptations A television version of the novel was produced for Britain's ITV network in 1991. It starred Roy Marsden as Adam Dalgliesh.
def run(self) -> None: call, param = self.get() if self.is_str: if isinstance(param, str) and len(param) > 0: try: self.__execute_cmd(call=call, param=param) except: self.__error(f"Cannot execute the task: {call} {param}") traceback.print_exc() else: try: self.__execute_cmd(call=call, param=param) except: self.__error(f"Cannot execute the task: {call}") traceback.print_exc() else: try: self.__execute_fn(call=call, param=param) except: self.__error(f"Cannot execute the task: {call.__name__}({param})") traceback.print_exc()
<filename>rmw_iceoryx_cpp/src/internal/iceoryx_get_topic_endpoint_info.cpp<gh_stars>10-100 // Copyright (c) 2021 by ZhenshengLee. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #include <map> #include <string> #include <vector> #include <tuple> #include "iceoryx_posh/popo/untyped_subscriber.hpp" #include "iceoryx_posh/roudi/introspection_types.hpp" #include "rcutils/logging_macros.h" #include "rcutils/strdup.h" #include "rmw/impl/cpp/macros.hpp" #include "rmw_iceoryx_cpp/iceoryx_name_conversion.hpp" #include "rmw_iceoryx_cpp/iceoryx_topic_names_and_types.hpp" #include "rmw_iceoryx_cpp/iceoryx_get_topic_endpoint_info.hpp" namespace rmw_iceoryx_cpp { std::map<std::string, std::vector<std::string>> get_publisher_and_nodes() { std::map<std::string, std::string> names_n_types; std::map<std::string, std::vector<std::string>> subscribers_topics; std::map<std::string, std::vector<std::string>> publishers_topics; std::map<std::string, std::vector<std::string>> topic_subscribers; std::map<std::string, std::vector<std::string>> topic_publishers; fill_topic_containers( names_n_types, subscribers_topics, publishers_topics, topic_subscribers, topic_publishers); return topic_publishers; } std::map<std::string, std::vector<std::string>> get_subscriber_and_nodes() { std::map<std::string, std::string> names_n_types; std::map<std::string, std::vector<std::string>> subscribers_topics; std::map<std::string, std::vector<std::string>> publishers_topics; std::map<std::string, std::vector<std::string>> topic_subscribers; std::map<std::string, std::vector<std::string>> topic_publishers; fill_topic_containers( names_n_types, subscribers_topics, publishers_topics, topic_subscribers, topic_publishers); return topic_subscribers; } std::tuple<std::string, std::vector<std::string>> get_publisher_end_info_of_topic( const char * topic_name) { std::map<std::string, std::string> names_n_types; std::map<std::string, std::vector<std::string>> subscribers_topics; std::map<std::string, std::vector<std::string>> publishers_topics; std::map<std::string, std::vector<std::string>> topic_subscribers; std::map<std::string, std::vector<std::string>> topic_publishers; fill_topic_containers( names_n_types, subscribers_topics, publishers_topics, topic_subscribers, topic_publishers); auto full_name_array = topic_publishers[std::string(topic_name)]; auto topic_type = names_n_types[topic_name]; return std::make_tuple(topic_type, full_name_array); } std::tuple<std::string, std::vector<std::string>> get_subscriber_end_info_of_topic( const char * topic_name) { std::map<std::string, std::string> names_n_types; std::map<std::string, std::vector<std::string>> subscribers_topics; std::map<std::string, std::vector<std::string>> publishers_topics; std::map<std::string, std::vector<std::string>> topic_subscribers; std::map<std::string, std::vector<std::string>> topic_publishers; fill_topic_containers( names_n_types, subscribers_topics, publishers_topics, topic_subscribers, topic_publishers); auto full_name_array = topic_subscribers[std::string(topic_name)]; auto topic_type = names_n_types[topic_name]; return std::make_tuple(topic_type, full_name_array); } rmw_ret_t fill_rmw_publisher_end_info( rmw_topic_endpoint_info_array_t * rmw_topic_endpoint_info_array, const std::tuple<std::string, std::vector<std::string>> & iceoryx_topic_endpoint_info, rcutils_allocator_t * allocator) { rmw_ret_t rmw_ret = RMW_RET_ERROR; auto topic_type = std::get<0>(iceoryx_topic_endpoint_info); auto full_name_array = std::get<1>(iceoryx_topic_endpoint_info); if (!full_name_array.empty()) { rmw_ret = rmw_topic_endpoint_info_array_init_with_size( rmw_topic_endpoint_info_array, full_name_array.size(), allocator); if (rmw_ret != RMW_RET_OK) { return rmw_ret; } } int i = 0; // store all data in rmw_topic_endpoint_info_array_t for (const auto node_full_name : full_name_array) { auto name_n_space = get_name_n_space_from_node_full_name(node_full_name); auto rmw_topic_endpoint_info = rmw_get_zero_initialized_topic_endpoint_info(); // duplicate and store the topic_name char * topic_type_cstr = rcutils_strdup(topic_type.c_str(), *allocator); if (!topic_type_cstr) { RMW_SET_ERROR_MSG("failed to allocate memory for topic_type"); goto fail; } rmw_ret = rmw_topic_endpoint_info_set_topic_type( &rmw_topic_endpoint_info, topic_type_cstr, allocator); if (rmw_ret != RMW_RET_OK) { RCUTILS_LOG_ERROR("error during report of error: %s", rmw_get_error_string().str); goto fail; } char * node_name = rcutils_strdup(std::get<0>(name_n_space).c_str(), *allocator); if (!node_name) { RMW_SET_ERROR_MSG("failed to allocate memory for node_name"); goto fail; } rmw_ret = rmw_topic_endpoint_info_set_node_name(&rmw_topic_endpoint_info, node_name, allocator); if (rmw_ret != RMW_RET_OK) { RCUTILS_LOG_ERROR("error during report of error: %s", rmw_get_error_string().str); goto fail; } char * node_namespace = rcutils_strdup(std::get<1>(name_n_space).c_str(), *allocator); if (!node_namespace) { RMW_SET_ERROR_MSG("failed to allocate memory for node_namespace"); goto fail; } rmw_ret = rmw_topic_endpoint_info_set_node_namespace( &rmw_topic_endpoint_info, node_namespace, allocator); if (rmw_ret != RMW_RET_OK) { RCUTILS_LOG_ERROR("error during report of error: %s", rmw_get_error_string().str); goto fail; } rmw_ret = rmw_topic_endpoint_info_set_endpoint_type( &rmw_topic_endpoint_info, RMW_ENDPOINT_PUBLISHER); if (rmw_ret != RMW_RET_OK) { RCUTILS_LOG_ERROR("error during report of error: %s", rmw_get_error_string().str); goto fail; } /// @todo support gid and qos setting // set array rmw_topic_endpoint_info_array->info_array[i] = rmw_topic_endpoint_info; i++; } return RMW_RET_OK; fail: rmw_ret = rmw_topic_endpoint_info_array_fini(rmw_topic_endpoint_info_array, allocator); if (rmw_ret != RMW_RET_OK) { RCUTILS_LOG_ERROR("error during report of error: %s", rmw_get_error_string().str); } return RMW_RET_ERROR; } rmw_ret_t fill_rmw_subscriber_end_info( rmw_topic_endpoint_info_array_t * rmw_topic_endpoint_info_array, const std::tuple<std::string, std::vector<std::string>> & iceoryx_topic_endpoint_info, rcutils_allocator_t * allocator) { rmw_ret_t rmw_ret = RMW_RET_ERROR; auto topic_type = std::get<0>(iceoryx_topic_endpoint_info); auto full_name_array = std::get<1>(iceoryx_topic_endpoint_info); if (!full_name_array.empty()) { rmw_ret = rmw_topic_endpoint_info_array_init_with_size( rmw_topic_endpoint_info_array, full_name_array.size(), allocator); if (rmw_ret != RMW_RET_OK) { return rmw_ret; } } int i = 0; // store all data in rmw_topic_endpoint_info_array_t for (const auto node_full_name : full_name_array) { auto name_n_space = get_name_n_space_from_node_full_name(node_full_name); auto rmw_topic_endpoint_info = rmw_get_zero_initialized_topic_endpoint_info(); // duplicate and store the topic_name char * topic_type_cstr = rcutils_strdup(topic_type.c_str(), *allocator); if (!topic_type_cstr) { RMW_SET_ERROR_MSG("failed to allocate memory for topic_type"); goto fail; } rmw_ret = rmw_topic_endpoint_info_set_topic_type( &rmw_topic_endpoint_info, topic_type_cstr, allocator); if (rmw_ret != RMW_RET_OK) { RCUTILS_LOG_ERROR("error during report of error: %s", rmw_get_error_string().str); goto fail; } char * node_name = rcutils_strdup(std::get<0>(name_n_space).c_str(), *allocator); if (!node_name) { RMW_SET_ERROR_MSG("failed to allocate memory for node_name"); goto fail; } rmw_ret = rmw_topic_endpoint_info_set_node_name(&rmw_topic_endpoint_info, node_name, allocator); if (rmw_ret != RMW_RET_OK) { RCUTILS_LOG_ERROR("error during report of error: %s", rmw_get_error_string().str); goto fail; } char * node_namespace = rcutils_strdup(std::get<1>(name_n_space).c_str(), *allocator); if (!node_namespace) { RMW_SET_ERROR_MSG("failed to allocate memory for node_namespace"); goto fail; } rmw_ret = rmw_topic_endpoint_info_set_node_namespace( &rmw_topic_endpoint_info, node_namespace, allocator); if (rmw_ret != RMW_RET_OK) { RCUTILS_LOG_ERROR("error during report of error: %s", rmw_get_error_string().str); goto fail; } rmw_ret = rmw_topic_endpoint_info_set_endpoint_type( &rmw_topic_endpoint_info, RMW_ENDPOINT_SUBSCRIPTION); if (rmw_ret != RMW_RET_OK) { RCUTILS_LOG_ERROR("error during report of error: %s", rmw_get_error_string().str); goto fail; } /// @todo support gid and qos setting // set array rmw_topic_endpoint_info_array->info_array[i] = rmw_topic_endpoint_info; i++; } return RMW_RET_OK; fail: rmw_ret = rmw_topic_endpoint_info_array_fini(rmw_topic_endpoint_info_array, allocator); if (rmw_ret != RMW_RET_OK) { RCUTILS_LOG_ERROR("error during report of error: %s", rmw_get_error_string().str); } return RMW_RET_ERROR; } } // namespace rmw_iceoryx_cpp
Changes in hospital emergency department use associated with increased family physician availability. This study explores the effect of an increase in the family physician to population ratio on use of the hospital Emergency Department in a community. Two household surveys were conducted, the first before a community health center was established in an underserviced community, the second survey three years later. During this period there was a fivefold increase in the family physician-population ratio. Use of hospital Emergency Departments decreased. Respondents were more likely to have called their physician before going to the Emergency Department. If they did not call, the reason for not doing so was less likely related to physician unavailability. A decrease in the level of perceived illness in the community was also found.
<filename>src/app/shared/services/user.service.ts<gh_stars>0 import { Injectable, OnDestroy } from '@angular/core'; import { Http } from '@angular/http'; import * as requestConstant from './server-configuration'; import { Observable } from 'rxjs/Observable'; @Injectable() export class UserService implements OnDestroy { private _serverUrl; private _publishUrl; private _productsUrl; private readonly apiUrl = './assets/json/config.json'; constructor(private http: Http) { } loadConfig(): Observable<any> { return this.http.get(this.apiUrl).map(res => { const data = res.json(); this._serverUrl = data['serverUrl']; this._publishUrl = data['publishUrl']; this._productsUrl = data['productsUrl']; return res.json(); }); } getCurrentUser() { return localStorage.getItem('user'); } setCurrentUser(user) { return localStorage.setItem('user', user); } getCurrentProduct() { return localStorage.getItem('product'); } setCurrentProduct(product) { return localStorage.setItem('product', product); } get serverUrl() { return this._serverUrl; } get publishUrl() { return this._publishUrl; } get productsUrl() { return this._productsUrl; } ngOnDestroy() { localStorage.removeItem('user'); localStorage.removeItem('product'); } }
package parser import ( "fmt" "io" "strconv" "github.com/polyscone/knight/ast" "github.com/polyscone/knight/token" "github.com/polyscone/knight/value" ) var builtinArities = map[byte]int{ 'A': 1, 'B': 1, 'C': 1, 'D': 1, 'E': 1, 'G': 3, 'I': 3, 'L': 1, 'O': 1, 'P': 0, 'Q': 1, 'R': 0, 'S': 4, 'W': 2, } // Lexer should provide a stream of tokens from some source code. type Lexer interface { Load(r io.ByteScanner) Peek() token.Token Consume() (token.Token, error) } // Parser holds the state for a parser than can transform a stream of Knight // tokens into an AST. type Parser struct { lexer Lexer globals *value.GlobalStore } // Parse will load the source code int the given byte scanner into its lexer and // build an AST from the resulting token stream. func (p *Parser) Parse(globals *value.GlobalStore, r io.ByteScanner) (ast.Program, error) { p.lexer.Load(r) p.globals = globals program := ast.Program{} expr, err := p.parseExpr() if err != nil { return program, err } program.Root = expr return program, nil } func (p *Parser) parseExpr() (ast.Node, error) { tok, err := p.lexer.Consume() if err != nil { return ast.Invalid, err } switch tok.Kind { case token.Integer: i, err := strconv.Atoi(tok.Lexeme) if err != nil { return ast.Invalid, err } return value.NewInt(i), nil case token.String: return value.NewString(tok.Lexeme), nil case token.True, token.False: return value.NewBool(tok.Kind == token.True), nil case token.Null: return value.NewNull(), nil case token.Not, token.Noop, token.System: value, err := p.parseExpr() if err != nil { return ast.Invalid, err } return ast.NewUnary(tok.Kind, value), nil case token.And, token.Or, token.Add, token.Sub, token.Mul, token.Div, token.Mod, token.Less, token.Greater, token.Assign, token.Equal, token.Exp, token.Chain: lhs, err := p.parseExpr() if err != nil { return ast.Invalid, err } rhs, err := p.parseExpr() if err != nil { return ast.Invalid, err } return ast.NewBinary(tok.Kind, lhs, rhs), nil case token.Variable: return p.globals.New(tok.Lexeme), nil case token.Call: letter := tok.Lexeme[0] arity, ok := builtinArities[letter] if !ok { return ast.Invalid, fmt.Errorf("unexpected function %q", tok.Lexeme) } args := make([]ast.Node, arity) for i := 0; i < arity; i++ { arg, err := p.parseExpr() if err != nil { return ast.Invalid, err } args[i] = arg } return ast.NewCall(tok.Lexeme, args), nil default: return ast.Invalid, fmt.Errorf("unexpected token: %s", tok) } } // New returns a new initialised Parser. func New(lexer Lexer) *Parser { return &Parser{lexer: lexer} }
Directly diode-laser-pumped Ti:sapphire laser. A directly diode-laser-pumped Ti:AlO laser is demonstrated. Using a 1 W, 452 nm GaN diode laser, 19 mW of cw output power is achieved in a potentially portable format. Pumping at this short wavelength induces a loss at the laser wavelength that is not seen for the more typical green pump wavelengths. This effect is characterized and discussed.
<gh_stars>0 import re from .models import Tweet from .forms import TweetForm from notifications import views from twitteruser.models import TwitterUser from notifications.models import Notification from django.contrib.auth.decorators import login_required from django.shortcuts import render, HttpResponseRedirect, reverse def homepage(request): return render(request, 'index.html') @login_required def dashboard(request): user = Tweet.objects.filter(user=request.user) following = Tweet.objects.filter(user__in=request.user.following.all()) notifications = views.notification_count_view(request) feed = user | following feed = feed.order_by('-time') return render(request, 'dashboard.html', {'feed': feed, 'notifications': notifications}) @login_required def create_tweet(request): notifications = views.notification_count_view(request) if request.method == 'POST': form = TweetForm(request.POST) if form.is_valid(): data = form.cleaned_data post = Tweet.objects.create( tweet=data.get('tweet'), user=request.user, ) mentions = re.findall(r'@(\w+)', data.get('tweet')) if mentions: for mention in mentions: tagged_user = TwitterUser.objects.get(username=mention) if tagged_user: Notification.objects.create( mentioned=tagged_user, mention_tweet=post ) return HttpResponseRedirect(reverse('dashboard'), {'notifications': notifications}) form = TweetForm() return render(request, 'create_tweet.html', {'form': form}) def tweet_detail(request, tweet_id): tweet = Tweet.objects.get(id=tweet_id) return render(request, 'tweet.html', {'tweet': tweet}) def profile_detail(request, username): user = TwitterUser.objects.filter(username=username).first() tweets = Tweet.objects.filter(user=user).order_by('-time') notifications = views.notification_count_view(request) if request.user.is_authenticated: following = request.user.following.all() else: following = [] return render(request, 'profile.html', {'user': user, 'tweets': tweets, 'following': following, 'notifications': notifications}) def follow_view(request, username): current_user = request.user follow_user = TwitterUser.objects.filter(username=username).first() current_user.following.add(follow_user) return HttpResponseRedirect(request.META.get('HTTP_REFERER')) def unfollow_view(request, username): current_user = request.user follow_user = TwitterUser.objects.filter(username=username).first() current_user.following.remove(follow_user) return HttpResponseRedirect(request.META.get('HTTP_REFERER'))
// Copyright 1998-2018 Epic Games, Inc. All Rights Reserved. /*=========================================================================== Generated code exported from UnrealHeaderTool. DO NOT modify this manually! Edit the corresponding .h files instead! ===========================================================================*/ #include "GeneratedCppIncludes.h" #include "ProjectDelve_Character.h" #ifdef _MSC_VER #pragma warning (push) #pragma warning (disable : 4883) #endif PRAGMA_DISABLE_DEPRECATION_WARNINGS void EmptyLinkFunctionForGeneratedCodeProjectDelve_Character() {} // Cross Module References PROJECTDELVE_API UClass* Z_Construct_UClass_AProjectDelve_Character_NoRegister(); PROJECTDELVE_API UClass* Z_Construct_UClass_AProjectDelve_Character(); ENGINE_API UClass* Z_Construct_UClass_ACharacter(); UPackage* Z_Construct_UPackage__Script_ProjectDelve(); // End Cross Module References void AProjectDelve_Character::StaticRegisterNativesAProjectDelve_Character() { } UClass* Z_Construct_UClass_AProjectDelve_Character_NoRegister() { return AProjectDelve_Character::StaticClass(); } UClass* Z_Construct_UClass_AProjectDelve_Character() { static UClass* OuterClass = nullptr; if (!OuterClass) { static UObject* (*const DependentSingletons[])() = { (UObject* (*)())Z_Construct_UClass_ACharacter, (UObject* (*)())Z_Construct_UPackage__Script_ProjectDelve, }; #if WITH_METADATA static const UE4CodeGen_Private::FMetaDataPairParam Class_MetaDataParams[] = { { "BlueprintType", "true" }, { "HideCategories", "Navigation" }, { "IncludePath", "ProjectDelve_Character.h" }, { "IsBlueprintBase", "true" }, { "ModuleRelativePath", "ProjectDelve_Character.h" }, }; #endif static const FCppClassTypeInfoStatic StaticCppClassTypeInfo = { TCppClassTypeTraits<AProjectDelve_Character>::IsAbstract, }; static const UE4CodeGen_Private::FClassParams ClassParams = { &AProjectDelve_Character::StaticClass, DependentSingletons, ARRAY_COUNT(DependentSingletons), 0x00800080u, nullptr, 0, nullptr, 0, nullptr, &StaticCppClassTypeInfo, nullptr, 0, METADATA_PARAMS(Class_MetaDataParams, ARRAY_COUNT(Class_MetaDataParams)) }; UE4CodeGen_Private::ConstructUClass(OuterClass, ClassParams); } return OuterClass; } IMPLEMENT_CLASS(AProjectDelve_Character, 2993503903); static FCompiledInDefer Z_CompiledInDefer_UClass_AProjectDelve_Character(Z_Construct_UClass_AProjectDelve_Character, &AProjectDelve_Character::StaticClass, TEXT("/Script/ProjectDelve"), TEXT("AProjectDelve_Character"), false, nullptr, nullptr, nullptr); DEFINE_VTABLE_PTR_HELPER_CTOR(AProjectDelve_Character); PRAGMA_ENABLE_DEPRECATION_WARNINGS #ifdef _MSC_VER #pragma warning (pop) #endif
Police were called to Pontefract racecourse yesterday afternoon (Sunday) following the the discovery of a potentially suspicious package by a member of the public. Officers attended at 1.05pm and located a square device in a green holdall near the golf course. As a precaution the area was cordoned off and the Ministry of Defence were contacted. After assessing the device, bomb disposal experts concluded it was a motorcycle battery and was not suspicious. The scene was closed down as soon as enquiries were completed at around 4pm.
A little background first: I’m one of those people who, on some level, doesn’t understand why she’s not still friends with all her buddies from grammar school (though I still have a really good friend from grammar school who lives outside Seattle and she’s awesome). From an early age, I believed that true friends would be friends for life (remember that song?: “Make new friends, but keep the old, one is silver and the other is gold”). I took that shit seriously In a way, it makes sense. Who better to stay friends with than those who knew you when you were open, innocent, and your main motivation was having fun playing? Also, usually you don’t know that relationships can end when you’re a child, so you’re fully in with both feet! I recently re-watched the movie Stand By Me, which I initially loved and cried profusely at. because it seemed to be the standard-bearer on what it means to be a good friend and I wanted to remember what had resonated so deeply. Was it the boys’ loyalty for each other? Their understanding? The fact that they cheered each other on no matter what? In the moments where I may feel disappointed that a friend is not able to “be there” for me, or perhaps is no longer able to regularly keep in touch, or even when I remember friends I’ve permanently lost along the way, I wonder things like: Was it my fault? Did my friend lose me or the other way round? Are there just “seasons of friendship?” – that with some people, we’re only meant to be friends for a little while? Was it deliberate or an accident? In these moments, no matter the details, I find it’s so helpful to remember this mantra: Other People Don’t Exist To Make Me Happy - A friend and I were in the middle of discussing launching a project together and she set up a meeting for us to talk together to her (it turns out) bullying business partner and when he behaved badly, she never called me to say she was sorry or address it. In fact, she never called me again: People don’t exist to make me happy - A childhood friend I tried to reconnect with as an adult (because we had adored each other as kids) and now coincidentally were living on the same street, but she was too busy: People don’t exist to make me happy - A friend I have who holds me at a distance: People don’t exist to make me happy When I do this, I feel a heck of a lot better. When I’m not thinking of what I can GET from a friendship, I’m seeing instead that there may be circumstances that don’t allow the person to give (things that I really should be giving myself anyway!). I end up having compassion and loving these people MORE than I did when I had an expectation of them. Well, hot damn! That feels good! As embarrassing as it was to find out that I had this hidden expectation, I was glad to know I did because now I could ask Where did it come from? Oh (I know!) it came from flipping what was subconsciously drilled into me: You Exist To Make Other People Happy (Aha!) Through every rule or societal norm I was pressured to follow or uphold, through any friend or family member I somehow got the idea I was supposed to take care of, anytime I got the message from any school or misguided person that I should dull my light (Never do it!), whenever I believed other people don’t know how to take care of themselves so I must do it, I was believing this.
async def replayWorker(queue: asyncio.Queue, workerID: int, account_id: int, priv = False): global SKIPPED_N global ERROR_N while True: item = await queue.get() filename = item[0] N = item[1] title = item[2] replay_json_fn = filename + '.json' msg_str = 'Replay[' + str(N) + ']: ' try: if os.path.isfile(replay_json_fn): async with aiofiles.open(replay_json_fn) as fp: replay_json = json.loads(await fp.read()) if wi.chk_JSON_replay(replay_json): bu.verbose_std(msg_str + title + ' has already been posted. Skipping.' ) else: os.remove(replay_json_fn) bu.debug(msg_str + "Replay JSON not valid/complete: Deleting " + replay_json_fn, id=workerID) SKIPPED_N += 1 queue.task_done() continue except asyncio.CancelledError as err: raise err except Exception as err: bu.error(msg_str + 'Unexpected error: ' + str(type(err)) + ' : '+ str(err)) try: async with aiofiles.open(filename,'rb') as fp: filename = os.path.basename(filename) bu.debug(msg_str + 'File: ' + filename) json_resp = await wi.post_replay(await fp.read(), filename, account_id, title, priv, N) if json_resp != None: if (await bu.save_JSON(replay_json_fn,json_resp)): if wi.chk_JSON_replay(json_resp): if not bu.debug(msg_str + 'Replay saved OK: ' + filename): bu.verbose_std(msg_str + title + ' posted') else: bu.warning(msg_str +'Replay file is not valid/complete: ' + filename) ERROR_N += 1 else: bu.error(msg_str + 'Error saving replay: ' + filename) ERROR_N += 1 else: bu.error(msg_str + 'Replay file is not valid/complete: ' + filename) ERROR_N += 1 except Exception as err: bu.error(msg_str + 'Unexpected Exception: ' + str(type(err)) + ' : ' + str(err) ) bu.debug(msg_str + 'Marking task done') queue.task_done() return None
Underestimation of Heritability across the Molecular Layers of the Gene Expression Process We investigated the extent of the heritability underestimation for molecules from an infinitesimal model in mixed model analysis. To this end, we estimated the heritability of transcription, ribosome occupancy, and translation in lymphoblastoid cell lines from Yoruba individuals. Upon considering all genome-wide nucleotide variants, a considerable underestimation in heritability was observed for mRNA transcription (−0.52), ribosome occupancy (−0.48), and protein abundance (−0.47). We employed a mixed model with an optimal number of nucleotide variants, which maximized heritability, and identified two novel expression quantitative trait loci (eQTLs; p < 1.0 10−5): rs11016815 on chromosome 10 that influences the transcription of SCP2, a trans-eGene on chromosome 1whose expression increases in response to MGMT downregulation-induced apoptosis, the cis-eGene of rs11016815and rs1041872 on chromosome 11 that influences the ribosome occupancy of CCDC25 on chromosome 8 and whose cis-eGene encodes ZNF215, a transcription factor that potentially regulates the translation speed of CCDC25. Our results suggest that an optimal number of nucleotide variants should be used in a mixed model analysis to accurately estimate heritability and identify eQTLs. Moreover, a heterogeneous covariance structure based on gene identity and the molecular layers of the gene expression process should be constructed to better explain polygenic effects and reduce errors in identifying eQTLs.
<filename>fungiform/tests/forms.py # -*- coding: utf-8 -*- """ fungiform.tests.forms ~~~~~~~~~~~~~~~~~~~~~ The unittests for the forms. :copyright: (c) 2010 by the Fungiform Team. :license: BSD, see LICENSE for more details. """ import unittest from fungiform import forms class FormTestCase(unittest.TestCase): def test_simple_form(self): class MyForm(forms.FormBase): username = forms.TextField() item_count = forms.IntegerField() is_active = forms.BooleanField() form = MyForm() form.validate({ 'username': 'foobar', 'item_count': '42', 'is_active': 'a value' }) self.assertEqual(form.raw_data['username'], 'foobar') self.assertEqual(form.raw_data['item_count'], '42') self.assertEqual(form.raw_data['is_active'], 'a value') self.assertEqual(form.data['username'], 'foobar') self.assertEqual(form.data['item_count'], 42) self.assertEqual(form.data['is_active'], True) def test_simple_nesting(self): class MyForm(forms.FormBase): ints = forms.Multiple(forms.IntegerField()) strings = forms.CommaSeparated(forms.TextField()) form = MyForm() form.validate({ 'ints.0': '42', 'ints.1': '125', 'ints.55': '23', 'strings': 'foo, bar, baz' }) self.assertEqual(form.data['ints'], [42, 125, 23]) self.assertEqual(form.data['strings'], 'foo bar baz'.split()) def test_form_as_field(self): class AddressForm(forms.FormBase): street = forms.TextField() zipcode = forms.IntegerField() class MyForm(forms.FormBase): username = forms.TextField() addresses = forms.Multiple(AddressForm.as_field()) form = MyForm() form.validate({ 'username': 'foobar', 'addresses.0.street': 'Ici', 'addresses.0.zipcode': '11111', 'addresses.2.street': 'Ailleurs', 'addresses.2.zipcode': '55555', }) self.assertEqual(form.data, { 'username': u'foobar', 'addresses': [{'street': u'Ici', 'zipcode': 11111}, {'street': u'Ailleurs', 'zipcode': 55555}], }) def suite(): suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(FormTestCase)) return suite if __name__ == '__main__': unittest.main(defaultTest='suite')
<gh_stars>0 #--------------------------------------------# # My Solution # #--------------------------------------------# def max_digit(number: int): return max(str(number)) #--------------------------------------------# # Better Solutions # #--------------------------------------------# #max_digit = lambda number: int(max(str(number))) #--------Simple explanation of lambda functions--------# #def name(whatever arguments): → lambda whatever arguments: some expression #return some expression --------------------------------------↑ #--------------------------------------------# # Test # #--------------------------------------------# a = max_digit(52) print(a)
package com.unideb.qsa.calculator.implementation.calculator; import java.util.HashMap; import java.util.Map; import org.testng.Assert; import org.testng.annotations.Test; import com.unideb.qsa.calculator.domain.SystemFeature; /** * Unit test for {@link SystemMMcmKBalkingRenegingCalculator}. */ public class SystemMMcmKBalkingRenegingCalculatorTest { private static final double DELTA = 0.0001; private final SystemMMcmKBalkingRenegingCalculator systemMMcmKBalkingRenegingCalculatorUnderTest = new SystemMMcmKBalkingRenegingCalculator(); @Test public void bnTest() { // GIVEN Map<SystemFeature, Double> features = createTestFeatures(); double expected = 0.5; // WHEN double result = systemMMcmKBalkingRenegingCalculatorUnderTest.bn(features); // THEN Assert.assertEquals(result, expected, DELTA); } @Test public void rnTest() { // GIVEN Map<SystemFeature, Double> features = createTestFeatures(); double expected = 0.0; // WHEN double result = systemMMcmKBalkingRenegingCalculatorUnderTest.rn(features); // THEN Assert.assertEquals(result, expected, DELTA); } @Test public void LambdaNTest() { // GIVEN Map<SystemFeature, Double> features = createTestFeatures(); double expected = 4.5; // WHEN double result = systemMMcmKBalkingRenegingCalculatorUnderTest.LambdaN(features); // THEN Assert.assertEquals(result, expected, DELTA); } @Test public void LambdaAvgTest() { // GIVEN Map<SystemFeature, Double> features = createTestFeatures(); double expected = 3.549671977; // WHEN double result = systemMMcmKBalkingRenegingCalculatorUnderTest.LambdaAvg(features); // THEN Assert.assertEquals(result, expected, DELTA); } @Test public void MunTest() { // GIVEN Map<SystemFeature, Double> features = createTestFeatures(); double expected = 2.0; // WHEN double result = systemMMcmKBalkingRenegingCalculatorUnderTest.Mun(features); // THEN Assert.assertEquals(result, expected, DELTA); } @Test public void MuAvgTest() { // GIVEN Map<SystemFeature, Double> features = createTestFeatures(); double expected = 3.54967197; // WHEN double result = systemMMcmKBalkingRenegingCalculatorUnderTest.MuAvg(features); // THEN Assert.assertEquals(result, expected, DELTA); } @Test public void P0Test() { // GIVEN Map<SystemFeature, Double> features = createTestFeatures(); double expected = 0.0674789128; // WHEN double result = systemMMcmKBalkingRenegingCalculatorUnderTest.P0(features); // THEN Assert.assertEquals(result, expected, DELTA); } @Test public void PnTest() { // GIVEN Map<SystemFeature, Double> features = createTestFeatures(); double expected = 0.337394564; // WHEN double result = systemMMcmKBalkingRenegingCalculatorUnderTest.Pn(features); // THEN Assert.assertEquals(result, expected, DELTA); } @Test public void PinFinTest() { // GIVEN Map<SystemFeature, Double> features = createTestFeatures(); double expected = 0.42772277; // WHEN double result = systemMMcmKBalkingRenegingCalculatorUnderTest.PinFin(features); // THEN Assert.assertEquals(result, expected, DELTA); } @Test public void PWTest() { // GIVEN Map<SystemFeature, Double> features = createTestFeatures(); double expected = 0.097029702; // WHEN double result = systemMMcmKBalkingRenegingCalculatorUnderTest.PW(features); // THEN Assert.assertEquals(result, expected, DELTA); } @Test public void PBTest() { // GIVEN Map<SystemFeature, Double> features = createTestFeatures(); double expected = 0.001373249; // WHEN double result = systemMMcmKBalkingRenegingCalculatorUnderTest.PB(features); // THEN Assert.assertEquals(result, expected, DELTA); } @Test public void PJTest() { // GIVEN Map<SystemFeature, Double> features = createTestFeatures(); double expected = 0.43422184; // WHEN double result = systemMMcmKBalkingRenegingCalculatorUnderTest.PJ(features); // THEN Assert.assertEquals(result, expected, DELTA); } @Test public void PRTest() { // GIVEN Map<SystemFeature, Double> features = createTestFeatures(); double expected = 0.017821782; // WHEN double result = systemMMcmKBalkingRenegingCalculatorUnderTest.PR(features); // THEN Assert.assertEquals(result, expected, DELTA); } @Test public void USTest() { // GIVEN Map<SystemFeature, Double> features = createTestFeatures(); double expected = 0.93252108; // WHEN double result = systemMMcmKBalkingRenegingCalculatorUnderTest.US(features); // THEN Assert.assertEquals(result, expected, DELTA); } @Test public void aTest() { // GIVEN Map<SystemFeature, Double> features = createTestFeatures(); double expected = 0.58106841; // WHEN double result = systemMMcmKBalkingRenegingCalculatorUnderTest.a(features); // THEN Assert.assertEquals(result, expected, DELTA); } @Test public void UtTest() { // GIVEN Map<SystemFeature, Double> features = createTestFeatures(); double expected = 0.82040768; // WHEN double result = systemMMcmKBalkingRenegingCalculatorUnderTest.Ut(features); // THEN Assert.assertEquals(result, expected, DELTA); } @Test public void NAvgTest() { // GIVEN Map<SystemFeature, Double> features = createTestFeatures(); double expected = 1.795923149; // WHEN double result = systemMMcmKBalkingRenegingCalculatorUnderTest.NAvg(features); // THEN Assert.assertEquals(result, expected, DELTA); } @Test public void EN2Test() { // GIVEN Map<SystemFeature, Double> features = createTestFeatures(); double expected = 4.1764292; // WHEN double result = systemMMcmKBalkingRenegingCalculatorUnderTest.EN2(features); // THEN Assert.assertEquals(result, expected, DELTA); } @Test public void D2NTest() { // GIVEN Map<SystemFeature, Double> features = createTestFeatures(); double expected = 0.95108928; // WHEN double result = systemMMcmKBalkingRenegingCalculatorUnderTest.D2N(features); // THEN Assert.assertEquals(result, expected, DELTA); } @Test public void QAvgTest() { // GIVEN Map<SystemFeature, Double> features = createTestFeatures(); double expected = 0.0527179; // WHEN double result = systemMMcmKBalkingRenegingCalculatorUnderTest.QAvg(features); // THEN Assert.assertEquals(result, expected, DELTA); } @Test public void EQ2Test() { // GIVEN Map<SystemFeature, Double> features = createTestFeatures(); double expected = 0.0644329; // WHEN double result = systemMMcmKBalkingRenegingCalculatorUnderTest.EQ2(features); // THEN Assert.assertEquals(result, expected, DELTA); } @Test public void D2QTest() { // GIVEN Map<SystemFeature, Double> features = createTestFeatures(); double expected = 0.06165381; // WHEN double result = systemMMcmKBalkingRenegingCalculatorUnderTest.D2Q(features); // THEN Assert.assertEquals(result, expected, DELTA); } @Test public void WAvgTest() { // GIVEN Map<SystemFeature, Double> features = createTestFeatures(); double expected = 0.01485148; // WHEN double result = systemMMcmKBalkingRenegingCalculatorUnderTest.WAvg(features); // THEN Assert.assertEquals(result, expected, DELTA); } @Test public void TAvgTest() { // GIVEN Map<SystemFeature, Double> features = createTestFeatures(); double expected = 0.50594059; // WHEN double result = systemMMcmKBalkingRenegingCalculatorUnderTest.TAvg(features); // THEN Assert.assertEquals(result, expected, DELTA); } @Test public void cAvgTest() { // GIVEN Map<SystemFeature, Double> features = createTestFeatures(); double expected = 1.74320524; // WHEN double result = systemMMcmKBalkingRenegingCalculatorUnderTest.cAvg(features); // THEN Assert.assertEquals(result, expected, DELTA); } @Test public void mAvgTest() { // GIVEN Map<SystemFeature, Double> features = createTestFeatures(); double expected = 8.2040768; // WHEN double result = systemMMcmKBalkingRenegingCalculatorUnderTest.mAvg(features); // THEN Assert.assertEquals(result, expected, DELTA); } @Test public void rAvgTest() { // GIVEN Map<SystemFeature, Double> features = createTestFeatures(); double expected = 0.0632614; // WHEN double result = systemMMcmKBalkingRenegingCalculatorUnderTest.rAvg(features); // THEN Assert.assertEquals(result, expected, DELTA); } @Test public void EDeltarTest() { // GIVEN Map<SystemFeature, Double> features = createTestFeatures(); double expected = 13.8194444; // WHEN double result = systemMMcmKBalkingRenegingCalculatorUnderTest.EDeltar(features); // THEN Assert.assertEquals(result, expected, DELTA); } @Test public void ECostTest() { // GIVEN Map<SystemFeature, Double> features = createTestFeatures(); double expected = 19.164307794932594; // WHEN double result = systemMMcmKBalkingRenegingCalculatorUnderTest.ECost(features); // THEN Assert.assertEquals(result,expected, DELTA); } private Map<SystemFeature, Double> createTestFeatures() { Map<SystemFeature, Double> features = new HashMap<>(); features.put(SystemFeature.LambdaFin, 1.0); features.put(SystemFeature.Mu, 2.0); features.put(SystemFeature.c, 3.0); features.put(SystemFeature.m, 5.0); features.put(SystemFeature.KFin, 10.0); features.put(SystemFeature.Theta, 1.2); features.put(SystemFeature.n, 1.0); features.put(SystemFeature.CS, 2.2); features.put(SystemFeature.CWS, 1.3); features.put(SystemFeature.CI, 0.5); features.put(SystemFeature.CSR, 4.5); features.put(SystemFeature.CLC, 1.2); features.put(SystemFeature.R, 1.1); return features; } }
""" Controls which WAMP features are enabled or disabled. """ from uuid import uuid5, NAMESPACE_OID from copy import deepcopy class Options(dict): def __init__(self, **kwargs): super().__init__(**kwargs) def __getattr__(self, name): return self.get(name) def __setattr__(self, name, value): self[name] = value def __delattr__(self, name): if name in self: del self[name] else: raise AttributeError("No such attribute: " + name) def __deepcopy__(self, memo): cls = self.__class__ result = cls.__new__(cls) memo[id(self)] = result for k, v in self.items(): setattr(result, k, deepcopy(v, memo)) return result # Supported client features. client_features = Options( roles=Options( caller=Options( features=Options( #caller_identification=True, #call_canceling=True, #progressive_call_results=True, ) ), callee=Options( features=Options( #caller_identification=True, #pattern_based_registration=True, #shared_registration=True, #progressive_call_results=True, #registration_revocation=True, ) ), publisher=Options( features=Options( #publisher_identification=True, #subscriber_blackwhite_listing=True, #publisher_exclusion=True, ) ), subscriber=Options( features=Options( #publisher_identification=True, #pattern_based_subscription=True, #subscription_revocation=True ) ) ) ) # Supported server features. server_features = Options( # This is a unique id representing the identity of this library. To give your implementation or application a unique identity, overload it. # It can be any string, so the format need not be adhered to. authid=str(uuid5(NAMESPACE_OID, 'wampnado')), authrole='anonymous', authmethod='anonymous', roles=Options( broker=Options( features=Options( #publisher_identification=True, #publisher_exclusion=True, #subscriber_blackwhite_listing=True, ) ), dealer=Options( features=Options( #progressive_call_results=True, #caller_identification=True ) ) ), )
/** * Quick invalidation for View property changes (alpha, translationXY, etc.). We don't want to * set any flags or handle all of the cases handled by the default invalidation methods. * Instead, we just want to schedule a traversal in ViewRootImpl with the appropriate * dirty rect. This method calls into fast invalidation methods in ViewGroup that * walk up the hierarchy, transforming the dirty rect as necessary. * * The method also handles normal invalidation logic if display list properties are not * being used in this view. The invalidateParent and forceRedraw flags are used by that * backup approach, to handle these cases used in the various property-setting methods. * * @param invalidateParent Force a call to invalidateParentCaches() if display list properties * are not being used in this view * @param forceRedraw Mark the view as DRAWN to force the invalidation to propagate, if display * list properties are not being used in this view */ void invalidateViewProperty(boolean invalidateParent, boolean forceRedraw) { if (!isHardwareAccelerated() || !mRenderNode.isValid() || (mPrivateFlags & PFLAG_DRAW_ANIMATION) != 0) { if (invalidateParent) { invalidateParentCaches(); } if (forceRedraw) { mPrivateFlags |= PFLAG_DRAWN; } invalidate(false); } else { damageInParent(); } }
<gh_stars>0 # def sum (a): # even_sum = 0 # odd_sum = 0 # new_list = [int(x) for x in str(a)] # for n in new_list: # if n % 2 == 0: # even_sum += n # else: # odd_sum += n # print(f"Odd sum = {odd_sum}, Even sum = {even_sum}") # # # number = int(input()) # # sum(number) def odd_even_sum(nums): odd_sum = 0 even_sum = 0 for num in nums: if num % 2 == 0: even_sum += num else: odd_sum += num print(f"Odd sum = {odd_sum}, Even sum = {even_sum}") numbers = map(int, list(input())) odd_even_sum(numbers)
Optical fiber based microfluidic gas flowmeter A microfluidic gas flowmeter based on optical fiber Fabry-Perot interferometer(FPI) was proposed and demonstrated. The sensor was formed by two embedded optical fibers with a microfluidic gas channel running across the two end faces. The gas flowrate was first tested by monitoring the shift of the resonancewavelength of the FPI. The intensity demodulation method was then applied to investigate thedynamic response of the sensor, by utilizing a tunable laser and a photodiode. The experimental results show that our proposed microfluidic gas flowmeter has high sensitivity and fast response.
<reponame>mtaimoorkhan/jml4sec package gre.ens.utility; public class SecJML { public static int IsValidServer(String url) { return 1; } public static int IsValidEcomUrl(String url) { return 1; } public static boolean IsValidPassword(String password) { return true; } public static boolean IsSQLiORAttack (String input) { input = input.toUpperCase(); if (input.contains(" OR")== true) return false; return true; } public static boolean IsSQLiUnionAttack (String input) { input = input.toUpperCase(); if (input.contains(" UNION")== true) return false; return true; } public static boolean IsSQLiBlindAttack(String input){ input = input.toUpperCase(); if (input.contains(" AND")== true) return false; return true; } public static boolean IsErrorBasedSQLi(String input){ input = input.toUpperCase(); if (input.contains(" '")== true) return false; return true; } }
<reponame>cukupupas/libsalamander<filename>interfaceTransport/sip/SipTransport.cpp /* Copyright 2016 Silent Circle, LLC 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 "SipTransport.h" #include "../../storage/sqlite/SQLiteStoreConv.h" #include <iostream> using namespace salamander; void Log(const char* format, ...); vector< int64_t >* SipTransport::sendAxoMessage(const string& recipient, vector< pair< string, string > >* msgPairs) { int32_t numPairs = msgPairs->size(); uint8_t** names = new uint8_t*[numPairs+1]; uint8_t** devIds = new uint8_t*[numPairs+1]; uint8_t** envelopes = new uint8_t*[numPairs+1]; size_t* sizes = new size_t[numPairs+1]; uint64_t* msgIds = new uint64_t[numPairs+1]; int32_t index = 0; for(; index < numPairs; index++) { pair<string, string>& msgPair = msgPairs->at(index); names[index] = (uint8_t*)recipient.c_str(); devIds[index] = (uint8_t*)msgPair.first.c_str(); envelopes[index] = (uint8_t*)msgPair.second.data(); sizes[index] = msgPair.second.size(); } names[index] = NULL; devIds[index] = NULL; envelopes[index] = NULL; sendAxoData_(names, devIds, envelopes, sizes, msgIds); // This should clear everything because no pointers involved msgPairs->clear(); delete names; delete devIds; delete envelopes; delete sizes; vector<int64_t>* msgIdsReturn = new std::vector<int64_t>; for (int32_t i = 0; i < numPairs; i++) { if (msgIds[i] != 0) msgIdsReturn->push_back(msgIds[i]); } delete msgIds; return msgIdsReturn; } int32_t SipTransport::receiveAxoMessage(uint8_t* data, size_t length) { string envelope((const char*)data, length); int32_t result = appInterface_->receiveMessage(envelope); return result; } void SipTransport::stateReportAxo(int64_t messageIdentifier, int32_t stateCode, uint8_t* data, size_t length) { std::string info; if (data != NULL) { info.assign((const char*)data, length); } appInterface_->stateReportCallback_(messageIdentifier, stateCode, info); } static string Zeros("00000000000000000000000000000000"); void SipTransport::notifyAxo(uint8_t* data, size_t length) { string info((const char*)data, length); /* * notify call back from SIP: * - parse data from SIP, get name and devices * - check for new devices (store->hasConversation() ) * - if a new device was found call appInterface_->notifyCallback(...) * NOTE: the notifyCallback function in app should return ASAP, queue/trigger actions only * - done */ size_t found = info.find(':'); if (found == string::npos) // No colon? No name -> return return; string name = info.substr(0, found); size_t foundAt = name.find('@'); if (foundAt != string::npos) { name = name.substr(0, foundAt); } string devIds = info.substr(found + 1); string devIdsSave(devIds); size_t pos = 0; string devId; SQLiteStoreConv* store = SQLiteStoreConv::getStore(); bool newDevice = false; while ((pos = devIds.find(';')) != string::npos) { devId = devIds.substr(0, pos); devIds.erase(0, pos + 1); if (Zeros.compare(0, devId.size(), devId) == 0) { continue; } if (!store->hasConversation(name, devId, appInterface_->getOwnUser())) { newDevice = true; break; } } if (newDevice) appInterface_->notifyCallback_(AppInterface::DEVICE_SCAN, name, devIdsSave); }
Modern vehicles are subject to ever increasing demands in terms of comfort, fuel consumption and emission requirements. In order to be able to meet these demands, the vehicles are equipped with more and more electronic components. These components have to be connected to various control units by some form of cabling, which is normally unlikely to cause any major problems. Problems do arise, however, when a component is to be fitted on or close to the engine or when the cabling has to be run on or close to the engine. It becomes especially difficult when a component is fitted on the hot side of the engine. On an in-line engine, the hot side is the side on which the manifold is fitted. When a component is to be fitted on the hot side of the engine, then it has to be designed such that it withstands the high temperature generated by the engine. This can be achieved by choice of material, shielding and/or cooling. The cabling connecting the component to the electrical system of the vehicle also has to be dimensioned to withstand the high temperature. Traditionally, cabling made of a variety of heat-resistant materials has been used to cope with high temperature requirements, for example teflon or silicone cabling. The drawback with these cablings is that they are expensive, apart from which the materials are difficult to work, which adds to the cost of connecting the cabling both to the component and to the connector. Certain temperature-resistant materials are, moreover, toxic, which makes them harder to handle. U.S. Pat. Nos. 5,301,421, 5,670,860, EP 1026703 and EP 0408476 describe cabling having integrated cooling ducts for cooling away power dissipations in the cabling. Common to these documents is the fact that one or more hoses or pipes are combined with one or more electrical conductors to form an electric cabling. A cooling medium can then be conducted through the hose/pipe in order to cool the cabling. The aim of these proposals is to cool high-duty cabling so that the cabling does not intrinsically overheat. These proposals require both special production and special connectors, which becomes extremely costly. Moreover, the cabling in hot environments is not thereby protected, since the cooling is integrated in the cabling. The outer sheath of the cabling is therefore unprotected against heat radiation. U.S. Pat. No. 5,909,099 and EP 0823766 describe cabling used for electric cars, in which the battery pack is charged inductively. To prevent the inductance coil from becoming overheated, it is cooled via cooling ducts integrated in the cabling. In these documents, too, one or more hoses are combined with one or more electrical conductors to form a cabling. A cooling medium can then be conducted through the hose in order to cool the inductance coil. These proposals, too, require both special production and special connectors, which becomes extremely costly. Moreover, the cabling in hot environments is not thereby protected, since the cooling is integrated in the cabling. The outer sheath of the cabling is therefore unprotected against heat radiation. US 2002017390 Al describes a cable with cooling in the outer sheath intended for laying in hot pipes, for example district heating pipes. This proposal, too, requires special production and special connectors, which becomes extremely costly. DE 10012950 Al describes an air-cooled cable system in vehicles, in which one or more cables is/are disposed in a corrugated hose or in a corrugated hose system. The cables are held centered in the hose by a number of distancing elements. Cooling air is blown into the hose system by means of a cooling fan. This cable system, too, requires a special production, which becomes expensive and unwieldy. Finally, U.S. Pat. No. 6,220,955 describes a cabling in which cooling ducts and electrical conductors have been combined to allow the transmission of both electric power and cooling function in a common cabling. This document, too, describes the transmission of a cooling medium to a component, not a means of protecting a cabling from heat and heat radiation.
At the start of WiHi Head Coach Brian Hanson’s third season, there is reason for optimism. The Indians return nine starters on offense and nine defense from last year’s team that posted a 4-6 record. Hanson has what should be a disruptor for opposing offenses in 6′ 3″ 270 pound defensive lineman Dominic Bailey. Late last year the junior began to receive interest from FBS programs. Maryland was the first to offer a scholarship. Penn State, Notre Dame, and several other Power Five conference schools followed. On offense, the running back tandem of Ronnie Satchell and Cameron Kodua are expected to help lead an increase in points and as a result, wins. In 2017 WiHi averaged 15.2 points per game.
def _BuildFromSourcePackage( self, source_package_filename, rpmbuild_flags='-ta'): command = 'rpmbuild {0:s} {1:s} > {2:s} 2>&1'.format( rpmbuild_flags, source_package_filename, self.LOG_FILENAME) exit_code = subprocess.call(command, shell=True) if exit_code != 0: logging.error('Running: "{0:s}" failed.'.format(command)) return False return True
def _dict_to_obj(cls, node_dict): return RackConnectLBNodeDetail(**node_dict)
1. Field of the Invention This invention relates generally to a cleaning apparatus, and, in particular, to an apparatus especially suited for cleaning hard-surfaced floors. 2. Description of the Related Art Cleaning floors is a tedious and laborious task. Over the years, many devices have been designed for this purpose, including brooms, mops, vacuum-cleaners, and countless variations thereon. For example, U.S. Pat. Nos. 5,896,611 and 500,976 each discloses a device that utilizes a rotatable brush to accelerate debris into a collection container. These devices have the ability to pick up relatively large dirt particles, but smaller items such as dust and hair are usually left behind. Additionally, these devices generally are designed for industrial applications, and therefore, tend to be too cumbersome for household use. Meanwhile, widely-used electret cloth mops, which utilize static electricity to attract dirt, hair, and dust particles, pose the opposite problem. These devices are effective at picking up small particles, but larger debris tends to collect at the front edge of the mop where the debris is pushed across the floor until a user manually removes the debris from the floor. In addition, using electret cloth mops is time consuming because the user frequently has to replace spent electret cloth. Other floor cleaning devices, like those depicted in U.S. Pat. Nos. 5,092,699 and 5,372,609, attempt to solve this problem by providing a continually-fed cleaning cloth, but these devices are likewise incapable of picking up larger debris. Accordingly, there is a need in the art for a cleaning apparatus that is capable of removing both large and small particles from a surface, yet is easily handled and operated.
AOL is pulling the plug on servers hosting newsgroups. AOL subscribers will no longer be able to access such groups directly but will have to go through Google. Subscribers who try to access newsgroups receive the following error message from AOL: "From early 2005, AOL members will no longer be able to use the Newsgroup service through AOL. You will however be able to access Usenet newsgroups via Internet Explorer, or Google at http://groups.google.com/. For AOL alternatives, go to AOL Keyword: Community."
THE EFFECT OF GLOBAL AWARENESS ON STUDENTS' READING SKILL BASED ON AKSI DATA The Indonesian Student Competency Assessment (Asesmen Kompetensi Siswa IndonesiaAKSI) is a national survey aims to monitor the quality of education system across provinces. The results of the AKSI are expected to provide inputs on policies to improve the quality of learning outcomes in particular and the quality of education in general. The objective of AKSI is to measure students cognitive abilities, which include science, mathematics and reading. In addition, AKSI also collects data through questionnaires, one of which is about Global Awareness. The purpose of this study was to analyze the influence of student gender, parents education level, interest studying other cultures, adaptability and communication, understanding of global problems, tolerance, environmental awareness and school quality on students reading literacy skill. The data used in this study are data from the 2019 AKSI survey of 15.738 grade IX students and school accreditation of 1.805 junior high schools in Indonesia. The results of parameter estimation and hypothesis testing using the multilevel regression model concluded that gender, father's education, adaptability and communication skills, understanding of global problems, tolerance of religious and cultural differences and school quality affect students reading ability. INTRODUCTION PISA 2009 defines reading literacy as understanding, using, reflecting on and engaging with written texts, in order to achieve one's goals, to develop one's knowledge and potential, and to participate in society (Sue et al, 2013). Based on this definition, the PISA concept of reading literacy emphasises the ability to use written information in situations that students may encounter in their life at and beyond school. Responding to these technological developments, schools have an important role in helping students to develop global competencies. Schools must be critical on global development because it will affect student development. There are four dimensions of global competency targets that need to be applied, namely: the capacity to understand problems and situations; the capacity to understand and appreciate multiple perspectives and world views; able to build positive interactions with people from various backgrounds; and the capacity to take constructive action. There is an urgent need for schools to incorporate global awareness into the curriculum. A relevant curriculum is needed to help students understand various world views, social, cultural and economic and be able to understand the meaning of globalization and the role of education. Global Awareness is an understanding of environmental, social, cultural, economic and political factors that have an impact on the world globally. Case (1993: 320) states that there are five main elements that describe global topics, namely a picture of universal values and cultural practices, global interconnections, a picture of concerns and conditions around the world, the origin and pattern of world problems, and an alternative picture of the future direction of the world. The Global awareness survey can be used to measure students' abilities in terms of social sensitivity and global awareness. Social sensitivity can be shown by social networks and social environment. According to Kayatun, social networks and the social environment play an important role in student achievement. Center for Assessment and Learning (Pusmenjar), Ministry of Education and Culture has conducted a survey on the Indonesian Student Competency Assessment (AKSI) as an effort to improve the quality of education in Indonesia. One of the benefits expected in AKSI is to determine the factors of schools, teachers, students, and regional policies that affect student achievement. In 2019, the AKSI survey was conducted among grade IX SMP students. The AKSI survey consists of instruments that measure students' cognitive abilities in the fields of mathematics, reading skill (literacy) and science and collect data through student and school questionnaires. One of the student questionnaires was about global awareness. The purpose of this study was to examine the influence of student gender, parental education level, interest in learning from other cultures, adaptation and communication abilities, understanding of global problems, tolerance, environmental concern and school quality on students' reading literacy skills. METHOD The sampling method used in the AKSI survey was multistage probability sampling by selecting sample schools in each province, then selecting sample students in each selected school. This shows the existence of a multilevel data structure where student data is nested in schools. In a multilevel data structure such as the AKSI data case, students in the same school have characteristics that tend to be similar so that they do not become independent or occur intra class correlation. On the other hand, there is also great diversity between schools (heteroscedasticity). Data analysis using classical methods for nested data such as AKSI data, for example multiple linear regression, will lead to invalid results of estimation and hypothesis testing. Hox (2002Hox (, 2018 offers a solution to solve problems that arise from multilevel data structures using the Hierarchical Linear Model (HLM) or the Multilevel Linear Model (MLM), where one of them is a multilevel regression model. The multilevel regression model has a multilevel data structure with one response variable measured at the lowest level and explanatory variables measured at all levels. The simplest model is a two-level model where the first level is individual data and the second level is group data (). In the case of the AKSI data in this article, the observed response variables were reading literacy scores, while individual student data were the results from the global awareness questionnaire, while group data used school accreditation variables from the National Accreditation Board for Schools/Madrasahs. In the case of the 2019 AKSI survey data, it is defined each jth school is selected as many as nj of sample students, with j = 1, 2,, m. The number of independent variables X at the student level (level-1) is assumed to be as much as p (X1, X2,, Xp), and the independent variable at the school level (level-2) is q (Z1, Z2, Z), then the regression model level 1 regardless of the influence of the school can be written as follows: The regression coefficient at level 1 ( ) has different values between schools. The variation in the value of the regression coefficient can be explained by forming a level 2 model.The formation of a level 2 model is carried out for each regression coefficient as a response using explanatory variables at level 2. Level 2 modeling can be written as follows: The estimation of parameters in multilevel regression is used the Maximum Likelihood (ML) method, while selecting the best model is used the Likelihood Ratio Test (LRTs). The data used in this study are data from the 2019 AKSI survey of 15,738 grade IX students from 1,805 junior high schools in Indonesia. The response variable (dependent variable) observed was the students' reading literacy score (Y), while the independent variables were observed as in Table 1. Variable at Level 2 (Schools) Z Score of school accreditation RESULT AND DISCUSSION Based on 2019 AKSI data, there were around 49% boys and 51% girls. The average reading literacy score of girls was 50.58, while boys were 48.68. This result is in accordance with the results of the PISA 2018 that girls are significantly better than boys. Several studies state that the educational background of parents affects student learning outcomes. Parents who have a higher level of education can guide their children in learning according to the learning style of the child, so as to improve student learning outcomes (: 490). The results of the 2019 AKSI survey show that the majority of students' parents have a high school level education or lower (around 45% below SMA and 38% SMA). The survey results showed that the higher the parent's education, the better the reading score of the students, although students from parents with postgraduate graduates had lower average reading scores than diploma and undergraduate graduates (Figure 1). Table 2 presents the best model of parameter estimation results and hypothesis testing of the effect of independent variables at the student level and school level on reading scores using the multi-level regression method. Mother's education (X3) and interest in learning towards other cultures (X4) had no effect on students' reading literacy scores. The factors that have an influence on reading literacy scores are gender (X1), father's education (X2), adaptability skill (X5), communication skills (X6), understanding of global problems (X7) and tolerance for religious and cultural differences (X8). Based on Table 2, the best multilevel regression model can be written as follows: dengan The factors that have the greatest influence on reading literacy scores are understanding of global problems (X7) and communication skills (X6). The gender factor (X1) and students' understanding of global problems (X7) have a fixed effect, meaning that the influence of these two factors does not vary between students. On the other hand, the father's educational background (X2), communication skills (X6), and tolerance for religious and cultural differences (X8) have a random effect. This means that the influence of these three factors on students' reading literacy skills varies between students. Referring to the questions in the AKSI questionnaire, students who have a good understanding of global issues (X7) are characterized by a good understanding of climate issues, global health, migration, international conflicts, poverty, the environment and human rights. Students who have good communication skills (X6) are students who always observe the reactions of speaking partners when communicating, listen carefully to speech partners, are able to provide real examples to explain something and if there are problems with communication, they can find ways to solve them. In addition to the influence of several variables at the student level, school quality (Z) affects students' reading literacy skills. The quality of the school here is measured by the results of the accreditation carried out by BAN-S/M. The absence of interaction between variables at the student level with the Z variable means that the influence of the variables at the student's level same between school. CONCLUSION Variables at student level that affect students' reading literacy scores are gender, father's education, adaptability skill, communication skills, understanding of global issues, and tolerance for religious and cultural differences. Good communication skills and understanding of global issues are the most influencing factors for reading literacy scores. Apart from student factors, school quality (based on accreditation) also affects students' reading literacy skills. *****
Mini Solar and Sea Current Power Generation System The power demand in United Arab Emirates is increased so that there is a consistent power cut in our region. This is because of high power consumption by factories and also due to less availability of conventional energy resources. Electricity is most needed facility for the human being. All the conventional energy resources are depleting day by day. So we have to shift from conventional to non-conventional energy resources. In this the combination of two energy resources is takes place i.e. wind and solar energy. This process reviles the sustainable energy resources without damaging the nature. We can give uninterrupted power by using hybrid energy system. Basically this system involves the integration of two energy system that will give continuous power. Solar panels are used for converting solar energy and wind turbines are used for converting wind energy into electricity. This electrical power can utilize for various purpose. Generation of electricity will be takes place at affordable cost. This paper deals with the generation of electricity by using two sources combine which leads to generate electricity with affordable cost without damaging the nature balance. The purpose of this project was to design a portable and low cost power system that combines both sea current electric turbine and solar electric technologies. This system will be designed in efforts to develop a power solution for remote locations or use it as another source of green power. Introduction Since the invention of first engine in 17th century, energy Consumption has been used due to many causes in many different ways. Persistent increase in the energy demand has caused to seek, new energy resources in the world; new alternative energy. Resources have been also utilized to minimize the energy deficit. Figure 1 shows a chart of the difference between early consumption and now with different types of resources weather its renewable or non-renewable energy. In the early age, people didn't use too much energy but as time passes, energy demand had increase and the world is now searching for energy resources. Non-renewable energy sources are highly used in caparison with renewable energy and that will cause in environmental problems such as global warming. Electricity is most needed for our day to day life. There are two ways of electricity generation either renewable or non-renewable. Electrical energy demand increases in word so to fulfill demand we have to generate electrical energy. Now a day's most of electrical energy is generated by the non-renewable energy resources like coal, diesel, and nuclear. The main cons of these sources are pollution and green house effects where it contributes in global warming and the nuclear waste is very harmful to living organism. The non-renewable energy resources are depleting day by day. Soon it will be completely vanishes from the earth so we have to find another way to generate electricity. The new source should be reliable, pollution free and economical. The renewable energy resources should be good alternative energy resources for the non-renewable energy resources. There are many renewable energy resources like geothermal, tidal, wind, solar. Solar energy has drawback that it could not produce electrical energy in rainy and cloudy season so we need to overcome this drawback we can use two energy resources so that any one of source fails other source will keep generating the electricity. And in good weather condition we can use both sources combine. In the United Arab Emirates, solar energy is the best renewable energy we have but one source is never enough. Combing another source with solar energy will give us more power and more reliability in extracting power without burning fossil fuel or damaging the environment. So the best option beside solar is wind but we don't have too much space to make Huge wind farms, so we thought of sea current power generation which have the same concept of wind energy but under the sea. The turbines area will be much smaller due to the density of the water which is thousand times larger than the wind density. Other renewable source is not as great as sea current energy due to limitations such as the surrounding environment like geothermal. We have few places that are suitable for generation but the places are already occupied with other things such as swimming pools and other facilities. The sea is vast and we can place the turbines any place we want. The mechanism of the working of solar panels is depicted in figure 2. Figure 2. PV Solar As shown in figure 2. The sunlight is directed to the silicon material, then the n-type and p-type material react upon this energy, resulting of moving of charge carriers. Mainly hole-electron movement. Finally, electrical current is induced. Next we will talk briefly about wind power. Figure 3 shows the Wind turbines. Wind turbines are used to convert the wind power into Electric power. Electric generator inside the turbine converts the mechanical power into the electric power. Wind turbine systems are available ranging from 50W to 2-3 MW. The energy Production by wind turbines depends on the wind velocity acting on the turbine. Wind power is used to feed both energy production and consumption demand, and transmission lines in the rural areas. We have two types of turbines in general, horizontal and vertical turbines, each one of them is used in different areal conditions. Here is a figure that will show the structure of wind turbine. Figure 3. Wind Turbine The system will be improved by combing it with other source to make a reliable hybrid system. By knowing the power demand, we can calculate the size and the quantity of the pv panels and the same for the sea current turbine generator. There are two types of sea current, deep sea current and surface sea current. Deep sea current is affected by the melted salt and the difference between densities while the surface sea current is a affected by the wind. Surface sea current is deep down to 100m while more than 100 consider as deep sea current. In this project we will use surface sea current to make the turbine move and generate electricity. The concept of sea current turbines is exactly same as wind turbines and how they work. The gear box, shaft, nacelle, and so on are in the design. The only different is in the size where the underwater turbines will be much smaller and the materials that will be used to create the turbines to make them reliable under water and won't be affected easily by the salt and rust. Site characteristics United Arab Emirates is located in the gulf region United Arab Emirates' latitude and longitude is 24° 00' N and 54° 00' E. The United Arab Emirates Climate features extreme heat, UAE weather is sunny all the year round, This can be easily seen in figure 4. Solar Energy Potential Direct normal irradiation: The estimated direct normal irradiation is plotted with respect to the month for six stations. Figure 6 displays the average peak sun hours per day in the UAE for each month. The yearly average peak sun hours/day used in calculations in the UAE is 5.84 Peak sun hour International Sea current energy potential United Arab Emirates have many islands and water surrounding the country, we can use the sea current to generate energy, the water has at least 1000density and salty water have even more. So even a speed of 1m/s is enough to generate clean power. Figure shows the potential of wind energy, as long as there is small wind energy to move the sea current, we can generate energy. Figure 7. the potential of wind energy Conceptual design The system will use sea current turbines and solar panels to extract energy. It will let the two sources extract independently and it would be connected t to a hybrid wind solar charge controller, which will store the produced energy in a battery bank. The charge controller to maintain everything and to store the energy safely. Then from the battery to the inverter to convert DC to AC, then from the inverter to the AC load. In this project we are going to use 6 major process to complete the system as shown in figure.  AC load: we need to put a maximum load so we can design a system based on our maximum load.  Inverter: Inverter is need to convert DC power into AC power.  Battery bank: the system needs a battery bank size per the load requirement so that it should fulfill the requirement of load.  Hybrid solar sea current controller: Charge controller has basic function is that it control the source which is to be active or inactive. It stores the power that were extracted from the sources to the batteries and take power from the battery to the inverter. The controller has over-charge protection and short-circuit protection. This will increase the battery lifespan  Solar panels (PV): Solar panel Solar panel is use to convert solar radiation to the electrical energy.  Sea current turbines: Sea current turbine is that system which extracts energy from sea current by rotation of the blades. Modeling of PV System The required size of pv panel. Modeling of Wind System Power available in wind at a specific site depends on three things: air density, area of rotor and wind speed. Wind power can be calculated using this formula. We want to produce at least 80 watt. Aw= 0.28m2 R =0.3m Controller size We can also choose the size depending on the maximum produces watt on both sources. The system needs a controller which will withstand 20 watt from solar panels and 80 watt from current turbine. It won't be easy to find one because hybrid controllers always need more watt to operate. We may have to use a bigger controller because the smallest charge controller can withstand 300 watt from water generation and 150watt from solar generation. Conclusion Hybrid power generation system is good and effective solution for power generation than nonrenewable energy resources. It has greater efficiency. It can provide to remote places where government is unable to reach. So that the power can be utilize where it generated so that it will reduce the transmission losses and cost. Cost reduction can be done by increasing the production of the equipment. People should motivate to use the renewable energy resources not only for the personal good but for the global and environment good too. It is highly safe for the environment as it doesn't produce any emission and harmful waste product like conventional energy resources. It is cost effective solution for generation. It only need initial investment. It has also long life span, it only needs little, uncostly maintenance after a certain periods of time Overall it good, reliable and affordable
// Copyright (c) 2009-2017 The Bitcoin developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <boost/assign/list_of.hpp> // for 'map_list_of()' #include <boost/foreach.hpp> #include "checkpoints.h" #include "proofs.h" #include "txdb.h" #include "main.h" #include "uint256.h" static const int nCheckpointSpan = 5000; namespace Checkpoints { typedef std::map<int, uint256> MapCheckpoints; // // What makes a good checkpoint block? // + Is surrounded by blocks with reasonable timestamps // (no blocks before with a timestamp after, none after with // timestamp before) // + Contains no strange transactions // static MapCheckpoints mapCheckpoints = boost::assign::map_list_of (0, Params().HashGenesisBlock()) (1, uint256("0x0000000008f710a0e18d0d04a4b86341346611b3e7984f5ee5b3d9010caa0d38")) (1000, uint256("0x0000000095750ba4eb4f8d7ac82af03400209e111df3667e51fb6d9cda6edf4d")) (2000, uint256("0x000000005fdbc5bf8389f15596a06872663e68d49dd84e87de9d2a0494041fec")) (3000, uint256("0x267761f6aa6eb9b96a4c48e593cf17ed7572dc91125e0e5eeb8ba3ec2efda1d1")) (5000, uint256("0x411c6b3f7d7730d851536b7a7ce95d0ba3b4f7c8c4c24142e9b01c469d6e9439") ) (10000, uint256("0xe044586abcaae3cb6e7b4756713136ca538c30d0e885edc6a3af6e681b480d05") ) (20000, uint256("0x255d7cf5cbb7eece52fc6752be56c4f180b1bf71d83bbee04b84f33cf498c499") ) (30000, uint256("0xe6bfd03712c8146cc558ecffad3bd529fec3f15eea08b3e8d38f5a4e7c57a2de") ) (40000, uint256("0x11d58efe6ecb82d3c0d3d1dbc3b9cc51460890afe047ac2211da71cc32f8f127") ) (50000, uint256("0xe482040a0ab71589b23dd2fe257d67a2f2712dafb085079d76c6c46dbef91c87") ) (60000, uint256("0xd38b50003666d67bc340bb2343fdc1ebbde36ce597f7975ac3b813b1eb46d184") ) (70000, uint256("0xd8cb10c2f2dd34c75d7e6ea80ae656543bf1f37ae497d4c521e55180abc51bbb") ) (80000, uint256("0xc3af51f48d51b23a738af34f38d56b30066e6c0d1ad95b18f2a1aff5ddafd3fd") ) (90000, uint256("0x17b4cefd793a650a7b87b69223fa7bc68382430be96447c07504ee26ec632211") ) (100000, uint256("0xfac73bc88550f6e8682ccb54002744eef7b2b6ff6495fe01618a8dcd3aa33375") ) (110000, uint256("0x382b974d4f0282036def807d5229d9d97e97b9a3928a591066f77d1e8e58a9e9") ) (130000, uint256("0x3ee4dafd7875038b16b57909692f30c4c553287c487cd56f054b566421995469") ) (150000, uint256("0x0e815b1d3385f31b42f552413ccd03c2a1aace2f409ce1e6708c7ba375f19c6a") ) (160000, uint256("0x9c823e9bef7b1977bdf2aa81f56d84e3611f8898c8fcafca4b6dcba29678e88f") ) (170000, uint256("0xfd3428b280b1e8b00f25c0d34370195aa7c396707d1ac42c7b94ba22c26765a6") ) (180000, uint256("0x346d797caeda2a90e0cd313c55b8210852ef9830031804f4d375494942c77b81") ) (190000, uint256("0x02adc3301ec840e070bbb3e5f9cb814afca92aa32511801bb6317d3d7148376b") ) (200000, uint256("0x99057098c705addb384db3fd7cdf5b56e20c3f25b7d6a77673853416653335cd") ) (210000, uint256("0xd77a0ee3874716767bf57c4c069042aca1bb747814a4565beacb5fcab08be131") ) (220000, uint256("0xeeaf134d5903095a1b57371e61e42803d80650a12d584abc2fcfd7cca16374d4") ) (230000, uint256("0x5598e2bd96af7b4196c36cbe772af28a4976d55196271661e1713ee61f88c662") ) (240000, uint256("0x6a7f4955ef370eef576916d0d55e5b8706b259c9d0fb653deae550e4b58d3226") ) (250000, uint256("0x319315bc50e11cac98b5e1c623c752152dae619875c238543e2b019ca945c392") ) (260000, uint256("0xeea4e7b10824ca0f861fdceb31de38d13149ca98ea6d91a7a7aaa67489bb0226") ) (270000, uint256("0x3708c6e7c368546c3f1898899cf9ed64141afd4629aa7deabaaade36ca7bb1da") ) (280000, uint256("0x47aea455a98143fc757efa52a34573c933d2ac98a28e5b21caa5f0e1e2a31bca") ) (290000, uint256("0x47103a06aefea0f28dc385d2c7087d8c3a4f0c8faf86eb744bb0dc6eed3a8d09") ) (300000, uint256("0x10fd0e64c225b38918404c3b81bf7260d62b60fceda47a4884b92b097321ddaa") ) (310000, uint256("0x80111da6dbaa1f7a8acfa70fe69ec3a7113614954302c75d84d6c37d7e3e6611") ) (320000, uint256("0x03d63bf2cbeef9478ee371adf8b3eda8e0420d343f84176f146fa340568aca86") ) (330000, uint256("0x0e95bc10857dc9c17a0b25dfed899c7bd1b53b0ad7dc288eeb1b67ba655dbb7b") ) (340000, uint256("0x782c4ab3887ec2ce87b850598c5ca1f3ced5531b7b155060b187972bf18ae5a5") ) (350000, uint256("0x7b6f2d6f2608f7af2a482e4abb6f568d4c23a869481ff6b0e53d3ad0f4da12d1") ) (360000, uint256("0xea8fe16e4d19c56c60fa8e59af3d44bb1036fef96508520fb00877b3328058d5") ) (370000, uint256("0xd1392edc0109deaac872a51f20697cdb835695ffec9bec2aa61b4110e06efc86") ) (380000, uint256("0x6c0185275d224c6cfb703a1baae536207fb095be908589b9742d1a806c35ae1d") ) (390000, uint256("0x44a9ea269624163c85499e2a2880fa12be6ff7b5b123f49156897fd1bf0de029") ) (400000, uint256("0x7d872c7a5e08ed6e4983fa242e7b29757ee70eb19f6cfdb1a22a4e1796384485") ) (410000, uint256("0x86f1223127ad37def84b1a20e97269c35d89a3cb02e663bdcea3e2e42d24e516") ) (420000, uint256("0x994cd2ab0b06c7e27d4dc6aab6943ab58924ad2346c57dc045c3c24eee920ff6") ) (430000, uint256("0x666ab7e447ddf94f3f489b5c6bafbd53735bb47147e537431aeafe6428eaa14f") ) (440000, uint256("0x1a9904aa0bc8f6a13df3943af6d144ddd227a1992839c5a86fa9a01e998d7c7c") ) (450000, uint256("0x9e3813f189c94e66c626e763dfcc3d28568d242a86a20c23952d091834fca14b") ) (460000, uint256("0x7f4080c1a29ecad63dca18e102314fcf1cc1353ce6ad571dfb962095adb4fe67") ) (470000, uint256("0x5850ff5f89757816a1cc37d9260415704112fb143d05edc3b8030ea4115a35b5") ) (480000, uint256("0xe07edb2ba8625ce973cfc0900556473e3778b9bfa0ad8454c2206ee63168b6db") ) (490000, uint256("0xb54b79209ae33021fd33b9f2d0232fc5df0ff4db0dda3ef5826eaf4117ecc5a6") ) (500000, uint256("0x7cb9aa0250a0581e14832dece393fb291e5e15bf5f012d9d79c6e6f62b94395a") ) (510000, uint256("0x043331174c99e5ab46002f9e0d66a4985e77fc67fdb8634e9f94818ee062d059") ) (520000, uint256("0x850e1dc60594ba2ef46d9769d15a637bc746a52a4877eaddb32d3b00a439d163") ) (530000, uint256("0xf26cbd8489378fd11cae469d95ecd9b0f25ddd89d83ac74510246d3cd6ef4c07") ) (540000, uint256("0xe878fcdf5059ddf8ee75a1ce554c3607c2e03f461c0d57f7f962e6c7c1733b7b") ) (550000, uint256("0x7901247ed30472a0c8d0e96cbdf9706e5e7f1f1b26c8742ea21e31ec6f33c766") ) (560000, uint256("0x569a1e5e36a0b1253934348b3d636d3383ea0636ac23de4da867246bc081777c") ) (570000, uint256("0x17db255a36f95171378cb8306db6397774ca59117a238d4e38f500697b4f9358") ) (580000, uint256("0x2bad7303e64e55f5146115fdbc51ab6ed2b3c10ff1078825ffe22a7094fa0ed4") ) (590000, uint256("0x4850c594fe0b00eb56ed673f3f7266cd0123637af09402ef2da0813e32a1414f") ) (600000, uint256("0x4815650bafcfc32e2aeaeb74fb6a5ec63f2063f6fd2f798ae1879082a9e05e0d") ) (602700, uint256("0x32aaf58df85f54868fdd43f7a2eface06de6aa1d8751daedb81d56584a0839dc") ) /* */ ; // TestNet has no checkpoints static MapCheckpoints mapCheckpointsTestnet; bool CheckHardened(int nHeight, const uint256& hash) { MapCheckpoints& checkpoints = (TestNet() ? mapCheckpointsTestnet : mapCheckpoints); MapCheckpoints::const_iterator i = checkpoints.find(nHeight); if (i == checkpoints.end()) return true; return hash == i->second; } int GetTotalBlocksEstimate() { MapCheckpoints& checkpoints = (TestNet() ? mapCheckpointsTestnet : mapCheckpoints); if (checkpoints.empty()) return 0; return checkpoints.rbegin()->first; } CBlockIndex* GetLastCheckpoint(const std::map<uint256, CBlockIndex*>& mapBlockIndex) { MapCheckpoints& checkpoints = (TestNet() ? mapCheckpointsTestnet : mapCheckpoints); BOOST_REVERSE_FOREACH(const MapCheckpoints::value_type& i, checkpoints) { const uint256& hash = i.second; std::map<uint256, CBlockIndex*>::const_iterator t = mapBlockIndex.find(hash); if (t != mapBlockIndex.end()) return t->second; } return NULL; } // Automatically select a suitable sync-checkpoint const CBlockIndex* AutoSelectSyncCheckpoint() { const CBlockIndex *pindex = pindexBest; // Search backward for a block within max span and maturity window while (pindex->pprev && pindex->nHeight + nCheckpointSpan > pindexBest->nHeight) pindex = pindex->pprev; return pindex; } // Check against synchronized checkpoint bool CheckSync(int nHeight) { const CBlockIndex* pindexSync = AutoSelectSyncCheckpoint(); if (nHeight <= pindexSync->nHeight){ return false; } return true; } }
College Students Online Behavior Analysis During Epidemic Prevention and Control During the novel coronavirus pneumonia epidemic prevention and control period, various network applications have increased, resulting in massive network user behavior data in log form. In order to detect the abnormal behavior, K- means clustering algorithm based on Hadoop is used to cluster the user behavior, and the association rules obtained by mining are used to explain the preference of the campus network users on the access. Then, a prototype system of mobile application network behavior analysis is designed and implemented, which supports feature extraction and application network behavior analysis of mobile application network behavior. The results show that the model can effectively improve the efficiency and accuracy of students' online user behavior analysis, and achieve the purpose of accurate prediction.
/* * Copyright (c) 2016 Cisco and/or its affiliates. * 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 <lb/lb.h> #include <vnet/gre/packet.h> #include <lb/lbhash.h> #define foreach_lb_error \ _(NONE, "no error") \ _(PROTO_NOT_SUPPORTED, "protocol not supported") typedef enum { #define _(sym,str) LB_ERROR_##sym, foreach_lb_error #undef _ LB_N_ERROR, } lb_error_t; static char *lb_error_strings[] = { #define _(sym,string) string, foreach_lb_error #undef _ }; typedef struct { u32 vip_index; u32 as_index; } lb_trace_t; u8 * format_lb_trace (u8 * s, va_list * args) { lb_main_t *lbm = &lb_main; CLIB_UNUSED (vlib_main_t * vm) = va_arg (*args, vlib_main_t *); CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *); lb_trace_t *t = va_arg (*args, lb_trace_t *); if (pool_is_free_index(lbm->vips, t->vip_index)) { s = format(s, "lb vip[%d]: This VIP was freed since capture\n"); } else { s = format(s, "lb vip[%d]: %U\n", t->vip_index, format_lb_vip, &lbm->vips[t->vip_index]); } if (pool_is_free_index(lbm->ass, t->as_index)) { s = format(s, "lb as[%d]: This AS was freed since capture\n"); } else { s = format(s, "lb as[%d]: %U\n", t->as_index, format_lb_as, &lbm->ass[t->as_index]); } return s; } lb_hash_t *lb_get_sticky_table(u32 thread_index) { lb_main_t *lbm = &lb_main; lb_hash_t *sticky_ht = lbm->per_cpu[thread_index].sticky_ht; //Check if size changed if (PREDICT_FALSE(sticky_ht && (lbm->per_cpu_sticky_buckets != lb_hash_nbuckets(sticky_ht)))) { //Dereference everything in there lb_hash_bucket_t *b; u32 i; lb_hash_foreach_entry(sticky_ht, b, i) { vlib_refcount_add(&lbm->as_refcount, thread_index, b->value[i], -1); vlib_refcount_add(&lbm->as_refcount, thread_index, 0, 1); } lb_hash_free(sticky_ht); sticky_ht = NULL; } //Create if necessary if (PREDICT_FALSE(sticky_ht == NULL)) { lbm->per_cpu[thread_index].sticky_ht = lb_hash_alloc(lbm->per_cpu_sticky_buckets, lbm->flow_timeout); sticky_ht = lbm->per_cpu[thread_index].sticky_ht; clib_warning("Regenerated sticky table %p", sticky_ht); } ASSERT(sticky_ht); //Update timeout sticky_ht->timeout = lbm->flow_timeout; return sticky_ht; } u64 lb_node_get_other_ports4(ip4_header_t *ip40) { return 0; } u64 lb_node_get_other_ports6(ip6_header_t *ip60) { return 0; } static_always_inline u32 lb_node_get_hash(vlib_buffer_t *p, u8 is_input_v4) { u32 hash; if (is_input_v4) { ip4_header_t *ip40; u64 ports; ip40 = vlib_buffer_get_current (p); if (PREDICT_TRUE (ip40->protocol == IP_PROTOCOL_TCP || ip40->protocol == IP_PROTOCOL_UDP)) ports = ((u64)((udp_header_t *)(ip40 + 1))->src_port << 16) | ((u64)((udp_header_t *)(ip40 + 1))->dst_port); else ports = lb_node_get_other_ports4(ip40); hash = lb_hash_hash(*((u64 *)&ip40->address_pair), ports, 0, 0, 0); } else { ip6_header_t *ip60; ip60 = vlib_buffer_get_current (p); u64 ports; if (PREDICT_TRUE (ip60->protocol == IP_PROTOCOL_TCP || ip60->protocol == IP_PROTOCOL_UDP)) ports = ((u64)((udp_header_t *)(ip60 + 1))->src_port << 16) | ((u64)((udp_header_t *)(ip60 + 1))->dst_port); else ports = lb_node_get_other_ports6(ip60); hash = lb_hash_hash(ip60->src_address.as_u64[0], ip60->src_address.as_u64[1], ip60->dst_address.as_u64[0], ip60->dst_address.as_u64[1], ports); } return hash; } static_always_inline uword lb_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame, u8 is_input_v4, //Compile-time parameter stating that is input is v4 (or v6) u8 is_encap_v4) //Compile-time parameter stating that is GRE encap is v4 (or v6) { lb_main_t *lbm = &lb_main; u32 n_left_from, *from, next_index, *to_next, n_left_to_next; u32 thread_index = vlib_get_thread_index(); u32 lb_time = lb_hash_time_now(vm); lb_hash_t *sticky_ht = lb_get_sticky_table(thread_index); from = vlib_frame_vector_args (frame); n_left_from = frame->n_vectors; next_index = node->cached_next_index; u32 nexthash0 = 0; if (PREDICT_TRUE(n_left_from > 0)) nexthash0 = lb_node_get_hash(vlib_get_buffer (vm, from[0]), is_input_v4); while (n_left_from > 0) { vlib_get_next_frame (vm, node, next_index, to_next, n_left_to_next); while (n_left_from > 0 && n_left_to_next > 0) { u32 pi0; vlib_buffer_t *p0; lb_vip_t *vip0; u32 asindex0; u16 len0; u32 available_index0; u8 counter = 0; u32 hash0 = nexthash0; if (PREDICT_TRUE(n_left_from > 1)) { vlib_buffer_t *p1 = vlib_get_buffer (vm, from[1]); //Compute next hash and prefetch bucket nexthash0 = lb_node_get_hash(p1, is_input_v4); lb_hash_prefetch_bucket(sticky_ht, nexthash0); //Prefetch for encap, next CLIB_PREFETCH (vlib_buffer_get_current(p1) - 64, 64, STORE); } if (PREDICT_TRUE(n_left_from > 2)) { vlib_buffer_t *p2; p2 = vlib_get_buffer(vm, from[2]); /* prefetch packet header and data */ vlib_prefetch_buffer_header(p2, STORE); CLIB_PREFETCH (vlib_buffer_get_current(p2), 64, STORE); } pi0 = to_next[0] = from[0]; from += 1; n_left_from -= 1; to_next += 1; n_left_to_next -= 1; p0 = vlib_get_buffer (vm, pi0); vip0 = pool_elt_at_index (lbm->vips, vnet_buffer (p0)->ip.adj_index[VLIB_TX]); if (is_input_v4) { ip4_header_t *ip40; ip40 = vlib_buffer_get_current (p0); len0 = clib_net_to_host_u16(ip40->length); } else { ip6_header_t *ip60; ip60 = vlib_buffer_get_current (p0); len0 = clib_net_to_host_u16(ip60->payload_length) + sizeof(ip6_header_t); } lb_hash_get(sticky_ht, hash0, vnet_buffer (p0)->ip.adj_index[VLIB_TX], lb_time, &available_index0, &asindex0); if (PREDICT_TRUE(asindex0 != ~0)) { //Found an existing entry counter = LB_VIP_COUNTER_NEXT_PACKET; } else if (PREDICT_TRUE(available_index0 != ~0)) { //There is an available slot for a new flow asindex0 = vip0->new_flow_table[hash0 & vip0->new_flow_table_mask].as_index; counter = LB_VIP_COUNTER_FIRST_PACKET; counter = (asindex0 == 0)?LB_VIP_COUNTER_NO_SERVER:counter; //TODO: There are race conditions with as0 and vip0 manipulation. //Configuration may be changed, vectors resized, etc... //Dereference previously used vlib_refcount_add(&lbm->as_refcount, thread_index, lb_hash_available_value(sticky_ht, hash0, available_index0), -1); vlib_refcount_add(&lbm->as_refcount, thread_index, asindex0, 1); //Add sticky entry //Note that when there is no AS configured, an entry is configured anyway. //But no configured AS is not something that should happen lb_hash_put(sticky_ht, hash0, asindex0, vnet_buffer (p0)->ip.adj_index[VLIB_TX], available_index0, lb_time); } else { //Could not store new entry in the table asindex0 = vip0->new_flow_table[hash0 & vip0->new_flow_table_mask].as_index; counter = LB_VIP_COUNTER_UNTRACKED_PACKET; } vlib_increment_simple_counter(&lbm->vip_counters[counter], thread_index, vnet_buffer (p0)->ip.adj_index[VLIB_TX], 1); //Now let's encap { gre_header_t *gre0; if (is_encap_v4) { ip4_header_t *ip40; vlib_buffer_advance(p0, - sizeof(ip4_header_t) - sizeof(gre_header_t)); ip40 = vlib_buffer_get_current(p0); gre0 = (gre_header_t *)(ip40 + 1); ip40->src_address = lbm->ip4_src_address; ip40->dst_address = lbm->ass[asindex0].address.ip4; ip40->ip_version_and_header_length = 0x45; ip40->ttl = 128; ip40->length = clib_host_to_net_u16(len0 + sizeof(gre_header_t) + sizeof(ip4_header_t)); ip40->protocol = IP_PROTOCOL_GRE; ip40->checksum = ip4_header_checksum (ip40); } else { ip6_header_t *ip60; vlib_buffer_advance(p0, - sizeof(ip6_header_t) - sizeof(gre_header_t)); ip60 = vlib_buffer_get_current(p0); gre0 = (gre_header_t *)(ip60 + 1); ip60->dst_address = lbm->ass[asindex0].address.ip6; ip60->src_address = lbm->ip6_src_address; ip60->hop_limit = 128; ip60->ip_version_traffic_class_and_flow_label = clib_host_to_net_u32 (0x6<<28); ip60->payload_length = clib_host_to_net_u16(len0 + sizeof(gre_header_t)); ip60->protocol = IP_PROTOCOL_GRE; } gre0->flags_and_version = 0; gre0->protocol = (is_input_v4)? clib_host_to_net_u16(0x0800): clib_host_to_net_u16(0x86DD); } if (PREDICT_FALSE (p0->flags & VLIB_BUFFER_IS_TRACED)) { lb_trace_t *tr = vlib_add_trace (vm, node, p0, sizeof (*tr)); tr->as_index = asindex0; tr->vip_index = vnet_buffer (p0)->ip.adj_index[VLIB_TX]; } //Enqueue to next //Note that this is going to error if asindex0 == 0 vnet_buffer (p0)->ip.adj_index[VLIB_TX] = lbm->ass[asindex0].dpo.dpoi_index; vlib_validate_buffer_enqueue_x1 (vm, node, next_index, to_next, n_left_to_next, pi0, lbm->ass[asindex0].dpo.dpoi_next_node); } vlib_put_next_frame (vm, node, next_index, n_left_to_next); } return frame->n_vectors; } static uword lb6_gre6_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) { return lb_node_fn(vm, node, frame, 0, 0); } static uword lb6_gre4_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) { return lb_node_fn(vm, node, frame, 0, 1); } static uword lb4_gre6_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) { return lb_node_fn(vm, node, frame, 1, 0); } static uword lb4_gre4_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) { return lb_node_fn(vm, node, frame, 1, 1); } VLIB_REGISTER_NODE (lb6_gre6_node) = { .function = lb6_gre6_node_fn, .name = "lb6-gre6", .vector_size = sizeof (u32), .format_trace = format_lb_trace, .n_errors = LB_N_ERROR, .error_strings = lb_error_strings, .n_next_nodes = LB_N_NEXT, .next_nodes = { [LB_NEXT_DROP] = "error-drop" }, }; VLIB_REGISTER_NODE (lb6_gre4_node) = { .function = lb6_gre4_node_fn, .name = "lb6-gre4", .vector_size = sizeof (u32), .format_trace = format_lb_trace, .n_errors = LB_N_ERROR, .error_strings = lb_error_strings, .n_next_nodes = LB_N_NEXT, .next_nodes = { [LB_NEXT_DROP] = "error-drop" }, }; VLIB_REGISTER_NODE (lb4_gre6_node) = { .function = lb4_gre6_node_fn, .name = "lb4-gre6", .vector_size = sizeof (u32), .format_trace = format_lb_trace, .n_errors = LB_N_ERROR, .error_strings = lb_error_strings, .n_next_nodes = LB_N_NEXT, .next_nodes = { [LB_NEXT_DROP] = "error-drop" }, }; VLIB_REGISTER_NODE (lb4_gre4_node) = { .function = lb4_gre4_node_fn, .name = "lb4-gre4", .vector_size = sizeof (u32), .format_trace = format_lb_trace, .n_errors = LB_N_ERROR, .error_strings = lb_error_strings, .n_next_nodes = LB_N_NEXT, .next_nodes = { [LB_NEXT_DROP] = "error-drop" }, };
package pl.allegro.tech.opel; import java.util.concurrent.CompletableFuture; class LiteralExpressionNode implements OpelNode { private final Object value; public LiteralExpressionNode(Object value) { this.value = value; } @Override public CompletableFuture<?> getValue(EvalContext evalContext) { return CompletableFuture.completedFuture(value); } }
use clojure::rust::*; /// Protocol `Counted` use crate::*; // use clojure::lang::*; pub trait Counted: IObject { /// give the nr of elements fn count(&self) -> ObjResult<usize>; }
import * as azmaps from 'azure-maps-control'; import * as azmdraw from 'azure-maps-drawing-tools'; declare namespace atlas { export module control { /** The events supported by the `RouteRangeControl`. */ export interface RouteRangeControlEvents { /** Event fired when a route range has been calculated. */ rangecalculated: azmaps.data.Polygon | azmaps.data.MultiPolygon; /** Event fired when a route range is calculated and the showArea option is set to true. */ showrange: azmaps.data.Polygon | azmaps.data.MultiPolygon; /** Event fired when an error occurs. */ error: string; } /** A control that provides a form for requesting a route range polygon. Adds a marker to the map to select an origin location. */ export class RouteRangeControl extends azmaps.internal.EventEmitter<RouteRangeControlEvents> implements azmaps.Control { /**************************** * Constructor ***************************/ /** * A control that provides a form for requesting a route range polygon. Adds a marker to the map to select an origin location. * @param options Options for defining how the control is rendered and functions. */ constructor(options?: RouteRangeControlOptions); /**************************** * Public Methods ***************************/ /** Disposes the control. */ public dispose(): void; /** * Sets the options for the marker. * @param options Marker options. */ public setMarkerOptions(options: azmaps.HtmlMarkerOptions): void; /** * Hides or shows the route range control. * @param isVisible Specifies if the route range control should be displayed or not. */ public setVisible(isVisible: boolean): void; /** Gets the options of the selection control. */ public getOptions(): RouteRangeControlOptions; /** * Action to perform when the control is added to the map. * @param map The map the control was added to. * @param options The control options used when adding the control to the map. * @returns The HTML Element that represents the control. */ public onAdd(map: azmaps.Map, options?: azmaps.ControlOptions): HTMLElement; /** * Action to perform when control is removed from the map. */ public onRemove(): void; } /** The events supported by the `SelectionControl`. */ export interface SelectionControlEvents { /** Event fired when shapes are selected from the specified data source. */ dataselected: azmaps.Shape[]; } /** A control that lets the user use different methods to select data from the map. */ export class SelectionControl extends azmaps.internal.EventEmitter<SelectionControlEvents> implements azmaps.Control { /**************************** * Constructor ***************************/ /** * A control that lets the user use different methods to select data from the map. * @param options Options for defining how the control is rendered and functions. */ constructor(options?: SelectionControlOptions); /**************************** * Public Methods ***************************/ /** * Clears any search area polygons added to the map by the selection control. */ public clear(): void; /** Disposes the control. */ public dispose(): void; /** Gets the underlying drawing manager of the selection control. */ public getDrawingManager(): azmdraw.drawing.DrawingManager; /** Gets the options of the selection control. */ public getOptions(): SelectionControlOptions; /** Updates the data source used for searching/selection. */ public setSource(source: azmaps.source.DataSource): void; /** * Action to perform when the control is added to the map. * @param map The map the control was added to. * @param options The control options used when adding the control to the map. * @returns The HTML Element that represents the control. */ public onAdd(map: azmaps.Map, options?: azmaps.ControlOptions): HTMLElement; /** * Action to perform when control is removed from the map. */ public onRemove(): void; } } export module math { /** * Gets all point features that are within a polygon. * @param points Point features to filter. * @param searchArea The search area to search within. */ export function pointsWithinPolygon(points: azmaps.data.Feature<azmaps.data.Point, any>[], searchArea: azmaps.data.Polygon | azmaps.data.MultiPolygon | azmaps.data.Feature<azmaps.data.Geometry, any> | azmaps.Shape): azmaps.data.Feature<azmaps.data.Point, any>[]; /** * Gets all shapes that have point features that are within a polygon. * @param shapes Data source or array of shapes with point geometries to filter. Any non-Point geometry shapes will be ignored. * @param searchArea The search area to search within. */ export function shapePointsWithinPolygon(shapes: azmaps.Shape[] | azmaps.source.DataSource, searchArea: azmaps.data.Polygon | azmaps.data.MultiPolygon | azmaps.data.Feature<azmaps.data.Geometry, any> | azmaps.Shape): azmaps.Shape[]; /** * Converts a weight value from one unit to another. * Supported units: kilograms, pounds, metricTon, longTon, shortTon * @param weight The weight value to convert. * @param fromUnits The weight units the value is in. * @param toUnits The weight units to convert to. * @param decimals The number of decimal places to round the result to. * @returns An weight value convertered from one unit to another. */ export function convertWeight(weight: number, fromUnits: string | WeightUnits, toUnits: string | WeightUnits, decimals?: number): number; } /** Options for the RouteRangeControl. */ export interface RouteRangeControlOptions { /** * Options for customizing the look of the marker used for selecting the origin location. */ markerOptions?: azmaps.HtmlMarkerOptions; /** * The style of the control. Can be; light, dark, or auto. When set to auto, the style will change based on the map style. * Overridden if device is in high contrast mode. Default: `'light'` */ style?: azmaps.ControlStyle; /** Specifies if the control should be visible when added to the map. Default: `false` */ isVisible?: boolean; /** How to position the control when added to the map with non-fixed position. Default: `'left'` */ position?: 'left' | 'center' | 'right'; /** Specifies if the control should hide after a search is done. When set to false, the cancel button is not displayed. Default: `false` */ collapsible?: boolean; /** * Specifies if a route range should be calculated automatically when the marker is moved either with the mouse arrow keys when the top level route range control has focus or by dragging the marker with the mouse. * Note that this can result in a lot of additional requests being generated. * Default: `true` */ calculateOnMarkerMove?: boolean; } /** Options for the SelectionControlOptions. */ export interface SelectionControlOptions { /** * The style of the control. Can be; light, dark, or auto. When set to auto, the style will change based on the map style. * Overridden if device is in high contrast mode. * @default light */ style?: azmaps.ControlStyle; /** * The data source to query data from. */ source?: azmaps.source.DataSource; /** The selection modes to display in the selection control. */ selectionModes?: SelectionControlMode[] | 'all'; /** The color to fill the search area with. Default: `'#797775'` */ fillColor?: string; /** The opacity of the fill color of the search area: Default: `0.5` */ fillOpacity?: number; /** The color to outline of the search area with. Default: `'#797775'` */ strokeColor?: string; /** The width of the outline of the search area: Default: `1` */ strokeWidth?: number; /** Specifies if the search area polygon should stay visible after being drawn. Will be removed if the selection control button is pressed again. Default: `false` */ persistSearchArea?: boolean; /** The mininum size of the map in order for route range option to be available. Format: [width, height] Default: [325, 200] */ routeRangeMinMapSize?: [number, number]; /** Options for the underlying route range control. */ routeRangeOptions?: RouteRangeControlOptions; } /** Units of weight measurements */ export enum WeightUnits { /** A standard metric unit of measurement. */ kilograms = 'kilograms', /** A mass measurement unit equal to 0.45359237 kilograms. */ pounds = 'pounds', /** A metric unit of mass equal to 1,000 kilograms. */ metricTon = 'metricTon', /**A mass measurement unit equal to 2,240 pounds-mass or 1,016 kilograms or 1.016 metric tons. Typically used in the UK. */ longTon = 'longTon', /** A mass measurement unit equal to 2,000 pounds-mass or 907.18474 kilograms. Typically used in the USA. */ shortTon = 'shortTon' } /** Modes of selection for the SelectionControl. */ export enum SelectionControlMode { /** Draw a circular area to select in. */ circle = 'circle', /** Draw a rectangular area to select in. */ rectangle = 'rectangle', /** Draw a polygon area to select in. */ polygon = 'polygon', /** Generates a selection area based on travel distance or time. */ routeRange = 'routeRange' } } /** * This module partially defines the map control. * This definition only includes the features added by using the drawing tools. * For the base definition see: * https://docs.microsoft.com/javascript/api/azure-maps-control/?view=azure-maps-typescript-latest */ declare module "azure-maps-control" { /** * This interface partially defines the map control's `EventManager`. * This definition only includes the method added by using the drawing tools. * For the base definition see: * https://docs.microsoft.com/javascript/api/azure-maps-control/atlas.eventmanager?view=azure-maps-typescript-latest */ export interface EventManager { /** * Adds an event to a class. * @param eventType The event name. * @param target The class to add the event for. * @param callback The event handler callback. */ add(eventType: "dataselected", target: atlas.control.SelectionControl, callback: (e: azmaps.Shape[]) => void): void; /** * Adds an event to a class once. * @param eventType The event name. * @param target The class to add the event for. * @param callback The event handler callback. */ addOnce(eventType: "dataselected", target: atlas.control.SelectionControl, callback: (e: azmaps.Shape[]) => void): void; /** * Adds an event to a class. * @param eventType The event name. * @param target The class to add the event for. * @param callback The event handler callback. */ add(eventType: "rangecalculated", target: atlas.control.RouteRangeControl, callback: (e: azmaps.data.Polygon | azmaps.data.MultiPolygon) => void): void; /** * Adds an event to a class once. * @param eventType The event name. * @param target The class to add the event for. * @param callback The event handler callback. */ addOnce(eventType: "rangecalculated", target: atlas.control.RouteRangeControl, callback: (e: azmaps.data.Polygon | azmaps.data.MultiPolygon) => void): void; /** * Adds an event to a class. * @param eventType The event name. * @param target The class to add the event for. * @param callback The event handler callback. */ add(eventType: "showrange", target: atlas.control.RouteRangeControl, callback: (e: azmaps.data.Polygon | azmaps.data.MultiPolygon) => void): void; /** * Adds an event to a class once. * @param eventType The event name. * @param target The class to add the event for. * @param callback The event handler callback. */ addOnce(eventType: "showrange", target: atlas.control.RouteRangeControl, callback: (e: azmaps.data.Polygon | azmaps.data.MultiPolygon) => void): void; /** * Adds an event to the `SelectionControl`. * @param eventType The event name. * @param target The class to add the event for. * @param callback The event handler callback. */ add(eventType: "error", target: atlas.control.RouteRangeControl, callback: (e: string) => void): void; /** * Adds an event to the once. * @param eventType The event name. * @param target The class to add the event for. * @param callback The event handler callback. */ addOnce(eventType: "error", target: atlas.control.RouteRangeControl, callback: (e: string) => void): void; /** * Removes an event listener from a class. * @param eventType The event name. * @param target The class to remove the event for. * @param callback The event handler callback. */ remove(eventType: string, target: atlas.control.SelectionControl | atlas.control.RouteRangeControl, callback: (e?: any) => void): void; } } export = atlas;
. The education of diabetics often affects the patient's life-style and habits, and the beliefs of his socio-professional and socio-cultural environment. The patient's knowledge is often satisfactory, while his behavior is inadequate. In this study, a sociologist conducted a semi-structured interview for 40 non-obese diabetic patients: 35 IDD and 5 NIDD, who had a knowledge/behavior gap. Emphasis was placed on the study of their subjective etiological beliefs. Four categories beliefs were found: stress, heredity, food and drink transgression, and fatality. Stress, which can lead to deresponsabilization, was the most frequently mentioned etiology (24 patients). Europeans cited several etiological beliefs. North-Africans, in contrast, cited only one, either stress or fatality, but never heredity or food and drink transgression, probably because genetics and genealogy are not superimposable realities and because of their belief in the symbolic benefits of sugar. In conclusion, the patient's etiological beliefs may contribute to the knowledge/behavior gap. Correct information about a more rational etiology for diabetes could improve patient compliance.
Hollow carbon spheres as an efficient dopant for enhancing the critical current density of MgB2-based tapes A significant enhancement of critical current density (Jc) and Hirr in MgB2 tapes has been achieved by the in situ powder-in-tube method utilizing hollow carbon spheres (HCS) as dopants. At 4.2 K, the transport Jc for the 850°C sintered samples reached 3.1 104 and 1.4 104 A cm−2 at 10 and 12 T, respectively, and were better than those of optimal nano-SiC-doped tapes. The effects of different sintering temperature on lattice parameters, amount of carbon substitution, microstructure and Jc of doped samples were also investigated. These results demonstrate that HCS is one of the most promising dopants besides nano-carbon and SiC for the enhancement of current capacity for MgB2 in high fields.
Efficiency and Optimal Loads Analysis for Multiple-Receiver Wireless Power Transfer Systems Wireless power transfer has shown revolutionary potential in challenging the conventional charging method for consumer electronic devices. Through magnetic resonance coupling, it is possible to supply power from one transmitter to multiple receivers simultaneously. In a multiple-receiver system, the overall system efficiency highly depends on the loads' and receivers' positions. This paper extends the conventional circuit-model-based analysis for the one-receiver system to investigate a general one-transmitter multiple-receiver system. It discusses the influence of the loads and mutual inductance on the system efficiency. The optimal loads, the input impedance, and power distribution are analyzed and used to discuss the proper system design and control methods. Finally, systems with a different number of receivers are designed, fabricated, and measured to validate the proposed method. Under the optimal loading conditions, an efficiency above 80% can be achieved for a system with three different receivers working at 13.56 MHz.
v = int(input('Informe a velocidade do carro: ')) if v > 80: ve = v-80 m = ve*7 print('Você ultrapassou o limite de velocidade e por isso foi multado.') print('Você deverá pagar a multa no valor de R${:.2f}'.format(m)) else: print('Você está dentro do limite de velocidade.')
Emerging technologies and approaches help you take your marketing to new heights. Marketing is about influencing people who might buy your product or service, using messaging that conveys value. Old school marketing used traditional channels such as broadcast and print to communicate with the target market. New school marketers have kept the traditional methods that still work, and have combined them with digital technology to communicate with consumers on a different and deeper level. New school marketing relies heavily on such Internet channels as Web sites, blogs and social networks. Constant Contact's Social Media Quickstarter guide describes a marketing funnel that represents how companies prioritize lead generation and conversion. Old school marketing put prospecting at the widest part of the funnel. The first priority was to find as many consumers as possible, convert some of them into customers, and establish a relationship with a few of those customers to earn their loyalty. In his book, “Flip the Funnel,” author Joseph Jaffe acknowledges a basic tenet of new school marketing: there is high value in cultivating a loyal customer base and keeping it engaged with continued communications. Finding customers now occupies the narrowest part of the funnel -- not because finding customers is less important than it was, but because the loyal customers now fill part of that role. Old school marketers were off the hook once consumers made the decision to buy. New school marketers devote significant resources to maintaining relationships with those loyal customers. The traditional marketing mix included the four Ps of product, price, placement and promotion: measurable, company-centric tactics that could be emphasized and deemphasized individually to form a customized value proposition. The new school's six Cs, on the other hand, focus on consumers. They include contact, connect, conversation, consideration, consumption and community. It's not enough for consumers to be aware of your product or service. You must establish a connection with them through meaningful contact. That contact should establish a dialog. New school marketers build communities around converted customers -- those who have "consumed" the product or service -- to continue the dialog and encourage loyalty and evangelism. Evangelists are satisfied users of a product who influence their family and friends to try it. HubSpot CEO Brian Halligan refers to outbound and inbound marketing on the company's social media blog. HubSpot is widely regarded as having coined these terms to differentiate between old school "push" messaging and new school "pull." Outbound, or push, marketing thrusts messaging on consumers via such channels as mailing lists, cold calls and advertising -- channels consumers increasingly filter due to overload. Inbound, or pull, messages draw consumers in. Inbound marketers make it easy for consumers to find them when those consumers are searching for products or services they need, at the time they need them. Web sites, blogs and social media networks give marketers visibility, but on consumers' terms. It's a customer-centric approach. Push marketing is on old school strategy that interrupts consumers at times of the marketers' choosing -- while consumers are watching TV, for example. It's a very hit-or-miss method of reaching out. Most of the people marketers interrupt have no interest at all in the marketers' products. Interruption marketing can even alienate consumers when it it's executed in a way that clearly ignores consumers' preferences. Dinner-time telemarketing calls are a prime example. According to marketing expert Seth Godin, interruption marketing is both expensive and inefficient. Permission marketing, on the other hand, is a new school approach that can reduce costs and increase efficiency. Godin defines permission marketing, a term he coined in a 1999 book of the same name, as "the privilege...of delivering anticipated, personal and relevant messages to people who actually want to get them." Permission-based messages are efficient because they're only sent to consumers who are interested in them. You may, for example, require that visitors to your website subscribe to an email newsletter before they can view view premium content, or register with their email addresses and “like” your Facebook page as a prerequisite to entering a contest. Permission marketing works offline, too. Loyalty card programs are one way merchants reward frequent customers who share such information as their postal and email addresses, ages, income, and even cell phone numbers in order to qualify for discounts. Well-executed permission marketing establishes trust-based relationships between marketers and consumers. Flip the Funnel; Joseph Jaffe; John Wiley & Sons, Inc. Kelly, Daria. "Old School vs. New School Marketing." Small Business - Chron.com, http://smallbusiness.chron.com/old-school-vs-new-school-marketing-37056.html. Accessed 19 April 2019.
. 176 patients with HIV-infection and AIDS were examined. 77 of them underwent various surgical interventions the most frequent of which were: opening of abscess and phlegmons--14 (23%), biopsy of lymphatic nodes--10 (13.1%), appendectomy--5 (6.2%), condyloma excision--21 (27.2%), removal of uterus adnexa--2 (2.5%), pleural puncture--4 (5.9%), cholecyst- and splenectomy--5 (8.2%). Operations for stomach cancer (creation of gastroenteroanastomosis), extrauterine pregnancy, brain tumor (drainage of IV ventricle of the brain), penetrating wound of cornea were performed less often. 43 patients underwent emergency operations without preoperative preparation, 34 patients underwent elective operations. The causes of 6 deaths were secondary diseases (Kaposi's sarcoma, purulent processes, metastases, pulmonary edema). There were no complications and blood changes in postoperative period in infected patients. These patients were discharged in the same terms as non-infected patients. In patients with AIDS, especially in combination with other infections, fever persisted long after the operation. The wound healed by first intention in all the patients, but the sutures were removed on day 10-30. Immunologically, a high ratio T-suppressors/T-helpers existed. An increase in fibrinolytic activity without high tissues hemorrhage was observed.
/* * Event callback function for timer events. It toggles the led pin. */ static void timer_ev_cb(struct os_event *ev) { assert(ev != NULL); printf("rtc %lu cpu= %lu \n",time32_incr,os_cputime_ticks_to_usecs(os_cputime_get32())/1000000); printf(" cpu ticks == %lu \n",os_cputime_get32()); hal_gpio_toggle(g_led_pin); hal_gpio_toggle(g_led_pin1); os_callout_reset(&blinky_callout, OS_TICKS_PER_SEC); }
<gh_stars>1-10 # coding: utf-8 """ ESP Documentation The Evident Security Platform API (version 2.0) is designed to allow users granular control over their Amazon Web Service security experience by allowing them to review alerts, monitor signatures, and create custom signatures. OpenAPI spec version: v2_sdk Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys import unittest import esp_sdk from esp_sdk.rest import ApiException from esp_sdk.apis.custom_compliance_controls_api import CustomComplianceControlsApi class TestCustomComplianceControlsApi(unittest.TestCase): """ CustomComplianceControlsApi unit test stubs """ def setUp(self): self.api = esp_sdk.apis.custom_compliance_controls_api.CustomComplianceControlsApi() def tearDown(self): pass def test_add_custom_signature(self): """ Test case for add_custom_signature Add a Custom Signature to a Custom Compliance Control """ pass def test_add_signature(self): """ Test case for add_signature Add a Signature to a Custom Compliance Control """ pass def test_create(self): """ Test case for create Create a(n) Custom Compliance Control """ pass def test_delete(self): """ Test case for delete Delete a(n) Custom Compliance Control """ pass def test_list_custom_signatures(self): """ Test case for list_custom_signatures Get a list of Custom Signatures for a Custom Compliance Control """ pass def test_list_signatures(self): """ Test case for list_signatures Get a list of Signatures for a Custom Compliance Control """ pass def test_remove_custom_signature(self): """ Test case for remove_custom_signature Remove a Custom Signature from a Custom Compliance Control """ pass def test_remove_signature(self): """ Test case for remove_signature Remove a Signature from a Custom Compliance Control """ pass def test_show(self): """ Test case for show Show a single Custom Compliance Control """ pass def test_update(self): """ Test case for update Update a(n) Custom Compliance Control """ pass if __name__ == '__main__': unittest.main()
/** * Lista todos os usuarios no banco */ public void list() { Session session = HibernateUtil.getSessionFactory().openSession(); Transaction transaction = null; try { transaction = session.beginTransaction(); List usuarios = session.createQuery("from Usuario").list(); for (Iterator iterator = usuarios.iterator(); iterator.hasNext();) { Usuario usuario = (Usuario) iterator.next(); System.out.println(usuario.getNome()); } transaction.commit(); } catch (HibernateException e) { transaction.rollback(); e.printStackTrace(); } finally { session.close(); } }
<reponame>mihaip/readerisdead<gh_stars>10-100 import {ApiHandler, Handler, HandlerConstuctor} from "./Handler"; import preferences from "./preferences"; import renderOverviewPage from "./overview"; import streams from "./streams"; import streamPreferences from "./streamPreferences"; import subscriptions from "./subscriptions"; import tags from "./tags"; const handlersByPath: Map<string, HandlerConstuctor> = new Map(); const handlersByRegExp: Map<RegExp, HandlerConstuctor> = new Map(); function Path(pathPattern: string | RegExp) { return function(handlerConstuctor: HandlerConstuctor) { if (typeof pathPattern === "string") { handlersByPath.set(pathPattern, handlerConstuctor); } else { handlersByRegExp.set(pathPattern, handlerConstuctor); } }; } @Path("/reader/overview") export class OverviewHandler extends Handler { handle() { return { responseText: renderOverviewPage(), status: 200, }; } } @Path("/reader/api/0/preference/list") export class PreferenceListHandler extends ApiHandler { handleApi() { const responseJson = { prefs: preferences.toJson(), }; return {responseJson}; } } @Path("/reader/api/0/preference/set") export class PreferenceSetHandler extends ApiHandler { handleApi() { const key = this.params.get("k"); const value = this.params.get("v"); if (key === null || value === null) { return {status: 400}; } preferences.set(key, value); return {responseJson: "OK"}; } } @Path("/reader/api/0/preference/stream/list") export class StreamPreferenceListHandler extends ApiHandler { handleApi() { const streamIds = tags.streamIds().concat(subscriptions.streamIds()); const streamPreferencesJson: {[key: string]: Object} = {}; streamIds.forEach(streamId => { streamPreferencesJson[streamId] = streamPreferences .get(streamId) .toJson(); }); const responseJson = { streamprefs: streamPreferencesJson, }; return {responseJson}; } } @Path("/reader/api/0/unread-count") export class UnreadCountHandler extends ApiHandler { handleApi() { const responseJson = { max: 1000000, unreadcounts: [], }; return {responseJson}; } } @Path("/reader/api/0/recommendation/list") export class RecommendationListHandler extends ApiHandler { handleApi() { const responseJson = { recs: [], }; return {responseJson}; } } @Path("/reader/api/0/tag/list") export class TagListHandler extends ApiHandler { handleApi() { const responseJson = { tags: tags.all().map(tag => tag.toJson()), }; return {responseJson}; } } @Path("/reader/api/0/subscription/list") export class SubscriptionListHandler extends ApiHandler { handleApi() { const responseJson = { subscriptions: subscriptions.all().map(s => s.toJson()), }; return {responseJson}; } } @Path(new RegExp("/reader/api/0/stream/contents/(.+)")) export class StreamContentsHandler extends ApiHandler { handleApi() { const streamId = decodeURIComponent(this.urlPathMatchResult[1]); const streamJson = streams.getStreamJson(streamId); if (streamJson) { return {responseJson: streamJson}; } return {responseJson: "", status: 404}; } } export const handlerFn = ( url: URL, body?: string ): {responseText: string; status: number} => { let handlerConstructor = handlersByPath.get(url.pathname); let handlerPathMatchResult; if (handlerConstructor) { handlerPathMatchResult = [url.pathname]; } else { for (let [pathRexp, pathHandlerConstructor] of handlersByRegExp) { const result = pathRexp.exec(url.pathname); if (result) { handlerConstructor = pathHandlerConstructor; handlerPathMatchResult = result; break; } } } if (handlerConstructor && handlerPathMatchResult) { const handler = new handlerConstructor( url, handlerPathMatchResult, body ); const {responseText, status} = handler.handle(); return {responseText, status: status !== undefined ? status : 200}; } console.warn(`Unhandled path: ${url.pathname}`); return {responseText: "", status: 404}; };
Factors associated with SARS-CoV-2 positivity in 20 homeless shelters in Toronto, Canada, from April to July 2020: a repeated cross-sectional study Background: It is unclear what the best strategy is for detecting severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2) among residents of homeless shelters and what individual factors are associated with testing positive for the virus. We sought to evaluate factors associated with testing positive for SARS-CoV-2 among residents of homeless shelters and to evaluate positivity rates in shelters where testing was conducted in response to coronavirus disease 2019 (COVID-19) outbreaks or for surveillance. Methods: We conducted a retrospective chart audit to obtain repeated cross-sectional data from outreach testing done at homeless shelters between Apr. 1 and July 31, 2020, in Toronto, Ontario, Canada. We compared the SARS-CoV-2 positivity rate for shelters where testing was conducted because of an outbreak (at least 1 known case) with those tested for surveillance (no known cases). A patient-level analysis evaluated differences in demographic, health and behavioural characteristics of residents who did and did not test positive for SARS-CoV-2 at shelters with at least 2 positive cases. Results: One thousand nasopharyngeal swabs were done on 872 unique residents at 20 shelter locations. Among the 504 tests done in outbreak settings, 69 (14%) were positive for SARS-CoV-2 and 1 (0.2%) was indeterminate. Among the 496 tests done for surveillance, 11 (2%) were positive and none were indeterminate. Shelter residents who tested positive for SARS-CoV-2 were significantly less likely to have a health insurance card (54% v. 72%, p = 0.03) or to have visited another shelter in the last 14 days (0% v. 18%, p < 0.01). There was no association between SARS-CoV-2 positivity and medical history or symptoms. Interpretation: Our findings support testing of asymptomatic shelter residents for SARS-CoV-2 when a positive case is identified at the same shelter. Surveillance testing when there are no known positive cases may detect outbreaks, but further research should identify efficient strategies given scarce testing resources. Factors associated with SARS-CoV-2 positivity in 20 homeless shelters in Toronto, Canada, from April to July 2020: a repeated cross-sectional study. Kiran et al. Canadian Medical Association Journal Open (March 30, 2021). Key findings: Of 504 tests done because of a positive case at the same shelter, 69 (14%) were positive; of the 496 tests done for surveillance, 11 (2%) were positive. o Among tests done for surveillance, only 1 of 17 shelters had any positive cases (Figure). No association was found between SARS-CoV-2 positivity and medical history or symptoms. Residents without a provincial health insurance card were more likely to test positive for COVID-19. Methods: Cross-sectional retrospective chart audit of 872 residents for whom SARS-CoV-2 testing was done in 20 shelter locations in Toronto, Canada between April 1 and July 31, 2020. Compared the positivity rate for shelters where testing was conducted because of an outbreak (at least 1 known case) with those where testing was conducted for surveillance (no known cases). Limitations: Shelters selected for this study mostly served men; did not include homeless individuals who sleep outside or received testing at other facilities; potential selection bias. Implications: When community SARS-CoV-2 case levels are elevated, routine testing in shelters might be warranted. Figure: Note: Adapted from Kiran et al. Shelter positivity rate for shelters where testing was conducted because of an outbreak and for shelters where testing was done for surveillance versus 7-day rolling average of new COVID-19 cases in Toronto. Letters refer to individual shelters. Licensed under CC-BY-NC-ND 4.0. PEER-REVIEWED Estimation of secondary household attack rates for emergent spike L452R SARS-CoV-2 variants detected by genomic surveillance at a community-based testing site in San Francisco. Peng et al. Clinical Infectious Diseases (March 31, 2021). Implications: The prevalence of variants B.1.427 and B.1.429 increased sharply in a community-based sample of persons at risk for SARS-CoV-2 over a 3-month period. Maintaining prevention measures, like physical distancing and mask wearing, can reduce the elevated transmission risk of some emerging SARS-CoV-2 variants of concern. Genome sequencing can help detect and characterize these new strains and inform public action. Key findings: Time to clear aerosols in a patient room was 5.5 minutes with mobile HEPA filters ( Figure 1) compared to 16 minutes with existing ward HVAC system ( Figure 2). Aerosols cleared in <3 minutes at the nurses' station with mobile HEPA filters. There was little impact on aerosol clearance from opening the bathroom door in the patient room and keeping on the exhaust fan. Methods: Observational experiment at the Royal Melbourne Hospital, Australia, from July to August 2020. Glycerine-based aerosol was used as a surrogate for respiratory aerosols in a single patient room and a nurses' station. Time to clearance of 99% of aerosols was measured from inside the patient room and the nurses' station with and without air cleaners (HEPA filters). Limitations: Study done in one hospital floor in one patient room; findings for SARS-CoV-2 might differ from those for glycerine-based aerosol. Implications: Low-cost air cleaners in patient rooms and nurses' stations may be a useful and cost-effective method in clinical spaces to reduce the risk of healthcare-acquired respiratory viruses that are transmitted via aerosols. PEER-REVIEWED Currently authorized COVID-19 vaccines are not live vaccines and can be administered safely to people with immunosuppressive conditions or receiving immunosuppressive therapies. However, effectiveness of COVID-19 vaccines in this population is not known. Here we consider 2 studies evaluating immune responses to COVID-19 vaccines in immunocompromised individuals. The effect of respiratory activity, non-invasive respiratory support and facemasks on aerosol generation and its relevance to COVID-19. Wilson et al. Anaesthesia (March 30, 2021). Key findings: Some common respiratory activities generated substantially more aerosols than non-invasive respiratory therapies (Figure). Surgical face masks reduced aerosols during talking, shouting, forced expiratory volume (FEV) maneuvers and coughing. Methods: Aerosols were measured in 10 healthy individuals during respiratory activities (quiet breathing; talking; exercise; shouting; FEV maneuvers; and coughing) with and without surgical face masks and three respiratory therapies (high-flow nasal oxygen via cannula and non-invasive positive pressure ventilation via dual or single circuits ). Limitations: Study was limited to a single experimental protocol and findings may not be generalizable. Implications: This study highlights the importance of community masking to prevent transmission of SARS-CoV-2. Although aerosol exposure risk might be substantial when people have common physiologic responses to respiratory infection (e.g., coughing, labored breathing) or are engaged in everyday respiratory activities (e.g., shouting, exercising, or talking), use of a surgical face mask reduced aerosols. Key findings: Community-level nonpharmaceutical interventions (NPIs) focusing on reducing contacts and masking had a larger impact on incident and cumulative COVID-19 cases compared to closing schools and daycares (Figure). Simulations found >95% of new COVID-19 cases to be community acquired and <5% to be acquired within schools among students and teachers. Methods: Agent-based model of two school/daycare reopening scenarios (do or do not reopen on 9/15/2020) with three community-level NPI scenarios (no additional NPI, NPI beginning in October 2020, and NPI limiting new infections to 0.8% per day-replicating October case data from Ontario), using a simulated population representative of Ontario. Limitations: Assumed schools have SARS-CoV-2 risk reduction measures in place; Ontario might not be representative of other areas. Detection, Burden, and Impact Lindemer et al. Counties with lower insurance coverage are associated with both slower vaccine rollout and higher COVID-19 incidence across the United States. medRxiv (Preprint, March 26, 2021). US counties with high levels of uninsured persons have significantly lower rates of COVID-19 vaccination, even after controlling for race and ethnicity, and had the highest COVID-19 incidence rate increases (comparing March 2021 to December 2020).
Molecular dynamics simulations of dihydroerythroidine bound to the human 42 nicotinic acetylcholine receptor The heteromeric 42 nicotinic acetylcholine receptor (nAChR) is abundant in the human brain and is associated with a range of CNS disorders. This nAChR subtype has been recently crystallised in a conformation that was proposed to represent a desensitised state. Here, we investigated the conformational transition mechanism of this nAChR from a desensitised to a closed/resting state.
<filename>CGXSlideMenuView/CGXMainView/CGXSlideContentCollectionView.h // // CGXSlideContentCollectionView.h // CGXConfigSlideMenuExample // // Created by 曹贵鑫 on 2017/12/21. // Copyright © 2017年 曹贵鑫. All rights reserved. // #import <UIKit/UIKit.h> #import "CGXSlideTitleManage.h" //开始回答代理 @protocol CGXSlideContentCollectionViewDelegate; @protocol CGXSlideContentCollectionViewDelegate <NSObject> @optional - (void)slideCGXSlideContentCollectionViewDidSelectedAtIndex:(NSInteger)index; @end @interface CGXSlideContentCollectionView : UIView - (instancetype)initWithFrame:(CGRect)frame WithManager:(CGXSlideTitleManage *)manager; @property (nonatomic , strong) CGXSlideTitleManage *manager;//配置 /// collectionView @property (nonatomic, strong) UICollectionView *collectionView; @property (nonatomic, weak) id<CGXSlideContentCollectionViewDelegate>delegate; /** 给外界提供的方法,获取 CGXSlideContentCollectionView 选中按钮的下标 */ - (void)selectCGXSlideContentCollectionViewPage:(NSInteger)index; - (void)interCGXSlideTitleViewWithManager:(CGXSlideTitleManage *)manager; - (void)delectCGXSlideTitleViewWithManager:(CGXSlideTitleManage *)manager; @end
Communication systems comprising electromagnetic transponders are more and more frequent, particularly since the development of near-field communication (NFC) technologies, equipping, in particular, cell phones. Such systems use a radio frequency electromagnetic field emitted by a device (terminal or reader) to communicate with another device (card or tag). An NFC device comprises a resonant circuit formed of one or a plurality of antennas (inductive elements) and of one or a plurality of capacitive elements for detecting an electromagnetic field. The voltage recovered across the resonant circuit is processed by electronic circuits of the device or transponder to extract the power necessary to its operation, decode data transmitted via a modulation of the electromagnetic field, transmit data in retromodulation, etc. In applications targeted by the present disclosure, an electronic tag is intended to detect control or configuration data intended for equipment having this tag coupled thereto. Such data should thus be converted into signals interpretable by the equipment (the application) to be controlled.
An intelligent brain machine interface with wireless micro-stimulation and neural recording This work presents an intelligent wireless brain machine interface with a biomedical core, two-channel micro-stimulating and neural recording. The biomedical core provides programmable discrete wavelet transform (DWT), DC removal and stimulation parameters setting and control. Neural stimulation is accomplished via voltage-controlled stimulation (VCS). With the proposed system, we can record and stimulate from the same neural electrodes, which can significantly reduce the stimulation artifact. Neural signals are time-division-multiplexed sampled by an A/D converter at a maximum rate of 4k samples per channel. The stimulation and recording of each channel can be controlled by a graphical user interface (GUI) on a laptop, and different types of neural signals can be observed independently.
Bronchoalveolar interleukin-1&bgr;: A marker of bacterial burden in mechanically ventilated patients with community-acquired pneumonia ObjectiveTo assess the relationship between concentrations of bronchoalveolar cytokines and bacterial burden (quantitative bacterial count) in intubated patients with a presumptive diagnosis of community-acquired pneumonia. DesignA cross-sectional and clinical investigation. SettingMedical/surgical and respiratory intensive care unit of a tertiary 1,200-bed medical center. PatientsAccording to the time course of community-acquired pneumonia at the time of study with bronchoalveolar lavage, 69 mechanically ventilated patients were divided into three subgroups: primary (n = 11), referral (n = 23), and treated (n = 35) community-acquired pneumonia. InterventionsBronchoalveolar lavage was performed in the most abnormal area on chest radiograph by fiberoptic bronchoscope. Bronchoalveolar lavage fluid was processed for quantitative bacterial culture. The concentrations of bronchoalveolar lavage cytokines (tumor necrosis factor-&agr;, interleukin-1&bgr;, interleukin-6, interleukin-8, and interleukin-10) also were measured. Measurements and Main ResultsThirty-two patients had a positive bacterial culture (bronchoalveolar lavage ≥103 colony-forming units/mL). Pseudomonas aeruginosa, Acinetobacter baumannii, Staphylococcus aureus, and Klebsiella pneumoniae made up 76% of pathogens recovered at high concentrations. The concentrations of bronchoalveolar lavage interleukin-1&bgr; were 199.1 ± 32.1 and 54.9 ± 13.0 pg/mL (mean ± se) in the patients with positive and negative bacterial culture, respectively (p <.001). Bronchoalveolar lavage interleukin-1&bgr; was significantly higher in the patients with a high bacterial burden (p <.001), with mixed bacterial infection (p <.001), and with P. aeruginosa pneumonia (p <.001), compared with values in patients without these features. The relationship between bacterial load and concentrations of bronchoalveolar lavage interleukin-1&bgr; was very strong in the patients with primary and referral community-acquired pneumonia but was borderline in treated community-acquired pneumonia. ConclusionsThe common pathogens were similar to the core pathogens of hospital-acquired pneumonia, probably due to antibiotic effects, delayed sampling, and superimposed nosocomial infection. Since the concentration of bronchoalveolar lavage interleukin-1&bgr; was correlated with bacterial burden in the alveoli, it may be a marker for progressive and ongoing inflammation in patients who have not responded to pneumonia therapy and who have persistence of bacteria in the lung.
Study of the effect of the meshing by blocks in the finite difference-time domain method In the field of microwaves, the finite difference-time domain method gives a precise description of the electromagnetic field close to the discontinuities. An accurate analysis of the variations of the electromagnetic field components in the regions where they have very fast variations requires a smaller spatial discretization of the differential equations. The introduction of these blocks creates nonphysical discontinuities which produce "numerical noise" (or "spurious modes"). In this paper, we describe the effects of these changes in the mesh size and we propose an original solution in order to decrease and possibly to cancel these parasitic effects.
def build_cv(self, file): doc = SimpleDocTemplate(file, pagesize=letter, topMargin=MARGINS[0], rightMargin=MARGINS[1], bottomMargin=MARGINS[2], leftMargin=MARGINS[3], title='{}' .format( CV_PERSONAL_INFO['name'])) self.build_heading() self.cv.append(Spacer(PAGE_WIDTH, 24)) for section in self.pdf_template(): pdf_section = CVPdfSection(**section) self.build_section(pdf_section) doc.build( self.cv, onFirstPage=self.myFirstPage, onLaterPages=self.myLaterPages ) pdf = file.getvalue() file.close() return pdf
<reponame>uglyog/springboot-junit5-test package com.github.uglyog.springbootjunit5test; import au.com.dius.pact.provider.junit5.HttpTestTarget; import au.com.dius.pact.provider.junit5.PactVerificationContext; import au.com.dius.pact.provider.junitsupport.Provider; import au.com.dius.pact.provider.junitsupport.State; import au.com.dius.pact.provider.junitsupport.loader.PactBroker; import au.com.dius.pact.provider.junitsupport.loader.VersionSelector; import au.com.dius.pact.provider.spring.junit5.PactVerificationSpringProvider; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.TestTemplate; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit.jupiter.SpringExtension; @ExtendWith(SpringExtension.class) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT) @Provider("Animal Profile Service") @PactBroker(consumerVersionSelectors={ @VersionSelector(tag = "HEAD") }) class ApplicationPactTest { @BeforeEach public void setupTestTarget(PactVerificationContext context) { context.setTarget(new HttpTestTarget("localhost", 8080)); // System.setProperty("pact.provider.tag", "dev"); // System.setProperty("pact.provider.version", "0.0.0"); // System.setProperty("pact.verifier.publishResults", "true"); } @TestTemplate @ExtendWith(PactVerificationSpringProvider.class) public void pactVerificationTestTemplate(PactVerificationContext context) { context.verifyInteraction(); } @State("is not authenticated") public void isNotAuthenticated() { } @State("Has some animals") public void hasSomeAnimals() { } @State("Has an animal with ID 1") public void hasAnAnimalWithID1() { } @State("Has no animals") public void hasNoAnimals() { } }
Get Tickets Now February 1, 2017 – The Charlotte Hornets today announced plans to celebrate Kemba Walker’s selection as an NBA All-Star by hosting “Kemba Walker Night” during their game on Feb. 11 against the Los Angeles Clippers. The game was already slated to feature a giveaway of Walker Starting Lineup figurines to the first 7,500 fans in attendance and will now include additional Walker-themed activations. Prior to the game, Walker will be presented with a framed All-Star jersey and will address the crowd to thank Hornets fans for their support. Fans will be able to record videos sharing messages for Walker on the concourse prior to the game to be played on the scoreboard later in the evening. All authentic Walker Hornets jerseys will be on sale for $150 at the Hornets Fan Shop, a 50 percent discount from the regular price of $300. The Hornets Fan Shop will have a full selection of Walker All-Star merchandise, including jerseys and name and number T-shirts in both adult and youth sizes. Hornets TV partner FOX Sports Southeast will distribute Walker spirit signs to the first 10,000 fans. Leading up to the game, the Hornets social media accounts will feature the “Ultimate Kemba Walker Fan” contest. Ten winners will each receive two suite tickets to the game, a pregame meet and greet with Walker and an All-Star T-shirt autographed by Walker. The 5 p.m. game is a Buzz City Night, in which the team wears its Buzz City uniforms and the organization celebrates the fans’ enthusiasm for the Hornets and the city of Charlotte. Doors will open at 3:30 p.m. for the general public and 3 p.m. for Swarm365 members. In his sixth NBA season, Walker is averaging career highs in points per game (23.3), field goals per game (8.3), field goal percentage (.457), three-point field goals per game (2.8) and three-point field goal percentage (.405). He ranks third in the Eastern Conference in three-point field goals (135), fifth in 20-point games (35) and seventh in scoring. Walker joins Larry Johnson (1993 and 1995), Alonzo Mourning (1994 and 1995), Glen Rice (1996, 1997 and 1998), Eddie Jones (2000), Baron Davis (2002) and Gerald Wallace (2010) as the seventh player ever to represent Charlotte in the NBA All-Star Game.
<gh_stars>1-10 /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package net.asynchronized.homematic.xmlclient; import org.simpleframework.xml.Attribute; /** * * @author enrico */ public class Started implements OperationResult { @Attribute(name = "program_id") private Integer programId; public Started() { } public Integer getProgramId() { return programId; } public void setProgramId(Integer programId) { this.programId = programId; } @Override public String toString() { return "Started{" + "programId=" + programId + '}'; } }
Abnormality of intestinal cholesterol absorption in ApcMin/+ mice with colon cancer cachexia. Colorectal cancer syndrome has been one of the greatest concerns in the world, particularly in developed countries. Several epidemiological studies have shown that dyslipidemia may be associated with the progression of intestinal cachexia, but there is little research on the function of the small intestine, which is involved in blood lipid metabolism, in dyslipidemia. In the present study, we aimed to explore the function of intestinal cholesterol absorption in the ApcMin/+ mouse model using an intestinal lipid absorption test. We found that both triglyceride (TG) and total cholesterol (TC) uptake were inhibited in the intestine of ApcMin/+ mice with age and the intestinal peroxisome proliferator-activated receptor (PPAR) downregulated the processes of -oxidation, oxidative stress response, and cholesterol absorption in APC-deficient mice. In addition, reduced expression levels of farnesoid X receptor (FXR) and apical sodium-dependent bile acid transporter (ASBT) indicated that bile acid metabolism might be associated with intestinal cholesterol absorption in ApcMin/+ mice. Thus, our data suggested that the intestine plays an essential role in cholesterol uptake and that bile acid metabolism seems to cause a decrease in intestinal cholesterol uptake in ApcMin/+ mice.
package com.wvkity.mybatis.spring.boot.autoconfigure; import com.wvkity.mybatis.config.MyBatisConfigCache; import com.wvkity.mybatis.config.MyBatisCustomConfiguration; import com.wvkity.mybatis.scripting.xmltags.MyBatisXMLLanguageDriver; import com.wvkity.mybatis.session.MyBatisConfiguration; import com.wvkity.mybatis.spring.MyBatisSqlSessionFactoryBean; import com.wvkity.mybatis.utils.ArrayUtil; import com.wvkity.mybatis.utils.StringUtil; import lombok.extern.log4j.Log4j2; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.mapping.DatabaseIdProvider; import org.apache.ibatis.plugin.Interceptor; import org.apache.ibatis.session.ExecutorType; import org.apache.ibatis.session.SqlSessionFactory; import org.mybatis.spring.SqlSessionTemplate; import org.mybatis.spring.mapper.ClassPathMapperScanner; import org.mybatis.spring.mapper.MapperFactoryBean; import org.springframework.beans.BeansException; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.BeanFactoryAware; import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.ObjectProvider; import org.springframework.beans.factory.support.BeanDefinitionRegistry; import org.springframework.boot.autoconfigure.AutoConfigurationPackages; import org.springframework.boot.autoconfigure.AutoConfigureAfter; import org.springframework.boot.autoconfigure.AutoConfigureBefore; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnSingleCandidate; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.ApplicationContext; import org.springframework.context.ResourceLoaderAware; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Import; import org.springframework.context.annotation.ImportBeanDefinitionRegistrar; import org.springframework.core.io.Resource; import org.springframework.core.io.ResourceLoader; import org.springframework.core.type.AnnotationMetadata; import org.springframework.lang.NonNull; import org.springframework.lang.Nullable; import org.springframework.util.Assert; import org.springframework.util.CollectionUtils; import org.springframework.util.ObjectUtils; import org.springframework.util.StringUtils; import javax.annotation.PostConstruct; import javax.sql.DataSource; import java.util.List; @Log4j2 @org.springframework.context.annotation.Configuration @ConditionalOnClass({SqlSessionFactory.class, org.mybatis.spring.SqlSessionFactoryBean.class}) @ConditionalOnSingleCandidate(DataSource.class) @EnableConfigurationProperties(MyBatisProperties.class) @AutoConfigureAfter(DataSourceAutoConfiguration.class) @AutoConfigureBefore(name = "org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration") public class MyBatisAutoConfiguration implements InitializingBean { private final MyBatisProperties properties; private final Interceptor[] interceptors; private final ResourceLoader resourceLoader; private final DatabaseIdProvider databaseIdProvider; private final List<ConfigurationCustomizer> configurationCustomizers; private final List<PropertiesCustomizer> propertiesCustomizers; private final ApplicationContext applicationContext; public MyBatisAutoConfiguration(MyBatisProperties properties, ObjectProvider<Interceptor[]> interceptorsProvider, ResourceLoader resourceLoader, ObjectProvider<DatabaseIdProvider> databaseIdProvider, ObjectProvider<List<ConfigurationCustomizer>> configurationCustomizersProvider, ObjectProvider<List<PropertiesCustomizer>> propertiesCustomizersProvider, ApplicationContext applicationContext) { this.properties = properties; this.interceptors = interceptorsProvider.getIfAvailable(); this.resourceLoader = resourceLoader; this.databaseIdProvider = databaseIdProvider.getIfAvailable(); this.configurationCustomizers = configurationCustomizersProvider.getIfAvailable(); this.propertiesCustomizers = propertiesCustomizersProvider.getIfAvailable(); this.applicationContext = applicationContext; } @Override public void afterPropertiesSet() throws Exception { if (!CollectionUtils.isEmpty(propertiesCustomizers)) { this.propertiesCustomizers.forEach(customizer -> customizer.customize(this.properties)); } checkConfigFileExists(); } private void checkConfigFileExists() { if (this.properties.isCheckConfigLocation() && StringUtils.hasText(this.properties.getConfigLocation())) { Resource resource = this.resourceLoader.getResource(this.properties.getConfigLocation()); Assert.state(resource.exists(), "Cannot find config location: " + resource + " (please add config file or check your MyBatis configuration)"); } } @Bean @ConditionalOnMissingBean public SqlSessionFactory sqlSessionFactory(DataSource dataSource) throws Exception { // 全局配置 MyBatisCustomConfiguration customConfig; if (!ObjectUtils.isEmpty(this.properties.getCustomConfiguration())) { customConfig = this.properties.getCustomConfiguration(); } else { // 优先从容器中获取 if (hasBeanFromContext(MyBatisCustomConfiguration.class)) { customConfig = getBean(MyBatisCustomConfiguration.class); } else { // 直接创建 customConfig = MyBatisConfigCache.defaults(); } } MyBatisSqlSessionFactoryBean factory = new MyBatisSqlSessionFactoryBean(); factory.setDataSource(dataSource); factory.setVfs(SpringBootVFS.class); factory.setApplicationContext(this.applicationContext); if (StringUtil.hasText(this.properties.getConfigLocation())) { factory.setConfigLocation(this.resourceLoader.getResource(this.properties.getConfigLocation())); } applyConfiguration(factory); if (this.properties.getConfigurationProperties() != null) { factory.setConfigurationProperties(this.properties.getConfigurationProperties()); } if (!ArrayUtil.isEmpty(this.interceptors)) { factory.setPlugins(this.interceptors); } if (this.databaseIdProvider != null) { factory.setDatabaseIdProvider(this.databaseIdProvider); } if (StringUtils.hasLength(this.properties.getTypeAliasesPackage())) { factory.setTypeAliasesPackage(this.properties.getTypeAliasesPackage()); } if (StringUtils.hasLength(this.properties.getTypeEnumsPackage())) { factory.setTypeEnumsPackage(this.properties.getTypeEnumsPackage()); } if (this.properties.getTypeAliasesSuperType() != null) { factory.setTypeAliasesSuperType(this.properties.getTypeAliasesSuperType()); } if (StringUtils.hasLength(this.properties.getTypeHandlersPackage())) { factory.setTypeHandlersPackage(this.properties.getTypeHandlersPackage()); } if (!ObjectUtils.isEmpty(this.properties.resolveMapperLocations())) { factory.setMapperLocations(this.properties.resolveMapperLocations()); } factory.setCustomConfiguration(customConfig); return factory.getObject(); } private void applyConfiguration(MyBatisSqlSessionFactoryBean factory) { MyBatisConfiguration configuration = this.properties.getConfiguration(); if (configuration == null && !StringUtils.hasText(this.properties.getConfigLocation())) { configuration = new MyBatisConfiguration(); // 默认开启下划线大写转驼峰命名规则 configuration.setMapUnderscoreToCamelCase(true); } if (configuration != null && !CollectionUtils.isEmpty(this.configurationCustomizers)) { for (ConfigurationCustomizer customizer : this.configurationCustomizers) { customizer.customize(configuration); } } if (configuration != null) { configuration.setDefaultScriptingLanguage(MyBatisXMLLanguageDriver.class); } factory.setConfiguration(configuration); } private boolean hasBeanFromContext(final Class<?> target) { return this.applicationContext.getBeanNamesForType(target, false, false).length > 0; } private <T> T getBean(Class<T> clazz) { return this.applicationContext.getBean(clazz); } /*@Bean @ConditionalOnMissingBean public CamelCaseObjectWrapperFactory getObjectWrapperFactory() { return new CamelCaseObjectWrapperFactory(); }*/ @Bean @ConditionalOnMissingBean public SqlSessionTemplate sqlSessionTemplate(SqlSessionFactory sqlSessionFactory) { ExecutorType executorType = this.properties.getExecutorType(); if (executorType != null) { return new SqlSessionTemplate(sqlSessionFactory, executorType); } else { return new SqlSessionTemplate(sqlSessionFactory); } } /** * This will just scan the same base package as Spring Boot does. If you want * more power, you can explicitly use * {@link org.mybatis.spring.annotation.MapperScan} but this will get typed * mappers working correctly, out-of-the-box, similar to using Spring Data JPA * repositories. */ public static class AutoConfiguredMapperScannerRegistrar implements BeanFactoryAware, ImportBeanDefinitionRegistrar, ResourceLoaderAware { private BeanFactory beanFactory; private ResourceLoader resourceLoader; @Override public void registerBeanDefinitions(@Nullable AnnotationMetadata importingClassMetadata, @NonNull BeanDefinitionRegistry registry) { log.debug("Searching for mappers annotated with @Mapper"); ClassPathMapperScanner scanner = new ClassPathMapperScanner(registry); try { if (this.resourceLoader != null) { scanner.setResourceLoader(resourceLoader); } List<String> packages = AutoConfigurationPackages.get(this.beanFactory); if (log.isDebugEnabled()) { packages.forEach(pkg -> log.debug("Using auto-configuration base package '{}'", pkg)); } scanner.setAnnotationClass(Mapper.class); scanner.registerFilters(); scanner.doScan(StringUtils.toStringArray(packages)); } catch (IllegalStateException ex) { log.debug("Could not determine auto-configuration package, automatic mapper scanning disabled.", ex); } } @Override public void setBeanFactory(@Nullable BeanFactory beanFactory) throws BeansException { this.beanFactory = beanFactory; } @Override public void setResourceLoader(@Nullable ResourceLoader resourceLoader) { this.resourceLoader = resourceLoader; } } /** * {@link org.mybatis.spring.annotation.MapperScan} ultimately ends up * creating instances of {@link MapperFactoryBean}. If * {@link org.mybatis.spring.annotation.MapperScan} is used then this * auto-configuration is not needed. If it is _not_ used, however, then this * will bring in a bean registrar and automatically register components based * on the same component-scanning path as Spring Boot itself. */ @org.springframework.context.annotation.Configuration @Import({AutoConfiguredMapperScannerRegistrar.class}) @ConditionalOnMissingBean(MapperFactoryBean.class) public static class MapperScannerRegistrarNotFoundConfiguration { @PostConstruct public void afterPropertiesSet() { log.debug("No {} found.", MapperFactoryBean.class.getName()); } } }
# -------------- class_1 = ['<NAME>','<NAME>','<NAME>','<NAME>'] class_2 = ['<NAME>','<NAME>','<NAME>'] new_class = class_1 + class_2 new_class.append('<NAME>') new_class.remove("<NAME>") print(new_class) courses = {"Math":65,"English":70,"History":80,"French":70,"Science":60} print(courses.values()) print(sum(courses.values())) percentage = (sum(courses.values())*100)/500 print(percentage) mathematics = {"<NAME>":78,"<NAME>":95,"<NAME>":65,"<NAME>":50,"<NAME>":70,"<NAME>":66,"<NAME>":75} topper = max(mathematics,key = mathematics.get) print(topper) print(topper.split()) first_name = topper.split()[0] print(first_name) last_name = topper.split()[1] print(last_name) full_name = (last_name + " "+ first_name) certificate_name = (full_name).upper() print(certificate_name)
/** * Recursively build TermLinks between a compound and its components * <p> * called only from Memory.continuedProcess * * @param taskBudget The BudgetValue of the task */ public void buildTermLinks(BudgetValue taskBudget) { Term t; Concept concept; TermLink termLink1, termLink2; if (termLinkTemplates.size() > 0) { BudgetValue subBudget = BudgetFunctions.distributeAmongLinks(taskBudget, termLinkTemplates.size()); if (subBudget.aboveThreshold()) { for (TermLink template : termLinkTemplates) { if (template.getType() != TermLink.TRANSFORM) { t = template.getTarget(); concept = memory.getConcept(t); if (concept != null) { termLink1 = new TermLink(t, template, subBudget); insertTermLink(termLink1); termLink2 = new TermLink(term, template, subBudget); concept.insertTermLink(termLink2); if (t instanceof CompoundTerm) { concept.buildTermLinks(subBudget); } } } } } } }
Gaucher disease diagnosed in a 30yearold black man To the Editor: A 30-year-old black construction worker from Trinidad was found on routine complete blood count to have pancytopenia. He reported feeling well and had no complaints. His parents are not consanguineous and they, his four siblings and his daughter are well. On physical examination, he was well developed and muscular; splenomegaly extending to the umbilicus was found but no hepatomegaly was found. His hemoglobin was 9.3 g/dl, white blood count 3.1/mm with normal differential and platelets 78,000/ mm. The comprehensive metabolic panel, lactate dehydrogenase level, renal function studies, vitamin B12 level and hemoglobin electrophoresis were normal; abdominal computerized tomography scanning revealed a 24 3 17 3 12 cm spleen displacing the stomach and left kidney. Bone films showed enlargement of the bilateral proximal femur spaces with scalloping. Bone marrow aspirate showed only erythroid hyperplasia, but biopsy (Fig. 1) revealed large, discrete regions replaced by foamy cells with crumpled tissue paper appearance, typical of Gauchers disease (GD). Polymerase chain reaction amplification of blood cell DNA revealed a R496H mutation on both acid b glucosylceramidase (GBA) alleles.
<reponame>Getulio-Mendes/AutoFlashcard import genanki css = """ .card { margin-top:100px; font-family: arial; font-size: 20px; text-align: center; color: black; background-color: white; } .Front{ font-size: 40px; } """ chineseModel = genanki.Model( 1400299068, 'Chinese', fields=[ {'name': 'Character'}, {'name': 'Meaning'}, {'name': 'Pinyin'}, ], templates=[ { 'name': 'Common chinese character', 'qfmt': '<div class="Front">{{Character}}</div>', 'afmt': '{{FrontSide}}<hr id="answer">{{Pinyin}}<hr>{{Meaning}}', }], css=css ) chinese = genanki.Deck( 1995159697, "Chinese 1000 most common" ) def generatePkg(df): for char,pinyin,meaning in zip(df["Simplified"],df["Pinyin"],df["Meaning"]): note = genanki.Note(model=chineseModel,fields=[char,meaning,pinyin]) chinese.add_note(note) genanki.Package(chinese).write_to_file('output.apkg')
Integrability of Kerr-Newman spacetime with cloud strings, quintessence and electromagnetic field The dynamics of charged particles moving around a Kerr-Newman black hole surrounded by cloud strings, quintessence and electromagnetic field is integrable due to the presence of a fourth constant of motion like the Carter constant. The fourth motion constant and the axial-symmetry of the spacetime give a chance to the existence of radial effective potentials with stable circular orbits in two-dimensional planes, such as the equatorial plane and other nonequatorial planes. They also give a possibility of the presence of radial effective potentials with stable spherical orbits in the three-dimensional space. The dynamical parameters play important roles in changing the graphs of the effective potentials. In addition, variations of these parameters affect the presence or absence of stable circular orbits, innermost stable circular orbits, stable spherical orbits and marginally stable spherical orbits. They also affect the radii of the stable circular or spherical orbits. It is numerically shown that the stable circular orbits and innermost stable circular orbits can exist not only in the equatorial plane but also in the nonequatorial planes. Several stable spherical orbits and marginally stable spherical orbits are numerically confirmed, too. In particular, there are some stable spherical orbits and marginally stable spherical orbits with vanishing angular momenta for covering whole the range of the latitudinal coordinate. I. INTRODUCTION Cosmological observations such as the cosmic microwave background thermal anisotropies support the accelerating expansion of the Universe. The expansion is well explained by a dark energy with repulsive gravitational effect. The dark energy is dependent on the cosmological constant and the so-called quintessence surrounding a black hole. The cosmological constant acting as vacuum energy with negative pressure causes the acceleration. The quintessence as a scalar field coupled to gravity has negative pressure. The quintessence plays a role in the cosmological constant for an appropriate choice of the quintessence parameters. The Robertson-Walker metric with the accelerating scale factor caused by the quintessence and the Reissner-Nordstrm-de Sitter black hole surrounded by the quintessence can be found in. The importance of quintessential fields in the physical processes occurring around black holes has been discussed in. In addition to the quintessence, another extra source representing the universe is not a collection of point particles, but is a collection of extended objects, such as one-dimensional strings considered by Letelier. These extended objects like a cloud of strings surrounding a black hole are helpful to describe physical phenomena in the universe, and have astrophysical observable consequences. A static and spherically symmetric black * Electronic address: xinwu@gxu.edu.cn, wuxin1134@sina.com hole surrounded by the quintessence and the cloud of strings was given in. The Reissner-Nordstrm metric with the quintessence and the cloud of strings was also obtained in. With the aid of the Newman-Janis algoritm, the above-mentioned non-rotating black holes with the quintessence and/or the cloud of strings can be transformed to rotating black hole counterparts. Adding the cosmological constant, the authors of obtained the Kerr-Newman-AdS solutions of the Einstein-Maxwell equation in quintessence field. Toledo & Bezerra studied the Kerr-Newman-AdS black hole with quintessence and cloud of strings. In this case, the electromagnetic potential is generated due to the charge in the black hole. If these extra perturbation sources like the quintessence, cloud of strings and electromagnetic fields are not considered, the Schwarzschild, Reissner-Nordstrm metric, Kerr and Kerr-Newman metrics are integrable. As far as the axially-symmetric Kerr spacetime is concerned, it is integrable due to four constants of motion, which are the particle (or photon) energy, angular momentum and rest mass associated with the 4-velocity normalizing condition and the Carter constant governing the motion of geodesics in the latitudinal direction. The existence of the Carter constant as the fourth constant gives the Kerr spacetime the possibility of non-planar orbits with constant coordinate radii corresponding to spherical photon orbits as well as the existence of circular orbits in the equatorial plane. Wilkins first found the existence of unstable spherical photon orbits around the Kerr black hole and studied many properties of the spherical photon orbits. This result was extended to spherical orbits of charged particles in a Kerr-Newman geometry by Johnston and Ruffini. Several numerical examples of spherical photon orbits around a Kerr black hole were plotted by Teo. Exact formulas for spherical photon orbits around Kerr black holes were given by Tavlayan and Tekin. The observability of a series of images produced by spherical photon orbits around near-extremal Kerr black holes was shown by Igata et al.. The authors of studied properties of spherical photon orbits in the Kerr naked singularity spacetimes. Spherical photon orbits were discussed in the field of Kerr-de Sitter black holes and a five-dimensional rotating black hole. The ringdown and shadow observables are relevant to a special set of unstable null orbits with constant radii. These orbits are light rings for the spherically-symmetric Schwarzschild type black holes and spherical photon orbits for the axially-symmetric Kerr type spacetimes. The threshold spherical photon orbits mark a boundary between the photons captured by the black hole and the photons escaping to infinity. Therefore, there have been many other papers focusing on these spherical photon orbits (see, e.g., ). When the quintessence and the cloud of strings as two extra perturbation sources are included, they do not destroy the integrability of the considered spacetimes. However, the fourth constant or the integrability becomes absent in most cases when electromagnetic fields as an external perturbation source are further included in these spacetimes. Even these external magnetic fields induce chaos of charged-particle motions under appropriate circumstances. In spite of this, not all the external magnetic fields surrounding the black holes can eliminate the existence of the fourth constant. As Carter claimed, not only the geodesic equations of particles (or photons) around the Kerr black hole but also the equations of charged-particle orbits in the Kerr spacetime with an electromagnetic field described by a covariant vector potential are analytically solved. Their solutions are expressed in terms of explicit quadratures. Although such a covariant vector potential is replaced with a more complicated form, the integrability of charged particle motions in Kerr-Newmann spacetimes was shown by Hackmann and Xu. In other words, the fourth constant of motion is still existent. Apart from the two Kerr type black holes with external magnetic fields mentioned in, the dynamics of charged particles moving around the Kerr-Newman black hole surrounded by cloud strings, quintessence and electromagnetic field is integrable. Providing such an integrable example is the main motivation of the present paper. Based on this integrability, stable circular charged-particle orbits exist in two-dimensional planes, which are not confined to the equatorial plane. Stable spherical charged-particle orbits are also present. Unlike the authors who studied the spherical photon orbits in the literature, we mainly focus on the stable circular charged-particle orbits in two-dimensional nonequatorial planes and the stable spherical charged-particle orbits. They are important in an astrophysical scenario. The structure of the thin accretion Keplerian disks is governed by the stable equatorial circular orbits of test particles. Above all, the innermost stable circular orbits act as the inner boundary of the Keplerian disks. The threshold spherical charged-particle orbits are important to model the capture or accretion of matter by the black hole. The outline of the paper is organized as follows. In Section II, we introduce the considered dynamical model. In Section III, we analyze the integrability of this system, radial effective potentials, circular orbits and spherical orbits of charged particles. Finally, we conclude our conclusions in Section IV. II. KERR-NEWMAN BLACK HOLE WITH EXTRA PERTURBATION SOURCES The considered spacetime metric is introduced briefly. A super-Hamiltonian for describing the motion of charged particles around the Kerr-Newman black hole immersed in an external electromagnetic field is given. A. Description of spacetime metric A negative pressure from a gravitationally repulsive energy component leads to the accelerated expansion of the universe. Its origin may be due to quintessence dark energy surrounding a black hole. In Boyer-Lindquist coordinates (t, r,, ), a spherically-symmetric static Schwarzschild black hole surrounded by the quintessence is expressed in as where covariant metric g has four nonzero components: M is the black hole mass. The state equation describing the relation among the quintessential state parameter q, the pressure p quint and the energy density quint is q = 0 is a quintessence parameter, and q = 0 corresponds to the Schwarzschild black hole. If quint > 0, then q q < 0. The parameter q is positive for the quintessence field. Thus, the quintessential state parameter q is negative. The state parameter has three cases : −1 < q < −1/3 for the quintessence, q < −1 for the phantom energy, and q = −1 acting as a cosmological constant. The quintessence corresponds to the stress-energy tensors The properties of quintessence in an astrophysical scenario have been discussed in some literature. Letelier considered the Schwarzschild black hole surrounded by another extra source, which is a sphericallysymmetric cloud of strings as a collection of extended objects instead of point particles. In this case, the stressenergy tensors are where cloud represents the energy density regarding the string cloud and b c is a positive parameter measuring the intensity of the cloud of strings. Replacing the quintessence term in Eqs. and with the string cloud intensity b c, Letelier obtained two metric components of the Schwarzschild black hole with the string cloud as follows: When the quintessence and the cloud of strings as two extra sources of energy surround the Schwarzschild black hole, the total stress-energy tensor is a linear combination of the stress-energy tensors corresponding to the quintessence and the one associated with the cloud of strings: Based on Eqs.,, and, two components of the metric for the description of the Schwarzschild black hole surrounded by the quintessence and the cloud of strings can be written in as follows: Suppose the black hole has an electrical charge Q inducing an electromagnetic field. The authors of provided a metric for the Reissner-Nordstrm black hole surrounded by the quintessence and the cloud of strings. The two metric components g tt and g rr are In terms of the Newman-Janis algoritm, the Reissner-Nordstrm black hole metric with the quintessence and the cloud of strings can be transformed into the Kerr-Newman black hole metric in the quintessence and the cloud of strings. Adding a cosmological constant, the authors of obtained a Kerr-Newman-AdS solution immersed in quintessence and string cloud. The metric solution has six nonzero components : The above notations are specified by The B. Super-Hamiltonian system The charge in the Kerr-Newman-AdS black hole generates an electromagnetic potential The motion of a test particle with charge q and mass m around the Kerr-Newman-AdS black hole surrounded with the quintessence, string cloud and electromagnetic field is governed by the super-Hamiltonian where the six non-zero covariant metric components - correspond to their contravariant components Considering a set of Hamiltonian canonical equation x = ∂H/∂p = g (p − qA )/m, we have the covariant generalized momenta Because another set of Hamiltonian canonical equations satisfy t = −∂H/∂t = 0 and = −∂H/∂ = 0, p t and p are two constants of motion. p t corresponds to an energy of the particle, and p is an angular momentum of the particle. They are Dimensionless operations are given to Eq.. The distances, coordinate time t and a take the black hole mass M as units; that is, r → rM, t → tM and a → aM. The proper time also takes the mass unit, → M. It is particularly pointed out that E and p r are measured in terms of m, but p is measured in terms of mM. The particle's angular momentum L is also measured in terms of mM, whereas the black hole's angular momentum a is measured in terms of M. After the dimensionless operations are implemented, a ∈ , Q ∈ , and −2M r in Eq. becomes −2r. The Hamiltonian becomes a dimension-less form where Q * = qQ is an electromagnetic field parameter. The Hamiltonian is a relatively complicated 4dimensional nonlinear system with two degrees of freedom r and. For the time-like case, this Hamiltonian is always identical to a given constant The existence of this constant is because the particle's 4-velocity = (,,,) = U = ∂H/∂p = g (p − qA ) satisfies the relation U U = −1 or the particle's rest mass is conserved. III. INTEGRABLE DYNAMICS OF CHARGED PARTICLES Firstly, we discuss the integrability of the Hamiltonian system with a vanishing cosmological constant by finding a fourth integral of motion in this system. Secondly, physically allowed motion regions are analyzed. Thirdly, radial effective potentials in two-dimensional planes are focused on and some stable circular orbits are given. Finally, radial effective potentials in the threedimensional space are considered and some stable spherical orbits are obtained. A. Integrability of the system without cosmological constant As is demonstrated above, the particle's energy E, angular momentum L and rest mass are three constants of motion in the system. Does a fourth constant exist? Yes, it does when = 0 although the magnetic field, cloud strings and quintessence field are included in the Kerr-Newman spacetime. In what follows, we introduce how to find the fourth constant. Clearly, ∆ = = 1 in the case of = 0. The system satisfying Eq. becomes This equation has a separable variable form The left-hand side of this equality is a function of r, but the right-hand side of this equality is another function of. In general, the equality is impossible. If and only if both sides are equal to a new constant denoted by K, the equality is admissible. This means that Eq. can be split into two equations They belong to a first integral of motion similar to the Carter constant. Eq. or Eq. is the fourth constant of motion in the system. In fact, the obtainment of the fourth constant or Eq. implicitly comes from the Hamilton-Jacobi equation of the Hamiltonian. The four independent constants are described by Eqs.,, and (or ). They determine the integrability of the system. If = 0, then no separable form exists, and Eqs. and do not exist, either. Thus, the system is nonintegrable. Only the case of = 0 is considered in our later discussions. B. Physically allowed motion regions Eqs. and are respectively rewritten as The conditions for physically allowed motions are Eq. corresponds to E ≥ E + or E ≤ E −, where E ± are given by E ± = (aL + Q * r ± (r 2 + K)∆ r )/(r 2 + a 2 ). In fact, their expressions are based on ℜ(r) = 0. For |E| < 1, r in Eq. can be allowed in a finite range outside the event horizon; that is, the corresponding orbit is bound. For |E| ≥ 1, r in Eq. can be allowed in a semi-infinite range outside the event horizon; namely, the orbit is unbound. In particular, the conditions for the orbits covering whole the range of the latitudinal coordinate ∈ (0, ) (note that 0 and are coordinate singularities) and reaching the symmetry axis at = 0 can be found from Eq. or the physically allowed ranges of. The conditions for ∈ (0, ) are one of the following two cases. (i) L = 0, |E| < 1 and K ≥ a 2 ≥ 0. (ii) L = 0, |E| ≥ 1 and K ≥ a 2 E 2 ≥ 0. It is clear that zero angular momentum L = 0 is a necessary condition for the orbits covering whole the range of the latitudinal coordinate. Besides the radial effective potentials in the equatorial plane, they are present in other planes. The planes are determined by () = 0 corresponding to = 0 in Eq. and can be described by =. Here, is a parameter describing some plane. In this case, K reads The energies obtained from Eqs. and are expressed as A = (r 2 + a 2 ) 2 − a 2 ∆ r sin 2, Eq. is the radial effective potentials in the plane = and includes the results in Eq.. Such radial effective potentials in the nonequatorial planes are seldom met in the existing literature. Without loss of generality, V + is considered. The local extrema of the effective potentials V + correspond to circular orbits with constant radii r, which satisfy the conditions The local minima of the effective potentials V + represent stable circular orbits (SCOs), which satisfy Eq. and the following condition The equality symbol "=" indicates the innermost stable circular orbits (ISCOs). The local maxima of the effective potentials V + mean unstable circular orbits, which satisfy Eq. and We focus on the radial motions of charged particles in the quintessence field with −1 < q < −1/3 and q > 0. Since the effects of parameters a, L, Q and Q * on the charged particle dynamics have been discussed in some references (e.g., ), the parameters b c, q, q and how to affect the radial effective potentials are mainly considered in Fig. 1. The graph at the equatorial plane = /2 in Fig. 1(a) shifts to the observer at infinity as the cloud strings parameter b c increases. In this case, the energy decreases and the gravity from the black hole is weakened. This fact can be explained simply and intuitively in terms of the second term on line 1 of Eq.. The term = −(r 2 + a 2 ) 2 (Q * r/ − E) 2 /(2∆ r ) gives gravitational effects to the charged particles. It is clear that ∆ r is a decreasing function of b c, and is, too. This implies that the gravity from the black hole becomes small as b c increases. Therefore, V + is a decreasing function of b c. When the cloud strings parameter b c increases in Table I, the graph going away the black hole leads to increasing the radius of ISCO at the equatorial plane, but decreasing the radius of SCO. Here, the ISCOs and SCOs are considered under the condition 0 < V + < 1 as well as the condition. The energy also decreases with an increase of the positive quintessence parameter q in Fig. 1(b). However, the energy increases with the negative quintessential state parameter q increasing in Fig. 1(c). These results are because ∆ r is a decreasing function of q (> 0) but an increasing function of q. The radii of ISCOs in Table I get larger when q and q increase. An increase of q enlarges the radius of SCO, while that of q diminishes the radius of SCO. Fig. 1(d) describes that the shape of the effective potential depends on the plane parameter. The potential decreases as increases. This result can be seen clearly from Eq.. Eq. is rewritten as. Because C is an increasing function of and A is a decreasing function of, V + is a decreasing function of. An increase of results in decreasing the radii of SCOs and ISCOs. In short, the main results concluded from Fig. 1 and Table I are given as follows. When anyone of the three parameters b c, q > 0 and ∈ (0, 2 ] increases, the potential (or energy) decreases, whereas the potential increases with q < 0 increasing. The radii of SCOs decrease as the four parameters increase. The radii of of ISCOs gets larger with b c and q > 0 increasing, but smaller with q and increasing. Fig. 2 plots three SCOs and ISCOs at the planes = /2, /4 and /6 for the other parameters considered in Fig. 1(d). Here, an eighth-and ninth-order Runge-Kutta-Fehlberg integrator (RKF89) with adaptive step sizes is applied to solve the canonical equations of the Hamiltonian. This integrator can give an order of 10 −12 to the Hamiltonian error ∆H = H + 1/2 when the integration time = 10 5. These orbits still remain circular and stable in the three-dimensional configuration with x = r sin cos, y = r sin sin and z = r cos during the integration time. Thus, the SCOs and ISCOs can exist not only in the equatorial plane but also in the non-equatorial planes. D. Effective potentials and stable spherical orbits in the three-dimensional space If K does not satisfy Eq. with p = 0 but is freely given and satisfies Eq. with p = 0, E ± in Eq. are radial effective potentials in the three-dimensional space. The effective potentials are functions of separation r and depend on parameters a, L, K, Q, Q *, b c, q and q. The local extrema of the effective potentials E + are spherical orbits with constant radii r. The spherical orbits should satisfy the condition but do not always satisfy the condition () = 0 for any time. The spherical orbits must be unstable in the unbound case of E + > 1. In the bound case of 0 < E + < 1, the spherical orbits may either be stable or unstable. They are stable under perturbations in the radial direction if Eqs., and are the conditions for the existence of the stable spherical orbits (SSOs). The equality symbol "=" in Eq. corresponds to the marginally stable spherical orbits (MSSOs). In fact, the conditions for the SSOs are equivalent to the following conditions which were considered in the existing publications. All stable (or unstable) spherical orbits are of course confined to the ranges ∈ or ∈ (0, ] ∪ [ −, ). In particular, the conditions for the spherical orbits covering whole the range of the latitudinal coordinate are given in the above two cases. For L = 0, the spherical orbits do not cover whole the range of the latitudinal coordinate. Fig. 3 describes the three-dimensional effective potentials E +, which correspond to the parameters for the twodimensional effective potentials V + in Fig. 1 but gives place to K. The dependence of the three-dimensional potentials E + on each of the three parameters b c, q and q is in agreement with that of the two-dimensional potentials V +. Unlike the dependence of V + on in Fig. 2(d), E + increases with an increase of K in Fig. 3(d). The reason is that E + in Eq. is an increase function of K. The impacts of the parameters b c, q and q on the radii of SSOs and MSSOs in Table II are similar to those of SCOs and ISCOs in Table I. The radii of SSO and MSSO in Table II increase when the parameter K increases. Three spherical orbits and marginally spherical orbits are shown in Fig. 4. When the integration time reaches = 10 5, these spherical orbits still remain stable. There are other notable points in Table II. The presence of negative angular momenta L for some of the MSSOs means that of retrograde orbits moving against the black hole's rotation. However, positive angular momenta L correspond to prograde orbits moving in the same direction as the black hole's rotation. In addition to these positive and negative angular momenta, vanishing angular momenta L = 0 are also possible. For the case of zero angular momenta, stable spherical orbits and marginally stable spherical orbits cover whole the range of the latitudinal coordinate and reach the symmetry axis at = 0, as shown in Fig. 5. Such spherical orbits are called as the polar spherical orbits. However, the stable circular orbits are difficulty present for vanishing angular momentum L = 0. Why do the stable spherical orbits exist in the case of L = 0? Why do the stable circular orbits not exist? The reason is that K does not satisfy Eq. and is freely given for the stable spherical orbits, but must satisfy Eq. and is not freely given for the stable circular orbits. IV. CONCLUSIONS We analytically show the integrability of the dynamics of charged particles moving around the Kerr-Newman black hole surrounded by cloud strings, quintessence and electromagnetic field. This integrability is due to the existence of a fourth constant of motion like the Carter constant. If a nonvanishing cosmological constant is included in the Kerr-Newman spacetime, then the fourth constant is absent. Because of the presence of the fourth motion constant and the axial-symmetry of the spacetime, radial effective potentials and stable circular orbits in two-dimensional planes involving the equatorial plane and other nonequatorial planes can be present. The dynamical parameters play important roles in changing the graphs of the effective potentials. In addition, variations of these parameters affect the presence or absence of stable circular orbits and innermost stable circular orbits, and they also affect the radii of the stable circular orbits and innermost stable circular orbits. When each of the cloud strings parameter, quintessence parameter and plane parameter increases, the graph of effective potential shifts to the observer at infinity and the effective potential decreases. However, the graph of effective potential goes toward the black hole and the effective potential increases as the quintessential state parameter increases. The radii of stable circular orbits decrease. The radii of the innermost stable circular orbits excluding those for the plane parameter and the the quintessential state parameter increase. The changes of these parameters exert more influences on those of the radii of the stable circular orbits, but minor influences on those of the radii of the innermost stable circular orbits. Numerical tests show that the stable circular orbits and innermost stable circular orbits can exist not only in the equatorial plane but also in the non-equatorial planes. On the other hand, the presence of the Carter-like constant and the axial-symmetry of the spacetime also gives a chance to the existence of radial effective potentials and stable spherical orbits in the three-dimensional space. The three-dimensional potential depending on each of the cloud strings parameter, quintessential state parameter and quintessence parameter is similar to the twodimensional potential. The three-dimensional potential increases with an increase of the fourth motion constant. The radii of stable spherical orbits and marginally stable spherical orbits varying with the cloud strings parameter, quintessential state parameter and quintessence parameter is consistent with those of stable circular orbits and innermost stable circular orbits varying with these parameters. The radii of stable spherical orbits and marginally stable spherical orbits increase when the Carter-like constant increases. The existence of some stable spherical orbits and marginally stable spherical orbits are numerically confirmed. In particular, some stable spherical orbits or marginally stable spherical orbits with vanishing angular momenta for covering whole the range of the latitudinal coordinate can also be found. In sum, the Carter-like constant and the axialsymmetry of the spacetime can ensure the presence of stable circular orbits in two-dimensional nonequatorial planes and stable spherical orbits in the threedimensional space if a vanishing cosmological constant appears in the Hamiltonian. Neither the stable circular orbits in nonequatorial planes nor the stable spherical orbits exist for a nonvanishing cosmological constant. Fig. 1. The notation "-" means the absence of SCOs and ISCOs. The energies E of the SCOs are not arbitrarily given but are determined by RC. E and the angular momentum L of the ISCOs are not arbitrarily given but are determined by RI. The values are not given for E ≥ 1. The radii RC of SCOs decrease as anyone of the string cloud bc, quintessence parameter q, quintessential state parameter q and plane parameter increases. The radii RI of ISCOs increase with the string cloud bc and quintessence parameter q increasing, but decrease with the quintessential state parameter q and plane parameter increasing. Fig. 1(a) Figs. 3 and 5(a). The radii RS of SSOs decrease when anyone of the string cloud bc, quintessence parameter q, and quintessential state parameter q increases, but increase with the increase of the Carter-like constant K. The radii RM of MSSOs increase as the string cloud bc, quintessence parameter q and Carter-like constant K increase, whereas decrease with the increase of the quintessential state parameter q. They are plotted in five planes = /6, /5, /4, /3 and /2. The impacts of the cloud strings parameter bc in Eq., quintessential state parameter q in Eq., quintessence parameter q in Eq. and plane parameter on the effective potentials are shown in panels (a)-(d), respectively. The plane parameters satisfy Eq. with p = 0 and are constants. For a given separation r, the potentials (i.e., energies) decrease as each of the string cloud bc, quintessence parameter q and plane parameter increases, whereas increase when the quintessential state parameter q increases. The other parameters in each of the panels are the same as those of Fig. 1(d). The upper part of each panel corresponds to the practical trajectories, and the bottom part relates to projections of the practical trajectories. These orbits still remain circular and stable in the three-dimensional space XY Z when the integration time = 10 5.
export enum MouseInput { LeftButton = 0, MiddleButton = 1, RightButton = 2, MousePosition = 3, MouseClickDownPosition = 4, MouseClickDownTransformRotation = 5, MouseMovement = 6, MouseScroll = 7, MouseClickDownMovement = 8 } export enum TouchInputs { Touch = 10, DoubleTouch = 11, LongTouch = 12, Touch1Position = 13, Touch2Position = 14, Touch1Movement = 15, Touch2Movement = 16, SwipeLeft = 17, SwipeRight = 18, SwipeUp = 19, SwipeDown = 20, Scale = 21 } export enum XRAxes { Left = 22, Right = 23 } export enum XR6DOF { HMD = 24, LeftHand = 25, RightHand = 26 } export enum GamepadAxis { Left = 28, Right = 29 } export enum GamepadButtons { A = 30, B = 31, X = 32, Y = 33, LBumper = 34, RBumper = 35, LTrigger = 36, RTrigger = 37, Back = 38, Start = 39, LPad = 40, RPad = 41, LStick = 42, RStick = 43, DPad1 = 44, DPad2 = 45, DPad3 = 46, DPad4 = 47 } export enum CameraInput { Neutral = 100, Angry = 101, Disgusted = 102, Fearful = 103, Happy = 104, Surprised = 105, Sad = 106, Pucker = 107, Widen = 108, Open = 109 }
1. Field of the Invention The present invention relates to beer dispensing apparatus, and more particularly to a foam reducing apparatus disposed for insertion into commercial beer dispensing systems. Even more particularly, the present invention relates to a foam reducing apparatus disposed for insertion into the beer delivery lines between the keg and the serving spout. 2. Description of the Prior Art Conventional commercial beer delivery systems utilize a pressurized carbon dioxide source to deliver beer from the keg to the serving spout. Typically, the keg cooler is located in the basement of a building, whereas the serving spouts for beer are located upstairs at one or more bars. Typically, the beer delivery lines may be anywhere from approximately 10 feet to 100 or more feet long. Depending on the length of the delivery line, the delivery lines may contain up to three to five pints of beer. Using the conventional beer delivery system, as described above, pressurized carbon dioxide is oftentimes forced into the delivery lines when the keg empties. This pressurized carbon dioxide is the cause of substantial foaming when the keg nears its emptying point. When the pressurized carbon dioxide enters the beer delivery lines, the contents of the lines usually must be discarded because the substantial foaming renders the beer undesirable. Over time, the wasting of up to three to five pints of beer per keg may results in significant lost profits. To overcome this problem with traditional commercial kegging systems, one piece of prior art discloses a "foam on beer", or FOB detector. The FOB detector, manufactured by Metallocraft & Engineering Limited, appears in an sales brochure. The FOB detector shown in the sales brochure comprises a beer chamber which has an inlet for receiving the beer supply from a keg, an outlet for discharging beer to a tap, and a floating member to close the outlet. While beer flows through the FOB detector, the float remains in its buoyant position to allow beer to flow from the outlet. When pressurized carbon dioxide and foam enter the container, the float drops and seals the outlet closed to prevent pressurized carbon dioxide from entering the beer delivery line. The FOB detector also comprises a first handle that operates a cam to control the position of the floating member, as well as a second handle that controls the opening and closing of an air vent. The FOB detector comprises a pair of casing members that screw onto and seal the opposed ends of the beer chamber. The Metallocraft & Engineering Limited FOB detector, however, requires two handed operation to re-establish the flow of beer through the delivery line. To accomplish the task, a user must manipulate a first handle with one hand to allow gas to bleed from the FOB detector when a new keg is tapped, and then manipulate a second handle with the other hand to effect the cam and the position of the float. In addition, because the casing members are located on either end of the device, the Metallocraft & Engineering Limited FOB detector is much more difficult to disassemble for cleaning or replacement of parts. None of the above inventions and patents, taken either singly or in combination, is seen to describe the instant invention as claimed.
Newswise — PHILADELPHIA – The value of intersecting the sequencing of individuals’ exomes (all expressed genes) or full genomes to find rare genetic variants -- on a large scale -- with their detailed electronic health record (EHR) information has “myriad benefits, including the illumination of basic human biology, the early identification of preventable and treatable illnesses, and the identification and validation of new therapeutic targets,” wrote Daniel J. Rader, MD, chair of the Department of Genetics, in the Perelman School of Medicine at the University of Pennsylvania, in Science this week, with Scott M. Damrauer, MD, an assistant professor of Surgery at Penn and the Veterans Affairs Medical Center in Philadelphia. Their commentary accompanies two linked studies on the topic in the same issue. One reports on whole-exome sequencing of more than 50,000 individuals from the Geisinger Health System in Pennsylvania and the analyses of rare variants with data from longitudinal electronic health records. They identified hundreds of people with rare “loss-of-function” gene variants that were linked to observable physiological characteristics, or phenotypes. The second article reports on a study that identified individuals in the same database with familial hypercholesterolemia, many of whom had not been diagnosed or treated. “These results demonstrate the enormous potential of this approach for promoting scientific biomedical discovery and influencing the practice of clinical medicine,” the authors wrote. Because sequencing ever-larger datasets of human exomes -- and full genomes -- has become faster, more accurate, and less expensive, researchers can find rare genetic variants more quickly. And then matching these rare genetic finds to EHR phenotype data has the potential to inform health care in important ways. “Many single-gene disorders like familial hypercholesterolemia [FH] are under-diagnosed,” Rader said. “Once an individual with a single-gene disorder is identified, not only can that person be placed on appropriate medical intervention, but we can also screen his or her extended family members to see who else carries the mutant gene and may benefit from preventative approaches.” He cites a recent list of 59 “medically actionable” genes, curated by the American College of Medical Genetics and Genomics (ACMG), in which loss of function mutations can lead to specific medical interventions. For example, individuals from the extended family of a person found to have FH who also carry the mutation should have their cholesterol checked and be placed on medication to reduce cholesterol. Penn Medicine is one of the world's leading academic medical centers, dedicated to the related missions of medical education, biomedical research, and excellence in patient care. Penn Medicine consists of the Raymond and Ruth Perelman School of Medicine at the University of Pennsylvania (founded in 1765 as the nation's first medical school) and the University of Pennsylvania Health System, which together form a $5.3 billion enterprise. The Perelman School of Medicine has been ranked among the top five medical schools in the United States for the past 18 years, according to U.S. News & World Report's survey of research-oriented medical schools. The School is consistently among the nation's top recipients of funding from the National Institutes of Health, with $373 million awarded in the 2015 fiscal year.The University of Pennsylvania Health System's patient care facilities include: The Hospital of the University of Pennsylvania and Penn Presbyterian Medical Center -- which are recognized as one of the nation's top "Honor Roll" hospitals by U.S. News & World Report -- Chester County Hospital; Lancaster General Health; Penn Wissahickon Hospice; and Pennsylvania Hospital -- the nation's first hospital, founded in 1751. Additional affiliated inpatient care facilities and services throughout the Philadelphia region include Chestnut Hill Hospital and Good Shepherd Penn Partners, a partnership between Good Shepherd Rehabilitation Network and Penn Medicine. Penn Medicine is committed to improving lives and health through a variety of community-based programs and activities. In fiscal year 2015, Penn Medicine provided $253.3 million to benefit our community.
def select(context, name, iterable, **kwargs): for item in iterable: for (key, value) in kwargs.items(): try: if getattr(item, key) != value: break except AttributeError: break else: break else: item = None context[name] = item return ''
Investigating the impact of virtual tourism on travel intention during the post-COVID-19 era: evidence from China This study explores the mechanism that contributes to travel intention in the field of virtual tourism. The overall research method is based on the Stimulus-Organism-Response theory. In the research model, the effects of content quality, system quality, and interaction quality in virtual tourism on tourism experience and travel intention are explored, as well as the role of virtual attachment and travel intention. A total of 390 respondents were invited to participate in a virtual tourism experience, and provide feedback through a questionnaire. SmartPLS 3.3.2 was used to validate the causal model, and most of the study hypotheses were supported. The findings show that virtual tourism significantly promotes travel intention. Specifically, content quality, system quality, and interaction quality positively affect tourists' travel intention through the complementary mediations of tourism experience and virtual attachment; and system quality even directly promotes travel intention. However, tourism experience does not affect virtual attachment. The present study extends prior studies on virtual tourism with SOR as a general model for field tourism experience research, while demonstrating the effectiveness of virtual tourism in promoting tourists travel intention. The results are useful in assisting governments with developing relevant policies and services, as well as helping tourism companies understand virtual tourism as an enhancement for tourist travel intention, thus contributing to the recovery of the tourism industry in the post-COVID-19 era. Introduction The COVID-19 pandemic was the most significant public health emergency with the most rapid spread and broadest infection range since the founding of the People's Republic of China in 1949. During the outbreak, economic activities in China were basically at a standstill, except for certain industries that still functioned to meet the basic needs of the public. The outbreak significantly disrupted the entire tourism industry due to the allopatric and clustered nature of tourism activities, a series of activities undertaken by tourists who travel from the source to the destination via the tourism corridor. In response to COVID-19, Chinese cities have primarily closed communities and surrounding villages and towns to restrict the movement of people. As a result of this response, demand for tourism activities was passively reduced to zero. Travel agencies, which were the gateways, were asked to suspend their operations. In contrast, air carriers and railroads, the gateways, changed their usual "change and refund" policy and offered free refunds to passengers who had already purchased tickets. Accordingly, passenger traffic and revenue in the transportation industry plummeted during the pandemic. In tourist destinations, tourist attractions were almost completely shut down. Hotels were either shut down, or provided temporary housing for medical staff or used as temporary isolation sites to receive patients. Arguably, the tourism supply was essentially at zero. The sudden onslaught of COVID-19 kept people at home, which was a big blow to the offline tourism industry. Since the pandemic was alleviated in China, the offline tourism industry still faces a significant challenge. In this course, the tourism industry has also explored new ways of development, i.e., "virtual tourism," "live-streaming tourism," and other new ways of relaunching the tourism industry with the help of the internet and innovative technologies. The segmentation of "smart technology + tourism" is reflected in integrating virtual reality (VR) technology and tourism products. The development of virtual reality technology has broken through past limitations, which could only simulate the natural environment through pictures or videos and provided participants with a better "immersion" experience. As the influence of VR technology expands and its attention increases, academic research on VR technology is also increasingly available. The pioneering research mainly combines virtual reality technology with landscape design, medical education, and disease treatment from the research content. Nevertheless, a further literature search revealed that the existing literature on "VR and tourism" is sparse. Scholars have now focused on the marketing value of VR technology and destination image building. Although the methods used in these studies are relatively homogeneous and empirical studies are lacking, they still provide vital tools, methods, and mindsets for studying VR technology and tourism. The theory has guiding significance for practice, and VR technology, as a new communication medium, has an immeasurable impact on the tourism industry's development. Hence, it is imperative to strengthen academic research in virtual tourism. The decisive intervention of virtual technology has given new connotations, characteristics, and forms to the relationship between people and places. The traditional binary space of tourist and physical tourist places shifts into the ternary connections between virtual place, tourist, and real place. The interrelationship of such ternary spatial continuity has become an essential topic in the study of the people and the place in the digital era. At present, scholars have paid attention to constructing the ternary space. However, the study of tourists' behavioral intentions in the ternary space still needs to be advanced. Virtual tourism may affect users' experiences, attitudes, and behaviors. However, the way virtual tourism affects users' travel experience and emotional attachment, as well as the role of virtual tourism on future travel intention in the field, is still unclear. Therefore, starting from the SOR theory, this paper constructs a model of the influencing factors of virtual tourism experience (3D reconstruction of the real tourism place)-the inner psychology of users in the virtual tourism process-the travel intention in the field. We explore how virtual tourism uses digital technology to construct users' attachment to real tourism places and then influence their travel intention in the field. This study, therefore, starts from the characteristics of virtual tourism, draws on the research theories and experiences of established social media platforms such as live streaming, short video, and online shopping, and introduces two mediating variables of tourism experience and virtual attachment based on the psychological perspective, with the "Stimulus-Organism-Response" theory (referred to as SOR model) as the theoretical framework, constructs a conceptual model of the impact of virtual tourism on tourists' travel intention, and carries out empirical analysis with virtual tourism to explore how virtual tourism affects their field travel intention through users' intrinsic state. This study contributes to a comprehensive and in-depth understanding of the new tourism human-ground relationship in the information age. It clarifies the mechanism of human-ground emotional attachment in virtual tourism. At the same time, the present study helps to clarify the mechanism of virtual tourism influence on users' travel intention in the field, deepening the study of the human-place relationship in the ternary space. The results provide a feasible direction for promoting the integration of tourism locations and people in the information age. Furthermore, this study has important practical implications for the experience design of virtual tourism, tourism destination marketing innovation, and enhancement of tourist loyalty in the post-COVID-19 era. Therefore, this paper empirically examines the impact of virtual tourism on tourists' travel intention in the field through the questionnaire method, specifically by addressing the following research questions: RQ1: Does the virtual tourism experience increase users' travel intention in the field? RQ2: What factors contribute to tourists' travel intention in the field of virtual tourism? RQ3: How do important influencing factors of virtual tourism experience (content quality, system quality, interaction quality), tourism experience, virtual attachment, and travel intention interact with each other? Stimulus-organism-response (SOR) model The Stimulus-Organism-Response (SOR) model is a model of human cognitive behavior, first proposed by. It reflects the "stimulus-perception-response" process of human behavior. The SOR theory model suggests that stimuli from the external environment influence individuals' behavioral decisions by affecting their emotions. The term "stimulus" refers to the factors that stimulate and cause individuals to act. The term "organism" refers to an individual's interior psychological state. The term "response" refers to the individual's numerous behaviors or behavior intentions in response to the stimuli and the organism. In the SOR framework, the stimulus is generally used as the independent variable, the organism as the mediating variable, and the response as the dependent variable. SOR began as a cognitive model used in psychology and is now frequently utilized to examine Internet user behavior. In tourism research, the SOR model was used to study travel experience, travel intention, and user engagement. Researchers have found various factors capable of influencing tourist travel intention, including tourists' internal reasoning and the influence of certain external factors, such as tourists' reference information, personal perceptions, and perceived risks. Various social, economic, and psychological factors may impact tourists' travel intentions. Among them, both the reference group and the individual's subjective perceptions play a vital role in forming travel intentions. The reference group of tourists and their subjective knowledge psychologically form emotional preferences and inherent impressions of a tourist destination, which affects the willingness and choice of tourists to travel to that destination. SOR theory suggests that the external environment stimulates the individual's perceptions and emotions, which affects the individual's behavior. Therefore, in studies of consumer travel intentions or behaviors, giving subjects "S" (e.g., VR environment) stimuli before measuring "R" (e.g., questionnaire results) tend to reveal more valid findings when travelers use digital technology such as virtual reality (VR), artificial intelligence (AI), and augmented reality (AR) to immerse themselves in a highly immersive virtual tourism experience. The process of content stimulation produces the individual's organism, i.e., psychological state. The content quality, system quality, and interaction quality of virtual tourism will directly impact the tourists' tourism experience and virtual attachment, which will affect the tourists' travel intention in the field. The impact of virtual tourism experience on tourists' intrinsic state According to previous research findings, content quality, system quality, and interaction quality are essential variables that entice tourists to use digital devices for virtual tourism experiences. According to the SOR theory, tourists experienced content quality, system quality, and interaction quality of the virtual travel as stimuli in the experience process. The organism, i.e., the internal process that mediates the external stimulus and behavioral response received by the individual, is in this study expressed as the tourist experience and virtual attachment of tourists. Virtual tourism and tourism experience Experience is an objectively existing psychological need. Essentially, the tourism experience is an individualized feeling of an individual responding to certain stimuli. Morrison et al. discovered that physical environmental factors such as music, lighting, and facilities were positively associated with customer mood. Lee, park, and Han found that the quality of online content affects user engagement and acceptance. Due to the attractiveness of the web, uploading high-quality images or videos can influence user satisfaction. Ghose and Huang found that the higher the availability of modern technology, the more companies can promote product quality through personalized services and products. In this way, service quality is improved by increasing satisfaction. In the context of virtual tourism, its interaction quality mainly refers to the ability to provide personalized information, understand tourists' needs and preferences, and personalized interactions. Chang designed an AR-based cultural heritage tour system. He found through a questionnaire that tourists had a strong experience with this system. Jung's study found that the content of augmented reality technology, personalized services, and system quality affect tourists' experience and thus their satisfaction. Based on this, this study proposes the following hypotheses: H1: The content quality of virtual tourism positively affects the tourism experience; H2: The system quality of virtual tourism positively affects the tourism experience; H3: The interaction quality of virtual tourism positively affects the tourism experience. Virtual tourism and virtual attachment The specific and deep connections people make to a place by assigning meaning to it are called "place attachments". Attachment refers to "the human tendency to develop strong emotional ties to specific people and objects." With the development of technology, an individual's attachment is not necessarily to a real place. However, it can be extended to a broader scope. For example, with the rapid development of new media, people with common interests or experiences communicate and interact through computer networks, creating emotional attachments to the virtual communities they form. When experiencing social isolation or loneliness, some users develop an emotional attachment to the Internet and social media. Moreover, in the context of the current COVID-19 pandemic, virtual tourism rekindles tourists' travel confidence, helps them gain a sense of control and security, and regains their travel rhythm. Attachment arises from experience, and the perceived value of different experiences has different effects on attachment production. When the virtual world is more realistic, the user's visual senses are more actively involved in aesthetic perception, resulting in a more memorable experience and encouraging attachment to virtual tourism. In addition, the dual stimulation of content quality (virtual scenery) and interactive format (virtual experience) allows users to perceive the experience value of entertainment and enjoyment. When users' own emotional needs are satisfied, they will have a positive emotional evaluation of the virtual scenery, which leads to the enhancement of virtual attachment. This study contends that while utilizing digital devices for virtual tourism, tourists perceived positive content quality, system quality, and interaction quality would drive their connection to virtual tourism. Therefore, the following hypotheses are proposed in the present study: Tourism experience and travel intention The organism is an internal cognitive process in response to external stimuli. In this process, the information generated by the organism as a result of the stimulus, such as sensations, perceptions, and emotions, will become the basis for subsequent travel intentions and travel behaviors. The emotions generated by an individual stimulated by the external environment will lead the user to approach or avoid behaviors toward the environment and mediate between environment and behavior. Ekanayake found that tourists' experiences positively influenced their travel intentions by studying tourists in the eastern province of Sri Lanka. Kim studied tourists of virtual reality tourism based on the diffusion of innovation theory. He found that users' authentic tourism experience positively affects their travel intention. Kim and Jung studied the effect of tourists' authentic experience on their travel intention based on SOR theory. The study finds that tourists' behavioral intentions are influenced by their sense of authentic virtual reality tourism experiences. Raouf Ahmad Rather investigated the impact of experiential marketing activities on tourists' behavioral intentions in tourist destinations. It was found that tourists' experiences of marketing activities in tourist destinations affect their travel intention. Based on this, this paper proposes the following hypothesis: H7: Tourism experience positively affects travel intention. Virtual attachment and travel intention The prior studies have found that with the intervention of network information, the traditional two-dimensional perspective of the human-territory relationship is extended to a three-dimensional space. New human-territory links and interaction forms of (real)person-(virtual)person, (virtual) person-(virtual)place, and (real)place-(virtual)place emerge. The cognition, emotion, and behavior of virtual and real spaces influence each other and intermingle. Users' purchase intentions in the virtual world are consistent with those in the real world, and Ren et al. demonstrated that attachment to virtual communities affects the frequency with which individuals visit virtual communities. Kim et al. also found that their attachment to VR influenced VR tourism users' intentions to visit real places. Therefore, based on the above literature, this study argues that users' awareness and behavior in the virtual world somehow represent real-world awareness and behavior. Virtual attachment enhances tourists' desire for real-world travel destinations. Therefore, the virtual attachment will stimulate the travel intention in the field. Based on this, the following hypothesis is proposed: H8: Virtual attachment positively affects travel intention. Virtual attachment and tourism experience Regarding the relationship between residents' activity participation and local attachment, many empirical studies point out that residents' involvement in local activities positively affects their local attachment. Furthermore, through an empirical study, Kyle et al. and Hwang et al. found that tourists' leisure activity participation had a significant positive effect on their place attachment. In the study on the relationship between the cognitive gap, affective experience, and place attachment, scholars also confirmed that affective experience positively affects place attachment. The higher the quality of tourists' emotional experience, the higher their level of attachment. It is hypothesized that the higher the positive tourism experience, the greater the likelihood that the tourist will develop a virtual attachment to the destination. Based on this, the following hypothesis was proposed: H9: Tourism experiences positively influence virtual attachment. The mediating role of the tourists' intrinsic state The SOR theory emphasizes the mediating role of the response between the stimulus and the individual's behavior. By comparing the results of prior studies, it was found that tourism experience and virtual attachment play a connecting role between various influencing factors and behavioral intention. Chae, Kuo et al. found that service quality positively impacts customer recommendation and continued usage behavior. Wang and Chen found that the presentation of information systems positively affected consumers' intention to use them. Jung points out that the quality of content affects tourists' attitudes toward AR applications. N Zhang et al. found that brand attachment exerts a partial mediating effect on the relationship between effective CC and brand commitment. Jenny Lee et al. found a mediating effect between place attachment on satisfaction and loyalty. Based on this, the following hypotheses were formulated: H10: Tourism experience has a mediating role in influencing travel intention on content quality; H11: Tourism experience has a mediating role in influencing travel intention on system quality; H12: Tourism experience has a mediating role in influencing travel intention on interaction quality; H13: Virtual attachment has a mediating role in influencing travel intention on content quality; H14: Virtual attachment has a mediating role in influencing travel intention on system quality; H15: Virtual attachment has a mediating role in influencing travel intention on interaction quality. Research model In summary, this study employs SOR theory as the research framework. Content quality, system quality, and interaction quality of virtual tourism as the antecedent variables of tourism experience, virtual attachment, and tourists' travel intention in the field. The construction of a research model of the factors influencing virtual tourism on tourists' travel intention in the field, as shown in Fig. 1. Usability test design and data collection Virtual tourism is a new type of tourism as well as a new industry. Currently, Chinese tourists have less exposure and knowledge about it. With universal access to such new consumer technology, we implemented a real usage scenario to get participants actually and bodily experience virtual tourism in the field. The few users who already experience virtual tourism products were not directly selected for this study. In this way, researchers can measure users' temporal-sensitive experience and concurrent travel intention after the tourists have touched and used the virtual tourism device. The specific method can be referred to as "usability testing." The concept of usability testing was first introduced in 1981. Usability testing evaluates the usability and unavailability of a product based on certain usability criteria. Usability testing is also a programmed process used to identify problems that may occur during user-product interaction. In a narrow sense, usability testing refers to user testing methods that allow a representative group of users to perform typical operations on a product. At the same time, observers and design developers observe, listen, and record. It is a process used to evaluate a product or system's external form, functional operation, and interaction patterns. Previous studies investigated the research and application of usability tests from multiple aspects and dimensions in tourism research. Researchers discuss usability test methods and applications from different perspectives, including usability evaluation methods such as user testing, questionnaire survey, and eye-tracking technology. And the researchers also make practical exploration of usability test research. We can consider usability tests an effective verification method for analyzing user behavior and experience. This lays an important theoretical foundation for this study. Participants Our research team obtained the research sample (Table 1) in two ways: First, we recruited virtual tourism experience participants (52% of the total number) through the online social media platform Sina Weibo. With over 300 million monthly active users, Sina Weibo is the largest public social media platform in China. The researcher recruited participants by posting recruitment posts on the Sina Weibo platform. The research team then used the Weibo-targeted promotion service to promote the recruitment posts to users who were potentially willing to participate in the virtual tourism experience. Second, the research team recruited users who were willing to participate in virtual tourism through offline in-person networks (48% of the total population). In the data collected, we found that the number of users aged 18-25 who had experienced virtual travel was higher than those in other age groups. This is consistent with Li and Chen's findings. Therefore, we believe that the research sample obtained is highly credible, reliable, and reproducible in terms of feedback effects. Our research team was trained to strictly follow the test procedures to ensure data quality. The participants were also asked to follow the test procedures strictly. SPSS 25.0 was used to perform descriptive statistical analysis on the sample data to investigate the sample's demographic characteristics, as shown in Table 1. A total of 390 subjects were recruited to participate in the virtual tourism experience, of which 53.6% and 46.4% were male and female, respectively. In terms of age, users aged 18-25 account for the most significant proportion, 33.8 percent, followed by users younger than 18, accounting for 25.1 percent; in terms of education, bachelor's education is the mainstay, accounting for 64.6 percent. Material and Procedure Quan Jing Wang (http:// www. vra. cn/#/ home) has rich virtual tourism scenic spots resources and contains pictures, videos, texts, audio, and other forms. Therefore, we chose the virtual tourism of "VR Panorama of the Palace Museum" launched by Quan Jing Wang as the tourists' tour material, as shown in Fig. 2. The usability testing process was broken down into four main steps, as shown in Fig. 3. In the first step, the researcher introduced the participants to the content of this usability test and the VR equipment that they would need to use to conduct the virtual tourism. In the second step, the researcher showed the participants an instructional video on using the VR device for virtual tourism. In the third step, the researcher asked the participants if they had learned how to use the VR device for virtual tourism. If the participant answered yes, the participant moved on to the next step. If the participant answered no, the participant had to go back to the second step and continue learning until the participant learned to move on to the next step. In the fourth step, the participant begins to experience virtual tourism for 40 min. In the fifth step, the research team personnel collected feedback from all participants utilizing a questionnaire and randomly selected participants for a brief interview. In this way, the participants were urged to complete the test as required until the end of the test and start filling in the feedback questionnaire. This research focuses on virtual tourists' psychological processes and behavioral intentions. The question scale content was developed using correlation theories and a conceptual model. The questionnaire includes two parts: basic information about the subjects and feelings about using virtual tourism. The relevant scales in this study were all fine-tuned using mature scales or based on mature scales to fit this paper's virtual tourism research context. The stimulus factors were measured using the variables of content quality (three items), system quality (four items), and interaction quality (three items) adopted from. The organism factors were measured using the variable of tourism experience (four items) and virtual attachment (five items) adopted from, 100, 103, 106, 109]. The response factor was measured using the variable of travel intention (three items) adopted from. To ensure the accuracy and scientific validity of the questionnaire, the research team first conducted a small-scale questionnaire pre-test. The test results were also given back to five researchers in virtual tourism, information behavior, and news communication. The questionnaire questions followed the Delphi method to adjust, correct, and calibrate the questionnaire repeatedly until the error was controlled within the appropriate range. SPSS 25.0 was used in this study to perform descriptive statistical analysis on the sample data to investigate the sample's demographic characteristics. According to demographic characteristics, as shown in Table 1. A total of 390 subjects were recruited to participate in the virtual tourism experience in this study, of which 53.6% and 46.4% were male and female, respectively. In terms of age, users aged 18-25 account for the most significant proportion, 33.8 percent, followed by users younger than 18, accounting for 25.1 Common method variance The question of common method variance in the sample was first tested for correlation. To prevent the effect of common method variance on the sample, we hid the names of variables and measurement items in the questionnaire beforehand and randomly assigned the measurement items in the questionnaire. The Harman one-way test for common method variance was used. The results of the unrotated factor analysis showed that there were five factors with characteristic roots greater than one, explaining a total of 75.598% of the variance variation. The first factor explained 36.722% of the method variance. Therefore, there is no significant common method bias problem. Measurement model This study performed structural equation modeling on 390 samples using "PLS-SEM." The SmartPLS 3.3.2 software settings were: "weighting scheme" using "path weighting scheme," "maximum number of iterations" = 300, and end criterion = 1*10 − 7. The Bootstrapping test for significance of each indicator: subsample = 5000, confidence interval method using Bias-Corrected and Accelerated (BCA) Bootstrap, test type using the two-tailed test, significance level = 0.05. The reliability, convergent validity, and VIF values of the measurement models are shown in Table 2: in terms of reliability, Cronbach's were above the critical value of 0.7, from 0.868 (SQ) to 0.931 (VA),the Composite Reliability is also more significant than the critical value of 0.7, from 0.910 (SQ) to 0.948 (VA). Thus, the measurement model has good reliability. In terms of validity, the factor loadings () for all measurement questions were more significant than the critical value of 0.7, from 0.795 (SQ4) to 0.921 (CQ3). In addition, the AVE for all variables were more significant than the critical value of 0.5, from 0.718 (SQ) to 0.822 (CQ). Thus, the measurement model has good convergent validity. In terms of VIF, the Outer VIF Value was all less than the standard value of 5, from 1.821 (SQ4) to 3.629 (TE3). The Inner VIF Value was also less than the standard Path analysis In terms of path analysis, as shown in Table 4 and Fig. 4, CQ had a significant positive effect on TE with a path coefficient of 0.144 (p < 0.05); SQ had a significant positive effect on TE with a path coefficient of 0.298 (p < 0.001); IQ had a significant positive effect on TE with a path coefficient of 0.116 (p < 0.05); CQ had a significant positive effect on VA with a path coefficient of 0.195 (p < 0.05); SQ has a significant positive effect on VA with a path coefficient of 0.153 (p < 0.05); IQ has a significant positive effect on VA with a path coefficient of 0.235 (p < 0.001); TE has a significant positive effect on TI with a path coefficient of 0.577 (p < 0.001); VA has a significant positive effect on TI with a path coefficient of 0.577 (p < 0.001); SQ has a significant positive effect on TI with a path coefficient of 0.180 (p < 0.01). Therefore, H1-H8 were established. On the other hand, there is no significant effect of TE on VA; there is no significant effect of CQ and IQ on TI. Therefore, H9 was not valid. Meanwhile, when performing model fitting and hypothesis testing, the researchers found that system quality also had a positive effect on travel intention to some extent. So, this study added hypothesis H16: System quality positively affects travel intention. Mediating effect analysis For the mediating effects, TE and VA acted as mediating variables in the relationship between the effects of CQ on TI, with indirect effects of 0.083 (p < 0.05) and 0.045 (p < 0.01) and total effects of 0.081 (p < 0.001) and 0.043 (p < 0.001), respectively; TE and VA acted as mediating variables in the relationship between the effects of SQ on TI, with indirect effects of 0.172 (p < 0.001) and 0.036 (p < 0.05) and total effects of 0.352 (p < 0.001) and 0.216 (p < 0.05), respectively. indirect effects of 0.172 (p < 0.001) and 0.036 (p < 0.05), respectively, and total effects of 0.352 (p < 0.001) and 0.216 (p < 0.001), respectively; TE and VA acted as mediating variables in the relationship between the effects of IQ on TI, with indirect effects of 0.067 (p < 0.05) and 0.055 (p < 0.01), with total effects of 0.082 (p < 0.001) and 0.070 (p < 0.001), respectively. Since all the above indirect effects were positive, the mediating effects were all Complementary mediation, and H10-H15 were established, as shown in Table 5. Predictive power assessment The predictive power assessment showed R 2 = 0.201 for TE, R2 = 0.566 for TI, and R 2 = 0.178 for VA. Q 2 was calculated based on Blindfolding, and Q 2 > 0 indicates that the structural model has predictive relevance for the endogenous variables and vice versa. The calculated Q 2 = 0.158 for TE, Q 2 = 0.450 for TI, and Q 2 = 0.135 for VA, all of which are greater than 0. This indicates that the structural model has predictive relevance for TE, TI, and VA. Key findings This study adopts a psychologically-derived SOR theoretical framework to explore the impact of virtual tourism on tourists' travel intention in the field. The findings and implications are described below. RQ1 was clearly answered (Does virtual tourism experience increase users' travel intention in the field?). This research revealed a significant positive relationship between content quality, system quality, and interaction quality of virtual tourism on tourists' tourism experience, virtual attachment, and travel intention through model testing and mediating effect testing, which is consistent with the findings of previous studies. During home quarantine, the recurrence of the pandemic and the disclosure of various negative information led to a surge in stress and anxiety. Many people were compelled to cancel their travel plans. With the intrinsic motivation to travel and the negative information about the pandemic, people's psychological need to escape from the real world and be free from bondage is triggered to a great extent. The magnificent scenery of virtual tourism attractions provides people with the opportunity to have a short escape from reality. It brings a visual feast of beauty, thus facilitating the creation of virtual attachment. In addition, the quality of content, system quality, and interaction of virtual tourism enable tourists to obscure the boundaries between the virtual and physical realities, which generates a higher degree of authenticity in the tourism experience. In the virtual environment created by virtual tourism, tourists develop virtual attachments and experience unique tourism experiences distinct from natural tourism. These factors ultimately impact tourists' travel intention in the field. As a new type of tourism, virtual tourism has novel and unique characteristics that attract tourists and inspire their curiosity. As a result, virtual tourism strengthens tourists' intention to run to the destinations promoted in virtual tourism by providing immersive tourism experiences and realistic virtual attachments. The following findings can be reported for RQ2 (What factors change tourists' travel intention in the field of virtual tourism?). Tourism experience and virtual attachment are critical variables that influence tourists' travel intention in the field and are crucial factors in whether virtual tourism can attract more tourists. This empirical analysis revealed that tourism experience and virtual attachment positively impact tourists' travel intention in the field. Tourism experience has the most significant impact on travel intention in the field, followed by virtual attachment, which is mainly relevant to the form and nature of virtual tourism. As a new form of tourism, the ultimate goal of virtual tourism is to provide tourists with an ideal tourism experience. Thus, virtual tourism will be designed to consider tourists' needs to meet the tourism experience. Tourists gain their desired experience in virtual tourism; therefore, the tourism experience has the most significant impact on the travel intention in the field. In addition, tourists may develop an emotional attachment to the actual tourist place through the interaction between the virtual space and the 3D reconstructed scenery, thus creating an emotional connection with the place they have not visited, which further influences the travel intention in the field. The following findings can be reported for RQ3 (How do influencing factors of virtual tourism experience <content quality, system quality, interaction quality>, tourism experience, virtual attachment, and travel intention interact with each other?). System quality may directly and significantly affect travel intention positively. Tourism experience and virtual attachment play a complementary mediating role in influencing relationships of content quality, system quality, and interaction quality. As shown by the relative effect values of the mediating effects, the indirect effects are significant in proportion. Tourists' knowledge of the scenery presented in virtual tourism drives their travel intention while granting them real tourism experience and virtual attachment during the tour, further motivating their travel intention. In addition, there was no significant positive impact of tourism experience on virtual attachment. The results of this study contradict the findings of. The emergence of virtual attachment requires a deeper connection between the tourist and the destination. The positive perceptions and memorability developed from a single or a few tourism experiences do not allow for the emotional connection and psychological identification with the destination that tourists accumulate to give rise to the virtual attachment. Therefore, tourism experiences and virtual attachment do not have a direct correlation. Theoretical implications This study's theoretical contributions are categorized into three parts. First, we studied the three contributing dimensions of virtual tourism experience and travel motivation under the immersive "S-O-R" research design. Namely, content quality, system quality, and interaction quality. Further, we expanded their meaning under the scope of VR tourism. Content quality refers to the intrinsic values, i.e., objectivity, credibility, and the amount of information the virtual tourism provides. System quality refers to the quality of the tourist's use of virtual tourism and its design in terms of structure, presentation, and connectivity. Interaction quality is the ability of virtual tourism to provide interactive features to tourists. With these delimitations, this study constructs a relational model which suggests a positive relationship between those qualities and tourism intention through the mediation of virtual content characteristics. Together, the results should be carefully considered in building virtual tourism interactions, providing information to tourists, and understanding tourists' preferences. Second, prior Studies have conducted empirical tourism research for VR only in a limited number of areas: first, web-based visual images, such as 360°panoramic images. Second, virtual environments are based on fictional worlds in VR games. Third, virtual environments are displayed on a two-dimensional computer screen. In addition, few tourism studies have used VR devices to conduct usability tests on live-action virtual tourism products. By focusing on the sensory stimuli evoked by VR technology-based virtual tourism for tourists, this work examines the psychological processes of tourists' travel experiences and reactions to virtual tourism products. Since VR technology is constantly evolving, this study will be a good reference paradigm for future usability studies of virtual tourism products based on VR technology. Third, scholars' prior studies on travel intention have focused on influencing factors of travel intention, relationship studies, and place attachment. Researchers' work on travel intention was first extended from social behavior, where it was generally accepted that "travel" is also social behavior. The research methods used by scholars for research in this area are mainly quantitative methods, such as factor analysis and constructive modeling. In terms of research content, scholars have expanded from the factors influencing its formation to the study of relationships. Later scholars have focused more on the emotional expression of individual tourists and explored the relationship between tourism intention and place attachment. This study builds on the prior studies and further explores a research model that is more consistent with Chinese tourists' travel intention to virtual tourism destinations in the post-COVID-19 era. Finally, this study identified virtual attachment as an antecedent factor influencing tourists' travel intention in the field, rarely seen in virtual tourism research. The study revealed that virtual attachment is a prominent variable influencing tourists' travel intention in the field when users are experiencing virtual tourism. Virtual attachment differs from other variables because it incorporates more of the tourists' affective experiences. Virtual tourism is a new way of tourism; tourists' emotions are evident in their subsequent behavior of tourists. Tourists develop emotional attachments to real tourist places through interactions with three-dimensional reconstructions of scenic areas in virtual space, thus creating emotional connections to places they have not visited and further influencing their travel intention in the field. The findings empirically develop the ternary space theory of tourist places, i.e., the traditional two-dimensional perspective of the tourist-place relationship is extended to a threedimensional ternary space, further illustrating the interrelated, interactive, and dynamic response characteristics of the ternary area. Since the individual variability of tourist groups, the influence of virtual attachment on tourists' travel intention in the field cannot be neglected. Practical implications First, this study discovered that tourism experience positively impacts travel intention (p = 0.001). The path coefficient of the variable of the tourism experience is 0.577, which is greater than other variables. This indicates the magnitude of tourists' perceptions of their experiences during virtual tours on their subsequent travel intentions in the field. Virtual tourism changes the way tourists visit a scenic area by providing them with more opportunities to interact, contextualize, and share with others. This study finds that content quality, system quality, and interaction quality can affect tourists' tour experience. Hence, three perspectives of content, system, and interaction can be adopted to enhance their experience. From a system perspective, the system quality of virtual tourism impacts the tourist experience, virtual attachment, and travel intention. Hence, the design of the presentation form as the carrier of the system quality is essential. The current way of virtual tourism, in addition to the traditional AR, VR, as a powerful means of augmented reality-holographic projection technology also has a vast space for development. This technology is not unattainable, and holographic projection technology has been used in many scenarios, such as virtual idol concerts. However, holographic projection technology has rarely been used in the tourism industry. Future virtual tourism technology researchers can make this technology universal so that tourists' homes become distant scenic spots. From an interactivity perspective, the interactivity quality affects tourists' tourism experience and virtual attachment, which affects their travel intention. Currently, virtual tourism has a lot of room for development in the interactivity aspect. Granted, the rise of the Internet has brought a completely different experience to virtual tourism interactivity than in the past. Tourists can communicate and interact through real-time voice and other means. When tourists travel in the field, on the one hand, they can interact with people; on the other hand, the interaction between people and scenery, people and things are also essential for tourists when traveling in the field. Photographing is usually one of how people interact with the scenery. Developers of virtual tourism can use cinematic stunts to allow users to pose for photos with scenes in virtual scenes. Techniques such as AR photography and photoshop (PS) can also increase tourists' engagement. In terms of human-object interaction, virtual tourism does not allow tourists to taste the specialties of the tourist destination as much as onsite tourism. Therefore, virtual tourism developers can incorporate the function of take-out recommendation in the course of the virtual tourism scenario setting. Tourists can order a local specialty dish at home, for example, Hangzhou dish, during virtual tourism in Hangzhou. In addition, developers can also add restaurant recommendations. For example, the system can recommend local Sichuan cuisine restaurants in Sichuan virtual tourism. Users can go straight to the restaurants in the tourist destination after virtual tourism to satisfy the tourists' desire for food, which is one of the most effective ways to increase tourists' travel intention in the field. Finally, future virtual tourism developers can optimize virtual tourism from other perspectives, such as growing tourists' olfactory or tactile experience. From a content perspective, content quality affects tourists' tourism experience and virtual attachment, affecting their travel intention. At the beginning of the pandemic, virtual tourism took up a large amount of demand for outbound travel. While domestic travel in China has thawed after the pandemic has been alleviated, outbound travel remains icebound. Content quality has become almost the only growth area in the post-pandemic era that can increase tourists' travel intentions onsite. The quality of content for virtual tourism requires inspiring tourists and providing practical travel information, and generating real value for tourist attractions and local government departments for tourism. The pandemic has further deepened the importance of tourism content quality. From the perspective of tourists' needs, in the post-pandemic era, faced with new information gaps, tourists increasingly need tourism information related to COVID-19 precautionary measures, such as the need for Polymerase Chain Reaction (PCR) test reports and unique business hours schedules for attractions. This information needs to be updated by virtual tourism operators in the first instance in the virtual tourism scenario. Virtual tourisms need to provide tourists with the fastest and most accurate information related to the pandemic. Finally, virtual attachment directly and positively affects the travel intention, highlighting the importance of constructing a person-place emotional identity in virtual tourism. When tourists develop heartfelt and emotional attachments (e.g., desire for spiritual purification and pilgrimage experiences ) to tourist places during virtual tours, and these needs are challenging to satisfy through the mirroring experience of virtual tourism, travel intention in the field are significantly enhanced in the future. In this regard, the virtual tourism design process should focus on the realistic simulation of beautiful scenery and stimulating tourists' spiritual resonance and emotional identification with the tourist destination, thus enhancing the effectiveness of virtual tourism as a marketing method. In addition, virtual tourism must not develop independently due to the inseparable relationship between online and offline. Specifically, virtual tourism will not wholly replace offline tourism because offline tourism is the root of virtual tourism. Without the development of offline tourism, virtual tourism will also lose the creative material. Although virtual tourism is not the pure auxiliary tool it used to be, an essential role of virtual tourism in the post-pandemic era is still to provide a reference for people to travel offline. After all, there is no substitute for offline travel that brings tourists a natural feeling. Limitations and future research There are some shortcomings in this research on the effect of virtual tourism on tourists' travel intention on site. First, the quantitative dimensions of virtual tourism can be further enriched and deepened. The quality of virtual tourism in this study was mainly manifested in three aspects: interactivity quality, content quality, and system quality. With the development of technology however, new quantitative dimensions of virtual tourism display are bound to emerge, so in future research, new quantitative dimensions of virtual tourism can be explored through methods such as grounded theory and big data mining. Second, since the data collection of this study was completed during the pandemic, the virtual attachment of virtual tourists may be affected by the pandemic. When there is a risk of infection during the trip, tourists in a housebound state may generate higher attachment levels than during the unusual period. In other words, attachment to the virtual tourism experience may be weakened when tourists are free to go out and experience the beauty of the travel destination firsthand. Therefore, the transformational relationship between tourists' virtual attachment and travel intention in the field when going out is unrestricted and can be further investigated in the future. Third, the data collected in this study come from virtual tourists in China. The high collectivism and high-power distance, and relational culture characteristics of China may also impact interpersonal relationships and social interactions, which may be very different from the perceptions of virtual tourism by tourists in other countries and cultures. Therefore, considering the impact of cultural differences, cross-cultural comparisons can be enhanced in the context of future work, to fully understand the effects and impact mechanisms of virtual tourism on tourists from different cultural backgrounds.
/** manually deactivate the speech pipeline. */ public void deactivate() { this.context.reset(); for (SpeechProcessor stage : this.stages) { try { stage.reset(); } catch (Exception e) { raiseError(e); } } }
<reponame>musings-sphere/musings export { default } from './ContactCard';
// findTail: look for the tail of the linked list // input: head - the head pointer of the list // tail - the tail pointer of the list void findTail(Node *head, Node *&tail) { Node *current = head; while (current->next != NULL) { current = current->next; } tail = current; }
package com.github.rbaul.spring.boot.activity_log.objects; import lombok.*; import java.util.Date; @Getter @Setter @NoArgsConstructor @AllArgsConstructor @Builder @ToString public class ActivityLogObject { private String username; private String action; @Builder.Default private Date time = new Date(); private ActivityLogStatus status; }
Rationale and design of a randomized, doubleblind, placebocontrolled outcome trial of ivabradine in chronic heart failure: the Systolic Heart Failure Treatment with the If Inhibitor Ivabradine Trial (SHIFT) Elevated heart rate is a significant marker for mortality and morbidity in cardiovascular disease including heart failure. Despite background treatment with a betablocker, many patients with heart failure and low ejection fraction maintain a heart rate above 70 b.p.m. Ivabradine reduces heart rate directly through inhibition of the If ionic current.
Ertapenem disk performance to predict Klebsiella pneumoniae carbapenemase produced by Gram-negative bacilli isolated in a So Paulo city public hospital. OBJECTIVE To evaluate ertapenem disk performance to predict Klebsiella pneumonie carbapenemase production by Gram-negative bacilli. METHODS All Gram-negative bacilli isolated between January 2010 and June 2011 were tested by disk diffusion (Oxoid™) for sensitivity to ertapenem, meropenem and imipenem. Resistant or intermediate sensitivity strains (diameter < 22 mm for ertapenem) were also tested for the blaKPC gene by polymerase chain reaction. Disk predictive positive value for Klebsiella pneumoniae carbapenemase and specificity were calculated. RESULTS Out of the 21839 cultures performed, 3010 (13.78%) were positive, and Gram-negative bacilli were isolated in 708 (23.52%) of them. Zone of inhibition diameter for ertapenem disk was < 22 mm for 111 isolates, representing 15.7% of all Gram-negative isolates. The PCR assay for blaKPC detected 40 Klebsiella pneumoniae carbapenemase-producing strains. No strains intermediate or resistant to meropenem and imipenem were sensitive to ertapenem. The ertapenem disk presented a positive predictive value of 36% to predict blaKPC and 89% specificity. CONCLUSION The resistance of Gram-negative bacilli detected by disk diffusion against ertapenem does not predict Klebsiella pneumoniae carbapenemase production. Other mechanisms, such as production of other betalactamases and porin loss, may be implicated. The need to confirm the presence of the blaKPC is suggested. Therefore, ertapenem was a weak predictor for discriminating strains that produce Klebsiella pneumoniae carbapenemase.
Darren Edmondson praised the role of Jason Kennedy in helping a young Carlisle United side into the semi-finals of the Cumberland Cup. The experienced midfielder played the full 90 minutes and scored the Blues' second goal as a mostly youthful United team beat holders Cleator Moor Celtic 3-1. Youth team players Taylor Charters and Keighran Kerr were also on target after Tom Mahone’s opener for the hosts in a game academy boss Edmondson described as an excellent learning curve for his players. He also praised the efforts of United’s west Cumbrian opponents after a game played in difficult conditions with a strong wind and heavy rain. On Kennedy, the coach said: “We’ll find out as the week unfolds what he said to [the younger players] during the game, as you can’t always hear when conditions are like they were. “But towards the end, when we were killing the game off, he was always showing for the ball and moving, and got his goal with his forward running which we know he can do. “It was great to have Louis [Gray, United’s goalkeeper] and JK in there offering their advice and giving them the gee-up. The victory meant United were the first side to reach the county cup's semi-finals, with other last-eight contests – Penrith v Whitehaven, Keswick v Wigton Harriers and Bransty Rangers v Netherhall – still to be played. On the match, Edmondson said: “These games, I think, are excellent for different reasons. “To come here on the pitch as it is and conditions as they are, with tackles flying everywhere, it’s great and a good learning curve. “I thought the discipline and way the players moved the ball was excellent. You can get caught up in the occasion, knocking it long, using the wind, blaming the conditions etc, but what we’ve been trying to work on in training in the last few months has been about finding positions to get on the ball and playing through, rather than long all the time. “Full credit to Cleator Moor as well. They played some good football at times. This football club gets a lot of stick for being a certain way and playing a certain way over the years, and I think it’s a bit unjust at the moment. Edmondson says he hopes United get another away tie in the semi-finals. He said: “I think it’s good to come away and pit ourselves on these pitches, and give these teams the chance to play against us. “I don’t mean that in a disrespectful way. If this had been a Saturday game, Cleator Moor would have had a few hundred people and made a lot of money off it. Edmondson also said United’s squad included some players from their Park View Academy partnership, due to injuries to his main youth squad. “We’ve only got nine fit outfield players at the moment,” he said. “If JK and Louis hadn’t been playing, we’d probably have been struggling for numbers overall.
Scoring and staging systems using cox linear regression modeling and recursive partitioning. OBJECTIVES Scoring and staging systems are used to determine the order and class of data according to predictors. Systems used for medical data, such as the Child-Turcotte-Pugh scoring and staging systems for ordering and classifying patients with liver disease, are often derived strictly from physicians' experience and intuition. We construct objective and data-based scoring/staging systems using statistical methods. METHODS We consider Cox linear regression modeling and recursive partitioning techniques for censored survival data. In particular, to obtain a target number of stages we propose cross-validation and amalgamation algorithms. We also propose an algorithm for constructing scoring and staging systems by integrating local Cox linear regression models into recursive partitioning, so that we can retain the merits of both methods such as superior predictive accuracy, ease of use, and detection of interactions between predictors. The staging system construction algorithms are compared by cross-validation evaluation of real data. RESULTS The data-based cross-validation comparison shows that Cox linear regression modeling is somewhat better than recursive partitioning when there are only continuous predictors, while recursive partitioning is better when there are significant categorical predictors. The proposed local Cox linear recursive partitioning has better predictive accuracy than Cox linear modeling and simple recursive partitioning. CONCLUSIONS This study indicates that integrating local linear modeling into recursive partitioning can significantly improve prediction accuracy in constructing scoring and staging systems.
Bayesian semiparametric modelling of contraceptive behaviour in India via sequential logistic regressions Family planning has been characterized by highly different strategic programmes in India, including methodspecific contraceptive targets, coercive sterilization and more recent targetfree approaches. These major changes in family planning policies over time have motivated considerable interest towards assessing the effectiveness of the different planning programmes. Current studies mainly focus on the factors driving the choice among specific subsets of contraceptives, such as a preference for alternative methods other than sterilization. Although this restricted focus produces key insights, it fails to provide a global overview of the different policies, and of the determinants underlying the choices from the entire range of contraceptive methods. Motivated by this consideration, we propose a Bayesian semiparametric model relying on a reparameterization of the multinomial probability mass function via a set of conditional Bernoulli choices. This binary decision tree is defined to be consistent with the current family planning policies in India, and coherent with a reasonable process characterizing the choice between increasingly nested subsets of contraceptive methods. The model allows a subset of covariates to enter the predictor via Bayesian penalized splines and exploits mixture models to represent uncertainty in the distribution of the statespecific random effects flexibly. This combination of flexible and careful reparameterizations allows a broader and interpretable overview of the policies and contraceptive preferences in India.
A look at what's happening on the roads, trains, and planes. There are delays of 30 minutes on First Great Western trains between Taunton and Bristol Temple Meads due to an earlier signalling problem at Taunton. It's also causing 30 minute delays between Bristol Temple Meads and Exeter St Davids. For those arrested at Charles Cross police station in Plymouth it's a local, hand-made pasty that awaits them in custody. A van became stuck on Brean Beach after a driver "misjudged" the tide and left the vehicle parked on the beach. Police are searching for a fifteen-year-old girl who's gone missing from Swindon.
# Copyright (C) 2007-2012 Red Hat # see file 'COPYING' for use and warranty information # # policygentool is a tool for the initial generation of SELinux policy # # 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 2 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, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA # 02111-1307 USA # # ########################### var_spool Template File ############################# ########################### Type Enforcement File ############################# te_types=""" type TEMPLATETYPE_spool_t; files_type(TEMPLATETYPE_spool_t) """ te_rules=""" manage_dirs_pattern(TEMPLATETYPE_t, TEMPLATETYPE_spool_t, TEMPLATETYPE_spool_t) manage_files_pattern(TEMPLATETYPE_t, TEMPLATETYPE_spool_t, TEMPLATETYPE_spool_t) manage_lnk_files_pattern(TEMPLATETYPE_t, TEMPLATETYPE_spool_t, TEMPLATETYPE_spool_t) files_spool_filetrans(TEMPLATETYPE_t, TEMPLATETYPE_spool_t, { dir file lnk_file }) """ te_stream_rules="""\ manage_sock_files_pattern(TEMPLATETYPE_t, TEMPLATETYPE_spool_t, TEMPLATETYPE_spool_t) files_spool_filetrans(TEMPLATETYPE_t, TEMPLATETYPE_spool_t, sock_file) """ ########################### Interface File ############################# if_rules=""" ######################################## ## <summary> ## Search TEMPLATETYPE spool directories. ## </summary> ## <param name="domain"> ## <summary> ## Domain allowed access. ## </summary> ## </param> # interface(`TEMPLATETYPE_search_spool',` gen_require(` type TEMPLATETYPE_spool_t; ') allow $1 TEMPLATETYPE_spool_t:dir search_dir_perms; files_search_spool($1) ') ######################################## ## <summary> ## Read TEMPLATETYPE spool files. ## </summary> ## <param name="domain"> ## <summary> ## Domain allowed access. ## </summary> ## </param> # interface(`TEMPLATETYPE_read_spool_files',` gen_require(` type TEMPLATETYPE_spool_t; ') files_search_spool($1) read_files_pattern($1, TEMPLATETYPE_spool_t, TEMPLATETYPE_spool_t) ') ######################################## ## <summary> ## Manage TEMPLATETYPE spool files. ## </summary> ## <param name="domain"> ## <summary> ## Domain allowed access. ## </summary> ## </param> # interface(`TEMPLATETYPE_manage_spool_files',` gen_require(` type TEMPLATETYPE_spool_t; ') files_search_spool($1) manage_files_pattern($1, TEMPLATETYPE_spool_t, TEMPLATETYPE_spool_t) ') ######################################## ## <summary> ## Manage TEMPLATETYPE spool dirs. ## </summary> ## <param name="domain"> ## <summary> ## Domain allowed access. ## </summary> ## </param> # interface(`TEMPLATETYPE_manage_spool_dirs',` gen_require(` type TEMPLATETYPE_spool_t; ') files_search_spool($1) manage_dirs_pattern($1, TEMPLATETYPE_spool_t, TEMPLATETYPE_spool_t) ') """ if_stream_rules=""" ######################################## ## <summary> ## Connect to TEMPLATETYPE over a unix stream socket. ## </summary> ## <param name="domain"> ## <summary> ## Domain allowed access. ## </summary> ## </param> # interface(`TEMPLATETYPE_stream_connect',` gen_require(` type TEMPLATETYPE_t, TEMPLATETYPE_spool_t; ') stream_connect_pattern($1, TEMPLATETYPE_spool_t, TEMPLATETYPE_spool_t) ') """ if_admin_types=""" type TEMPLATETYPE_spool_t;""" if_admin_rules=""" files_search_spool($1) admin_pattern($1, TEMPLATETYPE_spool_t) """ ########################### File Context ################################## fc_file="""\ FILENAME -- gen_context(system_u:object_r:TEMPLATETYPE_spool_t,s0) """ fc_dir="""\ FILENAME(/.*)? gen_context(system_u:object_r:TEMPLATETYPE_spool_t,s0) """
A link between c-Myc-mediated transcriptional repression and neoplastic transformation. Recent studies indicate that the transcription factor c-Myc contributes to oncogenesis by altering the expression of genes involved in cell proliferation, but its precise function in neoplasia remains ambiguous. The ability of c-Myc to bind the sequence CAC(G/A)TG and transactivate appears to be linked to its transforming activity; however, c-Myc also represses transcription in vitro through a pyrimidine-rich cis element termed the initiator (Inr). In transfection experiments using the adenoviral major late (adML) promoter, which contains two Myc binding sites and an Inr, we determined that c-Myc represses transcription through the initiator in vivo. This activity requires the dimerization domain and amino acids 106 to 143, which are located within the transactivation domain and are necessary for neoplastic transformation. We studied a lymphoma-derived c-Myc substitution mutation at 115-Phe, which is within the region required for transcriptional suppression, and found the mutant more effective than wild-type c-Myc in transforming rodent fibroblasts and in suppressing the adML promoter. Our studies of both loss-of-function and gain-of-function c-Myc mutations suggest a link between c-Myc-mediated neoplastic transformation and transcriptional repression through the Inr.
Dubai: The launch of the National Policy to Empower People of Determination (people with disabilities) creates a new understanding of the empowerment of this segment and enables them to play an important part in the country’s development, a top official said on Wednesday. Najla Mohammad Al Awar, Minister of Community Development, also announced at the press conference in Dubai the formation of an advisory council which will work towards implementing the policy. The national policy for empowering people with special needs was launched in April by His Highness Shaikh Mohammad Bin Rashid Al Maktoum, Vice-President and Prime Minister of the UAE and Ruler of Dubai, with the mission of creating an inclusive, restriction-free society for this segment — that empowers them and their families and guarantees their right to a dignified life. The announcement in April came with an order to refer to people belonging to this segment as “the determined ones” rather than people with special needs. The national policy, Shaikh Mohammad said, is based on empowering the determined ones through six key goals: health, rehabilitation and accessibility; education; social security and family empowerment; public life; culture; and sports. The ministry revealed that under the policy’s health pillar, a national registry for newborns with disabilities and delayed development issues will be launched and a central database for all cases in the UAE established. Al Awar said an advisory council, consisting of members of the community, including “people of determination” who have extensive knowledge and expertise in the field, will provide their advice and opinion to achieve the goals of the national policy. “The launch of the policy comes as a result of the leadership’s vision to ensure that every member of the community is empowered, especially the determined ones. The government believes in their capabilities and the role they can play in the advancement and development of the country,” she said. The policy, she added, is the product of close cooperation and coordination between the ministry and all relevant authorities at the local and federal levels with objectives that will guarantee this segment’s right to a dignified life with enhanced opportunities. “This interaction on a national level to achieve the policy’s mission will ensure we have an integrated community. It also guarantees this segment will be empowered along with their families. Setting up policies and innovative services will allow them to showcase their abilities and prove their important role in society,” she said. Al Awar said the advisory council was set up to offer advice for continuously developing services and finding solutions in record time for issues facing this segment of society. It will work towards identifying challenges, proposing solutions, and promoting equal opportunities to help people of determination overcome all obstacles that limit their active participation in building the future. The council will be headed by Dr Ahmad Al Omran Al Shamsi, adviser of the Executive Council of Dubai, and the council’s members would also include a ministerial team tasked with providing consultations for proposed initiatives and following up on their implementation, Al Awar added. Sana Suhail, undersecretary of the Ministry of Community Development, said the six goals address everything that relates to the determined ones, with a number of initiatives launched under each to achieve the policy’s objectives. “In addition to the council, there will be an official at every institution and body that will be responsible for facilitating and approving services for people with special needs. They will act as a link between the people of determination and an entity’s staff in addition to constantly recommending better solutions and suggestions,” she said. During the conference, Ahmad Aleghfeli, a visually impaired employee of the Ministry of Community Development, said the policy would give entities an incentive to offer more for people of determination. “It’s a very positive step for us. Also, changing the way we are referred to as the ‘determined ones’ will change the perceptions of many people towards us,” Aleghfeli said. The members of the Advicory Council are: Dr Ahmad Al Omran Al Shamsi, adviser of the Executive Council of Dubai; Kalitham Obaid Al Matroushi, vice-president of Al Thiqah Club for the Handicapped; the director-general of the Sharjah City for Humanitarian Services (SCHS); and the director-general of the Dubai Autism Centre. The council also includes Manar Mohammad Al Hammadi, a lawyer; Louai Saeed Alai, employee at the Sharjah Electricity and Water Authority; Dr Qais Ebrahim Mekdad, associate professor in Special Education at the Faculty of Education at Zayed University; Badriya Al Jaber, head of Girls Division at the Dubai Centre for People of Determination; Budoor Saeed Al Raqbani, director of the Kalimati Speech and Communication Centre; Steve Carpenter, head of Health, Safety, and Risk Management at WSP Consulting; and Reem Al Fahim, CEO of the SEDRA Foundation, along with representatives of relevant government authorities.
. The hemoglobin of the egyptian fruit bat (Rousettus aegyptiacus) has only one component. The alpha and beta chains were separated by chromatography on CM-52 cellulose. The complete primary structures of both chains were established by automatic Edman degradation of the chains and the tryptic peptides. The alignment was done by homology with alpha and beta chains of adult human hemoglobin. A comparison of these two hemoglobins shows an exchange of 14 amino acid residues in the alpha chains and of 19 in the beta chains. These numbers are very low, considering the long phylogenetic distance between primates and megachiroptera. In the surroundings of the heme we found one substitution in each chain. In the alpha 1 beta 1-subunit interface one and two residues are exchanged respectively in the alpha and beta chains. The primary structure points to a normal oxygen affinity of the bat hemoglobin which was also found by Jrgens et al.
package com.trifork.hotruby.classes; import com.trifork.hotruby.objects.IRubyObject; import com.trifork.hotruby.objects.RubyClass; import com.trifork.hotruby.runtime.LoadedRubyRuntime; import com.trifork.hotruby.runtime.MetaClass; import com.trifork.hotruby.runtime.RubyMethod; import com.trifork.hotruby.runtime.Selector; public abstract class RubyBaseClassClass extends RubyClass { static public RubyClassClass instance; public void init(MetaClass meta) { instance = (RubyClassClass)this; super.init(meta); } public interface SelectClass { RubyMethod get_RubyClassClass(); } public RubyMethod select(Selector sel) { if(sel instanceof SelectClass) { return ((SelectClass)sel).get_RubyClassClass(); } else { return LoadedRubyRuntime.resolve_method((RubyClass)this,sel,SelectClass.class); } } public RubyClass get_class() { return RubyClassClass.instance; } public IRubyObject newInstance() { throw LoadedRubyRuntime.instance.newTypeError("class Class cannot be instantiated directly"); } }
Q: Why doesn't technology advance in fantasy settings? In High Fantasy settings it always seems like centuries and sometimes millennia go by with no technological advancement. Is there any reason why? A: To build on top of what Daniel said, there are really three core concepts behind the stagnation of technology in high fantasy settings. Not all apply to Arda but they apply in different measures in different fantasy worlds. Dark Ages Most of human history, as Daniel pointed out, takes place in periods of stagnated development. Sometimes the result of the downfall of a civilization, and the loss of technology. Sometimes due to religious reasons. Sometimes just due to being so early in the development of a species that advancements have little to build on. Progress, despite what we are taught about genius and hard work, is more a function of all the required pieces being in place to enable the new advancement. Today, we live in a time of unbelievable advancement. However, the advances from the Bronze age to the Iron age took some 2000-5000 years depending on where we are talking about. The idea of lost technology plays a role in the different ages within LotR. However, it is mostly about lost forging techniques and would be analogous to the loss of being able to make Wootz or Damascus steel. This is why a first age sword might be so highly prized in a LotR context. This is exactly like how a ~2000 year old Wootz blade might cut through modern armor in the year 1600. Magical Science Not a big force in LotR, but present somewhat. Progress is always about doing something better than the prior process. If the prior process is a magical one that makes a 200 Ton stone door move like it were made of cardboard, it is very hard or impossible to create a mechanical process that can compete. And it would be even more unlikely that anyone would bother to try. The presence of magic almost ensures a slowed-down progression of technology for this reason alone. Additionally, there is a brain-drain associated with the magical arts. While not really a factor in LotR lore due to the rare nature of true magicians. In most other high fantasy worlds the mentally gifted enter magical schools. They learn magical arts, not engineering. They learn to create potions, they learn 'mend wounds' spells, not how to suture a wound with thread. All the smarties are advancing magical science, not physical science. Progress really isn't stagnated at all. Science and technology are about learning to understand the world as it is, and learning to make use of those facts. If your world is like ours and lacks demons, spells, enchantments, magical teleportation, dragons, so on; then your technology and science will bear that out and you will advance along the same threads that we have. But if your world features those things, and at the strength that most fantasy worlds give those powers, advancement will rightfully be along those lines instead. Magical Ritualism In many fantasy settings, magic attempts to look like it did in our own past. This means extreme ritualism. This is a form of anti-science and does not seek progress. It seeks tradition. I once heard someone say, of modern magic and science, that "Science is the attempt to eliminate from rituals that which is unneeded, and magic is the attempt to honor the tradition of the rituals that produced the refined technology." Steel-making was once, and in some places still is, a ritualistic and magical process. One common way to produce steel involved folding the iron, binding a slip of magical paper to the block of iron, pounding the paper into the iron, folding again and repeating 100 times. When we strip away the layers, you are adding carbon to iron which is exactly what is needed to make steel. The magic worked. The ritual was passed down from Master to Apprentice and without any knowledge of the underlying reason, steel was producible. This is how Wootz steel could be created ~3000 years before we had any idea what carbon nanotubes were. A society that has given themselves over to ritual, would by definition not progress. Many fantasy worlds are dominated by ritual, and yet can't be said to be in a dark age, because those rituals produce really advanced results. There are historical examples of this. Ancient Egypt was able to build some of the most enduring landmarks, create a nuanced and long-lived culture, and be very productive and even culturally progressive all while being very ritualistic. They did so by adopting the rituals of others along the way. However, if the whole planet were Egypt, then they probably would mirror many of these fantasy worlds. And they would have retained their rituals much longer, and they would have been more powerful, as in the fantasy world the gods would be real. A: The term is "high fantasy". There's two responses to this. Firstly, I don't think it's necessarily true. Especially in Tolkien, we see all sorts of different levels of technology - the Hobbits, for example, seem to be a just pre-industrial society: they have water mills, but nothing more complex. Saruman, by contrast, is clearly gearing up Isengard into an industrial age. But other civilizations have different "technologies": the Rings and the Silmarils, for example, are both examples of technology in that world, although we wouldn't recognise them as such. They're works of craft, definitely. The other point to make is that long periods of technological stasis are the norm, even in the real world. Our current break-neck speed of technological innovation is very much atypical in history. Not much changed in the western world, for example, between the time of the Romans and the invention of printing. A: For most of human history, technology was almost without any progress. Humans took several tens of thousands of years to invent such basic technologies as the wheel, metallurgy, and similar techniques. It took several thousands of years for the neolithic "revolution" to spread throughout the inhabited world, and hundreds of years for the industrial revolution to do the same. Computers took several decades, the Internet (and mobile communication) one decade to take over the world. The speed increases exponentially. No matter which part of human history you look at, significant technological progress only ever happens at the end of that part. Living in a time of increasingly fast technological progress, we tend to forget that most of our history almost nothing of technological interest happened.
Cycle of seeking, emotional outburst, and rest in newborns put to the breast. Some of the mainstays of my lactation work are skinto-skin care, remedial cobathing, hand expression of milk, and self-attachment. I have observed something that neonates (babies who are no more than 1 month old) do when they are skin-to-skin on moms chest, working to self-attach, with the mother doing nothing but making a friendly fence with her arms to prevent baby from falling off her chest. (Mom is comfortable, reclining on her back. She can lie flat if she prefers.) These babies go through cycles. They start to seek the breast, then have some emotional outburst. They wail and cry and may flail their arms and heads a bit. They may attach to the breast for a suck or two, then detach and start crying. They may get red in the face and roar. They are powerful in their emotional expression. Then they rest, for varying amounts of time. This cycle of seeking, emotional outburst, and rest may be repeated up to 4 to 5 times. Once that cycling is done, the next time they seek, they will self-attach and stay feeding. This is a huge first step to breastfeeding recovery. One of the elements of craniosacral therapy is somatoemotional release. If any of you have had an emotional surge during a massage, youve had a somatoemotional release. Feelings are stored in the cells and are released when the conditions are right. A safe, warm, and dim environment with a calm and open atmosphere makes for right conditions for babies to release. I believe that babies who do this are telling a storythe story of their birth and first few days of life. If their birth and first few days include painful and/or violent acts and breastfeeding hasnt been established, then these memories must be cleared before breastfeeding can be recovered. I have seen this pattern of behavior enough that I can predict it, which helps mothers to stay open, talk to their babies, and listen to their babies. The babies are telling their story. The mother needs support and encouragement to listen to the babys story. I see this a lot when there is birth injury or when there is forced latch and the mother goes home fighting with her baby to breastfeed. This pattern is part of the breastfeeding recovery process. Has anyone else observed this?
<reponame>Falumpaset/handson-ml2<filename>backend/model-ll/src/main/java/de/immomio/model/repository/landlord/customer/user/right/LandlordRightRepository.java /** * */ package de.immomio.model.repository.landlord.customer.user.right; import de.immomio.data.landlord.entity.user.right.LandlordRight; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.repository.query.Param; import org.springframework.data.rest.core.annotation.RestResource; /** * @author <NAME> */ public interface LandlordRightRepository extends JpaRepository<LandlordRight, Long> { @Override @RestResource(exported = false) void deleteById(@Param("id") Long id); @Override @RestResource(exported = false) void delete(@Param("right") LandlordRight right); @Override @RestResource(exported = false) <T extends LandlordRight> T save(@Param("right") T right); }