content
stringlengths 7
2.61M
|
---|
<reponame>ashwindcruz/coord-conv
import tensorflow as tf
def model_classification(input_tensor):
"""
Highlight the location of a pixel, represented in the input tensor,
on a 64x64 map.
Use convolutions to achieve this.
Using CoordConv is optional.
Args:
input_tensor: Tensor representation of a pixel coordinate.
Returns:
pixel_map: 64x64 grid highligting the pixel specified in the input.
"""
with tf.variable_scope('conv_model_classification', reuse=tf.AUTO_REUSE):
conv_1 = tf.layers.conv2d(
input_tensor, 32, 1, activation='relu', name='conv_1')
conv_2 = tf.layers.conv2d(
conv_1, 32, 1, activation='relu', name='conv_2')
conv_3 = tf.layers.conv2d(
conv_2, 64, 1, activation='relu', name='conv_3')
conv_4 = tf.layers.conv2d(
conv_3, 64, 1, activation='relu', name='conv_4')
conv_5 = tf.layers.conv2d(
conv_4, 1, 1, name='conv_5')
return conv_5
def model_rendering(input_tensor):
"""
Render a 9x9 square on a 64x64 grid.
Use convolutions to achieve this.
Using CoordConv is optional.
Args:
input_tensor: 64x64 grid highlighting a single pixel.
Returns:
pixel_map: 64x64 grid highligting a 9x9 square centered on single
pixel.
"""
# Specify the filter size and number of channels
filter_size = 2
channels = 2
with tf.variable_scope('conv_model_rendering', reuse=tf.AUTO_REUSE):
conv_1 = tf.layers.conv2d(
input_tensor, 8*channels, filter_size,
padding='same', activation='relu', name='conv_1')
conv_2 = tf.layers.conv2d(
conv_1, 8*channels, filter_size,
padding='same', activation='relu', name='conv_2')
conv_3 = tf.layers.conv2d(
conv_2, 16*channels, filter_size,
padding='same', activation='relu', name='conv_3')
conv_4 = tf.layers.conv2d(
conv_3, 16*channels, filter_size,
padding='same', activation='relu', name='conv_4')
conv_5 = tf.layers.conv2d(
conv_4, 1, filter_size,
padding='same', name='conv_5')
return conv_5
|
A Kensington teenager has died after being shot last week and authorities have identified the victim's friend as the suspect charged in his murder.The shooting happened last Thursday afternoon at a home on the 2100 block of East Susquehanna Avenue in Kensington.17-year-old James Gerard Becker III, a student at CAPA High School was shot inside a third floor bedroom.Authorities say Becker's friend, identified at 17-year-old Ivan Oberholtzer, shot the victim in the midsection.Medics rushed Becker to Hahnemann University Hospital, where he later succumbed to his injuries.The day of the shooting, the boys were home from school because of the snow storm.Oberholtzer told police that he found the gun in the street and that the teens were playing with it.Becker's family is crushed."He wasn't selfish. He loved his friends, his family - he was a caring kid," said James Becker Jr., victim's father.Becker's family and friends have put together a photo collage to help commemorate his memory and to try to help his grief stricken father cope."It's something we did every night before he went to bed. I would go in his room and say, 'Goodnight buddy - love you,' and he'd say, 'I love you dad," said Becker Jr.Police say even though all signs are that it was an accident, the charge will still be murder."He's saying that he found the gun loaded, he took the clip out and he thought there were no more bullets in it but there was one obviously in the chamber and that ultimately killed his friend," said Capt. James Clark, Philadelphia Police.Police say the gun used was never reported lost or stolen.Oberholtzer has been charged as an adult with a general count of murder. The district attorney has not yet determined which degree.He being held without bail. |
# QPEXSET -- Public definitions for the QPEX package.
# Set/Stat parameters.
# (none at present)
# QPEX_DEBUG options flags.
define QPEXD_SUMMARY 0001B # print summary information
define QPEXD_SHOWEXPR 0002B # regenerate compiled expression
define QPEXD_PROGRAM 0004B # decode compiled program
define QPEXD_SHOWLUTS 0010B # print lookup tables
define QPEXD_ETLIST 0020B # dump expr terms list
define QPEXD_LTLIST 0040B # dump lookup table list
define QPEXD_SHOWALL 0077B # show/dump everything
|
Phantom Pains: The Effect of Police Killings of Black Americans on Black British Attitudes Abstract What effect does black politics in the United States have on the attitudes of black citizens in other national contexts? Literature on the black diaspora and transnationalism has characterized cultural and political linkages between black communities in North America, the Caribbean, and Europe, especially during the mid-20th century. In this article, I exploit random timing in the administration of a public attitudes survey to demonstrate that such linkages persist and that the police killing of Eric Garner in 2014 negatively affected black Londoners attitudes toward the Metropolitan Police. Notably, I find the effect was largely concentrated among black Londoners: estimates of an effect on white and South Asian Londoners were small and largely insignificant. The evidence presented here demonstrates that racial violence in the United States can affect racial politics in other national contexts and helps frame the emergence of Black Lives Matter chapters and protests beyond the United States. |
Rep. Chellie Pingree of Maine was an original co-sponsor and the 15th House member to endorse the resolution in November.
Even so, their Green New Deal goes far beyond the Clean Power Plan proposed by President Obama. President Trump has scrapped Obama’s plan, which imposed emissions limits on coal-fired power plants, as a job-killer.
Pelosi said Thursday she hadn’t seen the Green New Deal proposal but welcomes “the enthusiasm” of its backers.
The Green New Deal would be paid for “the same way we paid for the original New Deal, World War II, the bank bailouts, tax cuts for the rich and decades of war – with public money appropriated by Congress,” Ocasio-Cortez said. |
use std::ffi::NulError;
#[derive(Debug, Copy, Clone, Eq, PartialEq, Error)]
pub enum MessageError {
/// 字符串中包含`\0`字符
#[error("字符串中包含`\0`字符")]
NulError,
/// 消息体大小超过最大大小(i32::MAX)
#[error("消息体大小超过{}", i32::MAX)]
BodyLenOutOfSize,
/// 主题大超过最大大小(512)
#[error("主题长度超过{}", rocketmq_client_sys::MAX_TOPIC_LENGTH)]
TopicLenOutOfSize,
}
impl From<NulError> for MessageError {
fn from(_: NulError) -> Self {
Self::NulError
}
}
|
/**
* Represents the data for a member of a clan
*
* @author Im Frizzy <skype:kfriz1998>
* @author Frosty Teh Snowman <skype:travis.mccorkle>
* @author Arthur <skype:arthur.behesnilian>
* @author Sundays211
* @since 21/12/2014
*/
public class ClanMember {
public static enum VarClanMember {
JOB(0, 9),
CITADEL_BANNED(11),
KEEP_BANNED(12),
ISLAND_BANNED(13),
PROBATION(14, 15);
VarClanMember(int bit) {
this(bit, bit);
}
private final int startBit;
private final int endBit;
private final int maxValue;
VarClanMember(int startBit, int endBit) {
this.startBit = startBit;
this.endBit = endBit;
this.maxValue = (1 << Math.abs(startBit-endBit)+1) - 1;
}
public int getStartBit () {
return startBit;
}
public int getEndBit () {
return endBit;
}
public int getMaxValue () {
return maxValue;
}
}
//0, 1, 2, 4, 8, f
public static final int FLAG_CITADEL_BANNED = 0x2;
public static final int FLAG_KEEP_BANNED = 0x2;
public static final int FLAG_ISLAND_BANNED = 0x2;
public static final int FLAG_PROBATION_START = 0x4000;
public static final int FLAG_PROBATION_END = 0x8000;
private final long userhash;
private String displayName;
private ClanRank rank;
private int varClanMember;
private final int joinDay;
public ClanMember (long userhash) {
this(userhash, ClanRank.RECRUIT, 0, Virtue.getInstance().getRuneday());
}
public ClanMember (long userhash, ClanRank rank, int varClanMember, int joinDay) {
this.userhash = userhash;
this.rank = rank;
this.varClanMember = varClanMember;
this.joinDay = joinDay;
}
protected void setDisplayName (String name) {
this.displayName = name;
}
public long getUserHash () {
return userhash;
}
public String getDisplayName () {
return displayName;
}
public ClanRank getRank () {
return rank;
}
public int getVarValue () {
return varClanMember;
}
protected void setVarMemberBit (VarClanMember type, int value) throws VarBitOverflowException {
if (value > type.getMaxValue() || value < 0) {
throw new VarBitOverflowException(type.name(), value, type.getMaxValue());
}
setVarMemberBit(value, type.getStartBit(), type.getEndBit());
}
protected void setVarMemberBit (int value, int startBit, int endBit) throws VarBitOverflowException {
if (value > ((1 << Math.abs(startBit-endBit)+1) - 1) || value < 0) {
throw new VarBitOverflowException("", value, (1 << Math.abs(startBit-endBit)+1) - 1);
}
int i_4_ = (1 << startBit) - 1;
int i_5_ = endBit == 31 ? -1 : (1 << 1 + endBit) - 1;
int mask = i_5_ ^ i_4_;
value <<= startBit;
value &= mask;
varClanMember &= mask ^ 0xffffffff;
varClanMember |= value;
}
public int getVarBitValue (VarClanMember type) {
return getVarBitValue(type.getStartBit(), type.getEndBit());
}
public int getVarBitValue (int startBit, int endBit) {
int mask = (endBit == 31) ? -1 : (1 << 1 + endBit) - 1;
return (varClanMember & mask) >>> startBit;
}
public int getJoinDay () {
return joinDay;
}
/**
* Sets the rank of the clan member. Note that no checks are performed within this method, so it should be used with care.
* @param desiredRank The rank to set
*/
protected void setRank (ClanRank desiredRank) {
this.rank = desiredRank;
}
} |
#define GLEW_STATIC
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <cmath>
#include "Rect.hpp"
#include "Tile_map_renderer.hpp"
#include "Tile_map.hpp"
#include "vec3.hpp"
#include "Shader.hpp"
GLenum glCheckError_(const char *file, int line)
{
GLenum errorCode;
while ((errorCode = glGetError()) != GL_NO_ERROR)
{
std::string error;
switch (errorCode)
{
case GL_INVALID_ENUM: error = "INVALID_ENUM"; break;
case GL_INVALID_VALUE: error = "INVALID_VALUE"; break;
case GL_INVALID_OPERATION: error = "INVALID_OPERATION"; break;
case GL_STACK_OVERFLOW: error = "STACK_OVERFLOW"; break;
case GL_STACK_UNDERFLOW: error = "STACK_UNDERFLOW"; break;
case GL_OUT_OF_MEMORY: error = "OUT_OF_MEMORY"; break;
case GL_INVALID_FRAMEBUFFER_OPERATION: error = "INVALID_FRAMEBUFFER_OPERATION"; break;
}
std::cerr << error << " | " << file << " (" << line << ")" << std::endl;
}
return errorCode;
}
Tile_map_renderer::Tile_map_renderer(const Tile_map & tile_map, const gfx::Shader & shader)
{
m_tmap_ptr = &tile_map;
#ifndef NTILE_MAP_DEBUG
for (int i = 0; i != TILE_MAP_DEBUG_OPTIONS; ++i) {
m_debug_flags[i] = false;
m_debug_VAOS[i] = 0;
m_debug_VBOS[i] = 0;
m_debug_pshaders[i] = nullptr;
}
m_debug_num_colliders = 0;
#endif
setup_buffers(shader);
}
//shader in paramenter list, shader's use() function need to be call at the start of this function!!!!!!!!!!!!!!!
void Tile_map_renderer::setup_buffers(const gfx::Shader & shader)
{
//calculate the tile's world position
for (int i = 0; i != m_tmap_ptr->height(); ++i) {
for (int j = 0; j != m_tmap_ptr -> width(); ++j) {
math::vec3 v_pos0, v_pos1, v_pos2, v_pos3;
math::Rect rect = m_tmap_ptr->tile_wld_space_bounds(i, j);
v_pos0.x = rect.x;
v_pos0.y = rect.y;
v_pos0.z = 0;
v_pos1.x = rect.x;
v_pos1.y = rect.y - rect.height;
v_pos1.z = 0;
v_pos2.x = rect.x + rect.width;
v_pos2.y = rect.y - rect.height;
v_pos2.z = 0;
v_pos3.x = rect.x + rect.width;
v_pos3.y = rect.y;
v_pos3.z = 0;
m_vertices_pos.push_back(v_pos0); // top left
m_vertices_pos.push_back(v_pos1); // bottom left
m_vertices_pos.push_back(v_pos2); // bottom right
m_vertices_pos.push_back(v_pos2); // bottom right
m_vertices_pos.push_back(v_pos3); // top right
m_vertices_pos.push_back(v_pos0); // top left
}
}
/*
for (int i = 0; i < m_tmap_ptr->height(); ++i) {
for (int j = 0; j < m_tmap_ptr->width(); ++j) {
int r = 4 * m_tmap_ptr->width() * i;
m_indices.push_back(r + (j * 4) ); // top left
m_indices.push_back(r + (j * 4) + 1); // bottom left
m_indices.push_back(r + (j * 4) + 2); // bottom right
m_indices.push_back(r + (j * 4) + 2); // bottom right
m_indices.push_back(r + (j * 4) + 3); // top right
m_indices.push_back(r + (j * 4)); // top left
}
}*/
/*TODO: For every layer, find the tileset assigned to that layer,
than calculate for that layer the uv coordinates of each tile
*/
for (int i = 0; i < m_tmap_ptr->height(); ++i) {
for (int j = 0; j < m_tmap_ptr->width(); ++j) {
unsigned tile_id = m_tmap_ptr->get_tile_id(0, i, j);
math::vec2 uv0, uv1, uv2, uv3;
//find witch tileset has the tile width id
const Tileset * ptileset = nullptr;
for (auto & tileset : m_tmap_ptr ->get_tilesets()) {
if (tileset.is_inside_set(tile_id)) {
ptileset = &tileset;
break;
}
}
if (ptileset) {
ptileset->get_text_coord(tile_id, uv0, uv1, uv2, uv3);
}
#ifndef NDEBUG
else {
std::cerr << __FUNCTION__ << " ERROR: Could not find tileset containing tile with id = " << tile_id << std::endl;
}
#endif // !NDEBUG
m_vextices_text_coord.push_back(uv0);
m_vextices_text_coord.push_back(uv1);
m_vextices_text_coord.push_back(uv2);
m_vextices_text_coord.push_back(uv2);
m_vextices_text_coord.push_back(uv3);
m_vextices_text_coord.push_back(uv0);
}
}
shader.use();
// Create buffers/arrays
glGenVertexArrays(1, &m_VAO);
glCheckError();
glGenBuffers(1, &m_VBO_pos);
glCheckError();
glGenBuffers(1, &m_VBO_uv);
glCheckError();
//glGenBuffers(1, &m_EBO);
//glCheckError();
glBindVertexArray(m_VAO);
glCheckError();
// Load data into vertex buffers
//vertex postion
glBindBuffer(GL_ARRAY_BUFFER, m_VBO_pos);
glCheckError();
glBufferData(GL_ARRAY_BUFFER, m_vertices_pos.size() * sizeof(math::vec3), &m_vertices_pos[0], GL_STATIC_DRAW);
glCheckError();
//glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_EBO);
//glCheckError();
//glBufferData(GL_ELEMENT_ARRAY_BUFFER, m_indices.size() * sizeof(GLuint), &m_indices[0], GL_STATIC_DRAW);
//glCheckError();
glEnableVertexAttribArray(0);
glCheckError();
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, sizeof(math::vec3), (GLvoid*)0);
glCheckError();
//vertex texture coordinate
glBindBuffer(GL_ARRAY_BUFFER, m_VBO_uv);
glCheckError();
glBufferData(GL_ARRAY_BUFFER, m_vextices_text_coord.size() * sizeof(math::vec2), &m_vextices_text_coord[0], GL_STATIC_DRAW);
glCheckError();
glEnableVertexAttribArray(1);
glCheckError();
glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, sizeof(math::vec2), (GLvoid*)0);
glCheckError();
glBindVertexArray(0);
glCheckError();
}
void Tile_map_renderer::set_debug_mode(Debug_options option, const gfx::Shader & shader)
{
std::vector<math::vec3> position;
#ifndef NTILE_MAP_DEBUG //if it is in map debug mode
switch (option) {
case DISPLAY_GRID:
if (m_debug_flags[DISPLAY_GRID]) { //already set
break;
}
else if (glIsVertexArray(m_debug_VAOS[DISPLAY_GRID]) == GL_TRUE ) { // alredy set
std::cerr << __FUNCTION__ << " ERROR: Debug option 'DISPLAY_GRID' is already set" << std::endl;
break;
}
//SET THE SHADER, SET THE BUFFERS AND SET FLAG TO TRUE
//shader
m_debug_pshaders[DISPLAY_GRID] = &shader;
//buffers
m_debug_pshaders[DISPLAY_GRID]->use();
for (int j = 0; j != m_tmap_ptr->width(); ++j ) { // for each column in the first row get the vertical lines of the grid
math::vec3 v0, v1;
math::Rect rect = m_tmap_ptr->tile_wld_space_bounds(0, j);
v0.x = rect.x;
v0.y = rect.y;
rect = m_tmap_ptr->tile_wld_space_bounds(m_tmap_ptr->height() - 1, j);
v1.x = rect.x;
v1.y = rect.y - rect.height;
position.push_back(v0);
position.push_back(v1);
if (j == m_tmap_ptr->width() - 1) { // last vertical line
rect = m_tmap_ptr->tile_wld_space_bounds(0, j);
v0.x = rect.x + rect.width;
v0.y = rect.y;
rect = m_tmap_ptr->tile_wld_space_bounds(m_tmap_ptr->height() - 1, j);
v1.x = rect.x + rect.width ;
v1.y = rect.y - rect.height;
position.push_back(v0);
position.push_back(v1);
}
}
// horizontal grid lines
for (int i = 0; i != m_tmap_ptr->height(); ++i) {
math::vec3 v0, v1;
math::Rect rect = m_tmap_ptr->tile_wld_space_bounds(i, 0);
v0.x = rect.x;
v0.y = rect.y;
rect = m_tmap_ptr->tile_wld_space_bounds(i, m_tmap_ptr->width() - 1);
v1.x = rect.x + rect.width;
v1.y = rect.y;
position.push_back(v0);
position.push_back(v1);
if (i == m_tmap_ptr -> height() - 1) {
rect = m_tmap_ptr->tile_wld_space_bounds(i, 0);
v0.x = rect.x;
v0.y = rect.y - rect.height;
rect = m_tmap_ptr->tile_wld_space_bounds(i, m_tmap_ptr->width() - 1);
v1.x = rect.x + rect.width;
v1.y = rect.y - rect.height;
position.push_back(v0);
position.push_back(v1);
}
}
// Create buffers/arrays
glGenVertexArrays(1, &m_debug_VAOS[DISPLAY_GRID]);
glCheckError();
glGenBuffers(1, &m_debug_VBOS[DISPLAY_GRID]);
glCheckError();
glBindVertexArray(m_debug_VAOS[DISPLAY_GRID]);
glCheckError();
// Load data into vertex buffers
//vertex postion
glBindBuffer(GL_ARRAY_BUFFER, m_debug_VBOS[DISPLAY_GRID]);
glCheckError();
glBufferData(GL_ARRAY_BUFFER, position.size() * sizeof(math::vec3), &position[0], GL_STATIC_DRAW);
glCheckError();
glEnableVertexAttribArray(0);
glCheckError();
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, sizeof(math::vec3), (GLvoid*)0);
glCheckError();
glBindVertexArray(0);
glCheckError();
// flag
m_debug_flags[DISPLAY_GRID] = true;
break;
case DISPLAY_COLLIDERS:
if (m_debug_flags[DISPLAY_COLLIDERS]) { //already set
break;
}
else if (glIsVertexArray(m_debug_VAOS[DISPLAY_COLLIDERS]) == GL_TRUE) { // alredy set
std::cerr << __FUNCTION__ << " ERROR: Debug option 'DISPLAY_COLLIDERS' is already set" << std::endl;
break;
}
//SET THE SHADER, SET THE BUFFERS AND SET FLAG TO TRUE
//shader
m_debug_pshaders[DISPLAY_COLLIDERS] = &shader;
m_debug_pshaders[DISPLAY_COLLIDERS]->use();
//buffers
// loop trouhg everty tile in the map
for (int i = 0; i != m_tmap_ptr->height(); ++i) {
for (int j = 0; j != m_tmap_ptr->width(); ++j) {
//get the id of the tile in the map
unsigned id = m_tmap_ptr->get_tile_id(0, i, j);
Tile tile;
//find out witch tileset this tile belongs to
const Tileset * ptileset = nullptr;
for (auto & tileset : m_tmap_ptr->get_tilesets()) {
if (tileset.is_inside_set(id)) {
ptileset = &tileset;
break;
}
}
if (ptileset) { // get the tile from the tileset
tile = ptileset->get_tile(id);
if (tile.m_is_obstacle) { // if it has a collider get the vertices position in the map to draw it
std::cout << "tile with id = " << id << "is collidable" << std::endl;
math::vec3 v0, v1, v2, v3;
math::Rect rect = m_tmap_ptr->tile_wld_space_bounds(i, j);
v0.x = rect.x;
v0.y = rect.y - rect.height;
v1.x = rect.x + rect.width;
v1.y = rect.y - rect.height;
v2.x = rect.x + rect.width;
v2.y = rect.y;
v3.x = rect.x;
v3.y = rect.y;
position.push_back(v0);
position.push_back(v1);
position.push_back(v2);
position.push_back(v2);
position.push_back(v3);
position.push_back(v0);
++m_debug_num_colliders; // remember how many tiles have colliders
}
}
#ifndef NDEBUG
else { //could not find tile
std::cerr << __FUNCTION__ << " ERROR: Could not find tileset containing tile with id = " << id << std::endl;
}
#endif // !NDEBUG
}
}
if (m_debug_num_colliders > 0) {
// Create buffers/arrays
glGenVertexArrays(1, &m_debug_VAOS[DISPLAY_COLLIDERS]);
glCheckError();
glGenBuffers(1, &m_debug_VBOS[DISPLAY_COLLIDERS]);
glCheckError();
glBindVertexArray(m_debug_VAOS[DISPLAY_COLLIDERS]);
glCheckError();
// Load data into vertex buffers
glBindBuffer(GL_ARRAY_BUFFER, m_debug_VBOS[DISPLAY_COLLIDERS]);
glCheckError();
glBufferData(GL_ARRAY_BUFFER, position.size() * sizeof(math::vec3), &position[0], GL_STATIC_DRAW);
glCheckError();
glEnableVertexAttribArray(0);
glCheckError();
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, sizeof(math::vec3), (GLvoid*)0);
glCheckError();
glBindVertexArray(0);
glCheckError();
// flag
m_debug_flags[DISPLAY_COLLIDERS] = true;
}
else {
std::cout << __FUNCTION__ << ": No collidable tiles on the map to display in the DISPLAY_COLLIDERS debug mode" << std::endl;
}
break;
}
#else
std::cout << __FUNCTION__ << ": program build not in debug mode" << std::endl;
#endif
}
void Tile_map_renderer::switch_debug_option(Debug_options option, const bool value)
{
#ifndef NTILE_MAP_DEBUG
m_debug_flags[option] = value;
#else
std::cout << __FUNCTION__ << ": program build not in debug mode" << std::endl;
#endif
}
void Tile_map_renderer::render(const gfx::Shader & shader)
{
shader.use();
//glCheckError();
//(m_tmap_ptr->get_tilesets())[0].get_texture().use();
glBindVertexArray(m_VAO);
//glCheckError();
glDrawArrays(GL_TRIANGLES, 0 ,m_vertices_pos.size());
//glCheckError();
glBindVertexArray(0);
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, 0);
//condition on debug flag
#ifndef NTILE_MAP_DEBUG
if (m_debug_flags[DISPLAY_GRID] && (glIsVertexArray(m_debug_VAOS[DISPLAY_GRID]) == GL_TRUE) ) {
m_debug_pshaders[DISPLAY_GRID]->use();
glBindVertexArray(m_debug_VAOS[DISPLAY_GRID]);
//glCheckError();
glDrawArrays(GL_LINES, 0, (m_tmap_ptr-> width() + m_tmap_ptr-> height() + 2 ) * 2 );
//glCheckError();
glBindVertexArray(0);
}
if (m_debug_flags[DISPLAY_COLLIDERS] && (glIsVertexArray(m_debug_VAOS[DISPLAY_COLLIDERS]) == GL_TRUE) && (m_debug_num_colliders > 0) ) {
m_debug_pshaders[DISPLAY_COLLIDERS]->use();
glBindVertexArray(m_debug_VAOS[DISPLAY_COLLIDERS]);
//glCheckError();
glDrawArrays(GL_TRIANGLES, 0, 6 * m_debug_num_colliders);
//glCheckError();
glBindVertexArray(0);
}
#endif
} |
declare module "html-tag-builder" {
export type classes = string[];
export type html = string;
export type formEnctype = 'application/x-www-form-urlencoded' | 'multipart/form-data' | 'text/plain';
export type referrerPolicy = 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url';
export type crossOrigin = 'anonymous' | 'use-credentials' | '';
export abstract class AbstractTagBuilder<T extends HTMLElement | SVGElement> {
/**
* @param tagName Name of element
* @param id of element
* @param xmlns namespace to use, if one is provided it will use document.createElementNS, otherwise it defaults to browser default
*/
constructor(tagName: string, id?: string, xmlns?: string);
//region attributes
/**
*
* @param key the target attribute key
* @param value the value of the attribute. This value will always be cast to a string
*/
attr(key: string, value: any): AbstractTagBuilder<T>;
/**
* Assigns a slot in a shadow DOM shadow tree to an element: An element with a slot attribute is assigned to the slot created by the <slot> element whose name attribute's value matches that slot attribute's value.
* @param value
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/slot](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/slot)
*/
slot(value: string): AbstractTagBuilder<T>;
/**
* An integer attribute indicating if the element can take input focus (is focusable), if it should participate to sequential keyboard navigation, and if so, at what position. It can take several values:
* - a negative value means that the element should be focusable, but should not be reachable via sequential keyboard navigation
* - 0 means that the element should be focusable and reachable via sequential keyboard navigation, but its relative order is defined by the platform convention
* - a positive value means that the element should be focusable and reachable via sequential keyboard navigation; the order in which the elements are focused is the increasing value of the tabindex. If several elements share the same tabindex, their relative order follows their relative positions in the document.
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex)
*/
tabindex(index: number): AbstractTagBuilder<T>;
//endregion attrs
//region relationships
/**
* Inserts a set of Node objects or DOMString objects after the last child of the Element. DOMString objects are inserted as equivalent Text nodes.
* @see [https://developer.mozilla.org/en-US/docs/Web/API/Element/append](https://developer.mozilla.org/en-US/docs/Web/API/Element/append)
*/
append(...child: (html | AbstractTagBuilder<HTMLElement | SVGElement>)[]): AbstractTagBuilder<T>;
/**
* Inserts a set of Node objects or DOMString objects before the first child of the Element. DOMString objects are inserted as equivalent Text nodes.
* @see [https://developer.mozilla.org/en-US/docs/Web/API/Element/prepend](https://developer.mozilla.org/en-US/docs/Web/API/Element/prepend)
*/
prepend(...child: (html | AbstractTagBuilder<HTMLElement | SVGElement>)[]): AbstractTagBuilder<T>;
/**
* This is only guaranteed to work in `headless` mode
* @param sibling element to insert
* @param [default = 'after'] placement place before preceding element begins or after it ends
*/
insertAdjacent(sibling: AbstractTagBuilder<HTMLElement | SVGElement>, placement: 'after' | 'before'): AbstractTagBuilder<T>;
//endregion relationships
//region content
/**
* Sets the HTML or XML markup contained within the element
* @param html A DOMString containing the HTML serialization of the element's descendants. Setting the value of innerHTML removes all of the element's descendants and replaces them with nodes constructed by parsing the HTML given in the string html.
*
* Note; this does not append HTML, it sets the HTMl, to append elements/html use `.append()`
* @see [https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML](https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML)
*/
innerHTML(html: html): AbstractTagBuilder<T>;
//endregion content
//styling
public abstract bounds(width: string | number, height: string | number): AbstractTagBuilder<T>;
/**
* Add classes to the element
* @param aClass one class name per index
*/
classes(...aClass: classes): AbstractTagBuilder<T>;
public abstract height(height: string | number): AbstractTagBuilder<T>;
/**
* @param cssShorthand css short-hand equivalent rest params
* - 1 value : apply to all sides
* - 2 values : apply to vertical | horizontal
* - 3 values : apply to top | horizontal | bottom
* - 4 values : apply to top right bottom left
* - greater than 4 or 0 values will be ignored
* @see [https://developer.mozilla.org/en-US/docs/Web/CSS/margin](https://developer.mozilla.org/en-US/docs/Web/CSS/margin)
*/
margin(...cssShorthand: string[]): AbstractTagBuilder<T>;
/**
* If the values are null or undefined they will be ignored
* @param top value and unit (for example 100px or 1em or 100% etc)
* @param right value and unit (for example 100px or 1em or 100% etc)
* @param bottom value and unit (for example 100px or 1em or 100% etc)
* @param left value and unit (for example 100px or 1em or 100% etc)
*/
origin(top?: string, right?: string, bottom?: string, left?: string): AbstractTagBuilder<T>;
/**
* @param cssShorthand css short-hand equivalent rest param
* - 1 value : apply to all sides
* - 2 values : apply to vertical | horizontal
* - 3 values : apply to top | horizontal | bottom
* - 4 values : apply to top right bottom left
* - greater than 4 or 0 values will be ignored
* @see [https://developer.mozilla.org/en-US/docs/Web/CSS/padding](https://developer.mozilla.org/en-US/docs/Web/CSS/padding)
*/
padding(...cssShorthand: string[]): AbstractTagBuilder<T>;
/**
* @param value sets how an element is positioned in a document. The top, right, bottom, and left properties determine the final location of positioned elements.
* - relative : The element is positioned according to the normal flow of the document, and then offset relative to itself based on the values of top, right, bottom, and left. The offset does not affect the position of any other elements; thus, the space given for the element in the page layout is the same as if position were static
* - absolute : The element is removed from the normal document flow, and no space is created for the element in the page layout. It is positioned relative to its closest positioned ancestor, if any; otherwise, it is placed relative to the initial containing block. Its final position is determined by the values of top, right, bottom, and left
* - static [default] : The element is positioned according to the normal flow of the document. The top, right, bottom, left, and z-index properties have no effect
* - fixed : The element is removed from the normal document flow, and no space is created for the element in the page layout. It is positioned relative to the initial containing block established by the viewport, except when one of its ancestors has a transform, perspective, or filter property set to something other than none, in which case that ancestor behaves as the containing block. (Note that there are browser inconsistencies with perspective and filter contributing to containing block formation.) Its final position is determined by the values of top, right, bottom, and left.
* - sticky : The element is positioned according to the normal flow of the document, and then offset relative to its nearest scrolling ancestor and containing block (nearest block-level ancestor), including table-related elements, based on the values of top, right, bottom, and left. The offset does not affect the position of any other elements
* @see [https://developer.mozilla.org/en-US/docs/Web/CSS/position](https://developer.mozilla.org/en-US/docs/Web/CSS/position)
*/
position(value: 'relative' | 'absolute' | 'static' | 'fixed' | 'sticky'): AbstractTagBuilder<T>;
/**
* @param obj CSS property-value pairs. Each property/value pair you provide is validated against using the users agents native [window.CSS.supports()](https://developer.mozilla.org/en-US/docs/Web/API/CSS/supports) method. Anything that is not supported will be ignored
*
* For example:
* ```js
* builder.style({
* 'padding-left': '20px',
* 'border-top-left-radius': '2.5em'
* })
* ```
* Notice how the example demonstrates the names of the css properties are not the javascript camelcase variants, they are the css property names as-is
*/
style(obj: { [key: string]: string | number | boolean }): AbstractTagBuilder<T>;
public abstract width(width: string | number): AbstractTagBuilder<T>;
//styling
//region events
/**
* Sets up a function that will be called whenever the specified event is delivered to the target
* @param event A case-sensitive string representing the [event type](https://developer.mozilla.org/en-US/docs/Web/Events) to listen for
* @param listener The object that receives a notification (an object that implements the Event interface) when an event of the specified type occurs [the event listener callback](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#the_event_listener_callback)
* @param options An options object specifies characteristics about the event listener
* - capture : A Boolean indicating that events of this type will be dispatched to the registered listener before being dispatched to any EventTarget beneath it in the DOM tree
* - once : A Boolean indicating that the listener should be invoked at most once after being added. If true, the listener would be automatically removed when invoked
* - passive : A Boolean that, if true, indicates that the function specified by listener will never call preventDefault(). If a passive listener does call preventDefault(), the user agent will do nothing other than generate a console warning
* - signal : An AbortSignal. The listener will be removed when the given AbortSignal’s abort() method is called
* @see [https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)
*/
on(event: keyof GlobalEventHandlersEventMap, listener: (this: T, ev: Event) => any, options?: boolean | AddEventListenerOptions): AbstractTagBuilder<T>;
//endregion events
//region model
public abstract clone(): AbstractTagBuilder<T>;
/**
* @return The node the current builder manages as an HTMLElement
*/
build(): T;
/**
* This is the required build method when in `headless` mode.
* @return HTML string of element
*/
buildHTML(): html;
/**
* Returns the HTML tag name of the element.
* @returns uppercase tag name
*/
public get tagName(): string;
/**
* @returns id of element, if exists
*/
public get tagId(): string | null;
}
export class TagBuilderOptions {
/**
* This flag will automatically set the `aysnc` value of any `<script>` elements
* when created via `ScriptBuilder`
*/
public static set scriptAsync(v: boolean);
/**
* When creating options via the `OptionBuilder`, this flag will automatically
* create values for the `value` attribute based on the content given.
*
* The value created will always be lowercase
*
* For example:
*
* ```js
* new OptionBuilder('Monday').build();
* ```
*
* will create:
* ```html
* <option value="monday">Monday</option>
* ```
*/
public static set useOptionContentForEmptyOptionValue(v: boolean);
/**
* Set the default `<input>` type with this configuration.
*/
public static set defaultInputType(v: string);
/**
* @param v Sets the builder pattern mode type
* - headless : This mode allows you to use `html-tag-builder` without any `document` or `window` based browser logic. This mode will only return strings and requires you to use the `buildHTML()` builder method.
* - document : This mode uses `document` and `window` based logic to create document elements using `document.createElement()`. This mode returns HTMLElements which give you the ability to interact with the element's native properties, events and values and allows for accessing that element via the `build()` builder method.
*/
public static set mode(v: 'headless' | 'document');
/**
* Reset all the `TagBuilderOptions` properties to their default
*/
public static reset(): void;
}
/**
* The canonical way to create any document element
*
* Example to create a div with an id and classes:
* ```js
* new TagBuilder('div', 'myDiv').classes('aClass', 'bClass', 'cClass').build()
* ```
*/
export class TagBuilder<T extends HTMLElement> extends AbstractTagBuilder<T> {
/**
* @param tagName name of html tag
* @param id for tag
* @throws if id of element already exists in the DOM
*/
constructor(tagName: string, id?: string);
/**
* Provides a hint for generating a keyboard shortcut for the current element.
* @param value character of key
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/accesskey](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/accesskey)
*/
accessKey(value: string): TagBuilder<T>;
/**
* Provides a hint to browsers as to the type of virtual keyboard configuration to use when editing this element or its contents. Used primarily on `<input>` elements, but is usable on any element while in contenteditable mode.
* @param value [default 'text']
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode)
*/
inputmode(value: string): TagBuilder<T>;
/**
* Coerce an element into being editable by the user. The browser modifies this tag to allow editing.
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/contenteditable](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/contenteditable)
*/
contentEditable(): TagBuilder<T>;
/**
* @param value Directionality of the element's text
* - ltr : left to right and is to be used for languages that are written from the left to the right (like English)
* - rtl : right to left and is to be used for languages that are written from the right to the left (like Arabic)
* - auto : user agent decides
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir)
*/
dir(value: 'ltr' | 'rtl' | 'auto'): TagBuilder<T>;
/**
* Coerces an element into being draggable. Use the Drag and Drop API
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/draggable](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/draggable)
*/
draggable(): TagBuilder<T>;
/**
* Coerces an element to indicate that it is not yet, or is no longer, relevant. For example, it can be used to hide elements of the page that can't be used until the login process has been completed. The browser won't render such elements. This attribute must not be used to hide content that could legitimately be shown.
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/hidden](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/hidden)
*/
hidden(): TagBuilder<T>;
/**
* Coerce the element to be checked for spelling errors
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/spellcheck](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/spellcheck)
*/
spellcheck(): TagBuilder<T>;
/**
* Sets the text representing advisory information related to the element it belongs to. Such information can typically, but not necessarily, be presented to the user as a tooltip.
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/title](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/title)
*/
title(title: string): TagBuilder<T>;
/**
* Represents the "rendered" text content of a node and its descendants.
* `innerText` is easily confused with Node.textContent, but there are important differences between the two. Basically, `innerText` is aware of the rendered appearance of text, while `textContent` is not.
*
* Note: this does not append HTML, it sets the HTML, to append elements/html use `.append()`
* @see [https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/innerText](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/innerText)
*/
innerText(text: string): TagBuilder<T>;
/**
* @param value Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
* - off or none, no autocapitalization is applied (all letters default to lowercase)
* - on or sentences, the first letter of each sentence defaults to a capital letter; all other letters default to lowercase
* - words, the first letter of each word defaults to a capital letter; all other letters default to lowercase
* - characters, all letters should default to uppercase
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autocapitalize](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autocapitalize)
*/
autocapitalize(value: 'off' | 'on' | 'none' | 'sentences' | 'words' | 'characters'): TagBuilder<T>;
/**
* Set the css caret-color property of the element
* @param color color name or value
* @see [https://developer.mozilla.org/en-US/docs/Web/CSS/caret-color](https://developer.mozilla.org/en-US/docs/Web/CSS/caret-color)
*/
caret(color: string): TagBuilder<T>;
/**
*
* @param transform text to a specfic case
* - uppercase : Is a keyword that converts all characters to uppercase
* - lowercase : Is a keyword that converts all characters to lowercase
* - capitalize: Is a keyword that converts the first letter of each word to uppercase. Other characters remain unchanged (they retain their original case as written in the element's text). A letter is defined as a character that is part of Unicode's Letter or Number general categories ; thus, any punctuation marks or symbols at the beginning of a word are ignored.
*/
textcase(transform: 'uppercase' | 'lowercase' | 'none' | 'capitalize' | 'inherit'): TagBuilder<T>;
/**
* The visibility CSS property shows or hides an element without changing the layout of a document. The property can also hide rows or columns in a `<table>`
* @param value The visibility CSS property shows or hides an element without changing the layout of a document
* - visible: The element box is visible
* - hidden: The element box is invisible (not drawn), but still affects layout as normal. Descendants of the element will be visible if they have visibility set to visible. The element cannot receive focus (such as when navigating through tab indexes)
* - collapse
* * For <table> rows, columns, column groups, and row groups, the row(s) or column(s) are hidden and the space they would have occupied is removed (as if display: none were applied to the column/row of the table). However, the size of other rows and columns is still calculated as though the cells in the collapsed row(s) or column(s) are present. This value allows for the fast removal of a row or column from a table without forcing the recalculation of widths and heights for the entire table.
* * Collapsed flex items and ruby annotations are hidden, and the space they would have occupied is removed.
* * For XUL elements, the computed size of the element is always zero, regardless of other styles that would normally affect the size, although margins still take effect.
* * For other elements, collapse is treated the same as hidden.
* @see [https://developer.mozilla.org/en-US/docs/Web/CSS/visibility](https://developer.mozilla.org/en-US/docs/Web/CSS/visibility)
*/
visibility(value: 'visible' | 'hidden' | 'collapse'): TagBuilder<T>;
/**
* Set the element to specifically be for screen readers only using the [WCAG Standards](https://www.w3.org/WAI/tutorials/forms/labels/#note-on-hiding-elements)
*
* This will automatically add the following styles inline to the element:
* ```js
* element {
border: 0,
clip: rect(0 0 0 0),
height: 1px,
margin: -1px,
overflow: hidden,
padding: 0,
position: absolute,
width: 1px
}
* ```
*/
screenReaderOnly(): TagBuilder<T>;
/**
* Parse an html string of HTML elements and cast that element to a TagBuilder
*
* Please note, this only considers HTMLElement.nodeType of 1
* Meaning this ignores comments, and document fragments and text nodes etc
*
* This method honors attributes in the string.
*
* @param html html string to parse
* @return null if no HTMLElement.nodeType(1) found
*/
static parse(html: html): TagBuilder<HTMLElement>[];
//abstract
/**
* Set the width of the element
* @param width value and unit (for example 100px or 1em or 25)
*/
width(width: string): TagBuilder<T>;
/**
* Set the width and height of the element
* @param width value and unit (for example 100px or 100% or 1em or 25)
* @param height value and unit (for example 100px or 100% or 1em or 25)
*/
public bounds(width: string, height: string): TagBuilder<T>;
/**
* Set the height of the element
* @param height value and unit (for example 100px or 1em or 25)
*/
public height(height: string): TagBuilder<T>;
/**
* Clone the current tag builder. This deep clones the node it respectively manages
* Note: this uses the same HTMLElement.cloneNode() method native to browsers, therefor, things like id's and individual configurations for a given node will be duplicated as-is
*/
public clone(): TagBuilder<T>;
}
/**
* This element builder is used to create an element that indicates the enclosed text is an extended quotation. Usually, this is rendered visually by indentation. A URL for the source of the quotation may be given using the cite attribute, while a text representation of the source can be given using the `<cite>` element.
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/blockquote](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/blockquote)
*/
export class BlockquoteBuilder extends TagBuilder<HTMLQuoteElement> {
/**
* @param cite A URL that designates a source document or message for the information quoted. This attribute is intended to point to information explaining the context or the reference for the quote.
*/
constructor(cite?: string, id?: string);
}
/**
* This element builder is used to group several controls as well as labels (`<label>`) within a web form.
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset)
*/
export class FieldsetBuilder extends TagBuilder<HTMLFieldSetElement> {
/**
* @param legend represents a caption for the content
*/
constructor(legend?: string, id?: string);
}
/**
* This element builder is used to create an element that represents self-contained content, potentially with an optional caption
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figure](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figure)
*/
export class FigureBuilder extends TagBuilder<HTMLElement> {
/**
* @param caption innerHTML or text of `<figcaption>`
* @param captionPlacement identify if the caption should be first or last element. Note, it is expected to be first or last per [specs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figure#usage_notes)
*/
constructor(caption?: html, captionPlacement?: 'top' | 'bottom', id?: string);
}
/**
* This element builder is used to create a hyperlink to web pages, files, email addresses, locations in the same page, or anything else a URL can address
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a)
*/
class AnchorBuilder extends TagBuilder<HTMLAnchorElement> {
/**
* @param href url
* @param target [default = '_self']
* @throws Error if the href or target are null or undefined
*/
constructor(href: string, target?: '_self' | '_blank' | '_parent' | '_top', id?: string);
/**
* Hints at the human language of the linked URL. No built-in functionality
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-hreflang](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-hreflang)
*/
hreflang(lang: string): AnchorBuilder;
/**
* Hints at the linked URL’s format with a MIME type
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-type)
*/
mimeType(value: string): AnchorBuilder;
/**
* @param urls A list of URLs. When the link is followed, the browser will send POST requests with the body PING to the URLs. Typically for tracking.
*/
ping(urls: string[]): AnchorBuilder;
/**
* @param value The relationship of the linked URL as space-separated link types
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types)
*/
rel(value: string): AnchorBuilder;
}
/**
* An extended class of AnchorBuilder that creates an `<a>` tag specifically meant to act as a clickable download link
*/
export class DownloadLinkBuilder extends AnchorBuilder {
/**
* @param href The URL that the hyperlink points to. Links are not restricted to HTTP-based URLs
* @param filename Name of the file to save to client [reference](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-download)
*/
constructor(href: string, filename: string, id?: string);
}
/**
* This element builder is used to create an area inside an image map that has predefined clickable areas. An image map allows geometric areas on an image to be associated with hypertext link
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/area](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/area)
*/
export class AreaBuilder extends TagBuilder<HTMLAreaElement> {
/**
*
* @param coords The coords attribute details the coordinates of the shape attribute in size, shape, and placement of an `<area>`
* @param shape [default = 'default'] The shape of the associated hot spot. The specifications for HTML defines the values rect, which defines a rectangular region; circle, which defines a circular region; poly, which defines a polygon; and default, which indicates the entire region beyond any defined shapes.
*
* Many browsers, notably Internet Explorer 4 and higher, support circ, polygon, and rectangle as valid values for shape, but these values are non-standard.
* @throws Error if coords is null or undefined
*/
constructor(coords: string, shape?: 'rect' | 'circle' | 'poly' | 'default', id?: string);
/**
* @throws Error if href value or alt are null or undefined
*/
href(url: string, alt: string): AreaBuilder;
/**
* @param lang Indicates the language of the linked resource. Use this attribute only if the href attribute is present.
*/
hreflang(lang: string): AreaBuilder;
/**
* @param urls A space-separated list of URLs. When the link is followed, the browser will send POST requests with the body PING to the URLs. Typically for tracking.
*/
ping(urls: string[]): AreaBuilder;
/**
* @param value The relationship of the linked URL as space-separated link types
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types)
*/
rel(value: string): AreaBuilder;
/**
* @param value A keyword or author-defined name of the browsing context to display the linked resource
*/
target(value: '_self' | '_blank' | '_parent' | '_top'): AreaBuilder;
}
/**
* An extended class of AreaBuilder that creates an `<area>` tag specifically meant to act as a clickable download link
*/
export class DownloadAreaBuilder extends AreaBuilder {
/**
* @param filename Name of the file to save to client [reference](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-download)
* @param coords The coords attribute details the coordinates of the shape attribute in size, shape, and placement of an `<area>` [reference](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/area#attr-coords)
* @param shape [default = 'default']
* @throws Error if filename is not provided
*/
constructor(filename: string, coords: string, shape?: 'rect' | 'circle' | 'poly' | 'default', id?: string);
}
/**
* This element builder is used to create an element that links a given piece of content with a machine-readable translation. If the content is time- or date-related, the <time> element must be used
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/data](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/data)
*/
export class DataBuilder extends TagBuilder<HTMLDataElement> {
/**
* @param value the elements attribute `value` value
*/
constructor(value: string, id?: string);
}
/**
* This element builder is used to create a generic inline container for phrasing content, which does not inherently represent anything. It can be used to group elements for styling purposes (using the class or id attributes), or because they share attribute values, such as lang. It should be used only when no other semantic element is appropriate. `<span>` is very much like a <div> element, but `<div>` is a block-level element whereas a `<span>` is an inline element
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/span](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/span)
*/
export class SpanBuilder extends TagBuilder<HTMLSpanElement> {
/**
* @param style an array of frequently used styling elements. This are added to the elements CSS properties inline. Similar styles or different values for the same CSS property will override one another
*/
constructor(style?: ('bold' | 'bolder' | 'lighter' | 'italic' | 'underline' | 'strikethrough')[], id?: string);
/**
* font-weight: bold
*/
bold(): SpanBuilder;
/**
* font-weight: bolder
*/
bolder(): SpanBuilder;
/**
* font-style: italic;
*/
italic(): SpanBuilder;
/**
* font-weight: lighter
*/
lighter(): SpanBuilder;
/**
* text-decoration: underline
*/
underline(): SpanBuilder;
/**
* text-decoration: strikethrough
*/
strikethrough(): SpanBuilder;
/**
* color: <value>
* @param value any valid CSS color value
*/
color(value: string): SpanBuilder;
}
/**
* This element builder is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input)
*/
export class InputBuilder extends TagBuilder<HTMLInputElement> {
/**
* @param type [default = 'text'] Type of form control
*/
constructor(type?: string, id?: string);
/**
* @param value Hint for form autofill feature [reference](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete)
*/
autocomplete(value: string): InputBuilder;
/**
* Automatically focus the form control when the page is loaded
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-autofocus](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-autofocus)
*/
autofocus(): InputBuilder;
/**
* @param id The value given should be the id of a `<datalist>` element located in the same document which provides predefined values to suggest to the user for this input
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input#htmlattrdeflist](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input#htmlattrdeflist)
*/
datalist(id: string): InputBuilder;
/**
* Disables the control
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefdisabled](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefdisabled)
*/
disabled(): InputBuilder;
/**
* @param value Name of the form control. Submitted with the form as part of a name/value pair [reference](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefname)
*/
name(value: string): InputBuilder;
/**
* @param value set the custom validity message that populates when the control value resolves to an error
* @see [https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/setCustomValidity](https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/setCustomValidity)
*/
onInvalid(value: string): InputBuilder;
/**
* Text that appears in the form control when it has no value set
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefplaceholder](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefplaceholder)
*/
placeholder(value: string): InputBuilder;
/**
* Specify that the control is readonly
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly)
*/
readOnly(): InputBuilder;
/**
* A value is required or must be check for the form to be submittable
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/required](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/required)
*/
required(): InputBuilder;
/**
* @param value The initial value of the control
*/
value(value: string): InputBuilder;
}
/**
* This element builder is used to create a control for entering a number. Displays a spinner and adds default validation when supported. Displays a numeric keypad in some devices with dynamic keypads.
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/number](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/number)
*/
export class NumberInputBuilder extends InputBuilder {
/**
* @param value Initial value of the control
*/
constructor(value?: string, id?: string);
/**
* @param value The minimum value to accept for this input
*/
min(value: string): NumberInputBuilder;
/**
* @param value The maximum value to accept for this input
*/
max(value: string): NumberInputBuilder;
/**
* @param interval A stepping interval to use when using up and down arrows to adjust the value, as well as for validation [reference](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/number#attr-step)
*/
step(interval: string): NumberInputBuilder;
}
/**
* This element builder is used to create a control for entering a number whose exact value is not important. Displays as a range widget defaulting to the middle value. Used in conjunction min and max to define the range of acceptable values
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/range](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/range)
*/
export class RangeInputBuilder extends NumberInputBuilder {
/**
* @param value initial value of the control
*/
constructor(value?: string, id?: string);
}
/**
* This element builder is used to create a check box allowing single values to be selected/deselected
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox)
*/
export class CheckboxInputBuilder extends InputBuilder {
/**
* @param isIndeterminate [default = 'false'] the checkboxs value is neither true or false if this is enabled [reference](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#attr-indeterminate)
*/
constructor(isIndeterminate?: boolean, id?: string);
/**
* Sets the checkboxes value to checked
*/
checked(): CheckboxInputBuilder;
}
/**
* A radio button, allowing a single value to be selected out of multiple choices with the same name value
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/radio](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/radio)
*/
export class RadioInputBuilder extends InputBuilder {
/**
* @param checked indicate if the radio button is checked or not
* @param id
*/
constructor(checked?: boolean, id?: string);
}
/**
* This element builder is used to create a control for entering a date (year, month, and day, with no time). Opens a date picker or numeric wheels for year, month, day when active in supporting browsers
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date)
*/
export class DateInputBuilder extends NumberInputBuilder {
/**
* @param value initial value of the control
*/
constructor(value?: string, id?: string);
}
/**
* This element builder is used to create a control for entering a date and time, with no time zone. Opens a date picker or numeric wheels for date- and time-components when active in supporting browsers
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/datetime-local](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/datetime-local)
*/
export class DateTimeLocalInputBuilder extends DateInputBuilder {
/**
* @param value initial value of the control
*/
constructor(value?: string, id?: string);
}
/**
* This element builder is used to create a control for entering a month and year, with no time zone
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/month](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/month)
*/
export class MonthInputBuilder extends DateInputBuilder {
/**
* @param value initial value of the control
*/
constructor(value?: string, id?: string);
}
/**
* This element builder is used to create a control for entering a time value with no time zone
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/time](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/time)
*/
export class TimeInputBuilder extends DateInputBuilder {
/**
* @param value initial value of the control
*/
constructor(value?: string, id?: string);
}
/**
* This element builder is used to create a control for entering a date consisting of a week-year number and a week number with no time zone
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/week](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/week)
*/
export class WeekInputBuilder extends DateInputBuilder {
/**
* @param value initial value of the control
*/
constructor(value?: string, id?: string);
}
/**
* This element builder is used to create a control that lets the user select a file. Use the accept attribute to define the types of files that the control can select
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file)
*/
export class FileInputBuilder extends InputBuilder {
/**
* @param accept One or more unique file type specifiers describing file types to allow [reference](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept)
*/
constructor(accept?: string, id?: string);
/**
* @param value specifies which camera to use for capture of image or video data [reference](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#attr-capture)
*/
capture(value: 'user' | 'environment'): FileInputBuilder;
/**
* allows the user to select more than one file
*/
multiple(): FileInputBuilder;
}
/**
* This element builder is used to create a graphical submit button. Displays an image defined by the src attribute. The alt attribute displays if the image src is missing.
*/
export class ImageInputBuilder extends InputBuilder {
/**
* @param src url of image
* @param alt It is semantic HTML to always include text for images incase they are not displayed
* @throws Error if src or alt are null or undefinde
*/
constructor(src: string, alt: string, id?: string);
/**
* @param url The URL to which to submit the data
*/
formAction(url: string): ImageInputBuilder;
/**
* @param enctype The encoding method to use when submitting the form data [reference](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/image#attr-formenctype)
*/
formEnctype(enctype: formEnctype): ImageInputBuilder;
/**
* @param method HTTP method to use when submitting the form [reference](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/image#attr-formmethod)
*/
formMethod(method: 'get' | 'post' | 'dialog'): ImageInputBuilder;
}
/**
* This element builder is used to create a single-line text field. Line-breaks are automatically removed from the input value
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/text](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/text)
*/
export class TextInputBuilder extends InputBuilder {
constructor(id?: string);
/**
* @param value The maximum number of characters the input should accept
*/
maxLength(value: number): TextInputBuilder;
/**
* @param value The minimum number of characters the input should accept
*/
minLength(value: number): TextInputBuilder;
/**
* @param value A regular expression the input's contents must match in order to be valid
*/
pattern(value: RegExp | string): TextInputBuilder;
/**
* @param value A number indicating how many characters wide the input field should be
*/
size(value: number): TextInputBuilder;
}
/**
* This element builder is used to create a field for editing an email address. Looks like a text input, but has validation parameters and relevant keyboard in supporting browsers and devices with dynamic keyboards
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/email](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/email)
*/
export class EmailInputBuilder extends TextInputBuilder {
constructor(id?: string);
/**
* Indicates that the user can enter a list of multiple e-mail addresses, separated by commas and, optionally, whitespace characters
*/
multiple(): EmailInputBuilder;
}
/**
* This element builder is used to create a single-line text field whose value is obscured. Will alert user if site is not secure
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/password](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/password)
*/
export class PasswordInputBuilder extends TextInputBuilder {
constructor(id?: string);
}
/**
* This element builder is used to create a single-line text field for entering search strings. Line-breaks are automatically removed from the input value. May include a delete icon in supporting browsers that can be used to clear the field. Displays a search icon instead of enter key on some devices with dynamic keypads
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/search](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/search)
*/
export class SearchInputBuilder extends TextInputBuilder {
constructor(id?: string);
}
/**
* This element builder is used to create a control for entering a telephone number. Displays a telephone keypad in some devices with dynamic keypads
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/tel](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/tel)
*/
export class TelInputBuilder extends TextInputBuilder {
constructor(id?: string);
}
/**
* This element builder is used to create a field for entering a URL. Looks like a text input, but has validation parameters and relevant keyboard in supporting browsers and devices with dynamic keyboards
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/url](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/url)
*/
export class UrlInputBuilder extends TextInputBuilder {
constructor(id?: string);
}
/**
* This element builder is used to create an element represents a multi-line plain-text editing control, useful when you want to allow users to enter a sizeable amount of free-form text, for example a comment on a review or feedback form
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea)
*/
export class TextAreaBuilder extends TagBuilder<HTMLTextAreaElement> {
/**
* @param rows specify an exact size of how tall the textarea is
* @param cols specify an exact size of how wide the textarea is
*/
constructor(rows?: number, cols?: number, id?: string);
/**
* @param value Hint for form autofill feature [reference](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete)
*/
autocomplete(value: string): TextAreaBuilder;
/**
* Automatically focus the form control when the page is loaded
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete)
*/
autofocus(): TextAreaBuilder;
/**
* Disables the control
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefdisabled](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefdisabled)
*/
disabled(): TextAreaBuilder;
/**
* @param value The maximum number of characters (UTF-16 code units) that the user can enter. If this value isn't specified, the user can enter an unlimited number of characters
*/
maxLength(value: number): TextAreaBuilder;
/**
* @param value The minimum number of characters (UTF-16 code units) required that the user should enter
*/
minLength(value: number): TextAreaBuilder;
/**
* @param value Name of the form control. Submitted with the form as part of a name/value pair [reference](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefname)
*/
name(value: string): TextAreaBuilder;
/**
* @param value set the custom validity message that populates when the control value produces an error
*/
onInvalid(value: string): TextAreaBuilder;
/**
* Text that appears in the form control when it has no value set
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefplaceholder](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefplaceholder)
*/
placeholder(value: string): TextAreaBuilder;
/**
* Specify that the control is readonly
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly)
*/
readOnly(): TextAreaBuilder;
/**
* A value is required or must be check for the form to be submittable
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/required](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/required)
*/
required(): TextAreaBuilder;
/**
* @param value The initial value of the control
*/
value(value: string): TextAreaBuilder;
/**
* @param value [default = 'soft'] Indicates how the control wraps text. Possible values are:
* - hard: The browser automatically inserts line breaks (CR+LF) so that each line has no more than the width of the control; the cols attribute must also be specified for this to take effect.
* - soft: The browser ensures that all line breaks in the value consist of a CR+LF pair, but does not insert any additional line breaks.
*/
wrap(value: 'hard' | 'soft'): TextAreaBuilder;
}
/**
* This element builder is used to create an element that contains a set of `<option>` elements that represent the permissible or recommended options available to choose from within other controls
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist)
*/
export class DataListBuilder extends TagBuilder<HTMLDataListElement> {
/**
* @throws Error if id is null or undefined
*/
constructor(id: string);
/**
* Add an `<option>` element to the datalist
* @param content the HTML or text for the `<option>`
* @param value the attribute `value` value
* @param classes array of class names
* @throws Error if content is null or undefined
*/
addOption(content: html, value: string, classes?: classes): DataListBuilder;
addOptions(...option: (html | OptionBuilder)[]): DataListBuilder;
}
/**
* This element builder is used to create an element that represents a description list. The element encloses a list of groups of terms (specified using the <dt> element) and descriptions (provided by <dd> elements). Common uses for this element are to implement a glossary or to display metadata (a list of key-value pairs)
*/
export class DLBuilder extends TagBuilder<HTMLDListElement> {
/**
*
* @param wrapDtDdGroupsInDiv [default = false] Semantic HTML allows for premitted content to be one or more `<div>` elements if you don't want the `<dt>` and `<dd>` elements to be direct descendants [reference](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dl#wrapping_name-value_groups_in_htmlelementdiv_elements)
* @param groupsDivClasses classes to be added to each div wrapper
*/
constructor(wrapDtDdGroupsInDiv?: boolean, groupsDivClasses?: classes, id?: string);
/**
* @param term HTML or text of the term (`<dt>`) to add
* @param dd HTML or `<dd>` children for the given term. If a TagBuilder is provided and the tag is not an DDHTMLElement, it will automatically be added to one
* @throws Error if term is null or undefined
*/
addTerm(term: html, ...dd: (html | TagBuilder<HTMLElement>)[]): DLBuilder;
}
/**
* This element builder is used to create a disclosure widget in which information is visible only when the widget is toggled into an "open" state. A summary or label must be provided using the `<summary>` element
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details)
*/
export class DetailsBuilder extends TagBuilder<HTMLDetailsElement> {
/**
* @param summary Specifies a summary, caption, or legend for a <details> element's disclosure box [reference](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/summary)
* @param open Indicates whether or not the details — that is, the contents of the <details> element — are currently visible. The details are shown when this attribute exists, or hidden when this attribute is absent. By default this attribute is absent which means the details are not visible
*/
constructor(summary?: html, open?: boolean, id?: string);
}
/**
* This element builder is used to create an item contained in a `<select>`, an `<optgroup>`, or a `<datalist>` element. As such, `<option>` can represent menu items in popups and other lists of items in an HTML document
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option)
*/
export class OptionBuilder extends TagBuilder<HTMLOptionElement> {
/**
* @param content HTML or text of the option
* @param value The attribute `value` value. If one is not provided, depending on the global configurations, one will be generated automatically based on the content.
*/
constructor(content: html, value?: string, id?: string);
}
/**
* This element builder is used to create an element that represents a control that provides a menu of options
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select)
*/
export class SelectBuilder extends TagBuilder<HTMLSelectElement> {
/**
* @param instructionMessage If provided, this will be the first option in the element that is usually used as a placeholder. It is automatically given an attribute `value` of `""` and disabled for selection
*/
constructor(instructionMessage?: string, id?: string);
/**
* Create an `<optgroup>` container with provided options
* @param label The description of the groups
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/optgroup](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/optgroup)
* @throws Error if label is null or undefined
*/
addOptionGroup(label: string, ...option: OptionBuilder[]): SelectBuilder;
/**
* @param content HTML or text for the `<option>`
* @param value The options `value` attribute's value
* @param classes
*/
addOption(content: html, value: string, classes: classes): SelectBuilder;
addOptions(options: (html | OptionBuilder)[]): SelectBuilder;
/**
* @param value Hint for form autofill feature [reference](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete)
*/
autocomplete(value: string): SelectBuilder;
/**
* Automatically focus the form control when the page is loaded
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete)
*/
autofocus(): SelectBuilder;
/**
* Disables the control
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefdisabled](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefdisabled)
*/
disabled(): SelectBuilder;
/**
* Indicates that multiple options can be selected in the list
*/
multiple(): SelectBuilder;
/**
* @param value Name of the control
*/
name(value: string): SelectBuilder;
/**
* @param value set the custom validity message that populates when the control value produces an error
*/
onInvalid(value: string): SelectBuilder;
/**
* A value is required or must be check for the form to be submittable
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/required](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/required)
*/
required(): SelectBuilder;
/**
* @param value If the control is presented as a scrolling list box (multiple) this attribute indicates how many rows should be displayed at a time
*/
size(value: number): SelectBuilder;
}
/**
* This element builder is used to create an item in a list. It must be contained in a parent element: an ordered list (<ol>), an unordered list (<ul>), or a menu (<menu>). In menus and unordered lists, list items are usually displayed using bullet points. In ordered lists, they are usually displayed with an ascending counter on the left, such as a number or letter
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li)
*/
export class ListItemBuilder extends TagBuilder<HTMLLIElement> {
constructor(html: html, id?: string);
}
/**
* This element builder is used to create an element with a list of items rendered in list format
*/
export class ListBuilder extends TagBuilder<HTMLUListElement> {
/**
*
* @param isOrdered Identifies if the list should be an [ordered](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol) with numeric style identifiers or [unordered list](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ul) typeically identified with shapes or images
* @param style The list-style of the given list [reference](https://developer.mozilla.org/en-US/docs/Web/CSS/list-style)
*/
constructor(isOrdered?: boolean, style?: string, id?: string);
/**
* @param item HTML, text or ListItemBuilder to add to the current element
*/
addItem(item: html | ListItemBuilder): ListBuilder;
addItems(items: (html | ListItemBuilder)[]): ListBuilder;
/**
* Add's a sublist list `<ul>` or `<ol>` with proper HTML markup by automatically adding it to a `<li>`. This is semantic HTML as well as proper HTML markup. [reference](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ul#nesting_a_list)
*/
addSublist(listBuilder: ListBuilder): ListBuilder;
}
/**
* This element builder is used to create embed sound content in documents. It may contain one or more audio sources, represented using the src attribute or the <source> element: the browser will choose the most suitable one. It can also be the destination for streamed media, using a MediaStream
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio)
*/
export class AudioBuilder extends TagBuilder<HTMLAudioElement> {
/**
* @param src url of audio source
* @throws Error if src is undefined or null
*/
constructor(src: string, id?: string);
/**
* Add a source for browsers that don't support main src.
*
* If this method is called you must provide arguments for all parameters
* @param src url of audio
* @param type mimetype of url content
* @throws Error if source or type is null or undefined
*/
addFallbackSrc(src: string, type: string): AudioBuilder;
/**
* The audio player will automatically seek back to the start upon reaching the end of the audio
*/
loop(): AudioBuilder;
/**
* Mutes the element by default
*/
muted(): AudioBuilder;
/**
* Indicates that the browser will not offer controls to allow the user to control audio playback, including volume, seeking, and pause/resume playback
*/
noControls(): AudioBuilder;
/**
* @param html HTML or text to be displayed for browsers that do not support this element
*/
onNotSupported(html: html): AudioBuilder;
/**
* @param value [default = 'auto'] Provide a hint to the browser about what the author thinks will lead to the best user experience. It may have one of the following values:
* - none : Indicates that the audio should not be preloaded
* - metadata : Indicates that only the audio metadata (e.g. length) is fetched
* - auto : Indicates that the whole audio file can be downloaded, even if the user is not expected to use it
*/
preload(value: 'none' | 'metadata' | 'auto'): AudioBuilder;
/**
* Specify timed text tracks (or time-based data), for example to automatically handle subtitles. The tracks are formatted in WebVTT format (.vtt files) — Web Video Text Tracks
* @param src Address of the track (.vtt file). Must be a valid URL. This attribute must be specified and its URL value must have the same origin as the document — unless the `<audio>` parent element of the track element has a crossorigin attribute
* @param kind How the text track is meant to be used. If omitted the default kind is subtitles. If the attribute contains an invalid value, it will use metadata (Versions of Chrome earlier than 52 treated an invalid value as subtitles). The following keywords are allowed:
* - subtitles
* - Subtitles provide translation of content that cannot be understood by the viewer. For example speech or text that is not English in an English language film.
* - Subtitles may contain additional content, usually extra background information. For example the text at the beginning of the Star Wars films, or the date, time, and location of a scene.
* - captions
* - Closed captions provide a transcription and possibly a translation of audio.
* - It may include important non-verbal information such as music cues or sound effects. It may indicate the cue's source (e.g. music, text, character).
* - Suitable for users who are deaf or when the sound is muted.
* - descriptions
* - Textual description of the audio content.
* - Suitable for users who are blind or where the audio cannot be seen.
* - chapters
* - Chapter titles are intended to be used when the user is navigating the media resource.
* - metadata: Tracks used by scripts. Not visible to the user.
* @param isDefault This attribute indicates that the track should be enabled unless the user's preferences indicate that another track is more appropriate. This may only be used on one track element per media element
* @param srclang Language of the track text data. It must be a valid BCP 47 language tag. If the kind attribute is set to subtitles, then srclang must be defined
* @param label A user-readable title of the text track which is used by the browser when listing available text tracks
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/track](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/track)
*/
track(src: string, kind: 'subtitles' | 'captions' | 'descriptions' | 'chapters' | 'metadata', isDefault?: boolean, srclang?: string, label?: string): AudioBuilder;
}
/**
* This element builder is used to create an element that embeds external content at the specified point in the document. This content is provided by an external application or other source of interactive content such as a browser plug-in
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/embed](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/embed)
*/
export class EmbedBuilder extends TagBuilder<HTMLEmbedElement> {
/**
* @param src The url of the resource being embedded
* @param type The MIME type to use to select the plug-in instantiate
* @throws Error if src or type is undefined or null
*/
constructor(src: string, type: string, id?: string);
}
/**
* This element builder is used to create a inline frame element (`<iframe>`) that represents a nested browsing context, embedding another HTML page into the current one
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe)
*/
export class IframeBuilder extends TagBuilder<HTMLIFrameElement> {
/**
* @param src The URL of the page to embed. Use a value of `about:blank` to embed an empty page that conforms to the same-origin policy. Also note that programmatically removing an `<iframe>`'s src attribute (e.g. via Element.removeAttribute()) causes `about:blank` to be loaded in the frame in Firefox (from version 65), Chromium-based browsers, and Safari/iOS
* @throws Error if src is null or undefined
*/
constructor(src: string, id?: string);
/**
* Specifies a feature policy for the `<iframe>`. The policy defines what features are available to the `<iframe>` based on the origin of the request (e.g. access to the microphone, camera, battery, web-share API, etc.)
* @param value [reference](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Feature-Policy#directives)
*/
allow(value: string): IframeBuilder;
/**
* @param value Indicates which referrer to send when fetching the frame's resource:
* - no-referrer: The Referer header will not be sent.
* - no-referrer-when-downgrade (default): The Referer header will not be sent to origins without TLS (HTTPS).
* - origin: The sent referrer will be limited to the origin of the referring page: its scheme, host, and port.
* - origin-when-cross-origin: The referrer sent to other origins will be limited to the scheme, the host, and the port. Navigations on the same origin will still include the path.
* - same-origin: A referrer will be sent for same origin, but cross-origin requests will contain no referrer information.
* - strict-origin: Only send the origin of the document as the referrer when the protocol security level stays the same (HTTPS→HTTPS), but don't send it to a less secure destination (HTTPS→HTTP).
* - strict-origin-when-cross-origin: Send a full URL when performing a same-origin request, only send the origin when the protocol security level stays the same (HTTPS→HTTPS), and send no header to a less secure destination (HTTPS→HTTP).
* - unsafe-url: The referrer will include the origin and the path (but not the fragment, password, or username). This value is unsafe, because it leaks origins and paths from TLS-protected resources to insecure origins
*/
referrerPolicy(value: referrerPolicy): IframeBuilder;
/**
* @param value Applies extra restrictions to the content in the frame. The value of the attribute can either be empty to apply all restrictions, or space-separated tokens to lift particular restrictions:
* - allow-downloads: Allows for downloads to occur with a gesture from the user.
* - allow-forms: Allows the resource to submit forms. If this keyword is not used, form submission is blocked.
* - allow-modals: Lets the resource open modal windows.
* - allow-orientation-lock: Lets the resource lock the screen orientation.
* - allow-pointer-lock: Lets the resource use the Pointer Lock API.
* - allow-popups: Allows popups (such as window.open(), target="_blank", or showModalDialog()). If this keyword is not used, the popup will silently fail to open.
* - allow-popups-to-escape-sandbox: Lets the sandboxed document open new windows without those windows inheriting the sandboxing. For example, this can safely sandbox an advertisement without forcing the same restrictions upon the page the ad links to.
* - allow-presentation: Lets the resource start a presentation session.
* - allow-same-origin: If this token is not used, the resource is treated as being from a special origin that always fails the same-origin policy (potentially preventing access to data storage/cookies and some JavaScript APIs).
* - allow-scripts: Lets the resource run scripts (but not create popup windows).
* - allow-top-navigation: Lets the resource navigate the top-level browsing context (the one named _top).
* - allow-top-navigation-by-user-activation: Lets the resource navigate the top-level browsing context, but only if initiated by a user gesture
*/
sandbox(value: 'allow-downloads' | 'allow-forms' | 'allow-modals' | 'allow-orientation-lock' | 'allow-pointer-lock' | 'allow-popups' | 'allow-popups-to-escape-sandbox' | 'allow-presentation' | 'allow-same-origin' | 'allow-scripts' | 'allow-top-navigation' | 'allow-top-navigation-by-user-activation' | string): IframeBuilder;
/**
* @param value Inline HTML to embed, overriding the src attribute. If a browser does not support the srcdoc attribute, it will fall back to the URL in the src attribute
*/
srcdoc(value: html): IframeBuilder;
}
/**
* This element builder is used to create an element that embeds an image into the document
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img)
*/
export class ImageBuilder extends TagBuilder<HTMLImageElement> {
/**
* @param src contains the path to the image you want to embed
* @param alt holds a text description of the image. Alt text is also displayed on the page if the image can't be loaded for some reason: for example, network errors, content blocking, or linkrot. This attribute is semantically correct to use and is proper markup for accessibilty
* @throws Error if src or alt is null or undefined
*/
constructor(src: string, alt: string, id?: string);
/**
* @param value Provides an image decoding hint to the browser. Allowed values:
* - sync: Decode the image synchronously, for atomic presentation with other content.
* - async: Decode the image asynchronously, to reduce delay in presenting other content.
* - auto: (Default) no preference for the decoding mode. The browser decides what is best for the user
*/
decoding(value: 'sync' | 'async' | 'auto'): ImageBuilder;
/**
* @param value One or more strings separated by commas, indicating a set of source sizes. Each source size consists of:
* - A media condition. This must be omitted for the last item in the list.
* - A source size value.
* Media Conditions describe properties of the viewport, not of the image. For example, `(max-height: 500px) 1000px` proposes to use a source of `1000px` width, if the viewport is not higher than `500px`.
*
* Source size values specify the intended display size of the image. User agents use the current source size to select one of the sources supplied by the srcset attribute, when those sources are described using width (w) descriptors. The selected source size affects the intrinsic size of the image (the image’s display size if no CSS styling is applied). If the srcset attribute is absent, or contains no values with a width descriptor, then the sizes attribute has no effect
*/
sizes(value: string): ImageBuilder;
/**
* @param value One or more strings separated by commas, indicating possible image sources for the user agent to use. Each string is composed of:
* - A URL to an image
* - Optionally, whitespace followed by one of:
* - A width descriptor (a positive integer directly followed by w). The width descriptor is divided by the source size given in the sizes attribute to calculate the effective pixel density.
* - A pixel density descriptor (a positive floating point number directly followed by x).
*
* If no descriptor is specified, the source is assigned the default descriptor of 1x.
*
* It is incorrect to mix width descriptors and pixel density descriptors in the same srcset attribute. Duplicate descriptors (for instance, two sources in the same srcset which are both described with 2x) are also invalid.
*
* The user agent selects any of the available sources at its discretion. This provides them with significant leeway to tailor their selection based on things like user preferences or bandwidth conditions. See our Responsive images tutorial for an example
*/
srcset(value: string): ImageBuilder;
}
/**
* This element builder is used to create an element that specifies multiple media resources for the `<picture>`, the `<audio>` element, or the `<video>` element. It is an empty element, meaning that it has no content and does not have a closing tag. It is commonly used to offer the same media content in multiple file formats in order to provide compatibility with a broad range of browsers given their differing support for image file formats and media file formats
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source)
*/
export class SourceBuilder extends TagBuilder<HTMLSourceElement> {
/**
* @throws Error if src or type is null or undefined
*/
constructor(src: string, type: string, id?: string);
/**
* @param value Media query of the resource's intended media; this should be used only in a `<picture>` element
*/
media(value: string): SourceBuilder;
/**
* * @param value Is a list of source sizes that describes the final rendered width of the image represented by the source. Each source size consists of a comma-separated list of media condition-length pairs. This information is used by the browser to determine, before laying the page out, which image defined in srcset to use. Please note that sizes will have its effect only if width dimension descriptors are provided with srcset instead of pixel ratio values (200w instead of 2x for example).
*
* The sizes attribute has an effect only when the `<source>` element is the direct child of a `<picture>` element
*/
sizes(value: string): SourceBuilder;
/**
* * @param value A list of one or more strings separated by commas indicating a set of possible images represented by the source for the browser to use. Each string is composed of:
* - One URL specifying an image.
* - A width descriptor, which consists of a string containing a positive integer directly followed by "w", such as 300w. The default value, if missing, is the infinity.
* - A pixel density descriptor, that is a positive floating number directly followed by "x". The default value, if missing, is 1x.
*
* Each string in the list must have at least a width descriptor or a pixel density descriptor to be valid. Among the list, there must be only one string containing the same tuple of width descriptor and pixel density descriptor. The browser chooses the most adequate image to display at a given point of time.
*
* The srcset attribute has an effect only when the `<source>` element is the direct child of a `<picture>` element
*/
srcset(value: string): SourceBuilder;
}
/**
* This element builder is used to create a `<picture>` element that contains zero or more `<source>` elements and one `<img>` element to offer alternative versions of an image for different display/device scenarios.
*
* The browser will consider each child `<source>` element and choose the best match among them. If no matches are found—or the browser doesn't support the `<picture>` element—the URL of the `<img>` element's src attribute is selected. The selected image is then presented in the space occupied by the `<img>` element
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture)
*/
export class PictureBuilder extends TagBuilder<HTMLPictureElement> {
constructor(imgBuilder: ImageBuilder, id?: string);
/**
* @param source Add an alternate source (`<source>`) tag via SourceBuilders
*/
source(...source: SourceBuilder[]): PictureBuilder;
}
/**
* This element builder is used to create an element (`<video>`) that embeds a media player which supports video playback into the document
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video)
*/
export class VideoBuilder extends TagBuilder<HTMLVideoElement> {
/**
* @param src The URL of the video to embed
* @param type The MIME media type of the resource
* @throws Error if src or type is null or undefined
*/
constructor(src: string, type: string, id?: string);
/**
* Add a source for browsers that don't support main src.
*
* If this method is called you must provide arguments for all parameters
* @param src url of video
* @param type mimetype of url content
* @throws Error if source or type is null or undefined
*/
addFallbackSrc(src: string, type: string): VideoBuilder;
/**
* The video player will automatically seek back to the start upon reaching the end of the video
*/
loop(): VideoBuilder;
/**
* For the element to be muted by default
*/
muted(): VideoBuilder;
/**
* Indicates that the browser will not offer controls to allow the user to control video playback, including volume, seeking, and pause/resume playback
*/
noControls(): VideoBuilder;
/**
* @param html HTML or text to be displayed for browsers that do not support this element
*/
onNotSupported(html: html): VideoBuilder;
/**
* @param url A URL for an image to be shown while the video is downloading. If this attribute isn't specified, nothing is displayed until the first frame is available, then the first frame is shown as the poster frame
* @throws Error if url is null or undefined
*/
poster(url: string): VideoBuilder;
/**
* @param value [default = 'auto'] Provide a hint to the browser about what the author thinks will lead to the best user experience. It may have one of the following values:
* - none : Indicates that the audio should not be preloaded
* - metadata : Indicates that only the audio metadata (e.g. length) is fetched
* - auto : Indicates that the whole audio file can be downloaded, even if the user is not expected to use it
*/
preload(value: 'none' | 'metadata' | 'auto'): VideoBuilder;
/**
* Specify timed text tracks (or time-based data), for example to automatically handle subtitles. The tracks are formatted in WebVTT format (.vtt files) — Web Video Text Tracks
* @param src Address of the track (.vtt file). Must be a valid URL. This attribute must be specified and its URL value must have the same origin as the document — unless the `<video>` parent element of the track element has a crossorigin attribute
* @param kind How the text track is meant to be used. If omitted the default kind is subtitles. If the attribute contains an invalid value, it will use metadata (Versions of Chrome earlier than 52 treated an invalid value as subtitles). The following keywords are allowed:
* - subtitles
* - Subtitles provide translation of content that cannot be understood by the viewer. For example speech or text that is not English in an English language film.
* - Subtitles may contain additional content, usually extra background information. For example the text at the beginning of the Star Wars films, or the date, time, and location of a scene.
* - captions
* - Closed captions provide a transcription and possibly a translation of audio.
* - It may include important non-verbal information such as music cues or sound effects. It may indicate the cue's source (e.g. music, text, character).
* - Suitable for users who are deaf or when the sound is muted.
* - descriptions
* - Textual description of the video content.
* - Suitable for users who are blind or where the video cannot be seen.
* - chapters
* - Chapter titles are intended to be used when the user is navigating the media resource.
* - metadata: Tracks used by scripts. Not visible to the user.
* @param isDefault This attribute indicates that the track should be enabled unless the user's preferences indicate that another track is more appropriate. This may only be used on one track element per media element
* @param srclang Language of the track text data. It must be a valid BCP 47 language tag. If the kind attribute is set to subtitles, then srclang must be defined
* @param label A user-readable title of the text track which is used by the browser when listing available text tracks
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/track](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/track)
*/
track(src: string, kind: 'subtitles' | 'captions' | 'descriptions' | 'chapters' | 'metadata', isDefault?: boolean, srclang?: string, label?: string): VideoBuilder;
}
/**
* This element builder is used to create an element that represents either a scalar value within a known range or a fractional value
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meter](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meter)
*/
export class MeterBuilder extends TagBuilder<HTMLMeterElement> {
constructor(id?: string);
/**
* @param value The lower numeric bound of the measured range. This must be less than the maximum value (max attribute), if specified. If unspecified, the minimum value is 0
*/
min(value: number): MeterBuilder;
/**
* @param value The upper numeric bound of the measured range. This must be greater than the minimum value (min attribute), if specified. If unspecified, the maximum value is 1
*/
max(value: number): MeterBuilder;
/**
*
* @param min The lower numeric bound of the measured range. This must be less than the maximum value (max attribute), if specified. If unspecified, the minimum value is 0
* @param max The upper numeric bound of the measured range. This must be greater than the minimum value (min attribute), if specified. If unspecified, the maximum value is 1
*/
minmax(min: number, max: number): MeterBuilder;
/**
* @param value The upper numeric bound of the low end of the measured range. This must be greater than the minimum value (min attribute), and it also must be less than the high value and maximum value (high attribute and max attribute, respectively), if any are specified. If unspecified, or if less than the minimum value, the low value is equal to the minimum value
*/
low(value: number): MeterBuilder;
/**
* @param value The lower numeric bound of the high end of the measured range. This must be less than the maximum value (max attribute), and it also must be greater than the low value and minimum value (low attribute and min attribute, respectively), if any are specified. If unspecified, or if greater than the maximum value, the high value is equal to the maximum value
*/
high(value: number): MeterBuilder;
/**
*
* @param low The upper numeric bound of the low end of the measured range. This must be greater than the minimum value (min attribute), and it also must be less than the high value and maximum value (high attribute and max attribute, respectively), if any are specified. If unspecified, or if less than the minimum value, the low value is equal to the minimum value
* @param high The lower numeric bound of the high end of the measured range. This must be less than the maximum value (max attribute), and it also must be greater than the low value and minimum value (low attribute and min attribute, respectively), if any are specified. If unspecified, or if greater than the maximum value, the high value is equal to the maximum value
*/
lowhigh(low: number, high: number): MeterBuilder;
/**
* @param value This attribute indicates the optimal numeric value. It must be within the range (as defined by the min attribute and max attribute). When used with the low attribute and high attribute, it gives an indication where along the range is considered preferable. For example, if it is between the min attribute and the low attribute, then the lower range is considered preferred. The browser may color the meter's bar differently depending on whether the value is less than or equal to the optimum value
*/
optimum(value: number): MeterBuilder;
}
/**
* This element builder is used to create an indicator showing the completion progress of a task, typically displayed as a progress bar
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress)
*/
export class ProgressBuilder extends TagBuilder<HTMLProgressElement> {
/**
* @param value This attribute specifies how much of the task that has been completed. It must be a valid floating point number between 0 and max, or between 0 and 1 if max is omitted.
* @throws Error if value is null or undefined
*/
constructor(value: number, id?: string);
/**
* @param value This attribute describes how much work the task indicated by the progress element requires. The max attribute, if present, must have a value greater than 0 and be a valid floating point number. The default value is 1
*/
max(value: number): ProgressBuilder;
}
/**
* This element builder is used to create a document section containing interactive controls for submitting information
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form)
*/
export class FormBuilder extends TagBuilder<HTMLFormElement> {
/**
* @param actionUrl The URL that processes the form submission
* @param method The HTTP method to submit the form with. Possible (case insensitive) values:
* - post: The `POST` method; form data sent as the request body.
* - get: The `GET` method; form data appended to the action URL with a ? separator. Use this method when the form has no side-effects.
* - dialog: When the form is inside a `<dialog>`, closes the dialog on submission
* @throws Error if actionUrl is null or defined
*/
constructor(actionUrl: string, method?: string, id?: string);
/**
* @param value character encodings the server accepts. The browser uses them in the order which they are listed
*/
acceptCharset(...value: string[]): FormBuilder;
/**
* @param value If the value of the method attribute is post, enctype is the MIME type of the form submission. Possible values:
* - application/x-www-form-urlencoded: The default value.
* - multipart/form-data: Use this if the form contains `<input>` elements with type=file.
* - text/plain: Introduced by HTML5 for debugging purposes
*/
enctype(value: formEnctype): FormBuilder;
/**
* @param value The relationship of the linked URL as space-separated link types
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types)
*/
rel(value: string): FormBuilder;
/**
* @param value Indicates where to display the response after submitting the form. In HTML 4, this is the name/keyword for a frame. In HTML5, it is a name/keyword for a browsing context (for example, tab, window, or iframe). The following keywords have special meanings:
* - _self (default): Load into the same browsing context as the current one.
* - _blank: Load into a new unnamed browsing context.
* - _parent: Load into the parent browsing context of the current one. If no parent, behaves the same as _self.
* - _top: Load into the top-level browsing context (i.e., the browsing context that is an ancestor of the current one and has no parent). If no parent, behaves the same as _self
*/
target(value: '_self' | '_blank' | '_parent' | '_top'): FormBuilder;
/**
* Indicates that the form shouldn't be validated when submitted
*/
noValidate(): FormBuilder;
}
/**
* This element builder is used to create an element that is used to embed executable code or data; this is typically used to embed or refer to JavaScript code
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script)
*/
export class ScriptBuilder extends TagBuilder<HTMLScriptElement> {
constructor(id?: string);
/**
* For classic scripts, if the async attribute is present, then the classic script will be fetched in parallel to parsing and evaluated as soon as it is available.
*
* For module scripts, if the async attribute is present then the scripts and all their dependencies will be executed in the defer queue, therefore they will get fetched in parallel to parsing and evaluated as soon as they are available.
*
* This attribute allows the elimination of parser-blocking JavaScript where the browser would have to load and evaluate scripts before continuing to parse. defer has a similar effect in this case.
*/
async(): ScriptBuilder;
/**
* @param value Normal script elements pass minimal information to the window.onerror for scripts which do not pass the standard CORS checks. To allow error logging for sites which use a separate domain for static media, use this attribute
*/
crossOrigin(value: crossOrigin): ScriptBuilder;
/**
* Indicate to a browser that the script is meant to be executed after the document has been parsed, but before firing DOMContentLoaded.
* Scripts with the defer attribute will prevent the DOMContentLoaded event from firing until the script has loaded and finished evaluating
*
* Scripts with the defer attribute will execute in the order in which they appear in the document
*/
defer(): ScriptBuilder;
/**
* @param value This attribute contains inline metadata that a user agent can use to verify that a fetched resource has been delivered free of unexpected manipulation
*/
integrity(value: string): ScriptBuilder;
/**
* Indicate that the script should not be executed in browsers that support ES2015 modules — in effect, this can be used to serve fallback scripts to older browsers that do not support modular JavaScript code
*/
noModule(): ScriptBuilder;
/**
* @param value A cryptographic nonce (number used once) to whitelist scripts in a script-src Content-Security-Policy. The server must generate a unique nonce value each time it transmits a policy. It is critical to provide a nonce that cannot be guessed as bypassing a resource's policy is otherwise trivial
*/
nonce(value: string): ScriptBuilder;
/**
* @param value Indicates which referrer to send when fetching the frame's resource:
* - no-referrer: The Referer header will not be sent.
* - no-referrer-when-downgrade (default): The Referer header will not be sent to origins without TLS (HTTPS).
* - origin: The sent referrer will be limited to the origin of the referring page: its scheme, host, and port.
* - origin-when-cross-origin: The referrer sent to other origins will be limited to the scheme, the host, and the port. Navigations on the same origin will still include the path.
* - same-origin: A referrer will be sent for same origin, but cross-origin requests will contain no referrer information.
* - strict-origin: Only send the origin of the document as the referrer when the protocol security level stays the same (HTTPS→HTTPS), but don't send it to a less secure destination (HTTPS→HTTP).
* - strict-origin-when-cross-origin: Send a full URL when performing a same-origin request, only send the origin when the protocol security level stays the same (HTTPS→HTTPS), and send no header to a less secure destination (HTTPS→HTTP).
* - unsafe-url: The referrer will include the origin and the path (but not the fragment, password, or username). This value is unsafe, because it leaks origins and paths from TLS-protected resources to insecure origins
*/
referrerPolicy(value: referrerPolicy): ScriptBuilder;
/**
* @param url This attribute specifies the URI of an external script; this can be used as an alternative to embedding a script directly within a document
*/
src(url: string): ScriptBuilder;
/**
* @param value This attribute indicates the type of script represented. The value of this attribute will be in one of the following categories:
* - Omitted or a JavaScript MIME type: This indicates the script is JavaScript. The HTML5 specification urges authors to omit the attribute rather than provide a redundant MIME type. In earlier browsers, this identified the scripting language of the embedded or imported (via the src attribute) code. JavaScript MIME types are listed in the specification.
* - module: Causes the code to be treated as a JavaScript module. The processing of the script contents is not affected by the charset and defer attributes. For information on using module, see our JavaScript modules guide. Unlike classic scripts, module scripts require the use of the CORS protocol for cross-origin fetching.
* - Any other value: The embedded content is treated as a data block which won't be processed by the browser. Developers must use a valid MIME type that is not a JavaScript MIME type to denote data blocks. The src attribute will be ignored
*/
type(value: 'module' | string): ScriptBuilder;
}
/**
* This element builder is used to create a group of columns within a table
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup)
*/
export class ColGroupBuilder extends TagBuilder<HTMLElement> {
constructor(id?: string);
/**
* @param span The number of columns this addition should span
* @param aClass Classes of specific column
*/
addCol(span?: number, ...aClass: classes): ColGroupBuilder;
}
/**
* This element builder is used to create tabular data — that is, information presented in a two-dimensional table comprised of rows and columns of cells containing data
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table)
*/
export class TableBuilder extends TagBuilder<HTMLTableElement> {
/**
* @param caption By supplying a <caption> element whose value clearly and concisely describes the table's purpose, it helps the people decide if they need to read the rest of the table content or skip over it.
*
* This helps people navigating with the aid of assistive technology such as a screen reader, people experiencing low vision conditions, and people with cognitive concerns
*/
constructor(caption?: html, id?: string);
/**
* @param th HTML or text values that will be rendered as `<th>` content
*/
addHeader(...th: html[]): TableBuilder;
/**
* @param td HTML or text values that will be rendered as `<td>` content, automatically added to a `<tr>`
*/
addRow(...td: html[]): TableBuilder;
colgroup(builder: ColGroupBuilder): TableBuilder;
/**
* Specify that the table should use `border-collapse: collapse`
*/
collapse(): TableBuilder;
/**
* @param header Set headers of the element
*/
setHeaders(...header: html[]): TableBuilder;
/**
*
* @param row Set rows of the element
*/
setRows(...row: html[][]): TableBuilder;
}
/**
* This element builder is used to create an element - part of the Web Components technology suite - that is a placeholder inside a web component that you can fill with your own markup, which lets you create separate DOM trees and present them together
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/slot](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/slot)
*/
export class SlotBuilder extends TagBuilder<HTMLSlotElement> {
/**
* @param name `name` attribute value
* @param value body of the slot
* @throws Error if name or value is null or undefined
*/
constructor(name: string, content: html | TagBuilder<HTMLElement>, id?: string);
}
/**
* This element builder is used to create a mechanism for holding HTML that is not to be rendered immediately when a page is loaded but may be instantiated subsequently during runtime using JavaScript.
*
* Think of a template as a content fragment that is being stored for subsequent use in the document. While the parser does process the contents of the <template> element while loading the page, it does so only to ensure that those contents are valid; the element's contents are not rendered, however
* @see [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template)
*/
export class TemplateBuilder extends TagBuilder<HTMLTemplateElement> {
/**
* @param id required
*/
constructor(id: string);
/**
* @param cssText Appends text to the templates `<style>` tag. If the tag doesn't exist it will be automatically prepended here, simply pass only the CSS markup
*/
addStylesToRoot(cssText: string): TemplateBuilder;
addSlots(...slot: SlotBuilder[]): TemplateBuilder;
}
/**
* This element builder is used to create XML-based markup language for describing two-dimensional based vector graphics
* @see [https://developer.mozilla.org/en-US/docs/Web/SVG](https://developer.mozilla.org/en-US/docs/Web/SVG)
*/
export class SVGBuilder extends AbstractTagBuilder<SVGElement> {
/**
*
* @param viewBox The value of the viewBox attribute is a list of four numbers: min-x, min-y, width and height. The numbers separated by whitespace and/or a comma, which specify a rectangle in user space which is mapped to the bounds of the viewport established for the associated SVG element
* @param id
* @param xmlns [default = 'http://www.w3.org/2000/svg']
* @throws Error if xmlns is empty or null
*/
constructor(viewBox?: string, id?: string, xmlns?: string);
//abstract
/**
* Set the width of the element
* @param width value and unit (for example 100px or 1em or 25)
*/
width(width: string | number): SVGBuilder;
/**
* Set the width and height of the element
* @param width value and unit (for example 100px or 100% or 1em or 25)
* @param height value and unit (for example 100px or 100% or 1em or 25)
*/
public bounds(width: string | number, height: string | number): SVGBuilder;
/**
* Set the height of the element
* @param height value and unit (for example 100px or 1em or 25)
*/
public height(height: string | number): SVGBuilder;
/**
* Clone the current tag builder. This deep clones the node it respectively manages
* Note: this uses the same HTMLElement.cloneNode() method native to browsers, therefor, things like id's and individual configurations for a given node will be duplicated as-is
*/
public clone(): SVGBuilder;
}
/**
* This element builder is used to create any kind of SVG element, or SVG animation.
* See [https://developer.mozilla.org/en-US/docs/Web/SVG/Element](https://developer.mozilla.org/en-US/docs/Web/SVG/Element) for a complete overview
*/
export class SVGElementBuilder<T extends SVGElement> extends AbstractTagBuilder<T> {
/**
*
* @param element Name of svg element (line, circle, rect, polygon, text, animate etc) see [MDN](https://developer.mozilla.org/en-US/docs/Web/SVG/Element) for a complete list of elements
* @param xmlns [default = 'http://www.w3.org/2000/svg']
* @throws Error if xmlns is empty or null
*/
constructor(element: string, xmlns?: string, id?: string);
/**
* @param value For shapes and text it's a presentation attribute that defines the color (or any SVG paint servers like gradients or patterns) used to paint the element; for animation it defines the final state of the animation
*/
fill(value: string): SVGElementBuilder<T>;
/**
* A presentation attribute defining the color (or any SVG paint servers like gradients or patterns) used to paint the outline of the shape
* @param stroke
* @param width
*/
stroke(stroke: string, width: string | number): SVGElementBuilder<T>;
/**
* How the svg fragment must be deformed if it is displayed with a different aspect ratio
* @param value "<align> [<meetOrSlice]"
*/
preserveAspectRatio(value: string): SVGElementBuilder<T>;
/**
* @param value The displayed x coordinate of the svg container. No effect on outermost svg elements
*/
x(value: string | number): SVGElementBuilder<T>;
/**
* @param value The displayed y coordinate of the svg container. No effect on outermost svg elements
*/
y(value: string | number): SVGElementBuilder<T>;
/**
* The value of the viewBox attribute is a list of four numbers: min-x, min-y, width and height. The numbers separated by whitespace and/or a comma, which specify a rectangle in user space which is mapped to the bounds of the viewport established for the associated SVG element
* @param viewBox The SVG viewport coordinates for the current SVG fragment
*/
viewBox(viewBox: string): SVGElementBuilder<T>;
//abstract
/**
* Set the width of the element
* @param width value and unit (for example 100px or 1em or 25)
*/
width(width: string | number): SVGElementBuilder<T>;
/**
* Set the width and height of the element
* @param width value and unit (for example 100px or 100% or 1em or 25)
* @param height value and unit (for example 100px or 100% or 1em or 25)
*/
public bounds(width: string | number, height: string | number): SVGElementBuilder<T>;
/**
* Set the height of the element
* @param height value and unit (for example 100px or 1em or 25)
*/
public height(height: string | number): SVGElementBuilder<T>;
/**
* Clone the current tag builder. This deep clones the node it respectively manages
* Note: this uses the same HTMLElement.cloneNode() method native to browsers, therefor, things like id's and individual configurations for a given node will be duplicated as-is
*/
public clone(): SVGElementBuilder<T>;
}
} |
//! Returns very detailed connection stats in diagnostic text format. Useful for dumping to a log, etc. The format of this information is subject to change.
Dictionary Steam::getDetailedConnectionStatus(uint32 connection){
Dictionary connectionStatus;
if(SteamNetworkingSockets() != NULL){
char buffer;
int success = SteamNetworkingSockets()->GetDetailedConnectionStatus((HSteamNetConnection)connection, &buffer, 2048);
connectionStatus["success"] = success;
connectionStatus["status"] = buffer;
}
return connectionStatus;
} |
Prevalence of hypertension and the associated factors among Sabar and Munda tribes of Eastern India Abstract Background: Hypertension can be attributable to about 10% of all non-communicable diseases (NCDs). There is a steady rise in the prevalence of hypertension among both the urban as well as the rural population and the tribal communities are no exception to this. The present study was done during 200910 among two tribes residing in a more developed eastern district of Odisha, but the results can be compared with the studies done in recent times. Objective: 1. To find the prevalence of hypertension among the adult tribal population of Tangi-Choudwar block of Cuttack and to trace the associated risk factors of hypertension among them. 2. To assess their perception regarding hypertension. Materials and Methods: A cross-sectional study was carried out among the tribals of the Tangi-Chowdwar block of Cuttack district during 2009-2010. Total 832 study subjects aged >/=18 years were selected through multistage stratified random sampling. Anthropometric measurements and blood pressure were taken with standard instruments and methodology. Statistical tests, such as Chi-square, Logistic Regression, Odds Ratio, percentage, were used to analyze the data. Result: The overall prevalence of hypertension was 16.7% and 41% were pre-hypertensive. Bivariate analysis showed that the risk of hypertension was significantly associated with the tribe type, age range, tobacco use, marital status, and stress (P < 0.05). Multivariate analysis showed that taking extra salt (OR-1.86; 95%CI-1.03-3.35) was significantly associated with hypertension (P < 0.05). Conclusion: A large number of study participants (16.7%) were found to be hypertensive and in the majority of them, the common risk factors detected were tobacco usage and extra salt intake. Further epidemiological study needs to be conducted among these tribes to know the exact nature and causes of hypertension. 8.6% of the nation's population. Odisha is home to 62 tribes with 9.9% of the total tribal population of India, but the tribal population constitutes 22% of the state's total population. Indian tribals are a heterogenous group and around 90% of them live in rural areas, predominantly in hilly, forest, and remote areas. They have poor health indicators with limited access to health care services. They face the quadruple burden of diseases i.e. communicable diseases (TB, leprosy, HIV, etc); NCDs (cancer, diabetes, hypertension), malnutrition, mental illness, and addiction. Most of the indicator of health care coverage or health status among the tribal communities is worse by 10-25% as compared to their non-tribal counterpart. But through specific programs and policies, only limited focus is being given to combat communicable diseases among them. The importance of preventing NCDs among different tribes is yet to be realized. For any disease prevention strategy, the first and foremost requisite is to know about the disease and the associated risk factors and the behavior of the community toward the disease. There is a paucity of literature on hypertension and the associated factors among different tribal communities in India. However, from the available studies, it has been observed that hypertension prevalence in the adult tribal population is increasing since 1984 across 2011 and 2019. Very few studies conducted in Odisha reflect the prevalence of hypertension in the tribal population. Hence, the present study has attempted to find the prevalence of hypertension, and its associated factors among the tribals and to study the perception of these tribes with respect to hypertension. Material and Methods Sample size: A cross-sectional community-based study was carried out in the Tangi-Choudwar block of the Cuttack district. After reviewing the literature related to hypertension studies on the tribal population, the study conducted by Yadlapalli S et al. for Anugul, Cuttack and Khordha district of Odisha, which showed a prevalence of hypertension among tribals to be 19% (male-24.8% and female-13.4%), was accepted for the present study and the sample size was calculated to be 819, considering maximum allowable error at 20% and design effect of 2. A total of 832 participants were included in the study. The design of the study: Multistage stratified sampling design was adopted for conducting the research. Study period: The study was conducted during August 2009-January 2010. Sampling procedure: Out of 14 blocks in Cuttack districts, Tangi-Choudwar was selected at random. In the Tangi-Choudwar block, there are 155 villages in total. Out of these, four villages were selected by Probability Proportional to Size (PPS) sampling technique. In every selected village, all ST households (HHs) were listed. One ST HH was chosen randomly as the starting point and all the members of the household aged >/=18 years present during the day of the interview and were included in the study. Severely ill or bedridden persons, unable to comprehend, pregnant women, lactating mothers (less than 6 months of delivery), and unwilling or non-co-operative persons were excluded from the study. The data were recorded in a structured and pre-tested schedule. Anthropometric measurements, such as height, weight, waist circumference, and hip circumference, were recorded as per standard guidelines laid down by World Health Organisation (WHO). Blood pressure was measured as per standard guidelines by WHO as well. A single investigator measured the blood pressure of all the study population. For diagnosis of hypertension, JNC-VII (The seventh report of the Joint National Committee on Prevention, Detection, Evaluation and Treatment of High Blood Pressure) criteria were followed up. Physical activity of subjects was assessed taking into consideration the occupational as well as non-occupational physical activity. Users of all types of tobacco products were included in the category of tobacco users. A current user of tobacco was defined as a person who was consuming tobacco in any form (smoking, chewing, snuff) within the past year. For estimation of alcohol consumption, a person who had taken alcohol in any form within the last 12 months was taken as having exposure to alcohol. The daily dietary salt intake of an individual was calculated from the total dietary salt consumption of the family in a week and the total number of family members. The amount of extra salt intake was recorded by probing questions about the use of adding extra salt to food (excluding the previously added salt to a meal during preparation) while eating and any type of salty food taken (e.g. salted dried fish, pickles, etc.). Stress and anxiety: One questionnaire was developed to assess the factors perceived as stress or anxiety by the tribal population. The questionnaire contained a list of life events experienced by the respondents in the last year. Stress or anxiety was said to be present if any of these factors were present or it was perceived so by the respondent. This questionnaire was incorporated into the main questionnaire for the study. Statistical analysis: The data were analyzed using SPSS (17.0 ver.). Percentage, Chi-square test, odds ratio (with 95% CI), regression analysis were used whereever applicable. A P value less than 0.05 was considered significant. Ethical and istitutional permission: Permission from the Institute Ethics Committee of S.C.B. Medical College was obtained before initiating the study. Results Total 832 adults of two tribes, i.e. Sabar and Munda, in four villages were examined. The Sabar tribe constituted 48% of the participants, whereas the Munda were 52%. The proportion of female participants (54.3%) was higher than male participants (45.7%). The literacy rate was very low among the participants. Overall, 79% of the participants were illiterate, Volume 11 : Issue 9 : September 2022 but among the female participants, 91.8% were illiterate. Most of the participants were agricultural laborers (79.3%). Among the participants, 73.2% used some form of tobacco and 63.5% consumed alcohol. Extra salt was taken by almost 82% of respondents . Mean dietary salt intake was 13.35 gms (+/-4.07 gms). 31.6% of respondents said to have stress in their life. Prevalence of Hypertension The overall prevalence of hypertension among the tribals was found to be 16.7%; with females the prevalence was 15% and with males 18.6%. A significant increase in the prevalence of hypertension with increasing age was observed in females (P < 0.05). The prevalence of hypertension among the tribal population was found to be 16.7% . Out of the total study participants, 11.7% had stage-I hypertension and 5% had stage-II hypertension. Sabar tribe had a higher prevalence of hypertension (20.9%) and Munda had a lower prevalence (12.8%), and this difference among the two tribes is statistically significant (P < 0.000). Risk Factors for Hypertension Bivariate analysis showed that the risk of hypertension was significantly associated with the tribe type, age-range, tobacco usage, marital status, and perceived stress (P < 0.05) . The prevalence of hypertension increased with age in both males and females . Perception Regarding Hypertension While assessing the perception regarding hypertension, it was found that only 1.3% of the respondents had any idea about the disease. Less than 1% could comment on the risk factors of hypertension. Only 18% of the respondents had positive health-seeking behavior and another 17% were in favor of consulting a traditional healer in their community if they became hypertensive. Around 4% of the subjects said that they would not seek any treatment as hypertension was not affecting their day-to-day life. This view was expressed mostly by the respondents who were diagnosed to be hypertensive during the research period . Discussion The present study was done during 2009-2010, when many studies were being done with urban and rural populations showing an increasing trend of hypertension. But very few studies have been done exclusively on the tribal population. Even after a decade, when the authors searched for literature, they found a paucity of data on hypertension among different tribes. As every tribe is very different from each other in terms of lifestyle, cultural practices, and behavior, extensive studies about NCDs, particularly hypertension, is needed in every tribe. In this research, we studied two tribes (Sabar and Munda) residing in Cuttack, a more developed district of Odisha. The overall prevalence of hypertension was found to be 16.7%; with females having a prevalence of 15% and males with 18.6% prevalence. The study done around that time in Gujarat showed similar results. But the prevalence of hypertension among the Jenu-kuruba tribe of Mysore was found to be 21.7%, which is slightly higher than what we found in our study. This might be due to the influence of the urban lifestyle of Jenu-kuruba tribe. Other studies also showed higher prevalence. In a study carried out by Sachdev, the prevalence of hypertension among the tribals of Rajasthan ranged from 16% to 30%. The prevalence of hypertension was 45% and 36% among adult tribal men and women respectively in Kerala. The prevalence of hypertension in the Nicobarese tribe was found to be 50.5%, which is much higher than our finding. This high prevalence in Nicobares tribes might be due to the over representation of older study subjects due to the unavailability of younger mass who usually go out for employment. A similar finding was shown by the study done by Kandpal et al. in the Bhotia of Uttarakhand, where the prevalence of hypertension was 43.4%. A study conducted by Raina et al. shows thatt the tribes living in high altitudes showed a prevalence of 10.7%, which is much lower than our findings. This decreased prevalence might be explained by the theory that both SBP and DBP decrease due to the physiological adaptation over several years of stay at a higher altitude. In our study, the male preponderance of hypertension was shown. Likewise, the study done by Yadlapalli S et al. has documented a prevalence of HTN to be 24.8% among males and 13.4% in females.But the study carried out among that adult Savar tribe of Vishakhapatnam, Andhra Pradesh showed a prevalence of stage-I hypertension among males to be 1.1% and that in females was 9.4%. In our study, the Sabar, a more educated and acculturating tribe had a prevalence of hypertension to be 20.9%, and that in Mundas, which is a more backward tribe, was 12.8%. Similar findings were recorded in a study from Andhra Pradesh with a high prevalence of hypertension among the acculturating tribe, the Valmiki, than among the Khondh, a primitive tribal group, which denoted acculturation as a cause for increased BP levels and increased prevalence of hypertension. The prevalence of hypertension increased with increasing age, which is depicted in Figure 1. A phenomenon of increased blood pressure level with increasing age is well-established by many studies, which was reflected in our study also. Out of 832 studied populations, 41% of people were pre-hypertensive. The prevalence of pre-hypertension was 45% and 39% in tribal males and females respectively of Maharashtra. But the prevalence of pre-hypertension in a rural area of Central India was 18.8% and that in Himachal Pradesh ranged between 21-25%, which is much less than our study population. Though the concept of pre-hypertension is no more used by the scientific community it can be a good predictor of hypertension and more studies are needed to be conducted to establish this. The use of tobacco and alcohol among the study population was about 73% and 63% respectively. In our study, tobacco addiction was found to have a significant association with hypertension (P < 0.0001), whereas the association of alcohol addiction with the risk of hypertension was non-significant. But among the Nicoberes tribe both tobacco and alcohol addiction did not add to the risk of hypertension, whereas the tribals of Maharastra showed a significant association of alcohol and tobacco addiction to the risk of hypertension. Dietary salt consumption can influence the BP independent of other risk factors. The use of extra salt in the diet was prevalent among this study population (82% of the population took extra salt), and this could be established as a risk factor for hypertension. Stress was a significant risk factor for hypertension among the study population. The high prevalence of essential hypertension and the rise in BP with age observed in westernized society has been attributed to psychosocial stress, which may be related to the type of social economy. In our study, we find hypertension among those who were perceived to have some kind of stress in their life and it was significantly associated with hypertension. As a general belief prevails among the non-tribal population that the tribal people are happier and lead a stress-free life may be a wrong notion. Due to the change in lifestyle, they may be leading a stressful life and more in-depth studies are needed to explore this aspect of the tribal community. In the present study, the awareness about hypertension, its risk factors, and perception about treatment is very low as compared to other studies done in India and outside India. This may be due to a high level of illiteracy among the present tribal population. One of the interesting findings in our study is that many tribal people rely upon the traditional healer for their health issues. A few studies in India also showed similar results. Hence, these traditional healers can be involved in the ongoing National Programme for Prevention and Control of Cancers, Diabetes, Cardiovascular diseases and Stoke (NPCDCS) for motivating and mobilizing the tribal community for better care for chronic diseases. An increasing trend of chronic diseases and the associated factors, such as unhealthy diet, tobacco consumption, physical inactivity, etc., are being experienced by the tribal communities residing in different parts of our country. Similar findings were obtained in our study and indicate that tribal communities Other variable entered were-education, occupation, BMI, Alcohol addiction, Type of worker, but were not significant are at the transition phase of communicable disease to chronic disease or NCD epidemic. In the wake of this chronic disease epidemic, the role of primary care physicians is vital. With a glaring shortage of specialists in tribal areas, the primary care physicians with proper training in chronic disease management in the tribal population would be pivotal in reversing the trend. Conclusion Despite this study being conducted a decade ago, its findings hold true for the current situation of tribal people in India. The present study shows that the prevalence of hypertension among the Sabar and Munda tribes is at par with other tribal populations in different parts of India. The common modifiable risk factors detected in this study were tobacco consumption, extra salt intake, and stress. The tribal population needs to be made aware of the role of these risk factors in causing hypertension so that in long run the prevalence of hypertension can be reduced. Though the tribal communities are considered to have stress-free life, but our study found that many of them perceived to have stress in their life and this is significantly associated with the presence of hypertension. Hence, further epidemiological study needs to be conducted among these tribes to explore different factors that may be playing any role in causing hypertension, the silent killer. Financial support and sponsorship Nil. Conflicts of interest There are no conflicts of interest. |
#include "AndroidOpenGLESInterface.h"
#include <array>
#include "../Log.h"
#include "../OpenGLInclude.h"
#include "../Common_OpenGL/GLSupport.h"
#include "../VectorTypes.h"
void AndroidOpenGLESInterface::init(AndroidInitData const& initData, AndroidOpenGLES_State & state) {
logging::Info() << "Initializing OpenGL on Android with resolution " << initData.getResolution().x() << ":"
<< initData.getResolution().y();
const float screenRatio = 16.0 / 9.0;
// use this for fullscreen
//const int height = 768;
const int height = initData.getResolution().y();
const int width = std::floor(height * screenRatio);
// enable depth buffer
GL_CHECK_ERROR(glEnable (GL_DEPTH_TEST));
GL_CHECK_ERROR(glEnable (GL_DEPTH_TEST));
GL_CHECK_ERROR(glDepthFunc (GL_LEQUAL));
GL_CHECK_ERROR(glDepthMask (GL_TRUE));
// Initialize GL state.
GL_CHECK_ERROR(glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST));
// enable various OpenGl stuff
GL_CHECK_ERROR(glEnable(GL_TEXTURE_2D));
GL_CHECK_ERROR(glEnable (GL_BLEND));
GL_CHECK_ERROR(glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA));
// black background
//GL_CHECK_ERROR(glClearColor(0.0f, 0.0f, 0.0f, 1.0f));
// white background
GL_CHECK_ERROR(glClearColor(0.0f, 0.0f, 0.0f, 1.0f));
GL_CHECK_ERROR(glViewport(0, 0, initData.getResolution().x(), initData.getResolution().y()));
GL_CHECK_ERROR(glClear(GL_COLOR_BUFFER_BIT));
GLSupport::setupParallelProjection(initData.getResolution().x(), initData.getResolution().y(), -1.0f,
1.0f);
GL_CHECK_ERROR(glMatrixMode(GL_MODELVIEW));
GL_CHECK_ERROR(glLoadIdentity());
m_transform = GLSupport::computeScreenTransform(initData.getResolution().x(),
initData.getResolution().y());
logging::Info() << "> OpenGL init done";
}
|
Sport as social formation and specialist education: discursive and ritualistic aspects of physical education This article is based on ethnographic fieldwork carried out at two Danish sports colleges that aim to educate voluntary leaders and elite coaches respectively. Methodologically, a model of analysis is built through supplementing Foucault's concept orders of discourse with Robert Wuthnow's studies of not only written and spoken but also ritualistic contributions to discourses. Using this model, the analysis of the formally written purposes and daily words used at the colleges shows two orders of discourse about sport as social formation and sport as specialist education, which are based in historically and ideologically different traditions. Moreover, the analysis shows that the present-day students contribute to the different discourses but also ignore or resist them as active individuals. This makes it relevant to inquire into the participants practices and experiences with the help of ethnographic studies of rituals. The analysis of the courses as rituals contributes to our understanding of physical education by pointing at an interesting duality. On the one hand, different traditions (and discourses) are reproduced through the education of leaders and coaches to Danish sports clubs, and on the other hand, both groups of students form social relations and go through a transformative process. To Conclude, concepts such as formative education will be suggested to bridge rather than ideologically polarize our understanding of formative and educational potentials of physical education today. |
<filename>src/app/core/modules/tenant/services/index.ts
import { TenantService } from './tenant.service';
export * from './tenant.service';
export const TENANT_PROVIDERS: any[] = [
TenantService
];
|
Page and place: ongoing compositions of plot/Literary geographies: narrative space in Let The Great World Spin neologisms improve on more familiar terms (like memory, anticipation, stable, and detailed) or how new uses for a term like resolution relate to more traditional and restricted uses of the term. Ashs arguments are most compelling when they deal with the cognitive changes accompanying the diffusion of everyday technologies, for example GPS, our growing dependence on such technologies, and the need to critique that link. our increasing inability to cope without an array of digital devices does indeed signal a profound transformation in human awareness. we are losing wayfinding skills and aspects of the elaborate mental maps we once held in our heads as we become dependent on geospatial technologies, and hence also giving up some component of our sense of place while paying for a kind of surrogate spatiotemporal awareness. As we become dependent on digital surrogates to provide spatial memory, this creates a market for more technologies that replace directly-acquired environmental information. This change, in turn, creates a demand for upgrades that continue the replacement process. we also bond emotionally with geospatial technology through game-like performances (e.g. using GPS for geocaching and mapping running sessions). All this suggests that Ash is on the right track to argue that the dependency and playfulness combined in envelope power deserves critical scholarly attention. |
import psycopg2
import os
import requests
import json
import time
import arrow
import logging
from typing import List, Tuple, Dict, Any
from collections import defaultdict
from apscheduler.schedulers.blocking import BlockingScheduler
from telegram_bot import Bot
logging.basicConfig(format='%(asctime)s %(levelname)s %(message)s',
level=logging.INFO)
REVERB_LISTING_API_URL = 'https://api.reverb.com/api/listings'
REVERB_API_CODE = os.getenv('REVERB_API_CODE')
PG_USER = os.getenv('PG_USER')
PG_PASS = os.getenv('PG_PASS')
PG_PORT = os.getenv('PG_PORT')
PG_HOST = os.getenv('PG_HOST')
PG_DB = os.getenv('PG_DB')
if REVERB_API_CODE is None:
logging.error(
'Cannot run batch import listing: no REVERB_API_KEY env found')
exit(1)
req_headers = {
'Accept-Version': '3.0',
'Authorization': 'Bearer ' + str(REVERB_API_CODE),
'Content-Type': 'application/hal+json'
}
insert_query = """
INSERT INTO reverb_guitar_data.listing (id, make, model, year, condition, price_cents, currency, offers_enabled, thumbnail, full_json) VALUES %s
"""
conn = psycopg2.connect(
f'dbname={PG_DB} user={PG_USER} password={<PASSWORD>} port={PG_PORT} host={PG_HOST}'
)
conn.autocommit = True
cur = conn.cursor()
bot = Bot(str(os.getenv('TELEGRAM_TOKEN')))
sched = BlockingScheduler()
class Listing():
def __init__(self, values):
self.full_json: Dict = values
self.id: int = int(values['id'])
self.make: str = values['make']
self.model: str = values['model']
self.year: str = values['year']
self.condition: str = values['condition']['display_name']
self.price_cents: int = values['buyer_price']['amount_cents']
self.currency: str = values['buyer_price']['currency']
self.offers_enabled: bool = values['offers_enabled']
self.created_at: arrow.Arrow = arrow.get(values['created_at'])
self.thumbnail: str = values['photos'][0]['_links']['thumbnail'][
'href']
def get_listings_with_query(query: Dict[str, Any]
) -> Tuple[List[Listing], str]:
logging.info('Getting listings with params: %s', query)
response = requests.get(REVERB_LISTING_API_URL,
params=query,
headers=req_headers)
resp_json = response.json()
return list(
map(lambda x: Listing(x),
resp_json['listings'])), resp_json['_links']['next']['href']
def get_listings_for_url(url) -> Tuple[List[Listing], str]:
response = requests.get(url, headers=req_headers)
resp_json = response.json()
if 'Used Electric Guitars' not in resp_json['humanized_params']:
logging.warn('`humanized_params` looks wonky - %s',
resp_json['humanized_params'])
return list(
map(lambda x: Listing(x),
resp_json['listings'])), resp_json['_links']['next']['href']
def insert_listings(cur, listings: List[Listing]
) -> Tuple[List[Listing], List[Listing]]:
duplicates = []
inserted = []
for listing in listings:
try:
cur.execute(
'INSERT INTO listing (id, make, model, year, condition, price_cents, currency, offers_enabled, created_at, thumbnail, full_json) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s);',
(listing.id, listing.make, listing.model, listing.year,
listing.condition, listing.price_cents, listing.currency,
listing.offers_enabled, listing.created_at.datetime,
listing.thumbnail, json.dumps(listing.full_json)))
inserted.append(listing)
except psycopg2.IntegrityError as e: # 23505 is constraint unique
if e.pgcode == '23505':
duplicates.append(listing)
continue
else:
raise e
return inserted, duplicates
def process_bot_notifications(bot: Bot, listings: List[Listing]) -> None:
bot_terms = bot.get_terms()
all_results: Dict[str, List[Listing]] = defaultdict(list)
for listing in listings:
for term in bot_terms:
lower_term = term.lower()
if lower_term in listing.full_json['title'].lower(
) or lower_term in listing.model.lower(
) or lower_term in listing.make.lower(
) or lower_term in listing.full_json['description'].lower():
all_results[term].append(listing)
for term, listings in all_results.items():
strings = list(
map(
lambda lst:
f"[{lst.full_json['title']}]({lst.full_json['_links']['web']['href']})",
listings))
bot.send_update(term, strings)
@sched.scheduled_job('cron', minute='*/7')
def update_listings():
logging.info('Running batch reverb update')
query = {
'page': 1,
'per_page': 50,
'product_type': 'electric-guitars',
'condition': 'used',
# 'price_max': 401,
}
listings, next_url = get_listings_with_query(query)
logging.info('Processing first page')
inserted, duplicates = insert_listings(cur, listings)
process_bot_notifications(bot, inserted)
if len(duplicates) > 0:
logging.info('Found duplicates: %d', len(duplicates))
if len(inserted) == 0:
logging.info('Exiting: Found full page of duplicates')
return
while next_url is not None:
time.sleep(10)
logging.info('Processing url %s', next_url)
listings, next_url = get_listings_for_url(next_url)
inserted, duplicates = insert_listings(cur, listings)
process_bot_notifications(bot, inserted)
if len(duplicates) > 0:
logging.info('Found duplicates: %d', len(duplicates))
if len(inserted) == 0:
logging.info('Exiting: Found full page of duplicates')
return
if __name__ == '__main__':
try:
sched.start()
except KeyboardInterrupt:
logging.info('Got SIGTERM! Terminating...')
|
Two students were recognized as the December Students of the Month at Saint Bernard School.
John Paul Hammond, an eighth-grader, and Ryan Proulx, a sophomore, were chosen for the month. Every month during the school year, the Student of the Month Committee selects one middle school student and one high school student for exhibiting the Xaverian Brothers spiritual values of humility, trust, zeal, compassion and simplicity. |
"""Metadata module."""
from .metadata import Metadata
class MetadataProvider:
"""Provides the Metadata instance."""
_metadata_class = Metadata
@staticmethod
def get_metadata_provider(url):
""" Get an Metadata instance."""
return MetadataProvider._metadata_class(url)
@staticmethod
def set_metadata_class(metadata_class):
"""
Set an Metadata class
:param metadata_class: Metadata or similar compatible class
"""
MetadataProvider._metadata_class = metadata_class
|
Memetic Algorithm based fuzzy clustering This paper presents a Memetic Algorithm (MA) based Fuzzy C-Means (FCM) clustering algorithm. Traditional FCM algorithm suffers from the problem of local optimal, whereas the proposed MA-based FCM algorithm is able to overcome this problem and produce good performance in various ways. Experimental results showed that the proposed clustering algorithm outperforms traditional fuzzy clustering algorithms significantly on a wide variety of datasets with overlapping class boundaries and spread data distributions. |
1. Field of the Invention
This invention relates to a three-dimensional insert for a fireplace. More particularly, this invention relates to a three-dimensional insert for a fireplace to seal the fireplace when it is not in use to prevent the drawing of air through the fireplace by the fireplace chimney. In the preferred embodiment of the invention the fireplace insert is provided with decorative material placed on the inside thereof to present a pleasing appearance toward the room in which the fireplace is located. This decorative material can be in the form of pictures painted or printed on the exposed surfaces of the fireplace and, because of the three-dimensional format, such decorative material can be especially attractive. Alternatively, the decorative material can be in the form of a decorative physical object or objects placed in the insert, for example, a plant, a rock formation, a sculpture, an aquarium or the like. Where desired, the appearance of the decorative material can be enhanced by lights located within or behind the fireplace insert or in the chimney above it.
A fireplace insert according to the present invention can be advantageously formed from a unitary blank of a sheet of material, for example, a generally cruciform-shaped blank which can be produced by die-cutting, to permit the rapid assembly of an insert by folding a blank selected from a stack of such blanks. This will permit the assembly of fireplace inserts from blanks which may be compactly shipped and stored in a distribution center or retail store. When this is done, an extensible or telescopic rectangular frame can be provided to facilitate the accurate positioning of the front edges of the members of the insert with respect to the fireplace opening.
Where desired, a fireplace insert according to the present invention can be provided with a somewhat tapered configuration for ready insertion into the firebox of a fireplace, or for insertion into a fireplace in which the firebox itself is tapered in configuration.
2. Description of the Prior Art
The prior art discloses various devices for covering or closing stovepipes, stovepipe holes, flue holes and flues, and recognizes that it is desirable to decorate these devices for aesthetic reasons. See, for example, prior U.S. Pat. No. 107,722 (Reed), U.S. Pat. No. 853,177 (Knapp), and U.S. Pat. No. 541,746 (Hall). These devices, however, cover or close the associated opening on the outside thereof, and do not suggest an insert which extends into the opening being closed to provide an exposed recess which can be utilized to preserve the natural recessed appearance of the fireplace opening. Additionally, the devices described in the U.S. patents listed above are dimensionally fixed with respect to the size of the openings they are to be used with, and cannot be extended to provide close contact with the periphery of the opening being closed. |
/**
* Returns true if the bean has onclick; provided so
* subclasses that always have onclick can override.
*/
protected boolean hasOnclick(
UIComponent component,
FacesBean bean)
{
return getOnclick(component, bean) != null;
} |
An O-glycoside of sialic acid derivative that inhibits both hemagglutinin and sialidase activities of influenza viruses. The compound Neu5Ac3alphaF-DSPE, in which the C-3 position was modified with an axial fluorine atom, inhibited the catalytic hydrolysis of influenza virus sialidase and the binding activity of hemagglutinin. The inhibitory activities to sialidases were independent of virus isolates examined. With the positive results obtained for inhibition of hemagglutination and hemolysis induced by A/Aichi/2/68 virus, the inhibitory effect of Neu5Ac3alphaF-DSPE against MDCK cells was examined, and it was found that 4 inhibits the viral infection with IC50 value of 5.6 microM based on the cytopathic effects. The experimental results indicate that compound 4 not only inhibits the attachment of virus to the cell surface receptor but also disturbs the release of the progeny viruses from infected cells by inhibiting both hemagglutinin and sialidase of the influenza viruses. The study suggested that the compound is a new class of bifunctional drug candidates for the future chemotherapy of influenza. |
<filename>src/test/java/chopchop/model/recipe/RecipeTest.java
package chopchop.model.recipe;
import java.util.List;
import java.util.Set;
import static chopchop.testutil.TypicalIngredients.BANANA_REF;
import static chopchop.testutil.TypicalRecipes.APRICOT_SALAD;
import static chopchop.testutil.TypicalRecipes.BANANA_SALAD;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
import chopchop.model.attributes.Step;
import chopchop.model.attributes.Tag;
import chopchop.testutil.IngredientBuilder;
import chopchop.testutil.RecipeBuilder;
import org.junit.jupiter.api.Test;
public class RecipeTest {
@Test
public void equals() {
// same values -> returns true
Recipe apricotSaladCopy = new RecipeBuilder(APRICOT_SALAD).build();
assertTrue(APRICOT_SALAD.equals(apricotSaladCopy));
// same object -> returns true
assertTrue(APRICOT_SALAD.equals(APRICOT_SALAD));
// null -> returns false
assertFalse(APRICOT_SALAD.equals(null));
// different type -> returns false
assertFalse(APRICOT_SALAD.equals(new IngredientBuilder().build()));
// different recipe -> returns false
assertFalse(APRICOT_SALAD.equals(BANANA_SALAD));
// different name -> returns false
Recipe editedApricotSalad = new RecipeBuilder(APRICOT_SALAD).withName("DD").build();
assertFalse(APRICOT_SALAD.equals(editedApricotSalad));
assertEquals(APRICOT_SALAD.hashCode(), APRICOT_SALAD.hashCode());
assertTrue(APRICOT_SALAD.isSame(new RecipeBuilder().withName("Apricot Salad").build()));
assertFalse(APRICOT_SALAD.isSame(new IngredientBuilder().build()));
assertNotEquals(APRICOT_SALAD, new RecipeBuilder().withName("<NAME>")
.withIngredients(List.of(BANANA_REF)).build());
assertNotEquals(APRICOT_SALAD, new RecipeBuilder(APRICOT_SALAD)
.withSteps(List.of(new Step("asdf"), new Step("qwer"))).build());
assertNotEquals(APRICOT_SALAD, new RecipeBuilder(APRICOT_SALAD)
.withTags(Set.of(new Tag("asdf"), new Tag("qwer"))).build());
}
}
|
The chain has released four new designs for its restaurants in an attempt to be "more locally focused."
A rendering of Taco Bell's new "California Sol" look.
Step by step, Taco Bell is shedding its old skin.
The 54-year-old fast-food chain already removed artificial flavors and colors from its food; has committed to switch to cage-free eggs by the end of this year; and by 2017 will stop using antibiotics important to human medicine in chicken, as well as some artificial preservatives and additives.
Now the chain is preparing to test four new restaurant designs, with interior design features like exposed brick and faux fireplaces.
To start, the chain will remodel four restaurants in Southern California, and then four additional stores in other markets around the country this year. More will be launched in 2017, though the company declined to say how many, or if it expects most of its restaurants to eventually adopt these new looks.
The various designs are part of an effort by Taco Bell to be "more locally focused," Deborah Brand, Taco Bell's vice president for development and design, told BuzzFeed News. Previously, it pushed one look for all stores, but this time around it will let franchisees choose. "People appreciate variety," she said.
Taco Bell's new philosophy on store design resembles that of Starbucks, where Brand used to work. The Seattle-based coffeehouse is well known for its focus on localizing the look of its stores. Even McDonald's offers its store owners a variety of design options.
This is Taco Bell's "California Sol" look, which is described as "beachy, light, and airy."
Here's a closer look at some of the materials for the California Sol look.
There's "Urban Edge," which showcases brick.
"Modern Explorer," which features more concrete and galvanized steel.
The "Heritage" look, which hints at Taco Bell's roots, has arches in the exterior and uses more ornate tile.
"Our current design is very clean, very practical, very familiar, and people are familiar because it's Taco Bell and they know us, but now this is focused on creating that dining environment that people would appreciate," Brand said.
Taco Bell — which now has more than 6,400 restaurants (almost all in the U.S.) — plans to grow to 8,000 domestic restaurants by 2022 and 1,000 international locations by 2020, with a goal of slowly expanding its presence beyond the suburbs into urban markets. |
/**
* Represents a set of New Relic application links.
*
* @author Gerald Curley (opsmatters)
*/
public class ApplicationLinks
{
private List<Long> servers = new ArrayList<Long>();
@SerializedName("application_hosts")
private List<Long> applicationHosts = new ArrayList<Long>();
@SerializedName("application_instances")
private List<Long> applicationInstances = new ArrayList<Long>();
@SerializedName("alert_policy")
private Long alertPolicy;
/**
* Default constructor.
*/
public ApplicationLinks()
{
}
/**
* Sets the list of servers.
* @param servers The list of servers
*/
public void setServers(List<Long> servers)
{
this.servers.clear();
this.servers.addAll(servers);
}
/**
* Returns the list of servers.
* @return The list of servers
*/
public List<Long> getServers()
{
return servers;
}
/**
* Sets the list of application hosts.
* @param applicationHosts The list of application hosts
*/
public void setApplicationHosts(List<Long> applicationHosts)
{
this.applicationHosts.clear();
this.applicationHosts.addAll(applicationHosts);
}
/**
* Returns the list of application hosts.
* @return The list of application hosts
*/
public List<Long> getApplicationHosts()
{
return applicationHosts;
}
/**
* Sets the list of application instances.
* @param applicationInstances The list of application instances
*/
public void setApplicationInstances(List<Long> applicationInstances)
{
this.applicationInstances.clear();
this.applicationInstances.addAll(applicationInstances);
}
/**
* Returns the list of application instances.
* @return The list of application instances
*/
public List<Long> getApplicationInstances()
{
return applicationInstances;
}
/**
* Sets the alert policy of the application.
* @param alertPolicy The alert policy of the application
*/
public void setAlertPolicy(Long alertPolicy)
{
this.alertPolicy = alertPolicy;
}
/**
* Returns the alert policy of the application.
* @return The alert policy of the application
*/
public Long getAlertPolicy()
{
return alertPolicy;
}
/**
* Returns a string representation of the object.
*/
@Override
public String toString()
{
return "ApplicationLinks [servers="+servers
+", applicationHosts="+applicationHosts
+", applicationInstances="+applicationInstances
+", alertPolicy="+alertPolicy
+"]";
}
} |
/*
* Copyright (c) 2018 st<EMAIL>. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed
* under the License is distributed on an "AS IS" BASIS, without warranties or
* conditions of any kind, EITHER EXPRESS OR IMPLIED. See the License for the
* specific language governing permissions and limitations under the License.
*/
package com.stnetix.ariaddna.rps;
import java.util.HashMap;
import java.util.Map;
import java.util.Random;
import java.util.Set;
import java.util.UUID;
import com.stnetix.ariaddna.commonutils.dto.vufs.MetatableDTO;
import com.stnetix.ariaddna.userservice.CloudAvailableSpace;
import com.stnetix.ariaddna.userservice.IProfile;
public class ProfileStub implements IProfile {
private static final Random randomGen = new Random(System.currentTimeMillis());
private final String[] cloudUuids = { UUID.randomUUID().toString(),
UUID.randomUUID().toString(), UUID.randomUUID().toString() };
public String[] getCloudUuids() {
return cloudUuids;
}
@Override
public Set<MetatableDTO> getMetatables() {
return null;
}
@Override
public MetatableDTO getCurrentMasterTable() {
return null;
}
@Override
public CloudAvailableSpace getCloudAvailableSpace() {
CloudAvailableSpace res = new CloudAvailableSpace();
Map<String, Long> resources = new HashMap<>(3);
Map<String, Long> maxResources = new HashMap<>(3);
for (int i = 0; i < 3; i++) {
resources.put(cloudUuids[i], randomGen.nextLong());
maxResources.put(cloudUuids[i], Long.MAX_VALUE);
}
res.setMaxAvailableCloudSpace(maxResources);
res.setAvailableCloudSpace(resources);
return res;
}
}
|
Hundreds of radical Islamists besieged the American embassy in Jakarta yesterday, as the Indonesian government tried to maintain its delicate balance between supporting the global war against terrorism and not alienating tens of millions of moderate Muslims in the world's most populous Muslim nation.
Radical Islamic groups warned that America and its allies "would have to accept the consequences of its actions. We haven't ruled anything out," said Haji Tubagus Muhammad Sidik, commander of the Islamic Defenders Front forces outside the embassy. "We are willing to go round sweeping Jakarta of all foreigners if necessary. We are not scared of police bullets or batons."
Many of the demonstrators carried clubs and placards condemning America. An effigy of George Bush was burnt, along with the American and Israeli flags, as several Arabs who described themselves as "mojahedin fighters" mingled in the crowd. A few dozen demonstrators protested briefly outside the British embassy.
The Association of Indonesian Ulemas [clerics], yesterday issued a joint statement with about 40 Islamic organisations demanding the government "temporarily suspend diplomatic relations with America and its allies until the attacks stop". It also urged all Indonesian Muslims to "take all necessary measures to help their Muslim brothers in Afghanistan, but without resorting to violence".
But the association's secretary-general, Dien Syamsuddin said: "We also will not forbid any Muslims or Muslim groups from doing anything they feel necessary in the current struggle." The Indonesian foreign minister, Hasan Wirayuda, said the Indonesian government was "deeply concerned" about the strikes on Afghanistan.
In Malaysia, another predominantly Muslim nation, the prime minister, Mahathir Mohamad, refused to back the US-led coalition, arguing the campaign was bound to fail to wipe out terrorism because many of the targets were outside Afghanistan. |
<gh_stars>0
package ObjectOriented.ListSet;
import java.util.HashSet;
//重复的元素set集合不存储。
public class HashSetDemo {
public static void main(String[] args) {
//创建 Set集合
HashSet<String> hashSet = new HashSet<>();
//添加元素
hashSet.add("321");
hashSet.add("123");
hashSet.add("213");
hashSet.add(new String("123"));
//遍历
for (String str : hashSet) {
System.out.println(str);
}
}
}
|
for _ in range(int(input().strip())):
[a, b, c, r] = map(int, input().strip().split())
if a >= b:
a, b = b, a
m = b - a
ca = c - r
cb = c + r
if cb >= b:
if ca <= a:
print(0)
elif ca <= b:
print(ca - a)
else:
print(m)
elif cb <= a:
print(m)
else:
if ca >= a:
print(m - (cb - ca))
else:
print(m - (cb - a))
|
#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define f(i,n) for(ll i=0;i<=n;i++)
#define crap ios::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define pb push_back
#define mp make_pair
#define F first
#define S second
int main(){
ll n,m;
cin>>n>>m;
ll arr[n][m];
string s;
for(ll i=0;i<n;i++){
cin>>s;
for(ll j=0;j<m;j++){
arr[i][j]=s[j]-'0';
}
}
ll kk=0,ans=LLONG_MIN;
for(ll i=0;i<n;i++){
for(ll j=0;j<m;j++){
for(ll k=n-1;k>=i;k--){
for(ll l=m-1;l>=j;l--){
kk=0;
for(ll x=i;x<=k;x++){
for(ll y=j;y<=l;y++){
if(arr[x][y]==1){
kk=1;
break;
}
}
}
if(kk==0)ans=max(ans,2*(k-i+1+l-j+1));
}
}
}
}
cout<<ans;
}
|
The UN Human Rights Council’s Commission of Inquiry report on the DPRK by the UN’s Office of the High Commissioner for Human Rights (OHCHR) revealed in excruciating detail the horrors that are a regular part of the Kim Dynasty’s repressive rule. The systematic abuse of human rights by the regime is extensive, intensive, and appalling. Nevertheless, the report should not come as a surprise to those engaged with North Korea or, for that matter, anyone who is familiar with DPRK history. The report is also, as things currently stand, without consequence. The operative phrase here is “as things currently stand.” The report and others like it are crucial in terms of post-unification transitional justice, if and when unification comes on South Korean terms. Unfortunately, until then, the report and its recommendations are simply nonstarters. This is the case for several salient reasons.
First, in terms of taking Kim Jung-un and the perpetrators of these crimes to the ICC, China openly stated before the report was even released that it would not allow such a step. Because the DPRK is not a signatory to the Rome Statue, the ICC requires a referral from the UN Security Council in order to gain the jurisdiction necessary to prosecute the DPRK. China’s rhetorical (and real) veto stops the process before it begins. From Beijing’s perspective this is both consistent and reasonable. Second, even if Beijing permitted such a step and the ICC found the perpetrators guilty, it would have no impact on the leadership in Pyongyang, as it did not with Sudanese President Omar Bashir. Third, the recommendations in the report that are directed at the Kim regime are equally as fanciful. If followed, such reforms would bring about nothing short of the fundamental transformation of the regime. Again, much of the world may desire a wholesale reversal of the DPRK’s internal and external policies, but it is foolhardy to expect such a self-derived shift. Fourth, even the U.S. faces real difficulties in integrating human rights concerns in its denuclearization effort. Incorporating human rights would complicate already stalled Six-Party talks as well as prove counter-productive by aggravating China. This leaves us where we began, with a seemingly intolerable state of affairs that calls for something to be done, but with little in the way of realistic or practicable options. So, where to from here?
For the sake of argument let us explore the broad range of policy options: 1) complete isolation of the regime; 2) enhanced external pressure, culminating in full-scale military invasion, with the intent of bringing the regime down; 3) engagement on several levels. This set of policy options applies to several state and nonstate actors dealing with North Korea.
The first option, complete isolation of the Kim Dynasty, is not really an option at all. There are several explanations for this. First, larger states within the region including China and Russia will continue to engage the DPRK for a variety of reasons, from strategically driven economic engagement in fledgling Special Economic Zones (SEZs) to concern over the potential for massive instability caused by rapid and/or violent regime collapse. The latter is a central concern for Beijing, which goes a long way to explaining its reticence to pressure the DPRK and its willingness to help prop up the regime with sufficient trade and aid. Consistent with this, China-DPRK trade is up from last year, despite (or because of) concerns over the execution of Jang Song-thaek last December. Nor is the South Korean government amenable to the isolation of the North, manifest in its own involvement in the aforementioned economic projects, the Kaesong Industrial Complex, the historical unity of the Korean Peninsula, and the shared concern with Beijing over peninsular stability. Washington is also unlikely to leave the regime isolated over its concerns with the DPRK’s nuclear and missile programs as well as its trade in illicit materials.
The second option involves greater external pressure, ranging from increased sanctions to full-scale invasion. This option, like complete isolation, is also not really an option. First, while China is undoubtedly concerned with the DPRK’s overly risk-accepting and aggressive behavior, it is far more concerned with preserving stability on the peninsula. Thus, Beijing has become less tolerant of Pyongyang’s nuclear and missile tests and has abstained from vetoing certain sanctions on the Security Council, yet it has simultaneously refrained from obstructing Chinese firms in Northeast China from increasing their commercial trade with the beleaguered regime. Furthermore, regarding human rights, Beijing wants to avoid being held accountable for its complicity in the Kim Dynasty’s crimes; namely its practice of forcibly returning defectors back across the Yalu. Add to this Beijing’s longstanding aversion to any discussion of human rights directed at its own internal abuses. Second, full-scale invasion, the most extreme form of pressure, is also patently absurd. Let us further test this idea.
The current situation as it stands with the DPRK is one without a military solution. Not only does the maxim “if you break it you own it” (as Paul Whitefield recently noted) apply, but a far a more obvious reason persists. That is, the DPRK has nuclear weapons. No revolution in military affairs is going to guarantee with absolute certainty that such weapons will be eliminated before North Korea could use them. Moreover, the U.S. itself, despite its heavily militarized orientation toward the North, has prevented the ROK from taking escalatory actions in response to what are normally considered acts of war. As Daniel Pinkston writes: “The U.S. political and military leaderships are unwilling to fight a full-scale war in Korea over the shooting down of an aircraft, the sinking of a ship, the insertion of KPA Special Forces for limited operations, or firing artillery on a fishing village.” Bruce Cuming’s describes the U.S. presence as dual deterrence or civil-war deterrence, meaning the simultaneous deterrence of North Korea from starting a conflagration and of South Korea from escalating it. What is more, nuclear weapons notwithstanding, even the DRPK’s conventional capabilities (though dated and far less advanced than U.S. and ROK arsenals) make very real Pyongyang’s threat to turn Seoul into “a sea of fire.” Though an all-out conflict would likely bring about the end of the DPRK as a sovereign state, it would very likely inflict immense damage on the South Korean capital, threaten Tokyo, and potentially bring about larger instability in the region before its demise. In sum, bringing the regime down through greater pressure is not possible, both because key regional powers will not allow it and the military option is untenable in any rational (and moral) calculation. The very real potential for even greater human suffering and destruction is simply too prohibitive a risk. This leaves the third option, engagement.
Engagement should not be interpreted as simply diplomatic engagement. Although diplomacy should not be entirely jettisoned, it appears that traditional diplomacy with the Kim Dynasty is of limited utility. The DPRK is not going to give up its nukes. Pyongyang saw what happened to Gadhafi when he gave up his program and to Saddam when he did not have one. The U.S. demand that the DPRK denuclearize is a nonstarter in Pyongyang for as long as the current regime is in power. Even Beijing’s recent mention of denuclearization as the goal will fall on deaf ears. In this sense, the Six Party Talks appear futile. However, this is not a reason to abandon them. If for no other reason, the talks are valuable insofar as they provide a framework within which interested parties address their shared and divergent perspectives. That said, we must broaden our conception of engagement – one more commensurate with just how extraordinary this situation is.
The DPRK is truly unlike any other state (in the words of the UN Panel of Experts, a state “that does not have any parallel in the contemporary world”). Although constantly referred to as a failed Stalinist state, even that moniker does not go far enough. As Andrei Lankov’s work clearly shows, the DPRK (from Great Leader Kim Il Sung, to Dear Leader Kim Jung Il, to Supreme Leader Kim Jung Un) successfully “out-Stalined” Stalin himself. The restrictions on personal movement, the Inminban (neighborhood watch) system, the hierarchical and entrenched Songbun class structure, and the ubiquitous organizational life within the DPRK all make for a world unrecognizable to most outsiders, from a Chinese communist in capitalist garb to a Western Liberal. And while these restrictions loosened in the 1990s due to internal economic breakdown and widespread famine, they continue to prove crucial for both the Kim Dynasty and its elite courtiers to retain their place atop the miserable North Korean masses. |
1. This isn't the regular sunk-in-1912 Titanic. It's a vessel named Titanic from the planet Stow, which is taking a tourist excursion to Earth. The purpose is for its passengers to observe "primitive lifeforms".
2. The theme tune has undergone a bit of a revamp for the Christmas special. It's rockier!
3. Legendary actor Clive Swift (Keeping Up Appearances) plays Mr. Copper, a tour guide who claims to have a degree in "Earthonomics".
4. As we all know, Kylie plays 'Astrid Peth', a waitress on board the ship who strikes up an immediate friendship with the Doctor. She's actually rather good! Don't read as much into her name as some of you have been doing, though.
5. Mr. Copper's degree in Earthonomics may not have been from the most reputable establishment. Among some of the facts he tells his tour party: humans worship Santa and his wife Mary, and every Christmas the UK goes to war with Turkey and eats its people.
6. Will Kylie be the new assistant? "Can I come with you?" she asks. The Doc's reply: "Yeah, I'd like that." But surely there can't be another assistant...?
7. Like its namesake, the spaceship Titanic has a doomed future. Gabriel would not be proud.
8. There is a special homage to one of the nation's greatest Christmas Day traditions.
"That's eight of them now on the blink"
"Any day now they start boxing."
"Information: You are all going to die."
"I don't half love you."
"I travel alone. It's best that way."
The Doctor holds out his hand from the TARDIS as it snows. "Come with me," he says. It's Donna!
Martha looks helpless as she is kept back by guards.
The Ood are back. One is chained up, another holds a ball and tells Donna he does not understand.
Sarah Lancashire, holding a red and white pill, announces: "This is the spark of life."
Doctor Who: Voyage of the Damned airs Christmas Day at 6.50pm.
Bieber: "I'm just a regular 16-year-old" |
<filename>osgp/protocol-adapter-dlms/osgp-protocol-simulator-dlms/simulator/dlms-device-simulator/src/main/java/org/opensmartgridplatform/simulator/protocol/dlms/util/KeyPathProvider.java
/*
* Copyright 2016 Smart Society Services B.V.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*/
package org.opensmartgridplatform.simulator.protocol.dlms.util;
import java.io.File;
/**
* This class is used to obtain the correct path for keys for a logical device.
*
* <p>Each logical device corresponds with an authentication / encryption file that should be
* supplied in the configurable paths. When both files are there, that correspond with a logicalId X
* like this: {$authKeyDefaultPath}X and {$encKeyDefaultPath}X, than these files will be used for
* this logical device
*/
public class KeyPathProvider {
private final String authKeyDefaultPath;
private final String encKeyDefaultPath;
private final String masterKeyDefaultPath;
public KeyPathProvider(
final String authKeyDefaultPath,
final String encKeyDefaultPath,
final String masterKeyDefaultPath) {
this.authKeyDefaultPath = authKeyDefaultPath;
this.encKeyDefaultPath = encKeyDefaultPath;
this.masterKeyDefaultPath = masterKeyDefaultPath;
}
public String getAuthenticationKeyFile(final int logicalDeviceId) {
if (this.hasDeviceSpecificKeyFiles(logicalDeviceId)) {
return this.authKeyDefaultPath + logicalDeviceId;
} else {
return this.authKeyDefaultPath;
}
}
public String getEncryptionKeyFile(final int logicalDeviceId) {
if (this.hasDeviceSpecificKeyFiles(logicalDeviceId)) {
return this.encKeyDefaultPath + logicalDeviceId;
} else {
return this.encKeyDefaultPath;
}
}
public String getMasterKeyFile(final int logicalDeviceId) {
if (this.hasDeviceSpecificKeyFiles(logicalDeviceId)) {
return this.masterKeyDefaultPath + logicalDeviceId;
} else {
return this.masterKeyDefaultPath;
}
}
protected String getAuthenticationKeyDefaultPath() {
return this.authKeyDefaultPath;
}
protected String getEncryptionKeyDefaultPath() {
return this.encKeyDefaultPath;
}
protected String getMasterKeyDefaultPath() {
return this.masterKeyDefaultPath;
}
private boolean hasDeviceSpecificKeyFiles(final int logicalDeviceId) {
final boolean b1 = this.fileExists(this.authKeyDefaultPath + logicalDeviceId);
final boolean b2 = this.fileExists(this.encKeyDefaultPath + logicalDeviceId);
final boolean b3 = this.fileExists(this.masterKeyDefaultPath + logicalDeviceId);
return b1 && b2 && b3;
}
private boolean fileExists(final String filename) {
return new File(filename).exists();
}
}
|
Discharge, microstructural and mechanical properties of ZrO2 addition on MgO for plasma display panel materials Abstract One of the major parts in the plasma display panel is its protecting layer. MgO thin film has been widely used as a protective layer for dielectric materials. Adding another material to the MgO base material is an alternative method for improving its property as protective layer. A study on reducing the surface discharge potential of a single pure MgO protecting layer by the addition of ZrO2 with several compositions is presented in this paper. The microstructural and mechanical properties are also described. The discharge properties were measured utilising the flashover treeing for material characterisation, produced by a scanning electron microscope. The mechanical properties were measured using the pure bending moment. The MgO and ZrO2 powders with 9995 and 99% purity were used for powder mixtures of various desired compositions. In this work, investigation was carried out for sintered samples at 1250°C for 24 h. From observation, ZrO2 addition into high purity MgO has influenced the properties of MgO. Since secondary electron emission coefficient contributes in increasing the electrical field of the surface, it could be found that 5 wt-%ZrO2 added MgO has the highest secondary electron emission coefficient because the charging and discharging process happened within a shorter time. |
Design and Control of a Pneumatic Muscle Servo Drive Containing Its Own Pneumatic Muscles : This article presents static and dynamic characteristics of artificial pneumatic muscles. The research stance and the methodology for their determination are described. A mathematical model of a pneumatic muscle has been proposed, having two inputsthe force generated by the muscle and the displacement of the muscle tip, and one outputthe valve control voltage. The quality of object mapping was verified by a mathematical model for various trajectories. Then, the control system for the moment servo drive force was composed of two pneumatic muscles working in opposite directions connected by a toothed belt gear. The servo drive was verified and evaluated. Introduction A pneumatic muscle is a type of single-acting cylinder which, under the influence of an increase in internal pressure, increases its volume by increasing its diameter while reducing its length. Changing the length of the cylinder is used as a working movement. The basic physical quantities describing the behavior of a muscle in a steady state are internal hypertension p muscle length l and the force generated by the F muscle. In 1957, Dr. Joseph L. McKibben used the pneumatic muscle he had developed to propel his limbs. This muscle consisted of an elastic bladder placed freely inside a braid of inextensible fibers. At the ends, the braid and the bladder were connected which allowed for the transfer of the forces generated by the muscle and the working medium, which was carbon dioxide. This muscle is often referred to as "McKibben's muscle". In 1980, the Bridgestone Rubber Company commercialized the pneumatic muscle on a massive scale by introducing a muscle that was an improvement on Dr. McKibben's design. Currently, pneumatic muscles are mainly offered by two companies: since 1987, Shadow Robot Company has been producing and selling muscles modeled on the McKibben project, while in 1999, Festo, a well-known manufacturer of pneumatic devices, introduced pneumatic muscles that could be tailored to individual applications. It is fundamentally different in structure from McKibben's muscle. In the Festo project, the braid and the rubber bladder are fused along the entire length of the muscle. The view of the muscle in this version is shown in Figure 1. This solution significantly increases the resistance of the muscle to mechanical damage and increases its durability. However, it has the disadvantage of a lower relative shortening of the muscle and, hence, less effective working movement is generated by the muscle. Work is underway in many research centers around the world to analyze artificial pneumatic muscles and to determine mathematical models describing their behavior. These models can be broadly divided into static and dynamic, as well as into positional models, where the key is to determine the length of the muscle, and force models, where it is crucial to determine the force generated by the muscle. The first stage of the analysis of pneumatic muscles is often the determination of their static characteristics in the form of isobaric, isotonic and isometric characteristics and their dynamic characteristics in the form of the initial negative shortening. It was assumed that the designed muscles would have a structural system modeled on McKibbens muscles, i.e. have a rubber bladder placed freely inside the flexible braid, nominal diameter 20 mm n d and nominal length 350 mm n l Such parameters should ensure the maximum possible muscle contraction of at least 100 mm x and the maximum working force of at least 900 N F . Figure 1 shows the view of the developed pneumatic muscle at zero internal overpressure and at internal overpressure equal to 0.6 MPa p . In this article, the authors analyze the possibility of building their own artificial pneumatic muscles and their use to build a servo drive that maintains a given moment of force. For this purpose, the article presents the analysis and synthesis of a pneumatic muscle torque servo, built of two pneumatic muscles working in opposite directions and connected by a gear with a toothed belt. This servo drive was used to build a parallel delta manipulator with six degrees of freedom. Test Stand In order to verify the assumed thesis, first the static and dynamic characteristics of a single muscle were determined. In this servo drive proportional piezoelectric pressure servo valves Hoerbiger Tecno Plus with output pressure were used to supply the muscle with the working medium = 0 a -1 MP p and control signal = 0 V - 10 u. A single muscle, along with its associated valve and connecting line, is the object being analyzed. In steady state, this object is characterized by three quantities: valve servicing voltage u being the input signal for the object and the force generated by the muscle F and muscle tip position x, which are the output signals of the object. When determining all the characteristics, it was assumed that the position of the muscle tip is the difference between the nominal length of the muscle n l and its current length l expressed in millimeters. For the examined muscle, the nominal length was = 350 mm n l. In steady state hypertension prevailing inside the muscle p linearly corresponds to the control signal u by dependence (MPa) = 0.1 (V) p u. The relationship between the three quantities characterizing the muscle can be represented as three types of static characteristics: isobaric -the dependence of the position on the loading force, with a constant value of the control voltage for several voltage values g( ); = const x F u , isotonic -dependence of the position on the control voltage at constant loading force, for several strength values g( ); = const x u F and isometricforce dependence on the control voltage, with a constant muscle position, for several position values g( ); = const F u x . The scheme for determining these characteristics is presented in Figure 2. However, the behavior of the object over time can be determined by determining two families of dynamic characteristics, one for each of the objects output In publications describing the static models of muscles, the research mainly concerns the determination of the relationship between internal overpressure, the length of the muscle and the force generated by the muscle in relation to the geometric parameters of the muscle. Research was also carried out on the determination of dynamic models of both McKibben's and Festo's muscles, as well as on other structures developed in various research centers, and on the development of positional and force control methods using the presented mathematical models. These issues were extensively discussed, inter alia, in the research of. Due to the significant friction between the fibers of the braid and between the braid and the rubber bladder, there is a hysteresis phenomenon in the muscles modeled on the McKibben design. It concerns both the shortening of the muscle and the force generated by it. In the case of shortening, the hysteresis manifests itself as the difference between the contraction value ∆l 1 at a given internal overpressure and the constant loading force in the case where overpressure was increased, and the contraction value ∆l 2 at the same internal overpressure and constant loading force in the case where overpressure was decreased. In the case of the analysis of the force generated by the muscle, the hysteresis refers to the difference between the force F 1 generated at a given internal overpressure and constant contraction ∆l in the case where overpressure was increased, and the value of force F 2 generated at the same internal overpressure and constant contraction ∆l in the case of overpressure. reduced. This issue is the subject of many studies, e.g.,. The analysis presented above shows that Festo is the leading manufacturer of pneumatic muscles. The company produces two types of pneumatic muscles marked MAS and DMSP, each of which is offered in a version with a nominal diameter of d n = 10 mm, d n = 20 mm and d n = 40 mm. This parameter is crucial due to the use of the pneumatic muscle, because its value defines the maximum force F that the muscle is able to generate at a given internal overpressure p. The muscles offered by Festo differ significantly in their structure from the structure developed by Dr. McKibben. In the original design, the rubber bladder was placed freely inside an elastic braid and was connected to it only in two places at the ends of the muscle. On the other hand, the design of Festo has two layers of braid and two layers of a rubber bladder placed alternately and vulcanized together. This design of the drive makes it durable and much more resistant to mechanical damage than a classic muscle. However, the main disadvantage of such a solution is the lower relative contraction of, determined according to the relationship, where l n -nominal length of the muscle at zero overpressure, l-actual length of the muscle. The mentioned negative feature is important from the point of view of the use of pneumatic muscles for the construction of the servo drive. Smaller maximum shortening forces the use of muscles with a greater nominal length in order to develop the same range of servo drive movements, which results in an increase in the geometrical dimensions of both the servo drive and the entire designed manipulator. For this reason, a decision was made to develop and manufacture their own pneumatic muscles with the possibility of initial negative shortening. It was assumed that the designed muscles would have a structural system modeled on McKibben's muscles, i.e. have a rubber bladder placed freely inside the flexible braid, nominal diameter d n = 20 mm and nominal length l n = 350 mm. Such parameters should ensure the maximum possible muscle contraction of at least x = 100 mmand the maximum working force of at least F = 900 N. Figure 1 shows the view of the developed pneumatic muscle at zero internal overpressure and at internal overpressure equal to p = 0.6 MPa. In this article, the authors analyze the possibility of building their own artificial pneumatic muscles and their use to build a servo drive that maintains a given moment of force. For this purpose, the article presents the analysis and synthesis of a pneumatic muscle torque servo, built of two pneumatic muscles working in opposite directions and connected by a gear with a toothed belt. This servo drive was used to build a parallel delta manipulator with six degrees of freedom. Test Stand In order to verify the assumed thesis, first the static and dynamic characteristics of a single muscle were determined. In this servo drive proportional piezoelectric pressure servo valves Hoerbiger Tecno Plus with output pressure were used to supply the muscle with the working medium p = 0−1 MPa and control signal u = 0−10 V. A single muscle, along with its associated valve and connecting line, is the object being analyzed. In steady state, this object is characterized by three quantities: valve servicing voltage u being the input signal for the object and the force generated by the muscle F and muscle tip position x, which are the output signals of the object. When determining all the characteristics, it was assumed that the position of the muscle tip is the difference between the nominal length of the muscle l n and its current length l expressed in millimeters. For the examined muscle, the nominal length was l n = 350 mm. In steady state hypertension prevailing inside the muscle p linearly corresponds to the control signal u by dependence p(MPa) = 0.1 u(V). The relationship between the three quantities characterizing the muscle can be represented as three types of static characteristics: isobaric-the dependence of the position on the loading force, with a constant value of the control voltage for several voltage values x = g(F); u = const, isotonic-dependence of the position on the control voltage at constant loading force, for several strength values x = g(u); F = const and isometric-force dependence on the control voltage, with a constant muscle position, for several position values F = g(u); x = const. The scheme for determining these characteristics is presented in Figure 2. However, the behavior of the object over time can be determined by determining two families of dynamic characteristics, one for each of the object's output quantities. The first family of dynamic characteristics presents the relationship of muscle position x since t as a response to a step change in the valve control signal u, with constant muscular force F. The second family of characteristics shows the dependence of the force generated by the muscle F since t as a response to a step change in the control signal u with a fixed position of the muscle tip x. quantities. The first family of dynamic characteristics presents the relationship of muscle position x since t as a response to a step change in the valve control signal u, with constant muscular force F. The second family of characteristics shows the dependence of the force generated by the muscle F since t as a response to a step change in the control signal u with a fixed position of the muscle tip x. In order to determine the characteristics discussed above, a test stand was designed and constructed, the diagram and real view of which are shown in Figure 3. The stand allows testing of a single muscle and a pair of muscles working in opposite directions connected by a toothed belt gear with a pitch diameter 63.66 mm = p d. The station has an absolute optical encoder with a resolution of 16 bits per revolution enabling determination of muscle displacement with accuracy = 0.005 mm x . The stand has also been equipped with Hoerbiger Tecno Plus pressure servo valves for supplying the muscles with a working medium. In addition, the station is equipped with two strain-gauges with a range ±2 kN with an analog voltage output ±10 V. In order to In order to determine the characteristics discussed above, a test stand was designed and constructed, the diagram and real view of which are shown in Figure 3. The stand allows testing of a single muscle and a pair of muscles working in opposite directions connected by a toothed belt gear with a pitch diameter d p = 63.66 mm. quantities. The first family of dynamic characteristics presents the relationship of muscle position x since t as a response to a step change in the valve control signal u, with constant muscular force F. The second family of characteristics shows the dependence of the force generated by the muscle F since t as a response to a step change in the control signal u with a fixed position of the muscle tip x. In order to determine the characteristics discussed above, a test stand was designed and constructed, the diagram and real view of which are shown in Figure 3. The stand allows testing of a single muscle and a pair of muscles working in opposite directions connected by a toothed belt gear with a pitch diameter 63.66 mm = p d. The station has an absolute optical encoder with a resolution of 16 bits per revolution enabling determination of muscle displacement with accuracy = 0.005 mm x . The stand has also been equipped with Hoerbiger Tecno Plus pressure servo valves for supplying the muscles with a working medium. In addition, the station is equipped with two strain-gauges with a range ±2 kN with an analog voltage output ±10 V. In order to The station has an absolute optical encoder with a resolution of 16 bits per revolution enabling determination of muscle displacement with accuracy ∆x = 0.005 mm. The stand has also been equipped with Hoerbiger Tecno Plus pressure servo valves for supplying the muscles with a working medium. In addition, the station is equipped with two strain-gauges with a range ±2 kN with an analog voltage output ±10 V. In order to load muscles with the set force value, the station is equipped with an electric servo drive with a rated power of 400 W and a rated torque of 1.27 Nm with a precise planetary gear ratio i = 70 and maximum arc clearance of 9 arcmin driving the toothed belt transmission. This drive allows for the loading of a single muscle with strength F max = 2792 N. In addition, due to the non-linearity of the generated torque in relation to the set electrical current value resulting primarily from the use of planetary gears, an additional control system with a PID type regulator has been implemented to control the muscle loading force. A strain-gauge force sensor was used as the feedback. Static Characteristics A set of isobaric characteristics was determined for the value of the control signal u from 0 V to 6 V. For each value of the control signal, the value of the loading force F was increased from 50 N to 950 N with a step of 10 N, and after waiting for a period of time equal to 3 seconds, the value of the muscle position x was read. Then, measurements were made at the same control voltage u by reducing the value of the loading force F from 950 N to 50 N with the same step and also, after waiting for a period of time equal to 3 s, the value of the muscle position x was read. As a result, a family of isobaric characteristics was obtained. Figure 4 shows exemplary isobaric characteristics for the values of control voltages u = 2 V, u = 4 V and u = 6 V, when increasing (solid line) and decreasing (dashed line) the loading force F. ratio = 70 i and maximum arc clearance of 9 arcmin driving the toothed belt transmission. This drive allows for the loading of a single muscle with strength max 2792 N = F. In addition, due to the non-linearity of the generated torque in relation to the set electrical current value resulting primarily from the use of planetary gears, an additional control system with a PID type regulator has been implemented to control the muscle loading force. A strain-gauge force sensor was used as the feedback. Static Characteristics A set of isobaric characteristics was determined for the value of the control signal u from 0 V to 6 V. For each value of the control signal, the value of the loading force F was increased from 50 N to 950 N with a step of 10 N, and after waiting for a period of time equal to 3 seconds, the value of the muscle position x was read. Then, measurements were made at the same control voltage u by reducing the value of the loading force F from 950 N to 50 N with the same step and also, after waiting for a period of time equal to 3 s, the value of the muscle position x was read. As a result, a family of isobaric characteristics was obtained. Figure 4 shows exemplary isobaric characteristics for the values of control voltages, when increasing (solid line) and decreasing (dashed line) the loading force F. Figure 5 shows the surface formed by all isobaric characteristics determined by increasing the loading force (left) and the area formed by all isobaric characteristics determined by decreasing the loading force (right). On the other hand, Figure 6 shows the area representing the amount of mechanical hysteresis for the entire family of isobaric characteristics. Figure 5 shows the surface formed by all isobaric characteristics determined by increasing the loading force (left) and the area formed by all isobaric characteristics determined by decreasing the loading force (right). On the other hand, Figure 6 shows the area representing the amount of mechanical hysteresis for the entire family of isobaric characteristics. sion. This drive allows for the loading of a single muscle with strength max 2792 N = F. In addition, due to the non-linearity of the generated torque in relation to the set electrical current value resulting primarily from the use of planetary gears, an additional control system with a PID type regulator has been implemented to control the muscle loading force. A strain-gauge force sensor was used as the feedback. Static Characteristics A set of isobaric characteristics was determined for the value of the control signal u from 0 V to 6 V. For each value of the control signal, the value of the loading force F was increased from 50 N to 950 N with a step of 10 N, and after waiting for a period of time equal to 3 seconds, the value of the muscle position x was read. Then, measurements were made at the same control voltage u by reducing the value of the loading force F from 950 N to 50 N with the same step and also, after waiting for a period of time equal to 3 s, the value of the muscle position x was read. As a result, a family of isobaric characteristics was obtained. Figure 4 shows exemplary isobaric characteristics for the values of control voltages, when increasing (solid line) and decreasing (dashed line) the loading force F. Figure 5 shows the surface formed by all isobaric characteristics determined by increasing the loading force (left) and the area formed by all isobaric characteristics determined by decreasing the loading force (right). On the other hand, Figure 6 shows the area representing the amount of mechanical hysteresis for the entire family of isobaric characteristics. of the control signal u was increased from 0 V to 6 V in steps of 0.1 V, and after waiting for a period of time equal to 3 seconds, the value of the muscle position x was read. Then, with the same loading force F, measurements were made while reducing the value of the control signal u from 6 V to 0 V with the same step. Also, after waiting for a period of 3 seconds, the value of muscle position x was read. Figure 7 shows exemplary isotonic characteristics for the values of the loading forces 200 N F , 500 N F and 800 N F , with increasing (solid line) and decreasing (dashed line) the value of the control signal. Figure 8 shows the surface formed by all isotonic characteristics determined when increasing the value of the control signal (left) and the surface formed by all isotonic characteristics determined by decreasing the value of the control signal (right). On the other hand, Figure 9 shows the surface representing the amount of mechanical hysteresis for the Then, a family of 19 isotonic characteristics were determined for the constant values of the loading forces F from 50 N to 950 N. For each value of the loading force, the value of the control signal u was increased from 0 V to 6 V in steps of 0.1 V, and after waiting for a period of time equal to 3 seconds, the value of the muscle position x was read. Then, with the same loading force F, measurements were made while reducing the value of the control signal u from 6 V to 0 V with the same step. Also, after waiting for a period of 3 seconds, the value of muscle position x was read. Figure 7 shows exemplary isotonic characteristics for the values of the loading forces F = 200 N, F = 500 N and F = 800 N, with increasing (solid line) and decreasing (dashed line) the value of the control signal. Figure 8 shows the surface formed by all isotonic characteristics determined when increasing the value of the control signal (left) and the surface formed by all isotonic characteristics determined by decreasing the value of the control signal (right). On the other hand, Figure 9 shows the surface representing the amount of mechanical hysteresis for the entire family of isotonic characteristics. Moreover, a family of 23 isometric characteristics were determined for constant values of the muscle position x from 0 mm to 110 mm with a step of 5 mm. For each position value, the value of the control signal u was increased from 0 V to 6 V with a step of 0.1 Figure 9 shows the surface representing the amount of mechanical hysteresis for the entire family of isotonic characteristics. the control signal u from 6 V to 0 V with the same step. Also, after waiting for a period of 3 seconds, the value of muscle position x was read. Figure 7 shows exemplary isotonic characteristics for the values of the loading forces 200 N F , 500 N F and 800 N F , with increasing (solid line) and decreasing (dashed line) the value of the control signal. Figure 8 shows the surface formed by all isotonic characteristics determined when increasing the value of the control signal (left) and the surface formed by all isotonic characteristics determined by decreasing the value of the control signal (right). On the other hand, Figure 9 shows the surface representing the amount of mechanical hysteresis for the entire family of isotonic characteristics. Moreover, a family of 23 isometric characteristics were determined for constant values of the muscle position x from 0 mm to 110 mm with a step of 5 mm. For each position value, the value of the control signal u was increased from 0 V to 6 V with a step of 0.1 V, and after waiting for a period of 3 s, the value of the force generated by muscle F was read. Then, for the same value of muscle position x, measurements were made at decreasing the value of the control signal u from 6 V to 0 V with the same step. Figure 10 shows selected isometric characteristics for the position of the muscle 20 mm x , 50 mm x and 80 mm x for increasing (solid line) and decreasing (dashed line) the value of the control signal. On the other hand, Figure 11 shows the surface formed by all isometric characteristics determined when increasing the value of the control signal (left) and the surface formed by all isometric characteristics determined when decreasing the value of the control signal (right). On the other hand, Figure 12 shows the surface representing the amount of mechanical hysteresis for the entire family of isometric characteristics. Moreover, a family of 23 isometric characteristics were determined for constant values of the muscle position x from 0 mm to 110 mm with a step of 5 mm. For each position value, the value of the control signal u was increased from 0 V to 6 V with a step of 0.1 V, and after waiting for a period of 3 s, the value of the force generated by muscle F was read. Then, for the same value of muscle position x, measurements were made at decreasing the value of the control signal u from 6 V to 0 V with the same step. Figure 10 shows selected isometric characteristics for the position of the muscle x = 20 mm, x = 50 mm and x = 80 mm for increasing (solid line) and decreasing (dashed line) the value of the control signal. On the other hand, Figure 11 shows the surface formed by all isometric characteristics determined when increasing the value of the control signal (left) and the surface formed by all isometric characteristics determined when decreasing the value of the control signal (right). On the other hand, Figure 12 shows the surface representing the amount of mechanical hysteresis for the entire family of isometric characteristics. On the other hand, Figure 11 shows the surface formed by all isometric characteristics determined when increasing the value of the control signal (left) and the surface formed by all isometric characteristics determined when decreasing the value of the control signal (right). On the other hand, Figure 12 shows the surface representing the amount of mechanical hysteresis for the entire family of isometric characteristics. 50 mm x and 80 mm x for increasing (solid line) and decreasing (dashed line) the value of the control signal. On the other hand, Figure 11 shows the surface formed by all isometric characteristics determined when increasing the value of the control signal (left) and the surface formed by all isometric characteristics determined when decreasing the value of the control signal (right). On the other hand, Figure 12 shows the surface representing the amount of mechanical hysteresis for the entire family of isometric characteristics. Analyzing Figure 3, one can notice the difference between the isobaric characteristic when increasing the loading force F and the characteristic when decreasing the loading force F. It is a mechanical hysteresis resulting mainly from the frictional forces between the fibers of the muscle braid and between the braid fibers and the elastic bladder. This phenomenon is also noticeable in the case of other static characteristics. Analyzing the isotonic characteristics presented in Figure 6, it can be seen that for significant values of force F. It is a mechanical hysteresis resulting mainly from the frictional forces between the fibers of the muscle braid and between the braid fibers and the elastic bladder. This phenomenon is also noticeable in the case of other static characteristics. Analyzing the isotonic characteristics presented in Figure 6, it can be seen that for significant values of the loading forces F, the initial increase in the control signal u, and thus the increase in the internal overpressure of the muscle p, does not change the position of the muscle x. On the other hand, when analyzing the isometric characteristics presented in Figure 9, it was noticed that for the constant values of the muscle position x, the value of the force generated by the muscle F changes proportionally to the value of the control signal u. From the above characteristics one can also read the value of the static amplification of the object k. In the case of isometric characteristics, the static gain of the object k(x) expressed as the ratio of the force generated by the muscle F to the control voltage u varies in the range from k min (95 mm) = −17.4 N V to k max (0 mm) = 284.3 N V. However, in the case of isotonic characteristics, the static gain of the object k(u, F) expressed as the ratio of the muscle position x to the control voltage u depends on the operating point of the object defined by two parameters. Its minimum value is k min (0 V, 100 N) = −0.13 mm V and its maximum value k max (0.86 V, 50 N) = 97.16 mm V. Dynamic Characteristics A family of dynamic characteristics was determined in the form of changes in force F as the object's response to a step change in the valve control signal u, with a constant value of the muscle position x 0. A series of measurements was performed for 17 different values of the muscle position in the range from 0 mm to 80 mm. The test for a given position value was performed by a step change of the control signal from value u 0 = 1 V to value u n = u 0 + n 0.2 V; (n = 1, 2,..., 20). In contrast, the measurement of the force generated by the muscle was carried out for a period of 1 second with a sampling frequency of 1 kHz. Figure 12 (left) shows selected dynamic characteristics for the constant value u n > u 0 of the muscle displacement equal to x 0 = 20 mm. On the other hand, Figure 12 (right) shows selected dynamic characteristics for u n = 5 V and at different values of muscle displacement. As before, a family of dynamic characteristics was determined representing the change in force generated by the muscle as a response to a step change of the control signal from value u 0 = 5 V to value u n = u 0 − n 0.2 V; (n = 1, 2,..., 20). These tests were performed for 17 different values of the muscle position x 0 ranging from 0 mm to 80 mm. The force measurement period and sampling frequency did not change. x ranging from 0 mm to 80 mm. The force measurement period and sampling frequency did not change. Figure 13 and Analyzing the dynamic characteristics in the form of changes in the force generated by the muscle as a response to a step change in the control signal at a constant position of Analyzing the dynamic characteristics in the form of changes in the force generated by the muscle as a response to a step change in the control signal at a constant position of the muscle, presented in Figures 13 and 14, it was observed that the behavior of the tested object in the vicinity of a given operating point corresponds to the behavior of a secondorder object of an oscillating nature. Mathematical Model of a Pneumatic Muscle A mathematical model describing the dynamic relationship between the force generated by the muscle was started a F and the control signal a u and current muscle position a x Analyzing the dynamic characteristics presented in Section 1, it was noticed that the behavior of the object in the vicinity of a given work point can be described by a second order differential equation with constant coefficients. In the general case, the work point of the object can be fully defined using two parameters: the force generated by the muscle Analyzing the dynamic characteristics in the form of changes in the force generated by the muscle as a response to a step change in the control signal at a constant position of the muscle, presented in Figures 13 and 14, it was observed that the behavior of the tested object in the vicinity of a given operating point corresponds to the behavior of a second-order object of an oscillating nature. Mathematical Model of a Pneumatic Muscle A mathematical model describing the dynamic relationship between the force generated by the muscle was started F a and the control signal u a and current muscle position x a. Analyzing the dynamic characteristics presented in Section 1, it was noticed that the behavior of the object in the vicinity of a given work point can be described by a second order differential equation with constant coefficients. In the general case, the work point of the object can be fully defined using two parameters: the force generated by the muscle F a and the position of the muscle tip x a. Analyzing static characteristics presented in Section 2 it was noticed that the dependence of the force generated by the muscle on the control signal is close to linear over the full range of the muscle F a (u a, x a ) ≈ a(x a )u a + F a,0 for x a ∈ 0 mm; 80 mm. Therefore, in order to base the model, it is enough to linearize only the static characteristics describing the relationship between the muscle position and the control signal. Therefore, in this case, the muscle work point can be defined with one parameter-the current muscle position x a expressed in absolute coordinates. During the tests, the muscle was kept in initial tension, giving the initial value of the control signal u a,0 constant for each work point. This resulted in the muscle generating an initial value of strength F a,0. The model describing the behavior of the object in the surroundings of a given point is shown by the formula,.. where: F-the force generated by the muscle in the coordinates of the deviations in the vicinity of the working point, u-control signal in the coordinates of the deviations around the working point, F a,0 -initial value of the force in absolute coordinates, x a -constant muscle position, u a,0 -initial value of the control signal in absolute coordinates, b, c, d-model coefficients. Out of all those designated in Section 2 dynamic characteristics depicting the dependence of force F on time t as a response to a step change in the control signal from a value u a,0 = 1 V to a value u a,n = 5 V with a stable muscle position x a, a set of 17 characteristics was selected, one for each work point of the object. Then, using the Wolfram Mathematica software, the equation solution was matched to each characteristic represented by the formula, The results of this match for several selected step responses are shown in Figures 15 and 16. On the left, a solid line indicates the actual response of the object and a dashed line indicates the response of the fitted model. However, the right side shows the absolute match error. The results of this match for several selected step responses are shown in Figures 15 and 16. On the left, a solid line indicates the actual response of the object and a dashed line indicates the response of the fitted model. However, the right side shows the absolute match error. and, a final model was obtained describing the behavior of the object and its inverse model described by the dependence in the form of a second-order differential equation with variable coefficients that can be used to build a force moment servo drive. The results of this match for several selected step responses are shown in Figures 15 and 16. On the left, a solid line indicates the actual response of the object and a dashed line indicates the response of the fitted model. However, the right side shows the absolute match error. and, a final model was obtained describing the behavior of the object and its inverse model described by the dependence in the form of a second-order differential equation with variable coefficients that can be used to build a force moment servo drive. As a result of matching the model to the object characteristics, a set of 17 values b, c, d was obtained for each model coefficient F a,0 and for the initial condition. Then, individual values for a given coefficient were approximated by the fifth-degree polynomial of one variable. After substituting the obtained polynomials for Equations and, a final model was obtained describing the behavior of the object and its inverse model described by the dependence in the form of a second-order differential equation with variable coefficients that can be used to build a force moment servo drive... It was considered reasonable to make a quantitative comparison between the developed dynamic model and the static model presented by the relationship F a = g(x a, u a ) being the de facto static characteristics of the object. The two models were verified and compared. For this purpose, inverse models were used to control the object according to the diagram on Figure 17. It was considered reasonable to make a quantitative comparison between the developed dynamic model and the static model presented by the relationship g, a a a F x u being the de facto static characteristics of the object. The two models were verified and compared. For this purpose, inverse models were used to control the object according to the diagram on Figure 17. Figure 17. Schematic diagram of the control system used to verify the models. A set force value was introduced into the dynamic inverse model F a,zad in the absolute coordinates the muscle is to work out, the current value of the force generated by the muscle F a, in absolute coordinates, and the current position of the muscle x a, in absolute coordinates, specifying the working point of the object. The value of force in the coordinates of deviations was determined as the difference between the set value and the actual value F = F a,zad − F a. The model, however, generated a control signal u a = u + u a,0 fed to the control valve. Similarly to the static inverse model, a set force value was introduced F a,zad and current muscle position value x a, and the model generated a control signal u a. In Figures 18 and 19, results of the verification of both developed models are presented. The charts on the left show in red the set value of the force which the muscle was to develop, in green the measured value of the force generated by the muscle while controlling the static model and the blue color is the measured value of the force generated by the muscle when controlling the dynamic model. However, on the right side there are control deviations using both models. In Figure 18, the verification results for the set signal described by the dependence are presented F a,zad = 50 sin t+400 with a stable muscle position x a = 20 mm. Appl. Sci. 2022, 12, x FOR PEER REVIEW 12 of 18 the static model and the blue color is the measured value of the force generated by the muscle when controlling the dynamic model. However, on the right side there are control deviations using both models. In Figure 18, the verification results for the set signal described by the dependence are presented On Figure 19 the verification results for the set signal described by the dependence are presented, = 50sin +200 Analyzing the results of the work of both mathematical models, it was found that they reflect the behavior of the object in a highly satisfactory manner, and it should be assumed that each of them can be successfully used to build a torque servo drive. How- Analyzing the results of the work of both mathematical models, it was found that they reflect the behavior of the object in a highly satisfactory manner, and it should be assumed that each of them can be successfully used to build a torque servo drive. However, a direct comparison of the two models indicates that the dynamic model provides a much better representation of the object. Therefore, the dynamic model, although its development requires much more work than developing a static model, was chosen as the On Figure 19 the verification results for the set signal described by the dependence are presented F a,zad = 50 sin t+200 with a stable muscle position x a = 50 mm. Analyzing the results of the work of both mathematical models, it was found that they reflect the behavior of the object in a highly satisfactory manner, and it should be assumed that each of them can be successfully used to build a torque servo drive. However, a direct comparison of the two models indicates that the dynamic model provides a much better representation of the object. Therefore, the dynamic model, although its development requires much more work than developing a static model, was chosen as the basis for the servo drive moment force discussed in Section 3. Synthesis of Regulation System The servo drive presented in this section is used to work out a given moment of force for a single arm of a parallel manipulator. The locations of all its components are shown in Figure 20. The servo drive consists of two pneumatic muscles. In each of them, one end was immobilized by connecting it to the fixed base through a strain gauge force sensor with a range of ±2 kN. The free ends of the muscles are connected together by the toothed belt driving the toothed wheel with a pitch diameter of 63.66 mm p d , thus creating a toothed belt transmission, by means of which the push-pull movement of the muscles is converted into a rotational movement of the arm. The pitch diameter of the pulley and the length of the muscles allow the servo drive to move in the range rad 3 to rad 3, and the maximum force generated by a single muscle allows you to work out a torque of 25.46 Nm M . The servo drive is also equipped with two pneumatic pressure servo valves controlling the work of the muscles and an absolute angular position sensor with a resolution of 16 bits per revolution, allowing for measuring the angular position with -5 9,58 10 rad accuracy. The diagram also shows an electric servo drive, which was used on the test stand to load the muscle servo drive with a given moment of force. The control system for the torque servo drive has been synthesized. In Figure 21 The servo drive consists of two pneumatic muscles. In each of them, one end was immobilized by connecting it to the fixed base through a strain gauge force sensor with a range of ±2 kN. The free ends of the muscles are connected together by the toothed belt driving the toothed wheel with a pitch diameter of d p = 63.66 mm, thus creating a toothed belt transmission, by means of which the push-pull movement of the muscles is converted into a rotational movement of the arm. The pitch diameter of the pulley and the length of the muscles allow the servo drive to move in the range − 3 rad to 3 rad, and the maximum force generated by a single muscle allows you to work out a torque of M = 25.46 Nm. The servo drive is also equipped with two pneumatic pressure servo valves controlling the work of the muscles and an absolute angular position sensor with a resolution of 16 bits per revolution, allowing for measuring the angular position with ∆ = 9.5810 −5 rad accuracy. The diagram also shows an electric servo drive, which was used on the test stand to load the muscle servo drive with a given moment of force. The control system for the torque servo drive has been synthesized. In Figure 21 a diagram of the control system for the entire servo drive is shown, where: -current value of the angular position of the servo drive, x a,1 -current value of the linear position of the first muscle, x a,2 -current value of the linear position of the second muscle, M-current value of the moment of force generated by the servo drive, F a,1 -current value of the force generated by the first muscle, F a,2 -current value of the force generated by the second muscle, M zad -set value of the moment of force that the servo drive is to generate, F a,1zad -set value of the first muscle strength, F a,2zad -set value of the second muscle strength, F 1 -adjustment error for the first muscle regulator, F 2 -adjustment error for the second muscle regulator, u a,11 -component of the signal controlling the first muscle valve generated by the inverse model, u a,12 -signal component controlling the first muscle valve generated by the PIDn controller, u a,1 -signal controlling the first muscle valve, u a,21 -signal component controlling the second muscle valve generated by the inverse model, u a,22 -the component of the signal controlling the second muscle valve generated by the PIDn controller, u a,2 -signal controlling the second muscle valve. The servo drive control system consists of two independently operating regulating systems, one for each muscle, in which the controlled quantities are the forces generated by the muscles. The signal about the set point value of the servo drive force is converted into the set value of the first muscle force and is entered into the inverse model of the first muscle. In addition, the signal about the current value of the servo drive torque is converted to the current value of the force generated by the first muscle and is introduced into its inverse model. Furthermore, the signal with the current value of the angular position of the servo drive is converted to the current value of the linear position of the first muscle and is entered into its inverse model. Then, the inverse model of the first muscle generates a control signal. Differences between the set point and the actual value of the force generated by the first muscle, resulting from the inaccuracy of the model, are compensated by the PIDn controller. The control signal generated by the controller is added to the signal generated by the inverse model, and the sum of the signals using the D/A converter is fed to the control valve of the first muscle. The PIDn controller settings were manually selected during tests of the servo drive on the test bench. An analogous method of operation was used for the second muscle regulation system. In Figures 22-26, the results of tests of the developed servo drive maintaining the set moment of force are presented. On the left, the set point waveform is shown in red and the actual value waveform is shown in green. On the right, the error of the servo drive is shown in blue. In Figure 22, the servo drive response to a given sinusoidal signal described by the relationship is shown = 5sin M t at an angular position = 0 rad Figure 21. Diagram of the control system for torque servo drive. The servo drive control system consists of two independently operating regulating systems, one for each muscle, in which the controlled quantities are the forces generated by the muscles. The signal about the set point value of the servo drive force is converted into the set value of the first muscle force and is entered into the inverse model of the first muscle. In addition, the signal about the current value of the servo drive torque is converted to the current value of the force generated by the first muscle and is introduced into its inverse model. Furthermore, the signal with the current value of the angular position of the servo drive is converted to the current value of the linear position of the first muscle and is entered into its inverse model. Then, the inverse model of the first muscle generates a control signal. Differences between the set point and the actual value of the force generated by the first muscle, resulting from the inaccuracy of the model, are compensated by the PIDn controller. The control signal generated by the controller is added to the signal generated by the inverse model, and the sum of the signals using the D/A converter is fed to the control valve of the first muscle. The PIDn controller settings were manually selected during tests of the servo drive on the test bench. An analogous method of operation was used for the second muscle regulation system. In Figures 22-26, the results of tests of the developed servo drive maintaining the set moment of force are presented. On the left, the set point waveform is shown in red and the actual value waveform is shown in green. On the right, the error of the servo drive is shown in blue. In Figure 22, the servo drive response to a given sinusoidal signal described by the relationship is shown M = 5 sin t at an angular position = 0 rad. However, in Figure 23, the servo drive response to a given sinusoidal signal described by the relationship is shown M = 5 sin(3t) at an angular position = 0 rad. In Figure 26, the servo drive response to a given rectangular signal with amplitude is shown = 5 Nm Conclusions This article presents the process of designing and building a servo drive consisting of two artificial pneumatic muscles working in opposite directions. The above servo drive is used to generate a given torque of force and is applicable to a parallel manipulator with six degrees of freedom. The mentioned manipulator will be described in more detail in the future. Firstly, we present the construction of the test stand used to determine the characteristics of pneumatic muscles and to test the said servo drive. The methodology of determining families of static characteristics (isobaric, isotonic and isometric) and dynamic characteristics in the form of an object's response to a step change in the value of the control signal is presented. Then, the method of modeling the behavior of the pneumatic muscle through parametric identification is presented. For each step response, the solution of a second-order differential equation with constant coefficients was fitted, and then the individual coefficients were approximated by a polynomial. In this way, a mathematical model was obtained in the form of a solution of a second-order differential equation with coefficients being polynomials of two variables, and an inverse model in the form of a second-order differential equation with coefficients being polynomials of two variables. Then, the synthesis of the control system for the said servo drive is presented. The system consists of two smaller systems, one for each muscle. Each muscle is controlled by its own inverse model. However, due to the imperfections of the model, an additional PID controller was used. The value of the current strength of each muscle, and thus the current moment of force generated by the servo drive, is read from two strain-gauge force sensors. The presented mathematical model allows for broad analysis of the behavior of the pneumatic muscle. Due to the use of approximation methods in creating the model, it In Figure 24 the servo drive response to a given sinusoidal signal described by the relationship is shown M = 5 sin t − 5 at an angular position = /9 rad. However, in Figure 25 the servo drive response to a given sinusoidal signal described by the relationship is shown M = 5 sin(3t) − 5 at an angular position = /9 rad. In Figure 26, the servo drive response to a given rectangular signal with amplitude is shown A = 5 Nm, period T = 3 sek and angular position = 0 rad. Conclusions This article presents the process of designing and building a servo drive consisting of two artificial pneumatic muscles working in opposite directions. The above servo drive is used to generate a given torque of force and is applicable to a parallel manipulator with six degrees of freedom. The mentioned manipulator will be described in more detail in the future. Firstly, we present the construction of the test stand used to determine the characteristics of pneumatic muscles and to test the said servo drive. The methodology of determining families of static characteristics (isobaric, isotonic and isometric) and dynamic characteristics in the form of an object's response to a step change in the value of the control signal is presented. Then, the method of modeling the behavior of the pneumatic muscle through parametric identification is presented. For each step response, the solution of a second-order differential equation with constant coefficients was fitted, and then the individual coefficients were approximated by a polynomial. In this way, a mathematical model was obtained in the form of a solution of a second-order differential equation with coefficients being polynomials of two variables, and an inverse model in the form of a second-order differential equation with coefficients being polynomials of two variables. Then, the synthesis of the control system for the said servo drive is presented. The system consists of two smaller systems, one for each muscle. Each muscle is controlled by its own inverse model. However, due to the imperfections of the model, an additional PID controller was used. The value of the current strength of each muscle, and thus the current moment of force generated by the servo drive, is read from two strain-gauge force sensors. The presented mathematical model allows for broad analysis of the behavior of the pneumatic muscle. Due to the use of approximation methods in creating the model, it correctly maps muscle behavior only in terms of displacement and force changes determined in the presented static and dynamic characteristics. The presented comparison of results shows that the model reflects the behavior of the muscle at sinusoidal trajectories very well. However, in the case of abrupt changes in the control signal, a significant deterioration in mapping is noticeable. Analyzing the presented test results of the developed servomotor of the moment of force, it can be seen that the maximum error occurs when the derivative of the set signal is changed. This is probably the result of friction between the braiding fibers of the muscle and between the braiding fibers and the rubber bladder. The influence of friction forces on positioning accuracy is greatest at the rate of change of the set signal close to zero. It was also noted that for low-frequency signals, apart from the moment of changing the derivative sign of the set signal, the error value changes slightly and is not dependent on the current position of the drive. There was also no strong relationship between the accuracy of the servo drive and its angular position. This is evidenced by the fact that the average error values for signals with the same pulsations are similar. Furthermore, the average values of the error module for signals with the same pulsations do not differ from each other. Despite the above negative features of the pneumatic muscle, the developed servo drive is characterized by a relatively good accuracy of work, which allows it to be analyzed as a drive for parallel manipulators. In addition, its unique features, such as high overload capacity, may be highly beneficial in some applications. |
Notch in the development of thyroid C-cells and the treatment of medullary thyroid cancer. The Notch pathway plays an important role in the normal development of neuroendocrine cells, including the calcitonin producing C-cells of the thyroid. This effect has been elucidated to be mediated through modulation of Achaete-Scute Complex Like 1 (ASCL1), a transcription factor associated with poor prognosis in neuroendocrine cancer. Medullary thyroid cancer (MTC) is one of the neuroendocrine cancers derived from the thyroid C-cells. The Notch pathway has been shown to be inactive in MTC which may lead to altered expression of ASCL1. Artificial induction of Notch signaling in MTC cells can suppress ASCL1 expression, the cell growth as well as hormone secreting potential. Pharmacological activation of the Notch pathway also successfully suppresses the tumor growth in an animal model, which sheds light on the targeted therapy of Notch as a potential treatment for intractable MTC. |
. A 90-year-old cardiopulmonary high-risk patient had to undergo a laparatomy due to a perforated ulcus ventriculi. Postoperatively he developed pulmonary insufficiency due to an atelectasis of the upper right pulmonary region. The clinical situation deteriorated because of dyspnoea and exhaustion. Conservative therapy failed. Atelectasis was overcome by a laryngeal mask airway (LMA) inserted without relaxation and anaesthesia. The LMA enabled CPAP-training for 45 minutes added by inflation of the lung up to a peak airway pressure of 22 cm H2O. Problems and risks of this unconventional use are discussed. Reintubation involving the necessity of relaxation and anaesthesia could be avoided by this unconventional use of a LMA. This case report confirms the good tolerance and easy handling of the LMA. It demonstrates a further application of the LMA, which is not only a new device but a new idea of airway management. |
// checkResetKnownRuleForUnknownCluster tests whether 'reset vote' REST API endpoint works correctly for unknown rule and unknown cluster
func checkResetKnownRuleForUnknownCluster() {
testRuleVoteAPIendpoint(unknownClusters, knownRules,
"Test whether 'reset vote' REST API endpoint works correctly for known rule and unknown cluster",
constructURLResetVoteForRule, checkItemNotFound)
} |
/*!
* V4Fire Client Core
* https://github.com/V4Fire/Client
*
* Released under the MIT license
* https://github.com/V4Fire/Client/blob/master/LICENSE
*/
/**
* [[include:base/b-dynamic-page/README.md]]
* @packageDocumentation
*/
import symbolGenerator from 'core/symbol';
import addEmitter from 'core/cache/decorators/helpers/add-emitter';
import { Cache, RestrictedCache, AbstractCache } from 'core/cache';
import SyncPromise from 'core/promise/sync';
import type { EventEmitterLike } from 'core/async';
import iBlock from 'super/i-block/i-block';
import iDynamicPage, {
component,
prop,
system,
computed,
watch,
UnsafeGetter,
ComponentStatus,
InitLoadOptions
} from 'super/i-dynamic-page/i-dynamic-page';
import type {
Include,
Exclude,
iDynamicPageEl,
KeepAliveStrategy,
UnsafeBDynamicPage
} from 'base/b-dynamic-page/interface';
export * from 'super/i-data/i-data';
export * from 'base/b-dynamic-page/interface';
export const
$$ = symbolGenerator();
/**
* Component to dynamically load page components.
* Basically, it uses with a router.
*/
@component({
inheritMods: false,
defaultProps: false
})
export default class bDynamicPage extends iDynamicPage {
@prop({forceDefault: true})
override readonly selfDispatching: boolean = true;
/**
* Initial component name to load
*/
@prop({type: String, required: false})
readonly pageProp?: string;
/**
* Active component name to load
* @see [[bDynamicPage.pageProp]]
*/
@system((o) => o.sync.link())
page?: string;
/**
* If true, when switching from one page to another, the old page is stored within a cache by its name.
* When occur switching back to this page, it will be restored.
* It helps to optimize switching between pages but grows memory using.
*
* Notice, when a page is switching, it will be deactivated by invoking `deactivate`.
* When the page is restoring, it will be activated by invoking `activate`.
*/
@prop(Boolean)
readonly keepAlive: boolean = false;
/**
* The maximum number of pages within the global `keepAlive` cache
*/
@prop(Number)
readonly keepAliveSize: number = 10;
/**
* A dictionary of `keepAlive` caches.
* The keys represent cache groups (by default uses `global`).
*/
@system<bDynamicPage>((o) => o.sync.link('keepAliveSize', (size: number) => ({
...o.keepAliveCache,
global: o.addClearListenersToCache(
size > 0 ?
new RestrictedCache<iDynamicPageEl>(size) :
new Cache<iDynamicPageEl>()
)
})))
keepAliveCache!: Dictionary<AbstractCache<iDynamicPageEl>>;
/**
* A predicate to include pages to the `keepAlive` caching: if not specified, will be cached all loaded pages.
* It can be defined as:
*
* 1. a component name (or a list of names);
* 2. a regular expression;
* 3. a function that takes a component name and returns `true` (include), `false` (does not include),
* a string key to cache (it uses instead of a component name),
* or a special object with information of the used cache strategy.
*/
@prop({
type: [String, Array, RegExp, Function],
required: false
})
readonly include?: Include;
/**
* A predicate to exclude some pages from the `keepAlive` caching.
* It can be defined as a component name (or a list of names), regular expression,
* or a function that takes a component name and returns `true` (exclude) or `false` (does not exclude).
*/
@prop({
type: [String, Array, RegExp, Function],
required: false
})
readonly exclude?: Exclude;
/**
* Link to an event emitter to listen to events of the page switching
*/
@prop({type: Object, required: false})
readonly emitter?: EventEmitterLike;
/**
* Event name of the page switching
*/
@prop({
type: String,
required: false,
forceDefault: true
})
readonly event?: string = 'setRoute';
/**
* Function to extract a component name to load from the caught event object
*/
@prop({
type: [Function, Array],
default: (e) => e != null ? (e.meta.component ?? e.name) : undefined,
forceDefault: true
})
readonly eventConverter!: CanArray<Function>;
/**
* Link to the loaded page component
*/
@computed({cache: false, dependencies: ['page']})
get component(): CanPromise<iDynamicPage> {
const
c = this.$refs.component;
const getComponent = () => {
const
c = this.$refs.component!;
if (Object.isArray(c)) {
return c[0];
}
return c;
};
return c != null && (!Object.isArray(c) || c.length > 0) ?
getComponent() :
this.waitRef('component').then(getComponent);
}
override get unsafe(): UnsafeGetter<UnsafeBDynamicPage<this>> {
return Object.cast(this);
}
protected override readonly componentStatusStore: ComponentStatus = 'ready';
protected override readonly $refs!: {
component?: iDynamicPage[];
};
/**
* True if the current page is taken from a cache
*/
@system()
protected pageTakenFromCache: boolean = false;
/**
* Handler: page has been changed
*/
@system()
protected onPageChange?: Function;
/**
* Iterator of the rendering loop (it uses with `asyncRender`)
*/
protected get renderIterator(): CanPromise<number> {
return SyncPromise.resolve(Infinity);
}
override initLoad(): Promise<void> {
return Promise.resolve();
}
/**
* Reloads the loaded page component
*/
override async reload(params?: InitLoadOptions): Promise<void> {
const component = await this.component;
return component.reload(params);
}
/**
* Filter of the rendering loop (it uses with `asyncRender`)
*/
protected renderFilter(): CanPromise<boolean> {
if (this.lfc.isBeforeCreate()) {
return true;
}
const
{unsafe, route} = this;
return new SyncPromise((r) => {
this.onPageChange = onPageChange(r, this.route);
});
function onPageChange(
resolve: Function,
currentRoute: typeof route
): AnyFunction {
return (newPage: CanUndef<string>, currentPage: CanUndef<string>) => {
unsafe.pageTakenFromCache = false;
const componentRef = unsafe.$refs.component;
componentRef?.pop();
const
currentPageEl = unsafe.block?.element<iDynamicPageEl>('component'),
currentPageComponent = currentPageEl?.component?.unsafe;
if (currentPageEl != null) {
if (currentPageComponent != null) {
const
currentPageStrategy = unsafe.getKeepAliveStrategy(currentPage, currentRoute);
if (currentPageStrategy.isLoopback) {
currentPageComponent.$destroy();
} else {
currentPageStrategy.add(currentPageEl);
currentPageComponent.deactivate();
}
}
currentPageEl.remove();
}
const
newPageStrategy = unsafe.getKeepAliveStrategy(newPage),
pageElFromCache = newPageStrategy.get();
if (pageElFromCache == null) {
const handler = () => {
if (!newPageStrategy.isLoopback) {
return SyncPromise.resolve(unsafe.component).then((c) => c.activate(true));
}
};
unsafe.localEmitter.once('asyncRenderChunkComplete', handler, {
label: $$.renderFilter
});
} else {
const
pageComponentFromCache = pageElFromCache.component;
if (pageComponentFromCache != null) {
pageComponentFromCache.activate();
unsafe.$el?.append(pageElFromCache);
pageComponentFromCache.emit('mounted', pageElFromCache);
componentRef?.push(pageComponentFromCache);
unsafe.pageTakenFromCache = true;
} else {
newPageStrategy.remove();
}
}
resolve(true);
};
}
}
/**
* Returns a `keepAlive` cache strategy for the specified page
*
* @param page
* @param [route] - link to an application route object
*/
protected getKeepAliveStrategy(page: CanUndef<string>, route: this['route'] = this.route): KeepAliveStrategy {
const loopbackStrategy = {
isLoopback: true,
has: () => false,
get: () => undefined,
add: (page) => page,
remove: () => undefined
};
if (!this.keepAlive || page == null) {
return loopbackStrategy;
}
const
{exclude, include} = this;
if (exclude != null) {
if (Object.isFunction(exclude)) {
if (Object.isTruly(exclude(page, route, this))) {
return loopbackStrategy;
}
} else if (Object.isRegExp(exclude) ? exclude.test(page) : Array.concat([], exclude).includes(page)) {
return loopbackStrategy;
}
}
let
cacheKey = page;
const
globalCache = this.keepAliveCache.global!;
const globalStrategy = {
isLoopback: false,
has: () => globalCache.has(cacheKey),
get: () => globalCache.get(cacheKey),
add: (page) => globalCache.set(cacheKey, page),
remove: () => globalCache.remove(cacheKey)
};
if (include != null) {
if (Object.isFunction(include)) {
const
res = include(page, route, this);
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
if (res == null || res === false) {
return loopbackStrategy;
}
if (Object.isString(res) || res === true) {
cacheKey = res === true ? page : res;
return globalStrategy;
}
const cache = this.keepAliveCache[res.cacheGroup] ?? this.addClearListenersToCache(res.createCache());
this.keepAliveCache[res.cacheGroup] = cache;
return {
isLoopback: false,
has: () => cache.has(res.cacheKey),
get: () => cache.get(res.cacheKey),
add: (page) => cache.set(res.cacheKey, page),
remove: () => cache.remove(res.cacheKey)
};
}
if (Object.isRegExp(include) ? !include.test(page) : !Array.concat([], include).includes(page)) {
return loopbackStrategy;
}
}
return globalStrategy;
}
protected override initBaseAPI(): void {
super.initBaseAPI();
this.addClearListenersToCache = this.instance.addClearListenersToCache.bind(this);
}
/**
* Wraps the specified cache object and returns a wrapper.
* The method adds listeners to destroy unused pages from the cache.
*
* @param cache
*/
protected addClearListenersToCache<T extends AbstractCache<iDynamicPageEl>>(cache: T): T {
const
wrappedCache = addEmitter<AbstractCache<iDynamicPageEl>>(cache);
let
instanceCache: WeakMap<iDynamicPageEl, number> = new WeakMap();
wrappedCache.subscribe('set', cache, changeCountInMap(0, 1));
wrappedCache.subscribe('remove', cache, changeCountInMap(1, -1));
wrappedCache.subscribe('remove', cache, ({result}) => {
if (result == null || (instanceCache.get(result) ?? 0) > 0) {
return;
}
result.component?.unsafe.$destroy();
});
wrappedCache.subscribe('clear', cache, ({result}) => {
result.forEach((el) => el.component?.unsafe.$destroy());
instanceCache = new WeakMap();
});
return cache;
function changeCountInMap(def: number, delta: number): AnyFunction {
return ({result}: {result: CanUndef<iDynamicPageEl>}) => {
if (result == null) {
return;
}
const count = instanceCache.get(result) ?? def;
instanceCache.set(result, count + delta);
};
}
}
/**
* Synchronization for the `emitter` prop
*/
@watch('emitter')
@watch({path: 'event', immediate: true})
protected syncEmitterWatcher(): void {
const
{async: $a} = this;
const
group = {group: 'emitter'};
$a
.clearAll(group);
if (this.event != null) {
$a.on(this.emitter ?? this.$root, this.event, (component, e) => {
if (component != null && !((<Dictionary>component).instance instanceof iBlock)) {
e = component;
}
let
newPage = e;
if (Object.isTruly(this.eventConverter)) {
newPage = Array.concat([], this.eventConverter).reduce((res, fn) => fn.call(this, res, this.page), newPage);
}
if (newPage == null || Object.isString(newPage)) {
this.page = <string>newPage;
}
}, group);
}
}
/**
* Synchronization for the `page` field
*/
@watch({path: 'page', immediate: true})
protected syncPageWatcher(page: CanUndef<string>, oldPage: CanUndef<string>): void {
if (this.onPageChange == null) {
const
label = {label: $$.syncPageWatcher};
this.watch('onPageChange', {...label, immediate: true}, () => {
if (this.onPageChange == null) {
return;
}
this.onPageChange(page, oldPage);
this.async.terminateWorker(label);
});
} else {
this.onPageChange(page, oldPage);
}
}
protected override initModEvents(): void {
super.initModEvents();
this.sync.mod('hidden', 'page', (v) => !Object.isTruly(v));
}
}
|
Supergirl's new showrunners are beginning to open up about what's to come in the third season of The CW series - confirming that the fate of Mon-El will figure prominently into the show's next storyline.
The relationship between Supergirl and Mon-El, a refugee from the planet Daxam, was the driving narrative force of Supergirl season 2. What started out as a fun "fish out of water" dynamic eventually turned romantic, as the chemistry between the two was undeniable. Mon-El was forced to depart Earth at the end of the season, and his spacecraft was swallowed up by a wormhole, his ultimate destination unclear.
QUELLER: Where Mon-El is and how he comes back is the central mystery of our season.
ROVNER: We wanted to keep Alura’s presence on the show because it really connects Kara to Krypton and her roots and what it meant to see her family and her planet destroyed. It’s an emotional grounding that’s always important.
QUELLER: The theme of this season is what does it mean to be human? Kara is going to be especially grappling with that, and all of the characters are. The loss of her family and Krypton impacts that a lot. The mother-daughter relationship is something we still want to explore in whatever fashion.
The producers both sidestep speculation that Mon-El could potentially encounter Alura in the Phantom Zone. In Supergirl's iteration of the sci-fi prison dimension, Alura was a Kryptonian judge who sent criminals there to serve out horrific sentences in exile. The notion that Alura somehow survived Krypton's destruction by escaping to the Phantom Zone is an interesting one, and seeing Mon-El interact with, essentially, his girlfriend's mom while trying to survive a gauntlet of alien villains would certainly be an interesting angle for the show to pursue. Whether Durance's casting signals an increased role for Alura going forward is unclear, and the new showrunners are definitely not tipping their hand.
Supergirl returns for season 3 Monday October 9 at 8pm on The CW. |
NEW DELHI (REUTERS) - Thousands of Hindu monks and activists linked to Prime Minister Narendra Modi's Hindu nationalist party gathered in the Indian capital New Delhi on Sunday (Dec 9) to urge the government to build a temple at the ruins of a 16th century mosque.
The calls for a new temple in the northern town of Ayodhya come ahead of an election that must be held by May, when Mr Modi will seek a second term.
Most analysts expect his Bharatiya Janata Party (BJP) to fare far less well than it did in 2014, and critics often accuse the party of using communal issues to whip up support.
For the past three decades, the BJP and Hindu outfits associated with it have resurrected the Ayodhya controversy before elections, stoking tensions between Hindus and a Muslim minority who make up 14 per cent of India's 1.3 billion people.
In 1992, a militant Hindu mob tore down the centuries-old mosque in Ayodhya, triggering riots that killed about 2,000 people across India in one of the worst outbreaks of communal violence since Partition in 1947.
Most Hindus believe the warrior-god Ram was born in Ayodhya, and Hindu groups insist that there was a temple there before a mosque was built by a Muslim ruler in 1528.
Hindu monks want the government to introduce a legislation to pave the way for a temple, said Mr Sharad Sharma, spokesman for the Vishwa Hindu Parishad (VHP), or the World Hindu Council, a group that has close ties with the BJP.
"It's an issue of faith for millions of Hindus who cannot endlessly wait for a temple at the birthplace of Lord Ram," he said.
Both Hindu and Muslim groups have petitioned the Supreme Court to help resolve the issue. The top court has sought more time to give its verdict.
The BJP, VHP and their parent movement, the Rashtriya Swayamsevak Sangh, have asked the government to issue an executive order to build a temple, bypassing the Supreme Court.
Late last month, tens of thousands of Hindu seers, their followers and political activists had gathered in Ayodhya to press for their demand for a temple.
Ahead of Sunday's rally, police stepped up security, with organisers expecting hundreds of thousands to participate.
Uttar Pradesh, the state where Ayodha is located, has suffered repeated outbreaks of communal violence since Mr Yogi Adityanath, a BJP hardliner seen as a potential successor to Mr Modi, became chief minister last year.
Earlier this month, a senior police officer and another man were killed in violent protests in the state over reports that a cow, an animal sacred in Hindu culture, had been slaughtered. |
phylogatR: Phylogeographic data aggregation and repurposing Abstract Patterns of genetic diversity within species contain information the history of that species, including how they have responded to historical climate change and how easily the organism is able to disperse across its habitat. More than 40,000 phylogeographic and population genetic investigations have been published to date, each collecting genetic data from hundreds of samples. Despite these millions of data points, metaanalyses are challenging because the synthesis of results across hundreds of studies, each using different methods and forms of analysis, is a daunting and timeconsuming task. It is more efficient to proceed by repurposing existing data and using automated data analysis. To facilitate data repurposing, we created a database (phylogatR) that aggregates data from different sources and conducts automated multiple sequence alignments and data curation to provide users with nearly readytoanalyse sets of data for thousands of species. Two types of scientific research will be made easier by phylogatR: large metaanalyses of thousands of species that can address classic questions in evolutionary biology and ecology, and student or citizen science based investigations that will introduce a broad range of people to the analysis of genetic data. phylogatR enhances the value of existing data via the creation of software and webbased tools that enable these data to be recycled and reanalysed and increase accessibility to big data for research laboratories and classroom instructors with limited computational expertise and resources. | 2831 PELLETIER ET aL. () in any analysis that requires geospatial information. For example, Marques et al. found that only 7% of GenBank accessions of barcoding genes, such as cytochrome oxidase I (COI), include latitude and longitude, and only 18% list museum catalogue information that can be used to link the sequence to a particular specimen. Similarly, Gratton et al. found that only 6.2% of GenBank tetrapod accessions include locality data. Overall, it has been suggested that 90% of biodiversity data remain unavailable for further use, and that missing geographic information was the most significant factor limiting use (). These "missing" locality data are particularly problematic when it is understood that voucher specimens from thousands of investigations are deposited into natural history collections, and that metadata associated with these vouchers, including in many cases georeferenced locality data, are currently available in other databases such as the Global Biodiversity Information Facility (GBIF). Spatial information is extremely important to the biological sciences. For example, more than 22,000 published papers use some variant of the word "phylogeo*" in their title or abstract, in addition to more than 22,000 that use "population genetics" (https://www. webof scien ce.com/wos/woscc/ basic -search, 9 September 2021). Given that researchers in each of these disciplines routinely collect sequence data from hundreds of samples (), the existence of georeferenced data in databases such as GenBank and Barcode of Life Database (BOLD) can enable novel comparative analyses. Large-scale meta-analyses offer a promising strategy to understand the broad-scale effects of geography, geology, and climate change on species distributions (Guralnick & Hill, 2009) and hold immense potential for insight (Dawson, 2014;). However, the considerable variation in study design and statistical analyses used across studies render meta-analysis in population genetics and phylogeography difficult (). A more productive strategy is the repurposing of data (;;), where data from previously published work are reanalysed in large groups to extract insight about global processes. Combining similar types of data from multiple studies and then reanalysing these data under a common framework has the power to elucidate factors that drive evolution on both small and large scales. One example of the potential of data repurposing is found in Miraldo et al.. These researchers manually assembled mitochondrial DNA (mtDNA) sequences from almost 2000 species of terrestrial mammals and amphibians and used these data to document that genetic diversity is higher in the tropics and lower where human populations are high. This analysis required a considerable amount of effort, as data were mined by downloading GenBank and BOLD accessions that contained geographic coordinates or by emailing researchers to ask for their data. The data curation in Miraldo et al. was manual, which places an upper limit on the number of species that can be included in the analysis. More recent investigations have used automated computational pipelines to increase the efficiency of exploring population genetics and species limits on large scales in several ways. For example, Pelletier and Carstens used a Python script to assemble a database of over 8000 species of plants, fungi, and animals, analysed these data using R, and demonstrated that genetic structure within species was higher in northern latitudes and that the size of a species range was an important predictor of genetic structure. Existing macrogenetic studies demonstrate the need for global analyses of genetic data. Large-scale biodiversity data enhances conservation efforts ) and mapping the tree of life (Folk & Siniscalchi, 2021). There is a strong push for making data publicly available () and repurposing these data increases their value (;). It opens the doors for reexamining classic questions on larger scales, but also moves forward the fields of population genetics, phylogeography, and systematics by increasing the power to tease apart the complex processes that shape biodiversity patterns (;Papadopoulou & Knowles, 2016). Furthermore, these field are increasingly integrating data types (e.g., environmental data layers, morphological measurements, life history characteristics) with large-scale genetic and geographic data, which will not only enhance our understanding of the ecological processes that contribute to evolutionary change, but also provide applicable information for conservation purposes. In order to facilitate phylogeographic analyses on the largest possible scale (i.e., continental or global) from thousands of species, we have developed software that parses accessions from several repositories of geographic and genetic information, organizes them into a common framework under a taxonomic hierarchy, and produces multiple sequence alignments that are ready to be analysed. Our goal was to develop a database that is user-friendly and accessible to researchers and instructors without much training in computational biology whose efforts are aimed at conducting studies on specific taxonomic groups and/or biogeographic regions. This effort contributes to Findability, Accessibility, Interoperability, and Reusability (FAIR) initiatives that aim to improve the infrastructure of open-data science (;). The database, phylogatR (phylogeographic data aggregation and repurposing) is freely available via the Ohio Supercomputer Center (OSC), along with several R scripts to aid in data curation, analysis, and education. | phy logatR PIPELINE Data for our aggregator comes primarily from three large databases. GBIF (https://www.gbif.org/), an open-source database funded and supported since 1999 by a large group of government agencies worldwide. It contains over two billion occurrence records from over 6 million organisms across the globe. NCBI GenBank, a collection of DNA sequence data from three organizations: DNA DataBank of Japan (DDBJ), the European Nucleotide Archive (ENA), and GenBank at NCBI, (https://www.ncbi.nlm.nih.gov/genba nk/), and BOLD http://www.bolds ystems.org/index.php), developed by the Center for Biodiversity Genomics in Canada, contains barcode data for almost 600,000 species. Pipeline choices were made to minimize data duplication and loss, conduct preliminary cleaning and alignment, and to return results to users in a manner that is transparent and enables them to conduct additional curation as needed. Scripts for data aggregation and cleaning are available in our GitHub repository (https://github.com/OSC/phylo gatr-web). A schematic overview of the pipeline is available in Figure 1. | Data aggregation Data were downloaded from GBIF that included coordinates, excluding those flagged as suspicious, contained sequence accessions, and a full binomial name. We only included occurrences in which Basis of record was either PreservedSpecimen, MaterialSample, HumanObservation, or MachineObservation. The entire GenBank nucleotide sequence database was downloaded using the rsync file transfer program. Occurrences and DNA sequences that contained the same GenBank accession were matched and curated ( Figure 2). For each occurrence, sequence accessions and geographic coordinates were checked for duplication. First, all coordinates were rounded to two decimals to overcome differences in coordinates that come from the same sample but appear different due to rounding. If coordinates were different, but had the same GenBank accession, we assumed duplicates represent different individuals uploaded to GenBank as a single haplotype. In this case, all occurrences were kept, but each was flagged with "g" so that users can explore these accessions if necessary. If coordinates were the same, we checked the basis of record. If these were different, we kept only the highest precedence for an observation (from high to low: preserved specimen, material sample, human observation, machine observation), with the assumption that these sequences with the same GenBank accession and geographic coordinates was a different observation of the same specimen, and each was flagged with "b". If basis of record was the same, we checked the species name. If different, we assumed a change in taxonomy and kept the most recent occurrence and flagged it with "s". If the species name was also the same, we checked the event date. If different, we assume the duplicates represent different individuals, and they were flagged with "d", again to allow further investigation by users. For any duplicates that had the same GenBank accession, geographic coordinates, species name, and event date, but different GBIF occurrences, we retained only the most recent occurrence and flagged with "m". Next, the BOLD database was scraped to obtain taxon names and data were pulled by looping through 500 taxa at a time using the public API. All available data were downloaded and curated ( Figure 3). Records without coordinates were removed. Those with GenBank or GBIF accessions already in our database were removed. We standardized gene and species names to the best of our ability. For example, we assigned a common gene symbol for commonly sequenced genes that are often represented by more than one symbol (Table S1), such as COI for cytochrome oxidase I that is also often depicted as COXI or CO1. In some cases, genes were identified with a different gene symbol but the same gene name. These were left alone assuming that they represent different F I G U R E 1 Overview of phylogatR pipeline regions of the same gene, such as the malic-enzyme that contains alignments for ME1 and ME2. While we expect few instances where these gene symbols are incorrect, we advise users to scan the list of genes in their dataset before use. Species names were limited to binomial nomenclature, though those with subspecies identifiers are listed in the associated metadata. GBIF taxonomy was retained when it did not match the GenBank taxonomy and these are also flagged in the associated metadata. We recommend individual users to capitalize on available tools for checking taxonomy when appropriate for their needs. For example, the R package taxize (Chamberlain & Szcs, 2013) | Multiple sequence alignment Every sequence is identified by species, gene, GenBank accession, GBIF ID, and/or BOLD ID. All sequences were concatenated based on identical gene sequence symbol and species name. We conducted multiple sequence alignments for all genes where there were at least three sequences within a species on a species-by-species basis. First, the default MAFFT version 7 parameters were used. Sequence alignments were checked by eye for 10 families (117 species-level alignments) that were previously determined to require postalignment adjustments (). Several alignments were found to have large sequence gaps at the ends of the alignment, while others contained unwanted sequences (e.g., parasitic sequences that have been named as the host species). After this first round of checking, only eight alignments needed trimming and three F I G U R E 2 Data curation steps for GBIF and GenBank data needed sequences removed (or reverse complimented). We updated the MAFFT settings to include the adjustdirection and inputorder features. Then trimAl version 1.2 was used to clean the alignments. After several iterations of parameter settings, we set resoverlap to 0.85, seqoverlap to 50, and gt to 0.15. Identical sequences (same GenBank accession) with multiple GBIF occurrences that have been deemed not duplicates ( Figure 2) are repeated for the final sequence alignment. While these settings appear to eliminate most issues that arise from within species sequence alignments, researchers should screen their data for outliers before data analysis. We suspect these issues to be minimal, and when dealing with large datasets a small amount of noise is not expected to alter results (see Section 3 below). | Data The database currently contains 87,852 species and 102,268 sequence alignments. The average number of alignments per species is 1.2 and the average number of sequences per alignment is 25.8. The database includes species from Animalia, Plantae, Fungi, Chromista, and Protozoa. Out of the almost two billion GBIF occurrences, 1.6 billion contained geographic coordinates and matched our search filters. We retained about 10.5 million with genetic accessions to run through our pipeline, the majority of which were removed during data cleaning steps. After downloading just over 1.3 million records from BOLD, about 500,000 sequences were retained which included geographic coordinates, valid IDs, and were not duplicates. The final database contains over 2.6 million records. Most of the data are from mitochondrial and chloroplast DNA, a result that reflects the key role of genes from these organellar genomes to disciplines such as phylogeography (). After merging genes with different known gene symbols, our database contains a total of 1988 genes. Note that phylogatR has been designed to be expandable and will grow by rerunning the pipeline each month to add new accessions from GenBank, GBIF, BOLD, and potentially other sources for at least 10 years, and updates and fixes will be made as identified. When data are downloaded from phylogatR (zip and tarball formats are available), all data are nested within directories that are structured by taxonomic rank. Each species folder consists of an unaligned fasta file (extension.fa) and an aligned fasta file (extension. afa) for each locus available for that species. Each species folder F I G U R E 3 Data curation steps for BOLD data also contains an occurrence file that contains the original database accessions and geographic coordinates in decimal form, as well as any appropriate flags. The root folder contains information for each sequence alignment (in the genes.txt file), including the number of sequences before and after data cleaning steps, taxonomic information, and flags those that may contain inconsistencies in species names across databases. The database is available at https://phylo gatr.org/. An indicated shortcoming of current biodiversity data aggregators is the lack of back and forth communication between primary producers of data, data aggregators, and end-users. We provide a means for submitting feedback and suggesting edits and data flags via an email address (Phylogatr@lists. osu.edu) that is reviewed by the team of biologists and computer programmers. We also include R tutorials for checking data before formal analyses begin. | EMPIRIC AL E X AMPLE We explored how genetic diversity is correlated with range size in almost 80,000 species and over 2 million sequences from the database (Table 1). Many measures of genetic diversity exist and can be used to understand different aspects about an individual, population, species, or community. By looking at patterns in genetic diversity, inferences can be made regarding evolutionary processes like migration, selection, and drift, and is often a first step in most genetic studies. Several measures of genetic diversity exist that capture different aspects of the data, such as estimates of the number of segregating sites (S), the number of haplotypes (H), and the mean per-site pairwise number of nucleotide differences between sequences (). It is expected that widespread species would have higher genetic diversity due to their (presumed) larger population sizes (). Custom R version 4.0.4 (R Core Team, 2020) scripts were used to analyse data from several taxonomic groups by downloading sequence alignments by taxonomic group from the phylo-gatR database between 18 May 2021 and 11 June 2021. First, species names were scanned using the genes.txt files to find typos in species names, as well as other abnormalities in naming patterns. In several groups there were some nonbinomial naming patterns (. In these instances, taxonomic expertise will be needed in deciding whether to treat these as different species. In one case there seemed to be an indication of a lateral gene transfer in Tracheophyta, which would need to be treated with caution (Alloteropsis semialata PCK 1P1 LGT:C and PPC 1P3 LGT:M). In another case, there was a misspelling in a name that we have updated in the database. This is an area of work where we are seeking user input but overall, the level of errors detected based on our exploration of these data are quite low, and easily checked by eye. The regression analysis below was carried out on the data with and without these abnormalities removed, and none had a significant impact on the results. Nucleotide diversity () was calculated for each sequence alignment using the nuc.div function from the R package pegas. Geographic coordinates from each species were used to estimate the range of the species, though this only represents the sampling range of a species. It is important to note that when interpreting these data, they may not encompass the full range of a species, as indicated by the large number of GBIF occurrences that do not include sequence data. Scatter plots of area and were created for each taxonomic group using the package ggplot2 to examine the data visually for outliers (Table S3 and Supporting Information Figures). When outliers were detected by area, online distribution maps were compared to the geographic coordinates from the data set. In all these cases (58 total), the coordinates fell within the known published distributions. In cases where outliers were detected by (23 total), the geographic coordinates were also checked according to the published distributions. Again, no points fell outside the published distributions. These sequence alignments were also checked for possible mis-identified sequences or poorly aligned sequences. In most cases, a sequence or two slipped through our data cleaning steps and probably does not belong to either that species or locus and therefor produced a poor sequence alignment. The regression analysis below was conducted with and without the and area outliers removed, and none had a significant impact on the results (Table S3; https://phylo gatr.org/ asset s/modul es/phylo gatR_genet ic-diver sity.html). Several other sequence alignments from our initial download were not included in the following analyses (Table S4). These alignments produced NA values for (1050 total) and were explored further. In the majority (~95%) of cases, different portions of a given gene were sequenced such that there was no overlap in the middle of the sequence. In these instances, it is incumbent on the user to determine whether this level of missing data is appropriate for their analysis. The remaining cases were attributed to poor sequence alignments, usually due to just one sequence passing through our data cleaning steps. As such cases are discovered, alignments will be manually curated and updated in the database. As bad alignments are discovered, user input via the help documentation is encouraged. As updates become necessary, we will capture all manual corrections in a log file akin to a write-ahead-log. This log will hold all the records before and after any manual edit, including the date of change, and sql commands executed to make the change. This information will then be parsed and added to the website, including user flags that have not been incorporated into the database. Regression analysis was conducted to determine whether the size of geographic sampling could explain variation in genetic diversity using the lm function in R. Since we conducted 31 regression analyses, a Bonferroni correction was used to adjust our p-value (.05/31 = 0.0016). Ten out of the 31 tests were significant ( were significant. In the insects, the Hymenoptera, Coleoptera, Lepidoptera, and Orthoptera, were significant. Porifera was significant, along with two plant groups (Rhodophyta and Tracheophyta). Only Porifera stands out as having a particularly high R-square value, while the others, while significant, were quite low. These numbers for Porifera may be driven by one species with particularly high and area, however, when this species is removed, the relationship is still significant (p <.0001) and R-square drops from.78 to.43 (Table S3; Supporting Information Figures). Otherwise, no patterns emerge as far as which taxonomic groups would be more likely to display a relationship between area and, or whether being winged, terrestrial, etc., for example, would contribute to an increase or decrease in genetic diversity, given the size of a species geographic distribution. There are probably a combination of factors that contribute to levels of genetic diversity within a species. It might be useful to explore how sampling effort influences the measures of genetic diversity we can estimate based on available data (i.e., does genetic sampling accurately reflect the distribution of a species?). This analysis is only a first step towards understanding how life history and dispersal ability may contribute to genetic variation and population structure globally. Two plant groups have relatively high values for (e.g., Lycopodiophyta, Pinophyta). This suggests these groups are worth further exploration, as either they may be in need of database updates to reflect taxonomic revisions and misidentifications, or these groups may harbour a high number of cryptic species (). Additionally, though still highlighting the need for further work, this could be a sampling issue as these groups had lower species representation in the database and we might be misrepresenting the average. Future studies could explore how sampling effort of species numbers influences average measures of genetic diversity such as ours. Documenting global levels of genetic diversity, an important measure of biodiversity, can serve as a baseline for detecting rapid changes, or loss of diversity, due to climate change (). Furthermore, measures of genetic variation are often used to assess the ability of a species or population to respond to environmental (climate, habitat, biotic) changes (Frankham, 2005;Hoffmann & Sgr, 2011); large-scale analyses such as this, allow for targeting individual species that might be at a higher risk for extinction (;) and for identifying species attributes that contribute to higher levels of genetic diversity (). While 16.8 Note: Downloads were conducted by the lowest taxonomic group listed in the table. The number of species and alignments are those that were included in the data analysis pipeline before and after checking for binomial nomenclature and genetic or geographic outliers. TA B L E 1 (Continued) information that can be gained via geographic coordinates (e.g., climate layers) is necessary to consider demographic history and environmental variables for implementing effective conservation strategies (Teixeira & Huber, 2021). A useful secondary product of the analysis described above is the opportunity to explore outliers and inconsistencies in the database. We identified alignments (1.2% of the data) that could potentially bias our results. While in our case there is sufficient data that a small amount of noise caused by outliers and inconsistent species names did not influence the results (Tables S2-S4), this may not be universally true for all analyses. We had 1,511,882 occurrences with flags (Table S5). Of those that were flagged, the majority of these were flag "g" (50%), where the GenBank accessions are the same, but geographic coordinates are different, followed by flag "d" (18%), where GenkBank accession, geographic coordinates, basis of record, and species name are the same, but the event date is different, suggesting many historical DNA sequences had been uploaded to GenBank as haplotypes. We recommend those uploading data to these databases refrain from uploading haplotypic data and include DNA sequences from all individuals or indicating on GBIF that data from GenBank represent haplotypic data. can be used to facilitate screening the data. The exploration of these data began in a bioinformatics course that aimed to introduce students to multiple sequence alignments, highlight the value of estimating genetic diversity and using opensource databases, and learn the structure of creating loops. This work was completed due to efforts from one of these undergraduate researchers (S. Crouch), who led the analysis of these data for this empirical example. The datasets that can be generated via phylogatR will contribute to the ongoing development of resources that will expose students to real data and computational methods in the classroom. Incorporating authentic research into classroom instruction provides inclusive learning experiences for all students and leads to better learning outcomes (). The additional benefit of phylogatR is that concepts in evolution and ecology can be taught with real data at no cost, other than computer access. The phylogatR website contains teacher resources, which include teaching modules and associated instructor notes, with intent to increase these resources in the future. | CON CLUS IONS Identifying the evolutionary and environmental processes that have influenced a single lineage is an ongoing practice for evolutionary biologists, but a true understanding of these processes will require that we will make fundamental contributions to understanding global patterns of genetic diversity that will have important implications to conservation management and species discovery (see Table 3). While single-locus data has its limitations in making inferences about historical demography (), DNA barcoding, or the use of other single-locus DNA markers, has provided tremendous insight into identifying evolutionary significant units and providing information on species in further need of exploration (;Len-Tapia, 2021;;;). These data are particularly helpful when aiming to explore broad-scale patterns such as those on a continental scale () or across species (), especially for a large number of taxonomic groups, as demonstrated here. Studies using data from our initial data aggregation pipelines have further demonstrated the utility of single-locus large-scale studies that also utilize data layers from other sources. Parsons et al. explore cryptic diversity in mammals using molecular species delimitation methods for single-locus data in conjunction with natural history and environmental data for over 4000 species. They found that hundreds of mammal species are still probably undescribed and that these are mostly small-bodied taxa with large ranges (scripts for this project can be found at https://github. com/parso ns463/ Hidde nDive rsity). Our brief empirical example allowed us to document outliers in the data and search for poor sequence alignments, as we will continue to improve the database and data curation steps. We will continue to make recommendations and supply users with guidance in data checking before analysis. We encourage continued natural history work to better populate biodiversity databases as the benefits of publicly available data are numerous and experts are needed to correct database errors and decide where data deficiencies lie (;). Further, making data easy to access and reuse is important for researchers and educators who do not have the skills or resources for large-scale projects, or expensive and time-consuming field and laboratory work, increasing participation from underprivileged groups and minorities (;;Whittington & Pelletier, 2021). By making real genetic data available to students from any school with a connection to the internet, phylogatR will inspire the next generation of researchers to understand and protect biodiversity while they are developing the computational skills that are increasingly required for evolutionary and ecological studies. Not only do these data make authentic research more readily available in the classroom, they increase the access to biodiversity data worldwide, therefore contributing to a more inclusive and diverse STEM community and easily implemented international collaborations (;). Perfect data is unattainable and not all data will be retained after data curations steps (). The data currently available on phylogatR offer a first step towards asking big questions with big data in population genetics, phylogeography, and systematics. While this study does not aim to solve problems in data standards, making data more readily available will probably result in novel questions and transformative findings, and will largely contribute to identifying current shortcomings and inconsistencies in current data sharing practices. We expect that this effort will increase the desire for aggregating next-generation data to obtain multi-locus sequences from a large number of species in order to ask even more refined questions in phylogeography on a global scale. Shared organismal traits lead to concordant phylogeographic patterns Papadopoulou and Knowles and Zamudio et al. Members of ecologically-interdependent communities will codiversify Smith et al. and Satler and Carstens Pleistocene refugia are shared by species from many taxonomic groups Brunsfeld et al. Cosmopolitan species will have higher levels of genetic diversity than small endemics Gitzendanner and Soltis Regions of marginal habitat contain less genetic diversity Micheletti and Storfer Generalist species will have weaker responses to climatic and landscape changes than habitat specialists Estavillo et al. Southern peninsular regions served as Pleistocene refugia in the Northern Hemisphere Hewitt Cryptic species are likely to be present in regions of high endemism Reeder et al. Ecological niche differentiation promotes genetic diversification McCormack et al. Historical demographic processes are shared among species encountering the same changes in climate Hewitt manuscript, created logo. Stephanie Crouch: analysed data, edited paper. Eric Franz: contributed code, edited the manuscript. Jeffery AUTH O R CO NTR I B UTI O N S Ohrstrom: contributed code, edited the manuscript. ACK N OWLED G EM ENTS We thank several OSC members for their participation in database development, Alan Chalker, and the phylogatR beta-testers group for assessing functionality of the database. Sarah Foltz contributed to the teaching modules available on the website. Funding was provided by the National Science Foundation (DBI-1910623) to BCC and the National Science Foundation (DBI-1911293) to TAP. CO N FLI C T S O F I NTE R E S T The authors declare no conflicts of interest. DATA AVA I L A B I L I T Y S TAT E M E N T The phylogatR database is publicly available at https://phylo gatr. org/ where every download includes the GBIF DOI, GenBank version, and BOLD DOI that contributed to the data. All scripts devoted to the development of the database can be found at https:// github.com/OSC/phylo gatr-web. Scripts and data files used for the empirical example can be found on DRYAD doi:10.5061/ dryad.bzkh1899x. O PE N R E S E A RCH BA D G E S This article has earned an Open Data badge for making publicly available the digitally-shareable data necessary to reproduce the reported results. The data is available at 10.5061/dryad. bzkh1899x. B EN EFIT-S H A R I N G S TATEM ENT Benefits from this research include accessibility to big data via the public database, minimizing the need for computational resources, as described above, which include data analysis pipelines and educational tools. |
<filename>Lab1/main2.c
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/wait.h>
static int n;
int spawn()
{
n--;
FILE* fp;
pid_t wpid;
int status = 0;
if(n >= 0)
{
if(fork() == 0)
{
fp = fopen("log2.txt", "a");
fprintf(fp, "Current Process ID is %d\nCurrent Process Parent ID is %d\n\n", getpid(), getppid());
fclose(fp);
printf("Current Process ID is %d\nCurrent Process Parent ID is %d\n\n", getpid(), getppid());
spawn();
while ((wpid = wait(&status)) > 0);
exit(0);
}
}
}
int main()
{
printf("Enter n:\t");
scanf("%d", &n);
pid_t wpid;
int status = 0;
if(n > 0)
{
FILE *fp;
fp = fopen("log2.txt", "w");
fprintf(fp, "Calling Process ID is %d\nCalling Process Parent ID is %d\n\n", getpid(), getppid());
fclose(fp);
printf("Calling Process ID is %d\nCalling Process Parent ID is %d\n\n", getpid(), getppid());
spawn();
while ((wpid = wait(&status)) > 0);
}
return 0;
}
|
Anne Wills
Biography
Wills was born in Wangaratta, Victoria in 1944. When she was three years old, her family moved to Ocean Island in the Pacific Ocean, now known as Banaba Island and part of Kiribati, and lived there until the family moved to Adelaide in 1963.
Wills was spotted by Channel 9 executives during the 1964 Telethon Quest, and was offered the job of weather girl on NWS9, beginning in July 1965.
As well as appearing on a number of national television programmes such as In Melbourne Tonight, Beauty and the Beast, The Bert Newton Show and Good Morning Australia, Wills has presented and appeared on many Adelaide based TV programs, including Adelaide Tonight, The Penthouse Club, AM Adelaide, Movie Scene, Christmas Telethon, Pot Luck and Close Up with Willsy. She was also the weather presenter for SAS for a number of years and, as of November 2013, has a regular weekly afternoon segment on Adelaide AM radio station FiveAA, featuring celebrity gossip.
Wills is known for her love of over-the-top earrings. Wills also commonly appears in pub quiz nights |
/**
* Print out the contents of the linked list.
*/
public void printList() {
SinglyLinkedNode cur = head;
System.out.print("head -> ");
while(cur != null) {
System.out.print(cur.element + " -> ");
cur = cur.next;
}
System.out.println("null");
} |
Association between hemorrhoid and risk of coronary heart disease Abstract The purpose of the study was to address the association between hemorrhoid and the subsequent risk of coronary heart disease (CHD) development. This retrospective cohort study used reimbursement claims data from the Longitudinal Health Insurance Database 2000 in Taiwan. Thirty-three thousand thirty-four patients with hemorrhoids and 132,136 age-, gender-, and index year matched controls between 2000 and 2010 were identified. Cox model was performed to estimate the hazard ratios (HRs) and 95% confidence intervals (CIs) of CHD development for the hemorrhoid cohort compared with the nonhemorrhoid cohort. During a follow-up period of 12 years, the overall incidence rate of CHD was 9.91 per 1000 person-years in the hemorrhoid patients and was 1.36-fold higher than in the nonhemorrhoid cohort (7.28 per 1000 person-years) with an adjusted hazard ratio (aHR) of 1.27 (95% CI=1.211.34). Moreover, compared with the nonhemorrhoid patients without these comorbidities, among patients with hemorrhoids, those with any 2 comorbidities were at a significantly increased risk of CHD (HR=7.12, 95% CI=6.617.67; P<.001), followed by those with any 1 comorbidity (HR=3.23, 95% CI=2.943.54; P<.001). We found that hemorrhoid patients had a 1.27-fold higher risk of CHD compared with those without hemorrhoids after adjusting for the potential confounding factors. Introduction Hemorrhoid is an increasing prevalent gastrointestinal disorder contributing to reduced quality of life. Clinical manifestations were in great diversity, ranging from asymptomatic to rectal bleeding. Increased intraabdominal pressure and fragile supporting structure were the principal causes of the increased incidence of hemorrhoid. The presentations of coronary heart disease (CHD) were varied, including stable angina, unstable angina, and acute myocardial infarction. CHD imposed a great medical burden worldwide because of high mortality rate. Several CHDassociated risk factors have been well defined according to previous investigations. Although hemorrhoid and CHD shared several risk factors ; however, to our best knowledge, there is limited investigation on the correlation between hemorrhoid and the risk of CHD development in the literature. Using a nationwide, population-based dataset, the study was aimed to assess the association between hemorrhoid and the subsequent risk of CHD development. Data source This retrospective cohort study used reimbursement claims data from the Longitudinal Health Insurance Database 2000 (LHID2000) in Taiwan, which was part of the Taiwan National Health Insurance Research Database (NHIRD). The NHIRD has been described in detail in previous studies. In brief, it consisted of detailed healthcare data from 23.74 million enrollees, representing 99% of Taiwan's entire population. We used the LHID2000 containing complete data of 1,000,000 randomly sampled beneficiaries between 1996 and 2011 from the original NHIRD. All diagnoses were recorded according to International Classification of Diseases, Ninth Revision, Clinical Modification (ICD-9-CM). The Ethics Review Board of China Medical University and Hospital in Taiwan approved this study (CMUH-104-REC2-115). Sampled participants The hemorrhoid cohort was identified between January 1, 2000 and December 31, 2010, with newly diagnosed hemorrhoid (ICD-9-CM code 455) and the index date was set as the first diagnosed day. Patients with a history of CHD (ICD-9-CM codes 410-414) before the index date and those aged < 20 years were excluded. The nonhemorrhoid cohort was randomly retrieved from the LHID2000 during the same period of 2000 to 2010, and the exclusion criteria were the same as the hemorrhoid cohort. For each corresponding hemorrhoid patient, 4 nonhemorrhoid subjects were frequency matched by sex, age, and index year. Finally, a total of 33,034 patients with hemorrhoids and 132,136 subjects without hemorrhoids were included in this study. Statistical analysis The distributions of demographic data and comorbidities were compared between the hemorrhoid cohort and the nonhemorrhoid cohort using the Chi-square test (for category variables) and the Student t test (for continuous variables). We estimated the cumulative incidence curves of CHD for both hemorrhoid and non-hemorrhoid cohorts by Kaplan-Meier method and tested the curve difference between the 2 cohorts by log-rank test. The incidence densities of CHD (per 1000 person-years) were estimated for each cohort and stratified by sex, age, and comorbidity. Univariable and multivariable Cox proportional hazard regression analyses were performed to estimate the hazard ratios (HRs) and 95% CIs of CHD development for the hemorrhoid cohort compared with the nonhemorrhoid cohort. The multivariable Cox models were adjusted for comorbidities of hypertension, diabetes mellitus, hyperlipidemia, asthma, COPD, chronic liver disease, atrial fibrillation, heart failure, cancer, and obesity. Additional data were analyzed to evaluate the joint effect of hemorrhoid and CHD-associated risk factors on the risk of CHD development. All analyses were performed using SAS statistical software (Version 9.4, SAS Institute, Cary, NC). The 2-sided significance level was set at P <.05. Results Baseline demographic characteristics and comorbidities of the hemorrhoid patients and the nonhemorrhoid patients are shown in Table 1 (1:4 matching for age and sex). Most people were men (54.0% vs 54.0%) and aged 49 years (67.4% vs 67.4%). The mean ages of the hemorrhoid and the nonhemorrhoid cohorts were 44.7 (±14.7) and 44.3 years (±15.0), respectively. The prevalence of comorbidities, including hypertension, hyperlipidemia, asthma, COPD, chronic liver disease, atrial fibrillation, heart failure, cancer, and obesity were significantly higher in the hemorrhoid cohort than in the nonhemorrhoid cohort. The median follow-up period was 6.87 years for the hemorrhoid cohort and 6.78 years for the nonhemorrhoid cohort. The results of the Kaplan-Meier analysis for the cumulative incidence of CHD in the hemorrhoid cohort were significantly higher than in Table 1 Demographic characteristics and comorbidities in patients with and without hemorrhoids. (Fig. 1, log rank test, P <.001). Table 2 illustrates the incidence density rate and HR of CHD stratified by sex, age, and comorbidity between patients with and without hemorrhoids. The overall incidence rate of CHD was 9.91 per 1000 person-years in the hemorrhoid patients and was 1.36-fold higher than in the nonhemorrhoid cohort (7.28 per 1000 person-years) with an adjusted hazard ratio (aHR) of 1.27 (95% CI = 1.21-1.34). Both cohorts were male dominant regarding the incidence densities of CHD. The gender-specific aHR of CHD for the hemorrhoid cohort relative to the nonhemorrhoid cohort was significantly higher for both men (aHR = 1.23, 95% CI = 1.15-1.30) and women (aHR = 1.21, 95% CI = 1.11-1.31). The incidence of CHD increased with age in both cohorts. The risk of CHD for the hemorrhoid cohort relative to the nonhemorrhoid cohort was significant higher for all age groups (aHR = 1.28, 95% CI = 1.18-1.40 for aged 49 years; aHR = 1.24, 95% CI = 1.14-1.34 for aged 50-64 years; aHR = 1.29, 95% CI = 1.18-1.42 for aged ≥65 years). Moreover, patients with comorbidities had an increased CHD incidence in both cohorts. Regardless of comorbidities, the hemorrhoid cohort showed a higher aHR of CHD than the nonhemorrhoid cohort. In the interaction analysis, comorbidity significantly modified the association between hemorrhoid and CHD (P-value for interaction <.001). Table 2 Comparison of incidence and hazard ratio of coronary heart disease stratified by sex, age and comorbidity between patients with and without hemorrhoids. x Comorbidity: Patients with any one of the comorbidities: hypertension, diabetes mellitus, hyperlipidemia, asthma, chronic obstructive pulmonary disease, chronic liver disease, atrial fibrillation, heart failure, cancer, and obesity were classified as the comorbidity group. * P <.05. * * P <.001. Discussion This is the first study to address the association between hemorrhoid and the subsequent risk of CHD development. After adjustment for the potential confounding factors, subjects with hemorrhoids had a 1.27-fold higher risk of CHD compared with those without hemorrhoids. The advantage of this study is that it is a nationwide cohort study which includes a very big case numbers of study and control cohorts with long follow-up period. Therefore, the association between hemorrhoid and risk of incident CHD demonstrated in the present study is highly convincing. In this study, most patients in the hemorrhoid cohort were men (54.0%), and their mean age was 44.7 years. Our finding is consistent with previous investigations ; indicative of the accuracy and verity of NHIRD hemorrhoid patient population. This study showed that patients with hemorrhoids displayed a 27% increased risk of CHD after adjustment for the confounding factors. Risk factors for the development of CHD are more common among subjects with hemorrhoids than those without hemorrhoids except for diabetes mellitus. However, after minimizing the confounding factors, hemorrhoid still imposes the risk of the development of CHD with steadily increased within 12 years of follow up. A subgroup analysis was conducted to address the joint effects for CHD development between hemorrhoid and CHD-associated risk factors. Although the impact of hemorrhoid on CHD development was not as high as that for conventional CHD-associated risk factors, a greater CHD risk was found in the hemorrhoid patients with any concomitant comorbidity than in patients with only hemorrhoid. Additional studies are required to confirm our finding. Limitations First, the encoded data of hemorrhoid, CHD, and other comorbidities were completely by ICD codes; therefore, one may argue the accuracy. However, Taiwan's NHI has set up a thorough method to evaluate the diagnosis accuracy. Second, family history of CHD, cigarette smoking, body mass index, physical activity, and psychologic stress were unavailable from Taiwan's NHI database. Finally, the severity of hemorrhoid was uncertain due to the limitation of Taiwan's NHI Database. Therefore, further large studies are necessary to verify the clinical significance of our finding. Conclusions In summary, our finding suggested that patients with hemorrhoids had a 1.27-fold higher risk of CHD compared with those without hemorrhoids after adjusting for the potential confounding factors. |
package frogi.design_patterns.mvc;
/**
* Class Controller from the MVC design pattern demo.
* @author Frogi
*/
public class DiceController {
// MVC model
private DiceModel model;
// MVC view
private DiceView view;
/**
* DiceController class constructor
* Assigns model and view to controller
* @param model - MVC model
* @param view - MVC view
*/
public DiceController(DiceModel model, DiceView view){
this.model = model;
this.view = view;
}
/**
* Uses model's rollK4() method.
* Simulation of throwing a four-sided dice.
*/
public void rollK4(){
this.model.rollK4();
}
/**
* Uses model's rollK6() method.
* Simulation of throwing a six-sided dice.
*/
public void rollK6(){
this.model.rollK6();
}
/**
* Uses model's rollK8() method.
* Simulation of throwing a eight-sided dice.
*/
public void rollK8(){
this.model.rollK8();
}
/**
* Uses model's rollK10() method.
* Simulation of throwing a ten-sided dice.
*/
public void rollK10(){
this.model.rollK10();
}
/**
* Uses model's rollK12() method.
* Simulation of throwing a twelve-sided dice.
*/
public void rollK12(){
this.model.rollK12();
}
/**
* Uses model's rollK20() method.
* Simulation of throwing a twenty-sided dice.
*/
public void rollK20(){
this.model.rollK20();
}
/**
* Uses model's rollK100() method.
* Simulation of throwing a hundred-sided dice.
*/
public void rollK100(){
this.model.rollK100();
}
/**
* Uses model's getLastRoll() method.
* @return lastRoll from model - last dice roll result
*/
public int getLastRoll(){
return this.model.getLastRoll();
}
/**
* Uses view's printDiceRollResult() method.
* Prints the dice roll result in the console.
*/
public void updateView(){
this.view.printDiceRollResult(this.model.getLastRoll());
}
}
|
values = int(input(""))
data = []
for i in range(values):
data.append(input(""))
solutions = 0
for row in data:
values = row.split(" ")
agreed = 0
for value in values:
agreed += int(value)
if (agreed >= 2):
solutions += 1
print(solutions)
|
/**
* Copyright (c) <NAME> (<EMAIL>)
*/
package nl.saxion.nena.opentcs.commadapter.ros2.kernel.vehicle_adapter.operation.constants;
/**
* Constants with operation names of all operations that are allowed to be carried out by the vehicle driver.
*
* @author <NAME>
*/
public interface OperationConstants {
String MOVE = "MOVE";
String NOP = "NOP";
String LOAD_CARGO = "Load cargo";
String UNLOAD_CARGO = "Unload cargo";
} |
Startup enthusiasts from across Northeast Ohio can gather Thursday, April 14, at NEXTOhio in Akron to talk about what’s ahead in the local tech startup ecosystem.
NEXTOhio runs from 5 to 11 p.m. April 14 at Akron’s Quaker Station, 130 East Mill St.
The free event, spearheaded by Launch League, will feature several speakers — from founders to investors. The lineup includes Ron Seide, founder of Summit Data Communications, who will discuss scaling; Rich Langdale, managing partner of NCT Ventures, who will look at what it takes to become an investable startup; Falon Donohue, executive director of VentureOhio, who will speak on Ohio’s growing startup ecosystem; Jon Grimm, co-founder of Knotice; and Alan Gilbert, vice president of engineering at CoverMyMeds.
The night will also include a pitch critique to give attendees a better idea of what investors are seeking. Three startups will make their pitches, and a panel of investors will weigh in.
The event wraps up with networking, food, music and a cash bar. According to organizers, last year’s event drew more than 300 people.
Registration is available online. |
Berlin - Special forces of the Nato-led military coalition in Afghanistan have killed 365 Taliban leaders over the past three months, German news magazine Der Spiegel said in its online edition on Thursday.
The elite troops, mainly from the US, killed the insurgents in commando operations between May 8 and August 8, said the magazine quoting a confidential International Security Assistance Force briefing.
During the same period 1 395 suspects were arrested, according to the briefing to diplomats and military leaders.
In June the former US commander in Afghanistan, General Stanley McChrystal, told the media that US special forces, whose number have almost tripled in a year, killed or captured 121 leading Taliban over the three previous months.
McChrystal was forced to retire after making scathing comments to a magazine about the Barack Obama administration.
The special forces are equipped with helicopters, planes and drones, and mostly act at night to deprive the Taliban of their leadership, according to press reports.
McChrystal's successor, US General David Petraeus, said on Monday that the international troops he commands in Afghanistan had turned the tide on the Taliban's "momentum" there, although he warned tough battles still lay ahead.
In an interview with the BBC, he also played down the prospect of a rapid withdrawal of US troops next year, repeating his insistence that Obama's target of July 2011 was only a "date when a process begins". |
<gh_stars>1-10
/*******************************************************************************
* Copyright 2013 <NAME> and <NAME>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************/
package net.sf.qualitycheck.exception;
import org.junit.Assert;
import org.junit.Test;
public class IllegalInstanceOfArgumentExceptionTest {
@Test
public void construct_withArgName_successful() {
new IllegalInstanceOfArgumentException("argName", Long.class, Integer.class);
}
@Test
public void construct_withEmptyArgName_successful() {
final IllegalInstanceOfArgumentException e = new IllegalInstanceOfArgumentException("", Long.class, Integer.class);
Assert.assertEquals(
"The passed argument is a member of an unexpected type (expected type: java.lang.Long, actual: java.lang.Integer).",
e.getMessage());
}
@Test
public void construct_withEmptyArgNameAndNullActualType() {
final IllegalInstanceOfArgumentException e = new IllegalInstanceOfArgumentException("", Long.class, null);
Assert.assertEquals("The passed argument is a member of an unexpected type (expected type: java.lang.Long, actual: (not set)).",
e.getMessage());
}
@Test
public void construct_withEmptyArgNameAndNullExpectedType() {
final IllegalInstanceOfArgumentException e = new IllegalInstanceOfArgumentException("", null, Integer.class);
Assert.assertEquals("The passed argument is a member of an unexpected type (expected type: (not set), actual: java.lang.Integer).",
e.getMessage());
}
@Test
public void construct_withFilledArgNameAndNullTypes() {
final IllegalInstanceOfArgumentException e = new IllegalInstanceOfArgumentException("argName", null, null);
Assert.assertEquals("The passed argument 'argName' is a member of an unexpected type (expected type: "
+ IllegalInstanceOfArgumentException.NO_TYPE_PLACEHOLDER + ", actual: "
+ IllegalInstanceOfArgumentException.NO_TYPE_PLACEHOLDER + ").", e.getMessage());
}
@Test
public void construct_withFilledArgNameAndTypes() {
final IllegalInstanceOfArgumentException e = new IllegalInstanceOfArgumentException("argName", Long.class, Integer.class);
Assert.assertEquals(
"The passed argument 'argName' is a member of an unexpected type (expected type: java.lang.Long, actual: java.lang.Integer).",
e.getMessage());
}
@Test
public void construct_withFilledCause() {
final IllegalInstanceOfArgumentException e = new IllegalInstanceOfArgumentException(new NumberFormatException());
Assert.assertEquals(IllegalInstanceOfArgumentException.DEFAULT_MESSAGE, e.getMessage());
}
@Test
public void construct_withNullArgs() {
final IllegalInstanceOfArgumentException e = new IllegalInstanceOfArgumentException((String) null, null, null);
Assert.assertEquals("The passed argument is a member of an unexpected type (expected type: (not set), actual: (not set)).",
e.getMessage());
}
@Test
public void construct_withNullCause() {
final IllegalInstanceOfArgumentException e = new IllegalInstanceOfArgumentException((Throwable) null);
Assert.assertEquals(IllegalInstanceOfArgumentException.DEFAULT_MESSAGE, e.getMessage());
}
@Test
public void construct_withoutArgs_successful() {
final IllegalInstanceOfArgumentException e = new IllegalInstanceOfArgumentException();
Assert.assertEquals(IllegalInstanceOfArgumentException.DEFAULT_MESSAGE, e.getMessage());
}
}
|
Effects of an activated charcoal silver dressing on chronic wounds with no clinical signs of infection. OBJECTIVE This exploratory, clinical study aimed to explore the effect of an activated charcoal silver dressing (intervention) with cleansing and debridement (control) in reducing the level of bacteria in chronic wounds with no clinical signs of local infection. METHOD Patients were randomly assigned to the intervention or control group and monitored for two weeks. Samples for bacterial status and cultivation were obtained by surface smear (spatula) and percutaneous aspiration first at baseline and then after 15 days of treatment. Sixty-seven lesions were included in the intervention group and 58 in the control group. RESULTS At baseline, in the intervention group 71.6% of the wounds were contaminated, 7.5% had a high level of bacteria and 20.9% were infected. In the control group at baseline 65.5% of the wounds were contaminated, 6.9% colonised, 6.9% had a high level of bacteria and 20.7% were infected. There were no colonised wounds in the intervention group. After two weeks, combining totals of contaminated, colonised, a high level of bacteria and infection for each group, 85.1% (57/67) of the wounds in the intervention group had a positive bacterial level management (that is, a reduction in the number of bacteria in the wound) compared with 62.1% (36/58) in the control group (p=0.003). CONCLUSION Activated charcoal dressings that contain silver control infection and reduce healing times, eliminating bacterial barriers. |
The evolving management of metastatic triple negative breast cancer. Advanced triple negative breast cancer (TNBC) is an incurable disease classified by its lack of expression of the estrogen receptor, progesterone receptor, and human epidermal growth factor receptor-2. Due to its lack of therapeutic targets, it has historically been treated with single agent chemotherapy, with combination cytotoxic therapy typically reserved for patients with high disease burdens, symptomatic disease, and/or impending visceral crisis. Recent molecular analyses have revealed that this clinical group of TNBCs is in fact quite biologically heterogeneous, with multiple TNBC subtypes defined by distinct biology and clinical behavior. Building on this biology, 2 targeted strategies are now approved for selected patients with advanced TNBC: the poly (ADP-ribose) polymerase inhibitors for advanced TNBC with a germline mutation in BRCA1/2, and the combination of the programmed death ligand 1-specific antibody atezolizumab with nab-paclitaxel for advanced TNBC that expresses programmed death ligand 1 on immune cells within the tumor. These targeted agents tend to be associated with a more favorable side effect profile and longer disease control than standard chemotherapy. A number of other targeted therapies have shown promise in early clinical trials, and several are now in definitive phase 3 testing for advanced TNBC. These include the antiapoptotic kinase inhibitors ipatisertib and capivasertib, and the antibody-drug conjugate sacituzumab govitecan-hziy. Approved biomarker-driven treatment options for this disease are thus likely to expand in the near-term. Here we review current treatment options and emerging targeted therapies for advanced TNBC. For patients who do not meet criteria for approved targeted therapies, participation in clinical trials evaluating precision medicines with candidate predictive biomarkers in advanced TNBC should be encouraged. |
Plasmid DNA replication. Recent studies have provided some insight to the overall characteristics of plasmid replication in bacteria. The ColE 1 and R6K plasmids replicate via a covalently-closed circular intermediate. Replication is initiated at a fixed origin and is unidirectional in the case of ColE 1 and bidirectional for R6K. In the case of the plasmid R6K. the bidirectional replication is asymmetric and sequential, proceeding from a fixed origin to a fixed terminus located approximately 20% of the R6K genome from the origin. RNA serves as a primer for plasmid DNA replication. The base composition and sequence of the 5'-terminus of the RNA segments in ColE 1 DNA have been determined. Finally, the properties of plasmid relaxation complexes and the possible role of these complexes in plasmid DNA replication are discussed. |
<filename>src/server.py
# coding:utf-8
from twisted.protocols import basic
from twisted.internet import protocol
from twisted.application import service, internet
from twisted.internet import reactor
import logging
import struct
import pickle
import json
def getLogger(name=__name__):
logger = logging.getLogger( name )
handler = logging.StreamHandler()
handler.setFormatter( getLoggingFormatter() )
logger.addHandler(handler)
logger.setLevel(logging.DEBUG)
return logger
def getLoggingFormatter():
return logging.Formatter(
'%(asctime)s %(name)-12s %(levelname)-8s %(message)s')
class UdpServerProtocol(protocol.DatagramProtocol):
logger = getLogger('UdpServerProtocol')
loggingFormatter = getLoggingFormatter()
def __init__(self,distributer, *args):
super(UdpServerProtocol, self).__init__(*args)
self.distributer = distributer
def datagramReceived(self, data, addr):
slen = struct.unpack('>L', data[:4])[0]
self.logger.debug('recv from:{0},datalen:{1},datatype:{2},slen:{3}'.format(addr, len(data), type(data),slen ))
chunk = data[4:slen+4]
try:
obj = pickle.loads(chunk)
record = logging.makeLogRecord(obj)
msg = self.loggingFormatter.format(record)
jsonstr = msg.replace('\n','\r\n')+'\r\n'
self.distributer.distribute( jsonstr.encode('utf-8') )
self.logger.debug('recv log:{0}'.format(jsonstr))
except Exception as ex:
self.logger.error('UDP: invalid data to pickle %s,%s', chunk,ex)
class TelnetServerProtocol(protocol.Protocol):
logger = getLogger('TelnetServerProtocol')
def __init__(self, *args):
super(TelnetServerProtocol, self).__init__(*args)
def connectionMade(self):
self.factory.clients.append(self)
self.logger.info("Got new client from:{0}, now total clients:{1}"
.format(self.transport.client, len(self.factory.clients)))
self.transport.write( 'welcome!'.encode('utf-8'))
def connectionLost(self, reason):
self.factory.clients.remove(self)
self.logger.info("Lost a client!reason:{0},from:{1}, now total clients:{2}"
.format(reason, self.transport.client, len(self.factory.clients)))
def sendData(self,data):
self.transport.write( data)
class TelnetFactory(protocol.ServerFactory):
protocol = TelnetServerProtocol
def __init__(self, *args):
super(TelnetFactory, self).__init__(*args)
self.clients=[]
self.logger = getLogger('TelnetFactory')
def distribute(self,data):
self.logger.debug('distribute to {0} clients,data:{1}'.format( len(self.clients), data))
for c in self.clients:
c.sendData( data )
def main(udpport,telnetport,udphost='0.0.0.0',telnethost='0.0.0.0'):
logger = getLogger(__name__)
tel = TelnetFactory()
udp = UdpServerProtocol(tel)
reactor.listenTCP(telnetport, tel)
reactor.listenUDP(udpport, udp)
logger.info('server running! UDP:({0}:{1}) , Telnet:({2}:{3})'
.format( udphost,udpport, telnethost,telnetport))
reactor.run()
if __name__=="__main__":
main(6800,6801)
|
<gh_stars>1-10
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)ttyname.c 5.2 (Berkeley) 3/9/86";
#endif LIBC_SCCS and not lint
/*
* ttyname(f): return "/dev/ttyXX" which the the name of the
* tty belonging to file f.
* NULL if it is not a tty
*/
#include <sys/param.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <dirent.h>
#include <sgtty.h>
#include <db.h>
#include <string.h>
#include <paths.h>
static char dev[] = "/dev/";
char *strcpy();
char *strcat();
char *
ttyname(fd)
int fd;
{
struct stat sb;
struct sgttyb ttyb;
DB *db;
DBT data, key;
struct {
mode_t type;
dev_t dev;
} bkey;
/* Must be a terminal. */
if (ioctl(fd, TIOCGETP, &ttyb) < 0)
return (NULL);
/* Must be a character device. */
if (fstat(fd, &sb) || !S_ISCHR(sb.st_mode))
return (NULL);
if (db == dbopen(_PATH_DEVDB, O_RDONLY, 0, DB_HASH, NULL)) {
memset(&bkey, 0, sizeof(bkey));
bkey.type = S_IFCHR;
bkey.dev = sb.st_rdev;
key.data = &bkey;
key.size = sizeof(bkey);
if (!(db->get)(db, &key, &data, 0)) {
bcopy(data.data,
buf + sizeof(_PATH_DEV) - 1, data.size);
(void)(db->close)(db);
return (buf);
}
(void)(db->close)(db);
}
return (oldttyname(fd));
}
char *
oldttyname(f)
{
struct stat fsb;
struct stat tsb;
register struct direct *db;
register DIR *df;
static char rbuf[32];
if (isatty(f) == 0)
return (NULL);
if (fstat(f, &fsb) < 0)
return (NULL);
if ((fsb.st_mode & S_IFMT) != S_IFCHR)
return (NULL);
if ((df = opendir(dev)) == NULL)
return (NULL);
while ((db = readdir(df)) != NULL) {
if (db->d_ino != fsb.st_ino)
continue;
strcpy(rbuf, dev);
strcat(rbuf, db->d_name);
if (stat(rbuf, &tsb) < 0)
continue;
if (tsb.st_dev == fsb.st_dev && tsb.st_ino == fsb.st_ino) {
closedir(df);
return (rbuf);
}
}
closedir(df);
return (NULL);
}
|
// NewEmptyPipeline Creates a new pipeline builder for a specific collection
func NewEmptyPipeline(collection *mongoCollection) *PipelineBuilder {
builder := PipelineBuilder{}
builder.pipelines = make([]Pipeline, 0)
builder.projectedFields = make([]projectField, 0)
builder.filters = make([]filter, 0)
builder.sortingFields = make([]sortField, 0)
builder.sortingEndFields = make([]sortField, 0)
builder.addFields = make([]addField, 0)
builder.collection = collection.coll
builder.options = PipelineOptions{
IncludeAddFields: true,
IncludeCount: true,
IncludeLimit: true,
IncludeMatch: true,
IncludeProjection: true,
IncludeSkip: true,
IncludeSort: true,
IncludeUser: true,
IncludeUnwind: true,
}
return &builder
} |
The Argentina internationals are back on Red Devils boss Louis van Gaal's radar and Portuguese newspaper A Bola suggests United scouts will be present at Benfica's next match against Gil Vicente on Sunday.
Perez, 28, has a release clause worth £23.5m while Gaitan, 26, is available for £27.5m.
The Germany international is currently on loan at Borussia Monchengladbach from Bundesliga rivals Bayer Leverkusen but he is likely to make a £20m move in the summer with Arsenal, Liverpool, United and Real Madrid all interest.
He told German broadcaster RAN: "There is no doubt that being associated with clubs like Real Madrid and other greats is an honour."
Arsenal are plotting to sign Hajduk Split's teenage midfielder Nikola Vlasic.
The 17-year-old is one of the most highly-rated prospects in Eastern Europe after breaking into Hajduk's first team this season.
Gunners boss Arsene Wenger's extensive scouting network has reportedly identified the Split-born starlet as one for the future and Italian website Tuttomercatoweb believes the club will go head-to-head with Inter Milan for his signature.
Divock Origi could return to Liverpool in January - if they hand over £4.5m.
The Reds snapped up the Belgian striker from Lille for £10m following his impressive displays at the World Cup.
He was quickly loaned back but reports in France suggest the deal could be cut-short if Brendan Rodgers stumps up the hefty sum. |
<gh_stars>100-1000
import { excelHandler } from '../../lib/plugins/Paste/excelConverter/convertPastedContentFromExcel';
describe('convertPastedContentFromExcel', () => {
function runTest(html: string, htmlBefore: string, expectedInnerHtml: string) {
const result = excelHandler(html, htmlBefore);
expect(result.toLowerCase()).toBe(expectedInnerHtml);
}
it('Table', () => {
runTest(
'<table><tr><td>a</td><td></td></tr></table>',
'<html xmlns:x="urn:schemas-microsoft-com:office:excel"><body>',
'<table><tr><td>a</td><td></td></tr></table>'
);
});
it('Table without TR', () => {
runTest(
'<td>a</td><td></td>',
'<html xmlns:x="urn:schemas-microsoft-com:office:excel"><body><table><tr>',
'<table><tr><td>a</td><td></td></tr></table>'
);
});
it('Table without TABLE', () => {
runTest(
'<tr><td>a</td><td></td></tr>',
'<html xmlns:x="urn:schemas-microsoft-com:office:excel"><body><table>',
'<table><tr><td>a</td><td></td></tr></table>'
);
});
});
|
An American Airlines Boeing 777-300ER similar to aircraft used to operation Flight 930.
American Airlines Flight 930 was delayed 27 hours after its pilot allegedly attacked a female gate agent.
The incident took place on Wednesday evening in Sao Paulo, Brazil, before the flight was set to depart for Miami, Florida.
The pilot was arrested and reportedly faces up to a year in prison.
An American Airlines flight was delayed for 27 hours after its pilot reportedly attacked a gate agent. The incident took place Wednesday evening in Sao Paulo, Brazil, shortly before Flight 930 was set to leave for Miami, Florida.
The male captain of Flight 930 was arrested by Brazilian police after allegedly pushing a female gate agent and grabbing her by the neck following a disagreement over the positioning of the jetway, the Daily Mail reported.
According to the publication, the physical altercation started after the American Airlines gate agent accidentally stepped on the pilot's foot. In addition, the pilot also defended his action by accusing the gate agent of throwing a punch at him.
In a statement to Business Insider, American Airlines characterized the incident as a "disagreement" between two team members. The airline said that the altercation is under investigation and that both employees are "taking time away from work." However, the airline declined to call it a suspension.
American Airlines declined to comment on the whereabouts of the pilot.
However, the Daily Mail reported that the pilot has since been released from custody but could face up to a year in prison.
As a result of the incident, Flight 930 was delayed for 27 hours. According to the airline, the delay was caused by the need to bring in new crew members to operate the flight.
In a call with American Airlines, a spokesman apologized for the incident and told Business Insider that the passengers were given hotel rooms and meal vouchers. The spokesman also said that the majority of passengers were accommodated on earlier flights and did not wait the full 27 hours.
"Wednesday night, prior to boarding American Airlines flight 930 from Sao Paulo (GRU) to Miami (MIA), two team members became involved in a disagreement on the jetbridge. We take these kinds of matters extremely seriously. We fully cooperated with law enforcement and local authorities to look into the facts and we are currently gathering information about the incident. We have given our team members who were involved time away from their duties while we conduct a thorough review.
Flight 930 departed at its rescheduled time of 1:20 a.m. (local time) on March 9. We provided our customers with hotel accommodations and meal vouchers for the night and the vast majority were booked onto other, earlier flights. We apologize to them for this disruption." |
#include<stdio.h>
main()
{
char a[100];
int i=0,j=0,z=0;
gets(a);
for(i=0;;i++)
{
if(a[i]>='A'&&a[i]<='Z')
{
j++;
}
else
z++;
if(a[i+1]=='\0')
break;
}
if(j<=z)
puts(strlwr(a));
else
puts(strupr(a));
}
|
It will mean reducing parking spots in some of Hamilton's busiest business areas. But the idea of using parking spaces as on-street patios is here to stay.
I love this. - Coun. Donna Skelly
City councillors voted unanimously Tuesday to permanently allow seasonal parking-space patios in select business areas, including Ottawa, Kenilworth and Barton Village.
BIAs will give final approval of how many there are in a given area. Selected businesses will pay a $400 annual fee and use a parking space as their patio from May 1 to Oct. 31. Businesses will also be able to serve alcohol on them.
It's a popular idea with urbanists, some of whom offered a guerilla version in 2015. It's also popular on Concession Street, where the BIA advocated for it.
Coun. Donna Skelly of Ward 7 was most effusive about it at Tuesday's planning committee meeting.
It sends a shudder down the spine of many Locke Street merchants. - Coun. Aidan Johnson
"I love this," she said. "I think it is so good for the city. It's good for these businesses … It's a fabulous program."
The concept is less popular on Locke Street, said Coun. Aidan Johnson of Ward 1. There's a parking shortage there as it is.
"It sends a shudder down the spine of many Locke Street merchants," he said.
The pilot program last year ran from July 1 to Oct. 31. Eight businesses participated, says a staff report, and all of them were happy with the result. Ninety-seven per cent of patio patrons surveyed liked the idea too.
City council will cast a final vote on March 8. |
import { useState } from 'react';
const useDarkMode = () => {
const [theme, setTheme] = useState('dark');
const toggleTheme = () => {
theme === "dark" ? setTheme("light") : setTheme("dark")
}
return [theme, toggleTheme]
};
export default useDarkMode |
/**
* Utility methods related to the protocols and interfaces presented
* to clients.
*/
public class ServerUtils implements ServerConstants {
/**
* @param request HttpServletRequest.
* @return All ticket keys found in the request, both in the
* {@link #HEADER_TICKET} header and the {@link #PARAM_TICKET}
* parameter.
*/
public static Set<String> findTicketKeys(HttpServletRequest request) {
HashSet<String> keys = new HashSet<String>();
Enumeration<String> headerValues = request.getHeaders(HEADER_TICKET);
if (headerValues != null) {
while (headerValues.hasMoreElements()) {
String value = (String) headerValues.nextElement();
String[] atoms = value.split(", ");
for (int i=0; i<atoms.length; i++) {
keys.add(atoms[i]);
}
}
}
String[] paramValues = request.getParameterValues(PARAM_TICKET);
if (paramValues != null) {
for (int i=0; i<paramValues.length; i++) {
keys.add(paramValues[i]);
}
}
return keys;
}
} |
<gh_stars>0
# -*- coding: utf8 -*-
from unittest import skipIf
import django
from django.contrib.auth import authenticate
from django.test.utils import override_settings
from django.utils import unittest
from mock import patch, MagicMock
from nopassword.backends.base import NoPasswordBackend
from nopassword.backends.sms import TwilioBackend
from nopassword.models import LoginCode
from nopassword.utils import get_user_model
class AuthenticationBackendTests(unittest.TestCase):
@override_settings(AUTH_USER_MODULE='tests.NoUsernameUser')
def test_authenticate_with_custom_user_model(self):
"""When a custom user model is used that doesn't have a field
called "username" return `None`
"""
result = authenticate(username='username')
self.assertIsNone(result)
@skipIf(django.VERSION < (1, 5), 'Custom user not supported')
@patch('nopassword.backends.sms.TwilioRestClient')
@override_settings(AUTH_USER_MODEL='tests.PhoneNumberUser', NOPASSWORD_TWILIO_SID="aaaaaaaa",
NOPASSWORD_TWILIO_AUTH_TOKEN="<PASSWORD>", DEFAULT_FROM_NUMBER="+15555555")
def test_twilio_backend(self, mock_object):
self.user = get_user_model().objects.create(username='twilio_user')
self.code = LoginCode.create_code_for_user(self.user, next='/secrets/')
self.assertEqual(len(self.code.code), 20)
self.assertIsNotNone(authenticate(username=self.user.username, code=self.code.code))
self.assertEqual(LoginCode.objects.filter(user=self.user, code=self.code.code).count(), 0)
self.backend = TwilioBackend()
self.backend.twilio_client.messages.create = MagicMock()
self.backend.send_login_code(self.code)
self.assertTrue(mock_object.called)
self.assertTrue(self.backend.twilio_client.messages.create.called)
authenticate(username=self.user.username)
self.assertEqual(LoginCode.objects.filter(user=self.user).count(), 1)
self.user.delete()
class TestBackendUtils(unittest.TestCase):
def setUp(self):
self.user = get_user_model().objects.create(username='test_user')
self.inactive_user = get_user_model().objects.create(username='inactive', is_active=False)
self.backend = NoPasswordBackend()
def tearDown(self):
self.user.delete()
self.inactive_user.delete()
def test_verify_user(self):
self.assertTrue(self.backend.verify_user(self.user))
self.assertFalse(self.backend.verify_user(self.inactive_user))
def test_send_login_code(self):
self.assertRaises(NotImplementedError, self.backend.send_login_code, code=None)
|
<gh_stars>10-100
package cn.qssq666.robot.interfaces;
import java.util.List;
/**
* Created by 情随事迁(<EMAIL>) on 2017/3/10.
*/
public interface AdapterI<MODEL> {
void notifyDataSetChanged();
void appendModels(List<MODEL> models);
void setData(List<MODEL> data);
}
|
class BucketDownloader:
"""
Downloader
A service that fetch list of objects from S3 and orchestrates download of files
"""
def __init__(self, bucket_name=None, target_path=None, max_worker=None, s3_client=None):
self._target_path = target_path or configs.TARGET_PATH
self._max_workers = max_worker or configs.MAX_CONCURRENCY
self._bucket_name = bucket_name or configs.DEFAULT_BUCKET_NAME
self._s3_client = s3_client or S3Client(bucket_name=self._bucket_name)
self._dry_run = True
self._download_queue = multiprocessing.JoinableQueue() # Objects to be downloaded
self._files_to_be_downloaded = multiprocessing.Semaphore(value=0)
def dump_bucket(self, dry_run=False):
"""
Create download workers
Fetch and organize a list of Objects to be downloaded
pass to workers
"""
logger.info("Downloading bucket...")
self._dry_run = dry_run
_download_workers = [multiprocessing.Process(target=self._download_file) for _ in range(self._max_workers)]
[w.start() for w in _download_workers]
_objects = self._s3_client.list_objects()
for _obj in _objects:
logger.debug(f"Checking if '{_obj.key}' is downloaded")
if not self._is_file_exists(_obj.key):
self._download_queue.put(_obj.key)
self._files_to_be_downloaded.release()
# Telling workers to stop
for _ in range(0, self._max_workers):
self._download_queue.put(None)
self._files_to_be_downloaded.release()
# Joining workers
[w.join() for w in _download_workers]
logger.info("Bucket downloaded")
def _download_file(self):
while self._files_to_be_downloaded.acquire():
object_key = self._download_queue.get()
if object_key is None:
break # A sentinel value to quit the loop
if self._dry_run:
return
logger.info(f"Downloading file... ({object_key})")
_file_path = os.path.abspath(os.path.join(self._target_path, object_key))
_dir_name = os.path.dirname(_file_path)
os.makedirs(_dir_name, exist_ok=True)
self._s3_client.download_object(object_key=object_key, file_path=_file_path)
self._download_queue.task_done()
def _is_file_exists(self, file_path):
file_path = os.path.join(self._target_path, file_path)
return os.path.exists(file_path) |
BRIDGEPORT -- Fifteen minutes into the Back-to-School Backpack Giveaway on McLevy Green Tuesday, organizers gave out the last of 400 bags filled with school supplies to city children, prompting Mayor Bill Finch to announce another such event would be held next week.
"Sorry, kids, you'll have to carry your books for a week," Finch said. "If you don't get one today, we'll see you next week."
Organizers had not anticipated the event would attract as many people as it did. At least 1,000 showed up, said Alisson Wood, the youth and community programs manager for the Regional Youth and Adult Substance Abuse Program. RYASAP, with support from local businesses, provided the city with a $10,000 grant for the giveaway.
"It's telling," said Wood, who is also the education director for Playhouse on the Green. "The turnout says a lot about the state of families and youth in Bridgeport. There's clearly a need that's not being met. In addition to physical things for youth, there's a need for things to do."
Michelle McRae came to McLevy Green with her 6-year-old niece Stardeja Thomas-Wells, who enters Bryant School as a first-grader Wednesday. "It's wonderful to be offering this because the economy is so bad now that everybody needs help," said McRae.
Esteban Coyt, 11, a sixth-grader at Cesar Batalla School, said he didn't have a book bag and wanted one. He was also grateful for the supplies inside. "There were pens, pencils, a writing book and a ruler," Esteban said.
"It will help me carry my books and homework folder," said Umajee Anderson, 6, a first-grader at Roosevelt School. Her friend Octavia Williams, 5, a kindergartner at the same school, was thrilled to get a backpack, "because it's blue," her favorite color.
Some parents were upset that the supply ran out because their children won't have backpacks for the first day of school Wednesday.
"This is ridiculous. They have to coordinate this a little better," said Marie Flores, the mother of two school-age children. Flores said it would have made more sense to give the book bags to children at school rather than staging a mass distribution on the green.
Before the bags were distributed, Finch had children raise their right hands and pledge, "When I go to school I will do my best and I will recycle."
Robert Francis, executive director of RYASAP, said Finch is trying to promote Bridgeport as a green city starting with the young residents by instilling in them the idea of recycling materials and being environmentally correct.
"It's important because one day everything is going to run out and people have to appreciate what they have now," said Alec Molina, 11, a seventh-grader at Cesar Batalla School. |
Melbourne-made 3D-printed body parts could replace cadavers for medical training
Updated
Sorry, this video has expired Video: 3D printing set to revolutionise medical training (The World)
A team of medical experts in Melbourne has created a 3D-printed anatomy kit that is set to revolutionise medical training around the world.
The printed body parts which look almost exactly the same as the real thing can be used to replace difficult to get and expensive cadavers that are crucial for training doctors.
On display, the rows of body parts paint a macabre picture - but these hands, feet, brains and hearts are not the real thing - they're 3D-printed copies.
Professor Paul McMenamin, from Monash University in Melbourne, hopes the anatomy kits will change the future of medical education.
"Not everyone has the luxury of having access to real cadavers specimens because of all the problems of handling cadavers, storing cadavers and using them over and over again for teaching purposes," Professor McMenamin said.
"So the advantage of this is that the students could sit in any classroom and look at this, it's a dry powder based print but it's got all the anatomy that a student would need to learn that particular part of anatomy."
Professor McMenamin runs the Centre for Human Anatomy Education at the university.
He says the initial process isn't easy: it requires multiple CT scans of a real body part and then up to 12 hours of printing.
Once that's done, copies are just a click away.
"If you dropped that and it broke you just order another one and we press print," Professor McMenamin said.
The printed body parts are falsely coloured to help students distinguish between the different parts of the anatomy including the ligaments, muscles and blood vessels.
The real specimens gradually lose their colour the longer they are kept.
Teaching tool
It's a huge breakthrough particularly for hospitals in developing countries that can't afford cadavers and for many Middle Eastern countries where accessing them is difficult due to religious reasons.
"There are exceptions for medical schools in that part of the world and they do allow some dissection to occur in medical schools but it's not without its problems and cultural difficulties," Professor McMenamin said.
"Then they've got to get people to donate their bodies and it's that bequest program, how do you get a group of people who religiously believe a body should be not desecrated or touched, to donate their bodies?
"So a lot of these countries don't have bequest programs, they rely on unclaimed bodies and that creates another ethical debate."
Yousef Sadeghi is a Professor of Neuroanatomy at the Shahid Beheshti University of Medical Sciences in Iran.
He believes the 3D printed anatomy series will be a vital tool for teachers, particularly in Muslim countries.
"That can be very useful for the teaching of anatomy, especially for the universities in our area, like the Middle East," Professor Sadeghi said.
"We have a little bit problem with dissecting the human body."
'Not everyone wants every part of the body'
The Monash team is hoping to have the 3D-printed anatomy kits available for sale within six to nine months.
Medical schools and hospitals around the world will be able to buy just an arm or a foot, or the entire body in a box.
"Not everyone wants every part of the body, you know if you were running a podiatry school you might just want a collection of feet dissected like this and 3D printed or hand therapists might just want copies of our 3D printed hands," Professor Paul McMenamin said.
The kits are thought to be the first commercially available resource of its kind.
And Professor McMenamin and his team are not stopping there, they're already working on a way of using 3-D printing technology to teach surgery.
"The skin would have the compliance of real skin, the muscles would feel like real muscles, the tendons would feel like real tendons and then we could create a surgical training tool which could be used over and over again instead of surgeons having to learn by using real patients," he said.
And he says the technology is closer than you think.
Topics: science-and-technology, medical-research, medical-ethics, computers-and-technology, melbourne-3000, asia, iran-islamic-republic-of
First posted |
DAVIS--Professor Steve Nadler of the UC Davis Department of Entomology has been selected to receive the Henry Baldwin Ward Medal, presented by the American Society of Parasitologists (ASP) in recognition of his outstanding contributions to the field of parasitology.
Nadler will be honored at ASP’s 88th annual meeting, set June 26–29 in Quebec City, Quebec. The award, established in 1959, is named for H.B. Ward, the society's first president and founder of the Journal of Parasitology.
Nadler studies the evolutionary biology and molecular phylogenetics of parasites, focusing mainly on nematodes. He joined the UC Davis faculty in 1996, serving as chair of the Department of Nematology from 2005-2011.
A past president of ASP (2007-08), Nadler has published more than 90 journal articles, and co-authored the textbook Foundations of Parasitology. His molecular systematic research is supported by grants from the National Science Foundation, and his publications have yielded fundamental insights into host-parasite co-phylogeny and the evolutionary biology of parasites.
The UC Davis professor has served as an associate editor or editorial board member for several journals, including Parasitology, Journal of Parasitology, and Systematic Parasitology.
Nadler received his bachelor’s degree in biology from Missouri State University, and his doctorate in medical parasitology from Louisiana State University Medical Center. He completed postdoctoral training at the University of Massachusetts, Amherst and Louisiana State University, Baton Rouge. He was appointed assistant professor of biological sciences at Northern Illinois University in 1990.
Henry Baldwin Ward (1865-1945), a native of Troy, N.Y., is considered “The Father of American Parasitology.” A zoologist, parasitologist and administrator, he was the first dean of the University of Nebraska College of Medicine and later served as professor and head of the Department of Zoology at the University of Illinois until his retirement in 1933.
Founded in 1924, ASP is a diverse group of more than 800 scientists from industry, government, and academia who are interested in the study and teaching of parasitology. ASP members contribute not only to the development of parasitology as a discipline, but also to primary research in such fields as systematics, medicine, molecular biology, immunology, physiology, ecology, biochemistry and behavior. |
Pop star also discusses social action, digital music in online chat.
Pop singer Christina Aguilera said she sees her music moving in a more bluesy direction and that she'll explore new ground on her upcoming tour.
"I'll be doing songs from my debut album," Aguilera, 19, told fans in an online chat Thursday (April 28) on sonicnet.com. "But I've changed so much from doing that at 17, so we'll put a whole new twist on things from my album. ... There will be a lot of blues and soul inflections, which is what I've wanted to do more of for a long time."
The tour, which will feature R&B quartet Destiny's Child as the openers, will kick off July 31 in Kansas City, Mo., and will hit 37 cities. "It's going to be really great to explore my creativity and let loose on this tour. I'll be giving it an edgy feel and surreal cool theme."
One feature of the coming shows she described involved getting the crowd excited with her hit "What a Girl Wants" (RealAudio excerpt) and then switching to a piano-and-vocal-only song by her hero, blues legend Etta James.
Aguilera also revealed plans to have the tour's sponsors, Sears and Levi, give away $500 grants to 50 contest winners. "We took the single ... 'Come On Over (All I Want Is You)' (RealAudio excerpt) and named it 'Come On Over and Do Something,' " she said. "It helps youths get involved in any issue they want to choose racism, domestic violence and child abuse and issues that I've personally become involved with."
The singer did not reveal much about her three ongoing recording projects. Her Spanish-language album, she said, will include tracks that blend R&B and salsa, and also will feature duets with Latin singers Luis Fonze and Alejandro Sanz. Aguilera, whose father is from Ecuador, said she can understand Spanish but cannot speak it fluently.
When the chat opened up to questions from fans, Aguilera was asked immediately her opinion on digital music.
"I think it's a great way to check out music and know what's going on out there," she responded, before weighing in on the MP3 controversy, recently inflamed by Metallica's lawsuit against Napster Inc., makers of the popular MP3-trading software by the same name.
"It's great that people can get it for free, and it's cute, but it's not quite honest. I think it's destroying the business a little bit, so if we can get rid of that it would be great." |
def update_file_type(cls, file_name, new_file_type):
gxapi_cy.WrapUSERMETA._update_file_type(GXContext._get_tls_geo(), file_name.encode(), new_file_type.encode()) |
<filename>client/health.go
package client
import (
"net/http"
)
const (
routeHealth = "healthz"
)
// HealthCheck checks whether the node is running and healthy.
func (api *GoShimmerAPI) HealthCheck() error {
return api.do(http.MethodGet, routeHealth, nil, nil)
}
|
<reponame>ThaisMatos/A2LParser<filename>src/main/java/net/alenzen/a2l/VarAddress.java
package net.alenzen.a2l;
import java.io.IOException;
import java.util.ArrayList;
public class VarAddress extends ArrayList<Long> implements IA2LWriteable {
/**
*
*/
private static final long serialVersionUID = 1L;
@Override
public void writeTo(A2LWriter writer) throws IOException {
writer.writelnBeginSpaced("VAR_ADDRESS");
writer.indent();
for (Long l : this) {
if (l != null) {
writer.writeln("0x" + Long.toHexString(l));
}
}
writer.dedent();
writer.writelnEnd("VAR_ADDRESS");
}
}
|
It’s been a rough week (and/or month, and/or year) for those who want to see criminal-justice reform at the federal level. Five days ago, Attorney General Jeff Sessions ordered federal prosecutors to push for the most serious charges — and longest possible sentences — against drug criminals, even those of the nonviolent, low-level variety. And this afternoon, the Trump administration made Sheriff David Clarke Jr. — a man who has called for rounding up the “hundreds of thousands” of ISIS sympathizers living in the United States and imprisoning them indefinitely, without trial — as an assistant secretary in the Department of Homeland Security.
This reversion to “tough on crime (and/or the politically powerless)” policies represents an abrupt turn of the political tide. Before Donald Trump launched our long national nightmare in June 2015, there was a growing bipartisan consensus that America’s criminal-justice system had become overly punitive. African-American activists were mobilized by the events in Ferguson; fiscal conservatives in state legislatures were desperate for fat to cut; the opioid crisis was popularizing the idea of drug addiction as a disease in large swathes of white America; and libertarian billionaires were drawn to the prospect of using federal criminal-justice reform as a cover to gut the enforcement of white-collar crime — and collect favorable press in the process.
The arc of history was bending in the general direction of justice. Crime rates were hovering near historic lows in most of the country. The exceptions were disadvantaged neighborhoods in a few major cities, where reactionary criminal-justice policies boasted little support. There was little reason to suspect a hard right turn was coming.
And to no small degree, that turn was an aberration. True, the Black Lives Matter movement (like every challenge to illegitimate authority brought by a marginalized group) was bound to inspire some amount of reactionary backlash. Nonetheless, Trump was the only GOP candidate to make loud noises about law-and-order, and even he didn’t spend much energy extolling the virtues of the war on drugs. The Trump Justice Department’s far-right orientation is less a product of renewed support for draconian sentencing, than it is of Jeff Sessions’s decision to hop on the Trump train at an early date.
On the local level, reformers’ momentum has continued apace. Even as Trump rode his revanchist message to the summit of American politics, reform candidates ousted tough-on-crime, incumbent prosecutors from Mississippi to Florida to Louisiana. And last November in Illinois, Kim Foxx won control of the nation’s second-largest prosecutor’s office on a platform of leniency toward nonviolent offenders, increased funding for efforts to reverse wrongful convictions, and the reallocation of resources toward combating violent gun crime. Meanwhile, in Harris County, Texas, the newly elected Democratic district attorney Kim Ogg has ceased prosecuting anyone for possession of four ounces or less of marijuana.
And Tuesday night in Philadelphia, reformers won their most audacious victory yet.
Larry Krasner is a former public defender and civil-rights attorney, whose clients have included activists affiliated with Occupy and Black Lives Matter. And last night, he became the district-attorney-in-waiting of America’s fifth-largest city.
In a seven-way Democratic primary race, Krasner captured 38 percent of the vote — nearly twice the support of his closest competitor — in a race that saw unusually high turnout. In the deep-blue city, the donkey party’s nomination all but guarantees him victory this fall.
Philadelphia has not, historically, been a bastion of progressive criminal-justice thinking. We’re talking about the city that once dropped a bomb on its residents, and where Lynne Abraham held the DA’s office for four terms on the strength of her enthusiasm for capital punishment.
DAs have a tremendous amount of discretion in shaping what law enforcement looks like in a city: deciding who is put on trial; making plea deals; and suggesting bail amounts, punishment, and length of sentencing, where applicable … But DAs nationwide face significant barriers to carrying out a reformist agenda, in large measure due to the broader justice system. They don’t work in isolation, but rather in concert with law enforcement, other political offices, and the other arms of the judiciary. The big-ticket items that Krasner and other prosecutors have campaigned on — reforms of asset forfeiture, bail, and the death penalty — are not entirely under a DA office’s purview. That’s not to say that DAs can’t make significant and swift changes: They can move to divest their offices from asset-forfeiture revenue, advise that certain types of defendants aren’t held on cash bail, or refuse to use evidence obtained through stop-and-frisk techniques.
But the kind of deep and lasting change that reformist DAs like Krasner promise comes through shared vision and cooperation with other offices and agencies that may not actually exist.
Nonetheless, Krasner’s victory is a much-needed reminder: Just because we’re living in Trump’s America, doesn’t mean you need to live in his city, county, or state. |
package org.wso2.carbon.bam.service.data.publisher.conf;
import org.wso2.carbon.databridge.agent.thrift.Agent;
import org.wso2.carbon.databridge.agent.thrift.AsyncDataPublisher;
import org.wso2.carbon.databridge.agent.thrift.lb.LoadBalancingDataPublisher;
public class EventPublisherConfig {
AsyncDataPublisher dataPublisher;
LoadBalancingDataPublisher loadBalancingDataPublisher;
static Agent agent = new Agent();
public AsyncDataPublisher getDataPublisher() {
return dataPublisher;
}
public void setDataPublisher(AsyncDataPublisher dataPublisher) {
this.dataPublisher = dataPublisher;
}
public void setLoadBalancingPublisher(LoadBalancingDataPublisher loadBalancingPublisher){
this.loadBalancingDataPublisher = loadBalancingPublisher;
}
public LoadBalancingDataPublisher getLoadBalancingDataPublisher(){
return loadBalancingDataPublisher;
}
public static Agent getAgent(){
return agent;
}
}
|
from . import common_trt as common
from torch import nn
class MWCNN_trt(nn.Module):
def __init__(self, hparams, conv=common.default_conv):
super(MWCNN_trt, self).__init__()
self.hparams = hparams
n_resblocks = hparams.n_resblocks # 20
n_feats = hparams.n_feats # 64
kernel_size = 3
nColor = hparams.n_colors # 1
act = nn.ReLU(True)
self.DWT = common.DWT()
n = 1
m_head = [common.BBlock(conv, nColor, n_feats, kernel_size, act=act)]
d_l0 = []
d_l0.append(common.DBlock_com1(conv, n_feats, n_feats, kernel_size, act=act, bn=False))
d_l1 = [common.BBlock(conv, n_feats * 4, n_feats * 2, kernel_size, act=act, bn=False)]
d_l1.append(common.DBlock_com1(conv, n_feats * 2, n_feats * 2, kernel_size, act=act, bn=False))
d_l2 = []
d_l2.append(common.BBlock(conv, n_feats * 8, n_feats * 4, kernel_size, act=act, bn=False))
d_l2.append(common.DBlock_com1(conv, n_feats * 4, n_feats * 4, kernel_size, act=act, bn=False))
pro_l3 = []
pro_l3.append(common.BBlock(conv, n_feats * 16, n_feats * 8, kernel_size, act=act, bn=False))
pro_l3.append(common.DBlock_com(conv, n_feats * 8, n_feats * 8, kernel_size, act=act, bn=False))
pro_l3.append(common.DBlock_inv(conv, n_feats * 8, n_feats * 8, kernel_size, act=act, bn=False))
pro_l3.append(common.BBlock(conv, n_feats * 8, n_feats * 16, kernel_size, act=act, bn=False))
self.IWT1 = common.IWT(n_feats*16)
i_l2 = [common.DBlock_inv1(conv, n_feats * 4, n_feats * 4, kernel_size, act=act, bn=False)]
i_l2.append(common.BBlock(conv, n_feats * 4, n_feats * 8, kernel_size, act=act, bn=False))
self.IWT2 = common.IWT(n_feats*8)
i_l1 = [common.DBlock_inv1(conv, n_feats * 2, n_feats * 2, kernel_size, act=act, bn=False)]
i_l1.append(common.BBlock(conv, n_feats * 2, n_feats * 4, kernel_size, act=act, bn=False))
self.IWT3 = common.IWT(n_feats*4)
i_l0 = [common.DBlock_inv1(conv, n_feats, n_feats, kernel_size, act=act, bn=False)]
m_tail = [conv(n_feats, nColor, kernel_size)]
self.head = nn.Sequential(*m_head)
self.d_l2 = nn.Sequential(*d_l2)
self.d_l1 = nn.Sequential(*d_l1)
self.d_l0 = nn.Sequential(*d_l0)
self.pro_l3 = nn.Sequential(*pro_l3)
self.i_l2 = nn.Sequential(*i_l2)
self.i_l1 = nn.Sequential(*i_l1)
self.i_l0 = nn.Sequential(*i_l0)
self.tail = nn.Sequential(*m_tail)
def forward(self, x):
x0 = self.d_l0(self.head(x))
x01 = self.DWT(x0)
x1 = self.d_l1(x01)
x12 = self.DWT(x1)
x2 = self.d_l2(x12)
x23 = self.DWT(x2)
x_ = self.IWT1(self.pro_l3(x23)) + x2
x_ = self.IWT2(self.i_l2(x_)) + x1
x_ = self.IWT3(self.i_l1(x_)) + x0
x = self.tail(self.i_l0(x_)) + x
return x
|
import {stripIndent} from 'common-tags';
import {PixelifyTheme} from '@/interfaces/general';
import {ParadigmTheme} from '@/interfaces/namespaces/paradigm';
import {compileStyles, CompileStylesMode} from './compileStyles';
import {EStyleTypes, Formats} from './helpers/tokenProcessors';
interface TestVars {
name: string;
descriptionTheme: Partial<PixelifyTheme<ParadigmTheme>>;
mode?: CompileStylesMode;
result: {
[key in Formats]: string;
};
}
const testData: TestVars[] = [
{
name: 'should compile colors',
descriptionTheme: {
colorAccent: {
normal: 'blue',
hover: 'darkblue',
active: 'darkslateblue',
},
},
result: {
css: stripIndent`
:root {
--vkui--color_accent: blue;
--vkui--color_accent--hover: darkblue;
--vkui--color_accent--active: darkslateblue;
}
`,
scss: stripIndent`
$color-accent: blue;
$color-accent--hover: darkblue;
$color-accent--active: darkslateblue;
`,
pcss: stripIndent`
:root {
--color-accent: blue;
--color-accent--hover: darkblue;
--color-accent--active: darkslateblue;
}
`,
less: stripIndent`
@color-accent: blue;
@color-accent--hover: darkblue;
@color-accent--active: darkslateblue;
`,
styl: stripIndent`
$color-accent = blue;
$color-accent--hover = darkblue;
$color-accent--active = darkslateblue;
`,
},
},
{
name: 'should compile flat class variables',
descriptionTheme: {
fontSome: {
fontSize: '16px',
lineHeight: '25px',
},
} as any,
result: {
css: stripIndent`
:root {
--vkui--font_some--font_size: 16px;
--vkui--font_some--line_height: 25px;
}
.vkui--font_some {
font-size: 16px;
font-size: var(--vkui--font_some--font_size, 16px);
line-height: 25px;
line-height: var(--vkui--font_some--line_height, 25px);
}
`,
scss: stripIndent`
@mixin font-some() {
font-size: 16px;
line-height: 25px;
}
$font-some--map: (
'fontSize': 16px,
'lineHeight': 25px,
);
`,
pcss: stripIndent`
%font-some {
font-size: 16px;
line-height: 25px;
}
`,
less: stripIndent`
.font-some {
font-size: 16px;
line-height: 25px;
}
`,
styl: stripIndent`
font-some() {
font-size: 16px;
line-height: 25px;
}
`,
},
},
{
name: 'should compile adaptive class variables',
descriptionTheme: {
fontText: {
regular: {
fontSize: '15px',
lineHeight: '20px',
fontFamily: 'Arial',
fontWeight: 500,
},
compactX: {
fontSize: '16px',
lineHeight: '24px',
},
},
},
result: {
css: stripIndent`
:root {
--vkui--font_text--font_size--regular: 15px;
--vkui--font_text--line_height--regular: 20px;
--vkui--font_text--font_family--regular: Arial;
--vkui--font_text--font_weight--regular: 500;
--vkui--font_text--font_size--compact_x: 16px;
--vkui--font_text--line_height--compact_x: 24px;
}
.vkui--font_text--regular {
font-size: 15px;
font-size: var(--vkui--font_text--font_size--regular, 15px);
line-height: 20px;
line-height: var(--vkui--font_text--line_height--regular, 20px);
font-family: Arial;
font-family: var(--vkui--font_text--font_family--regular, Arial);
font-weight: 500;
font-weight: var(--vkui--font_text--font_weight--regular, 500);
}
.vkui--font_text--compact-x {
font-size: 16px;
font-size: var(--vkui--font_text--font_size--compact_x, 16px);
line-height: 24px;
line-height: var(--vkui--font_text--line_height--compact_x, 24px);
font-family: Arial;
font-family: var(--vkui--font_text--font_family--regular, Arial);
font-weight: 500;
font-weight: var(--vkui--font_text--font_weight--regular, 500);
}
`,
scss: stripIndent`
@mixin font-text--regular() {
font-size: 15px;
line-height: 20px;
font-family: Arial;
font-weight: 500;
}
$font-text--regular--map: (
'fontSize': 15px,
'lineHeight': 20px,
'fontFamily': Arial,
'fontWeight': 500,
);
@mixin font-text--compact-x() {
font-size: 16px;
line-height: 24px;
font-family: Arial;
font-weight: 500;
}
$font-text--regular--map: (
'fontSize': 15px,
'lineHeight': 20px,
'fontFamily': Arial,
'fontWeight': 500,
);
$font-text--compact-x--map: (
'fontSize': 16px,
'lineHeight': 24px,
'fontFamily': Arial,
'fontWeight': 500,
);
`,
pcss: stripIndent`
%font-text--regular {
font-size: 15px;
line-height: 20px;
font-family: Arial;
font-weight: 500;
}
%font-text--compact-x {
font-size: 16px;
line-height: 24px;
font-family: Arial;
font-weight: 500;
}
`,
less: stripIndent`
.font-text--regular {
font-size: 15px;
line-height: 20px;
font-family: Arial;
font-weight: 500;
}
.font-text--compact-x {
font-size: 16px;
line-height: 24px;
font-family: Arial;
font-weight: 500;
}
`,
styl: stripIndent`
font-text--regular() {
font-size: 15px;
line-height: 20px;
font-family: Arial;
font-weight: 500;
}
font-text--compact-x() {
font-size: 16px;
line-height: 24px;
font-family: Arial;
font-weight: 500;
}
`,
},
},
{
name: 'should compile adaptive flat variables',
descriptionTheme: {
sizePopupBasePadding: {
compact: '20px',
regular: '32px',
large: '40px',
largeX: '50px',
},
},
result: {
css: stripIndent`
:root {
--vkui--size_popup_base_padding--compact: 20px;
--vkui--size_popup_base_padding--regular: 32px;
--vkui--size_popup_base_padding--large: 40px;
--vkui--size_popup_base_padding--large_x: 50px;
}
`,
scss: stripIndent`
$size-popup-base-padding--compact: 20px;
$size-popup-base-padding--regular: 32px;
$size-popup-base-padding--large: 40px;
$size-popup-base-padding--large-x: 50px;
`,
pcss: stripIndent`
:root {
--size-popup-base-padding--compact: 20px;
--size-popup-base-padding--regular: 32px;
--size-popup-base-padding--large: 40px;
--size-popup-base-padding--large_x: 50px;
}
`,
less: stripIndent`
@size-popup-base-padding--compact: 20px;
@size-popup-base-padding--regular: 32px;
@size-popup-base-padding--large: 40px;
@size-popup-base-padding--large-x: 50px;
`,
styl: stripIndent`
$size-popup-base-padding--compact = 20px;
$size-popup-base-padding--regular = 32px;
$size-popup-base-padding--large = 40px;
$size-popup-base-padding--large-x = 50px;
`,
},
},
{
name: 'should compile flat variables',
descriptionTheme: {
opacityDisable: 0.4,
},
result: {
css: stripIndent`
:root {
--vkui--opacity_disable: 0.4;
}
`,
scss: stripIndent`
$opacity-disable: 0.4;
`,
pcss: stripIndent`
:root {
--opacity-disable: 0.4;
}
`,
less: stripIndent`
@opacity-disable: 0.4;
`,
styl: stripIndent`
$opacity-disable = 0.4;
`,
},
},
{
name: 'should compile media queries',
descriptionTheme: {
widthTablet: '(min-width: 768px) and (max-width: 999px)',
widthToDesktopL: '(max-width: 2199px)',
},
result: {
css: stripIndent``,
scss: stripIndent`
@mixin media-width-tablet {
@media (min-width: 768px) and (max-width: 999px) { @content; }
}
@mixin media-width-to-desktop-l {
@media (max-width: 2199px) { @content; }
}
`,
pcss: stripIndent`
@custom-media --width-tablet (min-width: 768px) and (max-width: 999px);
@custom-media --width-to-desktop-l (max-width: 2199px);
`,
less: stripIndent`
.media-width-tablet(@content) {
@media (min-width: 768px) and (max-width: 999px) { @content; }
}
.media-width-to-desktop-l(@content) {
@media (max-width: 2199px) { @content; }
}
`,
styl: stripIndent`
media-width-tablet(content) {
@media (min-width: 768px) and (max-width: 999px) { content }
}
media-width-to-desktop-l(content) {
@media (max-width: 2199px) { content }
}
`,
},
},
{
name: 'should compile adaptive class variables with onlyAdaptiveGroups',
descriptionTheme: {
fontText: {
regular: {
fontSize: '15px',
lineHeight: '20px',
fontFamily: 'Arial',
fontWeight: 500,
},
compact: {
fontSize: '16px',
lineHeight: '24px',
},
},
},
mode: 'onlyAdaptiveGroups',
result: {
css: stripIndent`
.vkui--font_text {
font-size: var(--vkui--font_text--font_size);
line-height: var(--vkui--font_text--line_height);
font-family: var(--vkui--font_text--font_family);
font-weight: var(--vkui--font_text--font_weight);
}
`,
scss: stripIndent``,
pcss: stripIndent``,
less: stripIndent``,
styl: stripIndent``,
},
},
{
name:
'should compile adaptive class variables with mode=withAdaptiveGroups',
mode: 'withAdaptiveGroups',
descriptionTheme: {
fontText: {
regular: {
fontSize: '15px',
lineHeight: '20px',
fontFamily: 'Arial',
fontWeight: 500,
},
compact: {
fontSize: '16px',
lineHeight: '24px',
},
},
},
result: {
css: stripIndent`
:root {
--vkui--font_text--font_size--regular: 15px;
--vkui--font_text--line_height--regular: 20px;
--vkui--font_text--font_family--regular: Arial;
--vkui--font_text--font_weight--regular: 500;
--vkui--font_text--font_size--compact: 16px;
--vkui--font_text--line_height--compact: 24px;
}
.vkui--font_text--regular {
font-size: 15px;
font-size: var(--vkui--font_text--font_size--regular, 15px);
line-height: 20px;
line-height: var(--vkui--font_text--line_height--regular, 20px);
font-family: Arial;
font-family: var(--vkui--font_text--font_family--regular, Arial);
font-weight: 500;
font-weight: var(--vkui--font_text--font_weight--regular, 500);
}
.vkui--font_text {
font-size: var(--vkui--font_text--font_size);
line-height: var(--vkui--font_text--line_height);
font-family: var(--vkui--font_text--font_family);
font-weight: var(--vkui--font_text--font_weight);
}
.vkui--font_text--compact {
font-size: 16px;
font-size: var(--vkui--font_text--font_size--compact, 16px);
line-height: 24px;
line-height: var(--vkui--font_text--line_height--compact, 24px);
font-family: Arial;
font-family: var(--vkui--font_text--font_family--regular, Arial);
font-weight: 500;
font-weight: var(--vkui--font_text--font_weight--regular, 500);
}
`,
scss: stripIndent`
@mixin font-text--regular() {
font-size: 15px;
line-height: 20px;
font-family: Arial;
font-weight: 500;
}
$font-text--regular--map: (
'fontSize': 15px,
'lineHeight': 20px,
'fontFamily': Arial,
'fontWeight': 500,
);
@mixin font-text--compact() {
font-size: 16px;
line-height: 24px;
font-family: Arial;
font-weight: 500;
}
$font-text--regular--map: (
'fontSize': 15px,
'lineHeight': 20px,
'fontFamily': Arial,
'fontWeight': 500,
);
$font-text--compact--map: (
'fontSize': 16px,
'lineHeight': 24px,
'fontFamily': Arial,
'fontWeight': 500,
);
`,
pcss: stripIndent`
%font-text--regular {
font-size: 15px;
line-height: 20px;
font-family: Arial;
font-weight: 500;
}
%font-text--compact {
font-size: 16px;
line-height: 24px;
font-family: Arial;
font-weight: 500;
}
`,
less: stripIndent`
.font-text--regular {
font-size: 15px;
line-height: 20px;
font-family: Arial;
font-weight: 500;
}
.font-text--compact {
font-size: 16px;
line-height: 24px;
font-family: Arial;
font-weight: 500;
}
`,
styl: stripIndent`
font-text--regular() {
font-size: 15px;
line-height: 20px;
font-family: Arial;
font-weight: 500;
}
font-text--compact() {
font-size: 16px;
line-height: 24px;
font-family: Arial;
font-weight: 500;
}
`,
},
},
{
name: 'should compile onlyColors',
mode: 'onlyColors',
descriptionTheme: {
sizeBasePadding: {
regular: 20,
},
colorBackground: {
normal: '#FFF',
hover: '#AAA',
active: '#CCC',
},
},
result: {
css: stripIndent`
:root {
--vkui--color_background: #FFF;
--vkui--color_background--hover: #AAA;
--vkui--color_background--active: #CCC;
}
`,
scss: stripIndent`
$color-background: #FFF;
$color-background--hover: #AAA;
$color-background--active: #CCC;
`,
pcss: stripIndent`
:root {
--color-background: #FFF;
--color-background--hover: #AAA;
--color-background--active: #CCC;
}`,
less: stripIndent`
@color-background: #FFF;
@color-background--hover: #AAA;
@color-background--active: #CCC;
`,
styl: stripIndent`
$color-background = #FFF;
$color-background--hover = #AAA;
$color-background--active = #CCC;
`,
},
},
{
name: 'should compile noSizes',
mode: 'noSizes',
descriptionTheme: {
sizeBasePadding: {
regular: 20,
},
colorBackground: {
normal: '#FFF',
hover: '#AAA',
active: '#CCC',
},
},
result: {
css: stripIndent`
:root {
--vkui--color_background: #FFF;
--vkui--color_background--hover: #AAA;
--vkui--color_background--active: #CCC;
}
`,
scss: stripIndent`
$color-background: #FFF;
$color-background--hover: #AAA;
$color-background--active: #CCC;
`,
pcss: stripIndent`
:root {
--color-background: #FFF;
--color-background--hover: #AAA;
--color-background--active: #CCC;
}`,
less: stripIndent`
@color-background: #FFF;
@color-background--hover: #AAA;
@color-background--active: #CCC;
`,
styl: stripIndent`
$color-background = #FFF;
$color-background--hover = #AAA;
$color-background--active = #CCC;
`,
},
},
];
describe('compileStyles', () => {
Object.values(EStyleTypes).forEach((format) => {
describe(format, () => {
testData.forEach(({name, descriptionTheme, result, mode}) => {
it(name, () => {
expect(compileStyles(format, descriptionTheme, mode)).toBe(
result[format],
);
});
});
});
});
});
|
IMx (Abbott) Immunoassay of Insulin: A Practical Alternative to RIA Hyperinsulinemia Identification in Idiopathic Neurootology and Other Hyperinsulin Metabolic Disorders. Hyperinsulinemia identification as defined by glucose/insulin tolerance has been established as the prime etiological factor in idiopathic neurootological disorders. Insulin assays by radioimmunoassay (RIA) and the IMx (Abbott) immunoassay yielded in 558 of 595 glucose/insulin tolerance a concurrence of 93.7%. The latter measures insulin without cross-reaction with proinsulin. The RIA methodology includes proinsulin. The IMx (Abbott), a micro-particle enzyme immunoassay (MEIA), gave lower values due to its nondetection of proinsulin. Based upon defined insulin values, the dynamic patterns of euinsulinemia, hyperinsulinemia with elevated fasting insulin levels and hyperinsulinemia with impaired and/or hyperglycemia glucose tolerance were concurred 100% by MEIA. All of the nonconcurrences were with normal glucose tolerances when the second and/or third hour insulin values were borderline. The limited utilization of RIA technology and the potential availability of enzymatic immunoassay which requires less technical skills presents MEIA as a practical and precise alternative to RIA hyperinsulinemia identification. The increasing world-wide significance of the clinical pathology of hyperinsulinemia becoming manifest in all disciplines of medicine, warrants the identification and/or exclusion of hyperinsulinemia by cost-effective technology. |
The Tyranny of Health: Doctors and the Regulation of Lifestyle ! Routledge, £9.99, pp 196 ISBN 0 415 23572 3 Rating: ! ! ! In the preface to this remarkable book, Michael Fitzpatrick describes breaking into the house of an elderly couple during a bitterly cold February. The couple had succumbed to a combination of infection and hypothermia. While waiting for the ambulance, Fitzpatrick, a general practitioner working in London, found an untouched leaflet describing the dangers of anonymous sex and the virtues of condoms. This leaflet had been distributed to 23 million homes in the United Kingdom, about half of which contained either an elderly couple or an old person living alone. : /embed/graphic-1.gif : /embed/inline-graphic-1.gif : /embed/inline-graphic-2.gif : /embed/inline-graphic-3.gif |
Bone marrow necrosis complicating chronic myeloid leukaemia. Two women with chronic myeloid leukaemia in chronic phase were found to have bone marrow necrosis when severe bone pains and falling blood counts prompted a marrow examination to exclude blast transformation. One patient survived for 12 months following the event without transforming. The second patient died soon after and was found to have widespread extramedullary disease. |
Monitoring gully erosion at Nyaba river of Enugu state southeastern Nigeria, using remote sensing Erosion is a natural, gradual and continuous process of earth surface displacement caused by various agents of denudation. It is also caused by some anthropogenic activities. Erosion rate of an area at any point in time is dependent mainly on climate and geological factors. Physical aspects of the erosive force experienced in gullies are mainly dependent on the local prevailing climate condition. In this study, remotely sensed data was used in the analysis of gully erosion progression at Nyaba River in Enugu Urban, aimed at mapping and monitoring gully erosion at the study site. Methodologies employed include; data acquisition from field observation and satellite images; data processing and analyses using ilwis 3.7 and Arc GIS 9.3 software. The result showed that gully progressed from 578,713,735 square meters in 1986 to 1, 002,819,723 in 2011. Prediction showed that the magnitude of the gully area is expected to increase as the years go by if measures are not taken to control the expansion rate. The forecast put the expected coverage of gully erosion at Nyaba River to be 45,210,440 square meters by the year 2040. Consequently, recommendations made include: constant monitoring to detect early stages of gully formation; regulation of grazing of pasture in the area; restriction of sand mining from the river bank and construction of water ways to stabilize river flow. In conclusion, monitoring clearly showed that there was a geometric progression in gully formation at Nyaba over years; the expansion was aided more by anthropogenic activities than natural factors. |
The chart that changed a political narrative.
The chart that changed a political narrative.
“If Republicans are thinking about being Johnny One Notes and talking about health care only, I think they are going to be surprised by how little traction they get,” says Steve Bell, senior director of economic policy at the Bipartisan Policy Center and former staff director of the Senate Budget Committee. “I do think the decline in health care costs blunts the Republican message.”
Now, in elections around the country, the conversation about health care economics is changing. When the Obamacare website glitches dominated headlines in the spring, it looked like the entire election would come down to Republicans' unshakable opposition to the law. Yet, Democrats have managed to use the Medicare changes called for in a budget drawn up by Rep. Paul Ryan, R-Wis., to paint GOP candidates as granny-killing extremists. "It's a hot issue," says Jeremy Funk, the communications director for Americans United for Change, a Democratic-leaning nonprofit. "If I was working on any Democratic campaign I would be going after the other side for four votes in a row on the Ryan budget. […] Democrats have even tried to take the nonpartisan Congressional Budget Office's projections about health care spending reductions and use them to reverse the narrative that Obamacare has led to higher costs in medical care.
The remarkable declines in the growth of healthcare spending, particularly for Medicare, are upending Republicans' anti-Obamacare, deficit fetishist attacks on Democrats, allowing Democrats to turn the table on Medicare. Remember that $716 billion lie about Obamacare and Medicare? It has no resonance anymore What's the issue now? The Ryan budget, with its cuts to Medicare and other social insurance programs and its Obamacare repeal, as well as Obamacare's success in reducing the growth in healthcare spending.Add in the fact that nobody's grandma's Medicare was actually cut by Obamacare and the Republican lie becomes impossible to sustain outside of the tea party. Obamacare is not just not bankrupting the country, it's saving health care money. Which gives Democrats ample opportunity to point out how unnecessary and how destructive Republican slash and burn policies are. |
Antilock Brake Systems for the North America Truck Market In 1987, Freightliner Corporation became the first Heavy Duty Truck OEM to introduce ABS in the U.S. This paper looks at the development that lead to this introduction of ABS on Freightliner vehicles. It also examines the perception of ABS in the U.S. market place, and details the steps that were necessary to ensure success. This paper also looks at future trends for ABS in the North American truck market. The many developments and enhancements to the basic ABS, which are possible with advances in digital electronics, are reviewed. |
The influence of L-glutamine on the depression of hepatic cytochrome P450 activity in male rats caused by total parenteral nutrition. Total parenteral nutrition (TPN) bypasses the gut leading to intestinal and hepatic dysfunction, including decreased hepatic cytochrome P450 (P450) activity. Glutamine prevents the TPN-associated changes in gut function and morphology. This study examined the effect of glutamine supplementation on hepatic P450 activities in male Sprague-Dawley rats receiving continuous TPN. Animals received continuous lipid-free TPN for 7 days with 0, 0.1, or 4.5% glutamine. Surgical controls were allowed free access to rat chow. The V(max)/K(m) ratios (intrinsic clearance) for the formation of 4-hydroxymidazolam (CYP3A) were 12.8, 14.6, and 27.7 microl/min/mg for TPN treatment with 0, 0.1%, or 4.5% glutamine, respectively, compared with a chow-fed control (37.1 microl/min/mg). The corresponding values for 1'-hydroxymidazolam formation (CYP3A) were 3.7, 6.1, 11.7, and 15.2 microl/min/mg, respectively. The addition of glutamine to TPN similarly affected the formation rates for 2beta- and 6beta-hydroxytestosterone (CYP3A), and these metabolite formation rates were highly correlated (r = 0.865; p < 0.001). The formation rates for 2alpha- and 16alpha-hydroxytestosterone (CYP2C) were also highly correlated (r = 0.892; p < 0.001). Parenteral glutamine modified the TPN-associated suppression of CYP3A and CYP2C activities in adult male rats receiving TPN. |
/*
* Copyright J. Craig Venter Institute, 2013
*
* The creation of this program was supported by J. Craig Venter Institute
* and National Institute for Allergy and Infectious Diseases (NIAID),
* Contract number HHSN272200900007C.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.jcvi.ometa.action;
import com.opensymphony.xwork2.ActionSupport;
import org.jcvi.ometa.utils.EmailSender;
/**
* Created by IntelliJ IDEA.
* User: hkim
* Date: 9/27/12
* Time: 1:53 PM
*/
public class Help extends ActionSupport {
private String msg;
private String name;
private String email;
public String process() {
String rtnVal = INPUT;
try {
if(msg!=null && msg.length()>0 && name!=null && email!=null) {
EmailSender emailSender = new EmailSender();
StringBuffer sb = new StringBuffer(msg);
sb.append("\n name: " + name);
sb.append("\n email: " + email);
//emailSender.send("help", Constants.SERVICE_NAME+"-Help", sb.toString());
rtnVal = SUCCESS;
}
} catch(Exception ex) {
ex.printStackTrace();
rtnVal = ERROR;
}
return rtnVal;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
}
|
// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved.
// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
// Code generated. DO NOT EDIT.
// VisionService API
//
// A description of the VisionService API.
//
package aivision
import (
"fmt"
"github.com/oracle/oci-go-sdk/v58/common"
"strings"
)
// Page One page document analysis result.
type Page struct {
// Document page number.
PageNumber *int `mandatory:"true" json:"pageNumber"`
Dimensions *Dimensions `mandatory:"false" json:"dimensions"`
// An array of detected document types.
DetectedDocumentTypes []DetectedDocumentType `mandatory:"false" json:"detectedDocumentTypes"`
// An array of detected languages.
DetectedLanguages []DetectedLanguage `mandatory:"false" json:"detectedLanguages"`
// Words detected on the page.
Words []Word `mandatory:"false" json:"words"`
// Text lines detected on the page.
Lines []Line `mandatory:"false" json:"lines"`
// Tables detected on the page.
Tables []Table `mandatory:"false" json:"tables"`
// Form fields detected on the page.
DocumentFields []DocumentField `mandatory:"false" json:"documentFields"`
}
func (m Page) String() string {
return common.PointerString(m)
}
// ValidateEnumValue returns an error when providing an unsupported enum value
// This function is being called during constructing API request process
// Not recommended for calling this function directly
func (m Page) ValidateEnumValue() (bool, error) {
errMessage := []string{}
if len(errMessage) > 0 {
return true, fmt.Errorf(strings.Join(errMessage, "\n"))
}
return false, nil
}
|
<filename>src/main/java/com/alcatrazescapee/cyanide/codec/DelegateMapCodec.java
/*
* Part of the Cyanide mod.
* Licensed under MIT. See the project LICENSE.txt for details.
*/
package com.alcatrazescapee.cyanide.codec;
import java.util.stream.Stream;
import com.mojang.serialization.*;
public class DelegateMapCodec<A> extends MapCodec<A>
{
private final MapCodec<A> delegate;
protected DelegateMapCodec(MapCodec<A> delegate)
{
this.delegate = delegate;
}
public MapCodec<A> delegate()
{
return delegate;
}
@Override
public <T> DataResult<A> decode(DynamicOps<T> ops, MapLike<T> input)
{
return delegate().decode(ops, input);
}
@Override
public <T> RecordBuilder<T> encode(A input, DynamicOps<T> ops, RecordBuilder<T> prefix)
{
return delegate().encode(input, ops, prefix);
}
@Override
public <T> Stream<T> keys(DynamicOps<T> ops)
{
return delegate().keys(ops);
}
}
|
def get_nth_ugly_number(n):
dp = [0] * n
dp[0] = 1
index2, index3, index5 = 0, 0, 0
next2, next3, next5 = 2, 3, 5
for i in range(1, n):
dp[i] = min(next2, next3, next5)
if dp[i] == next2:
index2 += 1
next2 = 2 * dp[index2]
if dp[i] == next3:
index3 += 1
next3 = 3 * dp[index3]
if dp[i] == next5:
index5 += 1
next5 = 5 * dp[index5]
return dp[-1]
def main():
n = int(input('Enter the n!\n'))
ans = get_nth_ugly_number(n)
print(str(n) + 'th ugly number is:', ans)
if __name__ == '__main__':
main() |
Image-guided intramyocardial cell injection: putting a puzzle piece in the right place Despite significant advances in the management of acute myocardial infarction, it remains a major cause of morbidity and mortality. After myocardial infarction, viable myocardium is lost and is replaced by fibrotic tissue. This increases the tensile strength of the infarcted myocardium preventing cardiac rupture. However, ultimately it impairs the contractile capacity of the heart leading to heart failure. For several years, cell transplantation has been employed in the damaged heart of patients with end-stage heart failure. The aim of cell transplantation is to improve cardiac function. Indeed, to this point clinical trials show a modest therapeutic effect of cardiac cell therapy on cardiac function. The positive effects of cell therapy are believed to be mainly mediated by paracrine factors excreted by the transplanted cells. The role of direct cardiomyogenic or angiogenic differentiation of the transplanted cells that have been used in the clinical trials is thought to be small. Furthermore, pre-clinical studies have shown that only low percentages of injected cells survive and engraft in the infarcted myocardium. This finding could explain the modest effects that have been observed in both pre-clinical and clinical studies. Several studies are therefore aiming to improve stem cell survival and engraftment (e.g. by using biomaterials). Besides improving cell survival and engraftment, a better selection of the location of cell injection may also influence the therapeutic effect of such therapy. In the study by Van Slochteren et al. a 3D Cardbox image registration toolbox is used which makes it possible to standardise the transplantation location. In this study, the researchers aimed to transplant stem cells in the 50 % infarct transmurality border zone. It is expected that in this area the stem cells are able to exert their therapeutic effects, while not being deprived of oxygen and nutrients. Indeed, it is known that the physiological niche of bone marrow-derived mesenchymal stem cells, frequently studied for cardiac cell therapy, has a low oxygen tension. Furthermore, several studies have shown that hypoxia enhanced the tissue regenerative potential of bone marrow-derived mesenchymal stem cells. Injection of stem cells in the correct location is therefore of importance to obtain the maximum therapeutic effect, which makes the results of this study highly relevant. The positive effect of cell therapy is also thought to be dependent on cell-to-cell contact. In a recent study it was shown that gap junctional coupling, which is essential in electrochemical communication between cardiomyocytes, is also a key factor in inducing cardiomyogenic differentiation of mesenchymal stem cells. After downregulation of connexin43, the major gap junction protein in the myocardium, cardiomyogenic differentiation of the stem cells was prevented. By overexpressing connexin45 and thereby restoring the ability to respond to cardiomyogenic stimuli provided by neighbouring cardiomyocytes, the cardiomyogenic differentiation potential of the mesenchymal stem cells was restored. The injection at location defined by the study by Van Slochteren et al. makes interaction with cardiomyocytes possible and may therefore increase the therapeutic potential of cardiac cell therapy. To our knowledge, cardiomyogenic differentiation of mesenchymal stem cells that were only adjacent to cardiac fibroblasts was never observed in pre-clinical studies. Whether the excretion of paracrine factors that are involved in regeneration of the infarcted myocardium also depends on the interaction of cardiomyocytes with stem cells, has not yet been investigated. By employing techniques that allow more precise and standardised selection of the target location for cell transplantation, the retention of stem cells in the targeted area may also improve by favouring survival and engraftment. An increase in the retention of stem cells may lead to an increase in the occurrence of arrhythmias. The occurrence of arrhythmias was not studied in the study by Van Slochteren et al. While they show an elegant way to improve injection at the correct location, the engraftment pattern of the stem cells is not controlled by using the 3D Cardbox. In a recent study by Askar et al., the effects of these abovementioned factors, engraftment number and pattern, were shown to be related to the occurrence of arrhythmias. Further investigation is therefore needed to fully understand the role of the 3D Cardbox in optimising cardiac regeneration by stem cell transplantation. Despite significant advances in the management of acute myocardial infarction, it remains a major cause of morbidity and mortality. After myocardial infarction, viable myocardium is lost and is replaced by fibrotic tissue. This increases the tensile strength of the infarcted myocardium preventing cardiac rupture. However, ultimately it impairs the contractile capacity of the heart leading to heart failure. For several years, cell transplantation has been employed in the damaged heart of patients with end-stage heart failure. The aim of cell transplantation is to improve cardiac function. Indeed, to this point clinical trials show a modest therapeutic effect of cardiac cell therapy on cardiac function. The positive effects of cell therapy are believed to be mainly mediated by paracrine factors excreted by the transplanted cells. The role of direct cardiomyogenic or angiogenic differentiation of the transplanted cells that have been used in the clinical trials is thought to be small. Furthermore, pre-clinical studies have shown that only low percentages of injected cells survive and engraft in the infarcted myocardium. This finding could explain the modest effects that have been observed in both pre-clinical and clinical studies. Several studies are therefore aiming to improve stem cell survival and engraftment (e.g. by using biomaterials). Besides improving cell survival and engraftment, a better selection of the location of cell injection may also influence the therapeutic effect of such therapy. In the study by Van Slochteren et al. a 3D Cardbox image registration toolbox is used which makes it possible to standardise the transplantation location. In this study, the researchers aimed to transplant stem cells in the 50 % infarct transmurality border zone. It is expected that in this area the stem cells are able to exert their therapeutic effects, while not being deprived of oxygen and nutrients. Indeed, it is known that the physiological niche of bone marrow-derived mesenchymal stem cells, frequently studied for cardiac cell therapy, has a low oxygen tension. Furthermore, several studies have shown that hypoxia enhanced the tissue regenerative potential of bone marrow-derived mesenchymal stem cells. Injection of stem cells in the correct location is therefore of importance to obtain the maximum therapeutic effect, which makes the results of this study highly relevant. The positive effect of cell therapy is also thought to be dependent on cell-to-cell contact. In a recent study it was shown that gap junctional coupling, which is essential in electrochemical communication between cardiomyocytes, is also a key factor in inducing cardiomyogenic differentiation of mesenchymal stem cells. After downregulation of connexin43, the major gap junction protein in the myocardium, cardiomyogenic differentiation of the stem cells was prevented. By overexpressing connexin45 and thereby restoring the ability to respond to cardiomyogenic stimuli provided by neighbouring cardiomyocytes, the cardiomyogenic differentiation potential of the mesenchymal stem cells was restored. The injection at location defined by the study by Van Slochteren et al. makes interaction with cardiomyocytes possible and may therefore increase the therapeutic potential of cardiac cell therapy. To our knowledge, cardiomyogenic differentiation of mesenchymal stem cells that were only adjacent to cardiac fibroblasts was never observed in pre-clinical studies. Whether the excretion of paracrine factors that are involved in regeneration of the infarcted myocardium also depends on the interaction of cardiomyocytes with stem cells, has not yet been investigated. By employing techniques that allow more precise and standardised selection of the target location for cell transplantation, the retention of stem cells in the targeted area may also improve by favouring survival and engraftment. An increase in the retention of stem cells may lead to an increase in the occurrence of arrhythmias. The occurrence of arrhythmias was not studied in the study by Van Slochteren et al. While they show an elegant way to improve injection at the correct location, the engraftment pattern of the stem cells is not controlled by using the 3D Cardbox. In a recent study by Askar et al., the effects of these abovementioned factors, engraftment number and pattern, were shown to be related to the occurrence of arrhythmias. Further investigation is therefore needed to fully understand the role of the 3D Cardbox in optimising cardiac regeneration by stem cell transplantation. Funding None. Conflict of interests None declared. Open Access This article is distributed under the terms of the Creative Commons Attribution License which permits any use, distribution, and reproduction in any medium, provided the original author(s) and the source are credited. |
Coverage of the 2019 Eurovision Song Contest.
Coverage of the 2018 Eurovision Song Contest.
Coverage of the 2017 Eurovision Song Contest.
Coverage of the 2016 Eurovision Song Contest from Stockholm, Sweden with Graham Norton.
Coverage of the 2015 Eurovision Song Contest from Vienna, Austria with Graham Norton.
Coverage of the 2014 Eurovision Song Contest from Copenhagen, Denmark with Graham Norton.
Coverage of the 2013 Eurovision Song Contest from Malmö, Sweden. With Graham Norton.
Coverage of the 2012 Eurovision Song Contest from Baku, Azerbaijan. With Graham Norton.
The 56th annual Eurovision Song Contest, from Dusseldorf, Germany.
The 55th Annual Eurovision Song Contest, from Oslo, Norway.
The 54th annual Eurovision Song Contest, from Moscow, Russia.
The 53rd annual Eurovision Song Contest, from Belgrade, Serbia.
The 52nd annual Eurovision Song Contest from Helsinki, Finland.
The 51st annual Eurovision Song Contest, from Athens, Greece.
The 50th annual Eurovision Song Contest, from Kiev, Ukraine.
The 49th annual Eurovision Song Contest, from Istanbul, Turkey.
The 48th annual Eurovision Song Contest, from Riga, Latvia.
The 47th annual Eurovision Song Contest, from Tallinn, Estonia.
The 46th annual Eurovision Song Contest from Copenhagen, Denmark.
The 45th annual Eurovision Song Contest, from Stockholm, Sweden.
The 44th annual Eurovision Song Contest from Jerusalem, Israel.
The 43rd annual Eurovision Song Contest, from Birmingham, United Kingdom.
The 42nd annual Eurovision Song Contest, from Dublin, Republic of Ireland.
The 41st annual Eurovision Song Contest from Oslo, Norway.
The 40th annual Eurovision Song Contest from Dublin, Republic of Ireland.
The 39th annual Eurovision Song Contest from Dublin, Republic of Ireland.
The 38th annual Eurovision Song Contest from Millstreet in County Cork, Ireland.
The 37th annual Eurovision Song Contest, from Malmo, Sweden.
The 36th annual Eurovision Song Contest from Rome, Italy.
The 35th annual Eurovision Song Contest, from Zagreb, Yugoslavia. |
/*=========================================================================
Program: Visualization Toolkit
Module: vtkFLUENTReader.cxx
Copyright (c) <NAME>, <NAME>, <NAME>
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// Thanks to <NAME> & <NAME> (Department of Energy, National
// Energy Technology Laboratory) & Douglas McCorkle (Iowa State University)
// who developed this class.
//
// Please address all comments to <NAME> (<EMAIL>) &
// <NAME> (<EMAIL>)
// & <NAME> (<EMAIL>)
#include "vtkFLUENTReader.h"
#include "vtkByteSwap.h"
#include "vtkCellArray.h"
#include "vtkCellData.h"
#include "vtkConvexPointSet.h"
#include "vtkDataArraySelection.h"
#include "vtkDoubleArray.h"
#include "vtkEndian.h"
#include "vtkErrorCode.h"
#include "vtkFieldData.h"
#include "vtkFloatArray.h"
#include "vtkHexahedron.h"
#include "vtkIdTypeArray.h"
#include "vtkInformation.h"
#include "vtkInformationVector.h"
#include "vtkIntArray.h"
#include "vtkMultiBlockDataSet.h"
#include "vtkObjectFactory.h"
#include "vtkPointData.h"
#include "vtkPoints.h"
#include "vtkPyramid.h"
#include "vtkQuad.h"
#include "vtkTetra.h"
#include "vtkTriangle.h"
#include "vtkUnstructuredGrid.h"
#include "vtkWedge.h"
#include "vtksys/Encoding.hxx"
#include "vtksys/FStream.hxx"
#include "fstream"
#include <algorithm>
#include <map>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#include <cctype>
#include <sys/stat.h>
vtkStandardNewMacro(vtkFLUENTReader);
#define VTK_FILE_BYTE_ORDER_BIG_ENDIAN 0
#define VTK_FILE_BYTE_ORDER_LITTLE_ENDIAN 1
// Structures
struct vtkFLUENTReader::Cell
{
int type;
int zone;
std::vector<int> faces;
int parent;
int child;
std::vector<int> nodes;
};
struct vtkFLUENTReader::Face
{
int type;
unsigned int zone;
std::vector<int> nodes;
int c0;
int c1;
int periodicShadow;
int parent;
int child;
int interfaceFaceParent;
int interfaceFaceChild;
int ncgParent;
int ncgChild;
};
struct vtkFLUENTReader::ScalarDataChunk
{
int subsectionId;
vtkIdType zoneId;
std::vector<double> scalarData;
};
struct vtkFLUENTReader::VectorDataChunk
{
int subsectionId;
vtkIdType zoneId;
std::vector<double> iComponentData;
std::vector<double> jComponentData;
std::vector<double> kComponentData;
};
struct vtkFLUENTReader::stdString
{
std::string value;
};
struct vtkFLUENTReader::intVector
{
std::vector<int> value;
};
struct vtkFLUENTReader::doubleVector
{
std::vector<double> value;
};
struct vtkFLUENTReader::stringVector
{
std::vector<std::string> value;
};
struct vtkFLUENTReader::cellVector
{
std::vector<Cell> value;
};
struct vtkFLUENTReader::faceVector
{
std::vector<Face> value;
};
struct vtkFLUENTReader::stdMap
{
std::map<int, std::string> value;
};
struct vtkFLUENTReader::scalarDataVector
{
std::vector<ScalarDataChunk> value;
};
struct vtkFLUENTReader::vectorDataVector
{
std::vector<VectorDataChunk> value;
};
struct vtkFLUENTReader::intVectorVector
{
std::vector<std::vector<int>> value;
};
//------------------------------------------------------------------------------
vtkFLUENTReader::vtkFLUENTReader()
{
this->CellDataArraySelection = vtkDataArraySelection::New();
this->FileName = nullptr;
this->NumberOfCells = 0;
this->NumberOfCellArrays = 0;
this->FluentCaseFile = nullptr;
this->FluentDataFile = nullptr;
this->CaseBuffer = new stdString;
this->DataBuffer = new stdString;
this->Points = vtkPoints::New();
this->Triangle = vtkTriangle::New();
this->Tetra = vtkTetra::New();
this->Quad = vtkQuad::New();
this->Hexahedron = vtkHexahedron::New();
this->Pyramid = vtkPyramid::New();
this->Wedge = vtkWedge::New();
this->ConvexPointSet = vtkConvexPointSet::New();
this->Cells = new cellVector;
this->Faces = new faceVector;
this->VariableNames = new stdMap;
this->CellZones = new intVector;
this->ScalarDataChunks = new scalarDataVector;
this->VectorDataChunks = new vectorDataVector;
this->SubSectionZones = new intVectorVector;
this->SubSectionIds = new intVector;
this->SubSectionSize = new intVector;
this->ScalarVariableNames = new stringVector;
this->ScalarSubSectionIds = new intVector;
this->VectorVariableNames = new stringVector;
this->VectorSubSectionIds = new intVector;
this->SwapBytes = 0;
this->GridDimension = 0;
this->DataPass = 0;
this->NumberOfScalars = 0;
this->NumberOfVectors = 0;
this->SetNumberOfInputPorts(0);
this->SetDataByteOrderToLittleEndian();
}
//------------------------------------------------------------------------------
vtkFLUENTReader::~vtkFLUENTReader()
{
this->Points->Delete();
this->Triangle->Delete();
this->Tetra->Delete();
this->Quad->Delete();
this->Hexahedron->Delete();
this->Pyramid->Delete();
this->Wedge->Delete();
this->ConvexPointSet->Delete();
delete this->CaseBuffer;
delete this->DataBuffer;
delete this->Cells;
delete this->Faces;
delete this->VariableNames;
delete this->CellZones;
delete this->ScalarDataChunks;
delete this->VectorDataChunks;
delete this->SubSectionZones;
delete this->SubSectionIds;
delete this->SubSectionSize;
delete this->ScalarVariableNames;
delete this->ScalarSubSectionIds;
delete this->VectorVariableNames;
delete this->VectorSubSectionIds;
delete this->FluentCaseFile;
delete this->FluentDataFile;
this->CellDataArraySelection->Delete();
delete[] this->FileName;
}
//------------------------------------------------------------------------------
int vtkFLUENTReader::RequestData(vtkInformation* vtkNotUsed(request),
vtkInformationVector** vtkNotUsed(inputVector), vtkInformationVector* outputVector)
{
if (!this->FileName)
{
vtkErrorMacro("FileName has to be specified!");
return 0;
}
vtkInformation* outInfo = outputVector->GetInformationObject(0);
vtkMultiBlockDataSet* output =
vtkMultiBlockDataSet::SafeDownCast(outInfo->Get(vtkMultiBlockDataSet::DATA_OBJECT()));
output->SetNumberOfBlocks(static_cast<unsigned int>(this->CellZones->value.size()));
// vtkUnstructuredGrid *Grid[CellZones.size()];
std::vector<vtkUnstructuredGrid*> grid;
grid.resize(this->CellZones->value.size());
for (size_t test = 0; test < this->CellZones->value.size(); test++)
{
grid[test] = vtkUnstructuredGrid::New();
}
for (size_t i = 0; i < this->Cells->value.size(); i++)
{
size_t location = std::find(this->CellZones->value.begin(), this->CellZones->value.end(),
this->Cells->value[i].zone) -
this->CellZones->value.begin();
;
if (this->Cells->value[i].type == 1)
{
for (int j = 0; j < 3; j++)
{
this->Triangle->GetPointIds()->SetId(j, this->Cells->value[i].nodes[j]);
}
grid[location]->InsertNextCell(this->Triangle->GetCellType(), this->Triangle->GetPointIds());
}
else if (this->Cells->value[i].type == 2)
{
for (int j = 0; j < 4; j++)
{
this->Tetra->GetPointIds()->SetId(j, Cells->value[i].nodes[j]);
}
grid[location]->InsertNextCell(this->Tetra->GetCellType(), this->Tetra->GetPointIds());
}
else if (this->Cells->value[i].type == 3)
{
for (int j = 0; j < 4; j++)
{
this->Quad->GetPointIds()->SetId(j, this->Cells->value[i].nodes[j]);
}
grid[location]->InsertNextCell(this->Quad->GetCellType(), this->Quad->GetPointIds());
}
else if (this->Cells->value[i].type == 4)
{
for (int j = 0; j < 8; j++)
{
this->Hexahedron->GetPointIds()->SetId(j, this->Cells->value[i].nodes[j]);
}
grid[location]->InsertNextCell(
this->Hexahedron->GetCellType(), this->Hexahedron->GetPointIds());
}
else if (this->Cells->value[i].type == 5)
{
for (int j = 0; j < 5; j++)
{
this->Pyramid->GetPointIds()->SetId(j, this->Cells->value[i].nodes[j]);
}
grid[location]->InsertNextCell(this->Pyramid->GetCellType(), this->Pyramid->GetPointIds());
}
else if (this->Cells->value[i].type == 6)
{
for (int j = 0; j < 6; j++)
{
this->Wedge->GetPointIds()->SetId(j, this->Cells->value[i].nodes[j]);
}
grid[location]->InsertNextCell(this->Wedge->GetCellType(), this->Wedge->GetPointIds());
}
else if (this->Cells->value[i].type == 7)
{
this->ConvexPointSet->GetPointIds()->SetNumberOfIds(
static_cast<vtkIdType>(this->Cells->value[i].nodes.size()));
for (size_t j = 0; j < this->Cells->value[i].nodes.size(); j++)
{
this->ConvexPointSet->GetPointIds()->SetId(
static_cast<vtkIdType>(j), this->Cells->value[i].nodes[j]);
}
grid[location]->InsertNextCell(
this->ConvexPointSet->GetCellType(), this->ConvexPointSet->GetPointIds());
}
}
// this->Cells->value.clear();
// Scalar Data
for (size_t l = 0; l < this->ScalarDataChunks->value.size(); l++)
{
size_t location = std::find(this->CellZones->value.begin(), this->CellZones->value.end(),
this->ScalarDataChunks->value[l].zoneId) -
this->CellZones->value.begin();
vtkDoubleArray* v = vtkDoubleArray::New();
for (size_t m = 0; m < this->ScalarDataChunks->value[l].scalarData.size(); m++)
{
v->InsertValue(static_cast<vtkIdType>(m), this->ScalarDataChunks->value[l].scalarData[m]);
}
// v->SetName(this->ScalarVariableNames->
// value[l/this->CellZones->value.size()].c_str());
v->SetName(this->VariableNames->value[this->ScalarDataChunks->value[l].subsectionId].c_str());
grid[location]->GetCellData()->AddArray(v);
v->Delete();
}
this->ScalarDataChunks->value.clear();
// Vector Data
for (size_t l = 0; l < this->VectorDataChunks->value.size(); l++)
{
size_t location = std::find(this->CellZones->value.begin(), this->CellZones->value.end(),
this->VectorDataChunks->value[l].zoneId) -
this->CellZones->value.begin();
vtkDoubleArray* v = vtkDoubleArray::New();
v->SetNumberOfComponents(3);
for (size_t m = 0; m < this->VectorDataChunks->value[l].iComponentData.size(); m++)
{
v->InsertComponent(
static_cast<vtkIdType>(m), 0, this->VectorDataChunks->value[l].iComponentData[m]);
v->InsertComponent(
static_cast<vtkIdType>(m), 1, this->VectorDataChunks->value[l].jComponentData[m]);
v->InsertComponent(
static_cast<vtkIdType>(m), 2, this->VectorDataChunks->value[l].kComponentData[m]);
}
// v->SetName(this->VectorVariableNames->
// value[l/this->CellZones->value.size()].c_str());
v->SetName(this->VariableNames->value[this->VectorDataChunks->value[l].subsectionId].c_str());
grid[location]->GetCellData()->AddArray(v);
v->Delete();
}
this->VectorDataChunks->value.clear();
for (size_t addTo = 0; addTo < this->CellZones->value.size(); addTo++)
{
grid[addTo]->SetPoints(Points);
output->SetBlock(static_cast<unsigned int>(addTo), grid[addTo]);
grid[addTo]->Delete();
}
return 1;
}
//------------------------------------------------------------------------------
void vtkFLUENTReader::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os, indent);
os << indent << "File Name: " << (this->FileName ? this->FileName : "(none)") << endl;
os << indent << "Number Of Cells: " << this->NumberOfCells << endl;
}
//------------------------------------------------------------------------------
int vtkFLUENTReader::RequestInformation(vtkInformation* vtkNotUsed(request),
vtkInformationVector** vtkNotUsed(inputVector), vtkInformationVector* vtkNotUsed(outputVector))
{
if (!this->FileName)
{
vtkErrorMacro("FileName has to be specified!");
return 0;
}
if (!this->OpenCaseFile(this->FileName))
{
vtkErrorMacro("Unable to open cas file.");
return 0;
}
int dat_file_opened = this->OpenDataFile(this->FileName);
if (!dat_file_opened)
{
vtkWarningMacro("Unable to open dat file.");
}
this->LoadVariableNames();
this->ParseCaseFile(); // Reads Necessary Information from the .cas file.
this->CleanCells(); // Removes unnecessary faces from the cells.
this->PopulateCellNodes();
this->GetNumberOfCellZones();
this->NumberOfScalars = 0;
this->NumberOfVectors = 0;
if (dat_file_opened)
{
this->ParseDataFile();
}
for (size_t i = 0; i < this->SubSectionIds->value.size(); i++)
{
if (this->SubSectionSize->value[i] == 1)
{
this->CellDataArraySelection->AddArray(
this->VariableNames->value[this->SubSectionIds->value[i]].c_str());
this->ScalarVariableNames->value.push_back(
this->VariableNames->value[this->SubSectionIds->value[i]]);
this->ScalarSubSectionIds->value.push_back(this->SubSectionIds->value[i]);
}
else if (this->SubSectionSize->value[i] == 3)
{
this->CellDataArraySelection->AddArray(
this->VariableNames->value[this->SubSectionIds->value[i]].c_str());
this->VectorVariableNames->value.push_back(
this->VariableNames->value[this->SubSectionIds->value[i]]);
this->VectorSubSectionIds->value.push_back(this->SubSectionIds->value[i]);
}
}
this->NumberOfCells = static_cast<vtkIdType>(this->Cells->value.size());
return 1;
}
//------------------------------------------------------------------------------
bool vtkFLUENTReader::OpenCaseFile(const char* filename)
{
std::ios_base::openmode mode = ios::in;
#ifdef _WIN32
mode |= ios::binary;
#endif
this->FluentCaseFile = new vtksys::ifstream(filename, mode);
if (!this->FluentCaseFile->fail())
{
return true;
}
else
{
return false;
}
}
//------------------------------------------------------------------------------
int vtkFLUENTReader::GetNumberOfCellArrays()
{
return this->CellDataArraySelection->GetNumberOfArrays();
}
//------------------------------------------------------------------------------
const char* vtkFLUENTReader::GetCellArrayName(int index)
{
return this->CellDataArraySelection->GetArrayName(index);
}
//------------------------------------------------------------------------------
int vtkFLUENTReader::GetCellArrayStatus(const char* name)
{
return this->CellDataArraySelection->ArrayIsEnabled(name);
}
//------------------------------------------------------------------------------
void vtkFLUENTReader::SetCellArrayStatus(const char* name, int status)
{
if (status)
{
this->CellDataArraySelection->EnableArray(name);
}
else
{
this->CellDataArraySelection->DisableArray(name);
}
}
//------------------------------------------------------------------------------
void vtkFLUENTReader::EnableAllCellArrays()
{
this->CellDataArraySelection->EnableAllArrays();
}
//------------------------------------------------------------------------------
void vtkFLUENTReader::DisableAllCellArrays()
{
this->CellDataArraySelection->DisableAllArrays();
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
bool vtkFLUENTReader::OpenDataFile(const char* filename)
{
std::string dfilename(filename);
dfilename.erase(dfilename.length() - 3, 3);
dfilename.append("dat");
std::ios_base::openmode mode = ios::in;
#ifdef _WIN32
mode |= ios::binary;
#endif
this->FluentDataFile = new vtksys::ifstream(dfilename.c_str(), mode);
if (this->FluentDataFile->fail())
{
vtkErrorMacro("Could not open data file "
<< dfilename << "associated with cas file " << filename
<< ". Please verify the cas and dat files have the same base name.");
return false;
}
else
{
return true;
}
}
//------------------------------------------------------------------------------
int vtkFLUENTReader::GetCaseChunk()
{
this->CaseBuffer->value = ""; // Clear buffer
//
// Look for beginning of chunk
//
while (this->FluentCaseFile->peek() != '(')
{
this->FluentCaseFile->get();
if (this->FluentCaseFile->eof())
{
return 0;
}
}
//
// Figure out whether this is a binary or ascii chunk.
// If the index is 3 digits or more, then binary, otherwise ascii.
//
std::string index;
while (this->FluentCaseFile->peek() != ' ')
{
// index.push_back(this->FluentCaseFile->peek());
index += static_cast<char>(this->FluentCaseFile->peek());
// this->CaseBuffer->value.push_back(this->FluentCaseFile->get());
this->CaseBuffer->value += static_cast<char>(this->FluentCaseFile->get());
if (this->FluentCaseFile->eof())
{
return 0;
}
}
index.erase(0, 1); // Get rid of the "("
//
// Grab the chunk and put it in buffer.
// You have to look for the end of section std::string if it is
// a binary chunk.
//
if (index.size() > 2)
{ // Binary Chunk
char end[120];
strcpy(end, "End of Binary Section ");
strcat(end, index.c_str());
strcat(end, ")");
size_t len = strlen(end);
// Load the case buffer enough to start comparing to the end std::string.
while (this->CaseBuffer->value.size() < len)
{
// this->CaseBuffer->value.push_back(this->FluentCaseFile->get());
this->CaseBuffer->value += static_cast<char>(this->FluentCaseFile->get());
}
// while (CaseBuffer.compare(CaseBuffer.size()-strlen(end),
// strlen(end), end))
while (
strcmp(this->CaseBuffer->value.c_str() + (this->CaseBuffer->value.size() - len), end) != 0)
{
// this->CaseBuffer->value.push_back(this->FluentCaseFile->get());
this->CaseBuffer->value += static_cast<char>(this->FluentCaseFile->get());
}
}
else
{ // Ascii Chunk
int level = 0;
while ((this->FluentCaseFile->peek() != ')') || (level != 0))
{
// this->CaseBuffer->value.push_back(this->FluentCaseFile->get());
this->CaseBuffer->value += static_cast<char>(this->FluentCaseFile->get());
if (this->CaseBuffer->value.at(this->CaseBuffer->value.length() - 1) == '(')
{
level++;
}
if (this->CaseBuffer->value.at(this->CaseBuffer->value.length() - 1) == ')')
{
level--;
}
if (this->FluentCaseFile->eof())
{
return 0;
}
}
// this->CaseBuffer->value.push_back(this->FluentCaseFile->get());
this->CaseBuffer->value += static_cast<char>(this->FluentCaseFile->get());
}
return 1;
}
//------------------------------------------------------------------------------
int vtkFLUENTReader::GetCaseIndex()
{
std::string sindex;
int i = 1;
while (this->CaseBuffer->value.at(i) != ' ')
{
// sindex.push_back(this->CaseBuffer->value.at(i++));
sindex += this->CaseBuffer->value.at(i++);
}
return atoi(sindex.c_str());
}
//------------------------------------------------------------------------------
void vtkFLUENTReader::GetNumberOfCellZones()
{
int match;
for (size_t i = 0; i < this->Cells->value.size(); i++)
{
if (this->CellZones->value.empty())
{
this->CellZones->value.push_back(this->Cells->value[i].zone);
}
else
{
match = 0;
for (size_t j = 0; j < this->CellZones->value.size(); j++)
{
if (this->CellZones->value[j] == this->Cells->value[i].zone)
{
match = 1;
}
}
if (match == 0)
{
this->CellZones->value.push_back(this->Cells->value[i].zone);
}
}
}
}
//------------------------------------------------------------------------------
int vtkFLUENTReader::GetDataIndex()
{
std::string sindex;
int i = 1;
while (this->DataBuffer->value.at(i) != ' ')
{
// sindex.push_back(this->DataBuffer->value.at(i++));
sindex += this->DataBuffer->value.at(i++);
}
return atoi(sindex.c_str());
}
//------------------------------------------------------------------------------
int vtkFLUENTReader::GetDataChunk()
{
this->DataBuffer->value = ""; // Clear buffer
//
// Look for beginning of chunk
//
while (this->FluentDataFile->peek() != '(')
{
this->FluentDataFile->get();
if (this->FluentDataFile->eof())
{
return 0;
}
}
//
// Figure out whether this is a binary or ascii chunk.
// If the index is 3 digits or more, then binary, otherwise ascii.
//
std::string index;
while (this->FluentDataFile->peek() != ' ')
{
// index.push_back(this->FluentDataFile->peek());
index += static_cast<char>(this->FluentDataFile->peek());
// this->DataBuffer->value.push_back(this->FluentDataFile->get());
this->DataBuffer->value += static_cast<char>(this->FluentDataFile->get());
if (this->FluentDataFile->eof())
{
return 0;
}
}
index.erase(0, 1); // Get rid of the "("
//
// Grab the chunk and put it in buffer.
// You have to look for the end of section std::string if it is
// a binary chunk.
//
if (index.size() > 3)
{ // Binary Chunk
// it may be in our best interest to do away with the index portion of the
//"end" string - we have found a dataset, that although errant, does work
// fine in ensight and the index does not match - maybe just an end string
// that contains "End of Binary Section" and and a search to relocate the
// file pointer to the "))" entry.
char end[120];
strcpy(end, "End of Binary Section ");
// strcat(end, index.c_str());
// strcat(end, ")");
size_t len = strlen(end);
// Load the data buffer enough to start comparing to the end std::string.
while (this->DataBuffer->value.size() < len)
{
// this->DataBuffer->value.push_back(this->FluentDataFile->get());
this->DataBuffer->value += static_cast<char>(this->FluentDataFile->get());
}
// while (DataBuffer.compare(DataBuffer.size()-strlen(end),
// strlen(end), end))
while (
strcmp(this->DataBuffer->value.c_str() + (this->DataBuffer->value.size() - len), end) != 0)
{
// this->DataBuffer->value.push_back(this->FluentDataFile->get());
this->DataBuffer->value += static_cast<char>(this->FluentDataFile->get());
}
}
else
{ // Ascii Chunk
int level = 0;
while ((this->FluentDataFile->peek() != ')') || (level != 0))
{
// this->DataBuffer->value.push_back(this->FluentDataFile->get());
this->DataBuffer->value += static_cast<char>(this->FluentDataFile->get());
if (this->DataBuffer->value.at(this->DataBuffer->value.length() - 1) == '(')
{
level++;
}
if (this->DataBuffer->value.at(this->DataBuffer->value.length() - 1) == ')')
{
level--;
}
if (this->FluentDataFile->eof())
{
return 0;
}
}
// this->DataBuffer->value.push_back(this->FluentDataFile->get());
this->DataBuffer->value += static_cast<char>(this->FluentDataFile->get());
}
return 1;
}
struct
{
size_t index;
const char* name;
} variable_info[] = {
//
{ 1, "PRESSURE" },
{ 2, "MOMENTUM" },
{ 3, "TEMPERATURE" },
{ 4, "ENTHALPY" },
{ 5, "TKE" },
{ 6, "TED" },
{ 7, "SPECIES" },
{ 8, "G" },
{ 9, "WSWIRL" },
{ 10, "DPMS_MASS" },
{ 11, "DPMS_MOM" },
{ 12, "DPMS_ENERGY" },
{ 13, "DPMS_SPECIES" },
{ 14, "DVOLUME_DT" },
{ 15, "BODY_FORCES" },
{ 16, "FMEAN" },
{ 17, "FVAR" },
{ 18, "MASS_FLUX" },
{ 19, "WALL_SHEAR" },
{ 20, "BOUNDARY_HEAT_FLUX" },
{ 21, "BOUNDARY_RAD_HEAT_FLUX" },
{ 22, "OLD_PRESSURE" },
{ 23, "POLLUT" },
{ 24, "DPMS_P1_S" },
{ 25, "DPMS_P1_AP" },
{ 26, "WALL_GAS_TEMPERATURE" },
{ 27, "DPMS_P1_DIFF" },
{ 28, "DR_SURF" },
{ 29, "W_M1" },
{ 30, "W_M2" },
{ 31, "DPMS_BURNOUT" },
//
{ 32, "DPMS_CONCENTRATION" },
{ 33, "PDF_MW" },
{ 34, "DPMS_WSWIRL" },
{ 35, "YPLUS" },
{ 36, "YPLUS_UTAU" },
{ 37, "WALL_SHEAR_SWIRL" },
{ 38, "WALL_T_INNER" },
{ 39, "POLLUT0" },
{ 40, "POLLUT1" },
{ 41, "WALL_G_INNER" },
{ 42, "PREMIXC" },
{ 43, "PREMIXC_T" },
{ 44, "PREMIXC_RATE" },
{ 45, "POLLUT2" },
{ 46, "POLLUT3" },
{ 47, "MASS_FLUX_M1" },
{ 48, "MASS_FLUX_M2" },
{ 49, "GRID_FLUX" },
{ 50, "DO_I" },
{ 51, "DO_RECON_I" },
{ 52, "DO_ENERGY_SOURCE" },
{ 53, "DO_IRRAD" },
{ 54, "DO_QMINUS" },
{ 55, "DO_IRRAD_OLD" },
{ 56, "DO_IWX=56" },
{ 57, "DO_IWY" },
{ 58, "DO_IWZ" },
{ 59, "MACH" },
{ 60, "SLIP_U" },
{ 61, "SLIP_V" },
{ 62, "SLIP_W" },
{ 63, "SDR" },
{ 64, "SDR_M1" },
{ 65, "SDR_M2" },
{ 66, "POLLUT4" },
{ 67, "GRANULAR_TEMPERATURE" },
{ 68, "GRANULAR_TEMPERATURE_M1" },
{ 69, "GRANULAR_TEMPERATURE_M2" },
{ 70, "VFLUX" },
{ 80, "VFLUX_M1" },
{ 90, "VFLUX_M2" },
{ 91, "DO_QNET" },
{ 92, "DO_QTRANS" },
{ 93, "DO_QREFL" },
{ 94, "DO_QABS" },
{ 95, "POLLUT5" },
{ 96, "WALL_DIST" },
{ 97, "SOLAR_SOURCE" },
{ 98, "SOLAR_QREFL" },
{ 99, "SOLAR_QABS" },
{ 100, "SOLAR_QTRANS" },
{ 101, "DENSITY" },
{ 102, "MU_LAM" },
{ 103, "MU_TURB" },
{ 104, "CP" },
{ 105, "KTC" },
{ 106, "VGS_DTRM" },
{ 107, "VGF_DTRM" },
{ 108, "RSTRESS" },
{ 109, "THREAD_RAD_FLUX" },
{ 110, "SPE_Q" },
{ 111, "X_VELOCITY" },
{ 112, "Y_VELOCITY" },
{ 113, "Z_VELOCITY" },
{ 114, "WALL_VELOCITY" },
{ 115, "X_VELOCITY_M1" },
{ 116, "Y_VELOCITY_M1" },
{ 117, "Z_VELOCITY_M1" },
{ 118, "PHASE_MASS" },
{ 119, "TKE_M1" },
{ 120, "TED_M1" },
{ 121, "POLLUT6" },
{ 122, "X_VELOCITY_M2" },
{ 123, "Y_VELOCITY_M2" },
{ 124, "Z_VELOCITY_M2" },
{ 126, "TKE_M2" },
{ 127, "TED_M2" },
{ 128, "RUU" },
{ 129, "RVV" },
{ 130, "RWW" },
{ 131, "RUV" },
{ 132, "RVW" },
{ 133, "RUW" },
{ 134, "DPMS_EROSION" },
{ 135, "DPMS_ACCRETION" },
{ 136, "FMEAN2" },
{ 137, "FVAR2" },
{ 138, "ENTHALPY_M1" },
{ 139, "ENTHALPY_M2" },
{ 140, "FMEAN_M1" },
{ 141, "FMEAN_M2" },
{ 142, "FVAR_M1" },
{ 143, "FVAR_M2" },
{ 144, "FMEAN2_M1" },
{ 145, "FMEAN2_M2" },
{ 146, "FVAR2_M1" },
{ 147, "FVAR2_M2" },
{ 148, "PREMIXC_M1" },
{ 149, "PREMIXC_M2" },
{ 150, "VOF" },
{ 151, "VOF_1" },
{ 152, "VOF_2" },
{ 153, "VOF_3" },
{ 154, "VOF_4" },
{ 160, "VOF_M1" },
{ 161, "VOF_1_M1" },
{ 162, "VOF_2_M1" },
{ 163, "VOF_3_M1" },
{ 164, "VOF_4_M1" },
{ 170, "VOF_M2" },
{ 171, "VOF_1_M2" },
{ 172, "VOF_2_M2" },
{ 173, "VOF_3_M2" },
{ 174, "VOF_4_M2" },
{ 180, "VOLUME_M2" },
{ 181, "WALL_GRID_VELOCITY" },
{ 182, "POLLUT7" },
{ 183, "POLLUT8" },
{ 184, "POLLUT9" },
{ 185, "POLLUT10" },
{ 186, "POLLUT11" },
{ 187, "POLLUT12" },
{ 188, "POLLUT13" },
{ 190, "SV_T_AUX" },
{ 191, "SV_T_AP_AUX" },
{ 192, "TOTAL_PRESSURE" },
{ 193, "TOTAL_TEMPERATURE" },
{ 194, "NRBC_DC" },
{ 195, "DP_TMFR" },
// Y_*
{ 200, "Y_00" },
{ 201, "Y_01" },
{ 202, "Y_02" },
{ 203, "Y_03" },
{ 204, "Y_04" },
{ 205, "Y_05" },
{ 206, "Y_06" },
{ 207, "Y_07" },
{ 208, "Y_08" },
{ 209, "Y_09" },
{ 210, "Y_10" },
{ 211, "Y_11" },
{ 212, "Y_12" },
{ 213, "Y_13" },
{ 214, "Y_14" },
{ 215, "Y_15" },
{ 216, "Y_16" },
{ 217, "Y_17" },
{ 218, "Y_18" },
{ 219, "Y_19" },
{ 220, "Y_20" },
{ 221, "Y_21" },
{ 222, "Y_22" },
{ 223, "Y_23" },
{ 224, "Y_24" },
{ 225, "Y_25" },
{ 226, "Y_26" },
{ 227, "Y_27" },
{ 228, "Y_28" },
{ 229, "Y_29" },
{ 230, "Y_30" },
{ 231, "Y_31" },
{ 232, "Y_32" },
{ 233, "Y_33" },
{ 234, "Y_34" },
{ 235, "Y_35" },
{ 236, "Y_36" },
{ 237, "Y_37" },
{ 238, "Y_38" },
{ 239, "Y_39" },
{ 240, "Y_40" },
{ 241, "Y_41" },
{ 242, "Y_42" },
{ 243, "Y_43" },
{ 244, "Y_44" },
{ 245, "Y_45" },
{ 246, "Y_46" },
{ 247, "Y_47" },
{ 248, "Y_48" },
{ 249, "Y_49" },
// Y_M1_*
{ 250, "Y_M1_00" },
{ 251, "Y_M1_01" },
{ 252, "Y_M1_02" },
{ 253, "Y_M1_03" },
{ 254, "Y_M1_04" },
{ 255, "Y_M1_05" },
{ 256, "Y_M1_06" },
{ 257, "Y_M1_07" },
{ 258, "Y_M1_08" },
{ 259, "Y_M1_09" },
{ 260, "Y_M1_10" },
{ 261, "Y_M1_11" },
{ 262, "Y_M1_12" },
{ 263, "Y_M1_13" },
{ 264, "Y_M1_14" },
{ 265, "Y_M1_15" },
{ 266, "Y_M1_16" },
{ 267, "Y_M1_17" },
{ 268, "Y_M1_18" },
{ 269, "Y_M1_19" },
{ 270, "Y_M1_20" },
{ 271, "Y_M1_21" },
{ 272, "Y_M1_22" },
{ 273, "Y_M1_23" },
{ 274, "Y_M1_24" },
{ 275, "Y_M1_25" },
{ 276, "Y_M1_26" },
{ 277, "Y_M1_27" },
{ 278, "Y_M1_28" },
{ 279, "Y_M1_29" },
{ 280, "Y_M1_30" },
{ 281, "Y_M1_31" },
{ 282, "Y_M1_32" },
{ 283, "Y_M1_33" },
{ 284, "Y_M1_34" },
{ 285, "Y_M1_35" },
{ 286, "Y_M1_36" },
{ 287, "Y_M1_37" },
{ 288, "Y_M1_38" },
{ 289, "Y_M1_39" },
{ 290, "Y_M1_40" },
{ 291, "Y_M1_41" },
{ 292, "Y_M1_42" },
{ 293, "Y_M1_43" },
{ 294, "Y_M1_44" },
{ 295, "Y_M1_45" },
{ 296, "Y_M1_46" },
{ 297, "Y_M1_47" },
{ 298, "Y_M1_48" },
{ 299, "Y_M1_49" },
// Y_M2_*
{ 300, "Y_M2_00" },
{ 301, "Y_M2_01" },
{ 302, "Y_M2_02" },
{ 303, "Y_M2_03" },
{ 304, "Y_M2_04" },
{ 305, "Y_M2_05" },
{ 306, "Y_M2_06" },
{ 307, "Y_M2_07" },
{ 308, "Y_M2_08" },
{ 309, "Y_M2_09" },
{ 310, "Y_M2_10" },
{ 311, "Y_M2_11" },
{ 312, "Y_M2_12" },
{ 313, "Y_M2_13" },
{ 314, "Y_M2_14" },
{ 315, "Y_M2_15" },
{ 316, "Y_M2_16" },
{ 317, "Y_M2_17" },
{ 318, "Y_M2_18" },
{ 319, "Y_M2_19" },
{ 320, "Y_M2_20" },
{ 321, "Y_M2_21" },
{ 322, "Y_M2_22" },
{ 323, "Y_M2_23" },
{ 324, "Y_M2_24" },
{ 325, "Y_M2_25" },
{ 326, "Y_M2_26" },
{ 327, "Y_M2_27" },
{ 328, "Y_M2_28" },
{ 329, "Y_M2_29" },
{ 330, "Y_M2_30" },
{ 331, "Y_M2_31" },
{ 332, "Y_M2_32" },
{ 333, "Y_M2_33" },
{ 334, "Y_M2_34" },
{ 335, "Y_M2_35" },
{ 336, "Y_M2_36" },
{ 337, "Y_M2_37" },
{ 338, "Y_M2_38" },
{ 339, "Y_M2_39" },
{ 340, "Y_M2_40" },
{ 341, "Y_M2_41" },
{ 342, "Y_M2_42" },
{ 343, "Y_M2_43" },
{ 344, "Y_M2_44" },
{ 345, "Y_M2_45" },
{ 346, "Y_M2_46" },
{ 347, "Y_M2_47" },
{ 348, "Y_M2_48" },
{ 349, "Y_M2_49" },
// DR_SURF_*
{ 350, "DR_SURF_00" },
{ 351, "DR_SURF_01" },
{ 352, "DR_SURF_02" },
{ 353, "DR_SURF_03" },
{ 354, "DR_SURF_04" },
{ 355, "DR_SURF_05" },
{ 356, "DR_SURF_06" },
{ 357, "DR_SURF_07" },
{ 358, "DR_SURF_08" },
{ 359, "DR_SURF_09" },
{ 360, "DR_SURF_10" },
{ 361, "DR_SURF_11" },
{ 362, "DR_SURF_12" },
{ 363, "DR_SURF_13" },
{ 364, "DR_SURF_14" },
{ 365, "DR_SURF_15" },
{ 366, "DR_SURF_16" },
{ 367, "DR_SURF_17" },
{ 368, "DR_SURF_18" },
{ 369, "DR_SURF_19" },
{ 370, "DR_SURF_20" },
{ 371, "DR_SURF_21" },
{ 372, "DR_SURF_22" },
{ 373, "DR_SURF_23" },
{ 374, "DR_SURF_24" },
{ 375, "DR_SURF_25" },
{ 376, "DR_SURF_26" },
{ 377, "DR_SURF_27" },
{ 378, "DR_SURF_28" },
{ 379, "DR_SURF_29" },
{ 380, "DR_SURF_30" },
{ 381, "DR_SURF_31" },
{ 382, "DR_SURF_32" },
{ 383, "DR_SURF_33" },
{ 384, "DR_SURF_34" },
{ 385, "DR_SURF_35" },
{ 386, "DR_SURF_36" },
{ 387, "DR_SURF_37" },
{ 388, "DR_SURF_38" },
{ 389, "DR_SURF_39" },
{ 390, "DR_SURF_40" },
{ 391, "DR_SURF_41" },
{ 392, "DR_SURF_42" },
{ 393, "DR_SURF_43" },
{ 394, "DR_SURF_44" },
{ 395, "DR_SURF_45" },
{ 396, "DR_SURF_46" },
{ 397, "DR_SURF_47" },
{ 398, "DR_SURF_48" },
{ 399, "DR_SURF_49" },
//
{ 400, "PRESSURE_MEAN" },
{ 401, "PRESSURE_RMS" },
{ 402, "X_VELOCITY_MEAN" },
{ 403, "X_VELOCITY_RMS" },
{ 404, "Y_VELOCITY_MEAN" },
{ 405, "Y_VELOCITY_RMS" },
{ 406, "Z_VELOCITY_MEAN" },
{ 407, "Z_VELOCITY_RMS" },
{ 408, "TEMPERATURE_MEAN" },
{ 409, "TEMPERATURE_RMS" },
{ 410, "VOF_MEAN" },
{ 411, "VOF_RMS" },
{ 412, "PRESSURE_M1" },
{ 413, "PRESSURE_M2" },
{ 414, "GRANULAR_TEMPERATURE_MEAN" },
{ 415, "GRANULAR_TEMPERATURE_RMS" },
// DPMS_Y_*
{ 450, "DPMS_Y_00" },
{ 451, "DPMS_Y_01" },
{ 452, "DPMS_Y_02" },
{ 453, "DPMS_Y_03" },
{ 454, "DPMS_Y_04" },
{ 455, "DPMS_Y_05" },
{ 456, "DPMS_Y_06" },
{ 457, "DPMS_Y_07" },
{ 458, "DPMS_Y_08" },
{ 459, "DPMS_Y_09" },
{ 460, "DPMS_Y_10" },
{ 461, "DPMS_Y_11" },
{ 462, "DPMS_Y_12" },
{ 463, "DPMS_Y_13" },
{ 464, "DPMS_Y_14" },
{ 465, "DPMS_Y_15" },
{ 466, "DPMS_Y_16" },
{ 467, "DPMS_Y_17" },
{ 468, "DPMS_Y_18" },
{ 469, "DPMS_Y_19" },
{ 470, "DPMS_Y_20" },
{ 471, "DPMS_Y_21" },
{ 472, "DPMS_Y_22" },
{ 473, "DPMS_Y_23" },
{ 474, "DPMS_Y_24" },
{ 475, "DPMS_Y_25" },
{ 476, "DPMS_Y_26" },
{ 477, "DPMS_Y_27" },
{ 478, "DPMS_Y_28" },
{ 479, "DPMS_Y_29" },
{ 480, "DPMS_Y_30" },
{ 481, "DPMS_Y_31" },
{ 482, "DPMS_Y_32" },
{ 483, "DPMS_Y_33" },
{ 484, "DPMS_Y_34" },
{ 485, "DPMS_Y_35" },
{ 486, "DPMS_Y_36" },
{ 487, "DPMS_Y_37" },
{ 488, "DPMS_Y_38" },
{ 489, "DPMS_Y_39" },
{ 490, "DPMS_Y_40" },
{ 491, "DPMS_Y_41" },
{ 492, "DPMS_Y_42" },
{ 493, "DPMS_Y_43" },
{ 494, "DPMS_Y_44" },
{ 495, "DPMS_Y_45" },
{ 496, "DPMS_Y_46" },
{ 497, "DPMS_Y_47" },
{ 498, "DPMS_Y_48" },
{ 499, "DPMS_Y_49" },
//
{ 500, "NUT" },
{ 501, "NUT_M1" },
{ 502, "NUT_M2" },
{ 503, "RUU_M1" },
{ 504, "RVV_M1" },
{ 505, "RWW_M1" },
{ 506, "RUV_M1" },
{ 507, "RVW_M1" },
{ 508, "RUW_M1" },
{ 509, "RUU_M2" },
{ 510, "RVV_M2" },
{ 511, "RWW_M2" },
{ 512, "RUV_M2" },
{ 513, "RVW_M2" },
{ 514, "RUW_M2" },
{ 515, "ENERGY_M1" },
{ 516, "ENERGY_M2" },
{ 517, "DENSITY_M1" },
{ 518, "DENSITY_M2" },
{ 519, "DPMS_PDF_1" },
{ 520, "DPMS_PDF_2" },
{ 521, "V2" },
{ 522, "V2_M1" },
{ 523, "V2_M2" },
{ 524, "FEL" },
{ 525, "FEL_M1" },
{ 526, "FEL_M2" },
{ 527, "LKE" },
{ 528, "LKE_M1" },
{ 529, "LKE_M2" },
{ 530, "SHELL_CELL_T" },
{ 531, "SHELL_FACE_T" },
{ 532, "SHELL_CELL_ENERGY_M1" },
{ 533, "SHELL_CELL_ENERGY_M2" },
{ 540, "DPMS_TKE" },
{ 541, "DPMS_D" },
{ 542, "DPMS_O" },
{ 543, "DPMS_TKE_RUU" },
{ 544, "DPMS_TKE_RVV" },
{ 545, "DPMS_TKE_RWW" },
{ 546, "DPMS_TKE_RUV" },
{ 547, "DPMS_TKE_RVW" },
{ 548, "DPMS_TKE_RUW" },
{ 549, "DPMS_DS_MASS" },
{ 550, "DPMS_DS_ENERGY" },
{ 551, "DPMS_DS_TKE" },
{ 552, "DPMS_DS_D" },
{ 553, "DPMS_DS_O" },
{ 554, "DPMS_DS_TKE_RUU" },
{ 555, "DPMS_DS_TKE_RVV" },
{ 556, "DPMS_DS_TKE_RWW" },
{ 557, "DPMS_DS_TKE_RUV" },
{ 558, "DPMS_DS_TKE_RVW" },
{ 559, "DPMS_DS_TKE_RUW" },
{ 560, "DPMS_DS_PDF_1" },
{ 561, "DPMS_DS_PDF_2" },
{ 562, "DPMS_DS_EMISS" },
{ 563, "DPMS_DS_ABS" },
{ 564, "DPMS_DS_SCAT" },
{ 565, "DPMS_DS_BURNOUT" },
{ 566, "DPMS_DS_MOM" },
{ 567, "DPMS_DS_WSWIRL" },
{ 580, "MU_TURB_L" },
{ 581, "MU_TURB_S" },
{ 582, "TKE_TRANS" },
{ 583, "TKE_TRANS_M1" },
{ 584, "TKE_TRANS_M2" },
{ 585, "MU_TURB_W" },
{ 600, "DELH" },
{ 601, "DPMS_MOM_AP" },
{ 602, "DPMS_WSWIRL_AP" },
{ 603, "X_PULL" },
{ 604, "Y_PULL" },
{ 605, "Z_PULL" },
{ 606, "LIQF" },
{ 610, "PDFT_QBAR" },
{ 611, "PDFT_PHI" },
{ 612, "PDFT_Q_TA" },
{ 613, "PDFT_SVOL_TA" },
{ 614, "PDFT_MASS_TA" },
{ 615, "PDFT_T4_TA" },
{ 620, "MICRO_MIX_FVAR1 " },
{ 621, "MICRO_MIX_FVAR2 " },
{ 622, "MICRO_MIX_FVAR3 " },
{ 623, "MICRO_MIX_FVAR1_M1 " },
{ 624, "MICRO_MIX_FVAR2_M1 " },
{ 625, "MICRO_MIX_FVAR3_M1 " },
{ 626, "MICRO_MIX_FVAR1_M2 " },
{ 627, "MICRO_MIX_FVAR2_M2 " },
{ 628, "MICRO_MIX_FVAR3_M2 " },
{ 630, "SCAD_LES " },
{ 635, "UFLA_Y " },
{ 636, "UFLA_Y_M1 " },
{ 637, "UFLA_Y_M2 " },
{ 645, "CREV_MASS" },
{ 646, "CREV_ENRG" },
{ 647, "CREV_MOM" },
{ 650, "ACOUSTICS_MODEL" },
{ 651, "AC_RECEIVERS_DATA" },
{ 652, "SV_DPDT_RMS" },
{ 653, "SV_PRESSURE_M1" },
{ 654, "AC_PERIODIC_INDEX" },
{ 655, "AC_PERIODIC_PS" },
{ 656, "AC_F_NORMAL" },
{ 657, "AC_F_CENTROID" },
{ 660, "IGNITE" },
{ 661, "IGNITE_M1" },
{ 662, "IGNITE_M2" },
{ 663, "IGNITE_RATE" },
// *_MEAN
{ 680, "WALL_SHEAR_MEAN" },
{ 681, "UV_MEAN" },
{ 682, "UW_MEAN" },
{ 683, "VW_MEAN" },
{ 684, "UT_MEAN" },
{ 685, "VT_MEAN" },
{ 686, "WT_MEAN" },
{ 687, "BOUNDARY_HEAT_FLUX_MEAN" },
// UDS_*
{ 700, "UDS_00" },
{ 701, "UDS_01" },
{ 702, "UDS_02" },
{ 703, "UDS_03" },
{ 704, "UDS_04" },
{ 705, "UDS_05" },
{ 706, "UDS_06" },
{ 707, "UDS_07" },
{ 708, "UDS_08" },
{ 709, "UDS_09" },
{ 710, "UDS_10" },
{ 711, "UDS_11" },
{ 712, "UDS_12" },
{ 713, "UDS_13" },
{ 714, "UDS_14" },
{ 715, "UDS_15" },
{ 716, "UDS_16" },
{ 717, "UDS_17" },
{ 718, "UDS_18" },
{ 719, "UDS_19" },
{ 720, "UDS_20" },
{ 721, "UDS_21" },
{ 722, "UDS_22" },
{ 723, "UDS_23" },
{ 724, "UDS_24" },
{ 725, "UDS_25" },
{ 726, "UDS_26" },
{ 727, "UDS_27" },
{ 728, "UDS_28" },
{ 729, "UDS_29" },
{ 730, "UDS_30" },
{ 731, "UDS_31" },
{ 732, "UDS_32" },
{ 733, "UDS_33" },
{ 734, "UDS_34" },
{ 735, "UDS_35" },
{ 736, "UDS_36" },
{ 737, "UDS_37" },
{ 738, "UDS_38" },
{ 739, "UDS_39" },
{ 740, "UDS_40" },
{ 741, "UDS_41" },
{ 742, "UDS_42" },
{ 743, "UDS_43" },
{ 744, "UDS_44" },
{ 745, "UDS_45" },
{ 746, "UDS_46" },
{ 747, "UDS_47" },
{ 748, "UDS_48" },
{ 749, "UDS_49" },
// UDS_M1_*
{ 750, "UDS_M1_00" },
{ 751, "UDS_M1_01" },
{ 752, "UDS_M1_02" },
{ 753, "UDS_M1_03" },
{ 754, "UDS_M1_04" },
{ 755, "UDS_M1_05" },
{ 756, "UDS_M1_06" },
{ 757, "UDS_M1_07" },
{ 758, "UDS_M1_08" },
{ 759, "UDS_M1_09" },
{ 760, "UDS_M1_10" },
{ 761, "UDS_M1_11" },
{ 762, "UDS_M1_12" },
{ 763, "UDS_M1_13" },
{ 764, "UDS_M1_14" },
{ 765, "UDS_M1_15" },
{ 766, "UDS_M1_16" },
{ 767, "UDS_M1_17" },
{ 768, "UDS_M1_18" },
{ 769, "UDS_M1_19" },
{ 770, "UDS_M1_20" },
{ 771, "UDS_M1_21" },
{ 772, "UDS_M1_22" },
{ 773, "UDS_M1_23" },
{ 774, "UDS_M1_24" },
{ 775, "UDS_M1_25" },
{ 776, "UDS_M1_26" },
{ 777, "UDS_M1_27" },
{ 778, "UDS_M1_28" },
{ 779, "UDS_M1_29" },
{ 780, "UDS_M1_30" },
{ 781, "UDS_M1_31" },
{ 782, "UDS_M1_32" },
{ 783, "UDS_M1_33" },
{ 784, "UDS_M1_34" },
{ 785, "UDS_M1_35" },
{ 786, "UDS_M1_36" },
{ 787, "UDS_M1_37" },
{ 788, "UDS_M1_38" },
{ 789, "UDS_M1_39" },
{ 790, "UDS_M1_40" },
{ 791, "UDS_M1_41" },
{ 792, "UDS_M1_42" },
{ 793, "UDS_M1_43" },
{ 794, "UDS_M1_44" },
{ 795, "UDS_M1_45" },
{ 796, "UDS_M1_46" },
{ 797, "UDS_M1_47" },
{ 798, "UDS_M1_48" },
{ 799, "UDS_M1_49" },
// UDS_M2_*
{ 800, "UDS_M2_00" },
{ 801, "UDS_M2_01" },
{ 802, "UDS_M2_02" },
{ 803, "UDS_M2_03" },
{ 804, "UDS_M2_04" },
{ 805, "UDS_M2_05" },
{ 806, "UDS_M2_06" },
{ 807, "UDS_M2_07" },
{ 808, "UDS_M2_08" },
{ 809, "UDS_M2_09" },
{ 810, "UDS_M2_10" },
{ 811, "UDS_M2_11" },
{ 812, "UDS_M2_12" },
{ 813, "UDS_M2_13" },
{ 814, "UDS_M2_14" },
{ 815, "UDS_M2_15" },
{ 816, "UDS_M2_16" },
{ 817, "UDS_M2_17" },
{ 818, "UDS_M2_18" },
{ 819, "UDS_M2_19" },
{ 820, "UDS_M2_20" },
{ 821, "UDS_M2_21" },
{ 822, "UDS_M2_22" },
{ 823, "UDS_M2_23" },
{ 824, "UDS_M2_24" },
{ 825, "UDS_M2_25" },
{ 826, "UDS_M2_26" },
{ 827, "UDS_M2_27" },
{ 828, "UDS_M2_28" },
{ 829, "UDS_M2_29" },
{ 830, "UDS_M2_30" },
{ 831, "UDS_M2_31" },
{ 832, "UDS_M2_32" },
{ 833, "UDS_M2_33" },
{ 834, "UDS_M2_34" },
{ 835, "UDS_M2_35" },
{ 836, "UDS_M2_36" },
{ 837, "UDS_M2_37" },
{ 838, "UDS_M2_38" },
{ 839, "UDS_M2_39" },
{ 840, "UDS_M2_40" },
{ 841, "UDS_M2_41" },
{ 842, "UDS_M2_42" },
{ 843, "UDS_M2_43" },
{ 844, "UDS_M2_44" },
{ 845, "UDS_M2_45" },
{ 846, "UDS_M2_46" },
{ 847, "UDS_M2_47" },
{ 848, "UDS_M2_48" },
{ 849, "UDS_M2_49" },
// DPMS_DS_Y_*
{ 850, "DPMS_DS_Y_00" },
{ 851, "DPMS_DS_Y_01" },
{ 852, "DPMS_DS_Y_02" },
{ 853, "DPMS_DS_Y_03" },
{ 854, "DPMS_DS_Y_04" },
{ 855, "DPMS_DS_Y_05" },
{ 856, "DPMS_DS_Y_06" },
{ 857, "DPMS_DS_Y_07" },
{ 858, "DPMS_DS_Y_08" },
{ 859, "DPMS_DS_Y_09" },
{ 860, "DPMS_DS_Y_10" },
{ 861, "DPMS_DS_Y_11" },
{ 862, "DPMS_DS_Y_12" },
{ 863, "DPMS_DS_Y_13" },
{ 864, "DPMS_DS_Y_14" },
{ 865, "DPMS_DS_Y_15" },
{ 866, "DPMS_DS_Y_16" },
{ 867, "DPMS_DS_Y_17" },
{ 868, "DPMS_DS_Y_18" },
{ 869, "DPMS_DS_Y_19" },
{ 870, "DPMS_DS_Y_20" },
{ 871, "DPMS_DS_Y_21" },
{ 872, "DPMS_DS_Y_22" },
{ 873, "DPMS_DS_Y_23" },
{ 874, "DPMS_DS_Y_24" },
{ 875, "DPMS_DS_Y_25" },
{ 876, "DPMS_DS_Y_26" },
{ 877, "DPMS_DS_Y_27" },
{ 878, "DPMS_DS_Y_28" },
{ 879, "DPMS_DS_Y_29" },
{ 880, "DPMS_DS_Y_30" },
{ 881, "DPMS_DS_Y_31" },
{ 882, "DPMS_DS_Y_32" },
{ 883, "DPMS_DS_Y_33" },
{ 884, "DPMS_DS_Y_34" },
{ 885, "DPMS_DS_Y_35" },
{ 886, "DPMS_DS_Y_36" },
{ 887, "DPMS_DS_Y_37" },
{ 888, "DPMS_DS_Y_38" },
{ 889, "DPMS_DS_Y_39" },
{ 890, "DPMS_DS_Y_40" },
{ 891, "DPMS_DS_Y_41" },
{ 892, "DPMS_DS_Y_42" },
{ 893, "DPMS_DS_Y_43" },
{ 894, "DPMS_DS_Y_44" },
{ 895, "DPMS_DS_Y_45" },
{ 896, "DPMS_DS_Y_46" },
{ 897, "DPMS_DS_Y_47" },
{ 898, "DPMS_DS_Y_48" },
{ 899, "DPMS_DS_Y_49" },
//
{ 910, "GRANULAR_PRESSURE" },
{ 911, "DPMS_DS_P1_S" },
{ 912, "DPMS_DS_P1_AP" },
{ 913, "DPMS_DS_P1_DIFF" },
// DPMS_DS_SURFACE_SPECIES_*
{ 920, "DPMS_DS_SURFACE_SPECIES_00" },
{ 921, "DPMS_DS_SURFACE_SPECIES_01" },
{ 922, "DPMS_DS_SURFACE_SPECIES_02" },
{ 923, "DPMS_DS_SURFACE_SPECIES_03" },
{ 924, "DPMS_DS_SURFACE_SPECIES_04" },
{ 925, "DPMS_DS_SURFACE_SPECIES_05" },
{ 926, "DPMS_DS_SURFACE_SPECIES_06" },
{ 927, "DPMS_DS_SURFACE_SPECIES_07" },
{ 928, "DPMS_DS_SURFACE_SPECIES_08" },
{ 929, "DPMS_DS_SURFACE_SPECIES_09" },
{ 930, "DPMS_DS_SURFACE_SPECIES_10" },
{ 931, "DPMS_DS_SURFACE_SPECIES_11" },
{ 932, "DPMS_DS_SURFACE_SPECIES_12" },
{ 933, "DPMS_DS_SURFACE_SPECIES_13" },
{ 934, "DPMS_DS_SURFACE_SPECIES_14" },
{ 935, "DPMS_DS_SURFACE_SPECIES_15" },
{ 936, "DPMS_DS_SURFACE_SPECIES_16" },
{ 937, "DPMS_DS_SURFACE_SPECIES_17" },
{ 938, "DPMS_DS_SURFACE_SPECIES_18" },
{ 939, "DPMS_DS_SURFACE_SPECIES_19" },
{ 940, "DPMS_DS_SURFACE_SPECIES_20" },
{ 941, "DPMS_DS_SURFACE_SPECIES_21" },
{ 942, "DPMS_DS_SURFACE_SPECIES_22" },
{ 943, "DPMS_DS_SURFACE_SPECIES_23" },
{ 944, "DPMS_DS_SURFACE_SPECIES_24" },
{ 945, "DPMS_DS_SURFACE_SPECIES_25" },
{ 946, "DPMS_DS_SURFACE_SPECIES_26" },
{ 947, "DPMS_DS_SURFACE_SPECIES_27" },
{ 948, "DPMS_DS_SURFACE_SPECIES_28" },
{ 949, "DPMS_DS_SURFACE_SPECIES_29" },
{ 950, "DPMS_DS_SURFACE_SPECIES_30" },
{ 951, "DPMS_DS_SURFACE_SPECIES_31" },
{ 952, "DPMS_DS_SURFACE_SPECIES_32" },
{ 953, "DPMS_DS_SURFACE_SPECIES_33" },
{ 954, "DPMS_DS_SURFACE_SPECIES_34" },
{ 955, "DPMS_DS_SURFACE_SPECIES_35" },
{ 956, "DPMS_DS_SURFACE_SPECIES_36" },
{ 957, "DPMS_DS_SURFACE_SPECIES_37" },
{ 958, "DPMS_DS_SURFACE_SPECIES_38" },
{ 959, "DPMS_DS_SURFACE_SPECIES_39" },
{ 960, "DPMS_DS_SURFACE_SPECIES_40" },
{ 961, "DPMS_DS_SURFACE_SPECIES_41" },
{ 962, "DPMS_DS_SURFACE_SPECIES_42" },
{ 963, "DPMS_DS_SURFACE_SPECIES_43" },
{ 964, "DPMS_DS_SURFACE_SPECIES_44" },
{ 965, "DPMS_DS_SURFACE_SPECIES_45" },
{ 966, "DPMS_DS_SURFACE_SPECIES_46" },
{ 967, "DPMS_DS_SURFACE_SPECIES_47" },
{ 968, "DPMS_DS_SURFACE_SPECIES_48" },
{ 969, "DPMS_DS_SURFACE_SPECIES_49" },
{ 970, "UDM_I" },
// Y_MEAN_*
{ 1000, "Y_MEAN_00" },
{ 1001, "Y_MEAN_01" },
{ 1002, "Y_MEAN_02" },
{ 1003, "Y_MEAN_03" },
{ 1004, "Y_MEAN_04" },
{ 1005, "Y_MEAN_05" },
{ 1006, "Y_MEAN_06" },
{ 1007, "Y_MEAN_07" },
{ 1008, "Y_MEAN_08" },
{ 1009, "Y_MEAN_09" },
{ 1010, "Y_MEAN_10" },
{ 1011, "Y_MEAN_11" },
{ 1012, "Y_MEAN_12" },
{ 1013, "Y_MEAN_13" },
{ 1014, "Y_MEAN_14" },
{ 1015, "Y_MEAN_15" },
{ 1016, "Y_MEAN_16" },
{ 1017, "Y_MEAN_17" },
{ 1018, "Y_MEAN_18" },
{ 1019, "Y_MEAN_19" },
{ 1020, "Y_MEAN_20" },
{ 1021, "Y_MEAN_21" },
{ 1022, "Y_MEAN_22" },
{ 1023, "Y_MEAN_23" },
{ 1024, "Y_MEAN_24" },
{ 1025, "Y_MEAN_25" },
{ 1026, "Y_MEAN_26" },
{ 1027, "Y_MEAN_27" },
{ 1028, "Y_MEAN_28" },
{ 1029, "Y_MEAN_29" },
{ 1030, "Y_MEAN_30" },
{ 1031, "Y_MEAN_31" },
{ 1032, "Y_MEAN_32" },
{ 1033, "Y_MEAN_33" },
{ 1034, "Y_MEAN_34" },
{ 1035, "Y_MEAN_35" },
{ 1036, "Y_MEAN_36" },
{ 1037, "Y_MEAN_37" },
{ 1038, "Y_MEAN_38" },
{ 1039, "Y_MEAN_39" },
{ 1040, "Y_MEAN_40" },
{ 1041, "Y_MEAN_41" },
{ 1042, "Y_MEAN_42" },
{ 1043, "Y_MEAN_43" },
{ 1044, "Y_MEAN_44" },
{ 1045, "Y_MEAN_45" },
{ 1046, "Y_MEAN_46" },
{ 1047, "Y_MEAN_47" },
{ 1048, "Y_MEAN_48" },
{ 1049, "Y_MEAN_49" },
// Y_RMS_*
{ 1050, "Y_RMS_00" },
{ 1051, "Y_RMS_01" },
{ 1052, "Y_RMS_02" },
{ 1053, "Y_RMS_03" },
{ 1054, "Y_RMS_04" },
{ 1055, "Y_RMS_05" },
{ 1056, "Y_RMS_06" },
{ 1057, "Y_RMS_07" },
{ 1058, "Y_RMS_08" },
{ 1059, "Y_RMS_09" },
{ 1060, "Y_RMS_10" },
{ 1061, "Y_RMS_11" },
{ 1062, "Y_RMS_12" },
{ 1063, "Y_RMS_13" },
{ 1064, "Y_RMS_14" },
{ 1065, "Y_RMS_15" },
{ 1066, "Y_RMS_16" },
{ 1067, "Y_RMS_17" },
{ 1068, "Y_RMS_18" },
{ 1069, "Y_RMS_19" },
{ 1070, "Y_RMS_20" },
{ 1071, "Y_RMS_21" },
{ 1072, "Y_RMS_22" },
{ 1073, "Y_RMS_23" },
{ 1074, "Y_RMS_24" },
{ 1075, "Y_RMS_25" },
{ 1076, "Y_RMS_26" },
{ 1077, "Y_RMS_27" },
{ 1078, "Y_RMS_28" },
{ 1079, "Y_RMS_29" },
{ 1080, "Y_RMS_30" },
{ 1081, "Y_RMS_31" },
{ 1082, "Y_RMS_32" },
{ 1083, "Y_RMS_33" },
{ 1084, "Y_RMS_34" },
{ 1085, "Y_RMS_35" },
{ 1086, "Y_RMS_36" },
{ 1087, "Y_RMS_37" },
{ 1088, "Y_RMS_38" },
{ 1089, "Y_RMS_39" },
{ 1090, "Y_RMS_40" },
{ 1091, "Y_RMS_41" },
{ 1092, "Y_RMS_42" },
{ 1093, "Y_RMS_43" },
{ 1094, "Y_RMS_44" },
{ 1095, "Y_RMS_45" },
{ 1096, "Y_RMS_46" },
{ 1097, "Y_RMS_47" },
{ 1098, "Y_RMS_48" },
{ 1099, "Y_RMS_49" },
// SITE_F_*
{ 1200, "SITE_F_00" },
{ 1201, "SITE_F_01" },
{ 1202, "SITE_F_02" },
{ 1203, "SITE_F_03" },
{ 1204, "SITE_F_04" },
{ 1205, "SITE_F_05" },
{ 1206, "SITE_F_06" },
{ 1207, "SITE_F_07" },
{ 1208, "SITE_F_08" },
{ 1209, "SITE_F_09" },
{ 1210, "SITE_F_10" },
{ 1211, "SITE_F_11" },
{ 1212, "SITE_F_12" },
{ 1213, "SITE_F_13" },
{ 1214, "SITE_F_14" },
{ 1215, "SITE_F_15" },
{ 1216, "SITE_F_16" },
{ 1217, "SITE_F_17" },
{ 1218, "SITE_F_18" },
{ 1219, "SITE_F_19" },
{ 1220, "SITE_F_20" },
{ 1221, "SITE_F_21" },
{ 1222, "SITE_F_22" },
{ 1223, "SITE_F_23" },
{ 1224, "SITE_F_24" },
{ 1225, "SITE_F_25" },
{ 1226, "SITE_F_26" },
{ 1227, "SITE_F_27" },
{ 1228, "SITE_F_28" },
{ 1229, "SITE_F_29" },
{ 1230, "SITE_F_30" },
{ 1231, "SITE_F_31" },
{ 1232, "SITE_F_32" },
{ 1233, "SITE_F_33" },
{ 1234, "SITE_F_34" },
{ 1235, "SITE_F_35" },
{ 1236, "SITE_F_36" },
{ 1237, "SITE_F_37" },
{ 1238, "SITE_F_38" },
{ 1239, "SITE_F_39" },
{ 1240, "SITE_F_40" },
{ 1241, "SITE_F_41" },
{ 1242, "SITE_F_42" },
{ 1243, "SITE_F_43" },
{ 1244, "SITE_F_44" },
{ 1245, "SITE_F_45" },
{ 1246, "SITE_F_46" },
{ 1247, "SITE_F_47" },
{ 1248, "SITE_F_48" },
{ 1249, "SITE_F_49" },
// CREV_Y_*
{ 1250, "CREV_Y_00" },
{ 1251, "CREV_Y_01" },
{ 1252, "CREV_Y_02" },
{ 1253, "CREV_Y_03" },
{ 1254, "CREV_Y_04" },
{ 1255, "CREV_Y_05" },
{ 1256, "CREV_Y_06" },
{ 1257, "CREV_Y_07" },
{ 1258, "CREV_Y_08" },
{ 1259, "CREV_Y_09" },
{ 1260, "CREV_Y_10" },
{ 1261, "CREV_Y_11" },
{ 1262, "CREV_Y_12" },
{ 1263, "CREV_Y_13" },
{ 1264, "CREV_Y_14" },
{ 1265, "CREV_Y_15" },
{ 1266, "CREV_Y_16" },
{ 1267, "CREV_Y_17" },
{ 1268, "CREV_Y_18" },
{ 1269, "CREV_Y_19" },
{ 1270, "CREV_Y_20" },
{ 1271, "CREV_Y_21" },
{ 1272, "CREV_Y_22" },
{ 1273, "CREV_Y_23" },
{ 1274, "CREV_Y_24" },
{ 1275, "CREV_Y_25" },
{ 1276, "CREV_Y_26" },
{ 1277, "CREV_Y_27" },
{ 1278, "CREV_Y_28" },
{ 1279, "CREV_Y_29" },
{ 1280, "CREV_Y_30" },
{ 1281, "CREV_Y_31" },
{ 1282, "CREV_Y_32" },
{ 1283, "CREV_Y_33" },
{ 1284, "CREV_Y_34" },
{ 1285, "CREV_Y_35" },
{ 1286, "CREV_Y_36" },
{ 1287, "CREV_Y_37" },
{ 1288, "CREV_Y_38" },
{ 1289, "CREV_Y_39" },
{ 1290, "CREV_Y_40" },
{ 1291, "CREV_Y_41" },
{ 1292, "CREV_Y_42" },
{ 1293, "CREV_Y_43" },
{ 1294, "CREV_Y_44" },
{ 1295, "CREV_Y_45" },
{ 1296, "CREV_Y_46" },
{ 1297, "CREV_Y_47" },
{ 1298, "CREV_Y_48" },
{ 1299, "CREV_Y_49" },
//
{ 1301, "WSB" },
{ 1302, "WSN" },
{ 1303, "WSR" },
{ 1304, "WSB_M1" },
{ 1305, "WSB_M2" },
{ 1306, "WSN_M1" },
{ 1307, "WSN_M2" },
{ 1308, "WSR_M1" },
{ 1309, "WSR_M2" },
{ 1310, "MASGEN" },
{ 1311, "NUCRAT" },
{ 1330, "TEMPERATURE_M1" },
{ 1331, "TEMPERATURE_M2" },
// SURF_F_*
{ 1350, "SURF_F_00" },
{ 1351, "SURF_F_01" },
{ 1352, "SURF_F_02" },
{ 1353, "SURF_F_03" },
{ 1354, "SURF_F_04" },
{ 1355, "SURF_F_05" },
{ 1356, "SURF_F_06" },
{ 1357, "SURF_F_07" },
{ 1358, "SURF_F_08" },
{ 1359, "SURF_F_09" },
{ 1360, "SURF_F_10" },
{ 1361, "SURF_F_11" },
{ 1362, "SURF_F_12" },
{ 1363, "SURF_F_13" },
{ 1364, "SURF_F_14" },
{ 1365, "SURF_F_15" },
{ 1366, "SURF_F_16" },
{ 1367, "SURF_F_17" },
{ 1368, "SURF_F_18" },
{ 1369, "SURF_F_19" },
{ 1370, "SURF_F_20" },
{ 1371, "SURF_F_21" },
{ 1372, "SURF_F_22" },
{ 1373, "SURF_F_23" },
{ 1374, "SURF_F_24" },
{ 1375, "SURF_F_25" },
{ 1376, "SURF_F_26" },
{ 1377, "SURF_F_27" },
{ 1378, "SURF_F_28" },
{ 1379, "SURF_F_29" },
{ 1380, "SURF_F_30" },
{ 1381, "SURF_F_31" },
{ 1382, "SURF_F_32" },
{ 1383, "SURF_F_33" },
{ 1384, "SURF_F_34" },
{ 1385, "SURF_F_35" },
{ 1386, "SURF_F_36" },
{ 1387, "SURF_F_37" },
{ 1388, "SURF_F_38" },
{ 1389, "SURF_F_39" },
{ 1390, "SURF_F_40" },
{ 1391, "SURF_F_41" },
{ 1392, "SURF_F_42" },
{ 1393, "SURF_F_43" },
{ 1394, "SURF_F_44" },
{ 1395, "SURF_F_45" },
{ 1396, "SURF_F_46" },
{ 1397, "SURF_F_47" },
{ 1398, "SURF_F_48" },
{ 1399, "SURF_F_49" },
// PB_DISC_*
{ 7700, "PB_DISC_00" },
{ 7701, "PB_DISC_01" },
{ 7702, "PB_DISC_02" },
{ 7703, "PB_DISC_03" },
{ 7704, "PB_DISC_04" },
{ 7705, "PB_DISC_05" },
{ 7706, "PB_DISC_06" },
{ 7707, "PB_DISC_07" },
{ 7708, "PB_DISC_08" },
{ 7709, "PB_DISC_09" },
{ 7710, "PB_DISC_10" },
{ 7711, "PB_DISC_11" },
{ 7712, "PB_DISC_12" },
{ 7713, "PB_DISC_13" },
{ 7714, "PB_DISC_14" },
{ 7715, "PB_DISC_15" },
{ 7716, "PB_DISC_16" },
{ 7717, "PB_DISC_17" },
{ 7718, "PB_DISC_18" },
{ 7719, "PB_DISC_19" },
{ 7720, "PB_DISC_20" },
{ 7721, "PB_DISC_21" },
{ 7722, "PB_DISC_22" },
{ 7723, "PB_DISC_23" },
{ 7724, "PB_DISC_24" },
{ 7725, "PB_DISC_25" },
{ 7726, "PB_DISC_26" },
{ 7727, "PB_DISC_27" },
{ 7728, "PB_DISC_28" },
{ 7729, "PB_DISC_29" },
{ 7730, "PB_DISC_30" },
{ 7731, "PB_DISC_31" },
{ 7732, "PB_DISC_32" },
{ 7733, "PB_DISC_33" },
{ 7734, "PB_DISC_34" },
{ 7735, "PB_DISC_35" },
{ 7736, "PB_DISC_36" },
{ 7737, "PB_DISC_37" },
{ 7738, "PB_DISC_38" },
{ 7739, "PB_DISC_39" },
{ 7740, "PB_DISC_40" },
{ 7741, "PB_DISC_41" },
{ 7742, "PB_DISC_42" },
{ 7743, "PB_DISC_43" },
{ 7744, "PB_DISC_44" },
{ 7745, "PB_DISC_45" },
{ 7746, "PB_DISC_46" },
{ 7747, "PB_DISC_47" },
{ 7748, "PB_DISC_48" },
{ 7749, "PB_DISC_49" },
// PB_DISC_M1_*
{ 7750, "PB_DISC_M1_00" },
{ 7751, "PB_DISC_M1_01" },
{ 7752, "PB_DISC_M1_02" },
{ 7753, "PB_DISC_M1_03" },
{ 7754, "PB_DISC_M1_04" },
{ 7755, "PB_DISC_M1_05" },
{ 7756, "PB_DISC_M1_06" },
{ 7757, "PB_DISC_M1_07" },
{ 7758, "PB_DISC_M1_08" },
{ 7759, "PB_DISC_M1_09" },
{ 7760, "PB_DISC_M1_10" },
{ 7761, "PB_DISC_M1_11" },
{ 7762, "PB_DISC_M1_12" },
{ 7763, "PB_DISC_M1_13" },
{ 7764, "PB_DISC_M1_14" },
{ 7765, "PB_DISC_M1_15" },
{ 7766, "PB_DISC_M1_16" },
{ 7767, "PB_DISC_M1_17" },
{ 7768, "PB_DISC_M1_18" },
{ 7769, "PB_DISC_M1_19" },
{ 7770, "PB_DISC_M1_20" },
{ 7771, "PB_DISC_M1_21" },
{ 7772, "PB_DISC_M1_22" },
{ 7773, "PB_DISC_M1_23" },
{ 7774, "PB_DISC_M1_24" },
{ 7775, "PB_DISC_M1_25" },
{ 7776, "PB_DISC_M1_26" },
{ 7777, "PB_DISC_M1_27" },
{ 7778, "PB_DISC_M1_28" },
{ 7779, "PB_DISC_M1_29" },
{ 7780, "PB_DISC_M1_30" },
{ 7781, "PB_DISC_M1_31" },
{ 7782, "PB_DISC_M1_32" },
{ 7783, "PB_DISC_M1_33" },
{ 7784, "PB_DISC_M1_34" },
{ 7785, "PB_DISC_M1_35" },
{ 7786, "PB_DISC_M1_36" },
{ 7787, "PB_DISC_M1_37" },
{ 7788, "PB_DISC_M1_38" },
{ 7789, "PB_DISC_M1_39" },
{ 7790, "PB_DISC_M1_40" },
{ 7791, "PB_DISC_M1_41" },
{ 7792, "PB_DISC_M1_42" },
{ 7793, "PB_DISC_M1_43" },
{ 7794, "PB_DISC_M1_44" },
{ 7795, "PB_DISC_M1_45" },
{ 7796, "PB_DISC_M1_46" },
{ 7797, "PB_DISC_M1_47" },
{ 7798, "PB_DISC_M1_48" },
{ 7799, "PB_DISC_M1_49" },
// PB_DISC_M2_*
{ 7800, "PB_DISC_M2_00" },
{ 7801, "PB_DISC_M2_01" },
{ 7802, "PB_DISC_M2_02" },
{ 7803, "PB_DISC_M2_03" },
{ 7804, "PB_DISC_M2_04" },
{ 7805, "PB_DISC_M2_05" },
{ 7806, "PB_DISC_M2_06" },
{ 7807, "PB_DISC_M2_07" },
{ 7808, "PB_DISC_M2_08" },
{ 7809, "PB_DISC_M2_09" },
{ 7810, "PB_DISC_M2_10" },
{ 7811, "PB_DISC_M2_11" },
{ 7812, "PB_DISC_M2_12" },
{ 7813, "PB_DISC_M2_13" },
{ 7814, "PB_DISC_M2_14" },
{ 7815, "PB_DISC_M2_15" },
{ 7816, "PB_DISC_M2_16" },
{ 7817, "PB_DISC_M2_17" },
{ 7818, "PB_DISC_M2_18" },
{ 7819, "PB_DISC_M2_19" },
{ 7820, "PB_DISC_M2_20" },
{ 7821, "PB_DISC_M2_21" },
{ 7822, "PB_DISC_M2_22" },
{ 7823, "PB_DISC_M2_23" },
{ 7824, "PB_DISC_M2_24" },
{ 7825, "PB_DISC_M2_25" },
{ 7826, "PB_DISC_M2_26" },
{ 7827, "PB_DISC_M2_27" },
{ 7828, "PB_DISC_M2_28" },
{ 7829, "PB_DISC_M2_29" },
{ 7830, "PB_DISC_M2_30" },
{ 7831, "PB_DISC_M2_31" },
{ 7832, "PB_DISC_M2_32" },
{ 7833, "PB_DISC_M2_33" },
{ 7834, "PB_DISC_M2_34" },
{ 7835, "PB_DISC_M2_35" },
{ 7836, "PB_DISC_M2_36" },
{ 7837, "PB_DISC_M2_37" },
{ 7838, "PB_DISC_M2_38" },
{ 7839, "PB_DISC_M2_39" },
{ 7840, "PB_DISC_M2_40" },
{ 7841, "PB_DISC_M2_41" },
{ 7842, "PB_DISC_M2_42" },
{ 7843, "PB_DISC_M2_43" },
{ 7844, "PB_DISC_M2_44" },
{ 7845, "PB_DISC_M2_45" },
{ 7846, "PB_DISC_M2_46" },
{ 7847, "PB_DISC_M2_47" },
{ 7848, "PB_DISC_M2_48" },
{ 7849, "PB_DISC_M2_49" },
// PB_QMOM_*
{ 7850, "PB_QMOM_00" },
{ 7851, "PB_QMOM_01" },
{ 7852, "PB_QMOM_02" },
{ 7853, "PB_QMOM_03" },
{ 7854, "PB_QMOM_04" },
{ 7855, "PB_QMOM_05" },
{ 7856, "PB_QMOM_06" },
{ 7857, "PB_QMOM_07" },
{ 7858, "PB_QMOM_08" },
{ 7859, "PB_QMOM_09" },
{ 7860, "PB_QMOM_10" },
{ 7861, "PB_QMOM_11" },
{ 7862, "PB_QMOM_12" },
{ 7863, "PB_QMOM_13" },
{ 7864, "PB_QMOM_14" },
{ 7865, "PB_QMOM_15" },
{ 7866, "PB_QMOM_16" },
{ 7867, "PB_QMOM_17" },
{ 7868, "PB_QMOM_18" },
{ 7869, "PB_QMOM_19" },
{ 7870, "PB_QMOM_20" },
{ 7871, "PB_QMOM_21" },
{ 7872, "PB_QMOM_22" },
{ 7873, "PB_QMOM_23" },
{ 7874, "PB_QMOM_24" },
{ 7875, "PB_QMOM_25" },
{ 7876, "PB_QMOM_26" },
{ 7877, "PB_QMOM_27" },
{ 7878, "PB_QMOM_28" },
{ 7879, "PB_QMOM_29" },
{ 7880, "PB_QMOM_30" },
{ 7881, "PB_QMOM_31" },
{ 7882, "PB_QMOM_32" },
{ 7883, "PB_QMOM_33" },
{ 7884, "PB_QMOM_34" },
{ 7885, "PB_QMOM_35" },
{ 7886, "PB_QMOM_36" },
{ 7887, "PB_QMOM_37" },
{ 7888, "PB_QMOM_38" },
{ 7889, "PB_QMOM_39" },
{ 7890, "PB_QMOM_40" },
{ 7891, "PB_QMOM_41" },
{ 7892, "PB_QMOM_42" },
{ 7893, "PB_QMOM_43" },
{ 7894, "PB_QMOM_44" },
{ 7895, "PB_QMOM_45" },
{ 7896, "PB_QMOM_46" },
{ 7897, "PB_QMOM_47" },
{ 7898, "PB_QMOM_48" },
{ 7899, "PB_QMOM_49" },
// PB_QMOM_M1_*
{ 7900, "PB_QMOM_M1_00" },
{ 7901, "PB_QMOM_M1_01" },
{ 7902, "PB_QMOM_M1_02" },
{ 7903, "PB_QMOM_M1_03" },
{ 7904, "PB_QMOM_M1_04" },
{ 7905, "PB_QMOM_M1_05" },
{ 7906, "PB_QMOM_M1_06" },
{ 7907, "PB_QMOM_M1_07" },
{ 7908, "PB_QMOM_M1_08" },
{ 7909, "PB_QMOM_M1_09" },
{ 7910, "PB_QMOM_M1_10" },
{ 7911, "PB_QMOM_M1_11" },
{ 7912, "PB_QMOM_M1_12" },
{ 7913, "PB_QMOM_M1_13" },
{ 7914, "PB_QMOM_M1_14" },
{ 7915, "PB_QMOM_M1_15" },
{ 7916, "PB_QMOM_M1_16" },
{ 7917, "PB_QMOM_M1_17" },
{ 7918, "PB_QMOM_M1_18" },
{ 7919, "PB_QMOM_M1_19" },
{ 7920, "PB_QMOM_M1_20" },
{ 7921, "PB_QMOM_M1_21" },
{ 7922, "PB_QMOM_M1_22" },
{ 7923, "PB_QMOM_M1_23" },
{ 7924, "PB_QMOM_M1_24" },
{ 7925, "PB_QMOM_M1_25" },
{ 7926, "PB_QMOM_M1_26" },
{ 7927, "PB_QMOM_M1_27" },
{ 7928, "PB_QMOM_M1_28" },
{ 7929, "PB_QMOM_M1_29" },
{ 7930, "PB_QMOM_M1_30" },
{ 7931, "PB_QMOM_M1_31" },
{ 7932, "PB_QMOM_M1_32" },
{ 7933, "PB_QMOM_M1_33" },
{ 7934, "PB_QMOM_M1_34" },
{ 7935, "PB_QMOM_M1_35" },
{ 7936, "PB_QMOM_M1_36" },
{ 7937, "PB_QMOM_M1_37" },
{ 7938, "PB_QMOM_M1_38" },
{ 7939, "PB_QMOM_M1_39" },
{ 7940, "PB_QMOM_M1_40" },
{ 7941, "PB_QMOM_M1_41" },
{ 7942, "PB_QMOM_M1_42" },
{ 7943, "PB_QMOM_M1_43" },
{ 7944, "PB_QMOM_M1_44" },
{ 7945, "PB_QMOM_M1_45" },
{ 7946, "PB_QMOM_M1_46" },
{ 7947, "PB_QMOM_M1_47" },
{ 7948, "PB_QMOM_M1_48" },
{ 7949, "PB_QMOM_M1_49" },
// PB_QMOM_M2_*
{ 7950, "PB_QMOM_M2_00" },
{ 7951, "PB_QMOM_M2_01" },
{ 7952, "PB_QMOM_M2_02" },
{ 7953, "PB_QMOM_M2_03" },
{ 7954, "PB_QMOM_M2_04" },
{ 7955, "PB_QMOM_M2_05" },
{ 7956, "PB_QMOM_M2_06" },
{ 7957, "PB_QMOM_M2_07" },
{ 7958, "PB_QMOM_M2_08" },
{ 7959, "PB_QMOM_M2_09" },
{ 7960, "PB_QMOM_M2_10" },
{ 7961, "PB_QMOM_M2_11" },
{ 7962, "PB_QMOM_M2_12" },
{ 7963, "PB_QMOM_M2_13" },
{ 7964, "PB_QMOM_M2_14" },
{ 7965, "PB_QMOM_M2_15" },
{ 7966, "PB_QMOM_M2_16" },
{ 7967, "PB_QMOM_M2_17" },
{ 7968, "PB_QMOM_M2_18" },
{ 7969, "PB_QMOM_M2_19" },
{ 7970, "PB_QMOM_M2_20" },
{ 7971, "PB_QMOM_M2_21" },
{ 7972, "PB_QMOM_M2_22" },
{ 7973, "PB_QMOM_M2_23" },
{ 7974, "PB_QMOM_M2_24" },
{ 7975, "PB_QMOM_M2_25" },
{ 7976, "PB_QMOM_M2_26" },
{ 7977, "PB_QMOM_M2_27" },
{ 7978, "PB_QMOM_M2_28" },
{ 7979, "PB_QMOM_M2_29" },
{ 7980, "PB_QMOM_M2_30" },
{ 7981, "PB_QMOM_M2_31" },
{ 7982, "PB_QMOM_M2_32" },
{ 7983, "PB_QMOM_M2_33" },
{ 7984, "PB_QMOM_M2_34" },
{ 7985, "PB_QMOM_M2_35" },
{ 7986, "PB_QMOM_M2_36" },
{ 7987, "PB_QMOM_M2_37" },
{ 7988, "PB_QMOM_M2_38" },
{ 7989, "PB_QMOM_M2_39" },
{ 7990, "PB_QMOM_M2_40" },
{ 7991, "PB_QMOM_M2_41" },
{ 7992, "PB_QMOM_M2_42" },
{ 7993, "PB_QMOM_M2_43" },
{ 7994, "PB_QMOM_M2_44" },
{ 7995, "PB_QMOM_M2_45" },
{ 7996, "PB_QMOM_M2_46" },
{ 7997, "PB_QMOM_M2_47" },
{ 7998, "PB_QMOM_M2_48" },
{ 7999, "PB_QMOM_M2_49" },
// PB_SMM_*
{ 8000, "PB_SMM_00" },
{ 8001, "PB_SMM_01" },
{ 8002, "PB_SMM_02" },
{ 8003, "PB_SMM_03" },
{ 8004, "PB_SMM_04" },
{ 8005, "PB_SMM_05" },
{ 8006, "PB_SMM_06" },
{ 8007, "PB_SMM_07" },
{ 8008, "PB_SMM_08" },
{ 8009, "PB_SMM_09" },
{ 8010, "PB_SMM_10" },
{ 8011, "PB_SMM_11" },
{ 8012, "PB_SMM_12" },
{ 8013, "PB_SMM_13" },
{ 8014, "PB_SMM_14" },
{ 8015, "PB_SMM_15" },
{ 8016, "PB_SMM_16" },
{ 8017, "PB_SMM_17" },
{ 8018, "PB_SMM_18" },
{ 8019, "PB_SMM_19" },
{ 8020, "PB_SMM_20" },
{ 8021, "PB_SMM_21" },
{ 8022, "PB_SMM_22" },
{ 8023, "PB_SMM_23" },
{ 8024, "PB_SMM_24" },
{ 8025, "PB_SMM_25" },
{ 8026, "PB_SMM_26" },
{ 8027, "PB_SMM_27" },
{ 8028, "PB_SMM_28" },
{ 8029, "PB_SMM_29" },
{ 8030, "PB_SMM_30" },
{ 8031, "PB_SMM_31" },
{ 8032, "PB_SMM_32" },
{ 8033, "PB_SMM_33" },
{ 8034, "PB_SMM_34" },
{ 8035, "PB_SMM_35" },
{ 8036, "PB_SMM_36" },
{ 8037, "PB_SMM_37" },
{ 8038, "PB_SMM_38" },
{ 8039, "PB_SMM_39" },
{ 8040, "PB_SMM_40" },
{ 8041, "PB_SMM_41" },
{ 8042, "PB_SMM_42" },
{ 8043, "PB_SMM_43" },
{ 8044, "PB_SMM_44" },
{ 8045, "PB_SMM_45" },
{ 8046, "PB_SMM_46" },
{ 8047, "PB_SMM_47" },
{ 8048, "PB_SMM_48" },
{ 8049, "PB_SMM_49" },
// PB_SMM_M1_*
{ 8050, "PB_SMM_M1_00" },
{ 8051, "PB_SMM_M1_01" },
{ 8052, "PB_SMM_M1_02" },
{ 8053, "PB_SMM_M1_03" },
{ 8054, "PB_SMM_M1_04" },
{ 8055, "PB_SMM_M1_05" },
{ 8056, "PB_SMM_M1_06" },
{ 8057, "PB_SMM_M1_07" },
{ 8058, "PB_SMM_M1_08" },
{ 8059, "PB_SMM_M1_09" },
{ 8060, "PB_SMM_M1_10" },
{ 8061, "PB_SMM_M1_11" },
{ 8062, "PB_SMM_M1_12" },
{ 8063, "PB_SMM_M1_13" },
{ 8064, "PB_SMM_M1_14" },
{ 8065, "PB_SMM_M1_15" },
{ 8066, "PB_SMM_M1_16" },
{ 8067, "PB_SMM_M1_17" },
{ 8068, "PB_SMM_M1_18" },
{ 8069, "PB_SMM_M1_19" },
{ 8070, "PB_SMM_M1_20" },
{ 8071, "PB_SMM_M1_21" },
{ 8072, "PB_SMM_M1_22" },
{ 8073, "PB_SMM_M1_23" },
{ 8074, "PB_SMM_M1_24" },
{ 8075, "PB_SMM_M1_25" },
{ 8076, "PB_SMM_M1_26" },
{ 8077, "PB_SMM_M1_27" },
{ 8078, "PB_SMM_M1_28" },
{ 8079, "PB_SMM_M1_29" },
{ 8080, "PB_SMM_M1_30" },
{ 8081, "PB_SMM_M1_31" },
{ 8082, "PB_SMM_M1_32" },
{ 8083, "PB_SMM_M1_33" },
{ 8084, "PB_SMM_M1_34" },
{ 8085, "PB_SMM_M1_35" },
{ 8086, "PB_SMM_M1_36" },
{ 8087, "PB_SMM_M1_37" },
{ 8088, "PB_SMM_M1_38" },
{ 8089, "PB_SMM_M1_39" },
{ 8090, "PB_SMM_M1_40" },
{ 8091, "PB_SMM_M1_41" },
{ 8092, "PB_SMM_M1_42" },
{ 8093, "PB_SMM_M1_43" },
{ 8094, "PB_SMM_M1_44" },
{ 8095, "PB_SMM_M1_45" },
{ 8096, "PB_SMM_M1_46" },
{ 8097, "PB_SMM_M1_47" },
{ 8098, "PB_SMM_M1_48" },
{ 8099, "PB_SMM_M1_49" },
// PB_SMM_M2_*
{ 8100, "PB_SMM_M2_00" },
{ 8101, "PB_SMM_M2_01" },
{ 8102, "PB_SMM_M2_02" },
{ 8103, "PB_SMM_M2_03" },
{ 8104, "PB_SMM_M2_04" },
{ 8105, "PB_SMM_M2_05" },
{ 8106, "PB_SMM_M2_06" },
{ 8107, "PB_SMM_M2_07" },
{ 8108, "PB_SMM_M2_08" },
{ 8109, "PB_SMM_M2_09" },
{ 8110, "PB_SMM_M2_10" },
{ 8111, "PB_SMM_M2_11" },
{ 8112, "PB_SMM_M2_12" },
{ 8113, "PB_SMM_M2_13" },
{ 8114, "PB_SMM_M2_14" },
{ 8115, "PB_SMM_M2_15" },
{ 8116, "PB_SMM_M2_16" },
{ 8117, "PB_SMM_M2_17" },
{ 8118, "PB_SMM_M2_18" },
{ 8119, "PB_SMM_M2_19" },
{ 8120, "PB_SMM_M2_20" },
{ 8121, "PB_SMM_M2_21" },
{ 8122, "PB_SMM_M2_22" },
{ 8123, "PB_SMM_M2_23" },
{ 8124, "PB_SMM_M2_24" },
{ 8125, "PB_SMM_M2_25" },
{ 8126, "PB_SMM_M2_26" },
{ 8127, "PB_SMM_M2_27" },
{ 8128, "PB_SMM_M2_28" },
{ 8129, "PB_SMM_M2_29" },
{ 8130, "PB_SMM_M2_30" },
{ 8131, "PB_SMM_M2_31" },
{ 8132, "PB_SMM_M2_32" },
{ 8133, "PB_SMM_M2_33" },
{ 8134, "PB_SMM_M2_34" },
{ 8135, "PB_SMM_M2_35" },
{ 8136, "PB_SMM_M2_36" },
{ 8137, "PB_SMM_M2_37" },
{ 8138, "PB_SMM_M2_38" },
{ 8139, "PB_SMM_M2_39" },
{ 8140, "PB_SMM_M2_40" },
{ 8141, "PB_SMM_M2_41" },
{ 8142, "PB_SMM_M2_42" },
{ 8143, "PB_SMM_M2_43" },
{ 8144, "PB_SMM_M2_44" },
{ 8145, "PB_SMM_M2_45" },
{ 8146, "PB_SMM_M2_46" },
{ 8147, "PB_SMM_M2_47" },
{ 8148, "PB_SMM_M2_48" },
{ 8149, "PB_SMM_M2_49" },
};
void vtkFLUENTReader::LoadVariableNames()
{
for (auto const& variable : variable_info)
{
this->VariableNames->value[variable.index] = variable.name;
}
}
//------------------------------------------------------------------------------
void vtkFLUENTReader::ParseCaseFile()
{
this->FluentCaseFile->clear();
this->FluentCaseFile->seekg(0, ios::beg);
while (this->GetCaseChunk())
{
int index = this->GetCaseIndex();
switch (index)
{
case 0:
break;
case 1:
break;
case 2:
this->GridDimension = this->GetDimension();
break;
case 4:
this->GetLittleEndianFlag();
break;
case 10:
this->GetNodesAscii();
break;
case 12:
this->GetCellsAscii();
break;
case 13:
this->GetFacesAscii();
break;
case 18:
this->GetPeriodicShadowFacesAscii();
break;
case 37:
this->GetSpeciesVariableNames();
break;
case 38:
break;
case 39:
break;
case 40:
break;
case 41:
break;
case 45:
break;
case 58:
this->GetCellTreeAscii();
break;
case 59:
this->GetFaceTreeAscii();
break;
case 61:
this->GetInterfaceFaceParentsAscii();
break;
case 62:
this->GetNonconformalGridInterfaceFaceInformationAscii();
break;
case 63:
break;
case 64:
break;
case 2010:
this->GetNodesSinglePrecision();
break;
case 3010:
this->GetNodesDoublePrecision();
break;
case 2012:
this->GetCellsBinary();
break;
case 3012:
this->GetCellsBinary(); // Should be the same as single precision..
// only grabbing ints.
break;
case 2013:
this->GetFacesBinary();
break;
case 3013:
this->GetFacesBinary();
break;
case 2018:
this->GetPeriodicShadowFacesBinary();
break;
case 3018:
this->GetPeriodicShadowFacesBinary();
break;
case 2040:
break;
case 3040:
break;
case 2041:
break;
case 3041:
break;
case 2058:
this->GetCellTreeBinary();
break;
case 3058:
this->GetCellTreeBinary();
break;
case 2059:
this->GetFaceTreeBinary();
break;
case 3059:
this->GetFaceTreeBinary();
break;
case 2061:
this->GetInterfaceFaceParentsBinary();
break;
case 3061:
this->GetInterfaceFaceParentsBinary();
break;
case 2062:
this->GetNonconformalGridInterfaceFaceInformationBinary();
break;
case 3062:
this->GetNonconformalGridInterfaceFaceInformationBinary();
break;
case 2063:
break;
case 3063:
break;
default:
// cout << "Undefined Section = " << index << endl;
break;
}
}
}
//------------------------------------------------------------------------------
int vtkFLUENTReader::GetDimension()
{
size_t start = this->CaseBuffer->value.find('(', 1);
std::string info = this->CaseBuffer->value.substr(start + 4, 1);
return atoi(info.c_str());
}
//------------------------------------------------------------------------------
void vtkFLUENTReader::GetLittleEndianFlag()
{
size_t start = this->CaseBuffer->value.find('(', 1);
size_t end = this->CaseBuffer->value.find(')', 1);
std::string info = this->CaseBuffer->value.substr(start + 1, end - start - 1);
int flag;
sscanf(info.c_str(), "%d", &flag);
if (flag == 60)
{
this->SetDataByteOrderToLittleEndian();
}
else
{
this->SetDataByteOrderToBigEndian();
}
}
//------------------------------------------------------------------------------
void vtkFLUENTReader::GetNodesAscii()
{
size_t start = this->CaseBuffer->value.find('(', 1);
size_t end = this->CaseBuffer->value.find(')', 1);
std::string info = this->CaseBuffer->value.substr(start + 1, end - start - 1);
unsigned int zoneId, firstIndex, lastIndex;
int type, nd;
sscanf(info.c_str(), "%x %x %x %d %d", &zoneId, &firstIndex, &lastIndex, &type, &nd);
if (this->CaseBuffer->value.at(5) == '0')
{
this->Points->Allocate(lastIndex);
}
else
{
size_t dstart = this->CaseBuffer->value.find('(', 5);
size_t dend = this->CaseBuffer->value.find(')', dstart + 1);
std::string pdata = this->CaseBuffer->value.substr(dstart + 1, dend - start - 1);
std::stringstream pdatastream(pdata);
double x, y, z;
if (this->GridDimension == 3)
{
for (unsigned int i = firstIndex; i <= lastIndex; i++)
{
pdatastream >> x;
pdatastream >> y;
pdatastream >> z;
this->Points->InsertPoint(i - 1, x, y, z);
}
}
else
{
for (unsigned int i = firstIndex; i <= lastIndex; i++)
{
pdatastream >> x;
pdatastream >> y;
this->Points->InsertPoint(i - 1, x, y, 0.0);
}
}
}
}
//------------------------------------------------------------------------------
void vtkFLUENTReader::GetNodesSinglePrecision()
{
size_t start = this->CaseBuffer->value.find('(', 1);
size_t end = this->CaseBuffer->value.find(')', 1);
std::string info = this->CaseBuffer->value.substr(start + 1, end - start - 1);
unsigned int zoneId, firstIndex, lastIndex;
int type;
sscanf(info.c_str(), "%x %x %x %d", &zoneId, &firstIndex, &lastIndex, &type);
size_t dstart = this->CaseBuffer->value.find('(', 7);
size_t ptr = dstart + 1;
double x, y, z;
if (this->GridDimension == 3)
{
for (unsigned int i = firstIndex; i <= lastIndex; i++)
{
x = this->GetCaseBufferFloat(static_cast<int>(ptr));
ptr = ptr + 4;
y = this->GetCaseBufferFloat(static_cast<int>(ptr));
ptr = ptr + 4;
z = this->GetCaseBufferFloat(static_cast<int>(ptr));
ptr = ptr + 4;
this->Points->InsertPoint(i - 1, x, y, z);
}
}
else
{
for (unsigned int i = firstIndex; i <= lastIndex; i++)
{
x = this->GetCaseBufferFloat(static_cast<int>(ptr));
ptr = ptr + 4;
y = this->GetCaseBufferFloat(static_cast<int>(ptr));
ptr = ptr + 4;
z = 0.0;
this->Points->InsertPoint(i - 1, x, y, z);
}
}
}
//------------------------------------------------------------------------------
void vtkFLUENTReader::GetNodesDoublePrecision()
{
size_t start = this->CaseBuffer->value.find('(', 1);
size_t end = this->CaseBuffer->value.find(')', 1);
std::string info = this->CaseBuffer->value.substr(start + 1, end - start - 1);
unsigned int zoneId, firstIndex, lastIndex;
int type;
sscanf(info.c_str(), "%x %x %x %d", &zoneId, &firstIndex, &lastIndex, &type);
size_t dstart = this->CaseBuffer->value.find('(', 7);
size_t ptr = dstart + 1;
if (this->GridDimension == 3)
{
for (unsigned int i = firstIndex; i <= lastIndex; i++)
{
double x = this->GetCaseBufferDouble(static_cast<int>(ptr));
ptr = ptr + 8;
double y = this->GetCaseBufferDouble(static_cast<int>(ptr));
ptr = ptr + 8;
double z = this->GetCaseBufferDouble(static_cast<int>(ptr));
ptr = ptr + 8;
this->Points->InsertPoint(i - 1, x, y, z);
}
}
else
{
for (unsigned int i = firstIndex; i <= lastIndex; i++)
{
double x = this->GetCaseBufferDouble(static_cast<int>(ptr));
ptr = ptr + 8;
double y = this->GetCaseBufferDouble(static_cast<int>(ptr));
ptr = ptr + 8;
this->Points->InsertPoint(i - 1, x, y, 0.0);
}
}
}
//------------------------------------------------------------------------------
void vtkFLUENTReader::GetCellsAscii()
{
if (this->CaseBuffer->value.at(5) == '0')
{ // Cell Info
size_t start = this->CaseBuffer->value.find('(', 1);
size_t end = this->CaseBuffer->value.find(')', 1);
std::string info = this->CaseBuffer->value.substr(start + 1, end - start - 1);
unsigned int zoneId, firstIndex, lastIndex;
int type;
sscanf(info.c_str(), "%x %x %x %d", &zoneId, &firstIndex, &lastIndex, &type);
this->Cells->value.resize(lastIndex);
}
else
{ // Cell Definitions
size_t start = this->CaseBuffer->value.find('(', 1);
size_t end = this->CaseBuffer->value.find(')', 1);
std::string info = this->CaseBuffer->value.substr(start + 1, end - start - 1);
unsigned int zoneId, firstIndex, lastIndex;
int type, elementType;
sscanf(info.c_str(), "%x %x %x %d %d", &zoneId, &firstIndex, &lastIndex, &type, &elementType);
if (elementType == 0)
{
size_t dstart = this->CaseBuffer->value.find('(', 5);
size_t dend = this->CaseBuffer->value.find(')', dstart + 1);
std::string pdata = this->CaseBuffer->value.substr(dstart + 1, dend - start - 1);
std::stringstream pdatastream(pdata);
for (unsigned int i = firstIndex; i <= lastIndex; i++)
{
pdatastream >> this->Cells->value[i - 1].type;
this->Cells->value[i - 1].zone = zoneId;
this->Cells->value[i - 1].parent = 0;
this->Cells->value[i - 1].child = 0;
}
}
else
{
for (unsigned int i = firstIndex; i <= lastIndex; i++)
{
this->Cells->value[i - 1].type = elementType;
this->Cells->value[i - 1].zone = zoneId;
this->Cells->value[i - 1].parent = 0;
this->Cells->value[i - 1].child = 0;
}
}
}
}
//------------------------------------------------------------------------------
void vtkFLUENTReader::GetCellsBinary()
{
size_t start = this->CaseBuffer->value.find('(', 1);
size_t end = this->CaseBuffer->value.find(')', 1);
std::string info = this->CaseBuffer->value.substr(start + 1, end - start - 1);
unsigned int zoneId, firstIndex, lastIndex, type, elementType;
sscanf(info.c_str(), "%x %x %x %x %x", &zoneId, &firstIndex, &lastIndex, &type, &elementType);
if (elementType == 0)
{
size_t dstart = this->CaseBuffer->value.find('(', 7);
size_t ptr = dstart + 1;
for (unsigned int i = firstIndex; i <= lastIndex; i++)
{
this->Cells->value[i - 1].type = this->GetCaseBufferInt(static_cast<int>(ptr));
ptr = ptr + 4;
this->Cells->value[i - 1].zone = zoneId;
this->Cells->value[i - 1].parent = 0;
this->Cells->value[i - 1].child = 0;
}
}
else
{
for (unsigned int i = firstIndex; i <= lastIndex; i++)
{
this->Cells->value[i - 1].type = elementType;
this->Cells->value[i - 1].zone = zoneId;
this->Cells->value[i - 1].parent = 0;
this->Cells->value[i - 1].child = 0;
}
}
}
//------------------------------------------------------------------------------
void vtkFLUENTReader::GetFacesAscii()
{
if (this->CaseBuffer->value.at(5) == '0')
{ // Face Info
size_t start = this->CaseBuffer->value.find('(', 1);
size_t end = this->CaseBuffer->value.find(')', 1);
std::string info = this->CaseBuffer->value.substr(start + 1, end - start - 1);
unsigned int zoneId, firstIndex, lastIndex, bcType;
sscanf(info.c_str(), "%x %x %x %x", &zoneId, &firstIndex, &lastIndex, &bcType);
this->Faces->value.resize(lastIndex);
}
else
{ // Face Definitions
size_t start = this->CaseBuffer->value.find('(', 1);
size_t end = this->CaseBuffer->value.find(')', 1);
std::string info = this->CaseBuffer->value.substr(start + 1, end - start - 1);
unsigned int zoneId, firstIndex, lastIndex, bcType, faceType;
sscanf(info.c_str(), "%x %x %x %x %x", &zoneId, &firstIndex, &lastIndex, &bcType, &faceType);
size_t dstart = this->CaseBuffer->value.find('(', 7);
size_t dend = this->CaseBuffer->value.find(')', dstart + 1);
std::string pdata = this->CaseBuffer->value.substr(dstart + 1, dend - start - 1);
std::stringstream pdatastream(pdata);
int numberOfNodesInFace = 0;
for (unsigned int i = firstIndex; i <= lastIndex; i++)
{
if (faceType == 0 || faceType == 5)
{
pdatastream >> numberOfNodesInFace;
}
else
{
numberOfNodesInFace = faceType;
}
this->Faces->value[i - 1].nodes.resize(numberOfNodesInFace);
for (int j = 0; j < numberOfNodesInFace; j++)
{
pdatastream >> hex >> this->Faces->value[i - 1].nodes[j];
this->Faces->value[i - 1].nodes[j]--;
}
pdatastream >> hex >> this->Faces->value[i - 1].c0;
pdatastream >> hex >> this->Faces->value[i - 1].c1;
this->Faces->value[i - 1].c0--;
this->Faces->value[i - 1].c1--;
this->Faces->value[i - 1].type = numberOfNodesInFace;
this->Faces->value[i - 1].zone = zoneId;
this->Faces->value[i - 1].periodicShadow = 0;
this->Faces->value[i - 1].parent = 0;
this->Faces->value[i - 1].child = 0;
this->Faces->value[i - 1].interfaceFaceParent = 0;
this->Faces->value[i - 1].ncgParent = 0;
this->Faces->value[i - 1].ncgChild = 0;
this->Faces->value[i - 1].interfaceFaceChild = 0;
if (this->Faces->value[i - 1].c0 >= 0)
{
this->Cells->value[this->Faces->value[i - 1].c0].faces.push_back(i - 1);
}
if (this->Faces->value[i - 1].c1 >= 0)
{
this->Cells->value[this->Faces->value[i - 1].c1].faces.push_back(i - 1);
}
}
}
}
//------------------------------------------------------------------------------
void vtkFLUENTReader::GetFacesBinary()
{
size_t start = this->CaseBuffer->value.find('(', 1);
size_t end = this->CaseBuffer->value.find(')', 1);
std::string info = this->CaseBuffer->value.substr(start + 1, end - start - 1);
unsigned int zoneId, firstIndex, lastIndex, bcType, faceType;
sscanf(info.c_str(), "%x %x %x %x %x", &zoneId, &firstIndex, &lastIndex, &bcType, &faceType);
size_t dstart = this->CaseBuffer->value.find('(', 7);
int numberOfNodesInFace = 0;
size_t ptr = dstart + 1;
for (unsigned int i = firstIndex; i <= lastIndex; i++)
{
if ((faceType == 0) || (faceType == 5))
{
numberOfNodesInFace = this->GetCaseBufferInt(static_cast<int>(ptr));
ptr = ptr + 4;
}
else
{
numberOfNodesInFace = faceType;
}
this->Faces->value[i - 1].nodes.resize(numberOfNodesInFace);
for (int k = 0; k < numberOfNodesInFace; k++)
{
this->Faces->value[i - 1].nodes[k] = this->GetCaseBufferInt(static_cast<int>(ptr));
this->Faces->value[i - 1].nodes[k]--;
ptr = ptr + 4;
}
this->Faces->value[i - 1].c0 = this->GetCaseBufferInt(static_cast<int>(ptr));
ptr = ptr + 4;
this->Faces->value[i - 1].c1 = this->GetCaseBufferInt(static_cast<int>(ptr));
ptr = ptr + 4;
this->Faces->value[i - 1].c0--;
this->Faces->value[i - 1].c1--;
this->Faces->value[i - 1].type = numberOfNodesInFace;
this->Faces->value[i - 1].zone = zoneId;
this->Faces->value[i - 1].periodicShadow = 0;
this->Faces->value[i - 1].parent = 0;
this->Faces->value[i - 1].child = 0;
this->Faces->value[i - 1].interfaceFaceParent = 0;
this->Faces->value[i - 1].ncgParent = 0;
this->Faces->value[i - 1].ncgChild = 0;
this->Faces->value[i - 1].interfaceFaceChild = 0;
if (this->Faces->value[i - 1].c0 >= 0)
{
this->Cells->value[this->Faces->value[i - 1].c0].faces.push_back(i - 1);
}
if (this->Faces->value[i - 1].c1 >= 0)
{
this->Cells->value[this->Faces->value[i - 1].c1].faces.push_back(i - 1);
}
}
}
//------------------------------------------------------------------------------
void vtkFLUENTReader::GetPeriodicShadowFacesAscii()
{
size_t start = this->CaseBuffer->value.find('(', 1);
size_t end = this->CaseBuffer->value.find(')', 1);
std::string info = this->CaseBuffer->value.substr(start + 1, end - start - 1);
unsigned int firstIndex, lastIndex, periodicZone, shadowZone;
sscanf(info.c_str(), "%x %x %x %x", &firstIndex, &lastIndex, &periodicZone, &shadowZone);
size_t dstart = this->CaseBuffer->value.find('(', 7);
size_t dend = this->CaseBuffer->value.find(')', dstart + 1);
std::string pdata = this->CaseBuffer->value.substr(dstart + 1, dend - start - 1);
std::stringstream pdatastream(pdata);
int faceIndex1, faceIndex2;
for (unsigned int i = firstIndex; i <= lastIndex; i++)
{
pdatastream >> hex >> faceIndex1;
pdatastream >> hex >> faceIndex2;
this->Faces->value[faceIndex1].periodicShadow = 1;
}
}
//------------------------------------------------------------------------------
void vtkFLUENTReader::GetPeriodicShadowFacesBinary()
{
size_t start = this->CaseBuffer->value.find('(', 1);
size_t end = this->CaseBuffer->value.find(')', 1);
std::string info = this->CaseBuffer->value.substr(start + 1, end - start - 1);
unsigned int firstIndex, lastIndex, periodicZone, shadowZone;
sscanf(info.c_str(), "%x %x %x %x", &firstIndex, &lastIndex, &periodicZone, &shadowZone);
size_t dstart = this->CaseBuffer->value.find('(', 7);
size_t ptr = dstart + 1;
// int faceIndex1, faceIndex2;
for (unsigned int i = firstIndex; i <= lastIndex; i++)
{
// faceIndex1 = this->GetCaseBufferInt(ptr);
this->GetCaseBufferInt(static_cast<int>(ptr));
ptr = ptr + 4;
// faceIndex2 = this->GetCaseBufferInt(ptr);
this->GetCaseBufferInt(static_cast<int>(ptr));
ptr = ptr + 4;
}
}
//------------------------------------------------------------------------------
void vtkFLUENTReader::GetCellTreeAscii()
{
size_t start = this->CaseBuffer->value.find('(', 1);
size_t end = this->CaseBuffer->value.find(')', 1);
std::string info = this->CaseBuffer->value.substr(start + 1, end - start - 1);
unsigned int cellId0, cellId1, parentZoneId, childZoneId;
sscanf(info.c_str(), "%x %x %x %x", &cellId0, &cellId1, &parentZoneId, &childZoneId);
size_t dstart = this->CaseBuffer->value.find('(', 7);
size_t dend = this->CaseBuffer->value.find(')', dstart + 1);
std::string pdata = this->CaseBuffer->value.substr(dstart + 1, dend - start - 1);
std::stringstream pdatastream(pdata);
int numberOfKids, kid;
for (unsigned int i = cellId0; i <= cellId1; i++)
{
this->Cells->value[i - 1].parent = 1;
pdatastream >> hex >> numberOfKids;
for (int j = 0; j < numberOfKids; j++)
{
pdatastream >> hex >> kid;
this->Cells->value[kid - 1].child = 1;
}
}
}
//------------------------------------------------------------------------------
void vtkFLUENTReader::GetCellTreeBinary()
{
size_t start = this->CaseBuffer->value.find('(', 1);
size_t end = this->CaseBuffer->value.find(')', 1);
std::string info = this->CaseBuffer->value.substr(start + 1, end - start - 1);
unsigned int cellId0, cellId1, parentZoneId, childZoneId;
sscanf(info.c_str(), "%x %x %x %x", &cellId0, &cellId1, &parentZoneId, &childZoneId);
size_t dstart = this->CaseBuffer->value.find('(', 7);
size_t ptr = dstart + 1;
int numberOfKids, kid;
for (unsigned int i = cellId0; i <= cellId1; i++)
{
this->Cells->value[i - 1].parent = 1;
numberOfKids = this->GetCaseBufferInt(static_cast<int>(ptr));
ptr = ptr + 4;
for (int j = 0; j < numberOfKids; j++)
{
kid = this->GetCaseBufferInt(static_cast<int>(ptr));
ptr = ptr + 4;
this->Cells->value[kid - 1].child = 1;
}
}
}
//------------------------------------------------------------------------------
void vtkFLUENTReader::GetFaceTreeAscii()
{
size_t start = this->CaseBuffer->value.find('(', 1);
size_t end = this->CaseBuffer->value.find(')', 1);
std::string info = this->CaseBuffer->value.substr(start + 1, end - start - 1);
unsigned int faceId0, faceId1, parentZoneId, childZoneId;
sscanf(info.c_str(), "%x %x %x %x", &faceId0, &faceId1, &parentZoneId, &childZoneId);
size_t dstart = this->CaseBuffer->value.find('(', 7);
size_t dend = this->CaseBuffer->value.find(')', dstart + 1);
std::string pdata = this->CaseBuffer->value.substr(dstart + 1, dend - start - 1);
std::stringstream pdatastream(pdata);
int numberOfKids, kid;
for (unsigned int i = faceId0; i <= faceId1; i++)
{
this->Faces->value[i - 1].parent = 1;
pdatastream >> hex >> numberOfKids;
for (int j = 0; j < numberOfKids; j++)
{
pdatastream >> hex >> kid;
this->Faces->value[kid - 1].child = 1;
}
}
}
//------------------------------------------------------------------------------
void vtkFLUENTReader::GetFaceTreeBinary()
{
size_t start = this->CaseBuffer->value.find('(', 1);
size_t end = this->CaseBuffer->value.find(')', 1);
std::string info = this->CaseBuffer->value.substr(start + 1, end - start - 1);
unsigned int faceId0, faceId1, parentZoneId, childZoneId;
sscanf(info.c_str(), "%x %x %x %x", &faceId0, &faceId1, &parentZoneId, &childZoneId);
size_t dstart = this->CaseBuffer->value.find('(', 7);
size_t ptr = dstart + 1;
int numberOfKids, kid;
for (unsigned int i = faceId0; i <= faceId1; i++)
{
this->Faces->value[i - 1].parent = 1;
numberOfKids = this->GetCaseBufferInt(static_cast<int>(ptr));
ptr = ptr + 4;
for (int j = 0; j < numberOfKids; j++)
{
kid = this->GetCaseBufferInt(static_cast<int>(ptr));
ptr = ptr + 4;
this->Faces->value[kid - 1].child = 1;
}
}
}
//------------------------------------------------------------------------------
void vtkFLUENTReader::GetInterfaceFaceParentsAscii()
{
size_t start = this->CaseBuffer->value.find('(', 1);
size_t end = this->CaseBuffer->value.find(')', 1);
std::string info = this->CaseBuffer->value.substr(start + 1, end - start - 1);
unsigned int faceId0, faceId1;
sscanf(info.c_str(), "%x %x", &faceId0, &faceId1);
size_t dstart = this->CaseBuffer->value.find('(', 7);
size_t dend = this->CaseBuffer->value.find(')', dstart + 1);
std::string pdata = this->CaseBuffer->value.substr(dstart + 1, dend - start - 1);
std::stringstream pdatastream(pdata);
int parentId0, parentId1;
for (unsigned int i = faceId0; i <= faceId1; i++)
{
pdatastream >> hex >> parentId0;
pdatastream >> hex >> parentId1;
this->Faces->value[parentId0 - 1].interfaceFaceParent = 1;
this->Faces->value[parentId1 - 1].interfaceFaceParent = 1;
this->Faces->value[i - 1].interfaceFaceChild = 1;
}
}
//------------------------------------------------------------------------------
void vtkFLUENTReader::GetInterfaceFaceParentsBinary()
{
size_t start = this->CaseBuffer->value.find('(', 1);
size_t end = this->CaseBuffer->value.find(')', 1);
std::string info = this->CaseBuffer->value.substr(start + 1, end - start - 1);
unsigned int faceId0, faceId1;
sscanf(info.c_str(), "%x %x", &faceId0, &faceId1);
size_t dstart = this->CaseBuffer->value.find('(', 7);
size_t ptr = dstart + 1;
int parentId0, parentId1;
for (unsigned int i = faceId0; i <= faceId1; i++)
{
parentId0 = this->GetCaseBufferInt(static_cast<int>(ptr));
ptr = ptr + 4;
parentId1 = this->GetCaseBufferInt(static_cast<int>(ptr));
ptr = ptr + 4;
this->Faces->value[parentId0 - 1].interfaceFaceParent = 1;
this->Faces->value[parentId1 - 1].interfaceFaceParent = 1;
this->Faces->value[i - 1].interfaceFaceChild = 1;
}
}
//------------------------------------------------------------------------------
void vtkFLUENTReader::GetNonconformalGridInterfaceFaceInformationAscii()
{
size_t start = this->CaseBuffer->value.find('(', 1);
size_t end = this->CaseBuffer->value.find(')', 1);
std::string info = this->CaseBuffer->value.substr(start + 1, end - start - 1);
int kidId, parentId, numberOfFaces;
sscanf(info.c_str(), "%d %d %d", &kidId, &parentId, &numberOfFaces);
size_t dstart = this->CaseBuffer->value.find('(', 7);
size_t dend = this->CaseBuffer->value.find(')', dstart + 1);
std::string pdata = this->CaseBuffer->value.substr(dstart + 1, dend - start - 1);
std::stringstream pdatastream(pdata);
int child, parent;
for (int i = 0; i < numberOfFaces; i++)
{
pdatastream >> hex >> child;
pdatastream >> hex >> parent;
this->Faces->value[child - 1].ncgChild = 1;
this->Faces->value[parent - 1].ncgParent = 1;
}
}
//------------------------------------------------------------------------------
void vtkFLUENTReader::GetNonconformalGridInterfaceFaceInformationBinary()
{
size_t start = this->CaseBuffer->value.find('(', 1);
size_t end = this->CaseBuffer->value.find(')', 1);
std::string info = CaseBuffer->value.substr(start + 1, end - start - 1);
int kidId, parentId, numberOfFaces;
sscanf(info.c_str(), "%d %d %d", &kidId, &parentId, &numberOfFaces);
size_t dstart = this->CaseBuffer->value.find('(', 7);
size_t ptr = dstart + 1;
int child, parent;
for (int i = 0; i < numberOfFaces; i++)
{
child = this->GetCaseBufferInt(static_cast<int>(ptr));
ptr = ptr + 4;
parent = this->GetCaseBufferInt(static_cast<int>(ptr));
ptr = ptr + 4;
this->Faces->value[child - 1].ncgChild = 1;
this->Faces->value[parent - 1].ncgParent = 1;
}
}
//------------------------------------------------------------------------------
void vtkFLUENTReader::CleanCells()
{
std::vector<int> t;
for (size_t i = 0; i < Cells->value.size(); i++)
{
if (((this->Cells->value[i].type == 1) && (this->Cells->value[i].faces.size() != 3)) ||
((this->Cells->value[i].type == 2) && (this->Cells->value[i].faces.size() != 4)) ||
((this->Cells->value[i].type == 3) && (this->Cells->value[i].faces.size() != 4)) ||
((this->Cells->value[i].type == 4) && (this->Cells->value[i].faces.size() != 6)) ||
((this->Cells->value[i].type == 5) && (this->Cells->value[i].faces.size() != 5)) ||
((this->Cells->value[i].type == 6) && (this->Cells->value[i].faces.size() != 5)))
{
// Copy faces
t.clear();
for (size_t j = 0; j < this->Cells->value[i].faces.size(); j++)
{
t.push_back(this->Cells->value[i].faces[j]);
}
// Clear Faces
this->Cells->value[i].faces.clear();
// Copy the faces that are not flagged back into the cell
for (size_t j = 0; j < t.size(); j++)
{
if ((this->Faces->value[t[j]].child == 0) && (this->Faces->value[t[j]].ncgChild == 0) &&
(this->Faces->value[t[j]].interfaceFaceChild == 0))
{
this->Cells->value[i].faces.push_back(t[j]);
}
}
}
}
}
//------------------------------------------------------------------------------
void vtkFLUENTReader::PopulateCellNodes()
{
for (size_t i = 0; i < this->Cells->value.size(); i++)
{
const vtkIdType id = static_cast<vtkIdType>(i);
switch (this->Cells->value[i].type)
{
case 1: // Triangle
this->PopulateTriangleCell(id);
break;
case 2: // Tetrahedron
this->PopulateTetraCell(id);
break;
case 3: // Quadrilateral
this->PopulateQuadCell(id);
break;
case 4: // Hexahedral
this->PopulateHexahedronCell(id);
break;
case 5: // Pyramid
this->PopulatePyramidCell(id);
break;
case 6: // Wedge
this->PopulateWedgeCell(id);
break;
case 7: // Polyhedron
this->PopulatePolyhedronCell(id);
break;
}
}
}
//------------------------------------------------------------------------------
int vtkFLUENTReader::GetCaseBufferInt(int ptr)
{
union mix_i {
int i;
char c[4];
} mi = { 1 };
for (int j = 0; j < 4; j++)
{
if (this->GetSwapBytes())
{
mi.c[3 - j] = this->CaseBuffer->value.at(ptr + j);
}
else
{
mi.c[j] = this->CaseBuffer->value.at(ptr + j);
}
}
return mi.i;
}
//------------------------------------------------------------------------------
float vtkFLUENTReader::GetCaseBufferFloat(int ptr)
{
union mix_f {
float f;
char c[4];
} mf = { 1.0 };
for (int j = 0; j < 4; j++)
{
if (this->GetSwapBytes())
{
mf.c[3 - j] = this->CaseBuffer->value.at(ptr + j);
}
else
{
mf.c[j] = this->CaseBuffer->value.at(ptr + j);
}
}
return mf.f;
}
//------------------------------------------------------------------------------
double vtkFLUENTReader::GetCaseBufferDouble(int ptr)
{
union mix_i {
double d;
char c[8];
} md = { 1.0 };
for (int j = 0; j < 8; j++)
{
if (this->GetSwapBytes())
{
md.c[7 - j] = this->CaseBuffer->value.at(ptr + j);
}
else
{
md.c[j] = this->CaseBuffer->value.at(ptr + j);
}
}
return md.d;
}
//------------------------------------------------------------------------------
void vtkFLUENTReader::PopulateTriangleCell(int i)
{
this->Cells->value[i].nodes.resize(3);
if (this->Faces->value[this->Cells->value[i].faces[0]].c0 == i)
{
this->Cells->value[i].nodes[0] = this->Faces->value[this->Cells->value[i].faces[0]].nodes[0];
this->Cells->value[i].nodes[1] = this->Faces->value[this->Cells->value[i].faces[0]].nodes[1];
}
else
{
this->Cells->value[i].nodes[1] = this->Faces->value[this->Cells->value[i].faces[0]].nodes[0];
this->Cells->value[i].nodes[0] = this->Faces->value[this->Cells->value[i].faces[0]].nodes[1];
}
if (this->Faces->value[this->Cells->value[i].faces[1]].nodes[0] !=
this->Cells->value[i].nodes[0] &&
this->Faces->value[this->Cells->value[i].faces[1]].nodes[0] != this->Cells->value[i].nodes[1])
{
this->Cells->value[i].nodes[2] = this->Faces->value[this->Cells->value[i].faces[1]].nodes[0];
}
else
{
this->Cells->value[i].nodes[2] = this->Faces->value[this->Cells->value[i].faces[1]].nodes[1];
}
}
//------------------------------------------------------------------------------
void vtkFLUENTReader::PopulateTetraCell(int i)
{
this->Cells->value[i].nodes.resize(4);
if (this->Faces->value[this->Cells->value[i].faces[0]].c0 == i)
{
this->Cells->value[i].nodes[0] = this->Faces->value[this->Cells->value[i].faces[0]].nodes[0];
this->Cells->value[i].nodes[1] = this->Faces->value[this->Cells->value[i].faces[0]].nodes[1];
this->Cells->value[i].nodes[2] = this->Faces->value[this->Cells->value[i].faces[0]].nodes[2];
}
else
{
this->Cells->value[i].nodes[2] = this->Faces->value[this->Cells->value[i].faces[0]].nodes[0];
this->Cells->value[i].nodes[1] = this->Faces->value[this->Cells->value[i].faces[0]].nodes[1];
this->Cells->value[i].nodes[0] = this->Faces->value[this->Cells->value[i].faces[0]].nodes[2];
}
if (this->Faces->value[this->Cells->value[i].faces[1]].nodes[0] !=
this->Cells->value[i].nodes[0] &&
this->Faces->value[this->Cells->value[i].faces[1]].nodes[0] != this->Cells->value[i].nodes[1] &&
this->Faces->value[this->Cells->value[i].faces[1]].nodes[0] != this->Cells->value[i].nodes[2])
{
this->Cells->value[i].nodes[3] = this->Faces->value[this->Cells->value[i].faces[1]].nodes[0];
}
else if (this->Faces->value[this->Cells->value[i].faces[1]].nodes[1] !=
this->Cells->value[i].nodes[0] &&
this->Faces->value[this->Cells->value[i].faces[1]].nodes[1] != this->Cells->value[i].nodes[1] &&
this->Faces->value[this->Cells->value[i].faces[1]].nodes[1] != this->Cells->value[i].nodes[2])
{
this->Cells->value[i].nodes[3] = this->Faces->value[this->Cells->value[i].faces[1]].nodes[1];
}
else
{
this->Cells->value[i].nodes[3] = this->Faces->value[this->Cells->value[i].faces[1]].nodes[2];
}
}
//------------------------------------------------------------------------------
void vtkFLUENTReader::PopulateQuadCell(int i)
{
this->Cells->value[i].nodes.resize(4);
if (this->Faces->value[this->Cells->value[i].faces[0]].c0 == i)
{
this->Cells->value[i].nodes[0] = this->Faces->value[this->Cells->value[i].faces[0]].nodes[0];
this->Cells->value[i].nodes[1] = this->Faces->value[this->Cells->value[i].faces[0]].nodes[1];
}
else
{
this->Cells->value[i].nodes[1] = this->Faces->value[this->Cells->value[i].faces[0]].nodes[0];
this->Cells->value[i].nodes[0] = this->Faces->value[this->Cells->value[i].faces[0]].nodes[1];
}
if ((this->Faces->value[this->Cells->value[i].faces[1]].nodes[0] !=
this->Cells->value[i].nodes[0] &&
this->Faces->value[this->Cells->value[i].faces[1]].nodes[0] !=
this->Cells->value[i].nodes[1]) &&
(this->Faces->value[this->Cells->value[i].faces[1]].nodes[1] !=
this->Cells->value[i].nodes[0] &&
this->Faces->value[this->Cells->value[i].faces[1]].nodes[1] !=
this->Cells->value[i].nodes[1]))
{
if (this->Faces->value[this->Cells->value[i].faces[1]].c0 == i)
{
this->Cells->value[i].nodes[2] = this->Faces->value[this->Cells->value[i].faces[1]].nodes[0];
this->Cells->value[i].nodes[3] = this->Faces->value[this->Cells->value[i].faces[1]].nodes[1];
}
else
{
this->Cells->value[i].nodes[3] = this->Faces->value[this->Cells->value[i].faces[1]].nodes[0];
this->Cells->value[i].nodes[2] = this->Faces->value[this->Cells->value[i].faces[1]].nodes[1];
}
}
else if ((this->Faces->value[this->Cells->value[i].faces[2]].nodes[0] !=
this->Cells->value[i].nodes[0] &&
this->Faces->value[this->Cells->value[i].faces[2]].nodes[0] !=
this->Cells->value[i].nodes[1]) &&
(this->Faces->value[this->Cells->value[i].faces[2]].nodes[1] !=
this->Cells->value[i].nodes[0] &&
this->Faces->value[this->Cells->value[i].faces[2]].nodes[1] !=
this->Cells->value[i].nodes[1]))
{
if (this->Faces->value[this->Cells->value[i].faces[2]].c0 == i)
{
this->Cells->value[i].nodes[2] = this->Faces->value[this->Cells->value[i].faces[2]].nodes[0];
this->Cells->value[i].nodes[3] = this->Faces->value[this->Cells->value[i].faces[2]].nodes[1];
}
else
{
this->Cells->value[i].nodes[3] = this->Faces->value[this->Cells->value[i].faces[2]].nodes[0];
this->Cells->value[i].nodes[2] = this->Faces->value[this->Cells->value[i].faces[2]].nodes[1];
}
}
else
{
if (this->Faces->value[this->Cells->value[i].faces[3]].c0 == i)
{
this->Cells->value[i].nodes[2] = this->Faces->value[this->Cells->value[i].faces[3]].nodes[0];
this->Cells->value[i].nodes[3] = this->Faces->value[this->Cells->value[i].faces[3]].nodes[1];
}
else
{
this->Cells->value[i].nodes[3] = this->Faces->value[this->Cells->value[i].faces[3]].nodes[0];
this->Cells->value[i].nodes[2] = this->Faces->value[this->Cells->value[i].faces[3]].nodes[1];
}
}
}
//------------------------------------------------------------------------------
void vtkFLUENTReader::PopulateHexahedronCell(int i)
{
this->Cells->value[i].nodes.resize(8);
if (this->Faces->value[this->Cells->value[i].faces[0]].c0 == i)
{
for (int j = 0; j < 4; j++)
{
this->Cells->value[i].nodes[j] = this->Faces->value[this->Cells->value[i].faces[0]].nodes[j];
}
}
else
{
for (int j = 3; j >= 0; j--)
{
this->Cells->value[i].nodes[3 - j] =
this->Faces->value[this->Cells->value[i].faces[0]].nodes[j];
}
}
// Look for opposite face of hexahedron
for (int j = 1; j < 6; j++)
{
int flag = 0;
for (int k = 0; k < 4; k++)
{
if ((this->Cells->value[i].nodes[0] ==
this->Faces->value[this->Cells->value[i].faces[j]].nodes[k]) ||
(this->Cells->value[i].nodes[1] ==
this->Faces->value[this->Cells->value[i].faces[j]].nodes[k]) ||
(this->Cells->value[i].nodes[2] ==
this->Faces->value[this->Cells->value[i].faces[j]].nodes[k]) ||
(this->Cells->value[i].nodes[3] ==
this->Faces->value[this->Cells->value[i].faces[j]].nodes[k]))
{
flag = 1;
}
}
if (flag == 0)
{
if (this->Faces->value[this->Cells->value[i].faces[j]].c1 == i)
{
for (int k = 4; k < 8; k++)
{
this->Cells->value[i].nodes[k] =
this->Faces->value[this->Cells->value[i].faces[j]].nodes[k - 4];
}
}
else
{
for (int k = 7; k >= 4; k--)
{
this->Cells->value[i].nodes[k] =
this->Faces->value[this->Cells->value[i].faces[j]].nodes[7 - k];
}
}
}
}
// Find the face with points 0 and 1 in them.
int f01[4] = { -1, -1, -1, -1 };
for (int j = 1; j < 6; j++)
{
int flag0 = 0;
int flag1 = 0;
for (int k = 0; k < 4; k++)
{
if (this->Cells->value[i].nodes[0] ==
this->Faces->value[this->Cells->value[i].faces[j]].nodes[k])
{
flag0 = 1;
}
if (this->Cells->value[i].nodes[1] ==
this->Faces->value[this->Cells->value[i].faces[j]].nodes[k])
{
flag1 = 1;
}
}
if ((flag0 == 1) && (flag1 == 1))
{
if (this->Faces->value[this->Cells->value[i].faces[j]].c0 == i)
{
for (int k = 0; k < 4; k++)
{
f01[k] = this->Faces->value[this->Cells->value[i].faces[j]].nodes[k];
}
}
else
{
for (int k = 3; k >= 0; k--)
{
f01[k] = this->Faces->value[this->Cells->value[i].faces[j]].nodes[k];
}
}
}
}
// Find the face with points 0 and 3 in them.
int f03[4] = { -1, -1, -1, -1 };
for (int j = 1; j < 6; j++)
{
int flag0 = 0;
int flag1 = 0;
for (int k = 0; k < 4; k++)
{
if (this->Cells->value[i].nodes[0] ==
this->Faces->value[this->Cells->value[i].faces[j]].nodes[k])
{
flag0 = 1;
}
if (this->Cells->value[i].nodes[3] ==
this->Faces->value[this->Cells->value[i].faces[j]].nodes[k])
{
flag1 = 1;
}
}
if ((flag0 == 1) && (flag1 == 1))
{
if (this->Faces->value[this->Cells->value[i].faces[j]].c0 == i)
{
for (int k = 0; k < 4; k++)
{
f03[k] = this->Faces->value[this->Cells->value[i].faces[j]].nodes[k];
}
}
else
{
for (int k = 3; k >= 0; k--)
{
f03[k] = this->Faces->value[this->Cells->value[i].faces[j]].nodes[k];
}
}
}
}
// What point is in f01 and f03 besides 0 ... this is point 4
int p4 = 0;
for (int k = 0; k < 4; k++)
{
if (f01[k] != this->Cells->value[i].nodes[0])
{
for (int n = 0; n < 4; n++)
{
if (f01[k] == f03[n])
{
p4 = f01[k];
}
}
}
}
// Since we know point 4 now we check to see if points
// 4, 5, 6, and 7 are in the correct positions.
int t[8];
t[4] = this->Cells->value[i].nodes[4];
t[5] = this->Cells->value[i].nodes[5];
t[6] = this->Cells->value[i].nodes[6];
t[7] = this->Cells->value[i].nodes[7];
if (p4 == this->Cells->value[i].nodes[5])
{
this->Cells->value[i].nodes[5] = t[6];
this->Cells->value[i].nodes[6] = t[7];
this->Cells->value[i].nodes[7] = t[4];
this->Cells->value[i].nodes[4] = t[5];
}
else if (p4 == Cells->value[i].nodes[6])
{
this->Cells->value[i].nodes[5] = t[7];
this->Cells->value[i].nodes[6] = t[4];
this->Cells->value[i].nodes[7] = t[5];
this->Cells->value[i].nodes[4] = t[6];
}
else if (p4 == Cells->value[i].nodes[7])
{
this->Cells->value[i].nodes[5] = t[4];
this->Cells->value[i].nodes[6] = t[5];
this->Cells->value[i].nodes[7] = t[6];
this->Cells->value[i].nodes[4] = t[7];
}
// else point 4 was lined up so everything was correct.
}
//------------------------------------------------------------------------------
void vtkFLUENTReader::PopulatePyramidCell(int i)
{
this->Cells->value[i].nodes.resize(5);
// The quad face will be the base of the pyramid
for (size_t j = 0; j < this->Cells->value[i].faces.size(); j++)
{
if (this->Faces->value[this->Cells->value[i].faces[j]].nodes.size() == 4)
{
if (this->Faces->value[this->Cells->value[i].faces[j]].c0 == i)
{
for (int k = 0; k < 4; k++)
{
this->Cells->value[i].nodes[k] =
this->Faces->value[this->Cells->value[i].faces[j]].nodes[k];
}
}
else
{
for (int k = 0; k < 4; k++)
{
this->Cells->value[i].nodes[3 - k] =
this->Faces->value[this->Cells->value[i].faces[j]].nodes[k];
}
}
}
}
// Just need to find point 4
for (size_t j = 0; j < this->Cells->value[i].faces.size(); j++)
{
if (this->Faces->value[this->Cells->value[i].faces[j]].nodes.size() == 3)
{
for (int k = 0; k < 3; k++)
{
if ((this->Faces->value[this->Cells->value[i].faces[j]].nodes[k] !=
this->Cells->value[i].nodes[0]) &&
(this->Faces->value[this->Cells->value[i].faces[j]].nodes[k] !=
this->Cells->value[i].nodes[1]) &&
(this->Faces->value[this->Cells->value[i].faces[j]].nodes[k] !=
this->Cells->value[i].nodes[2]) &&
(this->Faces->value[this->Cells->value[i].faces[j]].nodes[k] !=
this->Cells->value[i].nodes[3]))
{
this->Cells->value[i].nodes[4] =
this->Faces->value[this->Cells->value[i].faces[j]].nodes[k];
}
}
}
}
}
//------------------------------------------------------------------------------
void vtkFLUENTReader::PopulateWedgeCell(int i)
{
this->Cells->value[i].nodes.resize(6);
// Find the first triangle face and make it the base.
int base = 0;
int first = 0;
for (size_t j = 0; j < this->Cells->value[i].faces.size(); j++)
{
if ((this->Faces->value[this->Cells->value[i].faces[j]].type == 3) && (first == 0))
{
base = this->Cells->value[i].faces[j];
first = 1;
}
}
// Find the second triangle face and make it the top.
int top = 0;
int second = 0;
for (size_t j = 0; j < this->Cells->value[i].faces.size(); j++)
{
if ((this->Faces->value[this->Cells->value[i].faces[j]].type == 3) && (second == 0) &&
(this->Cells->value[i].faces[j] != base))
{
top = this->Cells->value[i].faces[j];
second = 1;
}
}
// Load Base nodes into the nodes std::vector
if (this->Faces->value[base].c0 == i)
{
for (int j = 0; j < 3; j++)
{
this->Cells->value[i].nodes[j] = this->Faces->value[base].nodes[j];
}
}
else
{
for (int j = 2; j >= 0; j--)
{
this->Cells->value[i].nodes[2 - j] = this->Faces->value[base].nodes[j];
}
}
// Load Top nodes into the nodes std::vector
if (this->Faces->value[top].c1 == i)
{
for (int j = 3; j < 6; j++)
{
this->Cells->value[i].nodes[j] = this->Faces->value[top].nodes[j - 3];
}
}
else
{
for (int j = 3; j < 6; j++)
{
this->Cells->value[i].nodes[j] = this->Faces->value[top].nodes[5 - j];
}
}
// Find the quad face with points 0 and 1 in them.
int w01[4] = { -1, -1, -1, -1 };
for (size_t j = 0; j < this->Cells->value[i].faces.size(); j++)
{
if (this->Cells->value[i].faces[j] != base && this->Cells->value[i].faces[j] != top)
{
int wf0 = 0;
int wf1 = 0;
for (int k = 0; k < 4; k++)
{
if (this->Cells->value[i].nodes[0] ==
this->Faces->value[this->Cells->value[i].faces[j]].nodes[k])
{
wf0 = 1;
}
if (this->Cells->value[i].nodes[1] ==
this->Faces->value[this->Cells->value[i].faces[j]].nodes[k])
{
wf1 = 1;
}
if ((wf0 == 1) && (wf1 == 1))
{
for (int n = 0; n < 4; n++)
{
w01[n] = this->Faces->value[this->Cells->value[i].faces[j]].nodes[n];
}
}
}
}
}
// Find the quad face with points 0 and 2 in them.
int w02[4] = { -1, -1, -1, -1 };
for (size_t j = 0; j < this->Cells->value[i].faces.size(); j++)
{
if (this->Cells->value[i].faces[j] != base && this->Cells->value[i].faces[j] != top)
{
int wf0 = 0;
int wf2 = 0;
for (int k = 0; k < 4; k++)
{
if (this->Cells->value[i].nodes[0] ==
this->Faces->value[this->Cells->value[i].faces[j]].nodes[k])
{
wf0 = 1;
}
if (this->Cells->value[i].nodes[2] ==
this->Faces->value[this->Cells->value[i].faces[j]].nodes[k])
{
wf2 = 1;
}
if ((wf0 == 1) && (wf2 == 1))
{
for (int n = 0; n < 4; n++)
{
w02[n] = this->Faces->value[this->Cells->value[i].faces[j]].nodes[n];
}
}
}
}
}
// Point 3 is the point that is in both w01 and w02
// What point is in f01 and f02 besides 0 ... this is point 3
int p3 = 0;
for (int k = 0; k < 4; k++)
{
if (w01[k] != this->Cells->value[i].nodes[0])
{
for (int n = 0; n < 4; n++)
{
if (w01[k] == w02[n])
{
p3 = w01[k];
}
}
}
}
// Since we know point 3 now we check to see if points
// 3, 4, and 5 are in the correct positions.
int t[6];
t[3] = this->Cells->value[i].nodes[3];
t[4] = this->Cells->value[i].nodes[4];
t[5] = this->Cells->value[i].nodes[5];
if (p3 == this->Cells->value[i].nodes[4])
{
this->Cells->value[i].nodes[3] = t[4];
this->Cells->value[i].nodes[4] = t[5];
this->Cells->value[i].nodes[5] = t[3];
}
else if (p3 == this->Cells->value[i].nodes[5])
{
this->Cells->value[i].nodes[3] = t[5];
this->Cells->value[i].nodes[4] = t[3];
this->Cells->value[i].nodes[5] = t[4];
}
// else point 3 was lined up so everything was correct.
}
//------------------------------------------------------------------------------
void vtkFLUENTReader::PopulatePolyhedronCell(int i)
{
// We can't set the size on the nodes std::vector because we
// are not sure how many we are going to have.
// All we have to do here is add the nodes from the faces into
// nodes std::vector within the cell. All we have to check for is
// duplicate nodes.
//
// cout << "number of faces in cell = " << Cells[i].faces.size() << endl;
for (size_t j = 0; j < this->Cells->value[i].faces.size(); j++)
{
// cout << "number of nodes in face = " <<
// Faces[Cells[i].faces[j]].nodes.size() << endl;
for (size_t k = 0; k < this->Faces->value[this->Cells->value[i].faces[j]].nodes.size(); k++)
{
int flag;
flag = 0;
// Is the node already in the cell?
for (size_t n = 0; n < Cells->value[i].nodes.size(); n++)
{
if (this->Cells->value[i].nodes[n] ==
this->Faces->value[this->Cells->value[i].faces[j]].nodes[k])
{
flag = 1;
}
}
if (flag == 0)
{
// No match - insert node into cell.
this->Cells->value[i].nodes.push_back(
this->Faces->value[this->Cells->value[i].faces[j]].nodes[k]);
}
}
}
}
//------------------------------------------------------------------------------
void vtkFLUENTReader::ParseDataFile()
{
while (this->GetDataChunk())
{
int index = this->GetDataIndex();
switch (index)
{
case 0:
// cout << "Comment Section" << endl;
break;
case 4:
// cout << "Machine Configuration Section" << endl;
break;
case 33:
// cout << "Grid Size Section" << endl;
break;
case 37:
// cout << "Variables Section" << endl;
break;
case 300:
// cout << "Data Section" << endl;
GetData(1);
break;
case 301:
// cout << "Residuals Section" << endl;
break;
case 302:
// cout << "Residuals Section" << endl;
break;
case 2300:
// cout << "Single Precision Data Section" << endl;
GetData(2);
break;
case 2301:
// cout << "Single Precision Residuals Section" << endl;
break;
case 2302:
// cout << "Single Precision Residuals Section" << endl;
break;
case 3300:
// cout << "Single Precision Data Section" << endl;
GetData(3);
break;
case 3301:
// cout << "Single Precision Residuals Section" << endl;
break;
case 3302:
// cout << "Single Precision Residuals Section" << endl;
break;
default:
// cout << "Data Undefined Section = " << index << endl;
break;
}
}
}
//------------------------------------------------------------------------------
int vtkFLUENTReader::GetDataBufferInt(int ptr)
{
union mix_i {
int i;
char c[4];
} mi = { 1 };
for (int j = 0; j < 4; j++)
{
if (this->GetSwapBytes())
{
mi.c[3 - j] = this->DataBuffer->value.at(ptr + j);
}
else
{
mi.c[j] = this->DataBuffer->value.at(ptr + j);
}
}
return mi.i;
}
//------------------------------------------------------------------------------
float vtkFLUENTReader::GetDataBufferFloat(int ptr)
{
union mix_f {
float f;
char c[4];
} mf = { 1.0 };
for (int j = 0; j < 4; j++)
{
if (this->GetSwapBytes())
{
mf.c[3 - j] = this->DataBuffer->value.at(ptr + j);
}
else
{
mf.c[j] = this->DataBuffer->value.at(ptr + j);
}
}
return mf.f;
}
//------------------------------------------------------------------------------
double vtkFLUENTReader::GetDataBufferDouble(int ptr)
{
union mix_i {
double d;
char c[8];
} md = { 1.0 };
for (int j = 0; j < 8; j++)
{
if (this->GetSwapBytes())
{
md.c[7 - j] = this->DataBuffer->value.at(ptr + j);
}
else
{
md.c[j] = this->DataBuffer->value.at(ptr + j);
}
}
return md.d;
}
//------------------------------------------------------------------------------
void vtkFLUENTReader::GetData(int dataType)
{
size_t start = this->DataBuffer->value.find('(', 1);
size_t end = this->DataBuffer->value.find(')', 1);
std::string info = this->DataBuffer->value.substr(start + 1, end - start - 1);
std::stringstream infostream(info);
int subSectionId, zoneId, size, nTimeLevels, nPhases, firstId, lastId;
infostream >> subSectionId >> zoneId >> size >> nTimeLevels >> nPhases >> firstId >> lastId;
// Is this a cell zone?
int zmatch = 0;
for (size_t i = 0; i < this->CellZones->value.size(); i++)
{
if (this->CellZones->value[i] == zoneId)
{
zmatch = 1;
}
}
if (zmatch)
{
// Set up stream or pointer to data
size_t dstart = this->DataBuffer->value.find('(', 7);
size_t dend = this->DataBuffer->value.find(')', dstart + 1);
std::string pdata = this->DataBuffer->value.substr(dstart + 1, dend - dstart - 2);
std::stringstream pdatastream(pdata);
size_t ptr = dstart + 1;
// Is this a new variable?
int match = 0;
for (size_t i = 0; i < this->SubSectionIds->value.size(); i++)
{
if (subSectionId == this->SubSectionIds->value[i])
{
match = 1;
}
}
if ((match == 0) && (size < 4))
{ // new variable
this->SubSectionIds->value.push_back(subSectionId);
this->SubSectionSize->value.push_back(size);
this->SubSectionZones->value.resize(this->SubSectionZones->value.size() + 1);
this->SubSectionZones->value[this->SubSectionZones->value.size() - 1].push_back(zoneId);
}
if (size == 1)
{
this->NumberOfScalars++;
this->ScalarDataChunks->value.resize(this->ScalarDataChunks->value.size() + 1);
this->ScalarDataChunks->value[this->ScalarDataChunks->value.size() - 1].subsectionId =
subSectionId;
this->ScalarDataChunks->value[this->ScalarDataChunks->value.size() - 1].zoneId = zoneId;
for (int i = firstId; i <= lastId; i++)
{
double temp;
if (dataType == 1)
{
pdatastream >> temp;
}
else if (dataType == 2)
{
temp = this->GetDataBufferFloat(static_cast<int>(ptr));
ptr = ptr + 4;
}
else
{
temp = this->GetDataBufferDouble(static_cast<int>(ptr));
ptr = ptr + 8;
}
this->ScalarDataChunks->value[this->ScalarDataChunks->value.size() - 1]
.scalarData.push_back(temp);
}
}
else if (size == 3)
{
this->NumberOfVectors++;
this->VectorDataChunks->value.resize(this->VectorDataChunks->value.size() + 1);
this->VectorDataChunks->value[this->VectorDataChunks->value.size() - 1].subsectionId =
subSectionId;
this->VectorDataChunks->value[this->VectorDataChunks->value.size() - 1].zoneId = zoneId;
for (int i = firstId; i <= lastId; i++)
{
double tempx, tempy, tempz;
if (dataType == 1)
{
pdatastream >> tempx;
pdatastream >> tempy;
pdatastream >> tempz;
}
else if (dataType == 2)
{
tempx = this->GetDataBufferFloat(static_cast<int>(ptr));
ptr = ptr + 4;
tempy = this->GetDataBufferFloat(static_cast<int>(ptr));
ptr = ptr + 4;
tempz = this->GetDataBufferFloat(static_cast<int>(ptr));
ptr = ptr + 4;
}
else
{
tempx = this->GetDataBufferDouble(static_cast<int>(ptr));
ptr = ptr + 8;
tempy = this->GetDataBufferDouble(static_cast<int>(ptr));
ptr = ptr + 8;
tempz = this->GetDataBufferDouble(static_cast<int>(ptr));
ptr = ptr + 8;
}
this->VectorDataChunks->value[this->VectorDataChunks->value.size() - 1]
.iComponentData.push_back(tempx);
this->VectorDataChunks->value[this->VectorDataChunks->value.size() - 1]
.jComponentData.push_back(tempy);
this->VectorDataChunks->value[this->VectorDataChunks->value.size() - 1]
.kComponentData.push_back(tempz);
}
}
else
{
// cout << "Weird Variable Size = " << size << endl;
}
}
}
//------------------------------------------------------------------------------
void vtkFLUENTReader::SetDataByteOrderToBigEndian()
{
#ifndef VTK_WORDS_BIGENDIAN
this->SwapBytesOn();
#else
this->SwapBytesOff();
#endif
}
//------------------------------------------------------------------------------
void vtkFLUENTReader::SetDataByteOrderToLittleEndian()
{
#ifdef VTK_WORDS_BIGENDIAN
this->SwapBytesOn();
#else
this->SwapBytesOff();
#endif
}
//------------------------------------------------------------------------------
void vtkFLUENTReader::SetDataByteOrder(int byteOrder)
{
if (byteOrder == VTK_FILE_BYTE_ORDER_BIG_ENDIAN)
{
this->SetDataByteOrderToBigEndian();
}
else
{
this->SetDataByteOrderToLittleEndian();
}
}
//------------------------------------------------------------------------------
int vtkFLUENTReader::GetDataByteOrder()
{
#ifdef VTK_WORDS_BIGENDIAN
if (this->SwapBytes)
{
return VTK_FILE_BYTE_ORDER_LITTLE_ENDIAN;
}
else
{
return VTK_FILE_BYTE_ORDER_BIG_ENDIAN;
}
#else
if (this->SwapBytes)
{
return VTK_FILE_BYTE_ORDER_BIG_ENDIAN;
}
else
{
return VTK_FILE_BYTE_ORDER_LITTLE_ENDIAN;
}
#endif
}
//------------------------------------------------------------------------------
const char* vtkFLUENTReader::GetDataByteOrderAsString()
{
#ifdef VTK_WORDS_BIGENDIAN
if (this->SwapBytes)
{
return "LittleEndian";
}
else
{
return "BigEndian";
}
#else
if (this->SwapBytes)
{
return "BigEndian";
}
else
{
return "LittleEndian";
}
#endif
}
//------------------------------------------------------------------------------
void vtkFLUENTReader::GetSpeciesVariableNames()
{
// Locate the "(species (names" entry
std::string variables = this->CaseBuffer->value;
size_t startPos = variables.find("(species (names (") + 17;
if (startPos != std::string::npos)
{
variables.erase(0, startPos);
size_t endPos = variables.find(')');
variables.erase(endPos);
std::stringstream tokenizer(variables);
int iterator = 0;
while (!tokenizer.eof())
{
std::string temp;
tokenizer >> temp;
this->VariableNames->value[200 + iterator] = temp;
this->VariableNames->value[250 + iterator] = "M1_" + temp;
this->VariableNames->value[300 + iterator] = "M2_" + temp;
this->VariableNames->value[450 + iterator] = "DPMS_" + temp;
this->VariableNames->value[850 + iterator] = "DPMS_DS_" + temp;
this->VariableNames->value[1000 + iterator] = "MEAN_" + temp;
this->VariableNames->value[1050 + iterator] = "RMS_" + temp;
this->VariableNames->value[1250 + iterator] = "CREV_" + temp;
iterator++;
}
}
}
|
def check_for_recommendation_result_report(context):
json_data = context.response.json()
if "recommendation" in json_data:
check_recommendation_in_result(context)
else:
look_for_other_attributes(context)
check_vulnerability_in_result(context) |
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.i18n import i18n_patterns
from django.conf.urls.static import static
from django.contrib import admin
#urlpatterns = patterns('',
# # Examples:
# # url(r'^$', 'djangoapps.views.home', name='home'),
# # url(r'^blog/', include('blog.urls')),
# url(r'^admin/', include(admin.site.urls)),
# url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework'))
#)
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^filer/', include('filer.urls')),
url(r'^taggit_autosuggest/', include('taggit_autosuggest.urls')),
url(r'^', include('cms.urls')),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) |
// =============================================================================
// Callback class for contact reporting
class ContactReporter : public ChContactContainer::ReportContactCallback {
public:
ContactReporter(ChSystemMulticore* system) : sys(system) {
csv << sys->GetChTime() << sys->GetNcontacts() << endl;
}
void write(const std::string& filename) { csv.write_to_file(filename); }
private:
virtual bool OnReportContact(const ChVector<>& pA,
const ChVector<>& pB,
const ChMatrix33<>& plane_coord,
const double& distance,
const double& eff_radius,
const ChVector<>& cforce,
const ChVector<>& ctorque,
ChContactable* modA,
ChContactable* modB) override {
auto bodyA = static_cast<ChBody*>(modA);
auto bodyB = static_cast<ChBody*>(modB);
csv << bodyA->GetIdentifier() << bodyB->GetIdentifier();
csv << pA << pB;
csv << plane_coord.Get_A_Xaxis() << plane_coord.Get_A_Yaxis() << plane_coord.Get_A_Zaxis();
csv << cforce << ctorque;
csv << endl;
return true;
}
ChSystemMulticore* sys;
utils::CSV_writer csv;
} |
UPDATE – After almost three years, this Bond is back on eBay with the same photos and a $4,000 asking price.
FROM 4/4/16 – This is an unusual car, at least in the US it is. The 1969 Bond Equipe GT Convertible shown here is actually in Portugal on eBay. Yes, I know that it’s not in the US, but Barn Finds has readers all over the globe so maybe someone in Europe would want to add this car to their collection. The bids are just over $200 so far with the reserve not yet met and 5 days left on the auction.
The Bond Equipe was Bond’s first 4-wheel car. We’ve all see the famous Bond 3-wheel cars and, unfortunately, we’ve also probably all seen the infamous and fabricated tv episode where one was loaded with weights in order to purposely make it tip over for supposed “comedic effect”. I personally don’t think that it was very funny to dream up such a scheme and ruin an entire car maker’s reputation in a few short minutes, but that’s just my opinion. The Bond Equipe 2-liter GT, such as this car is, was based on the Triumph Vitesse chassis and was designed in-house. I really like the slightly funky proportions on this car.
Yes, this one will need restoration. You can see part of the work ahead of you here on the LF wing/fender. The seller says that the floor will need some rust repairs and some work is needed on the bonnet (I’m guessing what’s shown above here). I have never seen one of these Bond Equipe GTs in person but it’s a bit reminiscent of a Rover, in my opinion. And, of course, now I want one; a lot.
The interior looks pretty nice for a car that’s said to need a full restoration. Maybe they’re pickier in Portugal than I am, this one looks like it could be cleaned up nicely. This is an overdrive car, an even more desirable version. There were only 841 Bond Equipe 2-Liter Convertibles made, there can’t be many left.
It looks like you might be able to fit your kids in the backseat, possibly, maybe. This Equipe is a 2+2 so it wasn’t really meant to be a full-sized car. It had just enough room in back if you were in a pinch and had to take someone along, but it was most likely meant for carrying the groceries or luggage back there. It looks like it’s in decent nick inside but will need a bit of tidying up.
Here’s the 2.0L 6-cylinder Triumph Vitesse engine in this car, and here is one on YouTube running. Unfortunately, the seller says that this engine isn’t running at the moment, hopefully it’s something simple. This engine has a little over 100hp, not too bad for a car that weighs a shade over a ton and can do 100 mph. I’d want to source an original air cleaner for sure, and maybe pull this engine and check it out, not to mention that I’d want to tidy up the engine bay; I’m funny that way. I really like this car. Have you seen a Bond Equipe GT or are you just familiar with the famous/infamous 3-wheel Bonds? |
Genome and Transcriptome Analysis of the Fungal Pathogen Fusarium oxysporum f. sp. cubense Causing Banana Vascular Wilt Disease Background The asexual fungus Fusarium oxysporum f. sp. cubense (Foc) causing vascular wilt disease is one of the most devastating pathogens of banana (Musa spp.). To understand the molecular underpinning of pathogenicity in Foc, the genomes and transcriptomes of two Foc isolates were sequenced. Methodology/Principal Findings Genome analysis revealed that the genome structures of race 1 and race 4 isolates were highly syntenic with those of F. oxysporum f. sp. lycopersici strain Fol4287. A large number of putative virulence associated genes were identified in both Foc genomes, including genes putatively involved in root attachment, cell degradation, detoxification of toxin, transport, secondary metabolites biosynthesis and signal transductions. Importantly, relative to the Foc race 1 isolate (Foc1), the Foc race 4 isolate (Foc4) has evolved with some expanded gene families of transporters and transcription factors for transport of toxins and nutrients that may facilitate its ability to adapt to host environments and contribute to pathogenicity to banana. Transcriptome analysis disclosed a significant difference in transcriptional responses between Foc1 and Foc4 at 48 h post inoculation to the banana Brazil in comparison with the vegetative growth stage. Of particular note, more virulence-associated genes were up regulated in Foc4 than in Foc1. Several signaling pathways like the mitogen-activated protein kinase Fmk1 mediated invasion growth pathway, the FGA1-mediated G protein signaling pathway and a pathogenicity associated two-component system were activated in Foc4 rather than in Foc1. Together, these differences in gene content and transcription response between Foc1 and Foc4 might account for variation in their virulence during infection of the banana variety Brazil. Conclusions/Significance Foc genome sequences will facilitate us to identify pathogenicity mechanism involved in the banana vascular wilt disease development. These will thus advance us develop effective methods for managing the banana vascular wilt disease, including improvement of disease resistance in banana. Introduction The species Fusarium oxysporum (Fo) comprises a group of ubiquitous inhabitants of soils and plant pathogens causing vascular wilt and root diseases on a broad range of agricultural and ornamental plants worldwide. The plant-pathogenic Fo can be divided into more than 120 formea speciales (f. sp.) according to the pathogenicity to a set of host plants, and some formea speciales of Fo are further divided into several physiological races. F. oxysporum f. sp. cubense (Foc) is the causal agent of fusarium wilt of banana (Musa spp.), which is one of the most important constraints on banana production and cause serious economic losses worldwide. It can be divided into four physiological races, race 1, 2, 3 and 4. Race 1 infects the banana cultivars 'Gros Michel' (Musa sp. AAA group), 'Pome', 'Silk' and 'Pisang Awak' (Musa sp. AAB group) and causing the 20th century epidemic. Race 2 infects the cultivar 'Bluggoe' and its closely related cultivars. Race 3 does not infect Musa species. By contrary, race 4 has a remarkably broad host range infecting almost all cultivars including 'Dwarf Cavendish' (Musa sp. AAA group) as well as the hosts of races 1 and race 2. The asexual fungus Foc produces three types of asexual spores including macroconidia, microconidia and chlamydospore in its life cycle (Figure 1 A-C), enabling it to disperse and survive. It shares a similar infection cycle with F. oxysporum f. sp. lycopercisi (Fol) causing tomato wilt disease. Firstly, Foc conidia germinate and form fungal hyphae under various nutrients conditions and in the host plant environment. Further, fungal hyphae spread around and colonize at root surface. After that, the fungal hyphae would cross the epidermis (Figure 1 D) As a saprophyte, Foc can persist in soil for a long time. Once it recognizes and perceives the cues from host plants, it begins infecting host bananas from roots. Few effective options for managing this ineradicable pathogen, as fungicides are largely ineffective. Therefore, formulating effective control methods for fusarium wilt of bananas is a thing of great urgency, and this largely requires better understanding of the fungal pathogen, especially its genome. Previously, the genomes of the tomato pathogen Fol and the maize pathogen F. verticillioides were sequenced and the Fusarium comparative genomics highlights the lineage-specific genomic regions in Fol that are responsible for the polyphyletic origin of host specificity. In the present study, our objectives are: Sequencing and analyzing the genomes of the isolates N2 (race 1, Foc1) and B2 (race 4, Foc4) of Foc. Exploring the putative virulence associated genes. Analyzing the transcriptomes of Foc1 and Foc4 at both vegetative growth stage and 48 h post inoculation to the Cavendish banana 'Brazil'. All of these will facilitate identification of the pathogenicity mechanisms involved in vascular wilt development, and molecular mechanism underlying the difference in virulence between Foc1 and Foc4. Genome Sequencing and General Features The isolates N2 (race 1, Foc1) and B2 (race 4, Foc4) of Foc were each sequenced to at least 1066coverage (Table1 and Table S1 in File S1). The genome of Foc1 was assembled into 461 scaffolds (. 2 kb; N50, 653.1 kb) containing 2,977 contigs with a total size of 47.84 Mb. The genome of the isolate B2 was assembled into 164 scaffolds (.2 kb; N50, 1.9 Mb) containing 4,109 contigs with a total size of 53.12 Mb (Table 1 & Table S2 in File S1). The assembly sizes of both Foc isolates resemble that of Foc tropical race 4 strain II5 (46.55 Mb), which was released by Broad institute (http://www.broadinstitute.org/annotation/genome/ fusarium_group/). Foc1 and Foc4 were predicted to have 17,462 and 18,065 coding genes, respectively. The coding capacities are thus similar to those of other ascomycetes such as Foc strain II5 and Fol strain 4287. The 5 Mb difference in genome size between Foc1 and Foc4 is probably due to the fact that we constructed more libraries with large inserts and got more mate pair information for Foc4, which benefited to connect contigs into scaffolds for Foc4 but meanwhile introduced more gaps (Table S1 in File S1). To check the integrity of the assembly, sequenced reads were aligned to the corresponding assemblies, about 98.05% of Foc1 reads from libraries with small size inserts can be aligned to the Foc1 assemblies, and 97.96% of Foc4 reads can be aligned to the Foc4 assemblies. High map ratio indicates that the assemblies represent most of the genomes. In both Foc1 and Foc4 genomes, coding regions account for,53.50% of the genome with 2.82 exons per gene; the average exon length is 480 bp. Moreover, a bidirectional best hits (BBH) analysis revealed that Foc1 and Foc4 genomes shared 15,140 orthologs with average 96.7% of amino acid identity. 15,692 (or 90.0%) coding genes in Foc1 and 16,288 (or 90.2%) coding genes in Foc4 were functionally annotated after alignment of these sequences to the known databases including Gene Ontology (GO), Kyoto Encyclopedia of Genes and Genomes (KEGG), SwissProt and TrEMBL (Table 1). Interestingly, of 15,140 orthologs shared by Foc1 and Foc4, 129 showed poor amino acid identity (,50%) (Table S3). Only one third of these orthologs (37 genes in Foc1 and 41 in Foc4) could be categorized into some functional groups based on GO terms, and no more than one half of these genes have annotations in KEGG and Interpro databases, indicting these genes might be under rapid evolution and thus displayed high variations. Differences in Genome Structure between Foc and Fol The comparative analysis of Fusarium genomes conducted by Ma L et al. revealed that the Fol possesses lineage-specific (LS) genomic regions including four entire chromosomes (Chr03, Chr06, Chr14 and Chr15), which are rich in transposons and genes related to pathogenicity. To confirm presence of the LS genomic regions in Foc, all sequence reads of Foc1 and Foc4 were aligned against the Fol genome using BWA with parameters including sequence similarity, pair-end relationships and sequence quality. We found that the assemblies of Foc1 and Foc4 can be mapped to the most chromosomes of Fol, except four chromosomes (Chr03, Chr06, Chr14 and Chr15, Figure 2). Therefore, similar to the genomes of F. graminearum and F. verticillioides, both Foc genomes contain no the lineage-specific (LS) genomic regions that unique to Fol. This supports that the four chromosomes in Fol are the lineage-specific regions. Gene Families and Phylogenetic Relationship of Some Sequenced Fusaria 17,196 (98.5%) of Foc1 genes can be assigned into 12,366 gene families at least with one other species, while 17,758 (98.3%) of Foc4 genes can be assigned into 12,365 gene families. 2,997 single-copy gene orthologous groups were obtained, and sequences of single-copy genes from each species were concatenated into a super gene to infer the phylogeny tree. As shown in Figure 3, the tree indicates a close relationship between two sequenced Foc isolates and Fol, suggesting that they might descent from a common ancestor. Gene Involved in Adhesion to Host The ability of fungi to adhere to target tissue could attribute to pathogenicity. Deletion of the adhesin gene WI-1 (related BAD1, PHI: 135) from Blastomyces dermatitidis resulted in impairment in binding and entry of yeasts into macrophages, loss of adherence to lung tissue and virulence in mice. Similar functions were found in SOWgp (PHI: 272) from Coccidioides immitis. Deletion of the MAP Kinase gene fmk1 result in impaired root attachment in Fo. Prados-Rosales R et al. identified a fraction of proteins involved in attachment of roots from cell wall proteome of Fol, but these proteins lacked functional information. Here, we identified 5 and 6 adhesin genes in Foc1 and Foc4 genomes, respectively,one of which is the counterpart of SOWgp. While, the II5 strain genome of Foc race 4 contains the similar sequences of both WI-1 and SOWgp. Notably, almost all putative adhesion genes of Foc (5 in Foc1 and Foc4) had mRNA transcripts at both vegetative growth stage and 48 h post inoculation to the banana 'Brazil'. Moreover, 3 adhesin genes were markedly (above 3-fold) induced in Foc4 banana, but only one was up regulated in Foc1 at 48 h post inoculation to the banana 'Brazil' in comparison with the vegetative growth. These suggest that adhesin genes might play roles during the fungal pathogen was exposed to the banana 'Brazil'. Aside from these secreted CAZys, three putative SPs encoded by Foc are significantly homologous to those effectors from the oomycetes Phytophthora sojae and P. infestans such as INF2A, INF2B GIP1, GIP2, and PosjNIPw (Table S4 in File S1), which are able to elicit hypersensitive response or induce necrosis in host plants, suggesting that these SPs could be involved in Fobanana interaction. Similarly, some gene products (Table S4 in File S1) are orthologous to the characterized SPs such as PEP1, PEP2, and PEP5 from Nectria haematococca (anamorph: F. solani), MSP1 and AVR-Pita from M. oryzae that contribute to the fungal pathogenicity to pea or rice, indicating that these SPs encoded by Foc may be related to the virulence to banana. In airborne fungal pathogens, a number of secreted hydrophobins have pleiotropic functions including attachment of spores to hydrophobic surfaces, involvement in surface interactions during infection-related development, and preventing immune recognition. Although none of hydrophobins in Fo have been characterized, we identified several class II hydrophobins in Foc (3 for Foc1 and 4 for Foc4), one of which is evolutionary related to the hydrophobin MHP1 (PHI: 458) that is [21,. The SIX (secreted in xylem) proteins SIX1 (Avr3), SIX3 (Avr2) and SIX4 (Avr1) function as either Avr protein (effector) involved in the incompatible interaction or virulence factors implicated in the compatible interactions between tomato and Fol [21,. We searched across the Foc1 and Foc4 assemblies to identify the orthologs of these SIX-coding genes (namely SIX1-SIX8). Our analysis revealed that three orthologs of SIX1 interspersed in Foc4 genome (namely Six1a-Six1c, Table 2), while only one copy of SIX1 existed in Foc1. Besides, Foc4 has one copy of SIX2, SIX6 and SIX8, whereas Foc1 merely has one copy of SIX6. This differentiates from the previous study on SIX genes using hybridization analysis and PCR, which reported one copy of SIX1, SIX7 and SIX8 in another race 4 isolate of Foc. Since we have manually checked the sequencing depth and synteny relationship nearby these regions, we excluded the possibility of assembly errors and assumed that the difference is probably due to strain variations and some other unknown reasons. Further, we used the same pipeline and parameters to search against the strain II5 genome of the Foc race 4, which also demonstrated the similar results with 3 copies of SIX1, one copy of SIX2 and SIX6 but without SIX8 (data not shown) in the strain II5, indicating that three copies Six1 genes may be conserved in different isolates of Foc and could be involved in pathogenicity against banana. Expression of three copies of SIX1 from Foc4 and one copy from Foc1 was detectable at both the vegetative growth stage and 48 h post inoculation to banana (Table 2), implying they functioned at both stages, and additional copies may contribute to higher pathogenicity of Foc4 to banana. Interestingly, expression of Six1 gene by Foc1 and Foc4 was induced at preinfection stage relative to that at vegetative growth stage. This consists with the result that SIX1 was induced immediately upon penetration of the root cortex in tomato, and induction required living plant cells. Additionally, Foc4 contains SIX2 and SIX8 genes that are absent in Foc1, we thus further assume that SIX2 and SIX8 genes may have roles in infection of Cavendish banana 'Brazil' and contribute to the broader host range of Foc4. Further assays including gene deletion and complementary may better demonstrate the functions of these genes in Foc4. Genes Putatively Involved in Detoxification and Transportation Plants produce various secondary metabolites, many of which have antifungal activity, such as saponin, flavone and cyclohexenone, and these antifungal molecules may provide a preformed chemical barrier against phytopathogenic fungi. Correspondingly, fungi have evolved a diversity of enzymes to detoxify toxins. We revealed some sequences that resemble the PHI sequences in both Foc genomes such as GzmetE (PHI: 355) from F. graminearum, tomatinase (tom1, PHI: 191) from the tomato pathogen Fol as well as the kievitone hydratase 'khs' and flavincontaining mono-oxygenase MAK1 (PHI: 112) from F. solani. Both GzmetE and tomatinase were characterized to participate in detoxification of saponin. Also, both khs and MAK1 are capable to catalyze conversion of the antimicrobial phytoalexins 'kievitone' and 'maackiain' to less toxic metabolites, respectively. These imply that Foc might produce a variety of enzymes that participate in the detoxification of antifungal molecules that preformed in host banana during its colonization. Cytochrome P450s (CYP) play essential roles in the fungal biosynthesis of secondary metabolites and detoxification of toxic compounds. Both Foc genomes encode a great number of putative CYP genes (173 CYPs in Foc1 and 176 in Foc4, Table 3), some of which are similar to the characterized fungal CYP sequences including the monooxygenase gene BcBOT1 (PHI: 438) and the demethylases genes PDAT9 and PDA6-1, the products of which are either involved in phytotoxin biosynthesis in Botrytis cinerea (BcBOT1), or participate in detoxify the phytoalexin pisatin from garden pea (PDAT9 and PDA6-1). Additionally, the orthologs of the sterol 14alpha-demethylase enzyme genes MoCYP51A and MoCYP51B that are essential for virulence to rice in M. oryzae, were also discovered in both Foc genomes. Besides the detoxification enzymes, some peroxidases were putatively implicated in detoxification of host defense metabolites. Foc1 encodes 25 peroxidases versus 28 for Foc4 (Table 3). 3 proteins encoded by Foc are highly similar to the catalaseperoxidases VlcpeA from Verticillium longisporum and CPXB from M. oryzae that have roles in defense against hydrogen peroxide (H 2 O 2 ) generated by the host plant during the fungal infection. Additionally, we also found the Foc homologs of the glutathione peroxidase HYR1 that has similar functions in M. oryzae. Different transporters are essential for import of the nutrients and export of secondary metabolites and other toxic compounds. Both Foc genomes encode a large number of transporters (1001 in Foc1 and 1040 in Foc4, Table 3). The major facilitator superfamily (MSF) and the amino acid-polyamine-organocation (APC) family were preferentially expanded in Foc4 (405 MSF, 100 APC) relative to Foc1 (379 MSF, 91 APC). MSF proteins were usually involved in the transport of a wide range of substrates, and APC transporters mediate uptake of amino acids and their derivatives. The enrichment of both the families in Foc4 implies that Foc4 might have a greater ability to access a range of nutrients than do Foc1. Interestingly, 16 of these putative transporters from both Foc1 and Foc4 are similar to the virulence-associated proteins in PHI database (Table S4 in File S1) including 8 in MSF, 5 in ATP-binding cassette (ABC) superfamily and 3 in the p-type ATPase (p-ATPase) superfamily. The transporter CFP that belongs to MSF was characterized to facilitate transport of phytoxins and involved in toxin secretion, and the five members of ABC (ABC1, ABC3, GPABC1, BcatrB and MgAtr4) are required for export of fungitoxic compounds. These indicate that transporters of MSF, ABC and p-ATPase families might be implicated in export of antifungal compounds and be required for Foc virulence. The Gene Clusters Involved in Biosynthesis of Secondary Metabolites Fungi, especially soil-dwelling filamentous fungi, produce an abundant array of secondary metabolites (SMs) including mycotoxins, antibiotics and pharmaceuticals. This impressive amount of SMs provides protection against various environmental stresses and during antagonistic interactions with other soil inhabitants or a eukaryotic host. Recently, some SMs including beauvericin, gibberellins (GAs) and other SMs were found to play important roles in fungus-host interaction. Deletion of a beauvericin synthetase coding gene-beas resulted in marked reduction on production of beauvericin, and therefore the mutant demonstrated an attenuated virulence to tomato. Interestingly, beauvericin and fusaric acid were found to be toxins produced by Foc during invasive growth in banana. Both toxins were detected in the all tissues of banana with fusarium wilt symptoms including pseudostems, fruit and leaves, and the contents in banana roots were well correlated with virulence of the isolates of Foc. GA produced by the rice pathogen F. fujikuroi accounts for 'bakanae' disease of rice. Wiemann P et al. revealed that GA biosynthesis genes are present in some related species, but GA synthesis is limited to F. fujikuroi. Also, they found the SM product of the PKS19 cluster that is unique to F. fujikuroi plays a special role during rice infection. In the present study, 32 and 34 backbone genes were identified in the assemblies of Foc1 and Foc4, respectively (Table 3 and Table S6 in File S1). 2 backbone genes are unique in Foc1 versus 4 in Foc4. We also identified putative 26 and 30 gene clusters involved in the biosynthesis of secondary metabolites for Foc1 and Foc4, respectively (Table S7 & Table S8 in File S1). Functions of the majority of SMs derived gene clusters are largely unknown, some of the gene clusters were putatively involved in the biosynthesis of secondary metabolites including beauvericin, Fusaric acid, Fusarin C, Fumonisin and Fusarubin (Table S6 in File S1). Moreover, a number of putative SMs backbone genes in Foc are orthologous to the virulence-associated genes that were experimentally proven to be involved in secondary metabolites in other fungi. For instance, Foc1g11839 and Foc4g01275 are homologous to the polyketide synthases ALB1 (PHI: 101) and other four homologs (PHI: 40, 116, 433 & 238, Table S4 in File S1) that was characterized to be involved in regulation of virulence of Aspergillus fumigatus, Cercospora nicotianae, Colletotrichum lagenarium and other fungal pathogens. Similarly, Foc1g07907 and Foc4g04228 are homologous to the avirulence protein ACE1 (PHI: 325) that is involved in secondary metabolism in Magnaporthe grisea. We also found that Foc1g06330 and Foc4g02522 are homologs of the cyclic peptide synthetases HTS1 (PHI: 12) from the maize pathogen fungus Cochliobolus carbonum and AMT (PHI: 160 ) from Alternaria alternata apple pathotype that is involved in AM-toxin synthesis and pathogenicity. Additionally, Foc1g07090 and Foc4g09766 resemble the nonribosomal peptide synthetase NPS6 (PHI: 416, 1008, 1009), which was characterized to be a conserved virulence determinant of plant pathogenic ascomycetes. Together, the presence of these genes in both Foc genomes implies they might be virulence determinants and play roles in Foc-banana interactions. Signal Conduction In order to establish disease, fungal pathogen needs to respond appropriately to the plant environment. In pre-infection course, perception of the signals from the host plant environment is mediated by the receptor on the surfaces of pathogen cells, though a major of receptors remain unknown. Important progress on G protein mediated signaling revealed that G proteins control fungal growth, development and pathogenicity. A novel class of GPCR typified by PTH11 was found to be required for pathogenicity in the plant pathogenic fungus M. grisea. Also, GprD in Aspergillus fumigatus was suggested as an essential regulator of colony growth, hyphal morphogenesis, and virulence. In Fo, the roles of GPCRs in G protein signaling pathway were not characterized, but G protein alpha and beta subunit were elucidated to be involved in growth, development and pathogenicity (FGA1, FGA2, FGB1 ). We revealed,115 genes encoding the putative GPCRs (including Pth11 like) and G proteins in Foc (Table S9 in File S1). Both Foc1 and Foc4 have three genes encoding alpha subunit of G protein, two distinct genes encoding beta and gamma subunits. These indicate conservation in G protein signaling pathway among different ascomycete fungi. Protein kinases are responsible for the phosphorylation of proteins, which thus play pivotal roles in signal transduction in eukaryote cells. Both Foc genomes encode,100 protein kinases (94 for Foc1 and 103 for Foc4, Table 3 & Table S10 in File S1), 19 of which have highly similar sequences in PHI database (Table S4 in File S1). This implies that protein kinases and the pathways that they are involved in have crucial roles during infection of banana. Among these 19 protein kinases, Fmk1 is unique protein kinase that has been functionally characterized in Fo. The RNA-seq data revealed the transcript levels of some virulence associated kinase genes (7 out of 25) were significantly increased in Foc4 but were decreased or had no variation in Foc1 during exposed to the 'Brazil' banana for 48 h as compared to that at the vegetative growth stage. We thus inferred that the seven protein kinases might participate in infection process and contribute to virulence to the banana 'Brazil'. Unexpectedly, the expression of Fmk1 was induced neither in Foc1 nor in Foc4, implying that its induction might be not required for Foc during pre-infection of banana. Following the signal transduction, different transcription factors (TFs) would be activated to regulate physiological response of cells. Foc1 encodes 729 putative transcription factors compared to 793 for Foc4 ( Table 3). The numbers of TF families of homeodomain-like and Zn2Cys6 were significantly higher in Foc4 than in Foc1 (Table S11 in File S1). Sixteen of these putative transcription factors have homologs in PHI database (Table S4 in File S1). For example, four putative Zn(II)2Cys6-type transcription factors are markedly similar to Fow2 (PHI: 734), CLTA1 (PHI: 169), MGG_09263 (PHI: 889) and CTB8 (PHI: 1050) that were experimentally proven to be implicated in pathogenicity [16,. Also, four putative basic-leucine zipper (bZIP) transcription factors in Foc are homologous to the virulence associated proteins including ZIF1 (PHI: 444) from F. graminearum, YAP1 (PHI: 853) from Ustilago maydis, CPCA (PHI: 340) from Aspergillus fumigatus and CPTF1 (PHI: 344) from Claviceps purpurea. Most importantly, we found that Foatf1 is the homolog of YAP1 in Foc4, which is involved in pathogenesis by regulating the oxidative stress responses of Cavendish banana (Musa spp.). Fost12, the Fo ortholog of the yeast homeodomain transcription factor Ste12p, was also characterized to govern invasion growth and pathogenicity. The other virulence-associated genes including SPT3 ( Inspecting the expression profiling of different transcription factor genes, 12 out of 16 virulence-associated genes were significantly induced and none was markedly suppressed in Foc4 at 48 h post inoculation to the banana 'Brazil' relative to that at vegetative growth stage. In contrast, only 2 of those were induced, and 6 were apparently suppressed in Foc1 (Table S4 in File S1). These suggest that Foc4 could employ more TFs that are associated with virulence as compared to Foc1 during exposed to the banana 'Brazil'. Comparative Transcriptome Analysis It is well known that the Cavendish banana is resistant to Foc race 1 but is susceptible to Foc race 4. The mechanism underlying the difference in the pathogenicity to Cavendish banana between Foc race 1 and Foc race 4 is still ambiguous. To identify genes and signaling pathways involved in pathogenesis and explore molecular basis of the difference in virulence between two races, we analyzed the transcriptional responses of Foc1 and Foc4 using RNA-Seq. The data generated from Foc1 and Foc4 collected at vegetative stage was used as the control, and the time-point (48 hours post inoculation) was chosen to focus on the crucial preinfection processes, including adhesion to roots, recognition of host and production of infectious mycelia. After sequencing,,9.2 Gb and 6.4 Gb of sequence data for Foc1 and Foc4 were generated, respectively. 62 transcribed at vegetative stage and 48 h post inoculation, respectively, which were comparable with 86.06% and 81.08% of that in Foc4 (Table 1). Among these expressed genes, 2,101were significantly up regulated and 4,153 were markedly down regulated in Foc1, while 2,410 and 5,642 were significantly upregulated and down-regulated in Foc4, respectively ( Figure 4). To confirm the accuracy of the RNA-seq result, 15 Foc genes were chosen randomly for real time quantitative PCR (qPCR). These genes were involved in signaling, biosynthesis, metabolism and pathogenesis, or were hypothetical proteins, and included up and down regulated genes as well as unaffected genes. The qPCR results are generally consistent with the variation in transcript levels determined by RNA-seq, suggesting the reliability of the RNA-seq data (Table S12 in File S1). Upon infection F. oxysporum switches from a saprophytic to an infectious lifestyle, which probably includes the reprogramming of gene expression. Gene-expression data revealed a clear variation in the transcription levels of genes encoding putative GPCRs and G protein at 48 h following inoculation to the banana 'Brazil'. In comparison with those at vegetative growth stage, transcript abundance of four putative GPCR genes (GPCR7, GPCR11, GPCR13 and GPCR20) and FGA1 (G protein alpha subunit) in Foc4 were significantly increased, while those of the counterparts in Foc1 were decreased or had no marked change (Table S15 in File S1). These imply that FGA1-mediated G protein signaling might be activated in Foc4 but not in Foc1 (Figure 7), and Foc1 and Foc4 might detect the signals from the host environment by different sensors. The similar result was reported in the entomopathogenic fungi Metarhizium anisopliae and M. acridum, which transcribed distinct GCPR genes on cuticles from locusts (the natural hosts) and cockroaches. The two-component signal transduction systems seemed to play significant roles in recognition and adaption of the environmental change. RNA-seq data demonstrated that Foc1 and Foc4 could modulate the expression of different histidine kinase (HK) and response regulator (RR) genes ( Figure 8). Relative to the vegetative growth stage, the more HKs were transcriptionally up regulated in Foc4 (9 HKs) than in Foc1 (4 HKs) at 48 h post inoculation to the banana 'Brazil', while less HK genes were down regulated in Foc4 (3 HKs) than in Foc1 (7 HKs) at 48 h post inoculation to the banana 'Brazil'. Meanwhile, the expression of two RR genes was induced in Foc4, whereas none were affected in Foc1. These imply that more two-component signal transduction systems might be activated in Foc4 than in Foc1 during interaction between Foc4 and the banana host 'Brazil'. Of particular note, the counterpart of the virulence-associated genes CaSLN and MoSLN in Foc4 was transcriptionally induced (Table S4 in File S1), but that in Foc1 was repressed, suggesting that the pathogenicity associated two-component signaling could be activated (Figure 7). The protein kinases participate in a variety of cell processes and signal pathways including metabolism, cell signaling, protein regulation and other cellular pathways. We observed the variations in the expression of kinase genes between Foc1 and Foc4. Relative to the vegetative growth stage, Foc4 up-regulated more the protein kinase genes of AGC, CAMK and STE families than Foc1 during exposed to banana 'Brazil' (Figure S1). Following the signal transduction, the distinct TFs would be activated. Inspecting the transcription of TF genes, we found that more TF genes of C2H2, MYB, bHLH, bZIP, Winged helix repressor DNA-binding and nucleic acid-binding (OB-fold) families were transcriptionally induced in Foc4 than in Foc1 at 48 hpi in comparison with the vegetative growth stage ( Figure S2). The invasion growth pathway is controlled by the mitogenactivated protein kinase FMK1 and largely depends on the transcription factor Ste12, which mediates distinct outputs downstream of the FMK1 cascade. Although the expression of FMK1 was not induced in Foc1 and Foc4 at 48 h post inoculation as compared to that at vegetative growth stage, the transcripts level of Ste12 was increased in Foc4 but not in Foc1, indicating the invasion growth pathway was activated in Foc4 but not in Foc1 at pre-infection stage (Figure 7). RNA-seq data also revealed a clear variation in expression of carbohydrate-active enzyme coding genes including glycoside hydrolase (GH) family, polysaccharide lyases (PL), glycosyltransferases (GT) family, carbohydrate esterases (CE) family and carbohydrate-binding modules (CBM) family ( Figure S3 & Figure S4). Compared to vegetative growth stage, the major of PL genes were induced after inoculated to banana 'Brazil' for 48 h ( Figure S3). These imply that both Foc isolates could employ different carbohydrate-active enzymes to adapt the different nutrient conditions. In Foc, the biosynthesis of secondary metabolites might be affected by the environmental change. 23 of backbone genes in Foc1 were transcribed at vegetative growth stage, while the number of expressed backbone genes reduced to 18 at 48 h post inoculation. Similarly, the number of expressed backbone genes in Foc4 decreased from 35 at vegetative growth stage to 29 at 48 h post inoculation. Moreover, relative to vegetative growth stage, 2 backbone genes were transcriptionally repressed while 6 were activated in Foc1 at 48 h post inoculation. In contrast, 10 backbone genes were induced and 13 were suppressed in Foc4. These imply that the different nutrient conditions have impact on the biosynthesis of secondary metabolites in Foc (Table S6 in File S1). The similar results were reported in the rice pathogen Fusarium fujikuroi, in which the secondary metabolites biosynthesis was affected by nitrogen availability. Conclusions In this study, we have revealed that two Foc isolates are closely related to the tomato vascular wilt pathogen Fol by the phylogenetic analysis. Also, we have identified clear distinctions in gene contents and transcriptional regulation between Foc1 and Foc4, which may lead to the latter having a wider biochemical repertoire available for infecting the banana 'Brazil'. The Foc genomic sequences will accelerate our efforts towards discovering pathogenicity mechanisms in F. oxysporum f. sp. cubense. This will eventually lead to improvement of Fusarium wilt disease resistance in banana. Accession Numbers The Whole-Genome Shotgun projects have been deposited at DDBJ/EMBL/GenBank under the accession number AMGP00000000 for Foc1 and AMGQ00000000 for Foc4, respectively. The version described in this paper is the first version, AMGP00000000 and AMGQ00000000. All short-read data have been deposited into the Short Read Archive (http://www.ncbi.nlm.nih.gov/sra) under the accession number SRA058029 and SRA058030. Raw sequencing data of Fungal Isolates The isolates N2 (race 1) and B2 (race 4) of F. oxysporum f. sp. cubense were isolated from diseased rhizomes of the banana (Musa spp.) cultivars 'Brazil' (AAA group) and 'Pisang Awak' (ABB group), respectively, in Hainan of China. The isolates were routinely maintained on potato dextrose agar (PDA),and the conidia of both isolates in 20% glycerol solution were stored at 2 80uC until use. Genome Sequencing We employed a whole genome shotgun strategy and the nextgeneration sequencing technologies using Illumina GA Analyzer to sequence the genomes of Foc1 (isolate N2) and Foc4 (isolate B2). To decrease the risk of non-randomness, sequencing libraries were constructed with insert sizes of about 500 base pairs (bp), 2,000 bp, 5,000 bp and 10,000 bp for Foc4, and of about 500 bp and 10,000 bp for Foc1 (Table 1). Gene Prediction We predicted the protein coding genes in Foc1 and Foc4 using a combination of de novo-based and homology-based approaches, as well as transcript evidence. For de novo predictions, Augustus (Version 2.5.5) trained using F. graminearum was employed to predict coding genes. For the homology-based prediction, the whole protein sequence of F. oxysporum f. sp lycopersici (Fol), F. graminearum, F. verticillioides, Nectria haematococca (its asexual name F. solani), Magnaporthe grisea were collected from the website of broad institute (http://www.broadinstitute.org) and mapped onto the Foc genomes using TblastN. Then, homologous genome sequences were aligned against the matching proteins using Genewise to define gene models of Foc1 and Foc4. In addition, RNA-seq data generated in this study were mapped to both Foc genomes using Tophat, and transcriptome-based gene structures were obtained by cufflinks (http://cufflinks.cbcb.umd.edu/). Finally, all gene evidences were combined together using GLEAN (http:// sourceforge.net/projects/glean-gene/). Gene Family Classification A Treefam based gene family analysis was conducted to study the gene family evolution and estimate the divergent time of Foc with other sequenced fungus. Protein sequences of Foc1, Foc4, F. oxysporum f. sp lycopersici, F. verticillioides, F. graminearum, Nectria haematococca, Magnaporthe grisea were selected to involve in this analysis. Prediction of Secondary Metabolites Biosynthetic Gene Clusters We employed the web-based software SMURF (www.jcvi. org/smurf/) to systematically predict clustered SMs genes based on their genomic context and domain content. The software firstly identify the backbone genes acting as catalysts in biosynthesis of SMs, including prenyltransferases (DMAT), nonribosomal peptide synthases (NRPSs), polyketide synthases (PKSs), hybrid NRPS-PKS enzymes (HYBRID), then other related genes responsible for the modification, transportation and transcriptional regulation of SMs which are often found in contiguous gene clusters. Identification of Horizontal Gene Transfer (HGT)derived Genes in Foc1 and Foc4 Horizontal gene transfer (HGT) -derived gene was identified by phylogenetic method. The sequences of all gain proteins were aligned to 'nr' database of NCBI by using BLASTp with E-value cut-off 1e-5. Initial filtering to BLAST result set coverage.60% to reduce the frequency of single-domain matches to multi-domain proteins. Then we calculated lineage probabilities index (LPI) that is key to the genome-wide identification of horizontally transferred candidates. Organisms closely related to the query genome receive higher LPI scores than the distant ones, and groups of phylogenetically related organisms receive similar scores to each other, regardless of their abundance or scarcity in the reference database. At last,according to the baseline phylogenetic tree of each genes,we considered the genes only existing in Foc1/Foc4 and having no hit in other Fusarium species as the candidate HGT genes of Foc1/Foc4. RNA Isolation and cDNA Synthesis Foc isolates N2 (Foc1) and B2 (Foc4) were each incubated in a 250 ml-flask with 150 ml of PDB (potato dextrose broth) on a rotary shaker at 28uC at 180 rpm for 7 d, and then the mycelia and spores were harvested. For inoculation treatment, the cultures of Foc1 and Foc4 were suspended in sterile water and then each inoculated to the roots of 'Brazil' banana plantlets for 48 h in the hydroponics system. The cultures without inoculation and that inoculated to 'Brazil' for 48 h were used to isolate total RNA. RNA isolation and reverse transcription for cDNA synthesis were carried out using Trizol reagent (Invitrogen, USA) and the PrimeScript RT reagent Kit with gDNA Eraser (Takara, Japan) according the manufactory's direction. Transcriptome Analysis Transcriptome sequences are obtained from Illumina HiSeq 2000 sequencers. All the high quality sequences were aligned against the reference genome with the spliced aligner TopHat. Reads mapped to the genome were used to calculate every gene's expression in each sample. We used RPKM (Reads Per Kb per Million reads) to estimate expressions of genes so as to normalize the effects of different gene lengths and different total mapped reads among samples. Differentially expressed genes (DEGs) were detected using the method described by Chen et al.. This method is based on the Poisson distribution and normalization for differences in RNA output sizes and sequencing depths between samples. P-value was used to test the statistical significance and FDR (false discovery rate) to determine the threshold of P-value in multiple tests. The threshold with ''FDR, = 0.050 and ''absolute value of log2Ratio. = 10 was set to judge the significance of differences. We firstly mapped all DEGs to GO terms in the database, calculating gene numbers for every term, then used hypergeometric test to find significantly enriched GO terms in DEGs comparing to the genome background. Quantitative Real Time PCR Verification To verify the transcriptome data, real time quantitative PCR assays were performed to analyze the relative expression levels of the several genes (Table S12 in File S1) in the Foc cultures without inoculation and the Foc cultures inoculating to the banana 'Brazil' for 48 h. Actin gene was used to normalize the gene expression. The primers listed in Table S12 in File S1 were used to amplification of these genes. Every sample was run twice with three replicates, and results were calculated according the deltadelta-Ct. Figure S1 Expression profiling of the orthologous genes encoding kinase in Fusarium oxysporum f. sp. cubense race 1 (Foc1) and race 4 (Foc4) infecting the banana 'Brazil'. Expression of genes encoding kinases of AGC, STE, CAMK and CMGC families was included. The Heat Map figures were generated using the log2 ratio of corresponding Foc1 (or Foc4) gene expression data at 48 h post inoculation (48h_Reads Per Kilo bases per Million reads, 48h_RPKM) against Foc1 (or Foc4) 0h_RPKM data at vegetative growth stage, i.e. Log2 (48h-RPKM/0h_RPKM). The figure shows kinase genes that are up regulated (red) and down regulated (green) relative to that at vegetative growth stage. (EPS) Figure S2 Expression profiling of transcription factor genes in Fusarium oxysporum f. sp. cubense race 1 (Foc1) and race 4 (Foc4) attacking the banana 'Brazil'. Transcription factors of C2H2, MYB, bHLH, bZIP, WING, OB fold protein families were included. The Heat Map figures were generated as described in Figure S1. The figure shows kinase genes that are up regulated (red) and down regulated (green) relative to that at vegetative growth stage. (EPS) Figure S3 Expression profiling of genes encoding glycoside hydrolases (GH) and polysaccharide lyases (PL) in Fusarium oxysporum f. sp. cubense attacking the banana 'Brazil'. The Heat Map figures were generated by the method described in Figure S1. The figures show kinase genes that are up regulated (red) and down regulated (green) relative to that at vegetative growth stage. (EPS) Figure S4 Expression profiling of genes encoding carbohydrate esterases (CE), glycosyltransferases (GT) and carbohydrate-binding modules (CBM) in Fusarium oxysporum f. sp. cubense attacking the banana 'Brazil'. Supporting Information The Heat Map figures were generated by the method described in Figure S1. The figures show kinase genes that are up regulated (red) and down regulated (green) relative to that at vegetative growth stage. (EPS) File S1 Tables S1-S15. Table S1 in File S1. Statistics of sequencing data. Table S2 in File S1. Statistics of the assembled sequence length. Table S3 in File S1. Fast evolution genes in the banana fungal pathogens Foc1 and Foc4. Table S4 in File S1. The putative virulence associated genes in the banana fungal pathogens Foc1 and Foc4. Table S5 in File S1. The number of putative virulence associated genes in the sequenced fungi. Table S6 in File S1. The predict backbone genes involved in the biosynthesis of secondary metabolites in the banana fungal pathogens Foc1 and Foc4. Table S7 in File S1. The 26 predicted secondary metabolite synthesis gene clusters in Foc1. Table S8 in File S1. The 30 predicted secondary metabolite synthesis gene clusters in Foc4. Table S9 in File S1. The number of genes encoding putative Gprotein coupled receptors encoded in F. oxysporum f. sp. cubense. Table S10 in File S1. Families of protein kinases in Foc1 and Foc4. Table S11 in File S1. The number of transcription factors in Foc1 and Foc4. Table S12 in File S1. Comparison of expression patterns between RNA-seq expression and quantitative real time PCR. Table S13 in File S1. Molecular functional classification of the differentially expressed genes in Foc1 based on GO.level2 and GO.level3. Table S14 in File S1. Molecular functional classification of the differentially expressed genes in Foc4 based on GO.level2 and GO.level3. Table S15 in File S1. The transcript levels of putative G protein coupled receptor and G protein genes. (XLSX) |
Let's get connected: A new graph theorybased approach and toolbox for understanding braided river morphodynamics Our understanding of braided river morphodynamics has improved significantly in recent years, however, there are still large knowledge gaps relating to both longterm and eventbased change in braided river morphologies. Furthermore, we still lack methods that can take full advantage of the increasing availability of remotely sensed datasets that are well suited to braided river research. Network analysis based on graph theory, the mathematics of networks, offers a largely unexplored toolbox that can be applied to remotely sensed data to quantify the structure and function of braided rivers across nearly the full range of spatiotemporal scales relevant to braided river evolution. In this article, important commonalities between braided rivers and other types of complex network are described, providing a compelling argument for the wider uptake of complex network analysis methods in the study of braided rivers. We provide an overview of the extraction of graph representations of braided river networks from remotely sensed data and detail a suite of metrics for quantitative analysis of these networks. Application of these metrics as new tools for multiscale characterization of braided river planforms that improve upon traditional, spatially averaged approaches is discussed and potential approaches to networkbased analysis of braided river dynamics are proposed, drawing on a range of different concepts from braided river research and other network sciences. Finally, the potential for using graph theory metrics to validate numerical models of braided rivers is discussed. |
Role of C-X-C chemokine ligand 12/C-X-C chemokine receptor 4 in the progression of hepatocellular carcinoma. The efficacy of the current non-surgical treatments for advanced hepatocellular carcinoma (HCC) remains limited and novel treatments are required to improve patient outcomes. The majority of HCCs develop from chronically damaged tissue that contains a high degree of inflammation and fibrosis, which promotes tumor progression and resistance to therapy. Understanding the interaction between stromal components and cancer cells (and the signaling pathways involved in this interaction) could aid the identification of novel therapeutic targets. Numerous studies have demonstrated a marked association between high C-X-C chemokine receptor 4 (CXCR4) expression and the invasiveness, progression and metastasis of HCC. The present review will investigate the different roles of CXCR4 in the progression of HCC and discuss possible future treatments. Through the C-X-C chemokine ligand 12 (CXCL12)/CXCR4 signaling pathway, ephrin A1 activation enhances the migration of endothelial progenitor cells to HCC to enable the neovascularization of tumors. There is an association between nuclear CXCR4 expression and the lymph node metastasis of HCC to distant areas. CXCR4 enhances cell migration in vitro and cell homing in vivo. CXCR4 levels are concentrated at the border of a tumor and in perivascular areas, inducing invasive behavior. The binding of CXCL12 to CXCR4 activates intracellular signaling pathways and induces crosstalk with transforming growth factor- signaling, which enhances the migration of cancer cells. The CXCL12/CXCR4 axis also activates expression of matrix metalloproteinase 10, which further stimulates migration. CXCR4 is likely to crosstalk with the sonic hedgehog signaling pathway, contributing to tumor invasiveness and supporting the cancer stem-cell population; as a result, CXCR4 can be regarded as a cancer stem-cell marker. CXCR4 influences interstitial fluid flow-induced invasion. CXCR4 expression and HCC cell migration are promoted by -fetoprotein, which activates AKT/mechanistic target of rapamycin signaling. CXCR4 also has the potential to affect sorafenib treatment for HCC. Targeting the CXCL12/CXCR4 signaling pathway may, therefore, be a promising strategy in HCC treatment. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.