content
stringlengths 7
2.61M
|
---|
Millions of workers and youth around the world have been observing carefully the current events in Greece. 24- and 48-hour general strikes, mass demonstrations, the sieges of parliament during the austerity votes are all looked upon with enormous sympathy and the role of the Greek Communist Party (KKE) in these events is evident to everybody.
Massive, militant blocs in the demonstrations and actions such as the draping of the Parthenon with a huge banner inviting the peoples of Europe to revolt have raised great admiration among important layers of the Left. However, although it is clear that the KKE is one of the main actors in the pre-revolutionary situation that exists in Greece, can we regard it as a model for our own struggles? This article attempts to analyse, although briefly, the political line and the programme of the Greek Communists.
The historical roots of the KKE and its links to Stalinism
The origins of the KKE can be traced back to the Socialist Labour Party of Greece (SEKE) founded in 1918. Under the influence of the October Revolution SEKE joined the Third International taking the name SEKE-Communist (SEKE-K) and adopting a Marxist revolutionary programme. Only in 1924 would it adopt the name KKE.
In the process of Stalinisation of the party in the 1920s a Left opposition emerged around Pantelis Pouliopoulos, who had been the first secretary of the party, but in 1927 the Stalinist leadership expelled this tendency. The fact remains that this Left opposition controlled the proletarian stronghold of the party, the organisation in Piraeus. Pantelis Pouliopoulos, apart from being the first secretary of the party, was the most able Greek Marxist theoretician and a supporter of Trotsky.
Metaxas later took power in Greece through a coup in 1936. He then proceeded to outlaw the Communist Party, persecuting and killing its activists, and established a Fascist dictatorship according to the Mussolini model.
In 1941, during the Second World War, the KKE promoted the National Liberation Front (EAM). Following the directions of Stalin and the political line of Popular Frontism, EAM did not include only proletarian or left-wing organisations, but also bourgeois radicals and monarchists who had suddenly turned democrats. Just as Palmiro Togliatti in Italy had imposed on the Italian Communist Party and its activists a front of the workers' with bourgeois parties such as the Christian Democracy and the monarchists, in the same way the KKE leadership tied the organisation to a democratic perspective of “national liberation”, renouncing the taking of power in accordance with Stalin’s directives.
EAM created a strong liberation army called ELAS, the People's National Liberation Army, building a force of 20,000 units. After the end of the Nazi occupation of Greece – October 1944 – the KKE, via EAM-ELAS, had the power all over Greece. In 1944, ELAS controlled the best part of Greek territory, in the cities and the countryside, but its programme did not include agrarian reform nor the socialisation of the means of production, in spite of the massive presence and influence of the Communists in the Front.
After the insurrection of December 1944, the KKE could have taken power but the leaders kept the main forces of ELAS outside Athens and the insurrection was defeated by the British armed forces together with Greek reactionary military forces. Under Stalin’s guidance the KKE leadership handed power back to a bourgeois government led by George Papandreou, which also saw the participation of three KKE representatives in secondary ministries.
Soldiers fighting in December 1944. Photo: December44In 1945 EAM subscribed to the disarmament of its own army in favour of a “peaceful transition to democracy”. In fact, the Stalin-Churchill pact established that Greece was to belong to the Western bloc. This meant giving up on any sort of revolutionary development for that country. The Greek revolution was defeated and the subsequent civil war put an end to the KKE's ability to play a hegemonic role within the working class, particularly as a consequence of its defeat and the Diaspora of its leaders and activists abroad. During the Colonels’ Regime from 1967 to 1974, the KKE suffered a split between the supporters of so-called “Euro-Communism” (whose main representative internationally was the Italian Communist Party of Enrico Berlinguer) and those who swore allegiance to Moscow.
Only after the fall of the Colonels was the KKE legalised again. In the 1980s negotiations started for the formation of an electoral alliance for the national elections of 1989 between the two wings of the former KKE, the pro-Moscow Stalinists and the “Euro-Communist” of the KKE-Interior, and other minor groups. This alliance was to become known as the Synaspismos [Coalition]. However, it did not last long.
In fact, this alliance, still strongly under the influence of Stalinist ideas, in 1990 supported the right-wing conservative bourgeois party Nea Dimokratia [New Democracy] in a coalition government, in order to prevent the Social Democrats of the PASOK from forming a government. It was thanks to this ultra-left policy – which was based on the idea of “Social-Fascism” developed by the Comintern in 1928 – that led the Greek Communists to openly break with other workers' parties denouncing them as the “twin brothers of Fascism” and the main enemies of the working class. This ultra-left policy of the KKE led to a sharp fall in its membership and a loss of almost half its votes from 10% to 6% in the following elections. After the collapse and breakup of the USSR in 1991 the “hard-liners” and the “Euro-Communists” parted ways for good. The latter faction appropriated the name Synaspismos for their new party, while the pro-Soviet wing reclaimed the name KKE which they still use today.
The class roots of the KKE and the electoral results
In the last 2-3 years, however, as a consequence of the increasing polarisation between the classes in Greek society due to the attacks of big business, the KKE has started to recover from its past poor electoral results and, in the most recent period, it has experienced a significant growth in the opinion polls. In 2004 it won 5.89%, in 2007 8.15%, and, with a slight decrease, 7.54% in 2009, establishing a core of half a million votes particularly among the most proletarian urban areas. For instance, in 2007 in the second constituency of Athens, a highly-concentrated working-class neighbourhood, the KKE won 12.5%, its best result since 1974, i.e. the end of the dictatorship, as well as in the Piraeus, the docklands area of Athens, where it won 14.5%. Among the 25 to 34 year olds it won about 11% and had significant support among the private-sector workers and the unemployed.
The KKE has developed over the years a whole series of front organisations that facilitate a mass intervention in the trade unions such as PAME (the Communist fraction inside the GSEE, the private sector general workers’ union), in the peasants' movement with PASY, among the small shopkeepers and the self-employed workers with PASEVE, among the women with OGE and in the students' movement with MAS (Militant Students' Front). The Communist Youth (KNE) is the largest youth organisation in Greece. On May 15th, 2010, for instance, the national demonstration of the party attracted around 30,000 participants.
The methods of the KKE
According to the latest opinion polls, it seems that a combination of all the parties of the “traditional Left”, i.e. those with roots in the old KKE, (the KKE, Synaspismos and Democratic Left) could get over 40% and could thus become the first electoral force in the country, with an absolute collapse of the PASOK estimated at 8%.
The Democratic Left would capture many of the voters abandoning from PASOK, mainly thanks to the fact that it has kept out of government coalitions... so far. The Synaspismos would also gain some consensus, in spite of its less radical language compared to that of the KKE, because it is not imbued with the sectarian methods of the KKE leaders. And the KKE would certainly receive support also thanks to the general objective situation, to its oppositional stance and partly because of the radical ideas it expresses. However, the sectarian methods that characterises it would not allow it to reach its full potential.
In fact, the Greek Communist Party still suffers from the influence of its old links to Stalinism combined with sectarianism, whose only effect is to divide the Greek working class and to demoralise its youth and trade union cadres.
On the one hand, the party has a very rigid internal regime, keen on expelling critics, a result of the Stalinist degeneration in the 1920s. A blatant example was that of some trade union leaders, very popular in the teachers' union, who were expelled simply for expressing doubts about the party’s tactics. This stifles any serious, open and frank debate among the membership and in the long term is bound to frustrate a layer of activists. However, at the same time it can prepare explosions within the party.
On the other hand, the sectarianism that permeates the party only serves to isolate it and its various fronts from all the mass movements in the country, from those connected with the killing of the student Alexis to the recent general strikes. PAME, for example, has the tradition of calling rallies and strikes separate from the rest of the GSEE, although it is a GSEE fraction. The KKE itself adopted a sectarian line during the students' protests on December 2008, after the assassination of Alexis, separating its own youth wing from the remaining mass of the students involved in a bitter struggle against the government, which was nothing else than the anticipation of what we are currently seeing in Greece.
KKE May demonstration. Photo: mediActivistaThe KKE regards itself as the party of the proletarian vanguard. However, it systematically acts in a manner that separates the vanguard from the mass of the Greek proletariat, virtually preventing millions of young people and workers from getting to know the ideas of the Communists, and, even worse, preventing its activists from fighting shoulder to shoulder with other workers and youth.
Behind the idea of safeguarding an alleged ideological purity of the party there really is the fear that the rank and file could connect with the genuine needs of the class and particularly with the idea of unity among all the forces to the left of the PASOK.
In his book Left-wing Communism, an infantile disorder, Lenin strongly argues against the idea of an artificial separation between the proletarian vanguard and the bulk of the workers, branding it as a crime with devastating consequences on the outcome of the struggle and on the influence of the Communist on the masses. It is not just a question of the physical division of the workers in separate rallies; it means giving up in practice the struggle for hegemony within the working class as a whole and within its mass organisations. A strong Communist fraction in the trade unions at this stage should be in a position of attracting the best working-class cadres away from the influence of the reformists, winning them over to the revolutionary cause through consistent work side by side with these workers and activists, rather than isolating one's own members from the rest.
In the context of such a method of the party leaders, the most likely outcome is that they will refuse any electoral alliance on the basis of the fight against capitalism. In a February 11, 2011 article by the Foreign Department of the Central Committee of the KKE, we read the following:
“The rejection of the blind alley of the so-called 'unity of the Left' implies for the KKE the preservation of an alliance policy that matches the interests of the working class, the toiling strata and the needs of the class struggle. We focus our attention on the socio-political alliance, based on common action, common interests, a common line of struggle of the working class, the urban self-employed workers and the peasants. An alliance that will enter into a conflict with the monopolies and imperialism and fight also for another path of development for our country, namely, people's power and people's economy in which the means of production will be socialised, with central planning of the economy and workers' control”.
This basically means that the only possible unity they envisage is under the banner of the KKE. It is a sectarian tactic that only amounts to an entrenchment behind revolutionary phraseology without taking into account the real strength of the Communists in society, the genuine feelings of the masses and the prospects for a possible revolutionary solution in Greece.
Let us be clear on this. We have repeatedly denounced the left-reformist line of Synaspismos with their utopia of reforming the European Union and the European Central Bank. The point, however, is that the inconsistencies and utopianism of these demands have to be demonstrated in practice to the working class and not just be pointed to and labelled as reformist, waiting for the masses to understand overnight the demands of the revolutionaries on the basis of mere political argument, or by simply branding the other parties every day as opportunists in the party press. If the masses had already realised the differences between the Communists of the KKE and the Synaspismos they would not be supporting the latter and would move towards the KKE.
However, it is KKE itself that states, a few lines below in the same article quoted above, that unity has to be achieved... under its banner:
“Instead of an alliance with opportunist and social-democratic parties in the name of 'unity of the Left', which has done much damage to the Communist movement, today the main task for the CP is the liberation of the working class and the popular forces from the influence of the bourgeois parties, both social-democrats and liberals. On this basis, the preconditions for the formation of a social alliance in Greece will be created, through the mobilisation around a common action front of the Militant Front of All Workers (PAME), the Peasants' Movement (PASY), the Self-employed Workers' and Small Shopkeepers' Movement against Monopolies (PASEVE), the Greek Women's Federation (OGE) and the Militant Students' Front (MAS). This common action will set the pace of the formation of a full socio-political alliance of anti-imperialist and anti-monopolist forces. Only this work can create connections between the working class and the popular masses.”
So we see that they say yes to unity... but only through their own front organisations! And on February 5, in its newspapers the party announced that: “The people must strengthen and ally with the KKE – this is the perspective that can bring hope!” How and why this is to be achieved we are not told!
The programme of the KKE
What programme does the KKE leadership present to the workers? The Communist Party raises as its central demands: exit from the European Union, rejection of the debt repayments and people's power.
First of all, it has to be stated that the slogan of “people's power” is less clear than the concept of “workers' power”, because it does not explain at all which role the Greek working class is supposed to play in the process of taking power and transforming society. This is not an academic criticism; on the contrary we feel the need to clarify the role of the workers in this process. In our opinion, they have to play a leading and hegemonic role on the students, the urban petty bourgeoisie and the peasants. Only the working class can lead this process; not for romantic reasons, but because of the role it plays in capitalist production and its ability to come together around a revolutionary programme. How can we achieve this? The KKE leaders do not explain.
In November 2011, commenting on the proposed referendum called by the government, the KKE produced an official statement in which it said that the referendum had to be opposed on the basis of a struggle with the following aims:
“The end of sacrifices for the crisis and for the sake of the profits of the plutocracy. The resignation of the government and the parties who sacrifice the people to save capitalism and the European Union. Respect for the rights of the workers and the people. The working class and the people must own the wealth they produce, with people's power, the withdrawal from the European Union and the cancelling of the debt.”
What is not explained, however, is if the exit from the EU would only imply a mere return to the Drachma. If this were the case, it would automatically bring back the policies of devaluation of the Drachma to allow for an increase in liquidity, which would not only imply inflationary policies immediately eroding the wages of the workers and their purchasing power, it would surely also provoke a protectionist wave from the EU against Greek commodities, a scenario worse than the one seen in Italy in the 1990s, when the only possibility for the Italian state in a context of crisis was precisely the devaluation of the Lira with the consequence of galloping inflation.
The leaders of the KKE, moreover, do not explain on which concrete programme they are calling on the masses to fight. Repeating the truths of Communism and people's power does not help to mobilise millions of people, but only the vanguard who nevertheless do not receive adequate tools with which to connect to the vast masses of the exploited.
The KKE in fact does not develop a transitional programme that could place the Greek working class in the condition of understanding the immense contradiction between its needs and the interests of the banks and big business and at the same time indicate the road to the overthrow of the capitalist system. The party propaganda is focused on a “maximum programme” which is disconnected from the real living conditions of the Greek people and on calling at any and every opportunity for people's power.
The point, however, is: how are we supposed to obtain this power, how can we keep it and what should we do after we have conquered it? People's power has to be sought where it expresses itself, not in the abstract fantasies of the leadership. For instance, the people's assembly of Syntagma Square was labelled by the KKE as petty-bourgeois and not perfectly aligned with the party's ideas. The KKE members were forbidden by the party from taking part in the assembly, thus ruling out the possibility that the people of Athens could listen to the point of view of the Communists.
The political position of the present KKE leadership is made up of two elements: 1) a revolutionary phraseology that talks openly of socialism and people's power and 2) this is combined with a consistent inability to systematically pursue these goals. That is to say, it is a typical “centrist” position.
Centrism, in Marxist vocabulary, is a political tendency that is characterised by vacillation between reformism and revolution, depending on the different class pressures of any given moment and which can continuously move rightward or leftward, and which is incapable of maintaining a clear and coherent revolutionary perspective.
The history of the labour movement has seen several times the formation of such tendencies in revolutionary or pre-revolutionary situations. An example is Italy in the “Biennio Rosso” [Two Red Years] of 1918-20), when the Socialist Party was dominated by the “Maximalist” tendency of Serrati and Lazzari, who spoke openly of socialism, revolution, of overthrowing capitalism and achieving worker's power but at the same time were organically incapable of taking these demands to their ultimate consequences. Thus, in practice, they abdicated their role of leadership in both the movement of factory occupations in September 1920 and the attempt by the workers to take power in Italy, before the Fascist coup of Mussolini.
The united front: for the unity of the Left on the basis of a revolutionary programme!
The present situation in Greece is dramatic, to say the least. The ruling class is increasingly losing support among the population and social polarisation is sharpening ever more, with a strong shift to the left. To the left of the Pasok, according to the polls the KKE and Synaspismos would get about 12% each, while the Democratic Left would win more than 18%, taking advantage more than the others of the collapse of the Pasok. If there were a front of these parties it could become the first electoral force in the country.
Unfortunately, all three parties hide behind their own excuses. Synaspismos made an appeal in favour of the unity of the Left, which nevertheless it did not follow up on. The KKE masquerades behind ideological purity, fearing the effect that such a front could have on the masses. For this front would not just be applied in elections, but also to social and industrial actions. It would unleash energies exceeding the mere sum of the individual parties that would make it up and would galvanise the masses, strengthening their confidence in the possibility of changing their current condition.
Lenin himself, in fact, pointed out in “Left-Wing Communism” that a revolutionary crisis could also spring from a parliamentary crisis, including the case of a government based on workers' parties comprising Communists and Socialists. It is necessary to make every possible effort to attain unity of action on concrete demands aimed at defending the general interests of the Greek working class and youth.
However, to achieve this it is not enough to simply denounce the betrayal by the reformists or appeal to the Synaspismos workers to quit their organisation and join the KKE: we need a programme of partial and transitional demands and a plan of mobilisation, and it is on this terrain that we must challenge the reformist leaders. On the basis of demands such as an all-out general strike to oust the government, to increase wages, to cancel the debt, to nationalise the commanding heights of the economy, it would be possible to reach an agreement among the different left-wing parties. There have been plenty of 1- or 2-day strikes in Greece. They served the aim of giving the working class an opportunity to reveal its strength, close ranks and stretch its muscles for the decisive clash with the ruling class. However, such strikes are not enough anymore. Calling further strikes could even lead to the opposite result if the practical problems faced by the working class are not solved. Thus, the slogan of yet another 24- or 48-hour general strike could lose all meaning.
An all-out general strike until the fall of the government would instead pose immediately the question of power, moving from the purely economic and trade union front to the political and would pose the question bluntly: who rules this society? The KKE fraction [PAME] within the GSEE and ADEDY, the Greek public and private sector trade union confederations, should systematically challenge the reformists on the calling of such a strike. The people's power referred to by the KKE could rise out of people's assemblies in every city through the election of an All-Greece National Committee made of elected deputies, accountable and recallable at all times. Such a National Committee would have the task of directing and co-ordinating strikes and protest actions all across Greece. This would represent a mighty rallying cry for the workers of other European countries, starting with the Portuguese, Spanish and Italian workers who could go down the same path. The solution to the problems of the Greek revolution cannot be found within the national borders of the country, as the KKE seems to believe, but only by fighting for the United Socialist States of Europe.
|
<filename>src/templgen/user_manager.py
"""
"""
import configparser
import os
from typing import Union
from iotanbo_py_utils import file_utils
from templgen.settings import Settings
# Type aliases
ErrorMsg = str
StringOrNone = Union[str, None]
class UserManager:
DEFAULT_USER_CONFIG = [
# ("param_name", "default_value", "section_name", "description")
("full_name", "", "GENERAL", "User full name: "),
("email", "", "GENERAL", "Email: "),
("site", "", "GENERAL", "Personal site: ")
]
def __init__(self, templgen, **kwargs):
super().__init__(**kwargs)
self._templgen = templgen
self.home_dir = file_utils.get_user_home_dir()
self.global_templgen_dir = self._templgen.settings.global_templgen_dir
self.cfg_parser = configparser.ConfigParser(allow_no_value=True)
# def ensure_integrity(self, path=None) -> (None, ErrorMsg):
# if not path:
# path = file_utils.get_user_home_dir()
#
# # Ensure .templgen directory exists
# path_to_templgen = os.path.join(path, TEMPLGEN_DIR_NAME)
# if not file_utils.dir_exists(path_to_templgen):
# # if not exists, create a new one
# print(f" ** Initializing directory '{path_to_templgen}' ...")
# return self.init(is_global, path)
# # Check config file
# config_file = os.path.join(path_to_templgen, TEMPLGEN_CONFIG_FILE_NAME)
# if not file_utils.file_exists(config_file):
# self._create_default_config_file(config_file)
# # TODO: additional check of file structure
# return None, ""
def add_user(self, user_name: str, local=False,
project_path: StringOrNone = None,
interactive=True) -> (None, ErrorMsg):
"""
Add (create) new user globally or locally
:param user_name: user name to be added
:param local: if True, user will be added only to project scope
:param project_path: path to project directory or None if user to be added globally
:param interactive: if True, user will be asked questions, otherwise
default config params will be used
:return: (None, ErrorMsg) - Error message if error, empty string otherwise
"""
if local:
# Ensure settings integrity for project_path
result, error = self._templgen.settings.ensure_integrity(project_path)
if error:
return None, error
else:
project_path = file_utils.get_user_home_dir()
# Check if user exists
if self.user_exists(user_name, project_path):
# If exists, return with error
return None, f"user '{user_name}' already exists"
# Get information about user
if interactive:
user_config_dict = self._get_interactive_user_config(user_name)
else:
user_config_dict = self._get_default_user_config(user_name)
# Create dir for user
user_dir = os.path.join(project_path, Settings.TEMPLGEN_DIR_NAME,
Settings.TEMPLGEN_USERS_DIR_NAME, user_name)
error = file_utils.create_path_noexcept(user_dir)["error"]
if error:
return None, error
# Create templ_config dir
user_templ_config_dir = os.path.join(user_dir,
Settings.TEMPLGEN_USER_TEMPL_CONFIG_DIR_NAME)
error = file_utils.create_path_noexcept(user_templ_config_dir)["error"]
if error:
return None, error
# Write user config file
config_file = os.path.join(user_dir, Settings.TEMPLGEN_USER_CONFIG_FILE_NAME)
return Settings.update_config_file(self.cfg_parser, config_file, user_config_dict)
# self._update_user_config_file(config_file, user_config_dict)
def del_user(self, user_name: str, local=False,
project_path: StringOrNone = None,
confirmed=False) -> (None, ErrorMsg):
"""
Delete existing user globally or locally
:param user_name: user name to be deleted
:param local: if True, user will be deleted only from project scope
:param project_path: path to project directory or None if user has to be deleted globally
:param confirmed: if False, additional interactive confirmation will be performed
:return: (None, ErrorMsg) - Error message if any, empty string if success
"""
if local:
# Ensure settings integrity for project_path
result, error = self._templgen.settings.ensure_integrity(project_path)
if error:
return None, error
else:
project_path = file_utils.get_user_home_dir()
# Check if user exists
if not self.user_exists(user_name, project_path):
# If exists, return with error
return None, f"user '{user_name}' not exists"
# Confirm if not yet confirmed
if not confirmed:
if local:
prompt = f"Do you confirm deleting user '{user_name}' locally for '{project_path}' (yes/no)?"
else:
prompt = f"Do you confirm deleting user '{user_name}' globally (yes/no)?"
confirm = input(prompt)
if "yes" != confirm:
return None, "canceled"
# delete user folder
user_dir = os.path.join(project_path, Settings.TEMPLGEN_DIR_NAME,
Settings.TEMPLGEN_USERS_DIR_NAME, user_name)
error = file_utils.remove_dir_noexcept(user_dir)["error"]
if error:
return None, error
return None, ""
@staticmethod
def list_users(project_path: StringOrNone) -> list:
"""
Lists users for the specified path
:param project_path: project for which users will be listed;
if none, global users will be listed;
:return: list of user names
"""
if not project_path:
project_path = file_utils.get_user_home_dir()
users_dir = os.path.join(project_path,
Settings.TEMPLGEN_DIR_NAME,
Settings.TEMPLGEN_USERS_DIR_NAME)
# print(f"debug userlist users_dir: {users_dir}")
if not file_utils.dir_exists(users_dir):
return []
error = file_utils.get_subdirs(users_dir)["error"]
if error:
return []
return file_utils.get_subdirs(users_dir)["subdirs"]
def edit_user(self, user_name, project_path=None) -> (None, ErrorMsg):
settings = self._templgen.settings
settings.read_settings_for_path(project_path)
if not user_name:
user_name = self._templgen.settings.get("current_user")
if not project_path:
project_path = file_utils.get_user_home_dir()
if not self.user_exists(user_name, project_path):
return None, "user not exists"
text_editor, error = self._templgen.settings.get("text_editor")
if error:
text_editor = "nano"
user_config_file = os.path.join(project_path, Settings.TEMPLGEN_DIR_NAME,
Settings.TEMPLGEN_USERS_DIR_NAME,
user_name,
Settings.TEMPLGEN_USER_CONFIG_FILE_NAME)
# Execute shell command
cmd = [text_editor, user_config_file]
Settings.execute_shell_cmd(cmd)
return None, ""
def switch_user(self, user_name, project_path=None) -> (None, ErrorMsg):
"""
Switch user for the current project or globally if user not found locally.
:param user_name:
:param project_path: Path to the project; if project does not contain local .templgen dir,
user will be switched globally
:return: Error message as the second element of the tuple
"""
# Create alias for the settings
settings = self._templgen.settings
if not user_name:
return None, "invalid user name"
# is_local = True
# Ensure that project_path is valid
if not project_path:
project_path = file_utils.get_user_home_dir()
# is_local = False
# Read local settings for the path
settings.read_settings_for_path(project_path)
# Check if user exists for the project path:
if not UserManager.user_exists(user_name, project_path):
return None, "user not found"
# Write new user to the settings
# TODO
return settings.set("current_user", user_name)
# def _update_user_config_file(self, config_file, new_values: dict) -> None:
# """
# Read user config file if exists, update it with values, save back to file
# :param config_file:
# :param new_values: dict with following struct: {
# "section1": {"key1": "val1", "key2": "val2, ...},
# ...
# }
# :return: None
# """
# result = {}
# # Read current user config from file
# if file_utils.file_exists(config_file):
# self.cfg_parser.read(config_file)
# # Convert it into a dictionary
# result = Settings.config_parser_to_dict(self.cfg_parser)
# print(f"debug: config file exists: {config_file}")
#
# # Update result with new values
# for section, section_entries in new_values.items():
# if section not in result:
# result[section] = {}
# for key, value in section_entries.items():
# result[section][key] = value
# # Convert dictionary back into configparser
# self.cfg_parser.read_dict(result)
#
# # Write settings to file
# with open(config_file, 'w') as f:
# self.cfg_parser.write(f)
# @staticmethod
# def _config_parser_to_dict(cfg_parser) -> dict:
# result = {}
# for section in cfg_parser.sections():
# section_entries = {}
# for key, value in cfg_parser.items(section):
# section_entries[key] = value
# result[section] = section_entries
# return result
@staticmethod
def user_exists(user_name, project_path) -> bool:
"""
Check if user exists for the project ( either locally or globally)
"""
return (UserManager.user_exists_locally(user_name, project_path) or
UserManager.user_exists_globally(user_name))
@staticmethod
def user_exists_locally(user_name, project_path) -> bool:
"""
Check if user exists for the project (both
:param user_name:
:param project_path:
:return:
"""
user_dir = os.path.join(project_path, Settings.TEMPLGEN_DIR_NAME,
Settings.TEMPLGEN_USERS_DIR_NAME, user_name)
if file_utils.dir_exists(user_dir):
return True
return False
@staticmethod
def user_exists_globally(user_name) -> bool:
"""
Check if user exists globally
"""
user_dir = os.path.join(file_utils.get_user_home_dir(), Settings.TEMPLGEN_DIR_NAME,
Settings.TEMPLGEN_USERS_DIR_NAME, user_name)
# print(f"Debug: user_dir: {user_dir}")
if file_utils.dir_exists(user_dir):
return True
return False
@staticmethod
def _get_default_user_config(_) -> dict: # user_name
result = {}
for param, value, section, desc in UserManager.DEFAULT_USER_CONFIG:
if section not in result:
result[section] = {}
result[section][param] = value
return result
@staticmethod
def _get_interactive_user_config(_) -> dict: # user_name
result = {}
for param, value, section, desc in UserManager.DEFAULT_USER_CONFIG:
# print(desc)
# val = sys.stdin.readline()
val = input(desc)
if section not in result:
result[section] = {}
result[section][param] = val
return result
|
<reponame>glosoftgroup/KahawaHardware
from django.conf import settings
from django.contrib import messages, auth
from django.contrib.auth import views as django_views
from django.contrib.auth import authenticate
from django.contrib.auth.decorators import login_required
from django.utils.translation import ugettext_lazy as _
from django.template.response import TemplateResponse
from django.http import HttpResponse
from django.shortcuts import redirect
import logging
import datetime
from .forms import SignupForm, SetPasswordForm
from saleor.decorators import user_trail
from django.views.decorators.csrf import csrf_protect
debug_logger = logging.getLogger('debug_logger')
info_logger = logging.getLogger('info_logger')
error_logger = logging.getLogger('error_logger')
@csrf_protect
def login(request):
username = request.POST.get('email')
password = request.POST.get('password')
user = authenticate(username=username, password=password)
if user is not None:
if user.is_active:
auth.login(request, user)
user_trail(request.user,"logged in ", "login")
info_logger.info(str(request.user)+' logged in at '+str(datetime.datetime.now()))
return HttpResponse('success')
else:
return HttpResponse('cannot login')
else:
return HttpResponse('wrong credentials')
@login_required
def logout(request):
user_trail(request.user.name, 'logged out','logout')
info_logger.info(str(request.user) + ' logged out at ' + str(datetime.datetime.now()))
auth.logout(request)
messages.success(request, _('You have been successfully logged out.'))
return redirect(settings.LOGIN_REDIRECT_URL)
def signup(request):
form = SignupForm(request.POST or None)
if form.is_valid():
form.save()
password = form.cleaned_data.get('password')
email = form.cleaned_data.get('email')
user = auth.authenticate(email=email, password=password)
if user:
auth.login(request, user)
messages.success(request, _('User has been created'))
return redirect(settings.LOGIN_REDIRECT_URL)
ctx = {'form': form}
return TemplateResponse(request, 'account/signup.html', ctx)
def password_reset(request):
template_name = 'account/password_reset.html'
post_reset_redirect = 'account_reset_password_done'
email_template_name = 'account/email/password_reset_message.txt'
subject_template_name = 'account/email/password_reset_subject.txt'
return django_views.password_reset(
request, template_name=template_name,
post_reset_redirect=post_reset_redirect,
email_template_name=email_template_name,
subject_template_name=subject_template_name)
def password_reset_confirm(request, uidb64=None, token=None):
template_name = 'account/password_reset_from_key.html'
post_reset_redirect = 'account_reset_password_complete'
set_password_form = SetPasswordForm
return django_views.password_reset_confirm(
request, uidb64=uidb64, token=token, template_name=template_name,
post_reset_redirect=post_reset_redirect,
set_password_form=set_password_form)
|
Tajh Boyd wasn't going to a let some bumps and bruises spoil his final season, no matter how sore his shoulder might be come morning.
Boyd threw for 340 yards and four touchdowns to break Philip Rivers' Atlantic Coast Conference career record in No. 8 Clemson's 55-31 victory over Georgia Tech on Thursday night. Boyd threw a major scare into Tigers coaches, teammates and the 75,324 fans at Death Valley when he remained on the turf in pain at the end of the third quarter with what the school said was a left collarbone injury.
But Boyd had X-rays done and no breaks were discovered. He bounded out of the locker room, grabbed a ball and even pestered offensive coordinator Chad Morris to go back in. Boyd didn't have to, though, with Clemson (9-1, 7-1 ACC) ahead 41-24 and cruising to a third straight victory since losing to No. 2 Florida State last month.
"If it was a dire situation I felt like I needed to play I felt like I could've," Boyd said. "But we were in a situation where it wasn't needed."
Will he slow down at all with FCS opponent Citadel up next for Clemson on Nov. 23?
"No, man, I'm not going to miss my last game in the valley," he said. "I'll throw a pad in there and I'll be fine."
That's been Boyd's attitude for much of his record-setting career.
"He's a competitor," Morris said. "My gosh, look at the records this guy has broken in the ACC. Wow. And in just three years."
Boyd has 97 touchdown passes, two more than Rivers — now with the San Diego Chargers — had at North Carolina State from 2000-03.
Georgia Tech (6-4, 5-3) had feint hopes of winning the ACC Coastal Division, but fell behind 20-0 early in the second quarter and could not catch up.
Sammy Watkins had touchdowns catches of 41 and 44 yards for the Tigers.
The stadium went silent when Boyd was down on the field. The mood lightened up when he returned to the sideline and loosed up his arm. He'll need to be healthy in two weeks when the Tigers look to break a four-game losing streak to rival South Carolina.
Receiver Martavis Bryant said the players were worried when they saw Boyd in pain, but things lightened up once he return as the same ol', smiling Tajh.
"It felt good," Bryant said. "We need him."
It was Clemson's first time out in Death Valley since a 51-14 loss to No. 2 Florida State on Oct. 19. Boyd and the Tigers made sure they gave the fans plenty to cheer about.
Not that anyone will totally forget the Seminoles game, particularly because it's the second consecutive year the Tigers will miss the ACC title game because of a loss to Florida State.
Still, the Clemson hoped to close the season strongly in its first Thursday night home game in 11 years. But that's usually tricky for Clemson when it comes to Georgia Tech, which had won four of the past six games in the series and befuddled the Tigers for years with coach Paul Johnson's highly effective triple-option attack.
This time, though, the Tigers' defense was off and running from the start. The group forced three straight three-and-outs and didn't give up a first down until the second quarter.
Clemson had its struggles early on offense, too, twice driving into Tech territory yet settling for Chandler Catanzaro's two field goals. Catanzaro's second kick was a career-long 51-yarder and gave him the school mark for field goals of 40 yards or longer at 24. He broke the mark of 23 set by former Tigers and NFL punter Chris Gardocki.
The Tigers cranked things up in the second quarter. Boyd dropped a perfect pass to Watkins for a 41-yard TD to go up 13-0. On Clemson's next series, Boyd had a 47-yard strike to Bryant to the 4 and lofted a scoring pass to the left corner to freshman receiver Mike Williams.
After Georgia Tech broke through on David Sims' 1-yard touchdown run, Clemson quickly answered back with Boyd's 76-yard touchdown throw to Bryant that broke Rivers' ACC record.
Boyd also had his 17th career 300-yard passing game, leaving him one behind Rivers' ACC record in that category.
Georgia Tech came in with an ACC-best 311 rushing yards a game, yet was held to 72 in the opening half as Clemson's defensive front chased down quarterback Vad Lee.
The Yellow Jackets cut the score to 27-17 on Robert Godhigh's 65-yard touchdown run early in the third quarter, but Clemson scored on its next two possessions to take control for good.
"Once we did that, we started feeling good about ourselves," Godhigh said. "But then we started kicking ourself in the foot again."
Lee threw 23 times against the Tigers — he combined for just 18 throws in Georgia Tech's three-game win streak — and the Yellow Jackets were held to 72 rushing in the opening half and 248 for the game.
Tailback Robert Godhigh ran for 126 yards and two touchdowns. He also had five catches for 103 yards.
It was the most points Clemson scored on Georgia Tech since winning 73-0 in 1903 when John Heisman — yes, that John Heisman — coached the Tigers. Heisman left the next season to coach the Yellow Jackets.
|
from bs4 import BeautifulSoup
from ..occurrences.occurrences import Occurrences
from ..occurrences.occurrence_interface import OccurrenceInterface
class Recommendation16:
"""
Recomendação 16 – Identificar o idioma principal da página
"""
def __init__(self, sourcecode):
self.rec = 16
self.sourcecode = sourcecode
self.occurrences = Occurrences()
def avaliacao(self):
soap = BeautifulSoup(self.sourcecode, 'html.parser')
html = soap.find("html")
if html:
lang = html.get('lang')
if lang:
if lang.lower() == 'pt-br':
self.occurrences.add(OccurrenceInterface(self.rec, 0, html, 2))
else:
self.occurrences.add(OccurrenceInterface(self.rec, 1, html, 2))
return self.occurrences.list_of_occurrences
|
Trapped by metaphors for organizations: Thinking and seeing womens equality and inequality Gender was consistently identified as a major force in all editions of Images of Organization (Morgan, 1986, 1997, 2006), yet 30 years after publication of Morgans seminal work, womens equality remains elusive in twenty-first-century workplaces. This state of affairs became the stimulus for the present research study, and its purpose the exploration of influences on womens equality and inequality from the eight metaphors contained in Images of Organization (Morgan, 1986, 1997, 2006). Data were collected from a sample of 70 articles in 30 leading academic journals that referenced Images of Organization (Morgan, 1986, 1997, 2006), and were analyzed for within-domains similarity between the eight metaphors and imageries of women in organizations. The results were then investigated for womens equality and inequality via content analysis. Four themes of influences on womens equality and inequality were identified from these metaphors for organizations. The implications of these findings are discussed, and two novel images are introduced to progress equality for women. The contribution to scholarly knowledge from this study is the proposition that the influence of these metaphors for organizations has in effect trapped ways of seeing and thinking regarding womens equality and inequality. The practical value of the current study lies in the proposal of new images to release organizational praxis for womens equality to become a real force in twenty-first-century organizations.
|
package com.lic.serviceImpl;
import com.lic.service.UserService;
public class UserServiceImpl implements UserService {
private int port;
public String selectUser() {
System.out.println("=====服务端逻辑执行=====");
return "远程服务已被调用, 服务端口为:"+port;
}
public int getPort() {
return port;
}
public void setPort(int port) {
this.port = port;
}
}
|
async def _async_update_data(self) -> DeviceResponseEntry:
async with async_timeout.timeout(10):
if self.api.device is None:
await self.initialize_api()
try:
if not await self.api.update():
raise UpdateFailed("Failed to communicate with device")
except aiohwenergy.DisabledError as ex:
raise UpdateFailed(
"API disabled, API must be enabled in the app"
) from ex
except Exception as ex:
raise UpdateFailed(
f"Error connecting with Energy Device at {self.api.host}"
) from ex
data: DeviceResponseEntry = {
"device": self.api.device,
"data": {},
}
for datapoint in self.api.data.available_datapoints:
data["data"][datapoint] = getattr(self.api.data, datapoint)
return data
|
package es.sacyl.gsa.inform.bean;
import es.sacyl.gsa.inform.dao.JimenaDao;
import es.sacyl.gsa.inform.util.Constantes;
import es.sacyl.gsa.inform.util.Utilidades;
import java.io.File;
import java.io.Serializable;
import java.sql.Blob;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
/**
* The Class Informe. *
*
* @author <NAME>
* @version 23.5.2018
*/
public class JimenaInformeBean implements Serializable {
private static final long serialVersionUID = 1L;
private int numeroOrden;
private Long id;
private String descripcion;
private PacienteBean paciente;
private Long episodio;
private CentroBean centro;
private GfhBean servicio;
private String referecia;
private LocalDate fecha;
private Long hora;
private int estado;
private Blob docuxml;
private int tipoxml;
private Blob docubin;
private int tipobin;
private Long peticion;
private UsuarioBean userid;
private Long canal;
private int tipoinforme;
private UsuarioBean useridauth;
private GfhBean srvauth;
private UsuarioBean useridredactor;
private Long plantalla_editor;
private int flag;
private Long pertenece;
private int version;
private int nive_visibilidad;
private Long subservicio;
private UsuarioBean useridpeticionario;
private int visto;
private Long ultimoguardado;
private int bloqueado;
private Long almacenamiento;
private Long tipo_documento;
private Long ambito;
private GfhBean servicio_realizador;
private LocalDateTime fecha_proceso;
private String referencia_almacenamiento;
private int num_accesos;
private UsuarioBean user_visto;
private Long fecha_visto;
private String comentario_visto;
private File ficheroInformeFile;
private String urlFilePdf;
private String nombrePdf;
private ArrayList<JimenaCampos_iBean> listaCampos = new ArrayList<JimenaCampos_iBean>();
private Long interconsultaid;
private GfhBean interconsultaServicioDestino;
private CentroBean interconsultaCentroDestino;
public final static int INFORME_ESTADO_EDICION = 1;
public final static int INFORME_ESTADO_CONSOLIDADO = 2;
public final static int INFORME_ESTADO_SUSTITUIDO = 5;
public final static int CANAL_DEFECTO = 6;
public final static int ORDENFECHA = 1;
public final static int ORDENFECHADESC = 2;
protected DateTimeFormatter fechadma = DateTimeFormatter.ofPattern("dd/MM/YYYY");
protected DateTimeFormatter fechadmahhmm = DateTimeFormatter.ofPattern("dd/MM/YYYY HH:mm");
private static final Logger logger = LogManager.getLogger(JimenaInformeBean.class);
/**
* Instantiates a new informe.
*/
public JimenaInformeBean() {
this.id = new Long(0);
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getDescripcion() {
return descripcion;
}
public String getDescripcion20() {
if (descripcion != null && descripcion.length() > 20) {
return descripcion.substring(0, 20);
} else {
return descripcion;
}
}
public String getDescripcion12Char() {
return descripcion.substring(12);
}
public void setDescripcion(String descripcion) {
this.descripcion = descripcion;
}
public String getPacienteBeanNhc() {
return paciente.getNumerohc();
}
public void setPacienteBean(PacienteBean paciente) {
this.paciente = paciente;
}
public Long getEpisodio() {
return episodio;
}
public void setEpisodio(Long episodio) {
this.episodio = episodio;
}
public CentroBean getCentro() {
return centro;
}
public void setCentro(CentroBean centro) {
this.centro = centro;
}
public GfhBean getServicioBean() {
return servicio;
}
public String getServicioBeanCodigo() {
if (servicio != null) {
return servicio.getCodigo();
} else {
return "";
}
}
public void setServicioBean(GfhBean servicio) {
this.servicio = servicio;
}
public String getReferecia() {
return referecia;
}
public void setReferecia(String referecia) {
this.referecia = referecia;
}
public LocalDate getFecha() {
return fecha;
}
public void setFecha(LocalDate fecha) {
this.fecha = fecha;
}
public Long getHora() {
return hora;
}
public void setHora(Long hora) {
this.hora = hora;
}
public int getEstado() {
return estado;
}
public void setEstado(int estado) {
this.estado = estado;
}
public Blob getDocuxml() {
return docuxml;
}
public void setDocuxml(Blob docuxml) {
this.docuxml = docuxml;
}
public int getTipoxml() {
return tipoxml;
}
public void setTipoxml(int tipoxml) {
this.tipoxml = tipoxml;
}
public Blob getDocubin() {
return docubin;
}
public void setDocubin(Blob docubin) {
this.docubin = docubin;
}
public int getTipobin() {
return tipobin;
}
public void setTipobin(int tipobin) {
this.tipobin = tipobin;
}
public Long getPeticion() {
return peticion;
}
public void setPeticion(Long peticion) {
this.peticion = peticion;
}
public UsuarioBean getUserid() {
return userid;
}
public void setUserid(UsuarioBean userid) {
this.userid = userid;
}
public int getTipoinforme() {
return tipoinforme;
}
public void setTipoinforme(int tipoinforme) {
this.tipoinforme = tipoinforme;
}
public UsuarioBean getUseridauth() {
return useridauth;
}
public void setUseridauth(UsuarioBean useridauth) {
this.useridauth = useridauth;
}
public GfhBean getSrvauth() {
return srvauth;
}
public void setSrvauth(GfhBean srvauth) {
this.srvauth = srvauth;
}
public UsuarioBean getUseridredactor() {
return useridredactor;
}
public void setUseridredactor(UsuarioBean useridredactor) {
this.useridredactor = useridredactor;
}
public Long getPlantalla_editor() {
return plantalla_editor;
}
public void setPlantalla_editor(Long plantalla_editor) {
this.plantalla_editor = plantalla_editor;
}
public int getFlag() {
return flag;
}
public void setFlag(int flag) {
this.flag = flag;
}
public Long getPertenece() {
return pertenece;
}
public void setPertenece(Long pertenece) {
this.pertenece = pertenece;
}
public int getVersion() {
return version;
}
public void setVersion(int version) {
this.version = version;
}
public int getNive_visibilidad() {
return nive_visibilidad;
}
public void setNive_visibilidad(int nive_visibilidad) {
this.nive_visibilidad = nive_visibilidad;
}
public Long getSubservicio() {
return subservicio;
}
public void setSubservicio(Long subservicio) {
this.subservicio = subservicio;
}
public UsuarioBean getUseridpeticionario() {
return useridpeticionario;
}
public void setUseridpeticionario(UsuarioBean useridpeticionario) {
this.useridpeticionario = useridpeticionario;
}
public int getVisto() {
return visto;
}
public void setVisto(int visto) {
this.visto = visto;
}
public Long getUltimoguardado() {
return ultimoguardado;
}
public void setUltimoguardado(Long ultimoguardado) {
this.ultimoguardado = ultimoguardado;
}
public int getBloqueado() {
return bloqueado;
}
public void setBloqueado(int bloqueado) {
this.bloqueado = bloqueado;
}
public Long getAlmacenamiento() {
return almacenamiento;
}
public void setAlmacenamiento(Long almacenamiento) {
this.almacenamiento = almacenamiento;
}
public Long getTipo_documento() {
return tipo_documento;
}
public void setTipo_documento(Long tipo_documento) {
this.tipo_documento = tipo_documento;
}
public Long getAmbito() {
return ambito;
}
public void setAmbito(Long ambito) {
this.ambito = ambito;
}
public GfhBean getServicioBean_realizador() {
return servicio_realizador;
}
public void setServicioBean_realizador(GfhBean servicio_realizador) {
this.servicio_realizador = servicio_realizador;
}
public LocalDateTime getFecha_proceso() {
return fecha_proceso;
}
public void setFecha_proceso(LocalDateTime fecha_proceso) {
this.fecha_proceso = fecha_proceso;
}
public String getReferencia_almacenamiento() {
return referencia_almacenamiento;
}
public void setReferencia_almacenamiento(String referencia_almacenamiento) {
this.referencia_almacenamiento = referencia_almacenamiento;
}
public int getNum_accesos() {
return num_accesos;
}
public void setNum_accesos(int num_accesos) {
this.num_accesos = num_accesos;
}
public UsuarioBean getUser_visto() {
return user_visto;
}
public void setUser_visto(UsuarioBean user_visto) {
this.user_visto = user_visto;
}
public Long getFecha_visto() {
return fecha_visto;
}
public void setFecha_visto(Long fecha_visto) {
this.fecha_visto = fecha_visto;
}
public String getComentario_Visto() {
return comentario_visto;
}
public void setComentario_Visto(String comentario_visto) {
this.comentario_visto = comentario_visto;
}
public int getNumeroOrden() {
return numeroOrden;
}
public void setNumeroOrden(int numeroOrden) {
this.numeroOrden = numeroOrden;
}
public File getFicheroInformeFile() {
return ficheroInformeFile;
}
public void setFicheroInformeFile(File ficheroInformeFile) {
this.ficheroInformeFile = ficheroInformeFile;
}
public Long getCanal() {
return canal;
}
public void setCanal(Long canal) {
this.canal = canal;
}
public ArrayList<JimenaCampos_iBean> getListaCampos() {
return listaCampos;
}
public void setListaCampos(ArrayList<JimenaCampos_iBean> listaCampos) {
this.listaCampos = listaCampos;
}
public String getFechaHoraInforme() {
String feString = "";
if (fecha != null) {
feString = fechadma.format(fecha);
if (hora != null) {
if (!hora.equals(new Long(0))) {
feString = feString + " " + Utilidades.getHoraHH_MM(hora);
}
}
}
return feString;
}
public String getFechaHoraProceso() {
String feString = "";
feString = fechadmahhmm.format(fecha_proceso);
return feString;
}
public String getFechaHoraServcio() {
String string = "";
string = this.getFechaHoraInforme() + " " + this.getServicioBean().getCodigo();
return string;
}
public String getFechaHoraServcioDescrip() {
String string = "";
string = this.getFechaHoraInforme() + " " + this.getServicioBean().getCodigo() + " " + this.getDescripcion20();
return string;
}
public String getCodigoServicioBean() {
return this.getServicioBean().getCodigo();
}
public PacienteBean getPaciente() {
return paciente;
}
public void setPaciente(PacienteBean paciente) {
this.paciente = paciente;
}
public GfhBean getServicio() {
return servicio;
}
public void setServicio(GfhBean servicio) {
this.servicio = servicio;
}
public GfhBean getServicio_realizador() {
return servicio_realizador;
}
public void setServicio_realizador(GfhBean servicio_realizador) {
this.servicio_realizador = servicio_realizador;
}
public String getComentario_visto() {
return comentario_visto;
}
public void setComentario_visto(String comentario_visto) {
this.comentario_visto = comentario_visto;
}
public String getNombrePdf() {
return nombrePdf;
}
public void setNombrePdf(String nombrePdf) {
this.nombrePdf = nombrePdf;
}
public Long getInterconsultaid() {
return interconsultaid;
}
public void setInterconsultaid(Long interconsultaid) {
this.interconsultaid = interconsultaid;
}
public GfhBean getInterconsultaServicioDestino() {
return interconsultaServicioDestino;
}
public String getInterconsultaServicioDestinoString() {
if (interconsultaServicioDestino != null && interconsultaServicioDestino.getCodigo() != null) {
return interconsultaServicioDestino.getCodigo();
} else {
return "";
}
}
public void setInterconsultaServicioDestino(GfhBean interconsultaServicioDestino) {
this.interconsultaServicioDestino = interconsultaServicioDestino;
}
public CentroBean getInterconsultaCentroDestino() {
return interconsultaCentroDestino;
}
public void setInterconsultaCentroDestino(CentroBean interconsultaCentroDestino) {
this.interconsultaCentroDestino = interconsultaCentroDestino;
}
public DateTimeFormatter getFechadmahhmm() {
return fechadmahhmm;
}
public void setFechadmahhmm(DateTimeFormatter fechadmahhmm) {
this.fechadmahhmm = fechadmahhmm;
}
public String getPathAbsolutePdf() {
return Constantes.PDFPATHABSOLUTO + "inf_" + this.id + ".pdf";
}
public String getUrlFile() {
return "http://localhost:8080" + Constantes.PDFPATHRELATIVO + "inf_" + this.id + ".pdf";
}
public void setUrlFilePdf(String urlFilePdf) {
this.urlFilePdf = urlFilePdf;
}
public String getUsuarioBeanApellidosNombre() {
if (this.getUserid() != null) {
return this.getUserid().getApellidosNombre();
} else {
return "";
}
}
public String getHtmlCabecera() {
String html = "<b>";
html = html.concat(" " + this.getFechaHoraInforme() + " ");
if (this.servicio != null) {
html = html.concat(this.getServicioBean().getCodigo() + " ");
}
html = html.concat("<hr>");
if (this.getUserid() != null) {
html = html.concat("Dr/a:" + this.getUserid().getApellidosNombre());
}
html = html.concat("<hr>");
if (this.getPaciente() != null && this.getPaciente().getNumerohc() != null) {
html = html.concat("Nhc:" + this.getPaciente().getNumerohc() + " PacienteBean:"
+ this.getPaciente().getApellidosnombre() + "<hr>");
}
return html;
}
public String getTxtCabecera() {
String html = "";
html = html.concat(" " + this.getFechaHoraInforme() + " ");
if (this.servicio != null) {
html = html.concat(this.getServicioBean().getCodigo() + " ");
}
if (this.getUserid() != null) {
html = html.concat("Dr/a:" + this.getUserid().getApellidosNombre());
}
html = html.concat("\n");
if (this.getPaciente() != null) {
html = html.concat("Nhc:" + this.getPaciente().getNumerohc() + " PacienteBean:"
+ this.getPaciente().getApellidosnombre() + "\n");
}
return html;
}
public String getHtmlCampos_i() {
String html = "";
for (JimenaCampos_iBean campo : getListaCampos()) {
if (campo.getDato() != null) {
try {
if (campo.getDescripcion().length() > 5) {
if (!campo.getDescripcion().substring(0, 5).equals("DICOM")) {
int caracteres = (int) campo.getDato().length();
html = html.concat("<b>" + campo.getDescripcion() + ":</b> "
+ campo.getDato().getSubString(1, caracteres));
if (campo.getUnidades() != null && !campo.getUnidades().isEmpty()) {
html = html.concat(" " + campo.getUnidades());
}
html = html.concat("<br>");
}
} else {
int caracteres = (int) campo.getDato().length();
html = html.concat("<b>" + campo.getDescripcion() + ":</b> "
+ campo.getDato().getSubString(1, caracteres));
if (campo.getUnidades() != null && !campo.getUnidades().isEmpty()) {
html = html.concat(" " + campo.getUnidades());
}
html = html.concat("<br>");
}
} catch (SQLException e) {
logger.error("Error conversión campo CLOB ", e);
}
}
}
return html;
}
public String gettxtCampos_i() {
String html = "<b>";
for (JimenaCampos_iBean campo : getListaCampos()) {
if (campo.getDato() != null) {
try {
int caracteres = (int) campo.getDato().length();
if (campo.getDescripcion().length() > 5) {
if (!campo.getDescripcion().substring(0, 5).equals("DICOM")) {
html = html.concat(campo.getDescripcion() + ": "
+ campo.getDato().getSubString(1, caracteres));
if (campo.getUnidades() != null && !campo.getUnidades().isEmpty()) {
html = html.concat(" " + campo.getUnidades());
}
html = html.concat("<hr>");
}
} else {
html = html.concat(campo.getDescripcion() + ": "
+ campo.getDato().getSubString(1, caracteres));
if (campo.getUnidades() != null && !campo.getUnidades().isEmpty()) {
html = html.concat(" " + campo.getUnidades());
}
html = html.concat("<hr>");
}
} catch (SQLException e) {
logger.error("Error conversión campo CLOB ", e);
}
}
}
html = html.concat("</b>");
return html;
}
/*
public File getFilePdfInforme() {
File file = null;
try {
FileOutputStream outpu = null;
String pathname = this.getPathFilePdf();
file = new File(pathname);
outpu = new FileOutputStream(file);
Blob archivo = new JimenaDAO().getBlobPdfInforme(id,null);
InputStream inStream = archivo.getBinaryStream();
int size = (int) archivo.length();
byte[] buffer = new byte[size];
int length = -1;
while ((length = inStream.read(buffer)) != -1) {
outpu.write(buffer, 0, length);
}
outpu.close();
inStream.close();
} catch (Exception ioe) {
logger.error(ioe);
}
return file;
}
*/
public static JimenaInformeBean getInformeResulsetJimena(ResultSet rs, boolean conCampos_I, PacienteBean paciente, CentroBean centro,
GfhBean servicio, UsuarioBean usuario, Integer estado) {
JimenaInformeBean informe = new JimenaInformeBean();
try {
informe.setNumeroOrden(rs.getInt("numeroorden"));
informe.setId(rs.getLong("id"));
informe.setDescripcion(rs.getString("descripcion"));
if (paciente == null) {
// informe.setPacienteBean(new PacienteBeanDAO().getPacienteBeanPorId(rs.getLong("paciente"), false));
} else {
informe.setPacienteBean(paciente);
}
// informe.setProblema(new Proceso(rs.getLong("problema")));
informe.setEpisodio(rs.getLong("episodio"));
if (centro == null) {
// informe.setCentro(new CentroDAO().getRegistroId(rs.getLong("centro")));
} else {
informe.setCentro(centro);
}
if (servicio == null) {
// informe.setServicioBean(new ServicioBeansDAO().getRegistroId(rs.getLong("servicio")));
} else {
informe.setServicioBean(servicio);
}
if (usuario != null) {
informe.setUserid(usuario);
}
informe.setReferecia(rs.getString("referencia"));
informe.setFecha(Utilidades.getFechaLocalDate(rs.getLong("fecha")));
informe.setHora(rs.getLong("hora"));
informe.setEstado(rs.getInt("estado"));
// informe.setDocuxml(docuxml);
informe.setTipoxml(rs.getInt("tipoxml"));
// informe.setDocubin(docubin);
informe.setTipobin(rs.getInt("tipobin"));
informe.setPeticion(rs.getLong("peticion"));
// informe.setUserid(new UsuarioBeanDAO().getUsuarioBeanUserid(rs.getString("userid"), false));
informe.setCanal(rs.getLong("canal"));
informe.setTipoinforme(rs.getInt("tipoinforme"));
informe.setUseridauth(new UsuarioBean(rs.getString("useridauth")));
// informe.setSrvauth(new GfhBean(rs.getLong("srvauth")));
informe.setUseridredactor(new UsuarioBean(rs.getString("useridredactor")));
informe.setPlantalla_editor(rs.getLong("plantilla_editor"));
informe.setFlag(rs.getInt("flag"));
informe.setPertenece(rs.getLong("pertenece"));
informe.setVersion(rs.getInt("version"));
informe.setNive_visibilidad(rs.getInt("nivel_visibilidad"));
informe.setSubservicio(rs.getLong("subservicio"));
informe.setUseridpeticionario(new UsuarioBean(rs.getString("useridpeticionario")));
informe.setVisto(rs.getInt("visto"));
informe.setUltimoguardado(rs.getLong("ultimoguardado"));
informe.setBloqueado(rs.getInt("bloqueado"));
informe.setAlmacenamiento(rs.getLong("almacenamiento"));
informe.setTipo_documento(rs.getLong("tipo_documento"));
informe.setAmbito(rs.getLong("ambito"));
// informe.setServicioBean_realizador(new GfhBean(rs.getLong("servicio_realizador")));
informe.setFecha_proceso(Utilidades.getFechaLocalDateTime(rs.getLong("fecha_proceso")));
informe.setReferencia_almacenamiento(rs.getString("referencia_almacenamiento"));
informe.setNum_accesos(rs.getInt("num_accesos"));
// informe.setProblema(new Proceso(rs.getLong("problema")));
informe.setUser_visto(new UsuarioBean(rs.getString("user_visto")));
informe.setFecha_visto(rs.getLong("fecha_visto"));
informe.setComentario_Visto(rs.getString("comentario_visto"));
if (conCampos_I == true) {
informe.setListaCampos(new JimenaDao().getListaCamposInforme(informe.getId(), estado));
}
} catch (SQLException e) {
logger.error("Error resulet ", e);
}
return informe;
}
}
|
The U.S. should keep its debt-to-GDP in mind before things "get out of hand," Federal Reserve Bank of Cleveland President Loretta Mester said Monday.
Publicly-held debt-to-GDP is 75 percent, but is expected to double by 2047, pushed upward by a raft of recent government spending and stimulus programs.
According to the International Monetary Fund, the U.S. is the only advanced economy where debt-to-GDP is scheduled to increase in the next five years.
The U.S. should keep its debt-to-GDP (gross domestic product) in mind before things "get out of hand," Federal Reserve Bank of Cleveland President Loretta Mester said Monday.
Asked by CNBC's Joumanna Bercetche if she was worried about the outlook for rising U.S. debt, Mester was measured but encouraged monitoring the debt level, which is at its highest since just after World War Two.
"I think we have to be taking into account the health of U.S. economy, in terms of are we on a sustained fiscal path?" Mester replied. "And I do think that's something we should be thinking of now as we go forward, and not waiting till things get too far out of hand."
U.S. debt-to-GDP reached 104 percent in 2017, its highest level since 1946, when it hovered around 120 percent. Total U.S. debt has surpassed $21 trillion this year, a more than 120 percent increase from a decade ago.
Meanwhile, publicly-held U.S. debt-to-GDP — debt that the federal government owes to those outside the government — is 75 percent, but is expected to double by 2047, pushed upward by a raft of recent government spending and stimulus programs. The non-partisan Congressional Budget Office reported that a continuation of the current fiscal trajectory could take the current ratio up to 150 percent of GDP in 30 years, putting the U.S. in the same camp as Greece or Italy.
Some government officials have pointed to this as a warning sign that could impact more than the economy. Earlier this year, National Intelligence Director Daniel Coats called rising debt a national security threat.
"The failure to address our long-term fiscal situation has increased the national debt to over $20 trillion and growing," Coats said during a Congressional hearing in February. "This situation is unsustainable as I think we all know, and represents a dire threat to our economic and national security."
Still, ratings agencies continue to show confidence in the U.S. economy, with Moody's and Fitch in April reiterating their AAA gold-standard rating for America's credit standing. They reason that even with Washington's growing debt pile, it has sufficient resources to retain its global reputation.
Global debt is at its highest level in history, with advanced economy debt far surpassing that of emerging market countries. Total debt levels globally came in at a record $164 trillion in 2016, amounting to 225 percent of the world economy's gross domestic product, according to the IMF's April Fiscal Monitor.
Average debt for advanced economies stood at 105 percent of GDP, while that for middle and low-income countries averaged between 40 and 50 percent.
|
/**
* Records a pair of (possibly) intersecting shapes.
*/
public class ShapePair {
private Shape a, b;
public ShapePair(Shape src, Shape dest) {
this.a = src;
this.b = dest;
}
public boolean intersects(BoundsType boundsType) {
if (a == b) return false;
a.intersects(b.getBoundsInLocal());
switch (boundsType) {
case LAYOUT_BOUNDS:
return a.getLayoutBounds().intersects(b.getLayoutBounds());
case BOUNDS_IN_LOCAL:
return a.getBoundsInLocal().intersects(b.getBoundsInLocal());
case BOUNDS_IN_PARENT:
return a.getBoundsInParent().intersects(b.getBoundsInParent());
default:
return false;
}
}
@Override
public String toString() {
return a.getId() + " : " + b.getId();
}
@Override
public boolean equals(Object other) {
ShapePair o = (ShapePair) other;
return o != null && ((a == o.a && b == o.b) || (a == o.b) && (b == o.a));
}
@Override
public int hashCode() {
int result = a != null ? a.hashCode() : 0;
result = 31 * result + (b != null ? b.hashCode() : 0);
return result;
}
public Shape getA() {
return a;
}
public Shape getB() {
return b;
}
}
|
def FindConfig(names = ['my.cnf', '.my.cnf'], search_path = ['.', _home]):
my_cnf = None
for name in names:
for p in search_path:
if os.path.exists(os.path.join(p, name)):
my_cnf = os.path.join(p, name)
break
if my_cnf != None:
break
return my_cnf
|
/**
* Exception indicating that the server could not be used for the restore.
*/
@SuppressWarnings("serial")
public static class RejectedServerException extends Exception {
/* The actual range covered by the server. */
final VLSN rangeFirst;
final VLSN rangeLast;
/* The actual load of the server. */
final int activeServers;
RejectedServerException(VLSN rangeFirst,
VLSN rangeLast,
int activeServers) {
this.rangeFirst = rangeFirst;
this.rangeLast = rangeLast;
this.activeServers = activeServers;
}
public VLSN getRangeLast() {
return rangeLast;
}
public int getActiveServers() {
return activeServers;
}
}
|
Diabetes mellitus Type 2--the new face of an old lady. Already 600 years before Christ, type 2 diabetes was known as a disease of elevated blood sugar levels associated with obesity. Since then, it appears, our understanding of the disease has not changed much, aside from the replacement of tasting the patients' urine by the measurement of plasma glucose and glycated haemoglobin levels (HbA1c) for its diagnosis and the discovery of some new drugs. Already, in those old days a physician from India named Sushrut described diabetes mellitus as a disease characterised by the passage of large amounts of urine and its "honey-like" taste and, noteworthy, as a disease that is mainly associated with obesity and a sedentary lifestyle, recommending physical activity as the primary treatment option. Although these milestone observations remain valid, major progress in the underlying pathogenesis of type 2 diabetes has been achieved showing a new face of this old disease and opening doors for novel treatment options. This review will highlight recent pathophysiological aspects of type 2 diabetes, actual diagnostic and treatment guidelines and discuss some possible upcoming new therapeutic strategies.
|
<gh_stars>1-10
#include "kernel/interruptMasking.hpp"
#include "kernel/port/triggerTaskSwitch.hpp"
#include "kernel/scheduler.hpp"
#include "stm32f1xx_hal.h"
extern "C" void SysTick_Handler()
{
kernel::InterruptUnmasking interruptUnmasking;
HAL_IncTick();
if (SchedulerTick())
{
TriggerTaskSwitch();
}
}
|
A comparative study of national innovation efficiency based on SFA Based on the two-stage theory of innovation, this paper divides the innovation efficiency into R & D efficiency and output efficiency.Using the stochastic frontier analysis method (SFA) to evaluate and compare the innovation efficiency of the world's major innovative countries and BRIC countries.It is found that China's R & D efficiency is at a low level, the output efficiency level is higher. In the empirical analysis, it is also found that foreign direct investment has no direct effect on R & D efficiency and has negative influence on output efficiency; market openness has a positive impact on R & D efficiency and output efficiency; government R & D investment has a negative impact on R & D efficiency and output efficiency. Finally, suggestions are made.
|
Dutch far-right politician Geert Wilders has taken a court action to delay Dutch approval of the ESM.
The politician, who pulled out of the Dutch government last month, wants the vote delayed until after September's election.
The Netherlands is expected to contribute some 5.71% or just over €40 billion in total -- to the ESM.
The Netherlands must not ratify a law on backing Europe's long-term bailout plan until after September elections, a lawyer for far-right politician Geert Wilders said Tuesday.
Wilders has challenged the government in court after last week failing to stop the lower house from voting in favour of the multi-billion-euro European Stability Mechanism (ESM), set up to help heavily indebted countries.
The bill requires upper house approval at a date yet to be determined.
"Wilders, as an ordinary Dutch citizen, wants the state to postpone the decision on the ESM until after elections on September 12," his lawyer, Bram Moszkowicz, told The Hague district court, calling the law "illegal".
"Only after the elections will Dutch citizens be able to give their opinion about this law," he said, adding that "we believe that the majority of Dutch citizens are against the ratification of the ESM."
The far-right leader, also know for his anti-Islam stance, a month ago walked out of talks with Prime Minister Mark Rutte's coalition government over budget cuts, prompting Rutte's cabinet to call new elections.
The ESM, a permanent rescue fund, was created to ease market pressure on indebted euro zone nations such as Greece and prevent contagion across the single currency region.
It is due to be launched in July and will run in parallel with the temporary European Financial Stability Facility for one year.
Wilders opposes the ESM's endorsement, which he described as "a transfer of sovereignty to Brussels."
Judge Roel Paris will hand down a judgement on the issue on Friday.
|
<reponame>whoiszxl/tuester<filename>micro-tuester/tues-core/src/main/java/com/whoiszxl/exception/custom/DataNullException.java
package com.whoiszxl.exception.custom;
import com.whoiszxl.bean.Result;
/**
* 校验异常
*
* @author whoiszxl
* @date 2021/3/17
*/
public class DataNullException extends RuntimeException {
//错误代码
private final Result result;
public DataNullException(Result result){
this.result = result;
}
public Result getResult(){
return result;
}
}
|
Supersonic turbulence in Giant HII Regions: clues from 30 Doradus The tight correlation between turbulence and luminosity in Giant HII Regions is not well understood. While the luminosity is due to the UV radiation from the massive stars in the ionizing clusters, it is not clear what powers the turbulence. Observations of the two prototypical Giant HII Regions in the local Universe, 30 Doradus and NGC604, show that part of the kinetic energy of the nebular gas comes from the combined stellar winds of the most massive stars - the cluster winds, but not all. We present a study of the kinematics of 30 Doradus based on archival VLT FLAMES/GIRAFFE data and new high resolution observations with HARPS. We find that the nebular structure and kinematics are shaped by a hot cluster wind and not by the stellar winds of individual stars. The cluster wind powers most of the turbulence of the nebular gas, with a small but significant contribution from the combined gravitational potential of stars and gas. We estimate the total mass of 30 Doradus and we argue that the region does not contain significant amounts of neutral (HI) gas, and that the giant molecular cloud 30Dor-10 that is close to the center of the nebula in projection is in fact an inflating cloud tens of parsecs away from R136, the core of the ionizing cluster. We rule out a Kolmogorov-like turbulent kinetic energy cascade as the source of supersonic turbulence in Giant HII Regions. Introduction Besides the obvious difference in size, the fundamental distinction between Giant HII Regions (GHRs) and their smaller (mostly) Galactic counterparts (e.g. Orion) lies in the velocity width of their integrated emission-line profiles. Whereas small HII regions have thermal velocity widths, the integrated widths of GHRs are highly supersonic. Yet, despite decades of research and discussions, there is still no agreement as to the origin of the supersonic turbulence in GHRs. As so many other human endeavors of our days, opinions are divided into two seemingly irreconcilable camps: the "gravity" camp, championed by the authors of this paper in various combinations many with other collaborators (see e.g. Fernndez for a recent discussion and historical perspective); and the "stellar-winds" camp led by Y.H. Chu and R. Kennicutt (Chu & Kennicutt 1994). The defenders of gravity argue that the surprisingly tight correlation between the global Balmer line-profile widths (; H or H) and the integrated flux of these lines -the so-called L- relation -(shown in Figure 1) is the unequivocal telltale of gravity, although the slope of the correlation (L ∝ 5 ) cannot be deducted from first principles. The fact that HII region-like galaxies, or HII Galaxies also define a tight L − relation of similar slope, is also an argument for the gravity camp. The stellar winds camp, on the other side, base their arguments on the morphology of GHRs, which is dominated Send offprint requests to: Jorge Melnick e-mail: [email protected] Partly based on observations made with ESO Telescopes at the La Silla Paranal Observatory under programmes 072.C-0348; 182.D-0222; and 60.A-9700(G), and programme ID 076.C-0888, processed and released by the ESO VOS/ADP group. by prominent arcs and filaments, and on high-resolution spectroscopy that shows that the emission lines associated with these morphological features are double or multiple as expected for expanding bubbles of ionized gas propelled by stellar winds. Chu & Kennicutt showed that when the ragged shapes of the spatially resolved profiles are added-up, the resulting integrated profiles have a smooth supersonic Gaussian core with broad unresolved wings matching surprisingly well observations of unresolved nebulae. The idea that winds from individual stars can generate the observed bubbles has been disputed by Silich et al. who argue that the close proximity of the massive stars within the ionizing clusters of GHRs implies that their winds must necessarily merge into a hot cluster wind that percolates the pre-existing interstellar medium generating thus the hierarchy of expanding shells that we see today. Although the difference between stellarwinds and a cluster-wind is fundamental, it does not change the original argument of Chu & Kennicutt to explain the multiple shell structure of GHRs. Much of the work of the "stellar-wind" camp is based on observations of the two nearest and therefore best studied GHRs in the Local Group: 30 Doradus in the LMC and NGC604 in M33, but specially of 30 Doradus, which has become a sort of Rosetta Stone for deciphering the astrophysics of giant HII regions and their ionizing stars. In fact, the ionizing cluster of 30 Doradus (sometimes referred to as NGC2070; others as the R136 cluster), contains the largest concentration of resolved massive stars in the local Universe, including some of the few supermassive stars known (see for a recent review). Chu & Kennicutt argued that about 50% of the kinetic energy of the nebular gas in 30Dor is in the expanding shells and 50% in some unspecified form of general turbulence. The mass of stars+gas in the nebula, (M ∼ 5 10 5 M ) they argued, is not enough to generate the observed turbulence through the gravitational potential. The aim of the present paper is to use new public FLAMES/GIRAFFE data to investigate in (renewed) detail the nature of the supersonic turbulence of the nebular gas in 30 Doradus. The kinematics of the nebular gas in 30 Doradus The large angular size of 30 Doradus (henceforth 30Dor) has made it difficult to fully map the kinematics of the nebular gas. Smith & Weedman used a single channel Fabry-Perot (FP) interferometer to observe a number of positions in 30Dor with spatial resolutions of 13 ; 30"; 120. Melnick (reproduced in ) followed-up on these observations and showed that the structure function of turbulence in 30Dor was flat, albeit with a spatial resolution of only 13 = 3.25pc. Long before that, however, Feast had already found that there was very little structure in the turbulence of the nebula. Chu & Kennicutt improved upon these previous studies by dissecting 30Dor using long-slit Echelle spectrograms that provided a significantly better spatial coverage, particularly in the outer regions of the nebula. They found that the velocity field of the nebula is dominated by expanding shells of a wide range of diameters, and concluded that the supersonic velocitywidth of the integrated H profile was by and large the result of these expansion motions, although the shells accounted for only about 50% of the kinetic energy of the gas. They also dismissed the contribution of gravity in stirring-up the gas kinematics. Melnick et al. refined the observations of Chu & Kennicutt using higher spatial and spectral resolutions, albeit at only one slit position. They confirmed that the supersonic H profiles are resolved into multiple components, but at all positions along the slit they found a very broad unresolved component of unknown origin. More recently, Torres-Flores et al. used the multiplexing capabilty of FLAMES/GIRAFFE on the VLT to address some of the issues raised by Chu & Kennicutt and Melnick et al.. While they largely confirmed the findings of these previous studies, they questioned the reality of the broad unresolved component identified by Melnick et al.. For the ensuing discussion it is important to recall that several phases of the interstellar medium coexist within 30 Doradus: It seems to contain significant amounts of molecular and atomic Hydrogen ( and references therein); there is the ionized gas at 10 4 K, which we will call the nebular gas; and there is a very hot X-ray emitting medium at 10 7 K that we will call the hot-gas. Here, when we talk about supersonic motions we are referring to the gas at 10 4 K and a sound speed of c s = 9.1 km s −1 for hydrogen. -Flores et al. raised doubts about the reality of the broad component of the integrated H profile of 30Dor identified by Melnick et al., so it seems relevant to begin our analysis by revisiting this issue in order to set the ensuing discussion on self-consistent grounds. We used a subset of the data discussed by Torres-Flores et al. that we downloaded pipeline-processed from the ESO Archive (Phase3). We discarded from this dataset all points showing discernible contamination of the nebular profiles by stellar features, leaving a total of 1668 individual spectra in our full sample. Figure 2 shows the integrated profiles determined from these data in two different ways. The top panel shows the average of the 1668 individual FLAMES/GIRAFFE spectra. Torres-Flores et al. (see also our Figure 7) provide graphical illustrations of how the data points are spatially distributed in the nebula showing that the central regions are more densely sampled than the outskirts, mostly by the VLT Flames Tarantula Survey observations (). Thus, in order to check for effects that this inhomogeneous sampling may introduce, the lower panel shows the integrated profile using only the data from the uniform grid of Torres-Flores et al. for a total of 879 points. Torres Our Gaussian fits for both the Full-Sample and the Uniform-Grid profiles are surprisingly similar given the differences in the two samples. The widths of the profiles also agree with those of Melnick et al. and Torres-Flores et al. for the core of the line, but the broad component of Torres-Flores et al., 2 = 49.1 km s −1, is significantly broader than ours ( 2 = 41.3 km s −1 ; lower panel) basically for the same data. The discrepancy is much larger than the formal fitting errors (< 1 km s −1 ), but it is well known that the parameters of multi-Gaussian fits are rather sensitive to the statistical errors of the data, which probably explains the discrepancy. We used the errors provided by the ESO Phase3 pipeline propagated through the various manipulations of the data, but we ignore how Torres-Flores et al. estimated the corresponding errors. Melnick et al. fitted two Gaussians to the total profile of Chu & Kennicutt and found 1 = 26 km s −1 and 2 = 44 km s −1, without including errors. Notice that two Gaussians do not fit the center of the line for which a third component would be required. Radial bins The outer regions of the nebula have been characterized by Chu & Kennicutt, so here we will concentrate in the inner (r < 40pc) part of 30Dor that contains the bulk of the ionizing Top. Integrated H profile of 30 Doradus using all the available data (1668 points). Two Gaussian components are required to fit the core and the wings of the line shown by the thin red lines. The data are shown as blue points and the sum of the two Gaussians by the red dashed lines. The legend reports the measured (left) and corrected for instrumental and thermal broadening (right) widths () of each component plus the width from a single Gaussian fit ( 0 shown by the black lines). Bottom. Same as top, but using only 879 points from the uniform grid of Torres-Flores et al.. The heliocentric radial velocity of 30Dor obtained from the full-sample is V 30Dor = 264.8 km s −1 for an H rest wavelength of 656.2804nm. stars and has a complex structure that was not well covered in the study of Chu & Kennicutt. To begin, we present in Figure 3 profiles integrated over 7 radial rings of radii indicated in the legend. For each ring, the figure shows multiple Gaussian fits with the minimum number of components required to reproduce the observations. We will insist throughout this work that multiple-Gaussian fits are seldom unique being increasingly sensitive to data errors and to the initial guesses as the number of Gaussian components increase, so we must be conservative when interpreting the results from these fits. Nevertheless, Fig. 3 shows several robust features relevant to the present study. One is that the innermost ring (r < 10pc) shows two intense peaks that tell us that the kinematics of the very center of the nebula is dominated by a massive wind that is blowing away the gas at high speeds. Despite this raging wind, however, there is still plenty of gas at the center of 30Dor as indicated by the intensity scale. A second feature is that there is a dramatic change in the kinematics at r = 25pc. Beyond this radius, the profiles become broader and increasingly show the emergence of a second redshifted component. Thus, beyond 25pc we see the onset of the "large expanding-shells" regime. A third feature is that the surface brightness drops dramatically as the structure of the gas becomes increasingly dominated by the large shells described by Chu & Kennicutt.. Integrated profiles of the core of 30Dor (r < 40pc) and 7 radial bins identified in the figure legend that quotes the inner and outer radii of each ring in pc. The legend also gives in the right side widths of the multi-Gaussian fits of each ring and on the left, denoted as 0, the width and radial velocity of the single Gaussian fit (that is not plotted) relative to the integrated velocity of the nebular core that defines our rest-frame for 30Dor. Profile taxonomy The atlas of gray-scale spectrograms of Chu & Kennicutt shows that virtually everywhere in the nebula the H profiles tend to break-up into multiple components. However, the high contrast of the atlas prints makes it difficult to precisely discern the profile shapes. Thus, we were surprised to discover, upon visual examination of our 1668 H profiles in the computer screen, that the majority of the profiles can actually be divided into three well defined groups illustrated schematically by Figure 4. The vast majority of the profiles are either single or double, although multiple profiles also contribute a fair fraction. We emphasize that we here are describing the H profiles. We will discuss the forbidden lines in the next section. Like the integrated profile, single profiles have Gaussian cores and broad non-Gaussian wings. Double and multiple profiles are characterized for having two or more smooth components of comparable (within factors of a few) peak intensities that are well separated in radial velocity. The radial velocity of the stronger component generally appears to be closer to zero, whereas the weaker peak is either redshifted or blue shifted relative to the stronger component. We mentioned at the beginning that Chu & Kennicutt concluded that 50% of the kinetic energy of the gas is in the expanding shells and 50% in some form of unspecified turbulence. Assuming that double and multiple represent pure expansion, the single profiles must convey information about that "unspecified" form of turbulence. Therefore, it is important to quantify the distinction between single and multiple profiles. We used an algorithm based on first and second derivatives to detect multiple peaks using the S /N of the continuum to weedout spurious peaks. Most of the profiles show some degree of low-level asymmetry, which does not make them multiple in the sense of having more than two peaks of comparable intensities. Therefore we introduced a finer distinction in order to separate single from multiple profiles. We defined as "double" profiles where the ratio of peak-intensities between the first (strongest) and second components P 2 /P 1 > 0.1, and "multiple" profiles having three or more components with P 3 /P 1 > 0.15. The peak finding algorithm yields 1067 singles; 453 doubles and 148 multiples, confirming our initial impression that multiple profiles are less abundant but still numerous. Visual examination revealed that a good fraction of singles were actually doubles where the radial velocities of the peaks are too close to be detected by our peak finding algorithm. Since the H profiles are blurred by thermal motions that hide components with a small difference in radial velocity, we refined our separation of single and multiple profiles using the lines of and that have much smaller thermal broadenings (2.4 and 1.6 km s −1 respectively). This "solution", however, turned out to be complicated as discussed below. and kinematics Using the and lines (henceforth the forbidden lines) to characterize the nebular gas kinematics has two problems. The first most obvious one is that the lines are much weaker than H and often their S/N is too low for a reliable characterization of the profiles. The second, less obvious problem, is that in general the peak intensities of the multiple components of H differ from those of the forbidden lines, as in the example shown in Figure 5. It is not appropriate, therefore, to use the morphology of the forbidden lines to characterize the kinematics of H (and viceversa). So we only used the forbidden lines to flag single and multiple profiles, and we searched for multiple components in all profiles thus flagged by subtracting single Gaussian fits from the observed H profiles and fitting multiple Gaussians, using the positions of the residual peaks as initial guesses, to measure the peak intensities. In this way we found that 599 of the 1067 lines classified as "single" in H by the peak finding algorithm were double in and/or and confirmed to have P 2 /P 1 > 0.1 at H, while 30 profiles previously classified as double were confirmed to be multiple (P 3 /P 1 > 0.15). Relevant statistics from the three families of H profiles are presented in Table 2 that lists average radial velocities of the strongest components < V 1 >; the average peak intensity ratios; and the average velocity-widths from single-Gaussian fits (uncorrected for instrumental and thermal broadening; ). The ± values give the rms dispersions from the means. Using the partition of single and double profiles we can now quantify our second visual impression that the stronger component is generally at rest in the frame of the nebula while the weaker component is either redshifted or blue shifted relative to the strong component. Figure 6 shows the histograms of radial velocities of the two components of our "double" profiles. As in Table 1, P 1 corresponds to the strongest peak and P 2 to the weaker one. It should be obvious from these distributions and the data of Table 1 that the integrated profile of 30Dor can be deconstructed into a sum of Gaussians representing the components of the double peaks plus the single peaks and their rms radial velocity dispersion. Finally, let's look at the spatial distribution of our three families of profiles. This is presented in Figure 7 where we have color coded the positions according to morphology. Doubles tend to concentrate inside the large expanding shells; singles tend to. Distribution of radial velocities relative to the rest frame of 30Dor of the two components of the double profiles. P 1 (magenta) represents the component with highest peak intensity and P 2 (green) the weaker component. lineate the high surface brightness borders of these shells; while multiples share the distribution of doubles. The image illustrates that the profiles inside the large Chu-Kennicutt bubbles are double or multiple, while at the edges of these giant shells the profiles are mostly single. We have color coded the single profiles according to their peak radial velocities relative to the systemic velocity of 30Dor (265.4km s −1 ) from our H data. The edge of Chu-Kennicutt#2, that has been very well mapped in search for photodissociation regions, is seen to be blue-shifted indicating that the shell is expanding towards us, while the inside shell that was identified by Chu & Kennicutt but not numbered is completely delineated by red dots. The single profiles, therefore, delineate the edges of the expanding shells as well as the dense filaments and loops that characterize the core of the nebula, and which will be described in detail below. Notice that the blue and the red dots are rarely mixed showing that the densest parts of the nebula as a whole are expanding. Single Profile Kinematics Assuming that the kinematics of the nebular gas represented by double and multiple profiles is dominated by expanding motions, single profiles should provide us with information about the 50% of the total kinetic energy of unknown forms of turbulence mentioned by Chu & Kennicutt. We have just seen that the radial velocities of the single profiles are dominated by expansion motions, but the individual profiles also have supersonic widths. Table 2 summarizes the average intrinsic width (i.e. corrected for instrumental and thermal broadening) and heliocentric radial velocity of the single profiles for H and for the forbidden lines. The table shows that the forbidden lines are on average ∼ 1.3 km s −1 narrower than H. Figure 8 shows the stacking of the single and H profiles after rebinning the data to z = 0. We have repeatedly whined about the dangers of multi-Gaussian fits, but in the case of Fig. 8 a minimum of three components is required to fit the core and the wings of the lines. In fact there are good physical reasons to fit three components; we have already encountered two: 1, the main peak, and 3, the broad unresolved component that pervades the nebula. The third component ( 2 ) corresponds to the sum of all the low-intensity components that do not meet our P 2 /P 1 > 0.1 and/or P 3 /P 1 > 0.15 conditions. A second interesting feature of Fig. 8 is that, as already shown in Table 2, the H profile is broader than by 1.6 km s −1. The difference is somewhat larger than the value of 1.3 km s −1 from the table that assigns the same weight to all profiles independently of peak intensity, so the agreement is actually quite good. We verified that the systematic difference in the line-widths is not due to a geometrical effect (see Appendix A). In fact, Hippelein found a similar systematic difference between 500.7nm and H for the integrated profiles of a small sample of Giant HII Regions and HII Galaxies. This difference has been confirmed by several authors notably by Melnick et al. for a substantial sample of HII Galaxies. A similar effect was also observed in the Orion Nebula by Garca-Daz et al. but there is no consensus in the literature as to the origin of the discrepancy. Notice, however, that while the intrinsic width of H ( 1 ) is the same as the sound speed for hydrogen at 10 4 K, the profiles are highly supersonic, suggesting that perhaps they could be resolved into even more components. We also measured the intrinsic widths of each of the individual components of double H profiles -taken separatelyusing two Gaussians to fit the doublet plus a third Gaussian to fit the extended wings, using an automated procedure. We find an average width of 11.7 ± 4.7 km s −1 for these components, comparable to the values given above for the average width of single profiles (11.9 ± 3.4km s −1 ). The profiles with HARPS We speculated above that a possible explanation for the reason the intrinsic width of single profiles is highly supersonic while H is not, could be that at higher resolution the profiles would be resolved into multiple narrower components. We therefore observed two characteristic regions of 30Dor with HARPS: one at the very center (R136), and the second at the position of Filament F from the NTT observations of Melnick et al., located 8pc due west of R136. The original purpose of this pilotproject was precisely to resolve the profiles further, and to verify if the forbidden lines also showed the broad unresolved component seen by Melnick et al. at H. HARPS provides a spectral resolution of R=100000 covering the spectral range between 370nm and 690nm with a spatial resolution, determined by the entrance fiber, of 3. Figure 9 shows the HARPS spectrum of the center of 30Dor (R136) that nicely illustrates the extremely broad "feet" of the Balmer lines from the massive WN7h stars in R136 that provide a significant Article number, page 5 of 15 A&A proofs: manuscript no. girafR30 The H profiles shown in the bottom panels of the figure are double in the sense discussed above: they can be fitted reasonably well using two Gaussian components for the two main peaks plus a third for the broad extended wings. The lines, on the other hand, have higher S/N and much smaller ther- mal broadening (2.3 vs. 9.1 km s −1 at 10 4 K), allowing to discern a significantly more complex structure at the same positions, which requires at least 7 components, plus one for the broad wings, at the center, and at least 5 components plus the broad wings for Filament F. The corrected velocity-widths of the individual components are given in the figure legends. Although the line resolves into several components, these are still supersonic at 10 4 K, but again we must return to the "mantra" of this paper: beware of multi-Gaussian fits. The solutions shown in Figure 10 result from leaving all parameters free. It is actually possible obtain solutions by forcing the widths of all components to be narrow, say, = 3 km s −1, albeit only after carefully fine-tuning the initial guesses of all other parame-ters. So we can neither prove nor rule out that the profiles are the sum of many subsonic components, for which we would need much higher S/N data. Nevertheless, our results clearly show that the individual components of double profiles are resolved into a number of narrower components indicating that there is structure in the expanding shells at the spatial resolution of HARPS (0.75pc). The radial-velocity dispersion of these components is "typically" (we only have 4 examples) ∼ 11 km s −1, quite similar to the value measured from the unresolved shells and filaments. The kinematical core of 30 Doradus 3.1. Structure Figure 3 shows that there are two inflection points in the integrated profiles of the central part of 30Dor: the region r < 10pc, where the profile is double and the kinematics dominated by the massive cluster wind emerging from the stars in the cluster core (R136); and the region r > 25pc where expanding motions increasingly dominate the profile shapes. We used finer bins to verify that the latter change is already visible between 25pc and 27pc. The radial H brightness distribution, shown in Figure 11, also shows features (i.e. changes of slope) at r ∼ 10pc and r = 25pc amid a broad peak that encompasses 33% of the total H flux of the nebula and the bulk of the ionizing stars, and where the cluster wind that drives the hierarchy of Chu-Kennicutt shells originates. Figure 3 shows a distinct inflection point. Figure 12 shows that the width of the integrated profile of the region r ≤ 25pc (henceforth the kinematical core) is virtually identical to that of the nebula as a whole (the only significant difference being the width of the broad component). Therefore, the ratio of kinetic energies of the nebula as a whole and the kinematical core is just the ratio of the H luminosities; the core contains 23% of the total kinetic energy of the nebular gas in 30Dor. Perhaps tellingly, the shape of the profile of the kinematical halo (r > 25pc; the realm of the large expanding bubbles) is virtually identical to those of the core and of the overall nebula. Article number, page 7 of 15 A&A proofs: manuscript no. girafR30 Fig. 12. Comparison between the integrated H profiles of the whole nebula (bottom) with the profile of the kinematical core (r ≤ 25pc), and the kinematical halo (r > 25pc). The blue points are the data and thickdashed red line is the fit of two Gaussian components shown in thin red. The single-Gaussian fit is shown by the black line. The parameters of these components, observed and corrected for instrumental and thermal broadening are shown in the legend. Figure 13 presents a zoom to the central 30pc of 30Dor seen in X-rays (right) and H (left). Overlayed on these images are colored dots coded according to profile shapes and kinematics. Single profiles delineate bright (dense) H filaments, and lie at the edges of bright X-ray zones. These dense filaments define the "head" of the Tarantula, which, as shown by the distribution of blue-shifted and red-shifted profiles (blue and red dots), consists of several expanding bubbles that are the mouth and the eyes of the spider. The large elliptical bubble that surrounds R136 is asymmetrical with the eastern side being more luminous in Xrays. This "mouth of the Tarantula" opens towards the east indicating that the hot gas is escaping through the mouth to inflate the giant bubble Chu-Kennicutt#2, as one would inflate a balloon for a birthday party! There is another expanding bubble due North of R136 that is very bright in X-rays and that is open to the north toward the giant Chu-Kennicutt#5 shell. Similarly the bubble due south of R136 seems to be inflating Chu-Kennicutt#1. So we get the impression that the dense filaments that define the head of the Tarantula act as nozzles that channel the cluster wind from the source (R136) out to the giant Chu-Kennicutt shells. The clumpy structure of the hot cluster wind seen in the Xray image is mostly due to shadowing by the dense dust+gas structures that can be clearly appreciated in the H image. The X-rays are faint in places where the H emission is bright and blue-shifted, indicating that the nebular component is in front of the hot gas, and viceversa. Receding filaments seem to lie behind that hot gas, but not always; the bright loop directly NW of R136, where the X-rays are faint, is redshifted. However, the giant shell Chu-Kennicutt#3 is adjacent so it is possible that the hot wind has already escaped from that region. Kinematics To compare with the results of Chu & Kennicutt, Table 3 presents an estimation of the kinetic energy budget of the nebular gas. The total kinetic energy is 2K tot = M gas 2 0 where 0 is the integrated velocity dispersion of the gas estimated from the single-Gaussian fit of figure 2 and M gas = 4 10 5 M is the total mass of nebular gas according to Chu & Kennicutt. The values for the kinematical core and halo are obtained assuming that the mass of gas is proportional to the H luminosity. The kinetic energy of the "general" turbulence was calculated as follows. We saw that the single H profiles as well as each of the two components of double H profiles have average widths of ∼ 11.8 km s −1. We do not know the source of energy that sustains these motions, but we do know that when we observe the same profiles in the forbidden lines, they are resolved into many narrower components. We also ignore the mass of these turbulent shells and filaments, but, since they comprise the brightest regions of 30Dor, it is reasonable to assume that they contain most of the nebular mass (assuming that the mass is proportional to the H luminosity). We calculated the velocity dispersion in two ways: directly from the average profile widths (min) and convolving the profile width with the radial-velocity dispersion of the single profiles (max), max = √ 11.8 2 + 11.6 2 = 16.5 km s −1. Since at least some, and probably much, of the radialvelocity dispersion of the single profiles is due to expansion motions, the velocity dispersion of 16.5 km s −1 given in the table is a maximum. Thus, the fraction of the total kinetic energy contained by general turbulence is closer to 25% than to 45%, compared to 50% estimated by Chu & Kennicutt. Kolmogorov turbulence Observations of the other prototypical GHR in the local group, NGC604, by Medina-Tanco et al. appear to show a well developed Kolmogorov-like kinetic energy cascade in that giant nebula. They found that the structure function, -the square of the difference in radial velocity between two points separated by a distance r averaged over all pairs of positions separated by r -is a power-law of slope ∼ 5/3 for r ≤ 10pc and flattens at larger separations. Since by definition ≡ v 2 − v 2, if v = 0 the structure function S 2 = 2 2, so it is convenient to normalize by the square of the the radial-velocity dispersion rv such that the normalized function peaks at S 2 ∼ 2 (). Figure 14 reproduces the normalized structure function of NGC604 calculated using the same radial velocity data of Medina-Tanco et al. kindly provided by Gustavo Medina-Tanco. Medina-Tanco et al.. The red bar shows the radius (4.1pc) corresponding to the seeing disk (1 ) of the TAURUS-II observations used to construct the structure function. We used our full sample to construct the structure function for 30Dor as for NGC604, but using three different ways of measuring the radial velocities. The top panel of Fig.15 corresponds to the method adopted by Medina-Tanco et al. of fitting single Gaussians to all profiles. The second, shown in the middle panel, uses the radial velocity of the strongest peak at each position; and the third uses only the single profiles. Typically each point in the top two panels is the average of 16000 to 78000 pairs, except for the smallest separation that has only 6500 pairs. The vertical bars represent the rms dispersion around each average. Contrary to that of NGC604, the structure function of 30Dor has no structure: it is flat! Since the L − relation of Fig. 1 implies that the kinematics of GHRs depends only on their luminosities, we expected 30Dor and NGC604 to have similar, if not identical, structure functions, which turned out not the case. Why? Unfortunately, there are several problems and inconsistencies with the results of Medina-Tanco et al.. The first and most obvious is seeing. The red bar in Fig. 14 at 4.1pc corresponds to the seeing (1 ) reported for the Taurus-II observations of Sabalisck et al. upon which the structure function is based. The separation of the first two points in the structure function is less than the seeing, while the next two points at < 2 are also affected by seeing. These four points define the slope of the function for r < 10pc. Removing these four seeing affected points the remainder of the structure function of NGC604 is basically flat. A second issue that may blurr the comparison between 30Dor and NGC604 is beam-smearing. At the distance of M33, 1 = 4.1pc" while the data of Medina-Tanco et al. were binned to 2 2, which results in a significant smoothing of the radial velocities. There are also some problems with the TAURUS-II data for NGC604. For example, the TAURUS-II profiles of Muoz-Tun et al. are substantially broader than the TAURUS-I (plus Echelle) results of Yang et al.. We were unable to recover the original data to check these issues, so for the moment it seems safer to ignore the results of Medina-Tanco et al., although we cannot overemphasize the importance of re-observing NGC604 hopefully at a higher spatial resolution. Gravity Chu & Kennicutt dismissed gravity as an important source of kinetic energy because "...even the largest imaginable mass for 30Dor would be far too small to explain the velocity dispersion of the gas inferred from the width of the integrated profile", 0 = 23.5 km s −1 (Fig. 12). But we know, as they knew, that a major part of this width is furnished by expanding shells. So let us revisit the issue. We calculated the structure function of an N-body model of a 10 3 M virialized cluster containing 2000 particles of equal mass (kindly provided by Sverre Aarseth) shown in Figure 16, Fig. 16. Structure function of a virialized cluster of 2000 particles. All particles have equal masses and the total mass of the cluster is 10 3 M. For a virialized system S 2 (r) 2 2 and the velocity dispersion is constant in the core. The match is not perfect, but still provides a much better match than a Kolmogorov turbulent energy cascade. This does not prove that gravity is driving the turbulence in 30Dor, but at least provides a consistency check. Another way of probing the effect of gravity is to estimate the mass required to generate the observed motions through the virial theorem. The morphology of 30Dor and the results of Chu & Kennicutt show that the outer parts of the nebula are dominated by expanding motions, so here we will restrict our analysis to the kinematical core. Figure 17 shows the radial-velocity dispersion rv (in red) and the mean velocity width (in blue) of the single profiles plotted as a function of radius. Each bin contains 50-70 points except for the first bin (10 < r ≤ 25pc) that contains 98 single profiles. We excluded the central 10pc that is completely dominated by expansion motions. The average width of the profiles in the kinematical core is < core >= 11.2 ± 3.0 km s −1 and the radial-velocity dispersion is rv = 15.3 km s −1. The respective minimal and maximal turbulent velocities in the core, therefore, are min = 11.2 km s −1 and max = √ 11.2 2 + 15.3 2 = 19 km s −1. Assuming an effective radius of 10pc (instead of the 100pc used by Chu & Kennicutt 1994), the corresponding mass limits from the virial theorem are, 2.9 10 5 ≤ M/M ≤ 8.4 10 5 The observed (photometric) mass of the kinematical core is quite uncertain, the stellar mass.being probably the least uncertain. Selman et al. quote a mass of M * = 68000M that results from integrating the observed (power-law) IMF between 3M and 120M. The low-mass (m<3M ) IMF of 30Dor is not known, but the IMF of most young star forming regions turns over at masses ∼ 0.5M (). Extrapolating the IMF of Selman et al. down to 0.5M, yields a total stellar mass of M = 1.5 10 5 M for 30Dor, 50% larger than the value generally quoted in the literature (e.g. and references therein), The mass of ionized gas is more uncertain. Here we will adopt the value of M HII = 4.5 10 5 M from Chu & Kennicutt, which according to these authors is uncertain by factors of 2-4. Ochsendorf et al. derive a similar mass with an uncertainty of "only" a factor of 2 (0.2dex). The most uncertain component is the mass of neutral and molecular gas also discussed by Ochsendorf et al.. A comprehensive review of this contribution is well beyond the scope of the present paper, but in Appendix B we present a summary and justify our optimistic value of M HI+H 2 = 9 10 4 M for the amount of neutral and molecular gas within the nebular core. The core of 30Dor contains the bulk of the stars and 23% of the H luminosity, so the total mass within the kinematical core is, which is comfortably above the minimum value required by Eq.2. So, again, we may have consistency, but not proof. A simple and direct proof would be to show that the velocity dispersion of the stars is consistent with that of the gas. Unfortunately, however, this test turns out to be neither simple nor direct. Bosch et al. and Bosch et al. found a surprisingly large velocity dispersion for NGC2070 that can be explained if a large fraction of the massive stars in the cluster are binaries. Subsequently, binary orbits have been measured for many of these stars confirming that conclusion (a). There are several other complications related to mass segregation and rotation (b) that compromise the putative simplicity of the test, but the observations show that, at least in the cluster core (r < 5pc), the stars are in virial equilibrium (a,b). To conclude this discussion, let us revisit the mass required to explain the integrated velocity dispersion by gravity. Adding up the HII mass (4.5 10 5 ), the stellar mass (1.5 10 5 ), and the molecular mass (1.8 10 5 ) the total mass of the nebula is M 30Dor = 7.8 10 5 M. The half-mass radius, therefore, is close to the radius of the kinematical core (r = 25pc), but much smaller than the value of 100pc assumed by Chu & Kennicutt. The viral mass for a velocity dispersion of 23.5 km s −1 and an effective radius of 25pc is 3.2 10 6 M, still significantly larger than our optimistic value for M 30Dor, but by no means "the largest imaginable"! Small scale turbulence We have seen that there is no large scale supersonic hydrodynamical turbulence in 30 Doradus, and that the gravitational potential is not strong enough to furnish all the kinetic energy of the gas: The large-scale structure of 30Dor is organized by the cluster wind, but the wind-driven shells are themselves turbulent. This turbulence could be due to Kolmogorov-like kinetic energy cascades powered by the wind, such as observed in the Orion Nebula (). However, even within the shells and filaments of 30Dor, we are looking spatial scales orders of magnitude larger than the turbulent regions in Orion, so we have no hope of resolving the turbulent cascade. However, our data (mostly HARPS but also some FLAMES profiles) show that the forbidden profiles can be resolved into many components with radial-velocity dispersions similar to the widths of the profiles. Such mutiplicity would explain why at the same positions the H profiles are subsonic but highly supersonic in the forbidden lines. An intriguing possibility to explain the small scale turbulence is that sections of the leading shocks composing the large structures loose energy by radiation as the medium they sweep piles-up in front, so necessarily secondary shocks emanate from the hot gas to transmit the interior pressure. These "shockletts" slam first onto swept-up gas and eventually onto the leading shocks giving them small jolts that here we relate to the structure we observe in the forbidden lines. The ionization of the 30Dor nebula is by and large provided by the massive stars, with a small contribution from fast shocks that, in principle, should be more important in the denser parts of the nebula (). Figure 18 shows the shock sensitive diagnostic diagram that can be obtained using the FLAMES spectra, color coded according to the distance to R136. Fig. 18. Point-to-point nebular diagnostic diagram for the different types of profiles described in the text. The points for the single profiles are colored according to the distance to R136 shown by the scale on the right. The solid curve shows the low-velocity shock models of Dopita & Sutherland for a range of velocities between 150 km s −1 and 500 km s −1 ; two values of the magnetic field density (0 and 1 Gcm −3 ); and solar abundances. The dashed curve shows the same models scaled to the metallicity of 30 Dor from Pellegrini et al.. The figure shows that emission from low velocity shocks is clearly visible in the low-density external regions of the nebula, but not in the densest regions in the core of the nebula. This does not mean that shocks are not present in this region; it only means that, if present, they are completely overshadowed by photoionization at optical wavelenghts, reflecting, perhaps, how the cooling process operates behind the leading shocks as these continue to ram into a cloudy medium of very different densities. This also determines the speed of the shockletts driven into the nebular swept-up gas as this cools and approaches the nebular equilibrium temperature. The broad unresolved component Our analysis thus far has ignored the mysterious broad unresolved component that pervades the nebula and that is seen both in the Balmer lines and in the forbidden lines of , , and , precisely because we ignore its origin. We have seen, however, that like the narrow components, the broad unresolved component of the forbidden lines is narrower than H, so it seems reasonable to conjecture that the physical conditions of the gas that emits the broad unresolved lines are similar to those of the nebula as a whole, and therefore, that it is probably due to a large collection of fragments of shells and filaments left behind by the cluster-wind as it successively breaks out of shells of swept-up material. We have not explicitly included this component in our estimates of the kinetic energy budget of the nebular gas, for which we used single-Gaussian fits. Although the width of the broad component is large, its residual H flux relative to the single Gaussian fit is negligible, so we can safely ignore the contribution of the broad component to the kinetic energy budget. Discussion There is broad disagreement in the literature about the structure of 30Dor and its genesis (;). Below we present a summary of our own view, which is the result of a series of in-depth investigations about the formation and evolution of super-star clusters and their associated Giant HII Regions ( and references therein), and which we will use in the interpretation of the observations presented in this paper. The genesis of Giant HII Regions The progenitors of GHR are Giant Molecular Clouds (GMCs) that are clumpy and highly turbulent as a consequence of multiple prior generations of star formation, the gravitational field of the parent galaxies, and their own gravitational potential, which is substantial given their large masses (e.g. Heyer & Dame 2015;). Even before any stars form, the turbulence within these GMCs is supersonic (with respect to the sound speed of the molecular gas (∼ 1 km s −1 ), causing the condensations to accrete more molecular material as it cools behind their leading shocks. This sets the initial conditions at the onset of star formation that occurs within the largest and most massive condensations. The arrival of the most massive stars on the main sequence (MS) produces a sudden ample supply of UV photons that changes the sound speed to ∼ 10 km s −1 as the gas becomes photoionised. At the same time, the strong stellar winds from these stars (that reach the MS first) collide with neighboring winds generating multiple shocks that thermalize the winds causing a large overpressure in the star forming volume that ends up driving the shocked stellar wind gas as an isotropic supersonic cluster wind (v cw ∼ 1000 km s −1 ) into the surrounding medium (). This cluster wind immediately encounters a large number of neighboring condensations, some of them fully or partially ionised, and the interaction leads to another (global) reverse shock that heats up the incoming gas to very high temperatures (T ∼ 10 7 K). The resulting hot gas rapidly expands along multiple paths of least resistance and flows away into lower pressure regions engulfing the dense ionized condensations that were originally part of the parent GMC. The expansion of this continuous wind generates secondary shocks that sweep-up the low density medium between condensations producing large bubbles and super-bubbles that eventually break-up allowing the hot gas to escape and create the hierarchy of shells, tubes, and filaments that characterize GHR. The expansion eventually reaches the edge of the GMC and the cluster wind escapes into the intergalactic medium carrying with it the products of stellar evolution (). The genesis of 30 Doradus The morphology of the gas (nebular and X-rays) confirms that the structure of 30 Doradus was carved by the cluster wind and not by the winds of individual stars; the coherent H structures that we see are seldom, if ever, centered on individual stars. We have shown that the clumpy structure of the X-ray emission is due to shadowing by dense clouds of dust and nebular gas, and also by the giant molecular cloud located NNE of R136, which we claim is in front of the nebula on the basis of the radial velocities of all its individual clumps. The innermost dense regions of the nebular gas have been pushed into coherent structures by the cluster wind in such way that they form nozzles through which the hot gas flows towards the outer regions of the nebula thus creating the giant expanding shells that characterize 30 Doradus. The Chandra X-ray images of Townsley et al. show regions -notably the large Northern plume -where the cluster wind is already escaping from the nebula. The X-ray gas occupies regions of low H surface brightness where the profiles are inevitably double, clearly showing that the expanding shells are being "inflated" by the hot cluster wind. 30 Doradus has a clear core-halo structure evidenced mainly by the brightness. However, the overall kinematics of the core and the halo are surprisingly similar; the integrated profiles are virtually identical and only differ in the broad wings albeit slightly. This may just be a coincidence given that the way the cluster winds carve the original molecular cloud must depend on the original configuration, which certainly must vary from one nebula to the next. It would be interesting, however, to verify whether other GHR in the Local Group present similar "coincidences". The remnants of the dense clumps of the placental GMC have been piled together by the cluster wind to form the densest parts of the nebular gas, mostly in the form of long twisted filaments. At small scales, the forbidden line-profiles of these shells and filaments are supersonic and composed of many narrower components, which could be due to the detailed hydrodynamics of the expanding shells. The source of energy for the whole process, therefore, is the ionizing cluster: the kinematics through the cluster winds and the emission-line luminosity through the ionizing radiation. Ultimately, this explains why L and are so tightly related, although it remains hard to explain the steep slope of the L − relation. The relation implies that the velocity dispersion of the gas increases very slowly with the mass of the ionizing cluster ( ∼ M 1/5 cl ), so explaining the L − relation remains a challenging problem in astrophysics. Pure gravity would have been much simpler! Summary and conclusions Theoretical studies predict that the formation and evolution of Giant HII regions is determined by hot cluster winds that result from the merging and thermalization of the winds from the individual ionizing stars. Our observations largely support this scenario: none of the large nebular structures that characterize the nebula, with the exception of the central bubble that surrounds R136 are centered around individual massive stars. The hierarchical structure of the shells, on the other hand, is exactly what is expected from a cluster wind that originates in the core of the ionizing cluster (R136) and breaks out of successive shells built by the material swept up by the same wind. We have confirmed previous results that the kinetic energy of the nebular gas is mostly in the form of the expansion of the multiple shells. Not only are the H profiles in the low surface brightness regions inside these shells double or multiple, but also the profiles of the rims of these shells, which are mostly single, clearly show organized expansion motions. Expansion accounts for ∼ 70% of the kinetic energy while the remainder is manifested by the supersonic intrinsic widths of the individual profiles. The radial dependence of the kinematics and of the H surface brightness clearly show a well defined core-halo structure. The nebular core (R ≤ 25pc) contains the bulk of the ionizing stars and 23% of the total H luminosity. The massive cluster wind that carves the nebular structures originates in the core and is channeled to the external giant expanding bubbles through break-out structures within the core, which act as nozzles. The clumpiness of the (hot thermalized cluster wind) X-ray emitting gas is due to shadowing by foreground nebular gas and dust, so it is reasonable to conclude that the hot gas uniformly fills the nebular core, and is expanding through the break-out nozzles to inflate the characteristic giant (Chu-Kennicutt) external bubbles of 30 Doradus. The structure function of the turbulence of the nebular gas in 30Dor is flat. The idea that the supersonic turbulence of the gas in Giant HII Regions is due to a turbulent Kolmogorov-like kinetic energy cascade put forward by Medina-Tanco et al. can be definitively ruled out. Instead, we find that the structure function of a virialzed cluster is more compatible with our observations, albeit only within the cluster core where the velocity dispersion is constant. The virial mass corresponding to the observed global velocity dispersion of 30Dor = 23.5 km s −1 and an effective radius of R e f f = 25pc is M vir = 3.2 10 6 M. The main source of the supersonic velocities observed in the nebular gas is the hot cluster wind, with a small but significant contribution from the gravitational potential of ionized gas, molecular gas, and stars. The total (photometric) mass of 30 Doradus is a few times 10 5 M with large uncertainties but certainly less than 10 6 M. all ionizing stars are in R136 (), so it is safer to assume that N ∝ R − where measures the central concentration of the ionizing flux. Thus, the ratio of /H scales as R −0.7. Figure A.2 plots this ratio as a function of radius for the single profiles. The least-squares fit shows that F(/F(H) ∼ R 0.2 in the halo and ∼ R 0.7 in the nebular core (we used only that has more points). This indicates that = 1.4 in the core and = 0.9 in the halo. As an exercise, keen readers can compare these predictions with the observed distribution of massive stars using the catalog of 30Dor stars (). In principle, therefore, one could expect the difference between the widths of and H to depend on radius, but this is not the case. Figure A.3 plots the difference in the widths of and H for the single lines in our sample. We observe no obvious trend. We exclude, therefore, that the H lines are broader due to geometrical effects where (and ) probe mostly the kinematics of nebular halo whereas H probes the entire nebula. Townsley et al.. The infrared emission from Spitzer is shown in inorange and the X-ray emission in blue. Right: Chandra 20-year anniversary 3-channel X-ray image of the same region. The images have been astrometrically matched using point-like X-ray sources and the software package ALADIN. The Chandra image is rotated ∼ 15 deg clockwise relative to the others due to the ignorance of the lead author about the intricacies of ALADIN. As in Fig.13 in the main text, the red and blue dots show the positions of red and blue shifted single profiles; the green open rhombs mark positions of all the CO clumps identified by Indebetouw et al. in the giant molecular cloud 30Dor-10
|
1. Field of Invention
The present invention relates to an alarm system, and more particularly to a security device with built-in intercommunicated false alarm reduction control, which can optimize both the false alarm reduction performance and the security protection performance.
2. Description of Related Arts
It is reported that less than 5% of the triggered alarms are caused by actual illegal events. More than 90% of the triggered alarms are false alarms caused by the motion sensors and humans mis-operations. False alarms are the unsolved troubles to both the alarm companies and the police resources. Most alarm owners have the unpleasant experience of being awaken in mid-night by the alarm company due to false alarms. Moreover, unaccountable waste of time and police force have been suffered by most of the policemen. Before the policemen arrive at the scene, no one knows whether it is a false alarm or an actual alarm. Therefore, the local police resource charges the alarm owner a pretty high amount for a false alarm operation fee for each false alarm which causes a lot of complaints from users also. It creates a great burden to the limited police force in every city. In fact, millions of expenses have been wasted for the police resources in responding to the false alarms, that greatly degrades the efficiency and performance of the police. Accordingly, some of the police stations in this country consider abandoning such alarm response service. It will only be good news to all burglars. Therefore, how to effectively minimize the possibility of false alarm becomes an urgent topic to both the alarm users and the police resources.
As shown in FIG. 16, a verification process seems to be the only solution today wherein the alarm system provides a verification condition to delay the activation of the control plane so as to reduce the false alarm possibility. The verification process is performed when one of the motion sensors detects a trigger motion within a respective motion detecting area, a motion signal is delayed for a preset time period as a single zone delaying period to send to the control panel. Therefore, the control panel is activated to normally respond by activating the local warning system to produce warning signals when the same motion sensor that detected the trigger motion detects another motion in the same motion detecting area within the single zone delaying period. In other words, the motion sensor can only detect the trigger motion and sent the signal to the control panel such that the motion sensor is a one-way communication device that the motion sensors cannot intercommunicate with each other. Statistically, between year 2000 and 2002 when the alarm system incorporates with the verification process, the total false alarm reports were significantly reduced to 2% in comparison with the alarm system without the verification process.
However, since each building has its own interior structure, the single zone delaying period for each motion sensor must be preset correspondingly. When the motion sensor has a longer single zone delaying period, the false alarm possibility will be reduced. However, the security protection of the alarm system will also be reduced. In other words, when the motion sensor has a shorter single zone delaying period to enhance the security protection of the alarm system, the false alarm possibility will be highly increased.
In addition, when multiple zones are involved in the alarm system, another motion sensor is preset as a cross zone delaying period. However, the time frame of the cross zone delaying period is an unknown to optimize both the false alarm reduction and the security protection.
The conventional time zone setting for the multiple zone alarm system is that the cross zone delaying period is set as same as the single zone delaying period. However, such time zone setting not only highly increases the false alarm possibility but also reduces the security protection performance. In other words, the settings of the single zone delaying period and the cross zone delaying period are relied on the experienced technician.
|
Today I have sad news to share. After more than seven years of development, the company behind RethinkDB is shutting down. We worked very hard to make RethinkDB successful, but in spite of all our efforts we were ultimately unable to build a sustainable business. There is a lot of information to unpack – over the next few months, I’ll write about lessons learned so the startup community can benefit from our mistakes.
I just installed RethinkDB 2.3.5 on a new laptop and took a few minutes to slow down and play with the product. I’m very proud of what we built alongside our community – RethinkDB’s technology more often feels like magic, and I hope it will continue to play an important role in advancing the state of the art in database technology.
We’re working with members of our community to develop a continuity plan for RethinkDB and Horizon. Both projects will continue to be available, distributed under open source licenses. We hope to continue our open development process with a larger community of contributors.
We’d like your help to ensure RethinkDB’s future as an open-source project! We don’t have all of the details figured out, but we wanted to be as open as possible during this process. If you’re interested in contributing, please join us in the #open-rethinkdb channel of our public Slack group. You can expect to see development slow down in the meantime, but everything will continue to be available on rethinkdb.com and horizon.io. We will post updates on our blog and Twitter as we continue working things out.
With the company shutting down, we also wanted to find a new home for our team. We looked at a number of options, and were deeply impressed by Stripe – in particular, their commitment to building better developer tools, contributing to the open source community, and helping technology companies to scale faster and more effectively. We’re excited that the members of our engineering team will be joining Stripe, where we can put our expertise to work solving new problems and building infrastructure for developers around the world. Between now and when the team joins Stripe, they will help us with with our efforts to establish a sustainable future for RethinkDB as an independent open-source project.
Thank you for standing with us over the years.
|
Pete Samperi poses for a photo in the weight room at Stamford High School on Tuesday, June 19, 2012. Samperi is retiring this year from his position as Athletic Director for the school.
STAMFORD -- When Pete Samperi came to Stamford High School in 1977, one of his first jobs was to teach drivers' education.
"There were always exciting adventures, driving the wrong way down a one-way street and telling the student to go in the opposite direction," Samperi recalled with a chuckle.
It was perhaps fitting that, 19 years later, Samperi became the school's new athletic director, charged with making sure a vast sports program stayed on course and continued to grow.
Samperi by all accounts succeeded in his charge. He was beloved by the school's athletes, respected both by his coaching staff and colleagues throughout the FCIAC, and navigated the extremely difficult course of broadening the number of sports offerings during a time of budget cutbacks.
It was partially that last part, along with increased responsibilities and no support staff, that led Samperi, 64, to announce last fall that he would be retiring at the end of the school year.
Today is the last day on the job for Samperi, who despite long hours always considered his work at Stamford High School a labor of love.
"It has been 35 and a half years, and at the end it started getting more difficult for me because of all the demands," Samperi said. "The workload became too much, especially since I was doing it myself. There were a lot of nights where I would get home at around 11 and then get up early the next morning and do it again."
Jim Moriarty, who had been the Black Knights' boys basketball coach since 1978, will take over for Samperi. He has spent the spring shadowing Samperi to learn the many intricacies of the job, often behind-the-scenes desk work like ordering equipment and scheduling buses.
In the process, Moriarty said he has a greater appreciation for his former boss.
"I have a new respect for him, seeing all the things you have to do," Moriarty said. "Pete was a wizard with money. He was a calming influence within the athletic program. He was the kind of person who didn't want any notoriety for himself."
Moriarty won 445 games, with one state and one FCIAC title. The league crown came in 2009, a thrilling double overtime win over Trinity Catholic that Samperi said was the highlight of his tenure.
"It was overtime, the kids worked so hard because they wanted it so bad. You could see it on Chris Evans' face, he was so exhausted and still wanted it," said Samperi, referring to the leader of that Stamford team, who is currently playing at Sacred Heart.
Samperi was equally supportive of all sports, no matter where they ranked in popularity with the general public. His relationship with the players was best evidenced when the Stamford field hockey team won back to back state championships in 2007-2008.
During that first run, Samperi was watching a practice when Emily Powers, a starting defender, commented that she was so exhausted she needed a massage.
Samperi promised that if the team won the state title, he would buy massages for each player.
"With those girls, I remember the championships but I also remember what Emily said to me that day," Samperi said. "The day of the championship game cost me a lot of money. But they were just a great bunch of girls. I still don't understand the game, but I know we scored more goals than the other team and we won."
Two former Stamford football players are now playing professionally: Vlad Ducasse with the Jets and Alex Joseph with the Hamilton Tiger-Cats of the Canadian Football League.
"I read the newspaper to see how they are doing and when I can look for Vlad on TV," said Samperi, who was an assistant football coach for 13 years. "Being a former line coach I try to focus on him. I try to follow them as much as I can."
Sometimes the best part of the job were the simple pleasures: Samperi took a trip last winter to surprise and watch the consolidated Stamford girls ice hockey team. It happened to be the day of its first-ever varsity win.
"I will definitely miss a lot of people I worked with and a lot of people who played here," Samperi said.
As for his future plans, Samperi says, "I like to golf, fish and working around the house. I like to travel, and my wife is looking for places to go. On Friday I am going to try and stay in bed until 9, which is going to be an impossible task. I just want to do things that I want to do right now."
|
SANDY, Utah, Dec. 14, 2015 (Gephardt Daily) -- Johanna's Restaurant, a longtime fixture on South State Street in Sandy, was destroyed Monday in an early morning gas explosion.
SANDY, Utah, Dec. 14, 2015 (Gephardt Daily) — Johanna’s Restaurant, a longtime fixture on South State Street in Sandy, was destroyed Monday in an early morning gas explosion.
According to a spokesman for Sandy Fire Department, the building was nearly flattened shortly after midnight when a powerful blast ripped through the building at 9725 S. State St.
Witnesses told Gephardt Daily the explosion shook nearby businesses as flames shot from the building’s shattered windows.
Debris from the blast was found a mile away.
No one was injured in the explosion, but South State Street had to be closed until the site of the gas leak could be reached and repaired.
Fire investigators say it will be hours before traffic returns to normal.
(DEVELOPING)
|
<gh_stars>1-10
package com.baomidou.mybatisplus.test;
import org.junit.Assert;
import org.junit.Test;
import com.baomidou.mybatisplus.parser.SqlInfo;
import com.baomidou.mybatisplus.plugins.pagination.optimize.JsqlParserCountOptimize;
/**
* <p>
* 测试SqlUtils工具类
* </p>
*
* @author Caratacus
* @Date 2016-11-3
*/
public class SqlUtilsTest {
public SqlInfo jsqlParserCountSqlInfo(String sql) {
return new JsqlParserCountOptimize().optimizeSql(sql);
}
/**
* 测试jsqlparser方式
*/
@Test
public void sqlCountOptimize1() {
SqlInfo sqlInfo = jsqlParserCountSqlInfo(
"select * from user a left join (select uuid from user2) b on b.id = a.aid where a=1 order by (select 1 from dual)");
String countsql = sqlInfo.getSql();
boolean orderBy = sqlInfo.isOrderBy();
System.out.println(countsql);
System.out.println(orderBy);
Assert.assertFalse(orderBy);
Assert.assertEquals("SELECT COUNT(1) FROM user a LEFT JOIN (SELECT uuid FROM user2) b ON b.id = a.aid WHERE a = 1",
countsql);
}
/**
* 测试jsqlparser方式
*/
@Test
public void sqlCountOptimize2() {
SqlInfo sqlInfo = jsqlParserCountSqlInfo(
"select distinct * from user a left join (select uuid from user2) b on b.id = a.aid where a=1 order by (select 1 from dual)"
);
String countsql = sqlInfo.getSql();
boolean orderBy = sqlInfo.isOrderBy();
System.out.println(countsql);
System.out.println(orderBy);
Assert.assertFalse(orderBy);
Assert.assertEquals(
"SELECT COUNT(1) FROM ( SELECT DISTINCT * FROM user a LEFT JOIN (SELECT uuid FROM user2) b ON b.id = a.aid WHERE a = 1 ) TOTAL",
countsql);
}
/**
* 测试jsqlparser方式
*/
@Test
public void sqlCountOptimize3() {
SqlInfo sqlInfo = jsqlParserCountSqlInfo(
"select * from user a left join (select uuid from user2) b on b.id = a.aid where a=1 group by a.id order by (select 1 from dual)"
);
String countsql = sqlInfo.getSql();
boolean orderBy = sqlInfo.isOrderBy();
System.out.println(countsql);
System.out.println(orderBy);
Assert.assertTrue(orderBy);
Assert.assertEquals(
"SELECT COUNT(1) FROM ( SELECT * FROM user a LEFT JOIN (SELECT uuid FROM user2) b ON b.id = a.aid WHERE a = 1 GROUP BY a.id ORDER BY (SELECT 1 FROM dual) ) TOTAL",
countsql);
}
}
|
Water temperature prediction in sea cucumber aquaculture ponds by RBF neural network model Water temperature is considered as one of the most important parameters which influence the growth rate and development of sea cucumbers as well as their distribution within the pond environment. As the change process of water temperature is dependent on the complicated meteorological and geophysical conditions, artificial neural network with specific features such as non-linearity, adaptivity, generalization, and model independence will be a proper method for solving this problem. This paper presents a Radial Basis Function (RBF) neural network model based on nearest neighbor clustering algorithm and puts forward some improved methods aiming at looking for the defects of original algorithm, then integrated them into an optimization model and verified it on matlab platform. Finally, a comparison between RBF model and 1-D vertical model was made to confirm the excellent predictive performance of optimized RBF neural network model.
|
MIAMI (AP) — Outside Miami's criminal courthouse, he was known to many only as "Red" the panhandler, a distinctive character woven into the colorful fabric of the justice community, as much a fixture as attorneys, hot-dog carts and TV news trucks.
On the Internet, his wild, woolly and wall-eyed mugshot made him a briefly viral meme to be mocked or, oddly enough, the face of an online ad hawking a dubious blood-pressure cure.
In real life, he was a 34-year-old named Brett Heinzinger, a man whose only luck seemed bad. He was born to heroin addicts, heard his grandfather murdered as a child, got addicted to drugs as a young man and wound up in South Florida chasing his next cocaine score and living under an overpass.
He died here, too — run down by a motorist on a dark rainy January night, next to the courthouse.
"He hadn't been in contact with his family, and I offered to help him find them through Facebook. He thought it was cool, but he never followed back up," Kirlew said. "I had never taken the time to befriend the homeless before, and then I met Red. You realize how human they are, and how addiction hits people in different ways."
The family eventually moved to Virginia, where Heinzinger — diagnosed with attention deficit disorder — enrolled in special-education classes. Tall and chubby with one lazy eye, soft-spoken and polite, he was an easy target. "He has those wild eyes," James Heinzinger said. "He got a lot of mocking about that, even as a child."
He soon joined Job Corps, the federal vocational program for at-risk youth. That didn't last long. He headed to the streets.
"He was a good kid but he just didn't want anyone telling him what to do," Neforos said. "It was almost like he liked being homeless."
Nick Spill, a defense investigator at Miami's criminal courthouse, was browsing a British news site one day before work in December. His eyes wandered to the "click-bait" ads at the bottom of the page.
And there was a photo of Heinzinger, eyes red and askew, face seared pink from the sun, red beard full, hair atop his head not. He was the face for a site touting, "The 4 Worst Blood Pressure Drugs."
"I was like, 'How did this guy appear on here?' " Spill recalled.
The photo was a mugshot — he'd had dozens taken over the years — but this one, snapped in 2012, somehow went viral. It also wound up appearing on a website called "1000 Ugly People," with a cruel caption about his wandering eye: "I see you! And you, too."
The ad was for a Texas company called The Blood Pressure Solution, which hawks "natural" drug-free treatment way to lower blood pressure. The company did not return calls or emails about how they'd picked the photo or whether they'd tried to identify, contact or pay their model.
Told of the photo outside court days before he died, Heinzinger said he knew nothing of the ad or his meme before riding off on his bicycle.
Miami's criminal-justice complex — court, the main jail and offices of prosecutors and public defenders — lies in the heart of the city, wedged between the river and the sprawling blocks that house hospitals.
"Everybody here is like family," said 52-year-old Leonardo Fernandez, a homeless man who slept under the overpass next to Heinzinger, when not being chased off by police. "There's Wolf. That skinny guy is Steve. And Red. Everyone knew Red."
He was no stranger inside the jail or court either. In all, police arrested him 60 times since 2004, almost always for "aggressive panhandling." Most of the time, prosecutors gave him credit for jail time served or dropped the charges all together.
"We used to ask him to get out of the road so he wouldn't get hit, and he would nod his head, give a little salute and get off the street," said traffic homicide Detective Joseph Kennedy. "We never had a problem."
Even if courthouse regulars didn't really know Heinzinger, many knew of him. He was Red. Homeless, not faceless.
Lydia Martinez, a probation officer based in court, knew him only by sight.
"He counted as a person. He was a human being. He was born somebody's baby," Martinez said. "We remember Red. We'll always remember him."
|
Q:
When SE unilaterally alters an author's name to "user123xxx", isn't it breaching its licence?
A user recently left English.SE in dissatisfaction with other users' behaviour, and he asked SE to delete both his English.SE account and all of the work he had posted to that subsite. But while SE deleted his account, it has continued to distribute his work, now attributed not to the original author handle but to a generic author name of its choosing, namely "user" followed by a string of digits.
I am told that the following sequence of events is "normal" here and has happened with thousands of pieces of work:
an angry user quits, asking for his account to be deleted
the user conveys a wish for SE to stop using the work he has contributed, and he may himself try to delete it or replace it with "deleted" notices
SE deletes his account, but it continues to distribute the work, attributed to a new author name that it creates for the purpose.
Surely this usage is a breach of the licence that SE receives when a user accepts the terms of service, namely the Creative Commons Attribution Share Alike licence? That licence states:
"[4c] If you Distribute [...] the Work [...], You must provide [...] the name of the Original Author (or pseudonym, if applicable) if supplied"
A:
We do not conduct "partial" deletions here - a deletion is full and removes all traces of "you" as a person from our system, which includes your display name, because that's exactly how deletion is supposed to work. Deletion is meant for users who do not want any identifying details about them on our site anymore. Thus, a request to have your profile deleted is inherently a request to disassociate all of your posts as well, and we tell users that when they try to delete their profile.
Further, if you have at least 1,000 reputation on the site, the automated system will kick you out and require one of us to look at the request and verify that you really want to delete your profile. We send a standard email which does a few things:
Asks for the specific instance that caused this, in case we can resolve the issue.
Clarifies the implications of deleting your profile again.
Gives you instructions on how to proceed.
I'm sorry to hear that you wish to have your profile deleted. May I ask if there was a specific incident that led to this decision? Is there anything we can help resolve?
I also want to take a moment to clarify the implications of profile deletion. Deletion is pretty much irreversible, and you will have no way to regain any of your original content, should this deletion be carried out and you change your mind later on. Your questions and answers will remain on the site, but will be disassociated and anonymized (the author will be listed as "usernnnnn") and will not indicate your authorship even if you later return to the site.
If you are sure you would like your profile to be deleted, I will just need to verify your ownership of it. To do this, please edit your profile and modify the 'About Me' section to contain the words 'delete me', then send us a link to the profile to verify your request.
Please let us know how you'd like to proceed or if there are any concerns we can address before you make this decision.
Those users who are truly against losing their association to the content they've created will opt out of deletion at this point and do the more logical thing - just stop using the site. Because, again, deletion is for removing every detail about you, and not for quitting but still somehow keeping everything you posted connected to you anyways.
But even if the user does go through with the deletion, we still try to maintain some semblance of attribution by using the user's ID number in the display name. Since the display name is no longer provided, we have to revert to alternate means, and the user ID is a unique value that can still identify that "someone who had this ID number but is no longer on our site is the person who posted this." This is quite different than a normal disassociation request where we would manually remove a user's name from a post, which leaves the name on the post simply as "anon" with absolutely no information about who the author might have been.
|
<filename>models/HostType6Enum.go
package models
import(
"encoding/json"
)
/**
* Type definition for HostType6Enum enum
*/
type HostType6Enum int
/**
* Value collection for HostType6Enum enum
*/
const (
HostType6_KLINUX HostType6Enum = 1 + iota
HostType6_KWINDOWS
HostType6_KAIX
HostType6_KSOLARIS
)
func (r HostType6Enum) MarshalJSON() ([]byte, error) {
s := HostType6EnumToValue(r)
return json.Marshal(s)
}
func (r *HostType6Enum) UnmarshalJSON(data []byte) error {
var s string
json.Unmarshal(data, &s)
v := HostType6EnumFromValue(s)
*r = v
return nil
}
/**
* Converts HostType6Enum to its string representation
*/
func HostType6EnumToValue(hostType6Enum HostType6Enum) string {
switch hostType6Enum {
case HostType6_KLINUX:
return "kLinux"
case HostType6_KWINDOWS:
return "kWindows"
case HostType6_KAIX:
return "kAix"
case HostType6_KSOLARIS:
return "kSolaris"
default:
return "kLinux"
}
}
/**
* Converts HostType6Enum Array to its string Array representation
*/
func HostType6EnumArrayToValue(hostType6Enum []HostType6Enum) []string {
convArray := make([]string,len( hostType6Enum))
for i:=0; i<len(hostType6Enum);i++ {
convArray[i] = HostType6EnumToValue(hostType6Enum[i])
}
return convArray
}
/**
* Converts given value to its enum representation
*/
func HostType6EnumFromValue(value string) HostType6Enum {
switch value {
case "kLinux":
return HostType6_KLINUX
case "kWindows":
return HostType6_KWINDOWS
case "kAix":
return HostType6_KAIX
case "kSolaris":
return HostType6_KSOLARIS
default:
return HostType6_KLINUX
}
}
|
1. Field of the Invention
The present invention relates to a recording apparatus for use with an optical disc or the like, a recording method thereof, and a disc-shaped recording medium.
2. Description of the Related Art
Disc-shaped record mediums (for example, DVDs) can be categorized as rewritable mediums (DVD+RW) and read-only mediums (DVD-ROM) depending on their characteristics. Since their physical formats are similar, it is preferable to allow a DVD-ROM drive to reproduce data from a DVD+RW disc. There are differences between the DVD+RW drive and the DVD-ROM drive in a spindle servo signal and a method for obtaining a position signal (address) of a medium. The DVD+RW disc has a wobbling groove. The DVD+RW drive obtains a position signal from a reproduced signal of the wobbling groove. In contrast, the DVD-ROM disc does not have such a wobbling groove. The DVD-ROM drive obtains a position signal from a frame synchronous signal and an address signal reproduced from the DVD-ROM disc.
To allow the DVD-ROM drive to reproduce data from the DVD-RW disc, a frame synchronous signal and a position signal are placed in data of the DVD+RW disc. However, since the DVD+RW disc has a non-recorded portion before or after recorded data, it is difficult for the DVD-ROM drive to reproduce data from the DVD+RW disc. In reality, since the DVD-ROM drive cannot reproduce the frame synchronous signal from the DVD+RW disc, the DVD-ROM cannot stably operate the spindle servo and perform the seek operation for reading a desired sector from the DVD+RW disc.
The seek operation is performed in a combination of a coarse seek operation and a fine seek operation. In the coarse servo operation, many tracks are jumped at a time. On the other hand, in the fine servo operation, a desired sector is acquired in the vicinity of a target position. Due to the eccentricity of the disc, when the seek operation is performed in the fine servo operation, a deviation of several ten tracks to several hundred tracks normally takes place. If the jumped position is a non-recorded area, the target track cannot be acquired. Thus, when the seek operation is performed, data containing a frame synchronous signal and a position signal should have been recorded in the vicinity of the target sector.
Thus, to allow the DVD-ROM drive to reproduce data from the DVD+RW disc, dummy data should have been recorded before or after recorded data on the DVD+RW. To do that, a process referred to as a finalizing process is performed. The finalizing process can be performed in the following two methods.
As the first method, a file system is analyzed. Generally, a file system has a space bit map for allocating a user area. A UDF system that is often used for DVD discs has a space bit map and information that represents whether or not each entry of each file has been recorded. Thus, when the file system is analyzed, a position of user data (namely, a position to which dummy data should be written) can be obtained. This method is performed by an application program of a host computer.
As the second method, a blank area is detected. In this method, all blocks of the DVD+RW disc are read. When a block can be read, it is treated as a recorded block. On the other hand, when a block cannot be read, the hardware of the drive determines whether an RF signal is absent (namely, data has been recorded) or data that has been recorded cannot be reproduced. When the RF signal cannot be obtained, since data has not been recorded, dummy data is recorded. Even if the RF signal is obtained, when data cannot be read, the drive determines whether the relevant block is unchanged or dummy data is overwritten depending on the amount of an ECC error or the like.
The first method (for analyzing a file system for use) can be effectively performed as long as the number of directories/files is small. However, when the number of directories/files is as large as several thousands, it takes a long time to perform the process. Thus, this method is not effective. In the file system other than the UDF system, this method cannot be used because available information is limited to allocation information. In other words, depending on a file system for use, the feasibility of this method is restricted. On the other hand, the second method (for detecting a blank area) can be used regardless of a file system for use. However, since all blocks of the disc should be read, it takes a long time to perform the process.
Other than the above-described two methods, when a disc is formed, a certificating process may be required. In the certificating process, a certification pattern is recorded on the entire disc. By reproducing the data, it is determined whether or not there is a defect on the disc. Thus, when the certification pattern is recorded on the entire surface, since non-recorded areas are absent, the finalizing process is not required. However, since the storage capacity of the DVD+RW disc is large, it takes around one hour to perform the certificating process. Thus, since this method is not effective, it is improper to require the user to perform the certificating process.
|
Adenosine triphosphatase, a new marker for the differentiation of putative precancerous foci induced in rat pancreas by azaserine. Enzyme-histochemical investigation of pancreatic carcinogenesis in male Wistar rats treated at the age of 19 days by a single dose of 30 mg azaserine/kg body wt led to the detection of a new 'marker' for the recognition of foci of atypical acinar cells: the Mg2+-dependent ATPase. The two well-known populations of pancreatic atypical acinar cell foci, classified histologically as basophilic and acidophilic foci, showed a decreased and strongly increased ATPase reaction, respectively. The enhanced enzyme activity of the acidophilic foci has been characterized as unspecific nucleoside polyphosphatase. To validate the new marker, comparative quantitative evaluation was performed on haematoxylin and eosin-stained paraffin sections and ATPase-stained cryostat sections of the same pancreata of 25 azaserine-treated rats. Evaluation of basophilic ATPase-deficient foci of small diameter was more reproducible in haematoxylin and eosin-stained sections, while small acidophilic strongly ATPase-positive foci could be detected more reliably by the ATPase staining technique. The number of foci/cm3 pancreas was similar for both staining techniques above a focus diameter of about 100 microns for basophilic foci and 200 micronfor acidophilic foci. There were more acidophilic than basophilic foci/cm3 pancreas, and the acidophilic foci had significantly larger mean focal diameters than the basophilic foci. Together with the strong acidophilic staining of the latter emerging adenoma, this suggests that the acidophilic foci represent a neoplastic cell population progressing eventually to pancreatic carcinoma. The new 'marker' enzyme ATPase may greatly facilitate further investigations into the role of these putative preneoplastic lesions in pancreatic carcinogenesis.
|
Transverse fluctuations of grafted polymers We study the statistical mechanics of grafted polymers of arbitrary stiffness in a two-dimensional embedding space with Monte Carlo simulations. The probability distribution function of the free end is found to be highly anisotropic and non-Gaussian for typical semiflexible polymers. The reduced distribution in the transverse direction, a Gaussian in the stiff and flexible limits, shows a double peak structure at intermediate stiffnesses. We also explore the response to a transverse force applied at the polymer free end. We identify F-Actin as an ideal benchmark for the effects discussed. Healthy cells require an efficient and complex transport network to carry out the overwhelming number of tasks that are needed to accomplish their function. This network, also known as the cytoskeleton, is formed primarily by filaments (actin filaments, microtubules and intermediate filaments), linked together by a large collection of accessory proteins. A complete description of the structural and mechanical properties of these filaments is therefore essential in order to unveil the mechanical properties of the entire cell. Advances in the field have been significantly promoted by a unique set of optical and mechanical techniques which allow to visualize and manipulate single cytoskeletal filaments and DNA. Fluorescence videomicroscopy and nano-manipulation can be conveniently used to obtain quantities as the distribution function of the end-to-end distance or the mechanical response to an external force in great detail and at the single molecule level. These quantities are amenable to a direct comparison with theoretical models. The main material parameter in the description of a polymer filament is its persistence length, ℓ p. It is defined as the typical length over which correlations of the tangent vectors of the filament contour decay. Polymers are considered to be flexible when their persistence length is small compared to their total length L, or t := L/ℓ p 10. In this limit, they can be well described by the minimal model of the Gaussian Chain. Polymers of biological importance, e.g. F-actin, are often semiflexible, meaning that their persistence length is comparable to their total length. While flexible polymers are dominated by entropic effects, the statistical mechanics of semiflexible polymers is strongly affected by their bending energy and the close vicinity of the classical Euler instability for buckling a rigid beam. The distribution function P ( R) of the end-to-end vector R, a simple Gaussian for a flexible polymer, is peaked towards full stretching and is completely non-Gaussian. The mechanical response of a semiflexible polymer is highly anisotropic, depending on the direction in which the force is applied. These findings result in bulk properties of solutions and networks that are completely different from the isotropic elasticity of flexible polymer solutions. In addition, the inextensibility constraint becomes crucial in determining the approach to full stretching upon the application of a force f, as reported by Marko and Siggia for double-stranded DNA. Here we investigate the mechanical and statistical properties of a single chain grafted at one end, a problem of direct relevance for force generation in cellular systems. The other end is either free, or subject to a constant transverse force, whose magnitude extends into the non-linear regime. We restrict ourselves to a two-dimensional embedding space, since in most experiments, fluctuations in one direction are severely restricted, or cannot be observed. The generalization to a three-dimensional space is straightforward and will be reported elsewhere. We refer to the Wormlike Chain Model (WLC) introduced by Kratky and Porod. In this framework, a polymer conformation is represented by a succession of N segments t i, whose direction is tangent to the polymer contour at the ith segment. Since the polymer is assumed to be inextensible, all segments t i have a prescribed length a = L/N. The Hamiltonian is given by: where is the energy associated to each bond and f is a force eventually applied to the second end. It is also possible to define a continuum limit for a → 0, N → ∞, with Na = L and = a 2 /N held fixed. The Hamiltonian in Eq. 1 is then equivalent to the following functional : where = L and t(s) is the tangent vector of the space curve r(s) parametrized in terms of the arc length s. The inextensibility of the filament is imposed by the local constraint t(s) = 1. The continuous version of the wormlike chain has been successfully used to obtain various statistical quantities, as the tangent-tangent correlation function or moments of the end-to-end distance distribution. It has been recently used to obtain the radial distribution function, and force-extension relations. We have developed a Monte Carlo simulation to investigate the behavior of a semiflexible polymer in the proximity of the limit t → 1. The rationale behind this choice is the search for clear hallmarks of the onset of the "semiflexible" nature of a filament. In this intermediate limit, analytical results are difficult to obtain: typical approximation schemes that build on either Gaussian chains or rigid rods are outside their validity range; hence, computer simulations become crucial. The first end of the filament is assumed to be clamped, i.e. the orientation of its tangent vector is held fixed along a direction, named the x-axis. The second end is left free to assume any possible orientation. The initial configuration has been randomly chosen in the proximity of the full stretching condition, thus ensuring a fast convergence to equilibrium. A new configuration is generated by changing the orientation of one segment and accepted according to the standard Metropolis algorithm and the discrete Hamiltonian, Eq. 1. Effects resulting from self-avoidance are not considered, but we notice that configurations where the chain folds back onto itself are strongly energetically suppressed for sufficiently stiff polymers. Results ceased to depend on the number of segments for N = 50. On the order of 10 6 Monte Carlo steps per segment were performed, and results were averaged over different runs, obtaining a perfect agreement between measured expectation values of the end-to-end distance R 2 and R 4 with known exact expressions. The radial distribution function was calculated and coincided with the analytic results in within the accuracy thereby reported. Here we are interested in the probability distribution function P (x, y) of the free end in the plane determined by the direction of the clamped end (x-axis) and the transverse one (y-axis). This quantity is directly accessible to experiments allowing for a quantitative comparison with our predictions. We will also consider the reduced distribution functions P (x) and P (y), obtained by integrating P (x, y) over the variables y and x, respectively. It is important to notice that when both ends are free, the radial distribution function is rotationally invariant and is therefore only a function of the distance R between the ends. Clamping one end breaks rotational symmetry and leads to distinctly different longitudinal and transverse distribution functions, P (x) and P (y). Nonetheless, the broken rotational symmetry does not affect the total energy of the configuration. This implies, and is in fact confirmed by our simulations (data not shown), that the longitudinal distribution function P (x) coincides with the radial distribution function P (R) of the end-to-end distance, apart from a constant normalization factor. The characteristic feature of this function is a crossover from a universal Gaussian shape centered at the origin with a characteristic width determined by the radius of gyration, to yet another universal shape, whose peak is shifted towards full stretching and whose width is determined by a new longitudinal length scale L ∝ L 2 /ℓ p. This has to be contrasted with the transverse distribution function. Not surprisingly, given the intrinsic isotropy of flexible polymers, the distribution P (y) is a Gaussian and identical to P (x) for high values of t. In the stiff limit, P (y), at variance with P (x), is again a Gaussian centered at y = 0, whose width is now given by a new transverse length scale L ⊥ = 2L 3 /3ℓ p. (flexible side), the Gaussian peak is first smeared out into an intrinsically non-Gaussian flat distribution (see Fig. 1a). At t = 2.8 (see inset), the distribution contains three local maxima, but as t is decreased, the central peak at y = 0 loses weight to the two symmetric peaks off the x axis. The double-peak structure is most pronounced around t ≈ 1.5, i.e. L ≈ 1.5ℓ p. As the stiffness is increased, P (y) recovers its flat structure, as shown in Fig. 1b. Notice also (inset of Fig. 1b) that at t = 0.75 the two peaks start to compete with a growing peak centered at y = 0, such that one finds a triple maxima shape again. Although intrinsically non-Gaussian, this central peak will eventually tend to a Gaussian distribution in the stiff limit. The re-entrance from the double peak structure to a flat distribution is a genuine 5 hallmark of semiflexibility. This effect cannot be explained by analytical calculations using a harmonic (or weakly bending rod) approximation, whose prediction for P (y) would be a Gaussian centered at 0. Higher order cumulant expansions about a Gaussian distribution have also failed to provide a fast convergence to our P (y). An entirely analytical solution can be provided by the eigenfunction approach described in for persistent random walks, although the connection to our probability distributions would only be numerical. Finally, let us emphasize that the double-peak structure of P (y) does not indicate a bistability in the constant force ensemble. As shown below, linear response theory leads to positive force constants in this regime. What actually happens under the application of an external force is that the distribution function becomes asymmetric and weight is shifted from one peak to the other. In an experimental setting with a fixed transverse distance y and a correspondingly adjusting force, one would probe P (y) directly and be able to observe a kind of "bistability". Further insight can be gained by the inspection of the joint distribution function P (x, y), represented with density plots in Fig. 2. In the stiff limit, P (x, y) should be confined to the classical contour obtained by applying the elasticity equations to a rigid rod. This contour can be approximated by a parabola in the proximity of full stretching and is obtained through elliptic functions for any deformation. In Fig. 2a the classical contour coincides with the ridge of the probability distribution function. As we relax the stiffness, thermal fluctuations will make the tip of the filament explore the configuration space in the vicinity of the classical contour. Roughly speaking, transverse (bending) fluctuations enhance fluctuations along the classical contour and shift weight from the center to the upper and lower wings in Fig. 2a-b. In contrast, longitudinal fluctuations widen the distribution function perpendicular to the classical contour. Since for a semiflexible polymer, the corresponding lengths L and L ⊥ scale differently (transverse fluctuations are much "softer" than longitudinal ones), upon lowering the stiffness P (x, y) gains more weight in the wings rather than in the center. It is precisely this effect that gives rise to the double peak distribution, when P (x, y) is projected in the transverse direction (see Fig. 2b). Eventually, in the flexible limit, where transverse and longitudinal fluctuations become comparable, P (x, y) is spread so as to cover almost all the available space (Fig. 2c), before the isotropic Gaussian distribution is recovered (Fig. 2d). We have also explored the transverse response of semiflexible polymers by applying a constant force f in the transverse direction. The effect of a small applied force on the average end-to-end distance (or force extension relation) has been studied within linearresponse in. In this work, we will consider the effect of an external transverse force of arbitrary magnitude on the average position x f and y f of the free end. In general, we expect y f to have the same parity of the applied force, and hence to be odd, while x f should not depend on the sign of the force and hence should be even. In the continuum limit, it is possible to write down the exact expressions for x f and y f and to show that the expected parities hold on very general grounds and that the response of the longitudinal extension to a transverse force is intrinsically nonlinear in the small force regime. Monte Carlo simulations confirm these predictions, as shown in Fig. 3. The response in the direction of the clamped end is even in f and it can be approximated by a parabola centered on the f = 0 axis. The response in the transverse direction is odd in f and shows the same re-entrance phenomenon reported in for the linear response coefficient. Note that while in the case of a longitudinal force, the approach towards full stretching (or saturation) can be calculated within the weakly bending rod approximation, this is no longer true for transverse forces. The position of the free end can be calculated from classical elasticity theory and expressed by means of elliptic functions. Only in the high force regime or in the stiff limit, when fluctuations become unimportant, results from our 7 simulations coincide with classical elasticity theory. The effects hereby reported are amenable to a direct comparison with experiments regarding cytoskeletal filaments, or even DNA. For instance, optical systems might be used to get the x or y projection of the radial distribution function for a particular class of semiflexible polymers. For F-Actin with ℓ p ≈ 16 m, the double peak effect should be well visible for a range of lengths, 12 m L 43 m. In this parameter range the difference between the central relative minimum and the double peaks maxima results in 10% of the total length (see Fig. 1), in the range 1 4 m that is well above the experimental precision of 0.05 m reported by. Hence F-Actin would provide an ideal benchmark for the effects we report. We emphasize that the double peak structure is a clear hallmark of semiflexibility and hence 8 it might be used to obtain a rough estimate of the persistence length of a particular polymer filament, as for instance the nanometer sized stalks of kinesins and myosins. In summary, we have presented evidence from extensive Monte Carlo simulations that the parameter region corresponding to semiflexible polymers is hallmarked by the appearance of a series of effects in the radial distribution function and in the response of the clamped polymer to an external transverse force. A semiflexible polymer shows a distinct anisotropy in the probability distribution function of the free end along the direction of the clamped end. At intermediate stiffness, L ≈ ℓ p, the distribution function shows a pronounced double peak structure in the transverse direction. Semiflexible polymers have been previously reported to be anisotropic objects, i.e. to respond in different ways to forces applied in the clamping or transverse direction. Here we have shown that even their response to a force along the transverse direction alone is intrinsically anisotropic, being linear in the transverse direction and non-linear along the direction of the clamped end in the small force regime. We acknowledge helpful discussions with P. Benetatos
|
<reponame>valentin5135/kpi-embedded-linux-course<filename>dk72_shlikhta/lab_0/pthread.c
#include <stdio.h>
#include <stdint.h>
#include <pthread.h>
#include <stdlib.h>
#define SUCCESS 0
uint32_t GlobalVar = 0;
struct stSomeArgs{
uint8_t step;
uint32_t amount;
};
/**
* Function which just increase <GlobalVar> by <step> <amount> times
* @param args Structure which contain all arguments for foo(step and amount)
*/
void* foo(void * args)
{
struct stSomeArgs * tmp = (struct stSomeArgs*) args;
for(uint32_t i = 0; i < tmp->amount; i++)
GlobalVar += tmp->step;
return 0;
}
enum enumStatus{
OK = 0,
COUDNT_CREATE_THREAT_1,
COUDNT_CREATE_THREAT_2,
COUDNT_JOIN_THREAT_1,
COUDNT_JOIN_THREAT_2,
WRONG_ARGUMENTS
};
int main(int argc, const char* argv[])
{
struct stSomeArgs args;
enum enumStatus ExitStatus = OK;
// we take arguments from comand line's arguments
if(argc == 3) {
args.step = atoi(argv[1]);
args.amount = atoi(argv[2]);
}
if(!(args.step && args.amount) || argc != 3) {
printf("Usage:\n\t./thread <step> <amount>\n");
ExitStatus = WRONG_ARGUMENTS;
goto fail;
}
int status_addr;
int status;
pthread_t thread_1;
pthread_t thread_2;
status = pthread_create(&thread_1, NULL, foo, (void*) &args);
if(status != 0) {
ExitStatus = COUDNT_CREATE_THREAT_1;
goto fail;
}
status = pthread_create(&thread_2, NULL, foo, (void*) &args);
if(status != 0) {
ExitStatus = COUDNT_CREATE_THREAT_2;
goto fail;
}
status = pthread_join(thread_1, (void**)&status_addr);
if(status != 0) {
ExitStatus = COUDNT_JOIN_THREAT_1;
goto fail;
}
status = pthread_join(thread_2, (void**)&status_addr);
if(status != 0) {
ExitStatus = COUDNT_JOIN_THREAT_2;
goto fail;
}
printf("Expected GlobalVar is %d\n", args.step * args.amount * 2);
printf("Real GlobalVar is %d\n", GlobalVar);
return 0;
fail:
exit(ExitStatus);
}
|
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __javax_swing_colorchooser_DefaultHSBChooserPanel__
#define __javax_swing_colorchooser_DefaultHSBChooserPanel__
#pragma interface
#include <javax/swing/colorchooser/AbstractColorChooserPanel.h>
#include <gcj/array.h>
extern "Java"
{
namespace java
{
namespace awt
{
class Container;
class Graphics;
class Image;
class Point;
}
}
namespace javax
{
namespace swing
{
class Icon;
class JColorChooser;
class JLabel;
class JPanel;
class JRadioButton;
class JSlider;
class JSpinner;
namespace colorchooser
{
class DefaultHSBChooserPanel;
}
}
}
}
class javax::swing::colorchooser::DefaultHSBChooserPanel : public ::javax::swing::colorchooser::AbstractColorChooserPanel
{
public: // actually package-private
DefaultHSBChooserPanel();
public:
virtual ::java::lang::String * getDisplayName();
virtual void updateChooser();
public: // actually protected
virtual void buildChooser();
public:
virtual void uninstallChooserPanel(::javax::swing::JColorChooser *);
private:
::java::awt::Container * buildRightPanel();
public:
virtual ::javax::swing::Icon * getSmallDisplayIcon();
virtual ::javax::swing::Icon * getLargeDisplayIcon();
virtual void paint(::java::awt::Graphics *);
private:
void updateHLockImage();
void updateBLockImage();
void updateSLockImage();
public: // actually package-private
virtual void updateImage();
private:
void updateTextFields();
public: // actually package-private
virtual void updateSlider();
virtual void updateTrack();
private:
void updateHTrack();
void updateSTrack();
void updateBTrack();
JArray< jfloat > * getHSBValues();
public: // actually package-private
::java::awt::Image * __attribute__((aligned(__alignof__( ::javax::swing::colorchooser::AbstractColorChooserPanel)))) gradientImage;
private:
::javax::swing::JPanel * gradientPanel;
public: // actually package-private
::java::awt::Image * trackImage;
private:
::javax::swing::JPanel * trackPanel;
public: // actually package-private
::javax::swing::JSlider * slider;
::javax::swing::JRadioButton * hRadio;
::javax::swing::JRadioButton * sRadio;
::javax::swing::JRadioButton * bRadio;
::javax::swing::JSpinner * hSpinner;
::javax::swing::JSpinner * sSpinner;
::javax::swing::JSpinner * bSpinner;
private:
static const jint imgWidth = 200;
static const jint imgHeight = 200;
static const jint trackWidth = 30;
static ::javax::swing::JLabel * R;
static ::javax::swing::JLabel * G;
static ::javax::swing::JLabel * B;
::javax::swing::JLabel * rFull;
::javax::swing::JLabel * gFull;
::javax::swing::JLabel * bFull;
public: // actually package-private
::java::awt::Point * gradientPoint;
jboolean internalChange;
jboolean spinnerTrigger;
jint locked;
static const jint HLOCKED = 0;
static const jint SLOCKED = 1;
static const jint BLOCKED = 2;
jboolean handlingMouse;
public:
static ::java::lang::Class class$;
};
#endif // __javax_swing_colorchooser_DefaultHSBChooserPanel__
|
Gazing Inward in Support of Critical Scientific Literacy The end of the year 2019 and the dawn of a new decade were heralded by the devastating impact of COVID-19. This insidious and deadly virus continues to unmask two intertwined and dreadful truths worldwide: 1. The abundant lack of scientific literacy among politicians and the general public, and 2. How systemic racism (and its intersections with class, gender, and other sociopolitical barriers) continues to fuel social injustice and violence against Afrodescendants, Latinos/as, Indigenous Peoples and other Peoples of Color. We argue that these truths are intertwined because opportunities for an equitable educationand for equitable science education, specificallyare essential for producing a scientifically literate population. To be clear, herein, we do not subscribe to neoliberal and economics-oriented notions of scientific literacy. On the contrary, we argue against these dangerous views of perceiving human beings merely as a skilled workforce to serve the greed of the few. We maintain that critical scientific literacy provides individuals with the knowledge and agency to not only enact well-informed everyday actions but to expect (demand) that others do the same. For example, scientifically literate individuals seek to elect and demand that their public officials take sound and defensible action to protect the collective (cultural and physical) welfare of their families, their local communities, and the global community at large. In short, scientifically literate individuals are deeply aware of our interdependence and the need to work together to protect our shared planet. More specifically, a scientifically literate population is critically cognizant of how science has been (and is being) used and abused to oppress marginalized populations, including communities of color, especially those living in or near poverty. This critical awareness enables individuals to acknowledge, for example, how the power of science has been used to falsely construct race as a biological construct, as opposed to a social one. Therefore, scientifically literate individuals know that through science, race and racism have been used throughout history as it is being used todayas a tool for subjugating the Other and for entrenching power and privilege by those with the political and social power to do so. For instance, clinical trials in science are stained by the racist history of the Tuskegee Syphilis Study in the US. This era in scientific history remains insufficiently addressed in classrooms and society at large, as we can still observe in the level of mistrust among Peoples of Color who refused to participate in clinical trials or take freely available vaccines against COVID-19. In the same light, a scientifically literate person has the historical knowledge and cultural awareness to reject altruistic and romantic notions of science as a pure profession devoid of all of the shortcomings of the very human beings that
|
'''
Convert Google Code .wiki files into .tex formatted files.
Output is designed to be included within a larger TeX project, it is
not standalone.
'''
import sys
import re
import codecs
print(sys.argv)
'''
A "rule" is a begin tag, an end tag, and how to reformat the inner text
(function)
'''
def encase(pre, post, strip=False):
"""Return a function that prepends pre and postpends post"""
def f(txt):
if strip:
return pre + txt.strip() + post
else:
return pre + txt + post
return f
def constant(text):
def f(txt):
return text
return f
def encase_with_rules(pre, post, rules, strip=False):
def f(txt):
if strip:
return pre + apply_rules(txt, rules).strip() + post
else:
return pre + apply_rules(txt, rules) + post
return f
def encase_escape_underscore(pre, post):
def f(txt):
txt = sub(r'_', r'\_', txt)
return pre + txt + post
return f
def sub(pat, repl, txt):
"""Substitute in repl for pat in txt, txt can be multiple lines"""
return re.compile(pat, re.MULTILINE).sub(repl, txt)
def process_list(rules):
def f(txt):
txt = ' *' + txt # was removed to match begin tag of list
res = '\\begin{itemize}\n'
for ln in txt.split('\n'):
# Convert " *" to "\item "
ln = sub(r'^ \*', r'\\item ', ln)
res += apply_rules(ln, rules) + '\n'
res += '\\end{itemize}\n'
return res
return f
def process_link(rules):
def f(txt):
lst = txt.split(' ')
lnk = lst[0]
desc = apply_rules(' '.join(lst[1:]), rules)
if lnk[:7] == 'http://':
desc = apply_rules(' '.join(lst[1:]), rules)
return r'\href{' + lnk + r'}{' + desc + r'}'
if len(lst) > 1:
return r'\href{}{' + desc + r'}'
return r'\href{}{' + lnk + r'}'
return f
# Some rules can be used inside some other rules (backticks in section names)
link_rules = [
['_', '', constant(r'\_')],
]
section_rules = [
['`', '`', encase_escape_underscore(r'\texttt{', r'}')],
]
item_rules = [
['`', '`', encase(r'\verb|', r'|')],
['[', ']', process_link(link_rules)],
]
# Main rules for Latex formatting
rules = [
['{{{', '}}}', encase(r'\begin{lstlisting}[language=c++]', r'\end{lstlisting}')],
['[', ']', process_link(link_rules)],
[' *', '\n\n', process_list(item_rules)],
['"', '"', encase("``", "''")],
['`', '`', encase(r'\verb|', r'|')],
['*', '*', encase(r'\emph{', r'}')],
['_', '_', encase(r'\emph{', r'}')],
['==', '==', encase_with_rules(r'\section{', r'}', section_rules, True)],
['=', '=', encase_with_rules(r'\chapter{', r'}', section_rules, True)],
['(e.g. f(x) -> y and f(x,y) -> ', 'z)', constant(r'(e.g. $f(x)\to y$ and $f(x,y)\to z$)')],
]
def match_rules(txt, rules):
"""Find rule that first matches in txt"""
# Find first begin tag
first_begin_loc = 10e100
matching_rule = None
for rule in rules:
begin_tag, end_tag, func = rule
loc = txt.find(begin_tag)
if loc > -1 and loc < first_begin_loc:
first_begin_loc = loc
matching_rule = rule
return (matching_rule, first_begin_loc)
def apply_rules(txt, rules):
"""Apply set of rules to give txt, return transformed version of txt"""
matching_rule, first_begin_loc = match_rules(txt, rules)
if matching_rule is None:
return txt
begin_tag, end_tag, func = matching_rule
end_loc = txt.find(end_tag, first_begin_loc + 1)
if end_loc == -1:
sys.exit('Could not find end tag {0} after position {1}'.format(end_tag, first_begin_loc + 1))
inner_txt = txt[first_begin_loc + len(begin_tag) : end_loc]
# Copy characters up until begin tag
# Then have output of rule function on inner text
new_txt_start = txt[:first_begin_loc] + func(inner_txt)
# Follow with the remaining processed text
remaining_txt = txt[end_loc + len(end_tag):]
return new_txt_start + apply_rules(remaining_txt, rules)
def split_sections(contents):
"""Given one string of all file contents, return list of sections
Return format is list of pairs, each pair has section title
and list of lines. Result is ordered as the original input.
"""
res = []
cur_section = ''
section = []
for ln in contents.split('\n'):
if len(ln) > 0 and ln[0] == '=':
# remove = formatting from line
section_title = sub(r'^\=+ (.*) \=+', r'\1', ln)
res.append((cur_section, section))
cur_section = section_title
section = [ln]
else:
section.append(ln)
res.append((cur_section, section))
return res
def filter_sections(splitinput, removelst):
"""Take split input and remove sections in removelst"""
res = []
for sectname, sectcontents in splitinput:
if sectname in removelst:
pass
else:
res.extend(sectcontents)
# convert to single string for output
return '\n'.join(res)
def main():
infile = codecs.open(sys.argv[1], encoding='utf-8')
outfile = codecs.open(sys.argv[2], mode='w', encoding='utf-8')
contents = infile.read()
# Remove first three lines
contents = '\n'.join(contents.split('\n')[3:])
# Split sections and filter out some of them
sections = split_sections(contents)
contents = filter_sections(sections, ['Introduction', 'Prerequisites', 'Simple Example'])
# Convert to latex format
contents = apply_rules(contents, rules)
infile.close()
outfile.write(contents)
outfile.close()
return 0
if __name__ == '__main__':
sys.exit(main())
|
The 177th Fighter Wing again demonstrated its commitment to excellence during a recent Fighter Alert Force Evaluation, conducted by North American Aerospace Defense Command Inspector General and Air Combat Command inspectors Jan. 23 -24, 2019 at the Atlantic City Air Guard Base, N.J.
The New Jersey Youth ChalleNGe Academy, State of New Jersey Department of Military and Veterans Affairs, based out of Joint Base McGuire-Dix-Lakehurst, visited the 177th Fighter Wing, New Jersey Air National Guard, Egg Harbor Township, N.J., for a base tour Dec. 19, 2018.
In recognition of exceptionally meritorious service above the normal call of duty from January 2016 through December 2017, the U.S. Air Force awarded the 177th Fighter Wing with the Air Force Outstanding Unit Award September 5, 2018.
For the second year in a row, the office that holds the 177th Fighter Wing recruiters is also home to the top Air National Guard recruiter in the Nation.
U.S. Airmen from the 177th Civil Engineer Squadron, New Jersey Air National Guard, and employees from the New Jersey Department of Military and Veterans Affairs participated in a base sustainment and beautification effort July 27, 2018, at the 177th Fighter Wing, Egg Harbor Township, N.J.
Like father, like son. Almost 40 years after U.S. Air Force Capt. Thomas J. Cooper commissioned, his son, Maj. Brian T. Cooper, followed in his footsteps. Brian, commander of the Aircraft Maintenance Squadron at the 177th Fighter Wing, New Jersey Air National Guard, commissioned in the Air Force in 2003 and his father, Thomas, an aircraft maintenance officer, commissioned in the Air Force in 1965.
An Airman with the 177th Fighter Wing, New Jersey Air National Guard, assisted in rescuing individuals from a structural collapse at the Rogue Water Tap House in Savannah, Georgia.
At the 177th Fighter Wing, Col. John R. DiDonna passed responsibility to Col. Bradford R. Everman as the new 177th Fighter Wing Commander here, November 19.
|
Brain structure, number magnitude processing, and math proficiency in 6- to 7-year-old children born prematurely: a voxel-based morphometry study The aim of the present voxel-based morphometry study was to examine the link between brain structure and number skills in a group of 67-year-old children born prematurely, which are considered to be an at-risk population for mathematical learning disabilities. Therefore, gray and white matter density values were extracted from brain areas previously reported to be relevant for number processing in developing brain systems and, thereafter, correlated with response time results tapping semantic number knowledge as well as with general math proficiency (as indexed by a standardized calculation test). Behavioral results disclosed a significant NDE, thus indicating well-established number magnitude representations for one-digit numerals in our study group. Significant positive correlations between gray matter and NDE emerged in parietal regions (including the right anterior inferior and the left superior parietal lobe) and in the right superior temporal gyrus. Moreover, white matter and NDE were negatively correlated in the right anterior inferior parietal lobe and the right inferior frontal gyrus. Overall, our results are novel insofar as they show that in 67-year-old children born prematurely, individual differences in gray and white matter structures are associated with numerical skills. Importantly, in our study group the observed link between brain structure and behavioral performance emerges only regarding an experimental task tapping semantic number knowledge, whereas general math proficiency does not seem to be related to individual differences in brain structure in our study group.
|
Characteristics analysis of segmental and regional lumbar spontaneous compensation post thoracic fusion in Lenke 1 and 2 adolescent idiopathic scoliosis Objective To explore the characteristics of compensation of unfused lumbar region post thoracic fusion in Lenke 1 and 2 adolescent idiopathic scoliosis. Background Preserving lumbar mobility in the compensation is significant in controlling pain and maintaining its functions. The spontaneous correction of the distal unfused lumbar curve after STF has been widely reported, but previous study has not concentrated on the characteristics of compensation of unfused lumbar region post thoracic fusion. Method A total of 51 Lenke 1 and2 AIS patients were included, whose lowest instrumented vertebrae was L1 from January 2013 to December 2019. For further analysis, demographic data and coronal radiographic films were collected before surgery, at immediate erect postoperatively and final follow-up. The wedge angles of each unfused distal lumbar segments were measured, and the variations in each disc segment were calculated at the immediate postoperative review and final follow-up. Meanwhile, the unfused lumbar curve was divided into upper and lower parts, and we calculated their curve angles and compensations. Results The current study enrolled 41 females (80.4%) and 10 males (19.6%). Thirty-six patients were Lenke type 1, while 15 patients were Lenke type 2. The average main thoracic Cobb angle and thoracolumbar/lumbar Cobb angle were 44.1±7.7°and 24.1±9.3°, preoperatively. At the final follow-up, the disc wedge angle variation of L1/2, L2/3, L3/4, L4/5 and L5/S1 was 3.84±5.96°, 3.09±4.54°, 2.30±4.53°, −0.12±3.89° and−1.36±2.80°, respectively. The compensation of upper and lower coronal lumbar curves at final follow-up were 9.22±10.39° and−1.49±5.14°, respectively. Conclusion When choosing L1 as the lowest instrumented vertebrae, the distal unfused lumbar segments compensation showed a decreasing trend from the proximal end to the distal end. The adjacent L1/2 and L2/3 discs significantly contributed to this compensation. Background and 2 adolescent idiopathic scoliosis (AIS) accounts for most AIS, but the optimal therapeutic approach for these patients remains controversial. As posterior selective thoracic fusion (STF) has become the standard surgical treatment of choice, numerous studies have shown that proper STF can accomplish the underlying aim of preventing scoliosis progression while maintaining global balance. In addition, the spontaneous lumbar curve correction (SLCC) can be achieved by correcting the main thoracic curve. In spinal fusion, it is believed that preserving lumbar mobility is advantageous in controlling pain and maintaining its functions. However, when planning the surgical treatments, more attention should be paid to the patients' unfused lumbar curve compensation ability due to its importance to the coronal balance. Otherwise, the compensation characteristics of the spontaneous distal lumbar curve remain unclear even though it has been mentioned in some articles. Bachmann et al. validated that STF mainly produced changes in the upper half of the lumbar curve, leaving the lower half and the lumbosacral takeoff angle with little change. Mason et al. proposed that most lumbar coronal corrections could occur in the proximal region above the lumbar apex post STF. They explained that the proximal lumbar coronal curve could be more significantly corrected than the distal lumbar area because the proximal lumbar curve would become more lordotic in the sagittal plane immediately after surgery. Meanwhile, with a more distal lowest instrumented vertebrae (LIV), there is increased disc pressure and segmental motion at the adjacent level, followed by an overall reduction in lumbar activity and an increased risk of disc degeneration. Meric et al. conducted a retrospective study of AIS patients who received STF treatment, with at least 10 years follow-up demonstrated a moderate rise in disc degeneration in the unfused segments. Facet joint degeneration was significant at the upper two levels adjacent to the lowest instrumented vertebra. Although the spontaneous correction of the distal unfused lumbar curve after STF has been widely reported [1,; however, the impact of the spontaneous realignment of unfused segments on disc compensation remains to be quantified. To obtain an optimal balance outcome and prevent radiographical complications, such as the adding-on phenomenon, research has been conducted regarding the optimal LIV selection, prediction of SLCC and related long-term outcome. However, all these studies regarded the unfused distal segments as an ensemble. Till, no further research has been reported on the impact of segmental or regional disc variation. Our study focused on the Keywords: Thoracic fusion, AIS, Spontaneous compensation, Characteristics, Unfused lumbar segments Patients populations A total of 51 patients were enrolled in this study between January 2013 and December 2019 met the inclusion and exclusion criteria as shown in Fig. 1. The inclusion criteria were: 1). 10 ≤ Age ≤ 18 years old; 2). According to Lenke classification, patients were diagnosed with Lenke 1 and 2 AIS and received a one-stage posterior correction surgery with pedicle screw; 3). LIV was L1 vertebrae; 4). The total follow-up time exceeded 24 months. The exclusion criteria were: 1). Other types of AIS or spine deformity; 2). LIV was above or below L1 vertebrae. In addition, patients without adequate radiological materials were also excluded. This current study was approved by the institutional review board of our hospital, and the patients in our study provided written informed consent for the study. Data collection The demographic data, including age, gender, height, weight, BMI and Lenke type were recorded. Surgeryrelated information was recorded, such as UIV (upper instrumented vertebrae), fusion segments, and pedicle screws. All patients provided full spine standing posterior-anterior X-ray before surgery, at the immediate postoperative follow-up and final follow-up. The Risser sign was calculated according to the preoperative pelvic X-ray. Other radiographic parameters were measured using Surgimap software, such as proximal thoracic Cobb angles, main thoracic Cobb angles, thoracolumbar/lumbar Cobb angles, translation of thoracic apex (TAVT, the distance between the apex vertebra of the main thoracic curve and the cervical 7 vertebrae plumb line (C7PL)), translation of thoracolumbar/lumbar apex (LAVT, the distance between the apex vertebra of the thoracolumbar/lumbar curve and the center sacral vertical line (CSVL)) and coronal balance (the horizontal distance between the CSVL drawn from C7PL). The disc wedge angle was measured as the angle between the lines along the inferior endplate of the upper and the superior endplate of the lower vertebra in a segment, L1/2, L2/3, L3/4, L4/5 and L5/S1 disc were measured, respectively. Each segment's variation of disc wedge angle was calculated at immediate postoperative follow-up and final follow-up reviews. As for the analysis of integral distal lumbar compensation, upper coronal lumbar curve (the Cobb angle between L1 and L4) and lower coronal lumbar curve (the Cobb angle between L4 and S1) were measured, and their compensation ability was also calculated at each followup. Radiographic parameters were measured by two experienced attending doctors of spine deformity (Dr X. Z. and Dr. K. C.), and the average value was adopted for further analysis. Statistical analysis Statistical analysis was performed using SPSS 19.0 statistics software (SPSS Inc., Chicago, IL). Descriptive statistics were presented in the form of mean ± standard deviation (SD). ANOVA analysis was used to assess the quantitative data among different periods, and the SNK method was used for pairwise comparison. Pair t-test analysis was utilized to assess the compensation ability of the upper and lower coronal lumbar curve. Correlation analysis was also adopted to clarify the composition and compensation ability of each segment in the whole unfused lumbar region. P < 0.05 was considered statistical significance. Results A total of 51 Lenke 1 and 2 patients were enrolled in our study, including 41 females (80.4%) and 10 males (19.6%). Thirty-six patients were Lenke type 1, while 15 patients were Lenke type 2. The mean age at the time of surgery was 14.12 ± 2.05 years. The average preoperative height was 159.33 ± 6.85 cm, and the average preoperative weight was 47.27 ± 6.69 kg. The average BMI was 18.42 ± 2.02 kg/m 2. Among the patients, the number of UIV on T1, T2, T3, T4 and T5 was 4, 9, 19, 16 and 3, respectively. The average fusion segments were 10.90 ± 1.02, and the mean number of instrumented pedicle screws was 15.08 ± 2.03. Table 1 enlisted the demographic and clinical characteristics. Radiographic parameters were shown in Table 2. The average main thoracic Cobb angle was 44.1 ± 7.7°, the mean thoracolumbar/lumbar Cobb angle was 24.1 ± 9.3°, and the mean coronal balance (C7PL-CSVL) was 11.2 ± 7.9 mm, preoperatively. According to ANOVA analysis, there was a significant difference in proximal thoracic Cobb angle, main thoracic Cobb angle, thoracolumbar/lumbar Cobb angle, and thoracic AVT when comparing the preoperative X-ray with immediate postoperative erect X-ray or in preoperative X-ray and final follow-up X-ray. No significant difference was found in the parameters when comparing the immediate postoperative erect and final follow-up review X-rays. With arthrodesis, the main thoracic curve's correction was approximately 30° and remained stable until the final follow-up. The thoracolumbar/lumbar curve was spontaneously compensated with a correction rate of more than 70%. The preoperative mean thoracic AVT was 33.0 ± 9.1 mm and was significantly improved at immediate erect postoperatively (P < 0.001) and at final followup (P < 0.001). Additionally, no significant difference was observed in either lumbar AVT or coronal balance. Also, no coronal complications were found in the included patients at final follow-up. The preoperative disc wedge angles of L1/2, L2/3, L3/4, L4/5 and L5/S1 were 2.86 ± 4.32°, 3.53 ± 4.22°, 2.71 ± 4.55°, 0.36 ± 3.40° and 2.03 ± 2.57°, respectively. At the final follow-up, the disc wedge angle was approximately zero with spontaneous correction of the lumbar curve. However, as for L4/5 disc and L5/S1 disc level, a significant difference between preoperative and postoperative immediate X-rays was detected in each distal unfused disc wedge angle. A significant difference was found at final follow-up in L1/2 disc, L2/3 disc, L3/4 disc, and L5/S1 disc level compared to preoperative X-ray. When considered upper and lower coronal lumbar curve as integral, the upper integral showed significance whether in the postoperative period or at final followup. The preoperative upper and lower coronal lumbar curve were 15.87 ± 6.64° and 5.08 ± 3.93°, which were changed to 10.33 ± 5.71° and 5.15 ± 3.70° immediately after surgery. At the final follow-up, the results turned to 5.34 ± 6.16°and 4.46 ± 3.79°, respectively. The disc wedge angle variation was calculated to investigate further how each disc level changed and whether this variation was consistent. As shown in Table 3, immediate disc wedge angle variation was 2.70 ± 4.68°, 2.82 ± 4.19°, 2.21 ± 4.38°, − 0.21 ± 4.31° and − 0.59 ± 2.71°, respectively. The disc wedge angle variation at final follow-up was 3.84 ± 5.96°, 3.09 ± 4.54°, 2.30 ± 4.53°, − 0.12 ± 3.89° and − 1.36 ± 2.80°, respectively. Significant differences were found in disc wedge angle variation among each segment after treatment, whether at immediate erect postoperatively or final follow-up. Pairwise comparison showed further significance between L3/4 and L4/5 level postoperatively. As shown in Fig. 2, each disc wedge angle variation presented a decreasing tendency: the further lower the spine, there is the less likely difference. The L1/2 disc and L2/3 disc contributed the most to the lumbar compensation. Besides, by calculating the integral compensation of upper and lower parts, we found the upper coronal lumbar curve play a more significant role of distal unfused lumbar compensation whether in the postoperative period (7.73 ± 8.85° vs − 0.80 ± 5.13°, P < 0.001) or at final follow-up (9.22 ± 10.39° vs − 1.49 ± 5.14°, P < 0.001), as shown in Table 4. Furthermore, the total disc compensation was added by distal un-instrumented disc wedge angle variation. This compensation accounts for 43.6% at immediate erect and 45.0% at final follow-up. As shown in Table 4, a strong association was found between the following disc wedge angle and the TL/L Cobb angle at final follow-up using Pearson correlation statistics: L1/2 wedge angle (r = 0.518, p < 0.001) and L2/3 wedge angle (r = 0.468, p = 0.001). Moreover, the correlation of disc compensation and spontaneous lumbar correction at final follow-up showed a similar tendency (Table 5): L1/2 disc compensation (r = 0.542, p < 0.001) and L2/3 disc compensation (r = 0.437, p = 0.001). As for the preoperative TL/L Cobb angle, the correlation was not significant in the preoperative L3/4 wedge angle (r = 0.205, p = 0.148). The typical example was shown in Fig. 3. Discussion Previously many studies have been conducted on the compensation of lumbar curvature after thoracic fusion. Koller et al. proposed an accurate prediction model for postoperative SLCC based on the analysis of many prospective STF cases. Danilo et al. conducted a retrospective cohort study of 42 Lenke 1 AIS patients and concluded that the main thoracic curve's overcorrection might result in less satisfactory results. Matthew et al. indicated that the preoperative push-prone is the best preoperative flexibility radiograph to predict the final lumbar curve measurement. Pasha et al. then developed a decision tree to define criteria for optimal lumbar curve correction following STF in Lenke 1 AIS. Schulz et al. pointed out that optimal postoperative outcomes for STF should include a lumbar Cobb angle less than 26 °, coronal balance 2 cm or less, deformityflexibility quotient less than 4, lumbar correction more than 37%, and trunk shift less than 1.5 cm. However, these studies only focus on overall compensation behavior and aim to improve clinical strategies. In this study, we calculated each disc wedge variation of distal unfused lumbar segments to further elucidate the characteristics of spontaneous compensation of the lumbar curve after STF. The results showed that the proximal two segments at level L1/2 and L2/3 accounted for most total compensation. The distal unfused lumbar segments provided the more distal the segment, the less compensation. Furthermore, we found that total disc compensation consisted of less than half of the total postoperative lumbar curve compensation. This phenomenon may indicate that the lumbar curvature is often affected and includes the thoracic vertebrae, such as T10, T11 and T12. However, since all of our cases chose L1 as LIV, our study did not further investigate the fused thoracic discs, we focused attention on the unfused lumbar segments. As shown in Fig. 2, the compensation ability of the lumbar segments showed a decreasing tendency, with a major role being played by the proximal adjacent lumbar curve. Moreover, our integral analysis indicated that the upper coronal lumbar curve was responsible for most of the compensation, which was consistent with the opinion of Na et al.. They were the first to divide the lumbar curve into the proximal and distal curves by their respective lumbar apex and concluded that looking at the proximal lumbar curve flexibility might be an alternative indicator for measuring the lumbar flexibility in MT-AIS patients treated by STF. We believe that the characteristics of residual lumbar curve after STF may be closely associated with the adding-on phenomenon and may provide evidence when choosing the correct LIV. Then, what is the reason for the non-uniformity of unfused distal segment compensation? We believed that the flexibility of the distal unfused segments might be different. Zhao et al. analyzed the characteristics of cobb angle distribution in the Lenke 5C AIS patients. They found that the disc angles had symmetric distribution in the main thoracolumbar/lumbar curve, while the distal segment is more flexible. The thoracolumbar/lumbar curve's apex was often L1 or L2 vertebrae, and its distal segments may correspond to the L1/2 and L2/3 segments that were consistent with our study results. Na et al. also found that the lumbar apex of 28 main thoracic curve patients was between L2 and L3, and concluded that the curve flexibility of the proximal lumbar area could be meaningful. Jansen et al. also concluded that in STF patients, the most correction was made in the upper part of the lumbar curve, while the distal lumbar curve seemed to be more rigid and less important in spontaneous curve correction. In addition, another reasonable hypothesis may be the mechanical effect of posterior fusion with the pedicle screw. This phenomenon was similar to complications on the sagittal plane, such as PJK and DJK, which we believed could result from stress concentration on the adjacent segments. Meric et al. have shown that facet joint degeneration is significant at the upper two levels adjacent to the LIV when performing STF. Furthermore, this may be explained by the principle of load-sharing, that when arthrodesis was applied, the posterior fixation conducted most of the forces to the lowest instrumented vertebrae. Furthermore, when this force is overloaded, the stress could be conducted to the most adjacent segments. This has related to coronal complications, which could lead to complications, including adding-on phenomenon and coronal imbalance. Therefore, when planning surgical treatment strategies, the characteristics of unfused lumbar segments should be carefully considered. Inappropriate curve selection and excessive thoracic correction have been identified as the most common etiologies of coronal imbalance. Meanwhile, numerous studies [8,21, have demonstrated improper placement of the LIV is also an independent risk factor. It is also important to realize the heterogeneity of spontaneous compensation of unfused lumbar segments. When fusing the thoracic curvature, the overall compensation ability of the lumbar curvature and the heterogeneity of compensation to avoid excessive compensation at the proximal end should be considered. Even though our study focused on the residual lumbar curve segmental characteristics in Lenke 1 and 2 AIS patients who were performed STF, several limitations should be considered. First, we only included patients whose LIV was L1 vertebrae for the homogeneity analysis of disc compensation. Further researches on other LIV selection and comparison should be performed. Second, only coronal position data were studied in our research but not a sagittal plane, and there was no specific analysis of related complications. Finally, this was a single-center study, and multi-centric research should be conducted to further validate the results. Conclusion The residual lumbar curve can be corrected spontaneously with the thoracic curve correction after posterior thoracic fusion in Lenke 1 and 2 AIS patients. When selecting L1 as the lowest instrumented vertebrae, the compensation of distal unfused lumbar segments showed a declining tendency to contribute to the compensation; with the immediately adjacent L1/2 and L2/3 disc contributed most in this compensation.
|
A prior art memory cell configuration utilizes a single capacitor in combination with three transistors, and may be referred to as a 3T-1C memory cell. Such memory cell is schematically illustrated in FIG. 1 as a memory cell 2. The three transistors are labeled as T1, T2 and T3.
A source/drain region of T1 connects with a write bitline (WBL), and the other source/drain region of T1 connects with the capacitor (CAP). A gate of T1 connects with a write wordline (WWL).
A source/drain region of T2 connects with a common plate (CP), and the other source/drain region of T2 connects with a source/drain region of T3. The common plate may be coupled with any suitable voltage, such as a voltage within a range of from greater than or equal to ground to less than or equal to VCC (i.e., ground≤CP≤VCC). In some applications the common plate is at a voltage of about one-half VCC (i.e., about VCC/2).
A gate of T2 connects with the capacitor (CAP).
One of the source/drain regions of T3 is the source/drain region connected with the source/drain region of T2, and the other connects with a read bitline (RBL). A gate of T3 connects with a read wordline (RWL).
The 3T-1C configuration of FIG. 1 may be utilized in DRAM (dynamic random access memory). Presently, DRAM commonly utilizes memory cells having one capacitor in combination with a transistor (so-called 1T-1C memory cells), with the capacitor being coupled with a source/drain region of the transistor. A possible advantage of 3T-1C configurations as compared to 1T-1C configurations is that charge stored on the capacitor within the 3T-1C configurations is utilized to control a gate of T2 rather than being directly shared with a bitline. This may enable much lower capacitance to be utilized in the 3T-1C configurations as compared to the 1T-1C configurations. One of the limitations to scalability of present 1T-1C configurations is that it is proving difficult to incorporate capacitors having sufficiently high capacitance into highly-integrated architectures. Accordingly, utilization of 3T-1C configurations, and the associated lower capacitance needs of such configurations, may ultimately enable increased scalability as compared to the 1T-1C configurations. However, the 3T-1C configurations have more components than the 1T-1C configurations (three transistors instead of one), which may make it difficult to incorporate 3T-1C configurations into highly-integrated modern memory architecture.
It would be desirable to develop 3T-1C configurations suitable for incorporation into highly-integrated modern memory architectures.
|
# Copyright 2021 Google 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from unittest import mock
import freezegun
import pytest
from google.api_core import exceptions
from google.cloud.bigquery_storage_v1.services import big_query_write
from google.cloud.bigquery_storage_v1 import types as gapic_types
from google.cloud.bigquery_storage_v1 import exceptions as bqstorage_exceptions
from google.protobuf import descriptor_pb2
REQUEST_TEMPLATE = gapic_types.AppendRowsRequest()
@pytest.fixture(scope="module")
def module_under_test():
from google.cloud.bigquery_storage_v1 import writer
return writer
def test_constructor_and_default_state(module_under_test):
mock_client = mock.create_autospec(big_query_write.BigQueryWriteClient)
manager = module_under_test.AppendRowsStream(mock_client, REQUEST_TEMPLATE)
# Public state
assert manager.is_active is False
# Private state
assert manager._client is mock_client
def test_close_before_open(module_under_test):
mock_client = mock.create_autospec(big_query_write.BigQueryWriteClient)
manager = module_under_test.AppendRowsStream(mock_client, REQUEST_TEMPLATE)
manager.close()
with pytest.raises(bqstorage_exceptions.StreamClosedError):
manager.send(object())
@mock.patch("google.api_core.bidi.BidiRpc", autospec=True)
@mock.patch("google.api_core.bidi.BackgroundConsumer", autospec=True)
def test_initial_send(background_consumer, bidi_rpc, module_under_test):
mock_client = mock.create_autospec(big_query_write.BigQueryWriteClient)
request_template = gapic_types.AppendRowsRequest(
write_stream="stream-name-from-REQUEST_TEMPLATE",
offset=0,
proto_rows=gapic_types.AppendRowsRequest.ProtoData(
writer_schema=gapic_types.ProtoSchema(
proto_descriptor=descriptor_pb2.DescriptorProto()
)
),
)
manager = module_under_test.AppendRowsStream(mock_client, request_template)
type(bidi_rpc.return_value).is_active = mock.PropertyMock(
return_value=(False, True)
)
proto_rows = gapic_types.ProtoRows()
proto_rows.serialized_rows.append(b"hello, world")
initial_request = gapic_types.AppendRowsRequest(
write_stream="this-is-a-stream-resource-path",
offset=42,
proto_rows=gapic_types.AppendRowsRequest.ProtoData(rows=proto_rows),
)
future = manager.send(initial_request)
assert isinstance(future, module_under_test.AppendRowsFuture)
background_consumer.assert_called_once_with(manager._rpc, manager._on_response)
background_consumer.return_value.start.assert_called_once()
assert manager._consumer == background_consumer.return_value
# Make sure the request template and the first request are merged as
# expected. Needs to be especially careful that nested properties such as
# writer_schema and rows are merged as expected.
expected_request = gapic_types.AppendRowsRequest(
write_stream="this-is-a-stream-resource-path",
offset=42,
proto_rows=gapic_types.AppendRowsRequest.ProtoData(
writer_schema=gapic_types.ProtoSchema(
proto_descriptor=descriptor_pb2.DescriptorProto()
),
rows=proto_rows,
),
)
bidi_rpc.assert_called_once_with(
start_rpc=mock_client.append_rows,
initial_request=expected_request,
# Extra header is required to route requests to the correct location.
metadata=(
("x-goog-request-params", "write_stream=this-is-a-stream-resource-path"),
),
)
bidi_rpc.return_value.add_done_callback.assert_called_once_with(
manager._on_rpc_done
)
assert manager._rpc == bidi_rpc.return_value
manager._consumer.is_active = True
assert manager.is_active is True
@mock.patch("google.api_core.bidi.BidiRpc", autospec=True)
@mock.patch("google.api_core.bidi.BackgroundConsumer", autospec=True)
def test_initial_send_with_timeout(background_consumer, bidi_rpc, module_under_test):
mock_client = mock.create_autospec(big_query_write.BigQueryWriteClient)
manager = module_under_test.AppendRowsStream(mock_client, REQUEST_TEMPLATE)
type(bidi_rpc.return_value).is_active = mock.PropertyMock(return_value=False)
type(background_consumer.return_value).is_active = mock.PropertyMock(
return_value=False
)
initial_request = gapic_types.AppendRowsRequest(
write_stream="this-is-a-stream-resource-path"
)
with pytest.raises(exceptions.Unknown), freezegun.freeze_time(
auto_tick_seconds=module_under_test._DEFAULT_TIMEOUT + 1
):
manager.send(initial_request)
def test_future_done_false(module_under_test):
mock_client = mock.create_autospec(big_query_write.BigQueryWriteClient)
manager = module_under_test.AppendRowsStream(mock_client, REQUEST_TEMPLATE)
future = module_under_test.AppendRowsFuture(manager)
assert not future.done()
def test_future_done_true_with_result(module_under_test):
mock_client = mock.create_autospec(big_query_write.BigQueryWriteClient)
manager = module_under_test.AppendRowsStream(mock_client, REQUEST_TEMPLATE)
future = module_under_test.AppendRowsFuture(manager)
future.set_result(object())
assert future.done()
def test_future_done_true_with_exception(module_under_test):
mock_client = mock.create_autospec(big_query_write.BigQueryWriteClient)
manager = module_under_test.AppendRowsStream(mock_client, REQUEST_TEMPLATE)
future = module_under_test.AppendRowsFuture(manager)
future.set_exception(ValueError())
assert future.done()
|
package bdd_test
import (
"testing"
"github.com/hedhyw/gherkingen/v2/pkg/bdd"
)
func TestBDDTestCases(t *testing.T) {
t.Run("ok", func(t *testing.T) {
f := bdd.NewFeature(t, "bdd")
type testCase struct {
Inc int
}
const expSum = 20
testCases := map[string]testCase{
"by_7": {7},
"by_13": {13},
}
var gotSum int
f.TestCases(testCases, func(_ *testing.T, _ *bdd.Feature, tc testCase) {
gotSum += tc.Inc
})
if gotSum != expSum {
t.Fatalf("Exp: %d, Got: %d", expSum, gotSum)
}
})
}
func TestBDD(t *testing.T) {
f := bdd.NewFeature(t, "bdd")
const expCalled = 6
var called int
inc := func() {
called++
}
f.Rule("rule", func(_ *testing.T, f *bdd.Feature) {
f.Background("background", func(_ *testing.T, f *bdd.Feature) {
f.Then("then", inc)
})
f.Scenario("simple", func(_ *testing.T, f *bdd.Feature) {
tc := struct {
Fn string `field:"<field>"`
}{
Fn: "FUNC",
}
f.Example("example", func(_ *testing.T, f *bdd.Feature) {
f.TestCase("testCase", tc, func(t *testing.T, f *bdd.Feature) {
f.Given("given <field> called", inc)
f.But("but <field> called", inc)
f.When("when <field> called", inc)
f.And("and <field> called", inc)
f.Then("then <field> called", inc)
expRecords := [...]string{
"Feature: bdd",
"\tRule: rule",
"\t\tScenario: simple",
"\t\t\tExample: example",
"\t\t\t\t# TestCase: {Fn:FUNC}",
"\t\t\t\tGiven given FUNC called",
"\t\t\t\tBut but FUNC called",
"\t\t\t\tWhen when FUNC called",
"\t\t\t\tAnd and FUNC called",
"\t\t\t\tThen then FUNC called",
}
records := f.LogRecords()
if len(records) != len(expRecords) {
t.Fatalf("Got records (%d): %+v", len(records), records)
}
for i, er := range expRecords {
if records[i] != er {
t.Fatalf("Not matched: %q and %q", records[i], er)
}
}
})
})
})
})
if called != expCalled {
t.Fatal(called)
}
}
|
def view_existing_accounts(name):
return Accounts.account_exists(name)
|
Self-Portrait by Ai Weiwei for TIME
(2 of 2)
Do you think your release was due to international and domestic pressure?
I think it only could have come from support for me from the international art community and the political community and also in China.
In November, after you were served with a $2.4 million bill for taxes and penalties, Chinese citizens started giving money to you. After that, there was talk of a possible pornography charge, and in response to that, people started posting their own nude photos online as a sign of support. Have you been surprised by the reaction your case has inspired in China?
I'm very surprised, and I think the people who are doing this were also surprised. People are so encouraged by this new technology. It provides such possibility. This really changes the landscape of the political situation. In the past, only the powerful could make their voices heard. Today anybody with clear thinking or a special way of understanding will be recognized.
Does what has happened in the Arab Spring have significance here, or is China under a different set of rules?
I think Chinese leadership is trying to tell the world they have another set of logic or reasoning or values which are different from yours. Of course, I don't think they believe that. It's just an argument that's made when you can't confront the truth and facts. They really want to maintain power. At the same time, they refuse to communicate. They refuse to have good intentions. They refuse to be sincere. How can that last?
One of the criticisms that are made of you by some Chinese is that you promote democratic values that are not universal but Western, and China has its own path of development.
I never emptily talk of democratic values. I always focus on individual cases. How many students died? What are their names? What are the basic facts? Did the police really beat me that night? Can a human being speak out with dignity?
So, what would you like to see in China?
We need clear rules to play the game. We need to have respect for the law. If you play a chess game but after two or three moves you can change the rules, how can people play with you? Of course you will win, but after 60 years you will still be a bad player because you never meet anyone who can challenge you. What kind of game is that? Is that interesting? I'm sure the people who put me in jail, they're so tired. This game is not right, but who is going to say, "Hey, let's play fairly"?
Second, they cannot stop people from communicating freely, to get information and to express themselves. When they do that, this nation is not a right place to live. They sacrifice generations of people's opportunities. This is a crime.
Some people argue China doesn't need democracy.
Democracy, right or wrong, has been proved. The Chinese case has not been proved yet. For me there is no logic there. It doesn't matter if it's successful or not. You cannot sacrifice people. I cannot ever accept the kind of conditions where you can sacrifice someone's rights.
How do you spend your days? Are you still making art?
I'm an artist who is always looking for what is possible. I'm always looking to extend the boundaries. Art is the product of a person who uses a special form or shape or light to communicate. Life experience certainly teaches you how to become an artist.
I restrict the time I spend on the Internet now because I have to also talk to lawyers, communicate with the people who lent money to me.
In the afternoon I go to a park with my child to get some exercise. I go to the police station twice a week to hear their opinions and criticism. I do have a work I started two or three years ago it takes a long time to finish. I'm happy they never tried to stop me from doing art.
If you had a chance to go overseas, would you?
I have to evaluate, Is it better to stay in a jail here or go abroad? If you go, you really have to say goodbye.
You feel you wouldn't be allowed back?
Not only that. I'm afraid I would lose the sensitivity to this reality. There are so many things you can do in life, and of course, activist isn't my top choice. I think I would lose touch with here, and I certainly feel I owe a lot of people. If I can make a good effort, I would continue to do that.
Next Paul Ryan: The Prophet
|
<reponame>VictorGil/mylocation-last_known_location
package net.devaction.mylocation.lastknownlocationcore.clusteredclient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.protobuf.InvalidProtocolBufferException;
import io.vertx.core.AsyncResult;
import io.vertx.core.Handler;
import io.vertx.core.buffer.Buffer;
import io.vertx.core.eventbus.Message;
import net.devaction.mylocation.lastknownlocationapi.protobuf.LastKnownLocationResponse;
import net.devaction.mylocation.lastknownlocationapi.util.ProtoUtil;
//NOTE: this is not part of the standard Java API
import sun.misc.Signal;
/**
* @author <NAME>
*
* since December 2018
*/
@SuppressWarnings("restriction")
public class ResponseFromServerHandler implements Handler<AsyncResult<Message<Buffer>>>{
private static final Logger log = LoggerFactory.getLogger(ResponseFromServerHandler.class);
@Override
public void handle(AsyncResult<Message<Buffer>> asyncResult){
if (asyncResult.succeeded()){
Message<Buffer> message = asyncResult.result();
Buffer buffer = message.body();
log.debug("Received reply from the server, number of bytes in the body of the message: " + buffer.length());
LastKnownLocationResponse response;
try{
response = LastKnownLocationResponse.parseFrom(buffer.getBytes());
} catch (InvalidProtocolBufferException ex){
log.error("Invalid response received from the server: " + ex, ex);
return;
}
log.info(LastKnownLocationResponse.class.getSimpleName() +
" received from the server:\n" + ProtoUtil.toString(response));
} else {
Throwable throwable = asyncResult.cause();
log.error("The request could not be processed by the server: " + throwable, throwable);
}
log.info("Going to raise a WINCH signal in order to trigger the graceful shutdown of both Vert.x and the JVM");
Signal.raise(new Signal("WINCH"));
}
}
|
def partof(self, word):
return self._get(self._urls['partof'], word, 'partOf')
|
// Plot a horizontal line from the mandelbrot set
func calculateLine(fx, fy, dx float64, line []termbox.Attribute, wg *sync.WaitGroup) {
defer wg.Done()
for x := range line {
z := complex(0, 0)
c := complex(fx, fy)
var i int
for i = 0; i < depth; i++ {
if cmplx.Abs(z) >= 2 {
break
}
z = z*z + c
}
line[x] = termbox.Attribute(i%8) + 1
fx += dx
}
}
|
SUNNYVALE, Calif., Jan. 3, 2019 /PRNewswire/ -- Illumio, a cybersecurity leader delivering micro-segmentation, today announced full availability of PCE Supercluster designed for enterprise-scale real-time application dependency mapping and micro-segmentation deployments. PCE Supercluster, which is currently in use by some of the largest organizations in the world, makes Illumio the first company to offer a micro-segmentation and visibility solution that scales well beyond 100,000 workloads.
Today's applications require organizations to utilize both data center and cloud environments for their most critical assets and data. PCE Supercluster enables IT to micro-segment without re-architecting the network or putting the onus on organizations to stitch together solutions that do not scale.
"Security solutions that cannot scale with an organization's infrastructure put the burden on customers to make sacrifices that can result in security gaps. When we read different breach reports, these misconfigurations can be the point of entry for bad actors," said Matthew Glenn, VP of product management, Illumio. "The beauty of PCE Supercluster is that for the first time IT organizations have full global visibility, centralized management, and consistent enforcement of micro-segmentation policies across multi-region infrastructure at very large scale – finally, true global application workload protection through micro-segmentation."
Global enterprises have thousands to hundreds of thousands of workloads sprawled across a combination of private and public clouds with bare-metal, virtual machines, and containers. The traditional approach to segmenting global data centers uses any combination of VLANs, data center firewalls, SDN, and other networking technologies that are complex to deploy, operate, and manage. Keeping track of VLANs, IP addresses, subnets, and managing policies as well as firewall rules requires a virtually endless treadmill of infrastructure re-architecting to keep pace with application security needs.
Global real-time application dependency mapping and visibility across all data center and cloud workloads.
Micro-segmentation security policies that follow the workloads everywhere at a global scale.
A federated security control plane that scales to hundreds of thousands of workloads.
Automated disaster recovery for global security policies.
Alignment of Zero Trust security practices with fault isolation, high availability, and disaster recovery objectives.
Illumio ASP delivers real-time application dependency mapping and micro-segmentation to prevent the lateral movement of bad actors inside data centers and cloud environments. Illumio ASP provides real-time visibility into the connectivity between workloads across heterogeneous compute environments, generates optimal micro-segmentation policies based on how workloads communicate, and programs the native stateful enforcement points in each host to enforce applicable firewall rules. Since policy creation does not require deep familiarity with networking terminology, companies can empower different teams within the organization to create micro-segmentation policies but retain governance over what gets provisioned.
|
def _GuessActiveConfigs(self):
result = {}
for name, config in self.site_config.items():
if config.master and config.important:
result[name] = config
for s in config.slave_configs:
result[s] = self.site_config[s]
return result
|
import {Button, Form, Input, message} from 'antd';
import {action, observable} from 'mobx';
import {observer} from 'mobx-react';
import React, {Component, ReactNode} from 'react';
import {
KeyGenerator,
createSecretKey,
decryptData,
encryptData,
} from '../../../auth';
import {updateVerify} from '../../../request';
import {MasterPassword, SecretKey, UsageData} from '../../../types';
import {IChangeSecretKey} from '../type';
import './index.less';
interface IProps {
refresh(): void;
}
@observer
export class ChangeSecretKey extends Component<IProps> {
@observable
private data: IChangeSecretKey = {
value: '',
password: {
value: '',
validateStatus: undefined,
help: '',
},
};
@observable
private disable: boolean = false;
render(): ReactNode {
const {value, validateStatus, help} = this.data.password;
return (
<div className="changeSecretKey">
<Form>
<Form.Item hasFeedback validateStatus={validateStatus} help={help}>
<Input
value={value}
placeholder="confirm password"
type="password"
onChange={event =>
this.updatePassword({value: event.target.value})
}
/>
</Form.Item>
<div className="newSecretKeyBox">{this.data.value}</div>
<Form.Item>
<Button
type="primary"
onClick={() => this.createNewSecretKey()}
disabled={this.disable}
className="createNewSecretKey"
>
create secret key
</Button>
<Button type="primary" onClick={() => this.onSave()}>
save
</Button>
</Form.Item>
</Form>
</div>
);
}
private onTestPassword(value: MasterPassword): boolean {
const pattern = /^\S{10,30}$/;
if (!pattern.test(value)) {
this.updatePassword({
validateStatus: 'error',
help: 'length 10-30',
});
return false;
} else {
this.updatePassword({validateStatus: 'success', help: ''});
return true;
}
}
private createNewSecretKey(): void {
this.updateSecretKey(createSecretKey());
}
private onSave(): void {
this.updateDisable(true);
const {password, value} = this.data;
const passwordTestResult = this.onTestPassword(password.value);
if (passwordTestResult && value) {
chrome.storage.local.get(items => {
const {id, email, secretKey, data} = items;
const oldKeyGenerator = new KeyGenerator({
id,
email,
secretKey,
password: <PASSWORD>,
});
const unlockKey = oldKeyGenerator.createUnlockKey();
const oldDataKey = oldKeyGenerator.createDataKey();
const plainData = decryptData(oldDataKey, data) as UsageData;
const newKeyGenerator = new KeyGenerator({
id,
email,
password: <PASSWORD>,
secretKey: value,
});
const newVerify = newKeyGenerator.createVerify();
const newDataKey = newKeyGenerator.createDataKey();
const newData = encryptData(newDataKey, plainData);
updateVerify(unlockKey, newVerify, newData)
.then(result => {
if (result) {
// 如果成功了要下载该secret key让用户保存!!!
chrome.storage.local.set({secretKey: value, data: newData});
this.props.refresh();
message.success('update successfully');
}
})
.catch(error => message.error(error.message))
.finally(() => this.updateDisable(false))
.catch();
});
} else {
this.updateDisable(false);
}
}
@action
private updatePassword(value: Partial<IChangeSecretKey['password']>): void {
this.data.password = {
...this.data.password,
...value,
};
}
@action
private updateSecretKey(value: SecretKey): void {
this.data.value = value;
}
@action
private updateDisable(value: boolean): void {
this.disable = value;
}
}
|
import dataclasses
import datetime
from typing import Optional
import inflection
import typic
@typic.slotted(dict=False, weakref=True)
@dataclasses.dataclass
class Post:
id: Optional[int] = None
slug: Optional[str] = None
title: Optional[str] = None
subtitle: Optional[str] = None
tagline: Optional[str] = None
body: Optional[str] = None
publication_date: Optional[datetime.date] = None
created_at: Optional[datetime.datetime] = None
updated_at: Optional[datetime.datetime] = None
def __setattr__(self, key, value):
if key == "title":
object.__setattr__(self, "slug", inflection.parameterize(value))
object.__setattr__(self, key, value)
|
Technetium-99m labelled liposomes to image experimental arthritis OBJECTIVES Liposomes sterically stabilised with polyethylene glycol (PEG) labelled with technetium-99m were tested for their ability to image adjuvant arthritis in a rat model. METHODS Adjuvant arthritis was induced in the ankle joint of the left hind foot by injection of Mycobacterium butyricum in Freunds incomplete adjuvant in the foot pad. Seven days later animals received the following radiopharmaceuticals labelled with 99mTc (a) non-PEG-liposomes, (b) PEG-liposomes or (c) non-specific human polyclonal IgG. For each of the radiopharmaceuticals the in vivo distribution of the radiolabel was monitored both scintigraphically as well as by counting the dissected tissues at two, eight, and 24 hours after injection. RESULTS The pharmacokinetics of the radiopharmaceuticals differed considerably (half life in the blood: PEG-liposomes (18 hours) > 99mTc-IgG (3 hours) > non-PEG liposomes (1 hour)). The inflamed focus was visualised with each of the agents. The uptake of each of the radiopharmaceuticals in the inflamed ankle region correlated with their residence time in the blood (inflamed joint uptake: PEG liposomes (1.15% injected dose (ID)/g)>99mTc-IgG (0.35% ID/g)>non-PEG-liposomes (0.05% ID/g)). Quantitative analysis of the images showed that the inflamed ankle to background ratio was highest with the PEG-liposomes (7.5 at 24 hours after injection), while with the other two agents this ratio did not exceed 4. CONCLUSION This study shows that99mTc-labelled PEG-liposomes may be an excellent agent to visualise arthritis. Increased label uptake in the inflamed joint and increased target to background ratios can be obtained with PEG-liposomes because of their long circulating properties. In addition to their use as vehicles for scintigraphic imaging of arthritis PEG-liposomes might also be used for the site specific delivery of antirheumatic drugs.
|
/* Returns the end of the fragment body (excluding exit stubs and selfmod copy) */
cache_pc
fragment_body_end_pc(dcontext_t *dcontext, fragment_t *f)
{
linkstub_t *l;
for (l = FRAGMENT_EXIT_STUBS(f); l; l = LINKSTUB_NEXT_EXIT(l)) {
if (EXIT_HAS_LOCAL_STUB(l->flags, f->flags)) {
return EXIT_STUB_PC(dcontext, f, l);
}
}
return fragment_stubs_end_pc(f);
}
|
Multiple cause-of-death data as a tool for detecting artificial trends in the underlying cause statistics: a methodological study The aims of the study were: (i) to identify trends in the underlying cause-of-death statistics that are due to changes in the coders' selection and coding of causes, and (ii) to identify changes in the coders' documented registration principles that can explain the observed trends in the statistics. 31 Basic Tabulation List categories from the Swedish national cause-of-death register for 19701988 were studied. The coders' tendency to register a condition as the underlying cause of death (the underlying cause ratio) was estimated by dividing the occurrence of the condition as underlying cause (the underlying cause rate) with the total registration of the condition (the multiple cause rate). When the development of the underlying cause rate series followed more closely the underlying cause ratio series than the multiple cause rate series, and a corresponding change in the registration rules could be found, the underlying cause rate trend was concluded to be due to changes in the coders' tendency to register the condition. For thirteen categories (fourteen trends), the trends could be explained by changes in the coders' interpretation practice: five upward, four insignificant, and five downward trends. In addition, for three categories the trends could be explained by new explicit ICD-9 rules.
|
This dentist has a self-proclaimed net worth of up to $4million and allegedly had $250 cash on him at the time.
But Dr Richard Ludwig, 54, was arrested after buying two pizzas for $40.64 with a military veteran’s credit card he found on the floor of a Florida restaurant, police said.
Ludwig allegedly used the card belonging to Harrun Majeed, 32, a 14-year Naval veteran and college student, after his victim dropped it in the car park outside.
Mr Majeed called his credit card company to cancel the card after losing it near the Mia Pizza Pasta Kitchen in Davenport on Saturday.
He then phoned police after finding out that the card was used to purchase two large pizzas with extra olives, police told ABC.
The suspect was arrested at the restaurant while he was waiting for his alleged order.
Ludwig, of Okemos, Michigan, told police he is a successful dentist, dental school graduate and has an undergraduate degree in chemical engineering.
‘I've been in law enforcement for a long time, but this one takes the cake,’ Sheriff Grady Judd said.
Ludwig was in the area visiting his son who was playing in a local baseball tournament in Winter Haven, he told police.
‘Deputies asked Dr Ludwig if he was having financial problems, which would cause him to act in such a way,’ a Polk County Sheriff's Office spokesman said.
He was charged with impersonating or attempting to use the identification of another person without consent, uttering false instrument, forgery and credit card theft.
‘This is the epitome of arrogance,’ Sheriff Judd told ABC. 'Dr Ludwig appears to be an intelligent, successful person who could have bought pizza for everyone in Davenport.
|
<filename>internal/service/list.go
package service
import (
"bytes"
"fmt"
"github.com/yemingfeng/sdb/internal/store"
"github.com/yemingfeng/sdb/internal/store/engine"
"github.com/yemingfeng/sdb/internal/util"
)
const listKeyPrefixTemplate = "l/%s"
const listKeyTemplate = listKeyPrefixTemplate + "/%d"
func LPush(key []byte, values [][]byte, sync bool) (bool, error) {
lock(LList, key)
defer unlock(LList, key)
batch := store.NewBatch()
defer batch.Close()
for _, value := range values {
batch.Set(generateListKey(key, util.GetOrderingKey()), value)
}
return batch.Commit(sync)
}
func LPop(key []byte, values [][]byte, sync bool) (bool, error) {
lock(LList, key)
defer unlock(LList, key)
batch := store.NewBatch()
defer batch.Close()
store.Iterate(&engine.PrefixIteratorOption{Prefix: generateListPrefixKey(key)},
func(key []byte, value []byte) {
for i := range values {
if bytes.Equal(values[i], value) {
batch.Del(key)
}
}
})
return batch.Commit(sync)
}
func LRange(key []byte, offset int32, limit int32) ([][]byte, error) {
index := int32(0)
res := make([][]byte, limit)
store.Iterate(&engine.PrefixIteratorOption{
Prefix: generateListPrefixKey(key), Offset: int(offset), Limit: int(limit)},
func(key []byte, value []byte) {
res[index] = value
index++
})
return res[0:index], nil
}
func LExist(key []byte, values [][]byte) ([]bool, error) {
res := make([]bool, len(values))
existMap := make(map[string]bool)
store.Iterate(&engine.PrefixIteratorOption{Prefix: generateListPrefixKey(key)},
func(key []byte, value []byte) {
existMap[string(value)] = true
})
for i, value := range values {
if existMap[string(value)] {
res[i] = true
}
}
return res, nil
}
func LDel(key []byte, sync bool) (bool, error) {
lock(LList, key)
defer unlock(LList, key)
batch := store.NewBatch()
defer batch.Close()
store.Iterate(&engine.PrefixIteratorOption{Prefix: generateListPrefixKey(key)},
func(key []byte, value []byte) {
batch.Del(key)
})
return batch.Commit(sync)
}
func LCount(key []byte) (int32, error) {
count := int32(0)
store.Iterate(&engine.PrefixIteratorOption{Prefix: generateListPrefixKey(key)},
func(key []byte, value []byte) {
count++
})
return count, nil
}
func generateListKey(key []byte, orderingKey int64) []byte {
return []byte(fmt.Sprintf(listKeyTemplate, key, orderingKey))
}
func generateListPrefixKey(key []byte) []byte {
return []byte(fmt.Sprintf(listKeyPrefixTemplate, key))
}
|
A genome scan for quantitative trait loci associated with body weight at different developmental stages in chickens. A genome scan to detect quantitative trait loci (QTL) affecting body weight in chickens was conducted on 238 F chickens from a reciprocal cross of Silky Fowl and White Plymouth Rock using 125 microsatellite markers covering 23 autosomes and the Z chromosome. Two types of QTL were considered: static QTL (SQ) and developmental QTL (DQ). Static QTL affected the body weight from hatch to time t, and DQ affected the body weight from time t-1 to time t. Six SQ and nine DQ were detected. Of these QTL, four reached a genome-wide significance of 5% or better, with SQ1 and DQ1 being the most significant QTL. Static QTL1 was on chromosome 1 between GCT0006 and MCW0106 and explained 4.05-9.80% of the phenotypic variation in body weights from 3 to 12 weeks of age. At 9, 10 and 11 weeks, the genome-wide significance thresholds of SQ1 were <1%. Developmental QTL1 was located on chromosome 1 between MCW0168 and GCT0006, and explained 2.75% of the phenotypic variation for body weight from week 7 to 8 with a genome-wide significance level <1%. The results suggest that body weight from hatch to time t and developmental growth from time t-1 to time t may involve two different sets of genes or gene actions.
|
Creamer, along with his wife, Illinois Rep. Jan Schakowsky is no stranger to agitation, violence, and expanding the progressive agenda. As Investor’s Business Daily pointed out in March 5, 2010 editorial regarding protests against House Ways and Means Chairman Dan Rostenkowski over the Medicare Catastrophic Coverage Act of 1988, which expanded Medicare benefits and funded the change with a supplemental tax:
Robert Creamer, founder and partner of Democracy Partners , the group behind the organized violence at Trump rallies, as shown in the video by James O’Keefe and Project Veritas, is no ordinary agitator. Creamer, a convicted felon, is arguably the spiritual godfather of ObamaCare and much of the current progressive left agenda.
An interesting historical footnote is that leading the protest against Rostenkowski was Jan Schakowsky -- then Director of the Illinois State Council of Senior Citizens -– and currently Democratic representative from the Ninth Congressional District of Illinois, and chief deputy whip to House Speaker Nancy Pelosi. It was Schakowshy’s husband, Robert Creamer, a Huffington Post blogger, who wrote what is arguably the bible of current health care reform efforts, Stand-Up Straight: How Progressives Can Win, while serving a prison term for check kiting.
As Breitbart has reported, Creamer, in addition to being the inspiration for ObamaCare, was also involved in heavily promoting the Iran nuclear deal, which effectively removed all impediments to Iran becoming a nuclear power and in providing $150 billion for this state sponsor of terror to foment revolution targeted against Israel and American interests:
Creamer, a political consultant who is intimately connected with Obama’s inner political circle, pleaded guilty in 2005 to tax violations and bank fraud. He served time in a federal prison and was under house arrest. After finishing his sentence, Creamer worked for Obama’s presidential campaign, training organizers. As Breitbart News first exposed in 2009, Creamer used his prison time to work on a political manual: Listen to Your Mother: Stand Up Straight! How Progressives Can Win. In it, he devised a strategy to guide a future “progressive” president. His plan included implementing “universal health care” as a first step to other radical reforms, including amnesty for illegal aliens. Obama strategist David Axelrod called the book “a blueprint for future victories.”… The Wall Street Journal reports that Creamer advocated for the Iran deal with the help of the Ploughshares Fund, a pro-Iran organization. According to a transcript of the [Ploughshares] call reviewed by The Wall Street Journal, participants stressed that the Iran agreement was the most important of the Obama administration’s second term, and they needed to prepare for battle with Republicans. “The other side will go crazy. We have to be really clear that it’s a good deal,” said Robert Creamer of Americans United for Change, a liberal action group. His wife is Rep. Jan Schakowsky (D., Ill.), a close ally of the White House in selling the agreement.
Creamer, who has visited the White House some 342 times since 2009, as noted, has been up to his eyeballs with left-wing agitation and the progressive agenda, as well as being involved in the corruption that has plagued Illinois under Democratic governors. As Joel B. Pollak wrote in Breitbart in December, 2009:
Rep. Schakowsky’s husband, Robert Creamer, used to be the leader of Citizen Action/Illinois. He also founded its predecessor, Illinois Public Action, in which Ms. Schakowsky served as Program Director. He runs a political consulting firm, the Strategic Consulting Group, which lists ACORN and the SEIU among its clients and which made $541,000 working for disgraced former Illinois governor Rod Blagojevich. Creamer resigned from Citizen Action/Illinois after the FBI began investigating him for bank fraud and tax evasion at Illinois Public Action. He was convicted in 2006 and sentenced to five months in federal prison in Terre Haute, Indiana, plus eleven months of house arrest. While in prison–or “forced sabbatical,” he called it -- Creamer wrote a lengthy political manual, Listen to Your Mother: Stand Up Straight! How Progressives Can Win (Seven Locks Press, 2007). The book was endorsed by leading Democrats and their allies, including SEIU boss Andy Stern -- the most frequent visitor thus far to the Obama White House -- and chief Obama strategist David Axelrod, who noted that Creamer’s tome “provides a blueprint for future victories.” In the book, Creamer draws lessons from decades of experience on the radical left, including the teachings of arch-radical Saul Alinsky, and several episodes from Rep. Schakowsky’s political career. He also lays out a “Progressive Agenda for Structural Change,” which includes a ten-point plan for foisting universal health care on the American people in 2009…. “We must create a national consensus that health care is a right, not a commodity; and that government must guarantee that right.” “We must create a national consensus that the health care system is in crisis.” “Our messaging program over the next two years should focus heavily on reducing the credibility of the health insurance industry and focusing on the failure of private health insurance.”“We need to systematically forge relationships with large sectors of the business/employer community.” “We need to convince political leaders that they owe their elections, at least in part, to the groundswell of support of [sic] universal health care, and that they face political peril if they fail to deliver on universal health care in 2009.” “We need not agree in advance on the components of a plan, but we must foster a process that can ultimately yield consensus.” “Over the next two years, we must design and organize a massive national field program.” “We must focus especially on the mobilization of the labor movement and the faith community.” “We must systematically leverage the connections and resources of a massive array of institutions and organizations of all types.” “To be successful, we must put in place commitments for hundreds of millions of dollars to be used to finance paid communications and mobilization once the battle is joined.” Creamer adds : “To win we must not just generate understanding, but emotion -- fear, revulsion, anger, disgust.” Democrats have followed Creamer’s plan to the letter. They have claimed our health care system is in crisis despite polls showing the overwhelming majority of Americans are happy with the care they receive.
It is not surprising that one of the effects, if not the purpose, of ObamaCare is to put the private health insurance industry in America out of business, to be replaced by a single-payer system like Canada’s, admired by Hillary Clinton in an email released by Wikileaks.
To keep his and Hillary Clinton’s agenda progressing to full implementation, Robert Creamer seeks to derail the “Trump train” through agitation and inciting violence, a criminal act. He and his allies seek to “generate emotion -- fear, revulsion, anger, disgust” toward Trump. With the help of the media, he is doing just that.
Daniel John Sobieski is a freelance writer whose pieces have appeared in Investor’s Business Daily, Human Events, Reason Magazine and the Chicago Sun-Times among other publications.
|
Females vastly outnumber males in basal cell carcinoma of the upper lip. A peculiar subset of high risk young females is described. BACKGROUND It was noted that females, particularly young females, outnumbered males with basal cell carcinoma (BCC) of the upper lip among patients treated by Mohs micrographic surgery in Vancouver, British Columbia. OBJECTIVE To investigate female-to-male ratios for BCC of the upper lip at the Vancouver Mohs micrographic surgery service, and to compare this with data from the provincial-wide registry as well as with worldwide data in the literature. METHODS The female-to-male ratios by age group were determined for 136 upper lip lesions treated at the Mohs service from 1983 to 1992. Similar data were obtained from 731 perioral BCCs recorded at the provincial-wide registry from 1982 to 1989. The literature was reviewed for comparative data worldwide. RESULTS At the Mohs service females outnumber males 3.5:1 for upper lip BCCs. Young females 30-39 years old outnumber males 16:1. Regional data from the British Columbia Cancer Registry confirm that females outnumber males 2:1 for the lip region (including upper lip, lower lip, nasolabial fold). This is significant when compared with all BCCs diagnosed in the province (ie, all sites), in which males outnumber females 1.3:1. Data from the literature worldwide confirm this relationship. CONCLUSION BCC of the upper lip is a female-predominated disease. Young females are at a much higher risk for this disease than young males.
|
Multiple soliton compression stages from competing plasma nonlinearities in mid-IR gas-filled hollow-core fibers We investigate numerically soliton-plasma interaction in a noble-gas-filled silica hollow-core anti-resonant fiber pumped in the mid-IR at 3.0 {\mu}m. We observe multiple soliton self-compression stages due to distinct stages where either the self-focusing or the self-defocusing nonlinearity dominates. Specifically, the parameters may be tuned so the competing plasma self-defocusing nonlinearity only dominates over the Kerr self-focusing nonlinearity around the soliton self-compression stage, where the increasing peak intensity on the leading pulse edge initiates a competing self-defocusing plasma nonlinearity acting nonlocally on the trailing edge, effectively preventing soliton-formation there. As the plasma switches off after the self-compression stage, self-focusing dominates again, initiating another soliton self-compression stage in the trailing edge. This process is accompanied by supercontinuum generation spanning 1-4 {\mu}m. The technique could be exploited to generate an ultrafast sequence of several few-cycle pulses. A new paradigm in nonlinear optics has emerged in hollow-core (HC) gas filled fibers, where the excitation of few-or even single-cycle temporal solitons with extreme peak intensities generate a plasma in the gas that affects the nonlinear dynamics nonlocally. Two competing nonlinearities are behind these phenomena as the temporal soliton relies on self-focusing selfphase modulation (SPM) effects (i.e. the nonlinear refractive index 2 0 n > ), while the plasma generates a self-defocusing nonlinearity ( 2 0 n < ). The nonlocal nature of the self-defocusing nonlinearity occurs because it is the leading edge of the intense soliton that generates a plasma that affects the trailing edge of the soliton. This uniquely happens in a fiber geometry, where the soliton transverse mode is effectively described by the fiber mode, which allows long interaction lengths. The physics and nonlinear dynamics are therefore radically different from, e.g., a free-space focusing geometry generating a filament where the plasma and SPM also interact dynamically. The light confinement inside hollow-core (HC) fibers filled with Raman inactive noble gases constitutes an efficient route to study interesting soliton-plasma dynamics. Initially gas-filled kagom HC fibers pumped in the near-IR were used as these were the first HC fibers to allow octave-spanning bandwidths as required to observe few-cycle solitons. However, only limited research has been carried out in the mid-IR range. This range is interesting because the photon energy is much lower, promising different plasma formation dynamics, but this has yet to be investigated. Moreover, nonlinear optics in the mid-IR is currently a very active research field for supercontinuum generation and few-cycle pulses, in particular exploiting filamentation in bulk media. The pulse energy limit of ~1 J of filamenation was recently overcome by exploiting effective self-defocusing effects in bulk crystals. HC gas-filled fibers insetad provide an interesting alternative as they also can sustain 10s of J pulse energies, tolerate mutiple-Watts of average powers, provide a clean spatial mode profile and give flexible beam handling and delivery. Here we investigate the soliton-plasma dynamics in a mid-IR pumped HC fiber. Interestingly, we find a novel soliton dynamics scenario where multiple soliton self-compression stages are observed, which we explain as a direct consequence having distinct propagation stages with either the self-focusing or the selfdefocusing nonlinearity dominates. This happens for certain system parameter ranges, mainly involving moderate gas pressure and input pulse intensities. We use an HC fiber based on the so-called anti-resonant (AR) effect. HC-AR fibers provide relatively low-loss transmission, low light-glass overlap, and broadband guidance. One of the main striking features of HC-AR fibers is that ~99.99% light can be guided inside the central hollow-core region, which significantly enhances the damage threshold levels. Another advantage of using gas-filled HC fibers is that both the dispersion and nonlinearity can be tuned by simply changing the pressure of the gas while at the same time providing extremely wide transparency ranges. Recently, silica HC-AR fibers suitable for the mid-IR were demonstrated with a propagation loss of <0.1 dB/m in the wavelength range 3-4 m. Here we focus on the mid-IR properties of silica HC-AR fibers filled with the noble gass xenon (Xe). We pump at 3.0 m and study the nonlocal soliton-plasma dynamics in a recently fabricated HC-AR fiber (see Fig. 1 (b) inset) having 43.7 m core diameter and 0.74 m silica wall thickness. This wall thickness introduces the first high-loss resonance band around 1.55 m, and was chosen to give minimal loss at the 3.0 m pump wavelength. We calculated the group-velocity dispersion (GVD) using the Marcatili and Schmeltzer's (MS) capillary model, considering only the fundamental mode and ignoring polarization effects (similar to recent works ). The dispersion and leakage loss were calculated using the finite-element method (FEM). To accurately model the leakage loss, the mesh size and parameters for the perfectly-matched layer were carefully optimized. A maximum mesh size of /6 and /4 was used in silica and air regions, respectively. The power overlap in the silica walls was used to estimate the effective material loss and then added to the leakage loss to obtain the final propagation loss. Figure 1(a) shows the GVD of the HC-AR fiber filled with Xe at 1.2 bar pressure, calculated using the MS capillary model (red line) and FEM (blue line), while Fig. 1(b) shows the FEM calculated loss spectra. The FEM calculations are able to track the loss and the rapidly oscillating GVD in the high-loss resonance bands (gray shaded regions, with m being the resonance band index), which are introduced by the resonant coupling between the core and cladding modes. In the resonance bands the GVD found by the MS capillary model stays smooth and continuous, while outside the bands it follows the GVD found by FEM quite well. The FEM results predict a propagation loss as low as ~ 0.45 dB/m at 3.0 m. The optical pulse propagation in the gas-filled HC-AR fiber was studied using the unidirectional pulse propagation equation where z is the propagation direction, t the time in the reference frame moving with the pump group velocity v g, E(z,) the electric field in the frequency domain, the angular frequency, () the propagation loss, c the vacuum speed of light, () the propagation constant, F denotes the Fourier transform. P NL (z,t) is the nonlinear polarization given by 3 0 ; the first term describes the Kerr effect, where 0 and are the vacuum permittivity and third-order nonlinear susceptibility, respectively, while the second term is the ionization effect expressed as where Ne is the free electron density, m e and e are the mass and charge of an electron, and I p is the ionization energy of the gas. The nonlinear refractive index (n2) of Xe at 1.2 bar was taken to be 810 -23 m 2 /W and can as a good approximation be considered wavelength independent. The third-order susceptibility was calculated using 2 0 2 (4 3). The Raman contribution of silica was considered negligible due to the very low light-glass overlap (<<1%). The dynamics of Ne(z,t) depends on whether multi-photon or tunnel ionization is occurring. In our case, the peak intensity inside the HC-AR fiber reaches around 70 TW/cm 2. This should be in the range where tunnel ionization dominates over multi-photon ionization, in particular because in the mid-IR the photon energy is low and thus multi-photon ionization has a high intensity onset threshold. Therefore, to calculate the free electron density, it is enough to consider quasi-static tunneling ionization based on the Ammosov, Delone, and Krainov (ADK) model. We also used the Perelomov, Popov, and Terent'ev (PPT) model, which includes multi-photon ionization as well, and found essentially the same results. Finally the Keldysh parameter was checked to be less than unity. This conforms that tunnel ionization dominates. The optical pulse propagation was modelled using either the full FEM loss and GVD profile (see appendix Fig. S1) or using no loss and the GVD from the MS capillary model (see Fig. 2). In the results presented below we chose to use the MS capillary model as it allows to better understand the fundamental dynamics behind the observed multi-compression stages without the interference oscillations due to the resonances of the FEM model. We emphasize that the two models qualitatively give similar results, as evidenced in the direct comparison between the two models (see appendix Fig. S1). Figure 2 shows the spectral and temporal soliton-plasma dynamics in a 25 cm HC-AR fiber filled with 1.2 bar Xe pumped in the anomalous dispersion regime at 3.0 m with 100 fs, 20 J Gaussian pulses (typical parameters from emerging mid-IR optical parametric chirped pulse amplification laser systems). The low pressure was chosen to have a zero-dispersion wavelength (ZDW) at 630 nm deep into the visible, as the plasma dynamics tended to blue-shift the soliton dramatically well into the short-wavelength near-IR. Initially, the pulse propagation is dominated by the interplay between anomalous dispersion and self-focusing SPM, leading to strong soliton self-compression down to sub-single cycle duration of 7 fs (less than single-cycle duration at its blue-shifted center wavelength of ~1.5 m) after 4.8 cm. It can be seen from Fig. 2(a) that at the maximum temporal compression point a blue-shifted spectrum is found, essentially forming a supercontinuum with a multiple octave-spanning bandwidth from 1.0-4.0 m. The spectrum broadens mainly towards the blue due to plasma formation in the self-compression stage; this is known to blue-shift the soliton. The plasma forms as the leading pulse field strength rises during the selfcompression stage: The free electron density N e~1 0 23 m -3 as shown in Fig. 2(c) is large enough to ionize the gas and form a plasma, and this renders the average nonlinear index change across the pulse negative, see the red curve in Fig. 2(c), while it remains positive before and after the soliton self compresses. The supercontinuum has also content below the ZDW consisting of dispersive waves (DWs) phase-matched to the soliton. After the maximum compression point, both the intensity and generation of free electrons drop below the ionization threshold level as shown in Fig. 2(c). Interestingly, we then observe another soliton self-compression stage at around 16.5 cm. Let us describe the main mechanisms responsible for this. In Fig. 3 we plot intensity vs. time, the spectrogram and the normalized PSD vs. frequency at selected distances. Initially, Fig. 3(a) shows that at z=3 cm self-focusing SPM dominates giving a positive nonlinear chirp across the pulse (indicated by the dashed line through pulse center; in the wavelength vs. time spectrogram we remind that a negative slope correponds to a positive chirp in this representaion). At the maximum compression point (z=4.8 cm, see Fig. 3(b)), the pulse is compressed down to 7 fs. The nonlinear refractive index change (n, see the black curve inside the spectrogram) is here strongly negative across the trailing edge of the pulse due to the high intensity in the leading edge of the compressed pulse; this is the nonlocal action of the competing plasma-induced self-defocusing nonlinearity, which results in a negative chirp across the trailing pulse edge that prevents soliton compression of this part of the pulse. In contrast, at the early SPM stage at z=3 cm n has only a weak negative value at the trailing edge. It should be emphasized that the maximum nonlinear refractive index change ∆n≈-510 -4 and the maximum nonlinear plasma index is ~ 9 times higher than the nonlinear Kerr refractive index. Such a significant change in the nonlinear refractive index indicates that the plasma contribution is dominant over the Kerr effect. The nonlinear refractive index change between Kerr and plasma was calculated using The first term in Eq. stems from the self-focusing Kerr effect, where n 2 >0 is the nonlinear refractive index and I is the pulse intensity. The second term is due to the plasma formation, where n 0 is the linear refractive index of the filling gas, 0 is the central angular frequency, and p is the plasma frequency expressed as where it is important to note that the freeelectron density Ne changes dynamically across the pulse. After the first compression, the soliton relaxes, leading to a drop in peak intensity (see Fig. 2(c)), and the free electron density drops quickly making the plasma disappear a few cm after the self-compression point. Essentially now a second stage starts with self-focusing SPM dominating (from z=6-15 cm). In Fig. 3(c) the spectrogram at z=15 cm shows that this allows the trailing edge to accumulate enough positive nonlinear phase shift to flip the chirp from negative to positive. This chirp is then subsequently compensated by the anomalous GVD to give another soliton self-compression stage at 16.5 cm, Fig. 3(d), this time down to 10 fs and 60 TW/cm 2 peak intensity. The same dynamics is now seen as in the first stage: a plasma forms during the compression that nonlocally induces a negative chirp on the trailing edge (dashed line), again preventing complete compression. The energy in the trailing edge is reduced compared to the first compression. It is clear that the steep onset and extinction of the plasma around the soliton self-compression point and the nonlocal action of the plasma nonlinearity are key in explaining the multiple compression stages. During the first compression stage selffocusing SPM dominates, but as the plasma turns on ignited by the increasing intensity of the leading edge it induces in a nonlocal fashion a large negative chirp across the trailing edge, which prevents the soliton in forming symmetrically across the pump pulse profile. Consequently only little energy is then retained in the soliton. When the negative nonlinearity of the plasma is then subsequently turned off as the peak intensity of the soliton drops after the self-compression point, the peak power in the uncompressed trailing edge is large enough to initiate an SPMinduced self-focusing chirp-reversal stage leading to an overall positive chirp again and thus builds up to another soliton selfcompression stage. This will repeat until the negatively-chirped trailing pulse edge has insufficient peak power to sustain the SPM chirp-reversal stage following the extinction of the self-defocusing plasma nonlinearity after the self-compression point; in this way one could engineer an ultrafast sequence of few-cycle pulses. This phenomenon of multiple soliton self-compression stages is different from the pulse splitting observed in the near-IR. The key is to ensure excitation of the plasma only around the solitonself compression stage, giving distinct propagation stages where either the self-focusing or the self-defocusing nonlinearity dominates. This seems to happen when the gas pressure and pulse energy are not too high. In contrast, in the near-IR case the self-defocsuing plasma nonlinearity always dominates on average, leading to pulse splitting at the first compression stage. However, the multiple soliton self-compression effect can also be observed in the near-IR by properly choosing the system parameters (see appendix Fig. S2). Similarly, pulse splitting can also happen in the mid-IR for high energies and pressure (see appendix Fig. S3). The calculated coherence of the supercontinuum is shown in Fig. 4, visualized at suitable propagation distances. The coherence at the first compression stage for z=4.8 cm is high (≈ 1 over a broad range), while the coherence drops for the second compression stage at z=16.5 cm and at the fiber end. In conclusion, we presented a numerical investigation of the pulse propagation in a xenon-filled hollow-core anti-resonant silica fiber in the mid-IR in the high intensity regime. Due to the competing self-focusing and self-defocusing nonlinearities from the soliton-plasma interaction we found an intriguing multiple soliton self-compression stage dynamics. This was caused by a sudden onset and quenching of the plasma during and after selfcompression allowing distinct propagation stages with either selffocusing or self-defocusing nonlinearity dominating, as well as the nonlocal action of the plasma, where the leading edge of the selfcompressing self-focusing soliton ionizes the gas to affect the trailing edge with a competing self-defocusing nonlinearity. This process could be a novel way of generating a few-cycle pulse sequence. While we presented simulations using the simplified MS capillary model, we as mentioned found qualitatively similar results using a full FEM model, except for interference from phasemathcing to narrow-band resonances. It is evident here there is a challenge in designing the anti-resonant wavelengths of the fiber to interfere as little as possible with the soliton-plasma dynamics.
|
package project.demo.pd1;
public class SmallNotification {
String loggedId, requestedId, requestedField, status;
public String getLoggedId() {
return loggedId;
}
public void setLoggedId(String loggedId) {
this.loggedId = loggedId;
}
public String getRequestedId() {
return requestedId;
}
public void setRequestedId(String requestedId) {
this.requestedId = requestedId;
}
public String getRequestedField() {
return requestedField;
}
public void setRequestedField(String requestedField) {
this.requestedField = requestedField;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
}
|
/**
* The main class for the CS410J PhoneBill Project <code>Project1</code>
* @author Punam Rani Pal
*/
public class Project1 {
/**
* This method is the main method where the execution for the program begins
* its parse the command line arguments and results in the desired output
* <code>main</code>
*/
public static void main(String[] args) throws ParseException {
boolean isPrint = false; //refers to -print option presence/absence
boolean isReadMe = false; //refers to -Readme option presence/absence
PhoneCall call = new PhoneCall(); // Refer to one of Dave's classes so that we can be sure it is on the classpath
int i = 0; //keeps track of the number of argument
int flag = 0;//keeps tack of the position of the -print option
if (args.length == 0) {
System.out.println("No arguments provided!!");
Validate.printUsage();
System.exit(1);
}
if (args.length == 10){
System.out.println("Invalid number of arguments provided!!");
Validate.printUsage();
System.exit(1);
}
if (args.length == 1) {
if (Validate.isOptionCorrect(args[0])) {
if (Validate.isOptionReadME(args[0]))
Validate.printReadMe();
else {
Validate.validateArgs(args);
Validate.printUsage();
}
}else
System.out.println("Invalid option!");
System.exit(1);
}
if (args.length < 8) {
// if (Validate.isOptionCorrect(args)) {
if (Validate.isOptionReadME(args[0]) || Validate.isOptionPrint(args[1])) {
if (!Validate.isOptionReadME(args[0]))
System.out.println("Inavlid option for README");
else {
Validate.printReadMe();
System.exit(1);
}
if(!Validate.isOptionPrint(args[1]))
System.out.println("Invalid option for print");
else{
if (!Validate.validateArgs(args))
Validate.printUsage();
}
} else if(Validate.isOptionReadME(args[1]) || Validate.isOptionPrint(args[0])) {
if (!Validate.isOptionPrint(args[0]))
System.out.println("Invalid option input for print");
else {
if (!Validate.validateArgs(args))
Validate.printUsage();
}
if (Validate.isOptionReadME(args[1]))
Validate.printReadMe();
else {
System.out.println("Invalid option for README");
}
} else{
if (!args[0].startsWith("-") && !args[1].startsWith("-"))
Validate.validateArgs(args);
else
System.out.println("Invalid options!!");
}
System.exit(1);
}
if (args.length == 8) {
//i += 1; //refers to the first position(-print/README)
if (Validate.isOptionPrint(args[0])) {
isPrint = true;
i += 1;
//Validate.validateArgs(args);
} else {
if (Validate.isOptionPrint(args[1])) {
isPrint = true;
flag = 1;
i += 2;
Validate.validateArgs(args);
}
}
if (Validate.isOptionReadME(args[0])) { //if readme option is ON
isReadMe = true;
Validate.printReadMe();
System.exit(1);
} else {
if (Validate.isOptionReadME(args[1])) {
isReadMe = true;
}
}
if(!Validate.isOptionCorrect(args[0]) && (!Validate.isOptionCorrect(args[1])))
System.out.println("Invalid option");
}
if (args.length == 9) { //when all the arguments are entered (9)
if (Validate.isOptionPrint(args[0])) { //if -print option is the first argument
isPrint = true;
} else {
if (Validate.isOptionPrint(args[1])) { //if -print option is the 2nd argument
flag = 1;
isPrint = true;
}
}
if (Validate.isOptionReadME(args[0]) || Validate.isOptionReadME(args[1])) { //if readme option is ON
isReadMe = true;
}else{
if( !isPrint && !isReadMe)
System.out.println("Invalid options for print and README!!");
}
i += 2; //sets the first two arguments positions for the options
}
//if there are 9 arguments
if (isPrint && flag == 0) { //if print option is the first argument then validate arguments and switch to readme
if (!Validate.validateArgs(args)) {
Validate.printUsage();
if (isReadMe) {
Validate.printReadMe();
}
System.exit(1);
}
//sets the argument based on the position od the 9 arguments
call.setCaller(args[1 + i]);
call.setCallee(args[2 + i]);
call.setStartDateTime(args[3 + i] + " " + args[4 + i]);
call.setEndDateTime(args[5 + i] + " " + args[6 + i]);
PhoneBill bill = new PhoneBill(); //creates a new phonebill for the customer
bill.setCustomer(args[0 + i]); //sets the customer name from the argument on the basis of number of arguments presents.
bill.addPhoneCall(call); //add the new call information to the phonebill collection
//if all the arguments are correct and if print is the first one then -print prints out first
//then swtch to readme else just stwitch to README.
if (isPrint) {
for (PhoneCall pc : bill.getPhoneCalls()) {
System.out.println(pc);
}
System.out.println(bill);
if (isReadMe) {
Validate.printReadMe();
System.exit(1);
}else
System.out.println("Invalid -README option!!");
}
}
if (isReadMe && (flag == 1 || flag == 0)) {
if(flag == 0){
if(!Validate.isOptionPrint(args[0]))
System.out.println("Inavlid print option");
}
Validate.printReadMe();
}
System.exit(1);
}
}
|
Induction of Lytic Epstein-Barr Virus (EBV) Infection by Synergistic Action of Rituximab and Dexamethasone Renders EBV-Positive Lymphoma Cells More Susceptible to Ganciclovir Cytotoxicity In Vitro and In Vivo ABSTRACT The purposeful induction of the lytic form of Epstein-Barr virus (EBV) infection combined with ganciclovir (GCV) treatment has been advocated as a novel strategy for EBV-positive B-cell lymphoma. We demonstrated that rituximab had a synergistic effect with dexamethasone on induction of the lytic EBV infection in CD20-positive lymphoma cells. Addition of GCV to the dexamethasone/rituximab-treated cells was more effective than dexamethasone/rituximab alone in killing EBV-positive lymphoma cells in vitro and in lymphoma-bearing nude mice but not in EBV-negative cells. These data suggest that induction of the lytic EBV infection with dexamethasone/rituximab in combination with GCV could be a potential virally targeted therapy for EBV-associated B-cell lymphoma.
|
The Singapore dollar or dollar is the official currency of Singapore. It is normally abbreviated with the dollar sign $, or alternatively S$ to distinguish it from other dollar-denominated currencies. It is divided into 100 cents. The Monetary Authority of Singapore and the Brunei Currency and Monetary Board still maintain the historic exchangeability of their two currencies, the Singaporean dollar and the Brunei dollar, respectively.
|
The Effects of Melatonin on the Descending Pain Inhibitory System and Neural Plasticity Markers in Breast Cancer Patients Receiving Chemotherapy: Randomized, Double-Blinded, Placebo-Controlled Trial Background: Adjuvant chemotherapy for breast cancer (ACBC) has been associated with fatigue, pain, depressive symptoms, and disturbed sleep. And, previous studies in non-cancer patients showed that melatonin could improve the descending pain modulatory system (DPMS). We tested the hypothesis that melatonin use before and during the first cycle of ACBC is better than placebo at improving the DPMS function assessed by changes in the 010 Numerical Pain Scale (NPS) during the conditioned pain modulating task (CPM-task) (primary outcome). The effects of melatonin were evaluated in the following secondary endpoints: heat pain threshold (HPT), heat pain tolerance (HPTo), and neuroplasticity state assessed by serum brain-derived neurotrophic factor (BDNF), tropomyosin kinase receptor B, and S100B-protein and whether melatonins effects on pain and neuroplasticity state are due more so to its impact on sleep quality. Methods: Thirty-six women, ages 18 to 75 years old, scheduled for their first cycle of ACBC were randomized to receive 20mg of oral melatonin (n = 18) or placebo (n = 18). The effect of treatment on the outcomes was analyzed by delta ()-values (from pre to treatment end). Results: Multivariate analyses of covariance revealed that melatonin improved the function of the DPMS. The -mean (SD) on the NPS (010) during the CPM-task in the placebo group was −1.91 , and in the melatonin group was −3.5 , and the mean difference (md) between treatment groups was 1.59 [(95% CI, 0.50 to 2.68). Melatonins effect increased the HPTo and HPT while reducing the ()-means of the serum neuroplasticity marker in placebo vs. melatonin. The -BDNF is 1.87 (7.17) vs. −20.44 (17.17), respectively, and the md = 22.31 ; TrKB md = 0.61 and S00B-protein md = −8.27. However, melatonins effect on pain and the neuroplastic state are not due to its effect on sleep quality. Conclusions: These results suggest that oral melatonin, together with the first ACBC counteracts the dysfunction in the inhibitory DPMS and improves pain perception measures. Also, it shows that changes in the neuroplasticity state mediate the impact of melatonin on pain. Clinical Trial Registration: www.ClinicalTrials.gov, identifier NCT03205033. INTRODUCTION Chemotherapy treatment for breast cancer has been associated with fatigue, pain, depressive symptoms, and disturbed sleep (;;Lvi, 2006;). Even in healthy women, sleep deprivation produces a significant decline in descending pain-inhibitory functions , and an increase in spontaneous painful symptoms (). Indeed, these previous findings affirm that poor sleep quality is a risk factor for exacerbation of chronic pain (;). Accordingly, previous studies showed that melatonin can improve both sleep quality and pain measures (i.e. endometriosis and fibromyalgia) (;de ). Also, it optimizes the descending pain modulatory system (DPMS). Additionally, experimental models show that the antiinflammatory properties of melatonin reduced nuclear factor B (NF-B) activity, a transcription factor found within neurons and glial cells (Lezoualc and Sparapani, 1998;;). NF-B regulates cellular processes such as migration, maturation, plasticity and synaptic communication and it is constitutively activated in glutamatergic neurons (Grilli and Memo, 1999;). In vitro studies revealed that melatonin resists microglial cytotoxicity by suppressing apoptosis and inhibiting the activity of NF-B (). Also, such activated cytokines may induce the secretion of neurotrophins such as brain-derived neurotrophic factor (BDNF) and S100-protein (Lvi, 2006;). BDNF has been positively correlated with the potency of the DPMS (). Also, it modulates excitatory and inhibitory transmission through the activation of glutamatergic NMDA receptors and inhibitory GABA receptors (). The primary BDNF receptor, tropomyosin kinase B (TrkB), can be a predictive marker of poor clinicopathological prognosis in breast cancer patients (), while preclinical studies have shown that inhibiting TrkB leads to favorable effects in neuropathic pain (). A positive correlation between BDNF and central sensitization (CS) has been shown in humans and carries a central role in the pathophysiology of chronic pain (). Overall, this set of evidence suggests that the benefits of neuroprotective effects of melatonin can counteract the neurotoxic effects induced by adjuvant chemotherapy for breast cancer (ACBC) on neuroplastic mechanisms involved in the pathophysiology of pain associated with chemotherapy. Thus, we tested the hypothesis that supplementing patients with melatonin before and during the first cycle of ACBC is better than placebo. We tested the hypothesis that melatonin use before and during the first cycle of ACBC is better than placebo to improve the DPMS function assessed by changes on the 0-10 Numerical Pain Scale (NPS) during the conditioned pain modulating (CPM) task (primary outcome). Melatonin's effects were evaluated in the following secondary endpoints: heat pain threshold (HPT), heat pain tolerance (HPTo), and the neuroplasticity state assessed by serum BDNF, TrkB, S100B-protein, and whether melatonin's effects on pain and the neuroplasticity are due more so to its impact on sleep quality. Study Design and Eligibility This randomized, double-blinded, placebo-controlled trial was approved by the Institutional Review Board of Hospital de Clnicas of Porto Alegre (IRB HCPA/Approval number: 14-0701), and it was registered on http://www.clinicaltrials.gov/ (No NCT03205033 Study start: January 2016, End date: April 2017) before inclusion of the first patient. We obtained oral and written informed consent from all patients before participating in this study. The identified data related to interventions and primary outcomes will be available upon request to interested to Caumo W ([email protected]) with no time restriction. Flow of this study is presented in Figure 1. Participants Patients were selected from the Mastology and Oncology Service at HCPA, a public tertiary teaching Medical School. Females aged 18 to 75 years with the capacity to read and write were selected. Inclusion criteria: females scheduled for their first cycle of ACBC one month following lumpectomy or mastectomy. Exclusion criteria: patients with previous chemotherapy, patients planned for neoadjuvant chemotherapy, or those with prior or other concurrent malignancies. Also excluded were patients with a history of melatonin allergy, sleep apnea, diabetes, autoimmune disease (i.e. systemic lupus erythematosus, type I diabetes, rheumatoid arthritis, inflammatory bowel disease, etc.), decompensated liver cirrhosis, severe kidney disease, epilepsy, cerebrovascular stroke, body mass index above 35 kg/ m 2, pregnant or breastfeeding, and a predictable likelihood of poor compliance. Sample Size Considerations We estimated the sample size based on previous studies that assessed melatonin's effect on the DPMS measured by the change on the NPS during the CPM-task. Accordingly, with six dependent variables and a large effect size (f 2 = 0.35) to compare melatonin and placebo by multivariate analyses of covariance (MANCOVA), with two predictors in a 1:1 ratio, the estimate indicated a sample size of 32 for a power of 80% and an of 0.05. Considering possible dropouts, we increased the sample by 12%, and the final sample size comprised of 36 patients (18 per group). Randomization and Masking We used a randomly selected block sizes of 8 and 6. Thirtysix women were allocated to receive melatonin or placebo, an allocation of 1:1. Before the recruitment phase, randomization was computer generated by two investigators uninvolved in the patients' assessments. Envelopes containing the allocated treatment were prepared, sealed, and numbered sequentially. The envelope was opened following the sequence of numbers registered in the envelope after the participant consented to participate in the trial. Following the conclusion of treatment, we assessed the effectiveness of the blinding protocol by asking patients to guess which treatment they each received (i.e. melatonin, placebo, or unknown). Interventions Patients were instructed to take 20 mg of oral melatonin or placebo daily approximately 1 h before bedtime. Melatonin capsules were produced using crystalline melatonin with a certificate of purity (M-5250, Sigma Chemical, Saint Louis, MO, USA) by a compounding pharmacy. The tablets of melatonin and placebo were physically identical. Assessments to confirm adherence to treatment included: i) Pill counting during the study period. ii) Patient diaries were kept in order to record if they failed to use the medication. iii) Patients were encouraged to remain on melatonin throughout the ten days of treatment. assessments and Instruments All assessments were conducted by two independently trained research personnel to apply psychophysical pain measurements. The timeline of assessments is presented in Figure 2. Outcomes The treatment effect on primary and secondary outcomes were evaluated by the ∆-value, defined by measurements at treatment end minus values at baseline. Changes in the NPS during the CPM-task assessed the function of the DPMS (primary outcome). The secondary outcomes were the changes produced by treatment in the following measures: HPT, HPTo, BDNF, TrkB, S-100B-protein. Assessment of Primary and Secondary Outcomes a. QST was the method utilized in the assessment of HPTs using the method of limits with a computer Peltier-based device thermode (30 30 mm) () that was attached to the skin surface of the ventral portion of the midforearm. The initial temperature of the QST is set at 32°C and it increases at a rate of 1°C/s to a maximum of 52°C. The average temperature in °C of three consecutive assessments enough to induce pain comprises the HPT. b. HPTo is the temperature induced by the QST to induce the maximum pain tolerated, with a ceiling of 52°C. c. DPMS was evaluated by the changes on the NPS ranging from 0 (no pain) to 10 (worst pain imaginable). The CPM was induced by a heterotopic noxious stimulus administered concurrently with a QST enough to produce a pain score of 6/10. The conditioned pain modulation (CPM) test was provoked by immersions of the nondominant hand into cold water (0 0 C) for 1 min. During the CPM-task, subjects were asked to rate the pain induced by a pre-defined thermal stimulus to produce a score of 6/10 on the NPS, then 30 Frontiers in Pharmacology | www.frontiersin.org November 2019 | Volume 10 | Article 1382 seconds later the heterotopic stimulus with cold-water hand immersion was performed. The CPM was defined as the difference between the average pain rating on the NPS before and after cold water immersion. d. Neuroplasticity state biomarkers were evaluated using serum levels of BDNF, TrkB, and S100B collected in plastic tubes and centrifuged for 10 min at 4,500 rpm at 4°C in a −80°C freezer for further BDNF and TrkB assays. Serum-mediator concentrations were determined using BDNF (Chemicon CYT306, lower detection limit 7.8 pg/mL; EMD Millipore, Billerica, MA, USA), TrkB (MYBI-MBS9346917, lower detection limit 0.25 ng/ml; MyBiosource, San Diego, CA, USA), S100B (EZHS100B-33 K, Millipore, Missouri, USA, lower detection limit 2.7 pg/mL), and enzymelinked immunosorbent assay kits in accordance with the manufacturer's instructions. Clinical Measurements: Depressive Symptoms and Sleep Quality a. Beck Depression Inventory is a questionnaire composed of 21 multiple-choice questions with four options each. The total BDI score ranges from 0-63; higher scores indicate a higher degree of depressive symptoms (). b. Pittsburgh Sleep Quality Index (PSQI). The PSQI is a selfreporting questionnaire that comprises 19-items to assess the quality of sleep and identifies sleep disorders (). The score ranging from 0 to 21. Other Instruments and Assessments The patients' demographic data were assessed using standardized demographic questionnaires. The side effects related to chemotherapy were assessed by the questionnaire of the European Organization for Cancer Research and Treatment validated for the Brazilian population (EORTC QLQ-C30) before and after treatment. Statistical analysis Inferential tests for demographic and clinical measures, as well as for the psychophysical pain measures and biomarkers of neuroplasticity (i.e. BDNF, TrkB, S100B), were based on independent sample t-tests for continuous variables and utilization of the Mann-Whitney non-parametric test. To control the inter-individual variability, existing imbalances between groups, and baseline differences of the DPMS function assessed using the NPS, HPT, HPTo, BDNF, TrkB, and S100B protein, we used the mean differences to identifying the real changes in psychophysical and laboratories tests in each patient (Roehrs and Roth, 2005). It recognized that psychophysiological measures show individual reactivity to a stimulus of the same intensity. For example, one individual may be highly reactive into painful stimuli, whereas another shows limited changes receiving the same stimulus. Especially with clinical studies, it may be necessary to not only look at the difference but to acknowledge the starting situations (i.e. adjust for the baseline value). Thus, to control for the interindividual variability changes in these psychophysical measures and serum markers of neuroplasticity, we compared the effect of treatment on the ∆-values from the baseline to their levels at treatment end. To analyze the treatment effect on all primary and secondary outcomes, we conducted MANCOVA. The dependent variables were the ∆-values of outcome measures ; the treatment group was the factor, and the ∆-values of sleep quality and depressive symptoms were covariates. The rationale to adjust the analysis by these two covariates is supported by evidence of previous studies, which showed that a better functioning of pain inhibition was positively associated with sleep efficiency and with the sleep duration (;a;Innominato and Lim, 2016). Also, a previous study found that the mood can influence the CPM response (Roehrs and Roth, 2005). So, it is plausible to adjust the melatonin effect on the outcomes considering the influence of these potential confounding factors. For this, the treatment effects on outcomes were examined by regression analysis. Also, all analyses were adjusted for multiple comparisons by Bonferroni's test. The analysis was by the intention-to-treat (ITT) method, we considered all of the randomized patients, and in the case of the dropout, we considered that the patient had a worst-case response in the respective treatment group (melatonin or placebo). For all analyses, we considered a Type I two-sided error (bicaudal) = 0.025. For statistical analyses, the IBM SPSS Statistics for Windows, Version 20.0 was used (IBM Corp., Armonk, NY, USA). Sociodemographic and Clinical Characteristics The characteristics of the participants are presented in Table 1. Randomization produced balanced groups for most of the characteristics, except in years of school. In the melatonin and placebo group, 13 (54.2%) vs. 11 (45.8%) assumed to have received melatonin, respectively. In the melatonin and placebo group, 4 (44.4%) vs. 5 (55.6%) assumed that they received placebo, respectively. Two in the melatonin group and one in the placebo group assumed that their treatment was unknown (P = 0.69). Regarding the severity of the adverse effect scores, according to EORTC the median and interquartile (Q 25-75 ) were observed to be at 10 (Q 25-75 = 2; 20) vs. 9 (Q 25-75 = 0; 24), P = 0.35, in the melatonin and placebo group, respectively. We observed that melatonin treatment reduced the severity of adverse effects as the median and interquartile (Q 25-75 ) was 7 (Q 25-75 = 2; 19) vs. 12.5 (Q 25-75 = 3; 25), P = 0.01, in the melatonin and placebo group, respectively. Primary and Secondary Outcomes Univariate Analysis of the Primary Outcome to Compare the Treatment Group Effect on the NPS During the CPM Task The efficiency of the DPMS assessed by the change on the NPS during the CPM-task increased 43.5% from T0 to T1 in the melatonin group, whereas it decreased 93% in the placebo group . The mean on the NPS during the CPM-task at T0, T1 and the ∆-value is presented in Table 3A). It confirmed that melatonin's effect optimizes the DPMS supported by the change on the NPS during the CPM-task. Also, it increased the HPT and HPTo, while reducing the serum levels of BDNF, TrkB, and S-100B. In Table 3B, the coefficients of the linear regression analysis of MANCOVA are presented. The result showed that the ∆-PSQI was negatively correlated with the ∆-value of changes on NPS during the CPM-task (Standardized Beta = −0.37; t = −2.20, P = 0.03, partial = 0.13). It is important to remember that a higher change on the ∆-PSQI means a better effect of melatonin on sleep quality, while a larger change on the NPS during the CPM-task indicates that the heterotopic stimulus was more effective. Hence, the difference in the NPS (PPT1 minus PPT0) produced a higher negative value. Thus, this explains the coherence of this negative correlation. The interaction analysis showed that melatonin's effect on the DPMS was not related to its impact on the improvement of sleep quality (Standardized Beta = 0.20, t = 0.78 P = 0.44). The ∆-values of means (∆-means) of each group (mean at treatment end minus mean before treatment) and the mean difference between the melatonin vs. placebo group, with their respective confidence interval (CI; 95%) compared using MANCOVA and adjusted for multiple comparisons showed that the melatonin reduced the serum levels of the neuroplasticity DISCUSSION These findings confirm the benefits of melatonin compared to placebo prior to and during the first cycle of ACBC by counteracting the neurotoxic effects on the inhibitory function of the DPMS evaluated by the change on the NPS during the CPM-task. Melatonin also increased the HPT and HPTo, while reducing the serum levels of the neuronal and astrocyte neuroplastic markers (i.e. BDNF, TrkB, and S100B-protein). The analysis showed that the effect of melatonin on the DPMS and the neuroplasticity state was not related to its impact on sleep quality. The novelty of this study was to reveal that melatonin may counteract processes related to ACBC that produces dysfunction in the inhibitory DPMS and in the neuroplastic state. These findings corroborate our previous results of melatonin's effect on the DPMS in fibromyalgia patients and provides mechanistic support to explain the high prevalence of pain claims in patients receiving ACBC. Also, these findings extend evidence as to how melatonin's effects on improving the inhibitory DPMS and changes in the neuroplasticity state are independent of its impact related to improving sleep quality. Thereby, these findings show that the influence of melatonin on the neural plasticity field can induce improvement in clinical outcomes related to pain and sleep quality. Although extensive literature supports the relationship between poor sleep quality and chronic pain, this relationship has been comprehended as a vicious cycle (). According to pre-clinical studies, sleep deprivation induces a synaptic instability in spinal cord neurons (), which may produce the imbalance between the excitability and inhibitory mechanisms. Considering that the melatonin has the potential to improve sleep quality (Innominato and Lim, 2016), we conducted an interaction analysis between the intervention group and sleep quality. This analysis allows exploring if the improvement in sleep quality has mediated the melatonin effect on pain measures. The interaction analysis revealed that the melatonin effect on pain perception and in the descending pain inhibitory system was independent of its impact on sleep quality and that the effect of melatonin on pain involved other mechanisms: (i) According to pre-clinical studies, in rats, the administration of selective MT2 receptor partial agonist UCM924 in the periaqueductal gray (PAG) may induce an antiallodynic effect in two models of neuropathic pain. This effect was entirely blocked by the MT2 receptor antagonist 4-phenyl-2propionamidotetralin (4P-PDOT) (a). Altogether, these findings demonstrate the involvement of MT2 receptor analgesic properties through modulation of a brainstem descending antinociceptive pathways. In another study, Lopez-Canul et al. (2015b) showed that the antinociceptive properties of UCM765 and UCM924 in acute and inflammatory pain models and corroborate the concept that MT2 melatonin receptor may be a novel target for analgesic effect. (ii) Although in the current study the melatonin effect on pain is likely mediated by mechanisms that are not directly related to sleep quality, we cannot exclude that the improvement in sleep efficiency and the sleep duration had affected the pain inhibition by other alternative mechanisms. This is, plausible since the relationship between sleep quality and the inhibitory function of DPMS has been found in different pain conditions for example in temporomandibular joint disorders (), rheumatoid arthritis (), and fibromyalgia (). It is noteworthy that the periaqueductal gray matter is a fundamental DPMS structure () and that the function of DPMS has been correlated with sleep effectiveness. (iii) According to pre-clinical studies, the pain inhibitory system at the periaqueductal gray depends on endogenous opioids and noradrenergic projections from the locus coeruleus (;;;Serikov and Lyashev, 2015), in such a way, that the descending pain inhibitory system and sleep share neurobiological mechanisms. (iv) Aligned with this perspective to comprehend the mechanisms related to sleep and the role of DPMS, an earlier study using functional magnetic resonance imaging (fMRI) revealed that FM patients compared to healthy controls showed a deactivation the rostral anterior cingulate cortex (rACC) (). This study suggests that the dysfunctional brainstem structures involved in pain inhibition are also involved either in sleep regulation. In the same way, another study revealed that sleep disturbances seem to engender the impairment of DPMS. This study indicates that melatonin's effect improved of the DPMS function, as well as reduced serum levels of BDNF. These results are in line with evidence from previous studies on chronic pain using melatonin, as serum BDNF was found to be reduced in patients with endometriosis (), while in fibromyalgia the DPMS was improved. Accordingly, mechanistic studies indicate that melatonin up-regulates gene expression of serum BDNF while pharmacological studies showed a direct role of TrkB signaling in the development of neuropathic pain (de ). Thus, these results support the notion that melatonin contraregulates the disruption in the BDNF-TrkB signaling induced by ACBC, which is crucial for the development, plasticity, and remodeling of neuronal circuits (Ren and Dubner, 2007). In this way, preclinical studies have demonstrated that TrkB inhibition has significant favorable effects in animal models regarding neuropathic pain, depression, cancer, and addictive behavior (;Yu and Chen, 2011;). Other additional mechanisms to explain the neuroprotective impacts of melatonin's ability to counteract the neurotoxicity of ACBC include anti-apoptotic, anti-inflammatory, and antioxidant effects ). Indeed, it is possible that the multiplicity of melatonin's properties reduces transient apoptosis in the brain induced by chemotherapy, as well as reducing neurotoxicity by reversing the microvasculature changes or cytokine activity responsible for diminishing neurogenesis and neuroplasticity. Additionally, a decrease of serum S100B concentration in our results supports that melatonin provides a modulatory effect on astrocytic activity (). In this way, it is also congruent with the function of serum S100B, a neurotrophic factor that may increase neural survival, neurite extension, and suppression of glial reactivity (Donato ). However, S100B-protein is toxic at very high concentrations. Present data further supports, due to its ability to surpass biological barriers such as the blood-brain barrier (BBB) (), that S100B inhibits inflammatory pathways that would cause brain damage. According to most pre-clinical studies on neuronal damage, melatonin is often given within a 1-20 mg/ kg dose range (;;), while at doses higher than 5 mg/kg it provides maximum neuroprotection in ischemic stroke models (). However, we cannot transpose the doses used in preclinical studies to humans without evaluating its effects on humans due to pharmacokinetic differences. Similarly, BDNF can cross the BBB bidirectionally, therefore a substantial portion of its serum levels originate from neuronal and glial cells, reflecting its neuronal concentration. Thus, BDNF concentrations found in the brain have been correlated with its serum concentrations (), suggesting that the neuroprotective effects of melatonin may involve a reduced release of BDNF. Similarly, in a study examining subjects with depression, melatonin safeguarded hippocampal neurons from damage via BDNF or glial cell-derived neurotrophic factor activation (). Contrarily, the S100B astroglial protein released in response to neuronal injury, exerts neurotrophic effects on neurons and glial cells (). As an astrocytic marker, S100B can be easily detected in the serum (), and an increase or decrease in levels has been observed in multiple known brain disorders. Although serum S100B may be elevated in acute neuronal damage, S100B levels were decreased in patients with underlying neurodegenerative disease () and also observed in patients who carry lower pain thresholds diagnosed with fibromyalgia. Several concerns regarding to our study must be addressed: First, the homogeneity of our sample gives rise to the issue of external validity as it is methodologically advantageous to answer the question of this study. Second, the awareness of group allocation assessment (either active or placebo) demonstrated that blinding was guaranteed, since the rate of patients of the melatonin group believed to have received placebo, or vice-versa, was very similar. Further, our objective surrogate biomarkers and psychological measurements are less susceptible to bias. Hence the unblinding issue is unlikely to have affected our conclusions. Third, a positive effect of melatonin was to reduce the adverse effects due to ACBC. Likewise, 20 milligrams of melatonin or lower as an adjuvant to cancer care with and without chemotherapy reduced asthenia, leucopenia, nausea and vomiting, hypotension, and thrombocytopenia (). However, it was reported that melatonin presents considerable variability in serum levels of 10 to 100 times with a bioavailability ranging from 10% to 56% among healthy subjects receiving the same dose. This variability in the pharmacokinetics of melatonin can explain at least part of the mixed results found in the melatonin effect among studies (). Fourth, although earlier research suggests that either chemotherapy regimen () or psychotropic medications can influence pain processing () in the present study, the distribution of these variables was very similar between groups indicating that the randomization worked (Table 1), whereas it is improbable that a minimal difference in these factors changes the directions of our conclusions. In conclusion, these results suggest that oral melatonin together with first ACBC counteracts the dysfunction in the inhibitory DPMS and improves pain perception measures. Also, it shows that changes in the neuroplasticity state mediate the impact of melatonin on pain. DaTa aVaIlaBIlITY STaTEMENT The datasets generated for this study are available on request to the corresponding author. ETHICS STaTEMENT This randomized, double-blinded, placebo-controlled trial was approved by the Institutional Review Board of Hospital de Clnicas of Porto Alegre (IRB HCPA/Approval number: 14-0701). We obtained oral and written informed consent from all patients before participating in this study. The identified data related to interventions and primary outcomes will be available upon request to interested to WC ([email protected]) with no time restriction. aUTHOR CONTRIBUTIONS AP conceived the study and participated in its design, coordination, sequence alignment, and drafting of the manuscript. AS, AZ participated in the design of the study, completion of the statistical analysis, and drafting of the manuscript. IT participated in the sequence alignment and drafting of the manuscript. JC, FS participated in the sequence alignment. VS participated in the design of the study and completion of the statistical analysis. FF participated in the design of the study and coordination, as well as with help drafting the manuscript. WC conceived the study and participated in its design, coordination, sequence alignment, and drafting of the manuscript.
|
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from open_pgp.djinni
#include "NativeAddress.hpp" // my header
#include "NativeOpenPgpKey.hpp"
#include "jni_base_h/Marshal.hpp"
namespace ProtonMail {
NativeAddress::NativeAddress() = default;
NativeAddress::~NativeAddress() = default;
auto NativeAddress::fromCpp(JNIEnv* jniEnv, const CppType& c) -> ::djinni::LocalRef<JniType> {
const auto& data = ::djinni::JniClass<NativeAddress>::get();
auto r = ::djinni::LocalRef<JniType>{jniEnv->NewObject(data.clazz.get(), data.jconstructor,
::djinni::get(::djinni::String::fromCpp(jniEnv, c.address_id)),
::djinni::get(::djinni::String::fromCpp(jniEnv, c.address_name)),
::djinni::get(::djinni::List<::ProtonMail::NativeOpenPgpKey>::fromCpp(jniEnv, c.keys)))};
::djinni::jniExceptionCheck(jniEnv);
return r;
}
auto NativeAddress::toCpp(JNIEnv* jniEnv, JniType j) -> CppType {
::djinni::JniLocalScope jscope(jniEnv, 4);
assert(j != nullptr);
const auto& data = ::djinni::JniClass<NativeAddress>::get();
return {::djinni::String::toCpp(jniEnv, (jstring)jniEnv->GetObjectField(j, data.field_mAddressId)),
::djinni::String::toCpp(jniEnv, (jstring)jniEnv->GetObjectField(j, data.field_mAddressName)),
::djinni::List<::ProtonMail::NativeOpenPgpKey>::toCpp(jniEnv, jniEnv->GetObjectField(j, data.field_mKeys))};
}
} // namespace ProtonMail
|
Curricula design model for designing and evaluating systems and computing engineering programs Recently, there has been a big movement towards converging engineering education and practice by means of defining clear and complete program goals. In this context, a large scale of educational institutions face challenges on how to specify the desired educational goals for a specific discipline and on how to instantiate and evaluate their program-specific designs according to these goals. We have defined a curricula design model for designing, redesigning, and evaluating systems and computing engineering (S&C) programs. The core of this model is the orientation to projects for the definition of educational goals that facilitate the definition of courses that integrate a set of these desired goals. This paper presents the core elements of the curricula design model and the methodology to instantiate it into a new program design that satisfies a desired professional profile. The curricula design model has been validated through its instantiation for redesigning the S&C program at the University of Los Andes in Colombia.
|
The Effects of Bupivacaine and Ropivacaine on Baroreflex Sensitivity With or Without Respiratory Acidosis and Alkalosis in Rats Systemic toxicity of local anesthetics causes cardiac and central nervous system (CNS) depression that could be enhanced in the presence of respiratory acidosis.We examined a potential suppression of baroreflex function with bupivacaine and ropivacaine during hypercapnic acidosis or hypocapnic alkalosis. Baroreflex sensitivity (BRS) was randomly tested in rats with one of 13 conditions during intravenous administration of saline (control), bupivacaine 1, 2, or 3 mg/kg, or ropivacaine 2, 4, or 6 mg/kg. The effects of bupivacaine (3 mg/kg) or ropivacaine (6 mg/kg) on BRS were also examined during hypercapnic acidosis or hypocapnic alkalosis. The BRS was assessed using a value of Delta heart rate/Delta mean arterial pressure after infusion of phenylephrine (3 micro g/kg). Both bupivacaine and ropivacaine (at the largest dose) significantly suppressed BRS. Acute respiratory acidosis (pHa 7.24 +/- 0.04, PaCO2 63 +/- 4 mm Hg) enhanced BRS. The BRS enhanced during acidosis was also suppressed with bupivacaine and ropivacaine, but less so than in the absence of acidosis. The presence of hypocapnic alkalosis (pHa 7.55 +/- 0.03, PaCO2 25 +/- 2 mm Hg) did not affect BRS and reversed BRS suppression caused by both drugs. Thus, bupivacaine and ropivacaine affect neuronal control mechanisms for maintaining cardiovascular stability, and acute changes of respiration could significantly modify such suppression. (Anesth Analg 1997;84:398-404)
|
<gh_stars>0
package com.easyctrl.fragment;
import android.content.Context;
import android.widget.ListAdapter;
import com.easyctrl.adapter.DeviceAdapter;
import com.easyctrl.db.DeviceManager;
import com.easyctrl.dialog.UpdateFRDDialog;
import com.easyctrl.dialog.UpdateFRDDialog.DialogSaveListener;
import com.easyctrl.impl.FloorRoomModuleListener;
import com.easyctrl.ldy.domain.DeviceBean;
import java.util.ArrayList;
import java.util.Iterator;
public class DeviceViewModel implements FloorRoomModuleListener {
private DeviceAdapter adapter;
private ArrayList<DeviceBean> beans;
private Context context;
private DeviceManager deviceManager;
private UpdateFRDDialog dialog;
private FloorRoomFragment fragment;
public DeviceViewModel(Context context) {
this.context = context;
this.deviceManager = DeviceManager.getInstance(context);
this.adapter = DeviceAdapter.getInstance(context);
this.dialog = new UpdateFRDDialog(context);
}
public void onDestroy() {
this.fragment = null;
this.beans = null;
this.deviceManager = null;
this.adapter = null;
this.context = null;
}
public ListAdapter onFloorRoomModuleListener() {
this.beans = this.deviceManager.findByTypeToObj(this.fragment.getType());
this.adapter.setBeans(this.beans);
return this.adapter;
}
public void addListener() {
this.dialog.setTitle("\u6dfb\u52a0\u8bbe\u5907\u540d\u79f0");
this.dialog.setHint("\u8bf7\u8f93\u5165\u8bbe\u5907\u540d\u79f0");
this.dialog.setOnSaveListener(new DialogSaveListener() {
public void onSaveOrUpdate(String content) {
DeviceBean bean = new DeviceBean();
bean.device_name = content;
bean.device_isSystem = 2;
bean.device_type = DeviceViewModel.this.fragment.getType();
DeviceViewModel.this.deviceManager.add(bean);
DeviceViewModel.this.beans = DeviceViewModel.this.deviceManager.findByTypeToObj(DeviceViewModel.this.fragment.getType());
DeviceViewModel.this.adapter.setBeans(DeviceViewModel.this.beans);
DeviceViewModel.this.fragment.setAdapter(DeviceViewModel.this.adapter);
}
});
this.dialog.show();
}
public void deleteListener() {
ArrayList<DeviceBean> beans = this.adapter.getDeletes();
Iterator<DeviceBean> it = this.adapter.getDeletes().iterator();
while (it.hasNext()) {
DeviceBean bean = (DeviceBean) it.next();
this.deviceManager.delete(bean.deviceID);
it.remove();
beans.remove(bean);
}
this.adapter.setBeans(this.deviceManager.findByTypeToObj(this.fragment.getType()));
this.fragment.setAdapterByCurrent(this.adapter);
}
public void onSaveORUpdate(int position) {
final DeviceBean bean = (DeviceBean) this.beans.get(position);
this.dialog.setContent(bean.device_name);
this.dialog.setOnSaveListener(new DialogSaveListener() {
public void onSaveOrUpdate(String content) {
bean.device_name = content;
bean.device_isSystem = 2;
bean.device_type = DeviceViewModel.this.fragment.getType();
DeviceViewModel.this.deviceManager.update(bean, bean.deviceID);
DeviceViewModel.this.beans = DeviceViewModel.this.deviceManager.findByTypeToObj(DeviceViewModel.this.fragment.getType());
DeviceViewModel.this.adapter.setBeans(DeviceViewModel.this.beans);
DeviceViewModel.this.fragment.setAdapterByCurrent(DeviceViewModel.this.adapter);
}
});
this.dialog.show();
}
public void onCancel() {
}
public FloorRoomFragment newInstance() {
this.fragment = new FloorRoomFragment();
this.fragment.setOnFloorroomModuleListener(this);
this.fragment.setTitle("\u8bbe\u5907\u7ba1\u7406");
return this.fragment;
}
public void onPause() {
}
}
|
package main
import (
"flag"
"fmt"
"io"
"net"
"os"
"os/signal"
"runtime"
"strings"
"syscall"
"time"
C "github.com/xjasonlyu/tun2socks/constant"
"github.com/xjasonlyu/tun2socks/core"
"github.com/xjasonlyu/tun2socks/filter"
"github.com/xjasonlyu/tun2socks/log"
"github.com/xjasonlyu/tun2socks/proxy"
"github.com/xjasonlyu/tun2socks/tun"
D "github.com/xjasonlyu/tun2socks/component/fakedns"
S "github.com/xjasonlyu/tun2socks/component/session"
)
const MTU = 1500
var (
args = new(CmdArgs)
// Modules init func
registeredInitFn []func()
fakeDNS D.FakeDNS
monitor S.Monitor
)
type CmdArgs struct {
// Main
Version *bool
TunName *string
TunAddr *string
TunGw *string
TunMask *string
TunDNS *string
TunPersist *bool
LogLevel *string
// Proxy
ProxyServer *string
UdpTimeout *time.Duration
// FakeDNS
EnableFakeDNS *bool
FakeDNSAddr *string
Hosts *string
HijackDNS *string
BackendDNS *string
// Session Monitor
EnableMonitor *bool
MonitorAddr *string
}
func registerInitFn(fn func()) {
registeredInitFn = append(registeredInitFn, fn)
}
func init() {
// Main
args.Version = flag.Bool("version", false, "Show current version of tun2socks")
args.LogLevel = flag.String("loglevel", "info", "Logging level [info, warning, error, debug, silent]")
args.TunName = flag.String("tunName", "utun0", "TUN interface name")
args.TunAddr = flag.String("tunAddr", "240.0.0.2", "TUN interface address")
args.TunGw = flag.String("tunGw", "240.0.0.1", "TUN interface gateway")
args.TunMask = flag.String("tunMask", "255.255.255.0", "TUN interface netmask")
args.TunDNS = flag.String("tunDNS", "8.8.8.8,8.8.4.4", "DNS resolvers for TUN interface (Windows Only)")
args.TunPersist = flag.Bool("tunPersist", false, "Persist TUN interface after the program exits or the last open file descriptor is closed (Linux only)")
// Proxy
args.ProxyServer = flag.String("proxyServer", "", "Proxy server address")
args.UdpTimeout = flag.Duration("udpTimeout", 30*time.Second, "UDP session timeout")
}
func showVersion() {
version := strings.Split(C.Version[1:], "-")
fmt.Printf("Go-tun2socks %s (%s)\n", version[0], version[1])
fmt.Printf("%s/%s, %s, %s\n", runtime.GOOS, runtime.GOARCH, runtime.Version(), version[2])
}
func main() {
// Parse arguments
flag.Parse()
if *args.Version {
showVersion()
os.Exit(0)
}
// Set log level
switch strings.ToLower(*args.LogLevel) {
case "debug":
log.SetLevel(log.DEBUG)
case "info":
log.SetLevel(log.INFO)
case "warning":
log.SetLevel(log.WARNING)
case "error":
log.SetLevel(log.ERROR)
case "silent":
log.SetLevel(log.SILENT)
default:
panic("unsupported logging level")
}
// Initialization modules
for _, fn := range registeredInitFn {
if fn != nil {
fn()
}
}
// Resolve proxy address
proxyAddr, err := net.ResolveTCPAddr("tcp", *args.ProxyServer)
if err != nil {
log.Fatalf("invalid proxy server address: %v", err)
}
proxyHost := proxyAddr.IP.String()
proxyPort := proxyAddr.Port
// Open the tun device
dnsServers := strings.Split(*args.TunDNS, ",")
tunDev, err := tun.OpenTunDevice(*args.TunName, *args.TunAddr, *args.TunGw, *args.TunMask, dnsServers, *args.TunPersist)
if err != nil {
log.Fatalf("failed to open tun device: %v", err)
}
// Setup TCP/IP stack
var lwipWriter = core.NewLWIPStack().(io.Writer)
// Wrap a writer to delay ICMP packets
lwipWriter = filter.NewICMPFilter(lwipWriter).(io.Writer)
// Register modules to proxy
proxy.RegisterMonitor(monitor)
proxy.RegisterFakeDNS(fakeDNS, *args.HijackDNS)
// Register TCP and UDP handlers to handle accepted connections.
core.RegisterTCPConnHandler(proxy.NewTCPHandler(proxyHost, proxyPort))
core.RegisterUDPConnHandler(proxy.NewUDPHandler(proxyHost, proxyPort, *args.UdpTimeout))
// Register an output callback to write packets output from lwip stack to tun
// device, output function should be set before input any packets.
core.RegisterOutputFn(func(data []byte) (int, error) {
return tunDev.Write(data)
})
// Copy packets from tun device to lwip stack, it's the main loop.
go func() {
if _, err := io.CopyBuffer(lwipWriter, tunDev, make([]byte, MTU)); err != nil {
log.Fatalf("copying data failed: %v", err)
}
}()
log.Infof("Running Go-tun2socks")
osSignals := make(chan os.Signal, 1)
signal.Notify(osSignals, os.Interrupt, os.Kill, syscall.SIGTERM, syscall.SIGHUP)
<-osSignals
// Stop fakeDNS
if fakeDNS != nil {
fakeDNS.Stop()
}
// Stop session monitor
if monitor != nil {
monitor.Stop()
}
}
|
<filename>server/src/main/java/io/graversen/requestbin/data/cassandra/RequestByRequestBinEntity.java
package io.graversen.requestbin.data.cassandra;
import com.datastax.driver.core.utils.UUIDs;
import lombok.Data;
import lombok.NonNull;
import org.springframework.data.cassandra.core.cql.Ordering;
import org.springframework.data.cassandra.core.cql.PrimaryKeyType;
import org.springframework.data.cassandra.core.mapping.Column;
import org.springframework.data.cassandra.core.mapping.PrimaryKeyColumn;
import org.springframework.data.cassandra.core.mapping.Table;
import java.time.LocalDateTime;
import java.util.UUID;
@Data
@Table("request_by_request_bin")
public class RequestByRequestBinEntity {
@NonNull
@PrimaryKeyColumn(name = "bin_id", type = PrimaryKeyType.PARTITIONED)
private String binId;
@NonNull
@PrimaryKeyColumn(name = "bucket", type = PrimaryKeyType.CLUSTERED, ordering = Ordering.DESCENDING)
private UUID bucket = UUIDs.timeBased();
@NonNull
@PrimaryKeyColumn(name = "created_at", type = PrimaryKeyType.CLUSTERED, ordering = Ordering.DESCENDING)
private LocalDateTime createdAt = LocalDateTime.now();
@NonNull
@Column("request_body")
private String requestBody;
@NonNull
@Column("query_parameters")
private String queryParameters;
@NonNull
@Column("http_headers")
private String httpHeaders;
@NonNull
@Column("ip_address")
private String ipAddress;
@NonNull
@Column("http_verb")
private String httpVerb;
@NonNull
@Column("request_duration")
private String requestDuration;
}
|
def part_two(self, verbose=False, limit=0):
mypath = path.Path(start=self.start, cave=self)
if self.finish in mypath.nodes:
return mypath.nodes[self.finish].minutes
else:
return None
|
As network technologies are developing and widely applied, network devices are not only required to perform rapid message forwarding, but also required to provide security-related services. Demands of the market encourages development of network security devices which are required to provide relatively good performance when implementing security-related processing on network data, such as security inspection and filtering, and so on.
To satisfy the above requirements, improved hardware performance and optimized service processing procedure of network security devices are key factors.
In the prior art, after receiving a packet, a network security device firstly searches security information entries in security-related configuration information one by one for one or more security information entries which match the 5-tuple information of the packet. Each time when finding a matching security information entry, the network security device performs security-related processing on the packet according to the security information entry. Security information entries are generally stored in multiple tables. Each table entry (or item) defines a type of security-related processing to be implemented on packets satisfying a certain condition, and each of those limitations is generally set for a specified stream (also called a session or a service). After implementing all matching security-related processing on the packet, the network security device then searches for packet forwarding information, and forwards the packet.
It can be seen that according to the prior art, the packet processing procedure is relatively long and the processing efficiency is relatively low. How to improve the packet processing performance of a network security device becomes a problem that security products need to deal with.
|
Orthodontic extraction practices: a cross-sectional survey of orthodontists in Australia Abstract Objective To survey Australian-based orthodontists regarding their opinions on their extraction practices. Method A pilot-tested electronic-questionnaire was distributed to 465 members of the Australian Society of Orthodontists. Questions pertained to their demographic details, current extraction rates, changes in prescribed orthodontic extraction patterns over the past 5 to 10 years and the factors that may have influenced decisions. Results A response rate of 35.05% was recorded. Orthodontists estimated that they extracted permanent teeth in 21.03% and 22.06% of recently treated adults and children/adolescents presenting with a Class I malocclusion. Respondents were less comfortable carrying out non-extraction treatment in child/adolescent patients (15.4%) than in adult patients (34.7%) when crowding was greater than 6 mm. Most orthodontists (55.89%) who had practiced for more than 5 years believed that the number of patients that were treated by extractions was unchanged over the past 5 to 10 years while 34.55% believed that the proportion had decreased. More experienced orthodontists tended to report increased rather than decreased extraction rates (p = 0.0102). Most of those (88.193.17%) who reported decreased extraction rates considered facial aesthetics had a moderate/major influence on their extraction decisions. The increased use of combined interproximal reduction (IPR) and arch lengthening in children/adolescents (55.8%) and IPR in adults (85%) was reported by those whose extraction rates had decreased. Conclusions Orthodontists extracted permanent teeth in just over 20% of their patients who presented with a Class I malocclusion. Most orthodontists considered that their extraction rates had not changed over the past 5 to 10 years. The increased use of IPR with or without arch lengthening procedures, was reported by those whose extraction rates had decreased over the same time period.
|
You don’t need a whole lot of hype for the Northwest Derby. Clashes between Manchester United and Liverpool leave emotions running high, and this weekend’s meeting was no different. So when a story comes out right before kickoff that very nearly drowns out the game itself, you know it’s a Thing.
So it was that fans and pundits were worked into a tizzy right before kickoff when Liverpool were forced to drop a bombshell— Joël Matip was out of the team because FIFA grounded him. Details were sparse, but it had something to do with Matip’s ties to the Cameroon national team and whether or not the 25-year-old defender was obligated to link up with them for the African Cup of Nations.
There’s a lot of confusion and hearsay and rabble-rousing in the wake of the story, so we’re going to try and walk you through what happened.
Matip was born in Bochum in 1991 to a German mother and a Cameroonian father. When he started pursuing football seriously as a career at Schalke’s youth academy, he had a choice to represent Germany or Cameroon as an international. The latter tried to call him up in late 2009 to compete in the 2010 African Cup of Nations, but he hadn’t made up his mind about national team affiliation and ultimately declined the invitation. (Germany, meanwhile, held out faint hope that Matip would line up for them instead.) By the spring of that year Matip had made up his mind and was in the Cameroon team for a March 2010 friendly against Italy. He went on to make the World Cup squads in 2010 and in 2014.
But a little over a year ago Matip fell out with national team officials while still with Schalke. The situation hadn’t improved, and last September— soon after his debut at Liverpool— Matip said he considered himself retired from international duty. Cameroon, however, hasn’t accepted his resignation, and insisted they can still recall him at any time. Matip, with the club’s and Jürgen Klopp’s backing, held firm and said he was done with the Cameroon national team. This mean, among other things, Liverpool felt comfortable keeping Matip available for team selection for league and cup fixtures— some good news, given that other key squad members such as Sadio Mané would be out of consideration until after AFCON.
But Cameroon refused to take No for an answer, and named Matip to their AFCON squad. Matip and Liverpool decided to call Cameroon’s bluff by not reporting to camp, insisting that the centerback’s international career was over.
That’s when FIFA intervened. Per Article 5 of FIFA’s player eligibility statutes, clubs are obligated to release their players for FIFA-sanctioned international fixtures.
As far as FIFA were concerned, Matip had to report for AFCON duty and Liverpool had to let him go. With FIFA slow to respond to the club’s requests for clarification and appearing to operate entirely on Cameroon’s side of the dispute, Liverpool were left unclear over whether they were allowed to name Matip in the teamsheet for their huge match against Manchester United. In what was probably their only sensible move at the time, Matip was dropped from the teamsheet right before kickoff.
So far, FIFA have not been forthcoming on what, if any, rights Matip and Liverpool have in this situation, saying only that their regulations on international eligibility and obligations are clear. (They’re not.) Cameroon appears unwilling to withdraw their request and FIFA aren’t being forthcoming with any clarification or attempts at resolution, other than to threaten Liverpool with sanctions if they attempt to let him suit up. FIFA have pledged to look into the dispute, but Matip could be out for as long as a month before a decision is made; by which time, AFCON will be long over and Liverpool will already have their busiest few weeks of the season in the rearview mirror.
Absent any definitive word from FIFA or flexibility from Cameroon, there are rumblings afoot today that Liverpool may try to force the issue by naming Matip to the team that takes on Plymouth Argyle in their FA Cup Third Round replay on Wednesday. While this may well pressure FIFA to, you know, do something for once, the blatant challenge to their authority would almost certainly result in an unfavorable ruling. It appears that Liverpool are willing to take the risk.
It’s hard to say how this is going to shake out and how long it’ll take to resolve. This could all be sorted out in the next few days. It could also drag on for a month or more. It’s enough to make you consider whether organized association football was a mistake.
|
// Method to post a new tweet
@PostMapping(value = "/tweets/{username}/add")
public ResponseEntity<?> postNewTweet(@PathVariable("username") String username, @RequestBody Tweet newTweet) {
return new ResponseEntity<>(tweetService.postNewTweet(username, newTweet),HttpStatus.CREATED);
}
|
// Update updates an existing AttributeKeyValue with a value.
// No action is applied to the map where the key does not exist.
func (am AttributeMap) Update(akv AttributeKeyValue) {
if av, existing := am.Get(akv.Key()); existing {
av.SetValue(akv.Value())
}
}
|
<gh_stars>0
package com.fivevsthree.puzzlecube3.views;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.assets.AssetManager;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.Texture.TextureFilter;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.scenes.scene2d.Action;
import com.badlogic.gdx.scenes.scene2d.Stage;
import com.badlogic.gdx.scenes.scene2d.Touchable;
import com.badlogic.gdx.scenes.scene2d.actions.Actions;
import com.badlogic.gdx.scenes.scene2d.ui.Label;
import com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle;
import com.badlogic.gdx.scenes.scene2d.ui.Table;
import com.badlogic.gdx.scenes.scene2d.ui.TextButton.TextButtonStyle;
import com.badlogic.gdx.utils.Array;
import com.badlogic.gdx.utils.IntMap;
import com.badlogic.gdx.utils.Timer;
import com.badlogic.gdx.utils.Timer.Task;
import com.fivevsthree.puzzlecube3.models.MenuModel;
public class MenuView extends View<MenuModel> {
protected BitmapFont font;
protected Table table;
protected Array<MenuItem> currentMenu;
protected Label fpsLabel;
private IntMap<Array<MenuItem>> menuList;
public MenuView(MenuModel model) {
super(model);
menuList = new IntMap<Array<MenuItem>>();
}
@Override
public void create() {
model.stage = new Stage();
model.menuItems = new Array<MenuItem>();
}
@Override
public void load(AssetManager assets) {
font = assets.get("skins/default.fnt");
font.getRegion().getTexture()
.setFilter(TextureFilter.Linear, TextureFilter.Linear);
TextButtonStyle style = new TextButtonStyle();
style.font = font;
// Main Menu
Array<MenuItem> mainMenu = new Array<MenuItem>();
mainMenu.add(new MenuItem("Sign In", style, MenuModel.SIGN_IN));
mainMenu.add(new MenuItem("Play", style, MenuModel.PLAY));
mainMenu.add(new MenuItem("Options", style, MenuModel.OPTIONS));
mainMenu.add(new MenuItem("Help", style, MenuModel.HELP));
mainMenu.add(new MenuItem("Exit", style, MenuModel.EXIT));
menuList.put(MenuModel.MAIN, mainMenu);
model.menuItems.addAll(mainMenu);
Array<MenuItem> playMenu = new Array<MenuItem>();
playMenu.add(new MenuItem("Resume", style, MenuModel.RESUME));
playMenu.add(new MenuItem("New", style, MenuModel.NEW));
playMenu.add(new MenuItem("Load", style, MenuModel.LOAD));
playMenu.add(new MenuItem("Save", style, MenuModel.SAVE));
playMenu.add(new MenuItem("Back", style, MenuModel.MAIN));
menuList.put(MenuModel.PLAY, playMenu);
model.menuItems.addAll(playMenu);
Array<MenuItem> newMenu = new Array<MenuItem>();
newMenu.add(new MenuItem("Size", style, MenuModel.SIZE));
newMenu.add(new MenuItem("Type", style, MenuModel.TYPE));
newMenu.add(new MenuItem("Stickers", style, MenuModel.STICKER));
newMenu.add(new MenuItem("Quality", style, MenuModel.QUALITY));
newMenu.add(new MenuItem("Back", style, MenuModel.PLAY));
menuList.put(MenuModel.NEW, newMenu);
model.menuItems.addAll(newMenu);
Array<MenuItem> sizeMenu = new Array<MenuItem>();
sizeMenu.add(new MenuItem("2x2x2", style, MenuModel.SIZE_2));
sizeMenu.add(new MenuItem("3x3x3", style, MenuModel.SIZE_3));
sizeMenu.add(new MenuItem("4x4x4", style, MenuModel.SIZE_4));
sizeMenu.add(new MenuItem("5x5x5", style, MenuModel.SIZE_5));
sizeMenu.add(new MenuItem("6x6x6", style, MenuModel.SIZE_6));
sizeMenu.add(new MenuItem("7x7x7", style, MenuModel.SIZE_7));
sizeMenu.add(new MenuItem("Back", style, MenuModel.NEW));
menuList.put(MenuModel.SIZE, sizeMenu);
model.menuItems.addAll(sizeMenu);
Array<MenuItem> qualityMenu = new Array<MenuItem>();
qualityMenu.add(new MenuItem("Low", style, MenuModel.QUALITY_LOW));
qualityMenu.add(new MenuItem("Medium", style, MenuModel.QUALITY_MEDIUM));
qualityMenu.add(new MenuItem("High", style, MenuModel.QUALITY_HIGH));
qualityMenu.add(new MenuItem("Back", style, MenuModel.NEW));
menuList.put(MenuModel.QUALITY, qualityMenu);
model.menuItems.addAll(qualityMenu);
LabelStyle labelStyle = new LabelStyle(font, Color.WHITE);
fpsLabel = new Label("0", labelStyle);
Timer.schedule(new Task() {
@Override
public void run() {
fpsLabel.setText(String.valueOf(Gdx.graphics.getFramesPerSecond()));
}
}, 0, 1);
}
@Override
public void show() {
showMenu(MenuModel.MAIN);
}
@Override
public void render(float delta) {
model.stage.act(delta);
model.stage.draw();
}
@Override
public void resize(int width, int height) {
model.stage.setViewport(width, height, true);
}
@Override
public void dispose() {
if (font != null) {
font.dispose();
}
if (model.stage != null) {
model.stage.clear();
}
}
protected void updateMenu() {
table = new Table();
table.setFillParent(true);
table.setTransform(false);
table.setTouchable(Touchable.childrenOnly);
for (MenuItem menuItem : currentMenu) {
table.row().expandX();
table.add(menuItem).center();
}
model.stage.clear();
model.stage.addActor(table);
model.stage.addActor(fpsLabel);
}
public void transitionOut(Action action) {
int i = 1;
for (MenuItem menuItem : currentMenu) {
menuItem.addAction(Actions.parallel(
Actions.moveBy(200 * i, 0, 0.25f), Actions.fadeOut(0.25f)));
i *= -1;
}
if (action != null) {
currentMenu.first().addAction(Actions.after(action));
}
}
public void transitionIn(Action action) {
int i = -1;
for (MenuItem menuItem : currentMenu) {
menuItem.addAction(Actions.sequence(Actions.alpha(0), Actions
.moveBy(200 * i, 0), Actions.visible(true), Actions
.parallel(Actions.moveBy(200 * -i, 0, 0.25f),
Actions.fadeIn(0.25f))));
i *= -1;
}
if (action != null) {
currentMenu.first().addAction(Actions.after(action));
}
}
public void showMenu(int menu) {
if (menuList.containsKey(menu)) {
currentMenu = menuList.get(menu);
for (MenuItem menuItem : currentMenu) {
menuItem.setVisible(false);
}
updateMenu();
}
}
public void notifyBackEvent() {
}
}
|
/**
* @author Christopher Lutz
*/
public class LoadManager {
private static Map<SourceEntry, ProcedureAction> results = new ConcurrentHashMap<>();
public static void load(File file) throws IOException {
load(new FileSourceEntry(file));
}
public static void load(SourceEntry entry) {
boolean success = LoadManager.loadSourceEntry(entry);
if (success) {
ProcedureAction action = LoadManager.retrieve(entry);
action.onAction(new TyRuntime(), TyObject.NONE);
}
}
public static boolean loadSourceEntry(SourceEntry... entries) {
boolean continueAfterParsing = true;
for (SourceEntry entry : entries) {
boolean success = doLoad(entry);
if (!success) {
continueAfterParsing = false;
}
}
return continueAfterParsing;
}
private static boolean doLoad(SourceEntry entry) {
try {
Parser p = new Parser(entry);
Block block = p.parse();
Interpreter i = new Interpreter(block);
ProcedureAction action = i.interpret();
results.put(entry, action);
} catch (Exception e) {
return false;
}
return true;
}
public static ProcedureAction retrieve(SourceEntry entry) {
return results.remove(entry);
}
}
|
After having shown off some hardware based on Microsoft’s ARM-based Windows RT operating system, hardware partner Toshiba has announced that it would not release any devices based on the lower-powered, lower-cost architecture and instead plans on focusing on developing machines (laptops, desktops, and tablets) based on Windows 8.
Windows RT is a stripped down version of Microsoft’s Windows 8 operating system that’s specifically designed to run on chipset architecture designed by ARM Holdings. Toshiba’s models would utilize chips made by Texas Instruments.
It’s unclear what components are in short supply or if Toshiba’s move has been dueled by other motives. Component manufacturer Texas Instruments has been pressured by shareholders to exit the ARM chipset market–it manufactures chips and brands them under the OMAP lineup. Additionally, Microsoft is rumored to release its highly anticipated Surface tablet at a $200 price point, which would make it hard for other OEMs to compete with; Microsoft has not commented on the speculated $200 price of the Surface tablet.
Toshiba has decided not to introduce Windows RT models due to delayed components that would make a timely launch impossible. For the time being, Toshiba will focus on bringing Windows 8 products to market. We will continue to look into the possibility of Windows RT products in the future while monitoring market conditions.
Microsoft had recent reaffirmed that OEM hardware partners Dell, Lenovo, and Samsung are committed to releasing machines based on Windows RT.
|
Impact of genetic variants in clinical outcome of a cohort of patients with oropharyngeal squamous cell carcinoma Tobacco- or human papillomavirus- driven oropharyngeal squamous cell carcinomas (OpSCC) represent distinct clinical, biological and epidemiological entities. The aim of this study was to identify genetic variants based on somatic alterations in OpSCC samples from an admixed population, and to test for association with clinical features. The entire coding region of 15 OpSCC driver genes was sequenced by next-generation sequencing in 51 OpSCC FFPE samples. Thirty-five percent of the patients (18/51) were HPV-positive and current or past tobacco consumption was reported in 86.3% (44/51). The mutation profile identified an average of 2.67 variants per sample. Sixty-three percent of patients (32/51; 62.7%) were mutated for at least one of the genes tested and TP53 was the most frequently mutated gene. The presence of mutation in NOTCH1 and PTEN, significantly decreased patients recurrence-free survival, but only NOTCH1 mutation remained significant after stepwise selection, with a risk of recurrence of 4.5 (HR 95% CI=1.1114.57; Cox Regression p=0.034). These results show that Brazilian OpSCC patients exhibit a similar clinical and genetic profile in comparison to other populations. Molecular characterization is a promising tool for the definition of clinical subgroups, aiding in a more precise tailoring of treatment and prognostication. Treatment for OpSCC has evolved in the past decades and often includes approaches for organ preservation based on concomitant chemotherapy and radiotherapy followed by salvage surgery in non-responders 8. This treatment frequently has long-term side effects, impacting patients' quality of life 9. Several treatment de-escalation trials for HPV-positive OpSCC have been initiated, which may lead to personalized treatment based on HPV status 10. Around 2/3 of HNC patients are diagnosed with advanced disease in different parts of the world 9, and at least 50% of them will relapse locally, regionally or at distant sites, within the first two years after treatment 9,14,15. While for HPV-positive OpSCC cases, 5-years overall survival rates (OS) are close to 80%, regardless of stage, TNM stage has a significant impact in OS for HPV-negative OpSCC: 70%, 58%, 50%, and 30% for stage I, II, III, and IV 18. Therefore, there is an increasing need for predictors of treatment response and disease progression/ relapse. Studies characterizing the spectrum of genetic alterations in cancers have been enabling a better understanding of the molecular alterations playing a role in head and neck carcinogenesis. A high level of intertumoral heterogeneity has been observed, confirming the biological complexity of these tumors. A common finding is that HPV-negative tumors have a higher mutation burden while HPV-positive tumors have far fewer genes mutated and variants per tumor, regardless of smoking status 22,23. Results from The Cancer Genome Atlas (TCGA) consortium on the molecular profile of 279 HNSCC tumors confirmed the differences at the molecular level between HPV-positive and negative cases, with frequent activating helical domain mutations in PIK3CA in HPV-positive cases and TP53 mutations and CDKN2A loss-of-function mutations in HPV negative cases 24. These findings suggest that the absence of the oncogenic effect from HPV oncoproteins in HPV-unrelated tumors requires the accumulation of multiple genetic aberrations to allow malignant transformation 23. Despite the different strategies for diagnosis and treatment of OpSCC patients, and the advent of HPV as an important prognostic marker, there is no molecular biomarker to guide selection among treatment and follow-up options that directly have an impact on patient survival. Therefore, the lack of risk categories based on clinical features and/or biomarkers that can be used for personalized treatment approaches for OpSCC has propelled research into the molecular landscape of these tumors. Moreover, there is an underrepresentation of genomic data on the mutation profile of HNC patients from admixed populations. Therefore, this study aims at identifying molecular alterations in a set of HNC patients from Brazil and to better characterize, together with clinical variables, OpSCC cases according to their outcome. Methods Sample population and DnA isolation. This study included pre-treatment formalin-fixed paraffin embedded (FFPE) tissue biopsies from 51 patients with primary oropharyngeal squamous cell carcinoma (OpSCC) diagnosed at the Department of Head and Neck Surgery of Barretos Cancer Hospital in Brazil between 2009 and 2017. These cases were selected based on very stringent criteria to ensure reliability of the clinical and molecular data as follows: pre-treatment FFPE tumor biopsies available from patients treated with curative intent by chemo-radiation protocols and with available follow-up data; samples with at least 60% of tumor cells at the histopathological examination and, with enough DNA for library preparation at an acceptable level of integrity as evaluated by multiplex PCR 25. Finally, after sequencing, only samples with acceptable scores of DNA sequencing quality were included (as described below). Hematoxylin & eosin stained sections of paraffin blocks containing the tumor tissue from the patients included were reviewed by two expert pathologists (CSN and GCA) for diagnosis confirmation and characterization of cellular components. Scrapings from regions containing at least 60% of tumor cells were processed using the QIAamp DNA FFPE Tissue Kit (Qiagen, Germany). Isolated DNA samples were eluted in 35 L of water and quantified in the Qubit fluorometer (Invitrogen, Carlsbad, CA) prior to storage at −20 °C until use. Information regarding tobacco and alcohol consumption, clinical and pathological features were retrieved from patient's charts. p16 immunohistochemistry was conducted as a surrogate marker for high-risk HPV (prediluted, monoclonal mouse antihuman p16INK4A protein, Clone E6H4TM, ready for use, Ventana, Tucson, AZ, USA). Samples with strong and diffuse nuclear and cytoplasmic staining in more than 75% of the tumor cells were considered positive for p16. Moreover, HPV-DNA detection of types HPV-16 and HPV-18 was performed in a subset of cases (n = 12) using droplet digital PCR as previously described and detailed in the Supplementary Methods 29. The present study was approved by the Barretos Cancer Hospital Institutional Review Board (approval number 425/2013) and all methods were performed in accordance with the relevant guidelines and regulations. next-generation sequencing (nGS) and genetic ancestry determination. To identify somatic mutations, we performed NGS of a panel of 15 genes, including some of the most frequently mutated genes in HNC, TP53, NOTCH1, CDKN2A, PTEN, PIK3CA, FBXW7, HRAS, TP63, CASP8, FAT1, KMT2D, RB1, IRF6, EZH2 and NSD1, based on a previous study 30. Bearing in mind the consensus regarding DNA fragmentation when recovered from FFPE, primers were designed to amplify fragments with sizes ranging from 125-175 base pairs, to minimize the effect of DNA fragmentation in the efficiency of library preparation. Therefore, three pools of primers were used for the simultaneous amplification of 923 amplicons from the 15 genes. Ten nanograms of genomic DNA from each sample were subjected to library preparation using the Ion AmpliSeq Library Kit 2.0 (Life Technologies, Carlsbad, CA) and an AmpliSeq Custom Panel (Life Technologies, Carlsbad, CA) designed to specifically amplify the entire coding region of the 15 genes, with a coverage of 99.26%. Samples were barcoded using IonXpress Barcode Adapters (Life Technologies, Carlsbad, CA). Automated template preparation and enrichment using an input of 30pM of purified library were performed in an Ion Chef System (Life Technologies, Carlsbad, CA) and sequencing was conducted in an Ion Torrent PGM (Life Technologies, Carlsbad, CA) using the Ion PGM Hi-Q View Sequencing Kit (Life Technologies, Carlsbad, CA). Statistical analysis. Statistical analysis was performed using the software IBM SPSS Statistics 23 for Windows. Categorical variables were compared using Fisher's exact or Chi-square test. Survival curves were calculated by Kaplan-Meier method and differences between groups were compared using the log-rank test. Recurrence-free survival was defined as the interval between the date of initial treatment and the diagnosis of recurrence. For all analysis, we considered statistical significance when p value <0.05. Results clinical description of the study population. Clinical and histopathological data of the 51 oropharyngeal cancer patients enrolled in this study are presented in Table 1. Most of the patients profiled in this cohort were male (98.0%) with age ranging from 35 to 76 years (mean/median = 55.3/55.0 years). Tobacco and alcohol consumption were self-reported by 86.3% and 96.0% of the cases, respectively. The majority of patients had advanced disease (according to the AJCC TNM 8 th edition 40 ) at diagnosis (84.3%), T3/T4 tumors (37/51, 72.5%) and with clinically positive lymph nodes at diagnosis (N+; 45/51, 88.2%). All patients were treated with a platin-based chemotherapy concomitant to radiotherapy between 2009 and 2017. The expression of p16 protein was detected in 18/51 samples (35.3%). For a small subset of cases with available DNA (n = 12), droplet digital PCR (ddPCR) was used for the detection of HPV-DNA for types HPV-16 and HPV-18 as part of another study (unpublished data). The agreement between p16-IHC and HPV-DNA results was of 91.7% (Cohen's Kappa Value = 0.833; p = 0.003): 6 were p16+ /HPV-DNA+, 5 were p16-/HPV-DNA-, but 1 had discordant a result, being p16 + /HPV-DNA-(Supplementary Table 1). Given the high agreement between p16-IHC and HPV-DNA results in the subset of samples tested, and the recommendation of this test as a surrogate marker for HPV-positivity on a clinical setting 41, we considered patients with tumor p16-IHC expression as positive for HPV infection in this study. We also included a set of 39 OpSCC with available mutational, tobacco consumption and HPV status (by p16-IHC and/or in-situ hybridization) from the TCGA study recovered from the Xena database (Supplementary Table 2). Of the 39 OpSCC cases, 79.5% (31/39) were HPV-positive and 69.2% were current or former smokers (26/39). Therefore, our cohort had a substantially lower rate of HPV-positive cases and higher prevalence of current or former tobacco smoker patients in comparison to this set of patients from the TCGA study. For TP53, the most frequently mutated gene in our cohort, most of the mutations were missense (28/51), 5 were truncating (3 frameshift and 2 nonsense) and the majority occurred within the p53 DNA-binding domain (between codons 95 and 288) ( Supplementary Fig. 3A). NOTCH1 was the second most frequently mutated gene in our cohort (11/51) and all variants observed were missense with a high fraction happening in the N-terminal epidermal growth factor (EGF)-like ligand binding domains and another fraction in the C-terminal end, mainly around and within the Ankyrin repeat domain ( Supplementary Fig. 3B). HPV status Interestingly, of the 19 cases for which no mutation was detected for the genes tested, all but one patient (18/19; 94.7%) were exposed to at least one of the risk factors evaluated (tobacco smoking and/or positivity for HPV infection): 3 (15.8%) cases were never-smokers, but HPV-positive; 8 were smokers, but HPV-negative; and 7 were smokers and HPV-positive ( Fig. 1 and Supplementary Fig. 6). Association between mutation status and clinical and outcome data. We tested whether the presence of mutation in the genes evaluated could be associated with the following demographical and clinical features: age at diagnosis, gender, tobacco consumption, drinking status, HPV status, T stage, N status and clinical stage. The only statistically significant association found was between NOTCH1 mutation and tumor size: all tumors with NOTCH1 mutation (11/11; p = 0.023) had a higher T-stage (T3/T4). Next, we constructed Kaplan-Meier curves to assess the impact of gene mutations in recurrence-free survival of the patients tested. Although not statistically significant, the presence of mutation in at least one of the genes tested showed a decrease in recurrence-free survival (47.9% versus 80%; log rank p-value = 0.156), the same was observed for the presence of TP53 (42.6% versus 75.9% for WT; log rank p-value = 0.137) ( Table 3). The presence of mutation in NOTCH1, significantly decreased the recurrence-free survival (RFS) of mutated cases (25.1% for mutated cases and 68.2% for WT; log-rank p-test = 0.032) ( Table 3 and Fig. 2A). In a multivariate hazard ratio analysis for recurrence, adjusted by HPV and tobacco status, clinical stage, age at diagnosis, TP53, PTEN and NOTCH1 mutation status, only NOTCH1 mutation remained significant after stepwise selection, with a risk of recurrence of 4.503 for mutated cases (HR 95% CI = 1.112-14.572; Cox Regression p = 0.034) (Fig. 3). www.nature.com/scientificreports www.nature.com/scientificreports/ The presence of PTEN mutation was also significantly associated with decreased recurrence-free survival (RFS: 25% versus 64.5% in WT; log rank p-test = 0.045) ( Table 3 and Fig. 2B). However, the risk estimate by Cox regression was not statistically significant (Fig. 3). Breakdown of TP53 effect in clinical outcome. As mentioned earlier, 45.1% (23/51) of the samples tested harbored TP53 mutations. Although not statistically significant, we observed that the presence of TP53 variants reduced recurrence-free survival (42.6% versus 75.9% for WT; log rank p-value = 0.137). We further explored TP53 missense mutations by using the Evolutionary Action score of TP53-coding variants (EAp53) 38,39 to predict the impact of TP53 mutations on outcome: 34.8% (8/23) of the mutated cases were scored as having low-risk variants, while 65.2% had high-risk variants. High-risk variants carriers had an increased risk of 2.540-fold of having a recurrence (HR 95% CI = 0.852-7.575; p-value = 0.095) and a marginally significant decreased recurrence-free survival (38.4% versus 71.8%; log rank p-test = 0.080) ( Table 3). Discussion Oropharyngeal squamous cell carcinomas arise from epithelial cells of the mucosal lining of the upper aerodigestive tract and, despite all cases developing from one cell type in one tissue, these tumors are remarkably heterogenous. This heterogeneity can be further explained by differences in etiology and in molecular alterations that drive carcinogenesis 42. OpSCC were classically associated with heavy tobacco and alcohol consumption; however, a significant decrease in cases related to tobacco/alcohol and an increase in cases related to infection by high-risk human papillomavirus (HPV) is being observed, especially in high and middle-income countries 2,43. In our cohort, most of the cases were current or former-smokers (86.3%) and only 35.3% were HPV-positive (by p16-IHC); even within the HPV-positive group, the majority of cases were smokers (66.7%). This information shows that tobacco smoking still seems to have a bigger impact in the onset of OpSCC treated at our institution. Despite the small number of cases evaluated in our study, tobacco smoking was significantly associated with reduced recurrence-free www.nature.com/scientificreports www.nature.com/scientificreports/ survival (RFS), while HPV-status association with increased RFS was marginally significant. It is noteworthy that the majority of HPV-positive cases in our cohort were current or former smokers (12/18; 66.7%). HPV-positive OpSCC has a clearly improved outcome; however, smoking has a reportedly adverse effect on prognosis in both HPV-positive and HPV-negative cases 6. This may have impacted the survival rates we observed, since although higher than in the HPV-negative group, the difference was not statistically significant. Brazilian population has been frequently characterized by a considerable admixture of different ancestries in the genetic composition within individuals. Several studies have explored this admixture in large numbers of patients with the most prevalent tumor types (breast 44, colorectal 31 and lung 45 ), as well as in the healthy population 34. All these studies found similar results, with a confirmed mixture of ancestry markers for the populations examined and a higher proportion of European ancestry markers, followed by African and then Asian and/ or Native American in most of the patients. We were unable to test all our patients for genetic ancestry, but the small subset tested confirmed these results. Previous studies have shown differences in prevalence of mutation in specific genes according to genetic ancestry, such as an enrichment of TP53 mutations in AFR and of PIK3CA in EUR 46. However, statistically significant confirmation of the genetic ancestry profile of the patients evaluated in this study and testing for any associations with the prevalence of gene mutations would require the evaluation of a substantially larger number of cases. The most recent genomic progression model for head and neck cancer, resulting from new insights into the cancer genes that are commonly mutated in these tumors, points to different routes towards mucosal squamous cell carcinoma transformation. There seem to be three main genetic subgroups with two of them closely related to the etiology: (i) HPV-related; (ii) tobacco-related; and (iii) HPV-negative/tobacco-negative 42. Our main findings will be discussed below based on these subgroups. For HPV-positive cases, transcriptionally-active human papillomavirus leads to cell cycle deregulation through the abrogation of p53 and pRb pathways by the viral oncoproteins E6 and E7 (HPV E6 and E7). Further oncogenic events may lead to differentiation in HPV-KRT (HPV-keratinocyte differentiation and oxidative reduction process) or HPV-IMU (HPV-immune response and mesenchymal cell differentiation) tumors 47. p16 detection by immunohistochemistry (p16-IHC) was included in the clinical routine as the gold-standard test for HPV-positive oropharyngeal SCC with proved clinical impact 18,48 due to its easy-of-use, low cost and high sensitivity rates (near 100%) 41,49. However, it frequently yields not ideal specificity rates (79% and 95%), detecting a positive p16 signal in tumors not associated with HPV. For this reason, several studies have suggested additional HPV-specific tests to ensure accurate classification of OpSCC as HPV-related 48,51,52. In our study, we performed HPV-DNA detection in a subset of the cases and observed a high agreement with p16-IHC results. Moreover, molecular characterization closely agreed with other studies that also used HPV-status to describe results. HPV-positive tumors usually have a lower mutational burden, are usually WT for TP53 mutations and frequently harbor activating PIK3CA mutations and amplifications (mainly the HPV-KRT) 20,22,47,53. In accordance to this, in our cohort, HPV-negative cases had 2.5-times more variants than HPV-positive cases (3.27 ± 5.854 versus 1.33 ± 3.162, respectively). Moreover, even though most of our HPV-positive cases were smokers (12/18; 66.7%), the frequency of TP53 mutation in this subgroup was significantly lower (16.7%; p = 0.003). Conversely, we found 2 HPV-positive case with PIK3CA mutation (2/18; 11.1%); a classic C > T mutation in the helical domain, frequent in viral-associated tumors (p.E545K) and commonly associated with the apoliprotein B mRNA-editing enzyme catalytic subunit (APOBEC)-induced mutational signature 24,54. Hayes and colleagues reported in a review article a frequency between 22-56% of PIK3CA activation in HPV-positive HNC; however, we only evaluated somatic mutations in the present study and did not explore copy-number alterations (CNA). This might explain the lower frequency in comparison to other studies that relate this activation both to mutation and amplification in HPV-positive cases 53. As expected, besides TP53, genes frequently mutated in tobacco-related HNC had a low frequency of mutation in the HPV-positive group, namely NOTCH1 (1/18; 5.6%), CDKN2A (2/18; 11.1%) and FAT1 (3/18; 16.7%) 53,55. The second and most classic subgroup of HNC is associated with tobacco-smoking and also involves deregulation of the cell cycle mainly through loss-of-function (LoF) of two tumor suppressor genes: TP53 and CDKN2A. CDKN2A encodes the p16INK4A protein and is lost through deletion, inactivating mutations and hypermethylation in 15-22% of HNC 53. Together with the frequent amplification of cyclin D1 (CCND1), also common in tobacco-associated HNC, CDKN2A LoF contributes to unscheduled DNA replication and leads to DNA damage and p53 activation 56 ; however, TP53 inactivation is also found in 60-80% of HNC cases 5,24, thus abrogating cell cycle arrest and apoptosis 57. Consequently, these tumors have a higher mutational burden and frequent copy number alterations 42. In our cohort, we found an overall rate of CDKN2A and TP53 mutation of 9.8% and 45.1%, respectively. Dogan and colleagues found similar rates, when using a targeted exome sequencing approach to characterize 83 HPV-negative and 74 HPV-positive OpSCC 58 : 49% of the cases were mutated for TP53, while 22% harbored CDKN2A mutations and deletions. Moreover, we did not test for CDKN2A inactivation through deletion or hypermethylation. However, among mutated cases, these genes were more frequently mutated in current/former smokers with rates of 83.3% for CDKN2A and 95.7% for TP53. The breakdown rates according to HPV status were: 78%/16% for TP53 mutations in HPV-negative/positive cases and 39% versus 4% for CDKN2A mutations in HPV-negative/positive cases.It is already known that the presence of TP53 mutations has an important impact in disease progression, treatment response, specially to platinum-based therapy, and survival. Although not statistically significant, we observed that the presence of TP53 variants reduced recurrence-free survival (42.6% versus 75.9% for WT; log rank p-value = 0.137). Next, we explored whether the algorithm Evolutionary Action (EAp53), that stratifies patients according to TP53 variants associated with especially poor outcomes 38,39, could be used as a classificatory in our cohort. The association of TP53 variants classified with EAp53 still did not reach significance, but it is clear that, for our patients, high-risk variants carriers had an increased risk of 2.540-fold of having a recurrence (HR 95% CI = 0.852-7.575; p-value = 0.095) and a marginally significant decreased recurrence-free survival ( www.nature.com/scientificreports www.nature.com/scientificreports/ studies have tested this algorithm in HPV-negative HNC and validated the association of high-risk TP53 variants, as classified by EAp53, with decreased sensitivity to cisplatin, decreased survival and increased distant metastases in HNC 38,39. Here we focused our analysis in OpSCC patients with a significant representation of HPV-positive cases and treated by chemoradiation. These differences should be taken into consideration in the interpretation of the algorithm results. After cell-cycle abrogation, HPV-negative/tobacco-positive cases usually acquire more alterations that drive different routes towards the progression of these tumors. These pathways usually involve squamous differentiation, oxidative stress and WNT signaling. Between 10-21% of HNC demonstrate LoF mutations in NOTCH1, impacting squamous differentiation and cell polarity, while 5-23% of cases harbor mutations in FAT1, an important component of the WNT signaling 53. This route seems to impact beta-catenin signaling and keratinocyte transformation, and tobacco-smoking is a known risk factor 42. We found similar rates of mutated cases for these genes in our cohort, and the majority of cases mutated for NOTCH1 and FAT1 were current or former smokers. Moreover, we found and association between NOTCH1 mutation and a higher T stage, consistent with previous studies showing that functional NOTCH1 inhibits proliferation in SCC cells and that loss of canonical NOTCH increases tumorigenesis in both HPV-positive and p53-mutant mice 21,63. In addition, the presence of NOTCH1 mutations significantly impacted recurrence-free survival. Emerging evidence indicates that Notch effects are dependent on the cellular context in which it is activated, with aberrant Notch signaling being associated with cancer recurrence, metastasis and treatment resistance in different tumor sites 64. In a recent study, Lim and colleagues tested the feasibility of using targeted NGS to guide treatment of HNC patients, among the genes with association with a poorer overall survival they found NOTCH1 mutation as a predictor of worse outcome 65. Similarly, Dong and colleagues found that in HPV-positive OpSCC cases, the presence of NOTCH1 mutations contributed to a worse overall-survival 58. Vettore and colleagues also found an association between the presence of mutations in genes of the Notch pathway and a lower disease-free survival in patients with oral tongue carcinoma 66. In a cohort of esophageal carcinomas from China, Song and colleagues found that patients with mutations in NOTCH1 had shorter survival and failed to respond to chemotherapy 67. These results agree with our findings that the status of NOTCH1 mutations is a promising predictive biomarker for patient outcome and treatment response in OpSCC. Finally, PTEN is a tumor suppressor gene mutated in 9-23% of HPV-negative HNC, leading to oncogenic activity through the activation of the PI3K/AKT/mTOR signaling 42. We found PTEN mutations in 7.8% of the cases tested; once again, this rate does not include CNAs. Interestingly, we observed a significant decrease in recurrence-free survival in the presence of PTEN mutation (25% versus 64.5% in WT; log rank p-test = 0.045). A recent study found that patients with high-expressing PTEN had an improved progression-free survival in response to cetuximab, in comparison to patients with low expression of this gene 68. A similar scenario was observed in a Brazilian study on HNC patients treated with cetuximab, with a worse progression-free and overall-survival in patients with loss of PTEN 69. To our knowledge, this is the first study showing the association between NOTCH1 and PTEN mutations and survival in OpSCC patients treated with platin-based chemotherapy plus radiation. The third subgroup of HNC comes mainly from previous studies that identified a subset of HNC with a strong correlation between gain of function HRAS mutations and LoF mutation in CASP8 21,42,70. This subgroup is usually described as diploid, as having fewer CNAs, DNA mismatch repair proficient and to occur more frequently in women with oral cavity tumors without a history of alcohol and smoking consumption 21,70. The prevalence rates of this subgroup and the clinical impact is yet to be studied 42. We did not detect any case with CASP8 variants in our cohort; moreover, all 3 cases identified with HRAS mutation were current or former smokers and one of them was also HPV-positive. Although differences in the mutation rates of specific genes were observed, mostly due to different prevalence of risk factors (HPV and tobacco smoking), when comparing the results on our cohort and the TCGA OpSCC samples explored, the frequency of cases mutated for at least one of the genes was similar (62.7% versus 64.1%). In the TCGA publication with genomic data on head and neck cancer, only 14% of the samples tested did not present mutation in any gene 24. Besides including data from all subsites within head and neck cancer, the mutation data reported in the article compiled results from whole exome sequencing, while we only tested a panel of a limited number of genes. This can explain the similarities between mutation rates in the two cohorts of OpSCC samples explored in this article in comparison to the frequency reported in the TCGA publication. Recently, Perdomo and collaborators, evaluated a similar panel of genes in a cohort comprised of 180 HNC from 3 multicentric studies from South America and Europe 30. The study reports that 25% of the cases were from the oropharynx (45/180), and only 8% of the entire cohort was HPV-positive (15/180) 30. Therefore, their cohort was enriched for HPV-negative cases, and, although the number of OpSCC tested was similar to ours, only around 8% were HPV-positive, in contrast to our 35.3% frequency of HPV-positivity. This might explain the slightly lower rates of TP53 mutations and other genes associated with tobacco-smoking in our cohort in comparison to their findings. In addition, they also explored somatic CNA, that are also included in their higher rates. Our study has some limitations being the small number of cases evaluated and the short follow-up (median of 26 months) possibly the most important ones, directly impacting the statistical significance of the molecular findings in patient outcome. Besides that, we also did not evaluate copy-number alterations of the genes included, hindering comparisons to other genomic studies that include amplification and deletion in the mutational frequencies. It is important to point out that there is a lack of genomic studies including Brazilian cases; therefore, our study focused in the profile of somatic variants of a set of genes in a cohort of Brazilian OpSCC patients submitted to a homogeneous treatment and with sufficient and well-annotated clinical data. Despite of differences in geographic, economic and social habits when compared to other populations, the results were comparable to those reported before and new insights into possible molecular mechanisms associated with outcome were suggested.
|
High-activity barley alpha-amylase by directed evolution. Barley alpha-amylase isozyme 2 was cloned into and constitutively secreted by Saccharomyces cervisiae. The gene coding for the wild-type enzyme was subjected to directed evolution. Libraries of mutants were screened by halo formation on starch agar plates, followed by high-throughput liquid assay using dye-labeled starch as the substrate. The concentration of recombinant enzyme in the culture supernatant was determined by immunodetection, and used for the calculation of specific activity. After three rounds of directed evolution, one mutant (Mu322) showed 1000 times the total activity and 20 times the specific activity of the wild-type enzyme produced by the same yeast expression system. Comparison of the amino acid sequence of this mutant with the wild type revealed five substitutions: Q44H, R303K and F325Y in domain A, and T94A and R128Q in domain B. Two of these mutations. Q44H and R303K, result in amino acids highly conserved in cereal alpha-amylases. R303K and F325Y are located in the raw starch-binding fragment of the enzyme molecule.
|
package io.dockstore.client.cli;
import static io.dockstore.common.Hoverfly.BAD_PUT_CODE;
import static io.dockstore.common.Hoverfly.ORCID_SIMULATION_SOURCE;
import static io.dockstore.common.Hoverfly.ORCID_USER_1;
import static io.dockstore.common.Hoverfly.ORCID_USER_2;
import static io.dockstore.common.Hoverfly.PUT_CODE_USER_1;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.fail;
import io.dockstore.common.CommonTestUtilities;
import io.dockstore.common.DescriptorLanguage;
import io.dockstore.common.SourceControl;
import io.dockstore.openapi.client.ApiClient;
import io.dockstore.openapi.client.ApiException;
import io.dockstore.openapi.client.api.ContainersApi;
import io.dockstore.openapi.client.api.EntriesApi;
import io.dockstore.openapi.client.api.UsersApi;
import io.dockstore.openapi.client.api.WorkflowsApi;
import io.dockstore.openapi.client.model.DescriptionMetrics;
import io.dockstore.openapi.client.model.DockstoreTool;
import io.dockstore.openapi.client.model.User;
import io.dockstore.openapi.client.model.Workflow;
import io.dockstore.openapi.client.model.WorkflowVersion;
import io.dockstore.webservice.core.TokenScope;
import io.dockstore.webservice.core.Version;
import io.dockstore.webservice.resources.EntryResource;
import io.specto.hoverfly.junit.core.Hoverfly;
import io.specto.hoverfly.junit.core.HoverflyMode;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.http.HttpStatus;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.contrib.java.lang.system.ExpectedSystemExit;
import org.junit.contrib.java.lang.system.SystemErrRule;
import org.junit.contrib.java.lang.system.SystemOutRule;
public class EntryResourceIT extends BaseIT {
@Rule
public final ExpectedSystemExit systemExit = ExpectedSystemExit.none();
@Rule
public final SystemOutRule systemOutRule = new SystemOutRule().enableLog().muteForSuccessfulTests();
@Rule
public final SystemErrRule systemErrRule = new SystemErrRule().enableLog().muteForSuccessfulTests();
@Before
@Override
public void resetDBBetweenTests() throws Exception {
CommonTestUtilities.cleanStatePrivate2(SUPPORT, false);
}
/**
* Tests that exporting to ORCID does not work for entries or versions without DOI
* Also tests that endpoint can be hit twice (create, then update)
* Also tests handling of synchronization issues (put code on Dockstore not on ORCID, put code and DOI URL on ORCID, but not on Dockstore)
*/
@Test
public void testOrcidExport() {
ApiClient client = getOpenAPIWebClient(USER_2_USERNAME, testingPostgres);
EntriesApi entriesApi = new EntriesApi(client);
UsersApi usersApi = new UsersApi(client);
User user = usersApi.getUser();
WorkflowsApi workflowsApi = new WorkflowsApi(client);
workflowsApi.manualRegister(SourceControl.GITHUB.name(), "DockstoreTestUser/dockstore-whalesay-wdl", "/dockstore.wdl", "",
DescriptorLanguage.WDL.getShortName(), "");
List<Workflow> workflows = usersApi.userWorkflows(user.getId());
Long workflowId = workflows.get(0).getId();
workflowsApi.refresh1(workflowId, false);
Assert.assertTrue(workflows.size() > 0);
Workflow workflow = workflowsApi.getWorkflow(workflowId, null);
List<WorkflowVersion> workflowVersions = workflow.getWorkflowVersions();
Long workflowVersionId = workflowVersions.get(0).getId();
try {
entriesApi.exportToORCID(workflowId, null);
fail("Should not have been able to export an entry without DOI concept URL");
} catch (ApiException e) {
Assert.assertEquals(HttpStatus.SC_BAD_REQUEST, e.getCode());
Assert.assertEquals(EntryResource.ENTRY_NO_DOI_ERROR_MESSAGE, e.getMessage());
}
testingPostgres.runUpdateStatement("update workflow set conceptDOI='https://doi.org/10.1038/s41586-020-1969-6'");
try {
entriesApi.exportToORCID(workflowId, workflowVersionId);
fail("Should not have been able to export a version without DOI URL");
} catch (ApiException e) {
Assert.assertEquals(HttpStatus.SC_BAD_REQUEST, e.getCode());
Assert.assertEquals(EntryResource.VERSION_NO_DOI_ERROR_MESSAGE, e.getMessage());
}
try {
entriesApi.exportToORCID(workflowId, workflowVersionId + 1);
fail("Should not have been able to export a version that doesn't belong to the entry");
} catch (ApiException e) {
Assert.assertEquals(HttpStatus.SC_BAD_REQUEST, e.getCode());
Assert.assertEquals(EntryResource.VERSION_NOT_BELONG_TO_ENTRY_ERROR_MESSAGE, e.getMessage());
}
try {
testingPostgres.runUpdateStatement("insert into token (id, content, refreshToken, tokensource, userid, username, scope) values "
+ "(9001, 'fakeToken', 'fakeRefreshToken', 'orcid.org', 1, 'Potato', '/authenticate')");
entriesApi.exportToORCID(workflowId, null);
Assert.fail("Cannot insert the actual scope, must be enum");
} catch (ApiException e) {
Assert.assertEquals(HttpStatus.SC_INTERNAL_SERVER_ERROR, e.getCode());
testingPostgres.runUpdateStatement("delete from token where id=9001");
}
try {
testingPostgres.runUpdateStatement("insert into token (id, content, refreshToken, tokensource, userid, username, scope) values "
+ "(9001, 'fakeToken', 'fakeRefreshToken', 'orcid.org', 1, 'Potato', '/activities/update')");
entriesApi.exportToORCID(workflowId, null);
Assert.fail("Cannot insert the actual scope, must be enum");
} catch (ApiException e) {
Assert.assertEquals(HttpStatus.SC_INTERNAL_SERVER_ERROR, e.getCode());
testingPostgres.runUpdateStatement("delete from token where id=9001");
}
// Give the user a fake ORCID token
testingPostgres.runUpdateStatement("insert into token (id, content, refreshToken, tokensource, userid, username, scope) values "
+ "(9001, 'fakeToken', 'fakeRefreshToken', 'orcid.org', 1, 'Potato', '" + TokenScope.AUTHENTICATE.name() + "')");
testingPostgres.runUpdateStatement(String.format("update enduser set orcid='%s' where id='1'", ORCID_USER_1));
try {
entriesApi.exportToORCID(workflowId, null);
fail("Should not have been able to export without a token in the correct scope");
} catch (ApiException e) {
Assert.assertEquals(HttpStatus.SC_UNAUTHORIZED, e.getCode());
}
testingPostgres.runUpdateStatement("update token set scope='" + TokenScope.ACTIVITIES_UPDATE.name() + "' where id=9001");
// Hoverfly is not used as a class rule here because for some reason it's trying to intercept GitHub in both spy and simulation mode
try (Hoverfly hoverfly = new Hoverfly(HoverflyMode.SIMULATE)) {
hoverfly.start();
hoverfly.simulate(ORCID_SIMULATION_SOURCE);
entriesApi.exportToORCID(workflowId, null);
// Exporting twice should work because it's an update
entriesApi.exportToORCID(workflowId, null);
hoverfly.resetState();
// Manually change it to the wrong put code
testingPostgres.runUpdateStatement(
String.format("update entry_orcidputcode set orcidputcode='%s' where orcidputcode='%s'", BAD_PUT_CODE, PUT_CODE_USER_1));
// Dockstore should be able to recover from having the wrong put code for whatever reason
entriesApi.exportToORCID(workflowId, null);
// Remove the put code. Test scenario where the put code and DOI URL are on ORCID, but the put code is not on Dockstore
testingPostgres.runUpdateStatement(String.format("delete from entry_orcidputcode where entry_id=%s", workflowId));
Map<String, String> createdState = new HashMap<>();
createdState.put("Work1", "Created");
hoverfly.setState(createdState);
entriesApi.exportToORCID(workflowId, null); // Exporting should succeed. Dockstore will find the put code and update the ORCID work
String putCode = testingPostgres.runSelectStatement(String.format("select orcidputcode from entry_orcidputcode where entry_id = '%s'", workflowId), String.class);
Assert.assertEquals("Should be able to find the put code for the ORCID work", PUT_CODE_USER_1, putCode);
}
}
@Test
public void testMultipleUsersOrcidExport() {
ApiClient userClient = getOpenAPIWebClient(USER_2_USERNAME, testingPostgres);
EntriesApi entriesApi = new EntriesApi(userClient);
UsersApi usersApi = new UsersApi(userClient);
User user = usersApi.getUser();
WorkflowsApi workflowsApi = new WorkflowsApi(userClient);
ApiClient otherUserClient = getOpenAPIWebClient(OTHER_USERNAME, testingPostgres);
EntriesApi otherEntriesApi = new EntriesApi(otherUserClient);
UsersApi otherUsersApi = new UsersApi(otherUserClient);
User otherUser = otherUsersApi.getUser();
Workflow workflow = workflowsApi.manualRegister(SourceControl.GITHUB.name(), "DockstoreTestUser/dockstore-whalesay-wdl", "/dockstore.wdl", "",
DescriptorLanguage.WDL.getShortName(), "");
Long workflowId = workflow.getId();
workflowsApi.refresh1(workflowId, false);
workflow = workflowsApi.getWorkflow(workflowId, null);
List<WorkflowVersion> workflowVersions = workflow.getWorkflowVersions();
Long workflowVersionId = workflowVersions.get(0).getId();
// Give otherUser access to the workflow to mimic being part of the same GitHub organization as the first user
Assert.assertEquals("Other user should have no workflows", 0, otherUsersApi.userWorkflows(otherUser.getId()).size());
testingPostgres.runUpdateStatement(String.format("insert into user_entry (userid, entryid) values (%s, %s)", otherUser.getId(), workflowId));
List<Workflow> workflows = otherUsersApi.userWorkflows(otherUser.getId());
Assert.assertEquals("Other user should have one workflow", 1, workflows.size());
// Give user 1 a fake ORCID token
testingPostgres.runUpdateStatement("insert into token (id, content, refreshToken, tokensource, userid, username, scope) values "
+ "(9001, 'fakeToken1', 'fakeRefreshToken1', 'orcid.org', 1, 'Potato', '" + TokenScope.ACTIVITIES_UPDATE.name() + "')");
testingPostgres.runUpdateStatement(String.format("update enduser set orcid='%s' where id=%s", ORCID_USER_1, user.getId()));
// Give other user a fake ORCID token
testingPostgres.runUpdateStatement("insert into token (id, content, refreshToken, tokensource, userid, username, scope) values "
+ "(9002, 'fakeToken2', 'fakeRefreshToken2', 'orcid.org', 2, 'Tomato', '" + TokenScope.ACTIVITIES_UPDATE.name() + "')");
testingPostgres.runUpdateStatement(String.format("update enduser set orcid='%s' where id=%s", ORCID_USER_2, otherUser.getId()));
// Give the workflow a concept DOI
testingPostgres.runUpdateStatement(String.format("update workflow set conceptDOI='dummy' where id=%s", workflowId));
// Give the workflow version a DOI url
testingPostgres.runUpdateStatement(String.format("update version_metadata set doistatus='%s' where id=%s", Version.DOIStatus.CREATED.name(), workflowVersionId));
testingPostgres.runUpdateStatement(String.format("update version_metadata set doiurl='10.foo/bar' where id=%s", workflowVersionId));
// Hoverfly is not used as a class rule here because for some reason it's trying to intercept GitHub in both spy and simulation mode
try (Hoverfly hoverfly = new Hoverfly(HoverflyMode.SIMULATE)) {
hoverfly.start();
hoverfly.simulate(ORCID_SIMULATION_SOURCE);
// User 1 should be able to export to ORCID
entriesApi.exportToORCID(workflowId, null);
// Exporting twice should work because it's an update
entriesApi.exportToORCID(workflowId, null);
// User 2 should also be able to export the same workflow to ORCID
otherEntriesApi.exportToORCID(workflowId, null);
// Exporting twice should work because it's an update
otherEntriesApi.exportToORCID(workflowId, null);
// Test workflow version ORCID export
hoverfly.resetState();
// User 1 should be able to export workflow version to ORCID
entriesApi.exportToORCID(workflowId, workflowVersionId);
entriesApi.exportToORCID(workflowId, workflowVersionId); // Should be able to export twice to update
// User 2 should be able to export the same workflow version to ORCID
otherEntriesApi.exportToORCID(workflowId, workflowVersionId);
otherEntriesApi.exportToORCID(workflowId, workflowVersionId); // Should be able to export twice to update
}
}
@Test
public void testDescriptionMetrics() {
ApiClient client = getOpenAPIWebClient(USER_2_USERNAME, testingPostgres);
EntriesApi entriesApi = new EntriesApi(client);
UsersApi usersApi = new UsersApi(client);
User user = usersApi.getUser();
WorkflowsApi workflowsApi = new WorkflowsApi(client);
workflowsApi.manualRegister(SourceControl.GITHUB.name(), "DockstoreTestUser/dockstore-whalesay-wdl", "/dockstore.wdl", "",
DescriptorLanguage.WDL.getShortName(), "");
List<Workflow> workflows = usersApi.userWorkflows(user.getId());
Long workflowId = workflows.get(0).getId();
workflowsApi.refresh1(workflowId, false);
Assert.assertTrue(workflows.size() > 0);
Workflow workflow = workflowsApi.getWorkflow(workflowId, null);
List<WorkflowVersion> workflowVersions = workflow.getWorkflowVersions();
Long workflowVersionId = workflowVersions.get(0).getId();
// The provided workflow should have a description
try {
DescriptionMetrics descriptionMetrics = entriesApi.getDescriptionMetrics(workflowId, workflowVersionId);
Assert.assertTrue(descriptionMetrics.getCalculatedEntropy() > 0
&& descriptionMetrics.getCalculatedWordCount() > 0
&& descriptionMetrics.getDescriptionLength() > 0);
} catch (Exception e) {
fail("Description metrics should have calculated nonzero values for the description.");
}
// Update the version description to something specific
final String newDescription = "'Test 1'";
final String updateStatement = String.format("UPDATE version_metadata SET description=%s WHERE id=%d",
newDescription, workflowVersionId);
testingPostgres.runUpdateStatement(updateStatement);
try {
DescriptionMetrics descriptionMetrics = entriesApi.getDescriptionMetrics(workflowId, workflowVersionId);
Assert.assertEquals("Incorrect entropy", 5, (long) descriptionMetrics.getCalculatedEntropy());
Assert.assertEquals("Incorrect word count", 2, (long) descriptionMetrics.getCalculatedWordCount());
Assert.assertEquals("Incorrect description length", 6, (long) descriptionMetrics.getDescriptionLength());
} catch (ApiException e) {
fail("Description metrics should have calculated nonzero values for the description.");
}
// Update the version description to be null
final String updateToNull = String.format("UPDATE version_metadata SET description=NULL WHERE id=%d", workflowVersionId);
testingPostgres.runUpdateStatement(updateToNull);
try {
DescriptionMetrics descriptionMetrics = entriesApi.getDescriptionMetrics(workflowId, workflowVersionId);
Assert.assertEquals("Incorrect entropy", 0, (long) descriptionMetrics.getCalculatedEntropy());
Assert.assertEquals("Incorrect word count", 0, (long) descriptionMetrics.getCalculatedWordCount());
Assert.assertEquals("Incorrect description length", 0, (long) descriptionMetrics.getDescriptionLength());
} catch (ApiException e) {
fail("The version does not have a description, so metrics should be set to 0.");
}
}
@Test
public void testUpdateEntryToGetTopics() {
ApiClient client = getOpenAPIWebClient(USER_2_USERNAME, testingPostgres);
EntriesApi entriesApi = new EntriesApi(client);
ContainersApi containersApi = new ContainersApi(client);
WorkflowsApi workflowsApi = new WorkflowsApi(client);
DockstoreTool existingTool = containersApi.getContainerByToolPath("quay.io/dockstoretestuser2/quayandgithub", "");
assertNull(existingTool.getTopic());
Workflow workflow = workflowsApi.manualRegister(SourceControl.GITHUB.name(), "DockstoreTestUser2/hello-dockstore-workflow", "/dockstore.wdl", "",
DescriptorLanguage.WDL.getShortName(), "");
// Registering a workflow sets the topic. Set it to null in the DB so the migration can be tested
testingPostgres.runUpdateStatement(String.format("update workflow set topicAutomatic=null where id='%s'", workflow.getId()));
workflow = workflowsApi.getWorkflow(workflow.getId(), "");
assertNull(workflow.getTopic());
entriesApi.updateEntryToGetTopics();
existingTool = containersApi.getContainerByToolPath("quay.io/dockstoretestuser2/quayandgithub", "");
assertEquals("Test repo for dockstore", existingTool.getTopic());
workflow = workflowsApi.getWorkflow(workflow.getId(), "");
assertEquals("test repo for CWL and WDL workflows", workflow.getTopic());
}
}
|
<reponame>Web-Programmer-B-P/job4j
package ru.job4j.transfer.model;
import java.util.Objects;
/**
* Class Account
*
* @author <NAME>.
* @since 04.09.2019
*/
public class Account {
private double value;
private String requisites;
public Account() {
}
public Account(double value, String requisites) {
this.value = value;
this.requisites = requisites;
}
public double getValue() {
return value;
}
public String getRequisites() {
return requisites;
}
public void setValue(double value) {
this.value = value;
}
public boolean isEmpty() {
boolean result = true;
if (this.getValue() > 0 && this.getRequisites() != null) {
result = false;
}
return result;
}
/**
* Метод проверяет статус счета
* @param cash
* @return true/false
*/
public boolean checkAmount(double cash) {
boolean status = false;
if (this.getValue() >= cash) {
status = true;
}
return status;
}
/**
* Метод списания денег со счета
* @param cash
*/
public void debitAccount(double cash) {
this.setValue(this.getValue() - cash);
}
/**
* Метод пополнения счета
* @param cash
*/
public void refillAccount(double cash) {
this.setValue(this.getValue() + cash);
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Account account = (Account) o;
return Double.compare(account.value, value) == 0
&& Objects.equals(requisites, account.requisites);
}
@Override
public int hashCode() {
return Objects.hash(value, requisites);
}
@Override
public String toString() {
return "Account{"
+ "value=" + value
+ ", requisites='" + requisites
+ '\''
+ '}';
}
}
|
export interface Item {
idItem: number,
nombre: string,
titulo: string,
imagen: string,
descripcion: any,
imagenSize: any,
emision: any,
material: string,
color: string,
impresion: string,
precio: number,
publicado: number,
login: number,
procedencia: string
}
|
1. Field of the Invention
Embodiments of the invention relate to a solar cell, a method of manufacturing the same, and a solar cell module including a plurality of solar cells.
2. Description of the Related Art
Recently, as existing energy sources such as petroleum and coal are expected to be depleted, interests in alternative energy sources for replacing the existing energy sources are increasing. Among the alternative energy sources, solar cells generating electric energy from solar energy have been particularly spotlighted.
A solar cell generally includes a substrate and an emitter layer which are respectively formed of different conductive type semiconductors, for example, p-type and n-type semiconductors. In this case, the emitter layer is positioned in a light receiving surface of the substrate, and a p-n junction is formed at an interface between the substrate and the emitter layer. A plurality of first electrodes electrically connected to the emitter layer is positioned on the emitter layer, and a plurality of second electrodes electrically connected to the substrate is positioned on a surface opposite the light receiving surface of the substrate.
When light is incident on the solar cell, electrons inside the semiconductors become free electrons (hereinafter referred to as “electrons”) by the photoelectric effect. Further, electrons and holes respectively move to the n-type semiconductor (e.g., the emitter layer) and the p-type semiconductor (e.g., the substrate) in accordance with the principle of the p-n junction. The electrons moving to the emitter layer and the holes moving to the substrate are respectively collected by the first electrodes and the second electrodes respectively connected to the emitter layer and the substrate.
At least one current collector, for example, at least one bus bar is positioned on each of the substrate and the emitter layer. The current collector on the substrate and the current collector on the emitter layer are electrically connected to the second electrodes on the substrate and the first electrodes on the emitter layer, respectively.
However, a light receiving area of the solar cell having the above-described configuration decreases because of the first electrodes on the emitter layer and the at least one bus bar for electrically connecting the first electrodes.
|
Morphology and phase control of fluorides nanocrystals activated by lanthanides with two-model luminescence properties. The morphology, size and phase control of luminescent fluoride nanocrystals through doping has become a new research hotspot due to their improved properties. In this work, Yb(3+) ions, as one of the most efficient sensitizers for various lanthanide activators, were doped in NaGd(Y)F nanocrystals. The results show that no obvious influence was observed for Yb(3+)-doped NaYF nanocrystals, while the influence of Yb(3+) doping on NaGdF nanocrystals was remarkable. The NaGd(1-x)Yb(x)F nanocrystals were synthesized by a hydrothermal route and had a morphology of rice-like nanorods. By controlling the synthesis parameters, the average size and slenderness of the nanocrystals increased gradually with addition of Yb(3+) ions. In contrast, the NaGd(1-x)Yb(x)F nanocrystals maintained a hexagonal phase, which is more beneficial for application as a luminescent host, until the content of Yb(3+) ions reached x = 0.9. The growth and transformation mechanism of NaGd(1-x)Yb(x)F nanocrystals was proposed to be a result of the competition between ion diffusion and an Oswald ripening process. Photoluminescence (PL) spectra confirm the efficient up-conversion and near-infrared (NIR) two-model luminescence properties of Er(3+) (Tm(3+)) activated NaGd(Y)(1-x)Yb(x)F nanocrystals. Simulated analysis results indicate that a colloidal solution of mixed luminescent nanocrystals is expected to find application as the activated medium of three dimensional displays and a broadband optical amplifier.
|
<reponame>nikburnt/easeqs-objc<gh_stars>0
//
// ESQEasingSelectionViewController.h
// easeqs-objc-example
//
// Created by <NAME> on 13.09.17.
// Copyright © 2017 <NAME>. All rights reserved.
//
@import UIKit;
#import "ESQExampleEasingSettings.h"
@class ESQEasingSelectionViewController;
@protocol ESQEasingSelectionViewControllerDelegate <NSObject>
- (void)viewController:(ESQEasingSelectionViewController *)viewController
didUpdateEasingSettings:(ESQExampleEasingSettings *)easingSettings;
@end
@interface ESQEasingSelectionViewController : UIViewController
@property (weak, nonatomic) id<ESQEasingSelectionViewControllerDelegate> delegate;
@property (strong, nonatomic) ESQExampleEasingSettings *settings;
@end
|
Corona's Spillover Effects on Tourism Industry - Scale Development and Validation The current paper takes a tourism-focused perspective to evaluate the impact of COVID-19 on the attitude of the tourist to travel. For this, the present paper conceptualize, develop, and validate the multi-dimensional scale on preventive measures of COVID-19. Further, we have developed a new model named Financial Crisis from Contagious Disease (FCCD)-stimulator to assess the impact of the virus on the short term performance of the global tourism industry. The study was exploratory, where initial items were generated through the qualitative method. The purification of the scale items and extraction of the distinct factors were performed through a quantitative approach (exploratory factor analysis). Further, the confirmatory factor analysis was used to validate the scale. The findings of the study manifested a multi-dimensional scale measuring the preventive measures of COVID-19 in the tourism context. The research renders a 25 item scale with four distinct factors named Isolation (7-items), Quarantine (7-items), Social Distancing (6-items), and Community Containment (5-items). The present scale will add to the literature of COVID-19 in the context of the tourism industry. The authors assume that this will be the first comprehensive scale, prepared on the guidelines of the World Health Organization (WHO), that will measure the effect of preventive measures of COVID-19 on the attitude of the tourist to travel during a pandemic situation.
|
Nonlinear Dynamic Analysis of Functionally Graded Graphene Reinforced Composite Truncated Conical Shells Functionally graded (FG) graphene reinforced composite (GRC) is a new class of advanced composite materials. In GRC, several layers of graphene platelets (GPLs) are randomly or uniformly dispersed in matrix. These GPLs have uniform arrangement, or are arranged with gradient, in the direction of thickness in accordance with three different graphene distribution rules. In this study, the nonlinear dynamic analysis of FG GRC truncated conical shells, subjected to a combined action of transverse excitation and axial force, is performed using the first shear deformation theory (FSDT). Estimation of equivalent Youngs modulus of the composites is calculated using a modified HalpinTsai model. In addition, a partial differential equation model is developed based on the Hamilton principle and nonlinear strain-displacement relationship. The Galerkin method and the fourth-order RungeKutta method are used to solve the equation. The dimensionless linear natural frequency of an FG GRC truncated conical shell is calculated by the RayleighRitz method and compared with available results in the literature to verify the accuracy of the present model. Simultaneously, significant effects of the different parameters, such as the total layer numbers, semi-vertex angles, GPLs weight fractions, distribution patterns and the length-to-thickness ratios, on the nonlinear dynamics including bifurcation and chaos of FG GRC truncated conical shells are investigated.
|
Characterization of the Human PHKG2 Promoter. Phosphorylase kinase (PhK) is a 1.3 x 106 Da serinethreonine protein kinase that plays an important role in glycogen breakdown. PhK is a hexadecamer of 4 subunits with ()4 stoichiometry. The subunit is the catalytic subunit of the holoenzyme and contains a kinase domain and a Cterminal calmodulin binding domain. Two tissuespecific isoforms of exist, muscle and liver, each encoded by separate genes, PHKG1 and PHKG2 respectively. To identify potential regulatory mechanism that mediate the temporal expression of PHKG2 gene, the putative human promoter region was analyzed. Sequence comparison reveals that the PHKG2 promoter shares 42% identity with PHKG1. Additionally, evolutionary comparisons reveal 46% and 46% sequence conservation of the human PHKG2 promoter to rat and mouse respectively. Based upon TransFac Analysis several putative transcription factor binding domains were identified that may regulate liverspecific expression: 1 hepatic nuclear factor (HNF) 3, 1 HNF4, and 4 activator protein (AP) 1 sites. Biochemical analysis of this promoter has been performed in musclespecific (C2C12) and liverspecific (HepG2) cells. The information obtained from this study will further advance our understanding of the various glycogenoses that result from mutations in the PHKG2 gene.
|
<reponame>ChompChompDead/PanelStudio<filename>panelstudio/src/main/java/com/lukflug/panelstudio/settings/package-info.java
/**
* Implements interfaces to module settings and corresponding GUI components.
* @author lukflug
*/
package com.lukflug.panelstudio.settings;
|
/******************************************
* AUTHOR : MADHUKAR *
* ID : _honeybee - mac98*
* INSTITUTION : IIT ROORKEE *
******************************************/
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define MOD 1000000007
#define dd double
#define loop(i, n) for(int i = 0; i < n; i++)
#define pb push_back
#define mp make_pair
#define clr(x) x.clear()
#define sz(x) ((int)(x).size())
#define F first
#define S second
int main() {
int t;
cin >> t;
int x,y;
cin >> x >> y;
set<pair<int,int>> store;
set<pair<int,int>>::iterator it;
int m,n,count;
loop(i,t){
cin >> m >> n;
count=0;
int sn = m-x;
int sd = n-y;
if(sn<0){sn = -sn;count++;}
if(sd<0){sd = -sd;count++;}
if(sn==0){store.insert(mp(0,0));}
else if(sd==0){store.insert(mp(INT_MAX,INT_MAX));}
else{
int cf = __gcd(sn,sd);
sn = sn/cf;
sd = sd/cf;
if(count%2==1){sn = -sn;}
//cout << sn << " " << sd <<" " <<i<< endl;
it = store.find(mp(sn,sd));
if(it==store.end()){
store.insert(mp(sn,sd));
}
}
}
cout << store.size() ;
return 0;
}
|
<filename>metashare/repository/tests/__init__.py
# Get all individual unit tests together.
# Do it by hand for now;
# should we need something automatic, see here: http://djangosnippets.org/snippets/1972/
# Yes, pylint, we want wildcard imports here.
# pylint: disable-msg=W0401
from metashare.repository.tests.test_editor import *
from metashare.repository.tests.test_view import *
from metashare.repository.tests.test_search import *
from metashare.repository.tests.test_email import *
from metashare.repository.tests.test_model import *
from metashare.repository.tests.test_import import *
from metashare.repository.tests.test_status_workflow import *
from metashare.repository.tests.test_persistence import *
from metashare.repository.tests.test_special_queries import *
from metashare.repository.tests.test_seo import *
if 'METASHARE_NIGHTLY_BUILD' in os.environ.keys() \
and os.environ['METASHARE_NIGHTLY_BUILD'] == 'true':
from metashare.repository.tests.test_nightly import *
|
/*
* $Id: SVGReader.java,v 1.12.2.5 2003/02/25 13:38:24 jeremias Exp $
* ============================================================================
* The Apache Software License, Version 1.1
* ============================================================================
*
* Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modifica-
* tion, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. The end-user documentation included with the redistribution, if any, must
* include the following acknowledgment: "This product includes software
* developed by the Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself, if
* and wherever such third-party acknowledgments normally appear.
*
* 4. The names "FOP" and "Apache Software Foundation" must not be used to
* endorse or promote products derived from this software without prior
* written permission. For written permission, please contact
* <EMAIL>.
*
* 5. Products derived from this software may not be called "Apache", nor may
* "Apache" appear in their name, without prior written permission of the
* Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
* DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*
* This software consists of voluntary contributions made by many individuals
* on behalf of the Apache Software Foundation and was originally created by
* <NAME> <<EMAIL>>. For more information on the Apache
* Software Foundation, please see <http://www.apache.org/>.
*/
package org.apache.fop.image.analyser;
// Java
import java.io.BufferedInputStream;
import java.io.IOException;
import java.awt.geom.AffineTransform;
import java.awt.geom.Dimension2D;
import java.awt.Dimension;
// DOM
import org.w3c.dom.Element;
import org.w3c.dom.svg.SVGDocument;
// FOP
import org.apache.fop.messaging.MessageHandler;
import org.apache.fop.image.SVGImage;
//Batik
import org.apache.batik.dom.svg.SVGOMDocument;
import org.apache.batik.dom.svg.SAXSVGDocumentFactory;
import org.apache.batik.bridge.UserAgentAdapter;
import org.apache.batik.bridge.UserAgent;
import org.apache.batik.bridge.BridgeContext;
import org.apache.batik.bridge.UnitProcessor;
/**
* ImageReader object for SVG document image type.
*/
public class SVGReader extends AbstractImageReader {
public boolean verifySignature(String uri,
BufferedInputStream fis) throws IOException {
this.imageStream = fis;
return loadImage(uri);
}
public String getMimeType() {
return "image/svg+xml";
}
/**
* This means the external svg document will be loaded twice.
* Possibly need a slightly different design for the image stuff.
*/
protected boolean loadImage(String uri) {
// parse document and get the size attributes of the svg element
try {
SAXSVGDocumentFactory factory =
new SAXSVGDocumentFactory(SVGImage.getParserName());
SVGDocument doc = (SVGDocument)factory.createDocument(uri, imageStream);
UserAgent userAgent = new MUserAgent(new AffineTransform());
BridgeContext ctx = new BridgeContext(userAgent);
Element e = ((SVGDocument)doc).getRootElement();
UnitProcessor.Context uctx = UnitProcessor.createContext(ctx, e);
String s;
// 'width' attribute - default is 100%
s = e.getAttributeNS(null, SVGOMDocument.SVG_WIDTH_ATTRIBUTE);
if (s.length() == 0) {
s = SVGOMDocument.SVG_SVG_WIDTH_DEFAULT_VALUE;
}
width = (int)UnitProcessor.svgHorizontalLengthToUserSpace
(s, SVGOMDocument.SVG_WIDTH_ATTRIBUTE, uctx);
// 'height' attribute - default is 100%
s = e.getAttributeNS(null, SVGOMDocument.SVG_HEIGHT_ATTRIBUTE);
if (s.length() == 0) {
s = SVGOMDocument.SVG_SVG_HEIGHT_DEFAULT_VALUE;
}
height = (int)UnitProcessor.svgVerticalLengthToUserSpace
(s, SVGOMDocument.SVG_HEIGHT_ATTRIBUTE, uctx);
return true;
} catch (NoClassDefFoundError ncdfe) {
MessageHandler.errorln("Batik not in class path");
return false;
} catch (Exception e) {
MessageHandler.errorln("Could not load external SVG: " +
e.getMessage());
// assuming any exception means this document is not svg
// or could not be loaded for some reason
return false;
}
}
protected class MUserAgent extends UserAgentAdapter {
AffineTransform currentTransform = null;
/**
* Creates a new SVGUserAgent.
*/
protected MUserAgent(AffineTransform at) {
currentTransform = at;
}
/**
* Displays an error message.
*/
public void displayError(String message) {
MessageHandler.error(message);
}
/**
* Displays an error resulting from the specified Exception.
*/
public void displayError(Exception ex) {
MessageHandler.error(org.apache.avalon.framework.ExceptionUtil.printStackTrace(ex));
}
/**
* Displays a message in the User Agent interface.
* The given message is typically displayed in a status bar.
*/
public void displayMessage(String message) {
MessageHandler.log(message);
}
/**
* Returns a customized the pixel to mm factor.
*/
public float getPixelToMM() {
// this is set to 72dpi as the values in fo are 72dpi
return 0.35277777777777777778f; // 72 dpi
// return 0.26458333333333333333333333333333f; // 96dpi
}
public float getPixelUnitToMillimeter() {
// this is set to 72dpi as the values in fo are 72dpi
return 0.35277777777777777778f; // 72 dpi
// return 0.26458333333333333333333333333333f; // 96dpi
}
/**
* Returns the language settings.
*/
public String getLanguages() {
return "en"; // userLanguages;
}
public String getMedia() {
return "print";
}
public boolean isXMLParserValidating() {
return true;
}
/**
* Returns the user stylesheet uri.
* @return null if no user style sheet was specified.
*/
public String getUserStyleSheetURI() {
return null; // userStyleSheetURI;
}
/**
* Returns the class name of the XML parser.
*/
public String getXMLParserClassName() {
return org.apache.fop.apps.Driver.getParserClassName();
}
public AffineTransform getTransform() {
return currentTransform;
}
public Dimension2D getViewportSize() {
return new Dimension(100, 100);
}
}
}
|
#include "wx/wx.h"
#include <functional>
using OnExitCallbackType = std::function<void()>;
class MainFrame : public wxFrame
{
public:
virtual ~MainFrame()
{
mOnExit();
}
MainFrame(OnExitCallbackType onExit);
private:
void OnHello(wxCommandEvent& event);
void OnExit(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
private:
wxMenu* mMenuFile;
wxMenu* mMenuHelp;
wxMenuBar* mMenuBar;
OnExitCallbackType mOnExit;
};
enum
{
ID_Hello = 1
};
|
Will supermodel Karlie Kloss convert to Judaism?
This, of all things, was the subject of an article by New York Times columnist Maureen Dowd. Dowd reported that Kloss is dating Josh Kushner, a venture capitalist who is the brother of President Donald Trump’s son-in-law Jared Kushner.
Karlie’s friends describe her as “insanely nice,” as one put it, and often showing up with homemade baked goods. Some of them are upset, claiming that Ivanka has not been as supportive to Karlie as she could have been during her trial by fire imposed by the Kushner parents over the conversion issue.
The Forward article appeared in 2015. It’s not clear why it merits recirculation three years later. Nor is it clear why the Times considers the anonymously sourced purported details of Kloss’s relations with her boyfriend’s parents to be anyone’s business.
Dowd’s depiction of “severe pressure…to convert to Orthodox Judaism” generated pushback from Times reader-commenters. “The idea that this young woman needs to convert to her husband’s religion, in order to satisfy the demands of his ex-con father, is my definition of an unnatural act,” wrote Matthew Carnicelli of Brooklyn, in a comment that was recommended by 925 Times readers.
The Times loves it when Jews convert to Christianity (see here and here and here for examples). But Dowd and a lot of Times readers can’t seem to stand the idea of it happening in the other direction.
Ira Stoll was managing editor of The Forward and North American editor of The Jerusalem Post. More of his media critiques, a regular Algemeiner feature, can be found here.
|
Graphene microwave transistors on sapphire substrates We have developed metal-oxide graphene field-effect transistors (MOGFETs) on sapphire substrates working at microwave frequencies. For monolayers, we obtain a transit frequency up to ~ 80 GHz for a gate length of 200 nm, and a power gain maximum frequency of about ~ 3 GHz for this specific sample. Given the strongly reduced charge noise for nanostructures on sapphire, the high stability and high performance of this material at low temperature, our MOGFETs on sapphire are well suited for a cryogenic broadband low-noise amplifier. Graphene is a two-dimensional system with high carrier mobility that provides a rich playground for building novel high-frequency devices 1. Although the characterization of graphene's electronic properties is one of the most active fields in condensed matter physics, most experiments focus on its dc properties. Metal-oxide graphene field-effect transistors (MOGFETs) operating in the microwave range have already been realized. First microwave measurements on MOGFETs yielded transit frequencies of f T ∼ 14.7 GHz at 500-nm gate length 2. These very promising results were later optimized further by reducing the gate length 3-6 and using different techniques to grow the top-gate oxide layer 8. Transit frequencies of 100 GHz have been reported for wafer-scale MOGFETs produced with graphene obtained by graphitization of SiC 5,9. Values up to 155 GHz for a 40-nm gate length with an almost temperature independent gain 6 have been demonstated using MOGFETs fabricated with CVD-grown graphene 6,10. Very recently transit frequencies up to 300 GHz have been reported using a Co 2 Si nanowire as gate 11. Despite the lack of an energy gap making graphene unsuitable for logic applications, these results are very promising for the use of MOGFETs as microwave low-noise amplifiers. Still, graphene has yet to show its full potential and the "terahertz gap" remains to be bridged 1. Reducing the gate length and the contact resistance, improving the carrier mobility and limiting parasitic capacitances should further improve the high-frequency performance of MOGFETs 1,. Here, we present microwave measurements of MOGFET devices fabricated on sapphire substrates. We find transit frequencies up to 80 GHz for a gate length of 200 nm. The use of such a fully insulating substrate allows to minimize losses and a) These authors contribute equally to this work b) Author to whom correspondence should be addressed. Electronic mail: [email protected] parasitic capacitances arising from finite conduction of the substrate, which is present even in intrinsic semiconductors. Charge noise is minimized on sapphire, which is therefore used as a substrate for microwave devices such as detectors and qubits. Moreover, because of the high energy of polar optical phonons in sapphire, the substrate-limited mobility for graphene is expected to be higher than on oxidized silicon. Given the high thermal conductivity of sapphire, the very high cut-off frequency and the low impedance of the MOGFET, our device could be integrated in a monolithic microwave integrated circuit (MMIC) such as ultra-high bandwidth amplifiers. Graphene flakes were prepared using Scotch tape micromechanical cleavage on natural graphite, and deposited on 330 m thick C-plane sapphire substrate. The graphene sheets were located using optical microscopy and characterized by Raman spectroscopy. Fig. 1(a) shows the Raman spectrum of the monolayer graphene flake on sapphire used for sample SP 15 M D. The samples were prepared by e-beam lithography. To avoid charging effects of the insulating substrate we used a layer of standard PMMA resist plus a second layer of water-soluble conducting polymer (Espacer 300Z from Showa Denko K.K.). The contacts were realized by evaporating a Ti(10 nm)/Al(120 nm) bilayer. A 25-nm Al 2 O 3 gate insulator was prepared by atomic layer deposition as described by Kim et al. 17. The dielectric constant of our oxide is estimated to = 6.4. A second lithography step allowed the patterning of the top gates followed by a Ti(10 nm)/Al(100 nm) bilayer deposition. We chose a geometry of a coplanar wave guide with double-gate structure as shown in Fig. 1(b). The measurements were performed at room and low temperatures (77 K) on RF probe stations. The voltage biases (both drain-source voltage V ds and gate voltage V g ) were applied using a voltage source and bias-tees (see Fig. 1(c)). The drain-source current I ds was deduced from the voltage drop across the bias resistor R bias. The scattering parameters were measured with a two-port vector network analyzer (VNA Anritsu 37369C) cali- brated using a short-open-load-thru calibration. In order to extract the intrinsic transit frequency of the transistor, we applied a de-embedding procedure by subtracting the signal of an open and short structure strictly similar to the measured MOGFET using the relation: where Y is the admittance calculated from the measured scattering parameters using conventional two-port network analysis 18. This technique has proven to be useful to probe diffusion in graphene 19. We will present measurements of device SP 15 M D, which showed the best performance in our batch of 10 samples. The double-gate device has a 200 nm gate length, 800 nm and 3.7 m channel length L and width W respectively. From geometrical considerations, we estimate the total gate capacitance of the double-gate device C g ∼ 3.5 fF. First we characterize the sample's dc properties to define the parameter range where the transconductance g DC m = ∂I ds ∂Vg is maximum. Fig. 2(a) shows both the resistance and the drain-source current as a function of gate voltage V g. The resistance was extracted from the I − V curves at relatively low bias (V ds = 10 mV). Note the low impedance of the device which is of great advantage for integration in microwave circuits. We observed that in all the samples the graphene sheet is naturally n-doped, as expected for aluminum contacts. The Dirac point could not be reached within our gate-voltage range. Accordingly, the transconductance g DC m (V g ) does not saturate but reaches a still considerable value gm 2W V ds = 0.22 mS/mV. Fig. 2(b) displays I − V curves of the MOGFET for several gate voltages becoming non-linear at large bias. We observe a tendency to saturate, but despite the large current passing through the device a full saturation is not found, as typically observed in graphene field-effect transistors 20,21. Fig. 2(c) shows the maximum transconductance g DC m−max versus V ds, which deviates from linear behavior as the I − V curves become non-ohmic. We now discuss the RF properties of our MOGFET. The short-circuit current gain defined as h 21 () = Y21 Y11 ≈ j gm Cg is calculated from the scattering parameters S ij using the common-source small-signal equivalent circuit model 18. In Fig. 3(a), the high-frequency transconductance g RF m corresponding to the real part of the admittance is displayed as a function of V ds for V g = −4.3 V. As expected for a diffusive transistor the g m increases linearly with V ds at low bias and then starts to saturate. We find a maximum transconductance g RF m−max ∼ 0.25 mS/mV at V g = −5.2 V and V ds = −1.1 V. According to the definition of the current gain, the transit frequency corresponds to the frequency at which the current gain is equal to 1 (see 18 for example) and can be expressed as f T = gm 2Cg. We estimate the transit frequency of our device using the gate capacitance obtained from the geometry, C g = 3.5 fF, and obtain a transit frequency f T ∼ 70 GHz. Fig. 3(b) shows the measured current gain |h 21 ()| as a function of frequency obtained both from the raw data and after de-embedding. In both cases a clear 1/f behavior is observed. The measured transit frequency of the raw data reaches ∼ 3 GHz while after deembedding, we obtained f T ∼ 80 GHz which is very close to the estimated value, confirming the accuracy of our deembedding procedure. It is important to note the very high transit frequency despite the relatively low mobility of our top-gated devices (200 ≤ ≤ 500 cm 2 s −1 V −1 ). The inset of Fig. 3(b) shows the two-port power gain 18 calculated from the raw scattering parameters. We observe a maximum oscillation frequency f max of about ∼ 3 GHz that could be increased by optimizing the design of our coplanar wave guide. However, the small value of the ratio fmax fT is characteristic of graphene samples 1. We point out that a high current bias induces additional doping of the graphene sheet leading to a shift of the Dirac point towards higher negative V g. As a consequence, the highest value of g m may lie outside the accessible gate voltage range. Therefore, the full potential of the MOGFET may be even superior to what is shown by these measurements. The sample was measured several times, and despite a long time between the measurements (up to two months), the only difference was a higher n-doping level and a lower impedance, but the microwave data were identical. Measurements at low temperature confirmed that the performance of the MOGFET is extremely stable, as also reported by Wu et al. 6, and remains strictly similar to the room-temperature data. We have also investigated a MOGFET based on bilayer graphene which showed much lower performance 22. To conclude, we have performed microwave measurements of MOGFETs on sapphire substrates. We find a large cut-off frequency of ∼ 80 GHz, which is only a factor of two smaller than state of the art MOGFET transistors with a 40-nm gate length, demonstrating the high performance of our MOGFET. Our results confirm the high potential of sapphire as a substrate for high-frequency ultra low noise graphene transistors. The performance of the MOGFET could be further improved by scaling down the gate length and by depositing graphene on boron nitride for example 23. Low-temperature measurements demonstrate that our MOGFET on sapphire is compatible with the design of a broadband cryo-amplifier. We
|
<gh_stars>0
from dragonfly import Grammar, CompoundRule
import pythoncom
from time import sleep
import pyautogui
from lib.modes import *
from lib.modes.mode_switch import SwitchMode
from lib.system_toggles import toggle_speechrec
class ModeSwitcher(object):
__instance = None
__currentMode = None
__modes = {}
def __new__(cls, is_testing=False):
if ModeSwitcher.__instance is None:
ModeSwitcher.__instance = object.__new__(cls)
ModeSwitcher.__modes = {
'browse': BrowseMode(ModeSwitcher.__instance),
'youtube': YoutubeMode(ModeSwitcher.__instance),
'twitch': TwitchMode(ModeSwitcher.__instance),
'switch': SwitchMode(ModeSwitcher.__instance),
'heroes': HeroesMode(ModeSwitcher.__instance),
'starcraft': StarcraftMode(ModeSwitcher.__instance, is_testing),
'phonemes': PhonemesMode(ModeSwitcher.__instance),
'testing': TestMode(ModeSwitcher.__instance),
'worklog': ExcelMode(ModeSwitcher.__instance, ''),
'excel': ExcelMode(ModeSwitcher.__instance, ''),
}
return ModeSwitcher.__instance
def getMode(self):
return ModeSwitcher.__currentMode
def turnOnModeSwitch(self):
self.switchMode( 'switch' )
def switchMode( self, nextMode ):
print( "Switching to " + nextMode )
if( ModeSwitcher.__currentMode is not None ):
ModeSwitcher.__currentMode.exit()
ModeSwitcher.__currentMode = self.__modes[nextMode]
ModeSwitcher.__currentMode.start()
def exit(self):
ModeSwitcher.__currentMode.exit()
|
<gh_stars>1-10
import { ChecklistType } from '../checklist-type';
import React from 'react';
export function ChecklistMenu({
items,
currentPointer, // currently selected menu item
menuItemPointer // pointer for this very menu item
}: {
items: ChecklistType;
currentPointer: string;
menuItemPointer: string;
}): JSX.Element {
return (
<>
<sp-sidenav-item
label={'(Overview)'}
value={menuItemPointer || ' '}
selected={currentPointer === menuItemPointer || undefined}
/>
{Object.entries(items)
.filter(item => typeof item[1] === 'object')
.map(([childKey, childItems]) => [
childKey,
childItems,
Object.values(childItems).every(item => typeof item === 'boolean')
])
.map(([childKey, childItems, simple]) =>
simple ? (
<sp-sidenav-item
label={childKey}
value={menuItemPointer + `/${childKey}`}
selected={
currentPointer === menuItemPointer + `/${childKey}` || undefined
}
/>
) : (
<sp-sidenav-item
label={childKey}
expanded={
currentPointer.startsWith(menuItemPointer + `/${childKey}`) ||
undefined
}
>
<ChecklistMenu
items={childItems as ChecklistType}
currentPointer={currentPointer}
menuItemPointer={menuItemPointer + `/${childKey}`}
/>
</sp-sidenav-item>
)
)}
</>
);
}
|
Investigating the Semantic Similarities across Physician and Nurse Handoff Communication In this paper, we report on an exploratory investigation of the semantic similarities between physician and nurse handoff communication in clinical settings. Based on our analysis of verbal handoffs of residents and nurses (265 patient handoffs each; total 530) using natural language processing techniques, we found that there are inherent similarities in the nature of content that is exchanged within these disciplinary handoffs. However, the consistency of the clinical content across all handoffs and their order of presentation were less predictable. We briefly discuss the potential implications of our results that can inform evidence-based guidelines for the design of an interdisciplinary handoff framework.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.