text
stringlengths 1
22.8M
|
|---|
```python
# TODO:
# Look into using: path_to_url
# It should both reduce the size of the font and support all possible UTF8 chars
import fontforge
def generate(name, block):
print("Generating " + name)
# TODO:
# This needs to reach 0x9FCF to complete the CJK Ideographs
# But above around 0x7f00, we get this error:
# `Internal Error: Attempt to output 81854 into a 16-bit field. It will be
# truncated and the file may not be useful.`
for i in range(0x0000, 0x7F00):
if i == codepoint: continue
glyph = blocks.createChar(i)
glyph.width = 600
glyph.addReference(block)
print(blocks[codepoint].foreground)
blocks.fontname = name
blocks.fullname = name
blocks.familyname = name
# Fontforge's WOFF output doesn't seem to work. No matter, this isn't for an actual
# remote production website. The font is served locally from the extension and doesn't
# even need to look good.
blocks.generate(name + '.ttf')
# A font with just the (0x2588) for all unicode characters
blocks = fontforge.font()
blocks.encoding = 'UnicodeFull'
codepoint = 0x2588
glyph = blocks.createChar(codepoint)
glyph.width = 600
pen = blocks[codepoint].glyphPen()
pen.moveTo((0, -200))
pen.lineTo((0, 800))
pen.lineTo((600, 800))
pen.lineTo((600, -200))
pen.closePath()
generate('BlockCharMono', blocks[codepoint].glyphname)
# A font with just the space character, used to hide all text
blocks = fontforge.font()
blocks.encoding = 'UnicodeFull'
codepoint = 0x2003
glyph = blocks.createChar(codepoint)
glyph.width = 600
pen = blocks[codepoint].glyphPen()
pen.moveTo((0, 0))
pen.lineTo((0, 0))
pen.closePath()
generate('BlankMono', blocks[codepoint].glyphname)
```
|
```c++
/*
*/
#include "opengl_impl_type_convert.hpp"
#include <cassert>
auto reshade::opengl::convert_format(api::format format, GLint swizzle_mask[4]) -> GLenum
{
switch (format)
{
default:
assert(false);
[[fallthrough]];
case api::format::unknown:
break;
case api::format::r1_unorm:
break; // Unsupported
case api::format::l8_unorm:
if (swizzle_mask != nullptr)
{
swizzle_mask[0] = GL_RED;
swizzle_mask[1] = GL_RED;
swizzle_mask[2] = GL_RED;
swizzle_mask[3] = GL_ONE;
return GL_R8;
}
return GL_LUMINANCE8_EXT;
case api::format::a8_unorm:
if (swizzle_mask != nullptr)
{
swizzle_mask[0] = GL_ZERO;
swizzle_mask[1] = GL_ZERO;
swizzle_mask[2] = GL_ZERO;
swizzle_mask[3] = GL_RED;
return GL_R8;
}
return GL_ALPHA8_EXT;
case api::format::r8_uint:
return GL_R8UI;
case api::format::r8_sint:
return GL_R8I;
case api::format::r8_typeless:
case api::format::r8_unorm:
return GL_R8;
case api::format::r8_snorm:
return GL_R8_SNORM;
case api::format::l8a8_unorm:
if (swizzle_mask != nullptr)
{
swizzle_mask[0] = GL_RED;
swizzle_mask[1] = GL_RED;
swizzle_mask[2] = GL_RED;
swizzle_mask[3] = GL_GREEN;
return GL_RG8;
}
return GL_LUMINANCE8_ALPHA8_EXT;
case api::format::r8g8_uint:
return GL_RG8UI;
case api::format::r8g8_sint:
return GL_RG8I;
case api::format::r8g8_typeless:
case api::format::r8g8_unorm:
return GL_RG8;
case api::format::r8g8_snorm:
return GL_RG8_SNORM;
case api::format::r8g8b8a8_uint:
return GL_RGBA8UI;
case api::format::r8g8b8a8_sint:
return GL_RGBA8I;
case api::format::r8g8b8a8_typeless:
case api::format::r8g8b8a8_unorm:
case api::format::b8g8r8a8_typeless:
case api::format::b8g8r8a8_unorm:
return GL_RGBA8;
case api::format::r8g8b8a8_unorm_srgb:
case api::format::b8g8r8a8_unorm_srgb:
return GL_SRGB8_ALPHA8;
case api::format::r8g8b8a8_snorm:
return GL_RGBA8_SNORM;
#if 0
case api::format::r8g8b8x8_uint:
return GL_RGB8UI;
case api::format::r8g8b8x8_sint:
return GL_RGB8I;
#endif
case api::format::r8g8b8x8_unorm:
case api::format::b8g8r8x8_typeless:
case api::format::b8g8r8x8_unorm:
return GL_RGB8;
case api::format::r8g8b8x8_unorm_srgb:
case api::format::b8g8r8x8_unorm_srgb:
return GL_SRGB8;
#if 0
case api::format::r8g8b8x8_snorm:
return GL_RGB8_SNORM;
#endif
case api::format::r10g10b10a2_uint:
case api::format::b10g10r10a2_uint:
return GL_RGB10_A2UI;
case api::format::r10g10b10a2_typeless:
case api::format::r10g10b10a2_unorm:
case api::format::b10g10r10a2_typeless:
case api::format::b10g10r10a2_unorm:
return GL_RGB10_A2;
case api::format::r10g10b10a2_xr_bias:
break; // Unsupported
case api::format::l16_unorm:
if (swizzle_mask != nullptr)
{
swizzle_mask[0] = GL_RED;
swizzle_mask[1] = GL_RED;
swizzle_mask[2] = GL_RED;
swizzle_mask[3] = GL_ONE;
return GL_R16;
}
return 0x8042 /* GL_LUMINANCE16 */;
#if 0
case api::format::l16_float:
return GL_LUMINANCE16F_EXT;
case api::format::a16_float:
return GL_ALPHA16F_EXT;
#endif
case api::format::r16_uint:
return GL_R16UI;
case api::format::r16_sint:
return GL_R16I;
case api::format::r16_unorm:
return GL_R16;
case api::format::r16_snorm:
return GL_R16_SNORM;
case api::format::r16_typeless:
case api::format::r16_float:
return GL_R16F;
case api::format::l16a16_unorm:
if (swizzle_mask != nullptr)
{
swizzle_mask[0] = GL_RED;
swizzle_mask[1] = GL_RED;
swizzle_mask[2] = GL_RED;
swizzle_mask[3] = GL_GREEN;
return GL_RG16;
}
return 0x8048 /* GL_LUMINANCE16_ALPHA16 */;
#if 0
case api::format::l16a16_float:
return GL_LUMINANCE_ALPHA16F_EXT;
#endif
case api::format::r16g16_uint:
return GL_RG16UI;
case api::format::r16g16_sint:
return GL_RG16I;
case api::format::r16g16_unorm:
return GL_RG16;
case api::format::r16g16_snorm:
return GL_RG16_SNORM;
case api::format::r16g16_typeless:
case api::format::r16g16_float:
return GL_RG16F;
case api::format::r16g16b16a16_uint:
return GL_RGBA16UI;
case api::format::r16g16b16a16_sint:
return GL_RGBA16I;
case api::format::r16g16b16a16_unorm:
return GL_RGBA16;
case api::format::r16g16b16a16_snorm:
return GL_RGBA16_SNORM;
case api::format::r16g16b16a16_typeless:
case api::format::r16g16b16a16_float:
return GL_RGBA16F;
#if 0
case api::format::l32_float:
return GL_LUMINANCE32F_EXT;
case api::format::a32_float:
return GL_ALPHA32F_EXT;
#endif
case api::format::r32_uint:
return GL_R32UI;
case api::format::r32_sint:
return GL_R32I;
case api::format::r32_typeless:
case api::format::r32_float:
return GL_R32F;
#if 0
case api::format::l32a32_float:
return GL_LUMINANCE_ALPHA32F_EXT;
#endif
case api::format::r32g32_uint:
return GL_RG32UI;
case api::format::r32g32_sint:
return GL_RG32I;
case api::format::r32g32_typeless:
case api::format::r32g32_float:
return GL_RG32F;
case api::format::r32g32b32_uint:
return GL_RGB32UI;
case api::format::r32g32b32_sint:
return GL_RGB32I;
case api::format::r32g32b32_typeless:
case api::format::r32g32b32_float:
return GL_RGB32F;
case api::format::r32g32b32a32_uint:
return GL_RGBA32UI;
case api::format::r32g32b32a32_sint:
return GL_RGBA32I;
case api::format::r32g32b32a32_typeless:
case api::format::r32g32b32a32_float:
return GL_RGBA32F;
case api::format::r9g9b9e5:
return GL_RGB9_E5;
case api::format::r11g11b10_float:
return GL_R11F_G11F_B10F;
case api::format::b5g6r5_unorm:
return GL_RGB565;
case api::format::b5g5r5a1_unorm:
return GL_RGB5_A1;
case api::format::b5g5r5x1_unorm:
return GL_RGB5;
case api::format::b4g4r4a4_unorm:
case api::format::a4b4g4r4_unorm:
return GL_RGBA4;
case api::format::s8_uint:
return GL_STENCIL_INDEX8;
case api::format::d16_unorm:
return GL_DEPTH_COMPONENT16;
case api::format::d16_unorm_s8_uint:
break; // Unsupported
case api::format::d24_unorm_x8_uint:
return GL_DEPTH_COMPONENT24;
case api::format::r24_g8_typeless:
case api::format::r24_unorm_x8_uint:
case api::format::x24_unorm_g8_uint:
case api::format::d24_unorm_s8_uint:
return GL_DEPTH24_STENCIL8;
case api::format::d32_float:
return GL_DEPTH_COMPONENT32F;
case api::format::r32_g8_typeless:
case api::format::r32_float_x8_uint:
case api::format::x32_float_g8_uint:
case api::format::d32_float_s8_uint:
return GL_DEPTH32F_STENCIL8;
case api::format::bc1_typeless:
case api::format::bc1_unorm:
return GL_COMPRESSED_RGBA_S3TC_DXT1_EXT;
case api::format::bc1_unorm_srgb:
return 0x8C4D /* GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT */;
case api::format::bc2_typeless:
case api::format::bc2_unorm:
return GL_COMPRESSED_RGBA_S3TC_DXT3_EXT;
case api::format::bc2_unorm_srgb:
return 0x8C4E /* GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT */;
case api::format::bc3_typeless:
case api::format::bc3_unorm:
return GL_COMPRESSED_RGBA_S3TC_DXT5_EXT;
case api::format::bc3_unorm_srgb:
return 0x8C4F /* GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT */;
case api::format::bc4_typeless:
case api::format::bc4_unorm:
return GL_COMPRESSED_RED_RGTC1;
case api::format::bc4_snorm:
return GL_COMPRESSED_SIGNED_RED_RGTC1;
case api::format::bc5_typeless:
case api::format::bc5_unorm:
return GL_COMPRESSED_RG_RGTC2;
case api::format::bc5_snorm:
return GL_COMPRESSED_SIGNED_RG_RGTC2;
case api::format::bc6h_typeless:
case api::format::bc6h_ufloat:
return GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB;
case api::format::bc6h_sfloat:
return GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB;
case api::format::bc7_typeless:
case api::format::bc7_unorm:
return GL_COMPRESSED_RGBA_BPTC_UNORM_ARB;
case api::format::bc7_unorm_srgb:
return GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB;
case api::format::r8g8_b8g8_unorm:
case api::format::g8r8_g8b8_unorm:
break; // Unsupported
}
return GL_NONE;
}
auto reshade::opengl::convert_format(GLenum internal_format, const GLint swizzle_mask[4]) -> api::format
{
// These should already have been converted by 'convert_sized_internal_format' before
assert(
internal_format != 2 &&
internal_format != 3 &&
internal_format != 4 &&
internal_format != GL_RED &&
internal_format != GL_ALPHA &&
internal_format != 0x1909 /* GL_LUMINANCE */ &&
internal_format != 0x8049 /* GL_INTENSITY */ &&
internal_format != GL_RG &&
internal_format != 0x190A /* GL_LUMINANCE_ALPHA */ &&
internal_format != GL_RGB &&
internal_format != GL_RGBA &&
internal_format != GL_STENCIL_INDEX &&
internal_format != GL_DEPTH_COMPONENT &&
internal_format != GL_DEPTH_STENCIL);
switch (internal_format)
{
default:
return api::format::unknown;
case GL_LUMINANCE8_EXT: // { R, R, R, 1 }
case 0x804B /* GL_INTENSITY8 */: // { R, R, R, R }
return api::format::l8_unorm;
case GL_ALPHA8_EXT:
return api::format::a8_unorm;
case GL_R8UI:
return api::format::r8_uint;
case GL_R8I:
return api::format::r8_sint;
case GL_R8: // { R, 0, 0, 1 }
if (swizzle_mask != nullptr &&
swizzle_mask[0] == GL_RED &&
swizzle_mask[1] == GL_RED &&
swizzle_mask[2] == GL_RED)
return api::format::l8_unorm;
if (swizzle_mask != nullptr &&
swizzle_mask[0] == GL_ZERO &&
swizzle_mask[1] == GL_ZERO &&
swizzle_mask[2] == GL_ZERO &&
swizzle_mask[3] == GL_RED)
return api::format::a8_unorm;
return api::format::r8_unorm;
case GL_R8_SNORM:
return api::format::r8_snorm;
case GL_LUMINANCE8_ALPHA8_EXT: // { R, R, R, G }
return api::format::l8a8_unorm;
case GL_RG8UI:
return api::format::r8g8_uint;
case GL_RG8I:
return api::format::r8g8_sint;
case GL_RG8: // { R, G, 0, 1 }
if (swizzle_mask != nullptr &&
swizzle_mask[0] == GL_RED &&
swizzle_mask[1] == GL_RED &&
swizzle_mask[2] == GL_RED &&
swizzle_mask[3] == GL_GREEN)
return api::format::l8a8_unorm;
return api::format::r8g8_unorm;
case GL_RG8_SNORM:
return api::format::r8g8_snorm;
case GL_RGBA8UI:
return api::format::r8g8b8a8_uint;
case GL_RGBA8I:
return api::format::r8g8b8a8_sint;
case GL_RGBA8:
return api::format::r8g8b8a8_unorm;
case GL_SRGB8_ALPHA8:
return api::format::r8g8b8a8_unorm_srgb;
case GL_RGBA8_SNORM:
return api::format::r8g8b8a8_snorm;
#if 0
case GL_RGB8UI:
return api::format::r8g8b8x8_uint;
case GL_RGB8I:
return api::format::r8g8b8x8_sint;
#endif
case GL_RGB8:
return api::format::r8g8b8x8_unorm;
case GL_SRGB8:
return api::format::r8g8b8x8_unorm_srgb;
#if 0
case GL_RGB8_SNORM:
return api::format::r8g8b8x8_snorm;
#endif
case GL_BGRA8_EXT:
return api::format::b8g8r8a8_unorm;
case GL_RGB10_A2UI:
return api::format::r10g10b10a2_uint;
case GL_RGB10_A2:
return api::format::r10g10b10a2_unorm;
case 0x8042 /* GL_LUMINANCE16 */: // { R, R, R, 1 }
case 0x804D /* GL_INTENSITY16 */: // { R, R, R, R }
return api::format::l16_unorm;
#if 0
case GL_LUMINANCE16F_EXT:
return api::format::l16_float;
case GL_ALPHA16F_EXT:
return api::format::a16_float;
#endif
case GL_R16UI:
return api::format::r16_uint;
case GL_R16I:
return api::format::r16_sint;
case GL_R16: // { R, 0, 0, 1 }
if (swizzle_mask != nullptr &&
swizzle_mask[0] == GL_RED &&
swizzle_mask[1] == GL_RED &&
swizzle_mask[2] == GL_RED)
return api::format::l16_unorm;
return api::format::r16_unorm;
case GL_R16_SNORM:
return api::format::r16_snorm;
case GL_R16F:
return api::format::r16_float;
case 0x8048 /* GL_LUMINANCE16_ALPHA16 */: // { R, R, R, G }
return api::format::l16a16_unorm;
#if 0
case GL_LUMINANCE_ALPHA16F_EXT:
return api::format::l16a16_float;
#endif
case GL_RG16UI:
return api::format::r16g16_uint;
case GL_RG16I:
return api::format::r16g16_sint;
case GL_RG16: // { R, G, 0, 1 }
if (swizzle_mask != nullptr &&
swizzle_mask[0] == GL_RED &&
swizzle_mask[1] == GL_RED &&
swizzle_mask[2] == GL_RED &&
swizzle_mask[3] == GL_GREEN)
return api::format::l16a16_unorm;
return api::format::r16g16_unorm;
case GL_RG16_SNORM:
return api::format::r16g16_snorm;
case GL_RG16F:
return api::format::r16g16_float;
case GL_RGBA16UI:
return api::format::r16g16b16a16_uint;
case GL_RGBA16I:
return api::format::r16g16b16a16_sint;
case GL_RGBA16:
return api::format::r16g16b16a16_unorm;
case GL_RGBA16_SNORM:
return api::format::r16g16b16a16_snorm;
case GL_RGBA16F:
return api::format::r16g16b16a16_float;
#if 0
case GL_LUMINANCE32F_EXT:
return api::format::l32_float;
case GL_ALPHA32F_EXT:
return api::format::a32_float;
#endif
case GL_R32UI:
return api::format::r32_uint;
case GL_R32I:
return api::format::r32_sint;
case GL_R32F:
return api::format::r32_float;
#if 0
case GL_LUMINANCE_ALPHA32F_EXT:
return api::format::l32a32_float;
#endif
case GL_RG32UI:
return api::format::r32g32_uint;
case GL_RG32I:
return api::format::r32g32_sint;
case GL_RG32F:
return api::format::r32g32_float;
case GL_RGB32UI:
return api::format::r32g32b32_uint;
case GL_RGB32I:
return api::format::r32g32b32_sint;
case GL_RGB32F:
return api::format::r32g32b32_float;
case GL_RGBA32UI:
return api::format::r32g32b32a32_uint;
case GL_RGBA32I:
return api::format::r32g32b32a32_sint;
case GL_RGBA32F:
return api::format::r32g32b32a32_float;
case GL_RGB9_E5:
return api::format::r9g9b9e5;
case GL_R11F_G11F_B10F:
return api::format::r11g11b10_float;
case GL_RGB565:
return api::format::b5g6r5_unorm;
case GL_RGB5_A1:
return api::format::b5g5r5a1_unorm;
case GL_RGB5:
return api::format::b5g5r5x1_unorm;
case GL_RGBA4:
return api::format::b4g4r4a4_unorm;
case GL_STENCIL_INDEX8:
return api::format::s8_uint;
case GL_DEPTH_COMPONENT16:
return api::format::d16_unorm;
case GL_DEPTH_COMPONENT24:
return api::format::d24_unorm_x8_uint;
case GL_DEPTH24_STENCIL8:
return api::format::d24_unorm_s8_uint;
case GL_DEPTH_COMPONENT32F:
case GL_DEPTH_COMPONENT32F_NV:
return api::format::d32_float;
case GL_DEPTH32F_STENCIL8:
case GL_DEPTH32F_STENCIL8_NV:
return api::format::d32_float_s8_uint;
case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT:
return api::format::bc1_unorm;
case 0x8C4C /* GL_COMPRESSED_SRGB_S3TC_DXT1_EXT */:
case 0x8C4D /* GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT */:
return api::format::bc1_unorm_srgb;
case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT:
return api::format::bc2_unorm;
case 0x8C4E /* GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT */:
return api::format::bc2_unorm_srgb;
case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT:
return api::format::bc3_unorm;
case 0x8C4F /* GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT */:
return api::format::bc3_unorm_srgb;
case GL_COMPRESSED_RED_RGTC1:
return api::format::bc4_unorm;
case GL_COMPRESSED_SIGNED_RED_RGTC1:
return api::format::bc4_snorm;
case GL_COMPRESSED_RG_RGTC2:
return api::format::bc5_unorm;
case GL_COMPRESSED_SIGNED_RG_RGTC2:
return api::format::bc5_snorm;
case GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB:
return api::format::bc6h_ufloat;
case GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB:
return api::format::bc6h_sfloat;
case GL_COMPRESSED_RGBA_BPTC_UNORM_ARB:
return api::format::bc7_unorm;
case GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB:
return api::format::bc7_unorm_srgb;
}
}
void reshade::opengl::convert_pixel_format(api::format format, PIXELFORMATDESCRIPTOR &pfd)
{
switch (format)
{
default:
assert(false);
break;
case api::format::r8g8b8a8_unorm:
case api::format::r8g8b8a8_unorm_srgb:
pfd.iPixelType = PFD_TYPE_RGBA;
pfd.cColorBits = 32;
pfd.cRedBits = 8;
pfd.cRedShift = 0;
pfd.cGreenBits = 8;
pfd.cGreenShift = 8;
pfd.cBlueBits = 8;
pfd.cBlueShift = 16;
pfd.cAlphaBits = 8;
pfd.cAlphaShift = 24;
break;
case api::format::r8g8b8x8_unorm:
case api::format::r8g8b8x8_unorm_srgb:
pfd.iPixelType = PFD_TYPE_RGBA;
pfd.cColorBits = 32;
pfd.cRedBits = 8;
pfd.cRedShift = 0;
pfd.cGreenBits = 8;
pfd.cGreenShift = 8;
pfd.cBlueBits = 8;
pfd.cBlueShift = 16;
pfd.cAlphaBits = 0;
pfd.cAlphaShift = 0;
break;
case api::format::b8g8r8a8_unorm:
case api::format::b8g8r8a8_unorm_srgb:
pfd.iPixelType = PFD_TYPE_RGBA;
pfd.cColorBits = 32;
pfd.cRedBits = 8;
pfd.cRedShift = 16;
pfd.cGreenBits = 8;
pfd.cGreenShift = 8;
pfd.cBlueBits = 8;
pfd.cBlueShift = 0;
pfd.cAlphaBits = 8;
pfd.cAlphaShift = 24;
break;
case api::format::b8g8r8x8_unorm:
case api::format::b8g8r8x8_unorm_srgb:
pfd.iPixelType = PFD_TYPE_RGBA;
pfd.cColorBits = 32;
pfd.cRedBits = 8;
pfd.cRedShift = 16;
pfd.cGreenBits = 8;
pfd.cGreenShift = 8;
pfd.cBlueBits = 8;
pfd.cBlueShift = 0;
pfd.cAlphaBits = 0;
pfd.cAlphaShift = 0;
break;
case api::format::r10g10b10a2_unorm:
pfd.iPixelType = PFD_TYPE_RGBA;
pfd.cColorBits = 32;
pfd.cRedBits = 10;
pfd.cRedShift = 0;
pfd.cGreenBits = 10;
pfd.cGreenBits = 10;
pfd.cBlueBits = 10;
pfd.cBlueShift = 20;
pfd.cAlphaBits = 2;
pfd.cAlphaShift = 30;
break;
case api::format::r16g16b16a16_float:
pfd.iPixelType = PFD_TYPE_RGBA;
pfd.cColorBits = 64;
pfd.cRedBits = 16;
pfd.cRedShift = 0;
pfd.cGreenBits = 16;
pfd.cGreenShift = 16;
pfd.cBlueBits = 16;
pfd.cBlueShift = 32;
pfd.cAlphaBits = 16;
pfd.cAlphaShift = 48;
break;
case api::format::r32g32b32a32_float:
pfd.iPixelType = PFD_TYPE_RGBA;
pfd.cColorBits = 128;
pfd.cRedBits = 32;
pfd.cRedShift = 0;
pfd.cGreenBits = 32;
pfd.cGreenShift = 32;
pfd.cBlueBits = 32;
pfd.cBlueShift = 64;
pfd.cAlphaBits = 32;
pfd.cAlphaShift = 96;
break;
case api::format::r11g11b10_float:
pfd.iPixelType = PFD_TYPE_RGBA;
pfd.cColorBits = 32;
pfd.cRedBits = 11;
pfd.cRedShift = 0;
pfd.cGreenBits = 11;
pfd.cGreenShift = 11;
pfd.cBlueBits = 10;
pfd.cBlueShift = 22;
pfd.cAlphaBits = 0;
pfd.cAlphaShift = 0;
break;
case api::format::b5g6r5_unorm:
pfd.iPixelType = PFD_TYPE_RGBA;
pfd.cColorBits = 16;
pfd.cRedBits = 5;
pfd.cRedShift = 11;
pfd.cGreenBits = 6;
pfd.cGreenShift = 5;
pfd.cBlueBits = 5;
pfd.cBlueShift = 0;
pfd.cAlphaBits = 0;
pfd.cAlphaShift = 0;
break;
}
}
auto reshade::opengl::convert_pixel_format(const PIXELFORMATDESCRIPTOR &pfd) -> api::format
{
assert(pfd.iPixelType == PFD_TYPE_RGBA);
switch (pfd.cColorBits)
{
default:
assert(false);
return api::format::unknown;
case 16:
return api::format::b5g6r5_unorm;
case 24:
case 32:
if (pfd.cRedBits == 11 && pfd.cGreenBits == 11 && pfd.cBlueBits == 10)
return api::format::r11g11b10_float;
if (pfd.cAlphaBits != 0)
return pfd.cRedShift == 0 ? api::format::r8g8b8a8_unorm : api::format::b8g8r8a8_unorm;
else
return pfd.cRedShift == 0 ? api::format::r8g8b8x8_unorm : api::format::b8g8r8x8_unorm;
case 30:
return api::format::r10g10b10a2_unorm;
case 64:
return api::format::r16g16b16a16_float;
case 128:
return api::format::r32g32b32a32_float;
}
}
auto reshade::opengl::convert_upload_format(api::format format, GLenum &type) -> GLenum
{
switch (format)
{
case api::format::a8_unorm:
type = GL_UNSIGNED_BYTE;
return GL_ALPHA;
case api::format::r8_uint:
type = GL_UNSIGNED_BYTE;
return GL_RED_INTEGER;
case api::format::r8_sint:
type = GL_BYTE;
return GL_RED_INTEGER;
case api::format::l8_unorm:
case api::format::r8_typeless:
case api::format::r8_unorm:
type = GL_UNSIGNED_BYTE;
return GL_RED;
case api::format::r8_snorm:
type = GL_BYTE;
return GL_RED;
case api::format::r8g8_uint:
type = GL_UNSIGNED_BYTE;
return GL_RG_INTEGER;
case api::format::r8g8_sint:
type = GL_BYTE;
return GL_RG_INTEGER;
case api::format::l8a8_unorm:
case api::format::r8g8_typeless:
case api::format::r8g8_unorm:
type = GL_UNSIGNED_BYTE;
return GL_RG;
case api::format::r8g8_snorm:
type = GL_BYTE;
return GL_RG;
case api::format::r8g8b8a8_uint:
type = GL_UNSIGNED_BYTE;
return GL_RGBA_INTEGER;
case api::format::r8g8b8a8_sint:
type = GL_BYTE;
return GL_RGBA_INTEGER;
case api::format::r8g8b8a8_typeless:
case api::format::r8g8b8a8_unorm:
case api::format::r8g8b8a8_unorm_srgb:
case api::format::r8g8b8x8_unorm:
case api::format::r8g8b8x8_unorm_srgb:
type = GL_UNSIGNED_BYTE;
return GL_RGBA;
case api::format::r8g8b8a8_snorm:
type = GL_BYTE;
return GL_RGBA;
case api::format::b8g8r8a8_typeless:
case api::format::b8g8r8a8_unorm:
case api::format::b8g8r8a8_unorm_srgb:
case api::format::b8g8r8x8_typeless:
case api::format::b8g8r8x8_unorm:
case api::format::b8g8r8x8_unorm_srgb:
type = GL_UNSIGNED_BYTE;
return GL_BGRA;
case api::format::r10g10b10a2_uint:
case api::format::r10g10b10a2_xr_bias:
type = GL_UNSIGNED_INT_2_10_10_10_REV;
return GL_RGBA_INTEGER;
case api::format::r10g10b10a2_typeless:
case api::format::r10g10b10a2_unorm:
type = GL_UNSIGNED_INT_2_10_10_10_REV;
return GL_RGBA;
case api::format::b10g10r10a2_uint:
type = GL_UNSIGNED_INT_2_10_10_10_REV;
return GL_BGRA_INTEGER;
case api::format::b10g10r10a2_typeless:
case api::format::b10g10r10a2_unorm:
type = GL_UNSIGNED_INT_2_10_10_10_REV;
return GL_BGRA;
case api::format::r16_uint:
type = GL_UNSIGNED_SHORT;
return GL_RED_INTEGER;
case api::format::r16_sint:
type = GL_SHORT;
return GL_RED_INTEGER;
case api::format::r16_float:
type = GL_HALF_FLOAT;
return GL_RED;
case api::format::l16_unorm:
case api::format::r16_typeless:
case api::format::r16_unorm:
type = GL_UNSIGNED_SHORT;
return GL_RED;
case api::format::r16_snorm:
type = GL_SHORT;
return GL_RED;
case api::format::r16g16_uint:
type = GL_UNSIGNED_SHORT;
return GL_RG_INTEGER;
case api::format::r16g16_sint:
type = GL_SHORT;
return GL_RG_INTEGER;
case api::format::r16g16_float:
type = GL_HALF_FLOAT;
return GL_RG;
case api::format::l16a16_unorm:
case api::format::r16g16_typeless:
case api::format::r16g16_unorm:
type = GL_UNSIGNED_SHORT;
return GL_RG;
case api::format::r16g16_snorm:
type = GL_SHORT;
return GL_RG;
case api::format::r16g16b16a16_uint:
type = GL_UNSIGNED_SHORT;
return GL_RGBA_INTEGER;
case api::format::r16g16b16a16_sint:
type = GL_SHORT;
return GL_RGBA_INTEGER;
case api::format::r16g16b16a16_float:
type = GL_HALF_FLOAT;
return GL_RGBA;
case api::format::r16g16b16a16_typeless:
case api::format::r16g16b16a16_unorm:
type = GL_UNSIGNED_SHORT;
return GL_RGBA;
case api::format::r16g16b16a16_snorm:
type = GL_SHORT;
return GL_RGBA;
case api::format::r32_uint:
type = GL_UNSIGNED_INT;
return GL_RED_INTEGER;
case api::format::r32_sint:
type = GL_INT;
return GL_RED_INTEGER;
case api::format::r32_typeless:
case api::format::r32_float:
type = GL_FLOAT;
return GL_RED;
case api::format::r32g32_uint:
type = GL_UNSIGNED_INT;
return GL_RG_INTEGER;
case api::format::r32g32_sint:
type = GL_INT;
return GL_RG_INTEGER;
case api::format::r32g32_typeless:
case api::format::r32g32_float:
type = GL_FLOAT;
return GL_RG;
case api::format::r32g32b32_uint:
type = GL_UNSIGNED_INT;
return GL_RGB_INTEGER;
case api::format::r32g32b32_sint:
type = GL_INT;
return GL_RGB_INTEGER;
case api::format::r32g32b32_typeless:
case api::format::r32g32b32_float:
type = GL_FLOAT;
return GL_RGB;
case api::format::r32g32b32a32_uint:
type = GL_UNSIGNED_INT;
return GL_RGBA_INTEGER;
case api::format::r32g32b32a32_sint:
type = GL_INT;
return GL_RGBA_INTEGER;
case api::format::r32g32b32a32_typeless:
case api::format::r32g32b32a32_float:
type = GL_FLOAT;
return GL_RGBA;
case api::format::r9g9b9e5:
type = GL_UNSIGNED_INT_5_9_9_9_REV;
return GL_RGBA;
case api::format::r11g11b10_float:
type = GL_UNSIGNED_INT_10F_11F_11F_REV;
return GL_RGB;
case api::format::b5g6r5_unorm:
type = GL_UNSIGNED_SHORT_5_6_5_REV;
return GL_BGR;
case api::format::b5g5r5a1_unorm:
type = GL_UNSIGNED_SHORT_1_5_5_5_REV;
return GL_BGRA;
case api::format::b5g5r5x1_unorm:
type = GL_UNSIGNED_SHORT_1_5_5_5_REV;
return GL_BGRA;
case api::format::b4g4r4a4_unorm:
type = GL_UNSIGNED_SHORT_4_4_4_4_REV;
return GL_BGRA;
case api::format::a4b4g4r4_unorm:
type = GL_UNSIGNED_SHORT_4_4_4_4;
return GL_RGBA;
case api::format::s8_uint:
type = GL_UNSIGNED_BYTE;
return GL_STENCIL_INDEX;
case api::format::d16_unorm:
type = GL_UNSIGNED_SHORT;
return GL_DEPTH_COMPONENT;
case api::format::d24_unorm_x8_uint:
type = GL_UNSIGNED_INT;
return GL_DEPTH_COMPONENT;
case api::format::r24_g8_typeless:
case api::format::r24_unorm_x8_uint:
case api::format::x24_unorm_g8_uint:
case api::format::d24_unorm_s8_uint:
type = GL_UNSIGNED_INT_24_8;
return GL_DEPTH_STENCIL;
case api::format::d32_float:
type = GL_FLOAT;
return GL_DEPTH_COMPONENT;
case api::format::r32_g8_typeless:
case api::format::r32_float_x8_uint:
case api::format::x32_float_g8_uint:
case api::format::d32_float_s8_uint:
type = GL_FLOAT_32_UNSIGNED_INT_24_8_REV;
return GL_DEPTH_STENCIL;
case api::format::bc1_typeless:
case api::format::bc1_unorm:
case api::format::bc1_unorm_srgb:
case api::format::bc2_typeless:
case api::format::bc2_unorm:
case api::format::bc2_unorm_srgb:
case api::format::bc3_typeless:
case api::format::bc3_unorm:
case api::format::bc3_unorm_srgb:
case api::format::bc4_typeless:
case api::format::bc4_unorm:
case api::format::bc4_snorm:
case api::format::bc5_typeless:
case api::format::bc5_unorm:
case api::format::bc5_snorm:
case api::format::bc6h_typeless:
case api::format::bc6h_ufloat:
case api::format::bc6h_sfloat:
case api::format::bc7_typeless:
case api::format::bc7_unorm:
case api::format::bc7_unorm_srgb:
type = GL_COMPRESSED_TEXTURE_FORMATS;
return convert_format(format);
default:
assert(false);
break;
}
return type = GL_NONE;
}
auto reshade::opengl::convert_upload_format(GLenum format, GLenum type) -> api::format
{
switch (format)
{
case GL_RED:
switch (type)
{
case GL_BYTE:
return api::format::r8_snorm;
case GL_UNSIGNED_BYTE:
return api::format::r8_unorm;
case GL_SHORT:
return api::format::r16_snorm;
case GL_UNSIGNED_SHORT:
return api::format::r16_unorm;
case GL_HALF_FLOAT:
return api::format::r16_float;
case GL_INT:
return api::format::r32_sint;
case GL_UNSIGNED_INT:
return api::format::r32_uint;
case GL_FLOAT:
return api::format::r32_float;
default:
assert(false);
return api::format::unknown;
}
case GL_RED_INTEGER:
switch (type)
{
case GL_BYTE:
return api::format::r8_sint;
case GL_UNSIGNED_BYTE:
return api::format::r8_uint;
case GL_SHORT:
return api::format::r16_sint;
case GL_UNSIGNED_SHORT:
return api::format::r16_uint;
case GL_INT:
return api::format::r32_sint;
case GL_UNSIGNED_INT:
return api::format::r32_uint;
default:
assert(false);
return api::format::unknown;
}
case GL_ALPHA:
switch (type)
{
case GL_UNSIGNED_BYTE:
return api::format::a8_unorm;
case GL_UNSIGNED_SHORT: // Used by Amnesia: A Machine for Pigs (to upload to a GL_ALPHA8 texture)
return api::format::unknown;
default:
assert(false);
return api::format::unknown;
}
case 0x1909 /* GL_LUMINANCE */:
case 0x8049 /* GL_INTENSITY */:
switch (type)
{
case GL_UNSIGNED_BYTE:
return api::format::l8_unorm;
default:
assert(false);
return api::format::unknown;
}
case GL_RG:
switch (type)
{
case GL_BYTE:
return api::format::r8g8_snorm;
case GL_UNSIGNED_BYTE:
return api::format::r8g8_unorm;
case GL_SHORT:
return api::format::r16g16_snorm;
case GL_UNSIGNED_SHORT:
return api::format::r16g16_unorm;
case GL_HALF_FLOAT:
return api::format::r16g16_float;
case GL_INT:
return api::format::r32g32_sint;
case GL_UNSIGNED_INT:
return api::format::r32g32_uint;
case GL_FLOAT:
return api::format::r32g32_float;
default:
assert(false);
return api::format::unknown;
}
case GL_RG_INTEGER:
switch (type)
{
case GL_BYTE:
return api::format::r8g8_sint;
case GL_UNSIGNED_BYTE:
return api::format::r8g8_uint;
case GL_SHORT:
return api::format::r16g16_sint;
case GL_UNSIGNED_SHORT:
return api::format::r16g16_uint;
case GL_INT:
return api::format::r32g32_sint;
case GL_UNSIGNED_INT:
return api::format::r32g32_uint;
default:
assert(false);
return api::format::unknown;
}
case 0x190A /* GL_LUMINANCE_ALPHA */:
switch (type)
{
case GL_UNSIGNED_BYTE:
return api::format::l8a8_unorm;
default:
assert(false);
return api::format::unknown;
}
case GL_RGB:
case GL_RGB_INTEGER:
switch (type)
{
case GL_BYTE:
return api::format::r8g8b8x8_unorm;
case GL_UNSIGNED_SHORT: // Used by Amnesia: A Machine for Pigs (to upload to a GL_RGB8 texture)
return api::format::unknown;
case GL_INT:
return api::format::r32g32b32_sint;
case GL_UNSIGNED_INT:
return api::format::r32g32b32_uint;
case GL_UNSIGNED_INT_10F_11F_11F_REV:
return api::format::r11g11b10_float;
case GL_FLOAT:
return api::format::r32g32b32_float;
default:
assert(false);
return api::format::unknown;
}
case GL_BGR:
case GL_BGR_INTEGER:
switch (type)
{
case GL_BYTE:
return api::format::b8g8r8x8_unorm;
case GL_UNSIGNED_SHORT: // Used by Amnesia: A Machine for Pigs (to upload to a GL_RGB8 texture)
return api::format::unknown;
case GL_UNSIGNED_SHORT_5_6_5_REV:
return api::format::b5g6r5_unorm;
case GL_UNSIGNED_SHORT_1_5_5_5_REV:
return api::format::b5g5r5x1_unorm;
default:
assert(false);
return api::format::unknown;
}
case GL_RGBA:
switch (type)
{
case GL_BYTE:
return api::format::r8g8b8a8_snorm;
case GL_UNSIGNED_BYTE:
return api::format::r8g8b8a8_unorm;
case GL_SHORT:
return api::format::r16g16b16a16_snorm;
case GL_UNSIGNED_SHORT:
return api::format::r16g16b16a16_unorm;
case GL_UNSIGNED_SHORT_4_4_4_4:
return api::format::a4b4g4r4_unorm;
case GL_HALF_FLOAT:
return api::format::r16g16b16a16_float;
case GL_INT:
return api::format::r32g32b32a32_sint;
case GL_UNSIGNED_INT:
return api::format::r32g32b32a32_uint;
case GL_UNSIGNED_INT_8_8_8_8: // Not technically correct here, since it is ABGR8, but used by RPCS3
case GL_UNSIGNED_INT_8_8_8_8_REV: // On a little endian machine the least-significant byte is stored first
return api::format::r8g8b8a8_unorm;
case GL_UNSIGNED_INT_2_10_10_10_REV:
return api::format::r10g10b10a2_unorm;
case GL_UNSIGNED_INT_5_9_9_9_REV:
return api::format::r9g9b9e5;
case GL_FLOAT:
return api::format::r32g32b32a32_float;
default:
assert(false);
return api::format::unknown;
}
case GL_RGBA_INTEGER:
switch (type)
{
case GL_BYTE:
return api::format::r8g8b8a8_sint;
case GL_UNSIGNED_BYTE:
return api::format::r8g8b8a8_uint;
case GL_SHORT:
return api::format::r16g16b16a16_sint;
case GL_UNSIGNED_SHORT:
return api::format::r16g16b16a16_uint;
case GL_INT:
return api::format::r32g32b32a32_sint;
case GL_UNSIGNED_INT:
return api::format::r32g32b32a32_uint;
case GL_UNSIGNED_INT_2_10_10_10_REV:
return api::format::r10g10b10a2_uint;
default:
assert(false);
return api::format::unknown;
}
case GL_BGRA:
switch (type)
{
case GL_UNSIGNED_BYTE:
return api::format::b8g8r8a8_unorm;
case GL_UNSIGNED_SHORT: // Used by Amnesia: Rebirth
return api::format::unknown;
case GL_UNSIGNED_SHORT_4_4_4_4_REV:
return api::format::b4g4r4a4_unorm;
case GL_UNSIGNED_SHORT_1_5_5_5_REV:
return api::format::b5g5r5a1_unorm;
case GL_UNSIGNED_INT_8_8_8_8:
case GL_UNSIGNED_INT_8_8_8_8_REV:
return api::format::b8g8r8a8_unorm;
case GL_UNSIGNED_INT_2_10_10_10_REV:
return api::format::b10g10r10a2_unorm;
default:
assert(false);
return api::format::unknown;
}
case GL_BGRA_INTEGER:
switch (type)
{
case GL_UNSIGNED_INT_2_10_10_10_REV:
return api::format::b10g10r10a2_uint;
default:
assert(false);
return api::format::unknown;
}
case GL_STENCIL_INDEX:
switch (type)
{
case GL_UNSIGNED_BYTE:
return api::format::s8_uint;
default:
assert(false);
return api::format::unknown;
}
case GL_DEPTH_COMPONENT:
switch (type)
{
case GL_UNSIGNED_SHORT:
return api::format::d16_unorm;
case GL_UNSIGNED_INT:
return api::format::d24_unorm_x8_uint;
case GL_FLOAT:
return api::format::d32_float;
default:
assert(false);
return api::format::unknown;
}
case GL_DEPTH_STENCIL:
switch (type)
{
case GL_UNSIGNED_INT_24_8:
return api::format::d24_unorm_s8_uint;
case GL_FLOAT_32_UNSIGNED_INT_24_8_REV:
return api::format::d32_float_s8_uint;
default:
assert(false);
return api::format::unknown;
}
default:
return convert_format(format);
}
}
auto reshade::opengl::convert_attrib_format(api::format format, GLint &size, GLboolean &normalized) -> GLenum
{
size = 0;
normalized = GL_FALSE;
switch (format)
{
case api::format::r8g8b8x8_unorm:
normalized = GL_TRUE;
size = 3;
return GL_UNSIGNED_BYTE;
case api::format::b8g8r8x8_unorm:
normalized = GL_TRUE;
size = GL_BGR;
return GL_UNSIGNED_BYTE;
case api::format::r8g8b8a8_unorm:
normalized = GL_TRUE;
[[fallthrough]];
case api::format::r8g8b8a8_uint:
size = 4;
return GL_UNSIGNED_BYTE;
case api::format::r8g8b8a8_snorm:
normalized = GL_TRUE;
[[fallthrough]];
case api::format::r8g8b8a8_sint:
size = 4;
return GL_BYTE;
case api::format::b8g8r8a8_unorm:
normalized = GL_TRUE;
size = GL_BGRA;
return GL_UNSIGNED_BYTE;
case api::format::r10g10b10a2_unorm:
normalized = GL_TRUE;
[[fallthrough]];
case api::format::r10g10b10a2_uint:
size = 4;
return GL_UNSIGNED_INT_2_10_10_10_REV;
case api::format::b10g10r10a2_unorm:
normalized = GL_TRUE;
[[fallthrough]];
case api::format::b10g10r10a2_uint:
size = GL_BGRA;
return GL_UNSIGNED_INT_2_10_10_10_REV;
case api::format::r16_unorm:
normalized = GL_TRUE;
[[fallthrough]];
case api::format::r16_uint:
size = 1;
return GL_UNSIGNED_SHORT;
case api::format::r16_snorm:
normalized = GL_TRUE;
[[fallthrough]];
case api::format::r16_sint:
size = 1;
return GL_SHORT;
case api::format::r16_float:
size = 1;
return GL_HALF_FLOAT;
case api::format::r16g16_unorm:
normalized = GL_TRUE;
[[fallthrough]];
case api::format::r16g16_uint:
size = 2;
return GL_UNSIGNED_SHORT;
case api::format::r16g16_snorm:
normalized = GL_TRUE;
[[fallthrough]];
case api::format::r16g16_sint:
size = 2;
return GL_SHORT;
case api::format::r16g16_float:
size = 2;
return GL_HALF_FLOAT;
case api::format::r16g16b16a16_unorm:
normalized = GL_TRUE;
[[fallthrough]];
case api::format::r16g16b16a16_uint:
size = 4;
return GL_UNSIGNED_SHORT;
case api::format::r16g16b16a16_snorm:
normalized = GL_TRUE;
[[fallthrough]];
case api::format::r16g16b16a16_sint:
size = 4;
return GL_SHORT;
case api::format::r16g16b16a16_float:
size = 4;
return GL_HALF_FLOAT;
case api::format::r32_uint:
size = 1;
return GL_UNSIGNED_INT;
case api::format::r32_sint:
size = 1;
return GL_INT;
case api::format::r32_float:
size = 1;
return GL_FLOAT;
case api::format::r32g32_uint:
size = 2;
return GL_UNSIGNED_INT;
case api::format::r32g32_sint:
size = 2;
return GL_INT;
case api::format::r32g32_float:
size = 2;
return GL_FLOAT;
case api::format::r32g32b32_uint:
size = 3;
return GL_UNSIGNED_INT;
case api::format::r32g32b32_sint:
size = 3;
return GL_INT;
case api::format::r32g32b32_float:
size = 3;
return GL_FLOAT;
case api::format::r32g32b32a32_uint:
size = 4;
return GL_UNSIGNED_INT;
case api::format::r32g32b32a32_sint:
size = 4;
return GL_INT;
case api::format::r32g32b32a32_float:
size = 4;
return GL_FLOAT;
}
assert(false);
return GL_NONE;
}
auto reshade::opengl::convert_attrib_format(GLint size, GLenum type, GLboolean normalized) -> api::format
{
switch (size)
{
case 1:
return convert_upload_format(normalized || type == GL_FLOAT || type == GL_HALF_FLOAT ? GL_RED : GL_RED_INTEGER, type);
case 2:
return convert_upload_format(normalized || type == GL_FLOAT || type == GL_HALF_FLOAT ? GL_RG : GL_RG_INTEGER, type);
case 3:
return convert_upload_format(normalized || type == GL_FLOAT || type == GL_HALF_FLOAT ? GL_RGB : GL_RGB_INTEGER, type);
case 4:
return convert_upload_format(normalized || type == GL_FLOAT || type == GL_HALF_FLOAT ? GL_RGBA : GL_RGBA_INTEGER, type);
case GL_BGRA:
assert(normalized);
return convert_upload_format(GL_BGRA, type);
default:
assert(false);
return api::format::unknown;
}
}
auto reshade::opengl::convert_sized_internal_format(GLenum internal_format) -> GLenum
{
// Convert base internal formats to sized internal formats
switch (internal_format)
{
case 1:
case GL_RED:
return GL_R8;
case GL_ALPHA:
return 0x803C /* GL_ALPHA8 */;
case 0x1909 /* GL_LUMINANCE */:
return 0x8040 /* GL_LUMINANCE8 */;
case 0x8049 /* GL_INTENSITY */:
return 0x804B /* GL_INTENSITY8 */;
case 2:
case GL_RG:
return GL_RG8;
case 0x190A /* GL_LUMINANCE_ALPHA */:
return 0x8045 /* GL_LUMINANCE8_ALPHA8 */;
case 3:
case GL_RGB:
return GL_RGB8;
case 4:
case GL_RGBA:
return GL_RGBA8;
case GL_STENCIL_INDEX:
return GL_STENCIL_INDEX8;
case GL_DEPTH_COMPONENT:
return GL_DEPTH_COMPONENT24;
case GL_DEPTH_COMPONENT32:
// Replace formats from 'GL_NV_depth_buffer_float' extension with their core variants
case GL_DEPTH_COMPONENT32F_NV:
return GL_DEPTH_COMPONENT32F;
case GL_DEPTH_STENCIL:
return GL_DEPTH24_STENCIL8;
case GL_DEPTH32F_STENCIL8_NV:
return GL_DEPTH32F_STENCIL8;
default:
return internal_format;
}
}
auto reshade::opengl::is_depth_stencil_format(api::format format) -> GLenum
{
switch (format)
{
default:
return GL_NONE;
case api::format::s8_uint:
return GL_STENCIL_ATTACHMENT;
case api::format::d16_unorm:
case api::format::d24_unorm_x8_uint:
case api::format::d32_float:
return GL_DEPTH_ATTACHMENT;
case api::format::d24_unorm_s8_uint:
case api::format::d32_float_s8_uint:
return GL_DEPTH_STENCIL_ATTACHMENT;
}
}
auto reshade::opengl::convert_access_flags(reshade::api::map_access flags) -> GLbitfield
{
switch (flags)
{
case api::map_access::read_only:
return GL_MAP_READ_BIT;
case api::map_access::write_only:
return GL_MAP_WRITE_BIT;
case api::map_access::read_write:
return GL_MAP_READ_BIT | GL_MAP_WRITE_BIT;
case api::map_access::write_discard:
return GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_BUFFER_BIT;
default:
return 0;
}
}
reshade::api::map_access reshade::opengl::convert_access_flags(GLbitfield flags)
{
if ((flags & (GL_MAP_INVALIDATE_RANGE_BIT | GL_MAP_INVALIDATE_BUFFER_BIT)) != 0)
return reshade::api::map_access::write_discard;
switch (flags & (GL_MAP_READ_BIT | GL_MAP_WRITE_BIT))
{
case GL_MAP_READ_BIT:
return reshade::api::map_access::read_only;
case GL_MAP_WRITE_BIT:
return reshade::api::map_access::write_only;
default:
return reshade::api::map_access::read_write;
}
}
void reshade::opengl::convert_resource_desc(const api::resource_desc &desc, GLsizeiptr &buffer_size, GLbitfield &storage_flags)
{
assert(desc.buffer.size <= static_cast<uint64_t>(std::numeric_limits<GLsizeiptr>::max()));
buffer_size = static_cast<GLsizeiptr>(desc.buffer.size);
switch (desc.heap)
{
default:
case api::memory_heap::unknown:
storage_flags = GL_MAP_READ_BIT | GL_MAP_WRITE_BIT;
break;
case api::memory_heap::gpu_only:
storage_flags = 0;
break;
case api::memory_heap::cpu_to_gpu:
storage_flags = GL_MAP_WRITE_BIT;
break;
case api::memory_heap::gpu_to_cpu:
storage_flags = GL_MAP_READ_BIT;
break;
case api::memory_heap::cpu_only:
storage_flags = GL_MAP_READ_BIT | GL_MAP_WRITE_BIT | GL_CLIENT_STORAGE_BIT;
break;
}
if ((desc.flags & api::resource_flags::dynamic) != 0)
storage_flags |= GL_DYNAMIC_STORAGE_BIT;
}
reshade::api::resource_type reshade::opengl::convert_resource_type(GLenum target)
{
switch (target)
{
case GL_BUFFER:
case GL_ARRAY_BUFFER:
case GL_ELEMENT_ARRAY_BUFFER:
case GL_PIXEL_PACK_BUFFER:
case GL_PIXEL_UNPACK_BUFFER:
case GL_UNIFORM_BUFFER:
case GL_TEXTURE_BUFFER:
case GL_TRANSFORM_FEEDBACK_BUFFER:
case GL_COPY_READ_BUFFER:
case GL_COPY_WRITE_BUFFER:
case GL_DRAW_INDIRECT_BUFFER:
case GL_SHADER_STORAGE_BUFFER:
case GL_DISPATCH_INDIRECT_BUFFER:
case GL_QUERY_BUFFER:
case GL_ATOMIC_COUNTER_BUFFER:
return api::resource_type::buffer;
case GL_TEXTURE_1D:
case GL_TEXTURE_1D_ARRAY:
case GL_PROXY_TEXTURE_1D:
case GL_PROXY_TEXTURE_1D_ARRAY:
return api::resource_type::texture_1d;
case GL_TEXTURE_2D:
case GL_TEXTURE_2D_ARRAY:
case GL_TEXTURE_RECTANGLE: // This is not technically compatible with 2D textures
case GL_PROXY_TEXTURE_2D:
case GL_PROXY_TEXTURE_2D_ARRAY:
case GL_PROXY_TEXTURE_RECTANGLE:
return api::resource_type::texture_2d;
case GL_TEXTURE_2D_MULTISAMPLE:
case GL_TEXTURE_2D_MULTISAMPLE_ARRAY:
case GL_PROXY_TEXTURE_2D_MULTISAMPLE:
case GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY:
return api::resource_type::texture_2d;
case GL_TEXTURE_3D:
case GL_PROXY_TEXTURE_3D:
return api::resource_type::texture_3d;
case GL_TEXTURE_CUBE_MAP:
case GL_TEXTURE_CUBE_MAP_ARRAY:
case GL_PROXY_TEXTURE_CUBE_MAP:
case GL_PROXY_TEXTURE_CUBE_MAP_ARRAY:
case GL_TEXTURE_CUBE_MAP_POSITIVE_X:
case GL_TEXTURE_CUBE_MAP_NEGATIVE_X:
case GL_TEXTURE_CUBE_MAP_POSITIVE_Y:
case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y:
case GL_TEXTURE_CUBE_MAP_POSITIVE_Z:
case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z:
return api::resource_type::texture_2d;
case GL_RENDERBUFFER:
case GL_FRAMEBUFFER_DEFAULT:
return api::resource_type::surface;
default:
assert(false);
return api::resource_type::unknown;
}
}
reshade::api::resource_desc reshade::opengl::convert_resource_desc(GLenum target, GLsizeiptr buffer_size, GLbitfield storage_flags)
{
api::resource_desc desc = {};
desc.type = convert_resource_type(target);
desc.buffer.size = buffer_size;
desc.buffer.stride = 0;
switch (storage_flags & (GL_MAP_READ_BIT | GL_MAP_WRITE_BIT))
{
case GL_MAP_READ_BIT | GL_MAP_WRITE_BIT:
desc.heap = api::memory_heap::unknown;
break;
case 0:
desc.heap = api::memory_heap::gpu_only;
break;
case GL_MAP_WRITE_BIT:
desc.heap = api::memory_heap::cpu_to_gpu;
break;
case GL_MAP_READ_BIT:
desc.heap = api::memory_heap::gpu_to_cpu;
break;
}
desc.usage = api::resource_usage::copy_dest | api::resource_usage::copy_source;
if (target == GL_ELEMENT_ARRAY_BUFFER)
desc.usage |= api::resource_usage::index_buffer;
else if (target == GL_ARRAY_BUFFER)
desc.usage |= api::resource_usage::vertex_buffer;
else if (target == GL_UNIFORM_BUFFER)
desc.usage |= api::resource_usage::constant_buffer;
else if (target == GL_TRANSFORM_FEEDBACK_BUFFER)
desc.usage |= api::resource_usage::stream_output;
else if (target == GL_DRAW_INDIRECT_BUFFER || target == GL_DISPATCH_INDIRECT_BUFFER)
desc.usage |= api::resource_usage::indirect_argument;
else
desc.usage |= api::resource_usage::shader_resource;
if ((storage_flags & GL_DYNAMIC_STORAGE_BIT) != 0)
desc.flags |= api::resource_flags::dynamic;
return desc;
}
reshade::api::resource_desc reshade::opengl::convert_resource_desc(GLenum target, GLsizei levels, GLsizei samples, GLenum internal_format, GLsizei width, GLsizei height, GLsizei depth, const GLint swizzle_mask[4])
{
api::resource_desc desc = {};
desc.type = convert_resource_type(target);
desc.texture.width = width;
desc.texture.height = height;
assert(depth <= std::numeric_limits<uint16_t>::max());
desc.texture.depth_or_layers = static_cast<uint16_t>(depth);
assert(levels <= std::numeric_limits<uint16_t>::max());
desc.texture.levels = static_cast<uint16_t>(levels);
desc.texture.format = convert_format(internal_format, swizzle_mask);
desc.texture.samples = static_cast<uint16_t>(samples);
desc.heap = api::memory_heap::gpu_only;
desc.usage = api::resource_usage::copy_dest | api::resource_usage::copy_source | api::resource_usage::resolve_dest;
if (desc.texture.samples >= 2)
desc.usage = api::resource_usage::resolve_source;
if (is_depth_stencil_format(desc.texture.format))
desc.usage |= api::resource_usage::depth_stencil;
if (desc.type == api::resource_type::texture_1d || desc.type == api::resource_type::texture_2d || desc.type == api::resource_type::surface)
desc.usage |= api::resource_usage::render_target;
if (desc.type != api::resource_type::surface)
desc.usage |= api::resource_usage::shader_resource;
assert(!(target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X && target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z));
if (target == GL_TEXTURE_CUBE_MAP || target == GL_TEXTURE_CUBE_MAP_ARRAY ||
target == GL_PROXY_TEXTURE_CUBE_MAP || target == GL_PROXY_TEXTURE_CUBE_MAP_ARRAY)
{
desc.texture.depth_or_layers *= 6;
desc.flags |= api::resource_flags::cube_compatible;
}
// Mipmap generation is supported for all textures
if (levels != 1 && desc.type == api::resource_type::texture_2d)
desc.flags |= api::resource_flags::generate_mipmaps;
return desc;
}
reshade::api::resource_view_type reshade::opengl::convert_resource_view_type(GLenum target)
{
switch (target)
{
case GL_TEXTURE_BUFFER:
return api::resource_view_type::buffer;
case GL_TEXTURE_1D:
case GL_PROXY_TEXTURE_1D:
return api::resource_view_type::texture_1d;
case GL_TEXTURE_1D_ARRAY:
case GL_PROXY_TEXTURE_1D_ARRAY:
return api::resource_view_type::texture_1d_array;
case GL_TEXTURE_2D:
case GL_TEXTURE_RECTANGLE:
case GL_PROXY_TEXTURE_2D:
case GL_PROXY_TEXTURE_RECTANGLE:
case GL_TEXTURE_CUBE_MAP_POSITIVE_X: // Single cube face is a 2D view
case GL_TEXTURE_CUBE_MAP_NEGATIVE_X:
case GL_TEXTURE_CUBE_MAP_POSITIVE_Y:
case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y:
case GL_TEXTURE_CUBE_MAP_POSITIVE_Z:
case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z:
return api::resource_view_type::texture_2d;
case GL_TEXTURE_2D_ARRAY:
case GL_PROXY_TEXTURE_2D_ARRAY:
return api::resource_view_type::texture_2d_array;
case GL_TEXTURE_2D_MULTISAMPLE:
case GL_PROXY_TEXTURE_2D_MULTISAMPLE:
return api::resource_view_type::texture_2d_multisample;
case GL_TEXTURE_2D_MULTISAMPLE_ARRAY:
case GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY:
return api::resource_view_type::texture_2d_multisample_array;
case GL_TEXTURE_3D:
case GL_PROXY_TEXTURE_3D:
return api::resource_view_type::texture_3d;
case GL_TEXTURE_CUBE_MAP:
case GL_PROXY_TEXTURE_CUBE_MAP:
return api::resource_view_type::texture_cube;
case GL_TEXTURE_CUBE_MAP_ARRAY:
case GL_PROXY_TEXTURE_CUBE_MAP_ARRAY:
return api::resource_view_type::texture_cube_array;
case GL_RENDERBUFFER:
return api::resource_view_type::texture_2d; // There is no explicit surface view type
default:
assert(false);
return api::resource_view_type::unknown;
}
}
reshade::api::resource_view_desc reshade::opengl::convert_resource_view_desc(GLenum target, GLenum internal_format, GLintptr offset, GLsizeiptr size)
{
assert(convert_resource_view_type(target) == api::resource_view_type::buffer && size != 0);
return api::resource_view_desc(convert_format(internal_format), offset, size);
}
reshade::api::resource_view_desc reshade::opengl::convert_resource_view_desc(GLenum target, GLenum internal_format, GLuint min_level, GLuint num_levels, GLuint min_layer, GLuint num_layers)
{
return api::resource_view_desc(convert_resource_view_type(target), convert_format(internal_format), min_level, num_levels, min_layer, num_layers);
}
GLuint reshade::opengl::get_index_type_size(GLenum index_type)
{
#if 1
assert(index_type == GL_UNSIGNED_BYTE || index_type == GL_UNSIGNED_SHORT || index_type == GL_UNSIGNED_INT);
static_assert(((GL_UNSIGNED_SHORT - GL_UNSIGNED_BYTE) == 2) && ((GL_UNSIGNED_INT - GL_UNSIGNED_BYTE) == 4));
return 1 << ((index_type - GL_UNSIGNED_BYTE) / 2);
#else
switch (index_type)
{
default:
assert(false);
return 0;
case GL_UNSIGNED_BYTE:
return 1;
case GL_UNSIGNED_SHORT:
return 2;
case GL_UNSIGNED_INT:
return 4;
}
#endif
}
GLenum reshade::opengl::get_binding_for_target(GLenum target)
{
switch (target)
{
case GL_ARRAY_BUFFER:
return GL_ARRAY_BUFFER_BINDING;
case GL_ELEMENT_ARRAY_BUFFER:
return GL_ELEMENT_ARRAY_BUFFER_BINDING;
case GL_PIXEL_PACK_BUFFER:
return GL_PIXEL_PACK_BUFFER_BINDING;
case GL_PIXEL_UNPACK_BUFFER:
return GL_PIXEL_UNPACK_BUFFER_BINDING;
case GL_UNIFORM_BUFFER:
return GL_UNIFORM_BUFFER_BINDING;
case GL_TEXTURE_BUFFER:
return GL_TEXTURE_BUFFER_BINDING; // GL_TEXTURE_BINDING_BUFFER does not seem to work
case GL_TRANSFORM_FEEDBACK_BUFFER:
return GL_TRANSFORM_FEEDBACK_BUFFER_BINDING;
case GL_COPY_READ_BUFFER:
return GL_COPY_READ_BUFFER_BINDING;
case GL_COPY_WRITE_BUFFER:
return GL_COPY_WRITE_BUFFER_BINDING;
case GL_DRAW_INDIRECT_BUFFER:
return GL_DRAW_INDIRECT_BUFFER_BINDING;
case GL_SHADER_STORAGE_BUFFER:
return GL_SHADER_STORAGE_BUFFER_BINDING;
case GL_DISPATCH_INDIRECT_BUFFER:
return GL_DISPATCH_INDIRECT_BUFFER_BINDING;
case GL_QUERY_BUFFER:
return GL_QUERY_BUFFER_BINDING;
case GL_ATOMIC_COUNTER_BUFFER:
return GL_ATOMIC_COUNTER_BUFFER_BINDING;
case GL_TEXTURE_1D:
return GL_TEXTURE_BINDING_1D;
case GL_TEXTURE_1D_ARRAY:
return GL_TEXTURE_BINDING_1D_ARRAY;
case GL_TEXTURE_2D:
return GL_TEXTURE_BINDING_2D;
case GL_TEXTURE_2D_ARRAY:
return GL_TEXTURE_BINDING_2D_ARRAY;
case GL_TEXTURE_2D_MULTISAMPLE:
return GL_TEXTURE_BINDING_2D_MULTISAMPLE;
case GL_TEXTURE_2D_MULTISAMPLE_ARRAY:
return GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY;
case GL_TEXTURE_3D:
return GL_TEXTURE_BINDING_3D;
case GL_TEXTURE_CUBE_MAP:
case GL_TEXTURE_CUBE_MAP_POSITIVE_X:
case GL_TEXTURE_CUBE_MAP_NEGATIVE_X:
case GL_TEXTURE_CUBE_MAP_POSITIVE_Y:
case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y:
case GL_TEXTURE_CUBE_MAP_POSITIVE_Z:
case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z:
return GL_TEXTURE_BINDING_CUBE_MAP;
case GL_TEXTURE_CUBE_MAP_ARRAY:
return GL_TEXTURE_BINDING_CUBE_MAP_ARRAY;
case GL_TEXTURE_RECTANGLE:
return GL_TEXTURE_BINDING_RECTANGLE;
case GL_RENDERBUFFER:
return GL_RENDERBUFFER_BINDING;
case GL_FRAMEBUFFER:
return GL_FRAMEBUFFER_BINDING;
case GL_READ_FRAMEBUFFER:
return GL_READ_FRAMEBUFFER_BINDING;
case GL_DRAW_FRAMEBUFFER:
return GL_DRAW_FRAMEBUFFER_BINDING;
default:
assert(false);
return GL_NONE;
}
}
auto reshade::opengl::convert_logic_op(GLenum value) -> api::logic_op
{
switch (value)
{
default:
assert(false);
[[fallthrough]];
case GL_CLEAR:
return api::logic_op::clear;
case GL_AND:
return api::logic_op::bitwise_and;
case GL_AND_REVERSE:
return api::logic_op::bitwise_and_reverse;
case GL_COPY:
return api::logic_op::copy;
case GL_AND_INVERTED:
return api::logic_op::bitwise_and_inverted;
case GL_NOOP:
return api::logic_op::noop;
case GL_XOR:
return api::logic_op::bitwise_xor;
case GL_OR:
return api::logic_op::bitwise_or;
case GL_NOR:
return api::logic_op::bitwise_nor;
case GL_EQUIV:
return api::logic_op::equivalent;
case GL_INVERT:
return api::logic_op::invert;
case GL_OR_REVERSE:
return api::logic_op::bitwise_or_reverse;
case GL_COPY_INVERTED:
return api::logic_op::copy_inverted;
case GL_OR_INVERTED:
return api::logic_op::bitwise_or_inverted;
case GL_NAND:
return api::logic_op::bitwise_nand;
case GL_SET:
return api::logic_op::set;
}
}
GLenum reshade::opengl::convert_logic_op(api::logic_op value)
{
switch (value)
{
default:
assert(false);
[[fallthrough]];
case api::logic_op::clear:
return GL_CLEAR;
case api::logic_op::bitwise_and:
return GL_AND;
case api::logic_op::bitwise_and_reverse:
return GL_AND_REVERSE;
case api::logic_op::copy:
return GL_COPY;
case api::logic_op::bitwise_and_inverted:
return GL_AND_INVERTED;
case api::logic_op::noop:
return GL_NOOP;
case api::logic_op::bitwise_xor:
return GL_XOR;
case api::logic_op::bitwise_or:
return GL_OR;
case api::logic_op::bitwise_nor:
return GL_NOR;
case api::logic_op::equivalent:
return GL_EQUIV;
case api::logic_op::invert:
return GL_INVERT;
case api::logic_op::bitwise_or_reverse:
return GL_OR_REVERSE;
case api::logic_op::copy_inverted:
return GL_COPY_INVERTED;
case api::logic_op::bitwise_or_inverted:
return GL_OR_INVERTED;
case api::logic_op::bitwise_nand:
return GL_NAND;
case api::logic_op::set:
return GL_SET;
}
}
auto reshade::opengl::convert_blend_op(GLenum value) -> api::blend_op
{
switch (value)
{
default:
assert(false);
[[fallthrough]];
case GL_FUNC_ADD:
return api::blend_op::add;
case GL_FUNC_SUBTRACT:
return api::blend_op::subtract;
case GL_FUNC_REVERSE_SUBTRACT:
return api::blend_op::reverse_subtract;
case GL_MIN:
return api::blend_op::min;
case GL_MAX:
return api::blend_op::max;
}
}
GLenum reshade::opengl::convert_blend_op(api::blend_op value)
{
switch (value)
{
default:
assert(false);
[[fallthrough]];
case api::blend_op::add:
return GL_FUNC_ADD;
case api::blend_op::subtract:
return GL_FUNC_SUBTRACT;
case api::blend_op::reverse_subtract:
return GL_FUNC_REVERSE_SUBTRACT;
case api::blend_op::min:
return GL_MIN;
case api::blend_op::max:
return GL_MAX;
}
}
auto reshade::opengl::convert_blend_factor(GLenum value) -> api::blend_factor
{
switch (value)
{
default:
assert(false);
[[fallthrough]];
case GL_ZERO:
return api::blend_factor::zero;
case GL_ONE:
return api::blend_factor::one;
case GL_SRC_COLOR:
return api::blend_factor::source_color;
case GL_ONE_MINUS_SRC_COLOR:
return api::blend_factor::one_minus_source_color;
case GL_DST_COLOR:
return api::blend_factor::dest_color;
case GL_ONE_MINUS_DST_COLOR:
return api::blend_factor::one_minus_dest_color;
case GL_SRC_ALPHA:
return api::blend_factor::source_alpha;
case GL_ONE_MINUS_SRC_ALPHA:
return api::blend_factor::one_minus_source_alpha;
case GL_DST_ALPHA:
return api::blend_factor::dest_alpha;
case GL_ONE_MINUS_DST_ALPHA:
return api::blend_factor::one_minus_dest_alpha;
case GL_CONSTANT_COLOR:
return api::blend_factor::constant_color;
case GL_ONE_MINUS_CONSTANT_COLOR:
return api::blend_factor::one_minus_constant_color;
case GL_CONSTANT_ALPHA:
return api::blend_factor::constant_alpha;
case GL_ONE_MINUS_CONSTANT_ALPHA:
return api::blend_factor::one_minus_constant_alpha;
case GL_SRC_ALPHA_SATURATE:
return api::blend_factor::source_alpha_saturate;
case GL_SRC1_COLOR:
return api::blend_factor::source1_color;
case GL_ONE_MINUS_SRC1_COLOR:
return api::blend_factor::one_minus_source1_color;
case GL_SRC1_ALPHA:
return api::blend_factor::source1_alpha;
case GL_ONE_MINUS_SRC1_ALPHA:
return api::blend_factor::one_minus_source1_alpha;
}
}
GLenum reshade::opengl::convert_blend_factor(api::blend_factor value)
{
switch (value)
{
default:
assert(false);
[[fallthrough]];
case api::blend_factor::zero:
return GL_ZERO;
case api::blend_factor::one:
return GL_ONE;
case api::blend_factor::source_color:
return GL_SRC_COLOR;
case api::blend_factor::one_minus_source_color:
return GL_ONE_MINUS_SRC_COLOR;
case api::blend_factor::dest_color:
return GL_DST_COLOR;
case api::blend_factor::one_minus_dest_color:
return GL_ONE_MINUS_DST_COLOR;
case api::blend_factor::source_alpha:
return GL_SRC_ALPHA;
case api::blend_factor::one_minus_source_alpha:
return GL_ONE_MINUS_SRC_ALPHA;
case api::blend_factor::dest_alpha:
return GL_DST_ALPHA;
case api::blend_factor::one_minus_dest_alpha:
return GL_ONE_MINUS_DST_ALPHA;
case api::blend_factor::constant_color:
return GL_CONSTANT_COLOR;
case api::blend_factor::one_minus_constant_color:
return GL_ONE_MINUS_CONSTANT_COLOR;
case api::blend_factor::constant_alpha:
return GL_CONSTANT_ALPHA;
case api::blend_factor::one_minus_constant_alpha:
return GL_ONE_MINUS_CONSTANT_ALPHA;
case api::blend_factor::source_alpha_saturate:
return GL_SRC_ALPHA_SATURATE;
case api::blend_factor::source1_color:
return GL_SRC1_COLOR;
case api::blend_factor::one_minus_source1_color:
return GL_ONE_MINUS_SRC1_COLOR;
case api::blend_factor::source1_alpha:
return GL_SRC1_ALPHA;
case api::blend_factor::one_minus_source1_alpha:
return GL_ONE_MINUS_SRC1_ALPHA;
}
}
auto reshade::opengl::convert_fill_mode(GLenum value) -> api::fill_mode
{
switch (value)
{
default:
assert(false);
[[fallthrough]];
case GL_FILL:
return api::fill_mode::solid;
case GL_LINE:
return api::fill_mode::wireframe;
case GL_POINT:
return api::fill_mode::point;
}
}
GLenum reshade::opengl::convert_fill_mode(api::fill_mode value)
{
switch (value)
{
default:
assert(false);
[[fallthrough]];
case api::fill_mode::solid:
return GL_FILL;
case api::fill_mode::wireframe:
return GL_LINE;
case api::fill_mode::point:
return GL_POINT;
}
}
auto reshade::opengl::convert_cull_mode(GLenum value) -> api::cull_mode
{
switch (value)
{
default:
assert(false);
[[fallthrough]];
case GL_NONE:
return api::cull_mode::none;
case GL_FRONT:
return api::cull_mode::front;
case GL_BACK:
return api::cull_mode::back;
case GL_FRONT_AND_BACK:
return api::cull_mode::front_and_back;
}
}
GLenum reshade::opengl::convert_cull_mode(api::cull_mode value)
{
switch (value)
{
default:
assert(false);
[[fallthrough]];
case api::cull_mode::none:
return GL_NONE;
case api::cull_mode::front:
return GL_FRONT;
case api::cull_mode::back:
return GL_BACK;
case api::cull_mode::front_and_back:
return GL_FRONT_AND_BACK;
}
}
auto reshade::opengl::convert_compare_op(GLenum value) -> api::compare_op
{
switch (value)
{
default:
assert(false);
[[fallthrough]];
case GL_NEVER:
return api::compare_op::never;
case GL_LESS:
return api::compare_op::less;
case GL_EQUAL:
return api::compare_op::equal;
case GL_LEQUAL:
return api::compare_op::less_equal;
case GL_GREATER:
return api::compare_op::greater;
case GL_NOTEQUAL:
return api::compare_op::not_equal;
case GL_GEQUAL:
return api::compare_op::greater_equal;
case GL_ALWAYS:
return api::compare_op::always;
}
}
GLenum reshade::opengl::convert_compare_op(api::compare_op value)
{
switch (value)
{
default:
assert(false);
[[fallthrough]];
case api::compare_op::never:
return GL_NEVER;
case api::compare_op::less:
return GL_LESS;
case api::compare_op::equal:
return GL_EQUAL;
case api::compare_op::less_equal:
return GL_LEQUAL;
case api::compare_op::greater:
return GL_GREATER;
case api::compare_op::not_equal:
return GL_NOTEQUAL;
case api::compare_op::greater_equal:
return GL_GEQUAL;
case api::compare_op::always:
return GL_ALWAYS;
}
}
auto reshade::opengl::convert_stencil_op(GLenum value) -> api::stencil_op
{
switch (value)
{
default:
assert(false);
[[fallthrough]];
case GL_KEEP:
return api::stencil_op::keep;
case GL_ZERO:
return api::stencil_op::zero;
case GL_REPLACE:
return api::stencil_op::replace;
case GL_INCR:
return api::stencil_op::increment_saturate;
case GL_DECR:
return api::stencil_op::decrement_saturate;
case GL_INVERT:
return api::stencil_op::invert;
case GL_INCR_WRAP:
return api::stencil_op::increment;
case GL_DECR_WRAP:
return api::stencil_op::decrement;
}
}
GLenum reshade::opengl::convert_stencil_op(api::stencil_op value)
{
switch (value)
{
default:
assert(false);
[[fallthrough]];
case api::stencil_op::keep:
return GL_KEEP;
case api::stencil_op::zero:
return GL_ZERO;
case api::stencil_op::replace:
return GL_REPLACE;
case api::stencil_op::increment_saturate:
return GL_INCR;
case api::stencil_op::decrement_saturate:
return GL_DECR;
case api::stencil_op::invert:
return GL_INVERT;
case api::stencil_op::increment:
return GL_INCR_WRAP;
case api::stencil_op::decrement:
return GL_DECR_WRAP;
}
}
auto reshade::opengl::convert_primitive_topology(GLenum value) -> api::primitive_topology
{
switch (value)
{
default:
assert(false);
return api::primitive_topology::undefined;
case GL_POINTS:
return api::primitive_topology::point_list;
case GL_LINES:
return api::primitive_topology::line_list;
case GL_LINE_LOOP:
case GL_LINE_STRIP:
return api::primitive_topology::line_strip;
case GL_TRIANGLES:
return api::primitive_topology::triangle_list;
case GL_TRIANGLE_STRIP:
return api::primitive_topology::triangle_strip;
case GL_TRIANGLE_FAN:
return api::primitive_topology::triangle_fan;
case GL_LINES_ADJACENCY:
return api::primitive_topology::line_list_adj;
case GL_LINE_STRIP_ADJACENCY:
return api::primitive_topology::line_strip_adj;
case GL_TRIANGLES_ADJACENCY:
return api::primitive_topology::triangle_list_adj;
case GL_TRIANGLE_STRIP_ADJACENCY:
return api::primitive_topology::triangle_strip_adj;
case GL_QUADS:
return api::primitive_topology::quad_list;
case 0x0008 /* GL_QUAD_STRIP */:
return api::primitive_topology::quad_strip;
case GL_PATCHES:
// This needs to be adjusted externally based on 'GL_PATCH_VERTICES'
return api::primitive_topology::patch_list_01_cp;
}
}
GLenum reshade::opengl::convert_primitive_topology(api::primitive_topology value)
{
switch (value)
{
case api::primitive_topology::point_list:
return GL_POINTS;
case api::primitive_topology::line_list:
return GL_LINES;
case api::primitive_topology::line_strip:
return GL_LINE_STRIP;
case api::primitive_topology::triangle_list:
return GL_TRIANGLES;
case api::primitive_topology::triangle_strip:
return GL_TRIANGLE_STRIP;
case api::primitive_topology::triangle_fan:
return GL_TRIANGLE_FAN;
case api::primitive_topology::quad_list:
return GL_QUADS;
case api::primitive_topology::quad_strip:
return 0x0008 /* GL_QUAD_STRIP */;
case api::primitive_topology::line_list_adj:
return GL_LINES_ADJACENCY;
case api::primitive_topology::line_strip_adj:
return GL_LINE_STRIP_ADJACENCY;
case api::primitive_topology::triangle_list_adj:
return GL_TRIANGLES_ADJACENCY;
case api::primitive_topology::triangle_strip_adj:
return GL_TRIANGLE_STRIP_ADJACENCY;
case api::primitive_topology::patch_list_01_cp:
case api::primitive_topology::patch_list_02_cp:
case api::primitive_topology::patch_list_03_cp:
case api::primitive_topology::patch_list_04_cp:
case api::primitive_topology::patch_list_05_cp:
case api::primitive_topology::patch_list_06_cp:
case api::primitive_topology::patch_list_07_cp:
case api::primitive_topology::patch_list_08_cp:
case api::primitive_topology::patch_list_09_cp:
case api::primitive_topology::patch_list_10_cp:
case api::primitive_topology::patch_list_11_cp:
case api::primitive_topology::patch_list_12_cp:
case api::primitive_topology::patch_list_13_cp:
case api::primitive_topology::patch_list_14_cp:
case api::primitive_topology::patch_list_15_cp:
case api::primitive_topology::patch_list_16_cp:
case api::primitive_topology::patch_list_17_cp:
case api::primitive_topology::patch_list_18_cp:
case api::primitive_topology::patch_list_19_cp:
case api::primitive_topology::patch_list_20_cp:
case api::primitive_topology::patch_list_21_cp:
case api::primitive_topology::patch_list_22_cp:
case api::primitive_topology::patch_list_23_cp:
case api::primitive_topology::patch_list_24_cp:
case api::primitive_topology::patch_list_25_cp:
case api::primitive_topology::patch_list_26_cp:
case api::primitive_topology::patch_list_27_cp:
case api::primitive_topology::patch_list_28_cp:
case api::primitive_topology::patch_list_29_cp:
case api::primitive_topology::patch_list_30_cp:
case api::primitive_topology::patch_list_31_cp:
case api::primitive_topology::patch_list_32_cp:
// Also need to adjust 'GL_PATCH_VERTICES' externally
return GL_PATCHES;
default:
assert(false);
return GL_NONE;
}
}
GLenum reshade::opengl::convert_query_type(api::query_type value)
{
switch (value)
{
case api::query_type::occlusion:
case api::query_type::binary_occlusion:
return GL_SAMPLES_PASSED;
case api::query_type::timestamp:
return GL_TIMESTAMP;
case api::query_type::stream_output_statistics_0:
case api::query_type::stream_output_statistics_1:
case api::query_type::stream_output_statistics_2:
case api::query_type::stream_output_statistics_3:
return GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN;
default:
assert(false);
return GL_NONE;
}
}
GLenum reshade::opengl::convert_shader_type(api::shader_stage type)
{
switch (type)
{
case api::shader_stage::vertex:
return GL_VERTEX_SHADER;
case api::shader_stage::hull:
return GL_TESS_CONTROL_SHADER;
case api::shader_stage::domain:
return GL_TESS_EVALUATION_SHADER;
case api::shader_stage::geometry:
return GL_GEOMETRY_SHADER;
case api::shader_stage::pixel:
return GL_FRAGMENT_SHADER;
case api::shader_stage::compute:
return GL_COMPUTE_SHADER;
default:
assert(false);
return GL_NONE;
}
}
```
|
```shell
Test disk speed with `dd`
Force a time update with `ntp`
Find out if the system's architecture is 32 or 64 bit
Change your `hostname` on systems using `systemd`
Get hardware stack details with `lspci`
```
|
"Belfast Brigade" is an Irish folk song, to the tune of "Battle Hymn of the Republic".
Context
The song is about the Belfast Brigade of the Irish Republican Army (IRA), and in particular the 1st, or West Belfast battalion, during the Irish War of Independence in the 1920s. Reference is made to James Craig, 1st Viscount Craigavon, the first Prime Minister of Northern Ireland who is accused of sending the 'Specials' or Ulster Special Constabulary, to 'shoot the people down'. This is a reference to the large number of Catholics who were killed by the Special Constabulary in the conflict. In Christy Moore's version the lyrics in this verse are "the Black and Tans from London came to shoot the people down"
Reference is also made to Seaforde Street in the Short Strand area of east Belfast, which was often the scene of armed encounters between the IRA, British forces and loyalist gunmen. Alternative versions of the song contain a reference to the Falls Road area instead of Seaforde Street. Other lyrics specific to the 1920s are references to armoured cars and Crossley Tenders armoured trucks which were used by the Northern Ireland Security forces at the time. The British use of such heavy weaponry is contrasted with the poor arms possessed by the IRA, who are nevertheless, 'ready to defend ourselves no matter where we go'. The Song Includes the original war cry of the Belfast Brigade, "No surrender! Is the war cry of the Belfast Brigade."
In some versions of the song, there is an allusion to the politics of the Irish Civil War of 1922-1923, 'We're out for our Republic and to hell with your Free State'. The Belfast Brigade in fact largely supported Michael Collins during the civil war, although many of them changed their opinion when it became clear that the Partition of Ireland would be permanent. In other versions of the song, this internal Republican disagreement is not mentioned, the words being changed to, 'Orangemen may live in dread'.
During the Spanish Civil War (1936–1939), the Connolly Column, an Irish volunteer unit of the 15th International Brigade, sang the song while fighting against Francisco Franco's nationalists.
In the 1970s, with the onset of The Troubles, another version of the song emerged about the Provisional IRA Belfast Brigade. The lyrics were changed to 'the British Army came to Belfast to shoot the people down...'
References
Irish folk songs
Irish rebel songs
Year of song unknown
Songwriter unknown
|
```objective-c
/*
Simple DirectMedia Layer
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
/**
* \file SDL_rwops.h
*
* This file provides a general interface for SDL to read and write
* data streams. It can easily be extended to files, memory, etc.
*/
#ifndef SDL_rwops_h_
#define SDL_rwops_h_
#include "SDL_stdinc.h"
#include "SDL_error.h"
#include "begin_code.h"
/* Set up for C function definitions, even when using C++ */
#ifdef __cplusplus
extern "C" {
#endif
/* RWops Types */
#define SDL_RWOPS_UNKNOWN 0U /**< Unknown stream type */
#define SDL_RWOPS_WINFILE 1U /**< Win32 file */
#define SDL_RWOPS_STDFILE 2U /**< Stdio file */
#define SDL_RWOPS_JNIFILE 3U /**< Android asset */
#define SDL_RWOPS_MEMORY 4U /**< Memory stream */
#define SDL_RWOPS_MEMORY_RO 5U /**< Read-Only memory stream */
#if defined(__VITA__)
#define SDL_RWOPS_VITAFILE 6U /**< Vita file */
#endif
/**
* This is the read/write operation structure -- very basic.
*/
typedef struct SDL_RWops
{
/**
* Return the size of the file in this rwops, or -1 if unknown
*/
Sint64 (SDLCALL * size) (struct SDL_RWops * context);
/**
* Seek to \c offset relative to \c whence, one of stdio's whence values:
* RW_SEEK_SET, RW_SEEK_CUR, RW_SEEK_END
*
* \return the final offset in the data stream, or -1 on error.
*/
Sint64 (SDLCALL * seek) (struct SDL_RWops * context, Sint64 offset,
int whence);
/**
* Read up to \c maxnum objects each of size \c size from the data
* stream to the area pointed at by \c ptr.
*
* \return the number of objects read, or 0 at error or end of file.
*/
size_t (SDLCALL * read) (struct SDL_RWops * context, void *ptr,
size_t size, size_t maxnum);
/**
* Write exactly \c num objects each of size \c size from the area
* pointed at by \c ptr to data stream.
*
* \return the number of objects written, or 0 at error or end of file.
*/
size_t (SDLCALL * write) (struct SDL_RWops * context, const void *ptr,
size_t size, size_t num);
/**
* Close and free an allocated SDL_RWops structure.
*
* \return 0 if successful or -1 on write error when flushing data.
*/
int (SDLCALL * close) (struct SDL_RWops * context);
Uint32 type;
union
{
#if defined(__ANDROID__)
struct
{
void *asset;
} androidio;
#elif defined(__WIN32__)
struct
{
SDL_bool append;
void *h;
struct
{
void *data;
size_t size;
size_t left;
} buffer;
} windowsio;
#elif defined(__VITA__)
struct
{
int h;
struct
{
void *data;
size_t size;
size_t left;
} buffer;
} vitaio;
#endif
#ifdef HAVE_STDIO_H
struct
{
SDL_bool autoclose;
FILE *fp;
} stdio;
#endif
struct
{
Uint8 *base;
Uint8 *here;
Uint8 *stop;
} mem;
struct
{
void *data1;
void *data2;
} unknown;
} hidden;
} SDL_RWops;
/**
* \name RWFrom functions
*
* Functions to create SDL_RWops structures from various data streams.
*/
/* @{ */
/**
* Use this function to create a new SDL_RWops structure for reading from
* and/or writing to a named file.
*
* The `mode` string is treated roughly the same as in a call to the C
* library's fopen(), even if SDL doesn't happen to use fopen() behind the
* scenes.
*
* Available `mode` strings:
*
* - "r": Open a file for reading. The file must exist.
* - "w": Create an empty file for writing. If a file with the same name
* already exists its content is erased and the file is treated as a new
* empty file.
* - "a": Append to a file. Writing operations append data at the end of the
* file. The file is created if it does not exist.
* - "r+": Open a file for update both reading and writing. The file must
* exist.
* - "w+": Create an empty file for both reading and writing. If a file with
* the same name already exists its content is erased and the file is
* treated as a new empty file.
* - "a+": Open a file for reading and appending. All writing operations are
* performed at the end of the file, protecting the previous content to be
* overwritten. You can reposition (fseek, rewind) the internal pointer to
* anywhere in the file for reading, but writing operations will move it
* back to the end of file. The file is created if it does not exist.
*
* **NOTE**: In order to open a file as a binary file, a "b" character has to
* be included in the `mode` string. This additional "b" character can either
* be appended at the end of the string (thus making the following compound
* modes: "rb", "wb", "ab", "r+b", "w+b", "a+b") or be inserted between the
* letter and the "+" sign for the mixed modes ("rb+", "wb+", "ab+").
* Additional characters may follow the sequence, although they should have no
* effect. For example, "t" is sometimes appended to make explicit the file is
* a text file.
*
* This function supports Unicode filenames, but they must be encoded in UTF-8
* format, regardless of the underlying operating system.
*
* As a fallback, SDL_RWFromFile() will transparently open a matching filename
* in an Android app's `assets`.
*
* Closing the SDL_RWops will close the file handle SDL is holding internally.
*
* \param file a UTF-8 string representing the filename to open
* \param mode an ASCII string representing the mode to be used for opening
* the file.
* \returns a pointer to the SDL_RWops structure that is created, or NULL on
* failure; call SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_RWclose
* \sa SDL_RWFromConstMem
* \sa SDL_RWFromFP
* \sa SDL_RWFromMem
* \sa SDL_RWread
* \sa SDL_RWseek
* \sa SDL_RWtell
* \sa SDL_RWwrite
*/
extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFile(const char *file,
const char *mode);
#ifdef HAVE_STDIO_H
extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP(FILE * fp, SDL_bool autoclose);
#else
/**
* Use this function to create an SDL_RWops structure from a standard I/O file
* pointer (stdio.h's `FILE*`).
*
* This function is not available on Windows, since files opened in an
* application on that platform cannot be used by a dynamically linked
* library.
*
* On some platforms, the first parameter is a `void*`, on others, it's a
* `FILE*`, depending on what system headers are available to SDL. It is
* always intended to be the `FILE*` type from the C runtime's stdio.h.
*
* \param fp the `FILE*` that feeds the SDL_RWops stream
* \param autoclose SDL_TRUE to close the `FILE*` when closing the SDL_RWops,
* SDL_FALSE to leave the `FILE*` open when the RWops is
* closed
* \returns a pointer to the SDL_RWops structure that is created, or NULL on
* failure; call SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_RWclose
* \sa SDL_RWFromConstMem
* \sa SDL_RWFromFile
* \sa SDL_RWFromMem
* \sa SDL_RWread
* \sa SDL_RWseek
* \sa SDL_RWtell
* \sa SDL_RWwrite
*/
extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP(void * fp,
SDL_bool autoclose);
#endif
/**
* Use this function to prepare a read-write memory buffer for use with
* SDL_RWops.
*
* This function sets up an SDL_RWops struct based on a memory area of a
* certain size, for both read and write access.
*
* This memory buffer is not copied by the RWops; the pointer you provide must
* remain valid until you close the stream. Closing the stream will not free
* the original buffer.
*
* If you need to make sure the RWops never writes to the memory buffer, you
* should use SDL_RWFromConstMem() with a read-only buffer of memory instead.
*
* \param mem a pointer to a buffer to feed an SDL_RWops stream
* \param size the buffer size, in bytes
* \returns a pointer to a new SDL_RWops structure, or NULL if it fails; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_RWclose
* \sa SDL_RWFromConstMem
* \sa SDL_RWFromFile
* \sa SDL_RWFromFP
* \sa SDL_RWFromMem
* \sa SDL_RWread
* \sa SDL_RWseek
* \sa SDL_RWtell
* \sa SDL_RWwrite
*/
extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromMem(void *mem, int size);
/**
* Use this function to prepare a read-only memory buffer for use with RWops.
*
* This function sets up an SDL_RWops struct based on a memory area of a
* certain size. It assumes the memory area is not writable.
*
* Attempting to write to this RWops stream will report an error without
* writing to the memory buffer.
*
* This memory buffer is not copied by the RWops; the pointer you provide must
* remain valid until you close the stream. Closing the stream will not free
* the original buffer.
*
* If you need to write to a memory buffer, you should use SDL_RWFromMem()
* with a writable buffer of memory instead.
*
* \param mem a pointer to a read-only buffer to feed an SDL_RWops stream
* \param size the buffer size, in bytes
* \returns a pointer to a new SDL_RWops structure, or NULL if it fails; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_RWclose
* \sa SDL_RWFromConstMem
* \sa SDL_RWFromFile
* \sa SDL_RWFromFP
* \sa SDL_RWFromMem
* \sa SDL_RWread
* \sa SDL_RWseek
* \sa SDL_RWtell
*/
extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromConstMem(const void *mem,
int size);
/* @} *//* RWFrom functions */
/**
* Use this function to allocate an empty, unpopulated SDL_RWops structure.
*
* Applications do not need to use this function unless they are providing
* their own SDL_RWops implementation. If you just need a SDL_RWops to
* read/write a common data source, you should use the built-in
* implementations in SDL, like SDL_RWFromFile() or SDL_RWFromMem(), etc.
*
* You must free the returned pointer with SDL_FreeRW(). Depending on your
* operating system and compiler, there may be a difference between the
* malloc() and free() your program uses and the versions SDL calls
* internally. Trying to mix the two can cause crashing such as segmentation
* faults. Since all SDL_RWops must free themselves when their **close**
* method is called, all SDL_RWops must be allocated through this function, so
* they can all be freed correctly with SDL_FreeRW().
*
* \returns a pointer to the allocated memory on success, or NULL on failure;
* call SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_FreeRW
*/
extern DECLSPEC SDL_RWops *SDLCALL SDL_AllocRW(void);
/**
* Use this function to free an SDL_RWops structure allocated by
* SDL_AllocRW().
*
* Applications do not need to use this function unless they are providing
* their own SDL_RWops implementation. If you just need a SDL_RWops to
* read/write a common data source, you should use the built-in
* implementations in SDL, like SDL_RWFromFile() or SDL_RWFromMem(), etc, and
* call the **close** method on those SDL_RWops pointers when you are done
* with them.
*
* Only use SDL_FreeRW() on pointers returned by SDL_AllocRW(). The pointer is
* invalid as soon as this function returns. Any extra memory allocated during
* creation of the SDL_RWops is not freed by SDL_FreeRW(); the programmer must
* be responsible for managing that memory in their **close** method.
*
* \param area the SDL_RWops structure to be freed
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_AllocRW
*/
extern DECLSPEC void SDLCALL SDL_FreeRW(SDL_RWops * area);
#define RW_SEEK_SET 0 /**< Seek from the beginning of data */
#define RW_SEEK_CUR 1 /**< Seek relative to current read point */
#define RW_SEEK_END 2 /**< Seek relative to the end of data */
/**
* Use this function to get the size of the data stream in an SDL_RWops.
*
* Prior to SDL 2.0.10, this function was a macro.
*
* \param context the SDL_RWops to get the size of the data stream from
* \returns the size of the data stream in the SDL_RWops on success, -1 if
* unknown or a negative error code on failure; call SDL_GetError()
* for more information.
*
* \since This function is available since SDL 2.0.10.
*/
extern DECLSPEC Sint64 SDLCALL SDL_RWsize(SDL_RWops *context);
/**
* Seek within an SDL_RWops data stream.
*
* This function seeks to byte `offset`, relative to `whence`.
*
* `whence` may be any of the following values:
*
* - `RW_SEEK_SET`: seek from the beginning of data
* - `RW_SEEK_CUR`: seek relative to current read point
* - `RW_SEEK_END`: seek relative to the end of data
*
* If this stream can not seek, it will return -1.
*
* SDL_RWseek() is actually a wrapper function that calls the SDL_RWops's
* `seek` method appropriately, to simplify application development.
*
* Prior to SDL 2.0.10, this function was a macro.
*
* \param context a pointer to an SDL_RWops structure
* \param offset an offset in bytes, relative to **whence** location; can be
* negative
* \param whence any of `RW_SEEK_SET`, `RW_SEEK_CUR`, `RW_SEEK_END`
* \returns the final offset in the data stream after the seek or -1 on error.
*
* \since This function is available since SDL 2.0.10.
*
* \sa SDL_RWclose
* \sa SDL_RWFromConstMem
* \sa SDL_RWFromFile
* \sa SDL_RWFromFP
* \sa SDL_RWFromMem
* \sa SDL_RWread
* \sa SDL_RWtell
* \sa SDL_RWwrite
*/
extern DECLSPEC Sint64 SDLCALL SDL_RWseek(SDL_RWops *context,
Sint64 offset, int whence);
/**
* Determine the current read/write offset in an SDL_RWops data stream.
*
* SDL_RWtell is actually a wrapper function that calls the SDL_RWops's `seek`
* method, with an offset of 0 bytes from `RW_SEEK_CUR`, to simplify
* application development.
*
* Prior to SDL 2.0.10, this function was a macro.
*
* \param context a SDL_RWops data stream object from which to get the current
* offset
* \returns the current offset in the stream, or -1 if the information can not
* be determined.
*
* \since This function is available since SDL 2.0.10.
*
* \sa SDL_RWclose
* \sa SDL_RWFromConstMem
* \sa SDL_RWFromFile
* \sa SDL_RWFromFP
* \sa SDL_RWFromMem
* \sa SDL_RWread
* \sa SDL_RWseek
* \sa SDL_RWwrite
*/
extern DECLSPEC Sint64 SDLCALL SDL_RWtell(SDL_RWops *context);
/**
* Read from a data source.
*
* This function reads up to `maxnum` objects each of size `size` from the
* data source to the area pointed at by `ptr`. This function may read less
* objects than requested. It will return zero when there has been an error or
* the data stream is completely read.
*
* SDL_RWread() is actually a function wrapper that calls the SDL_RWops's
* `read` method appropriately, to simplify application development.
*
* Prior to SDL 2.0.10, this function was a macro.
*
* \param context a pointer to an SDL_RWops structure
* \param ptr a pointer to a buffer to read data into
* \param size the size of each object to read, in bytes
* \param maxnum the maximum number of objects to be read
* \returns the number of objects read, or 0 at error or end of file; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.10.
*
* \sa SDL_RWclose
* \sa SDL_RWFromConstMem
* \sa SDL_RWFromFile
* \sa SDL_RWFromFP
* \sa SDL_RWFromMem
* \sa SDL_RWseek
* \sa SDL_RWwrite
*/
extern DECLSPEC size_t SDLCALL SDL_RWread(SDL_RWops *context,
void *ptr, size_t size,
size_t maxnum);
/**
* Write to an SDL_RWops data stream.
*
* This function writes exactly `num` objects each of size `size` from the
* area pointed at by `ptr` to the stream. If this fails for any reason, it'll
* return less than `num` to demonstrate how far the write progressed. On
* success, it returns `num`.
*
* SDL_RWwrite is actually a function wrapper that calls the SDL_RWops's
* `write` method appropriately, to simplify application development.
*
* Prior to SDL 2.0.10, this function was a macro.
*
* \param context a pointer to an SDL_RWops structure
* \param ptr a pointer to a buffer containing data to write
* \param size the size of an object to write, in bytes
* \param num the number of objects to write
* \returns the number of objects written, which will be less than **num** on
* error; call SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.10.
*
* \sa SDL_RWclose
* \sa SDL_RWFromConstMem
* \sa SDL_RWFromFile
* \sa SDL_RWFromFP
* \sa SDL_RWFromMem
* \sa SDL_RWread
* \sa SDL_RWseek
*/
extern DECLSPEC size_t SDLCALL SDL_RWwrite(SDL_RWops *context,
const void *ptr, size_t size,
size_t num);
/**
* Close and free an allocated SDL_RWops structure.
*
* SDL_RWclose() closes and cleans up the SDL_RWops stream. It releases any
* resources used by the stream and frees the SDL_RWops itself with
* SDL_FreeRW(). This returns 0 on success, or -1 if the stream failed to
* flush to its output (e.g. to disk).
*
* Note that if this fails to flush the stream to disk, this function reports
* an error, but the SDL_RWops is still invalid once this function returns.
*
* Prior to SDL 2.0.10, this function was a macro.
*
* \param context SDL_RWops structure to close
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.10.
*
* \sa SDL_RWFromConstMem
* \sa SDL_RWFromFile
* \sa SDL_RWFromFP
* \sa SDL_RWFromMem
* \sa SDL_RWread
* \sa SDL_RWseek
* \sa SDL_RWwrite
*/
extern DECLSPEC int SDLCALL SDL_RWclose(SDL_RWops *context);
/**
* Load all the data from an SDL data stream.
*
* The data is allocated with a zero byte at the end (null terminated) for
* convenience. This extra byte is not included in the value reported via
* `datasize`.
*
* The data should be freed with SDL_free().
*
* \param src the SDL_RWops to read all available data from
* \param datasize if not NULL, will store the number of bytes read
* \param freesrc if non-zero, calls SDL_RWclose() on `src` before returning
* \returns the data, or NULL if there was an error.
*
* \since This function is available since SDL 2.0.6.
*/
extern DECLSPEC void *SDLCALL SDL_LoadFile_RW(SDL_RWops *src,
size_t *datasize,
int freesrc);
/**
* Load all the data from a file path.
*
* The data is allocated with a zero byte at the end (null terminated) for
* convenience. This extra byte is not included in the value reported via
* `datasize`.
*
* The data should be freed with SDL_free().
*
* Prior to SDL 2.0.10, this function was a macro wrapping around
* SDL_LoadFile_RW.
*
* \param file the path to read all available data from
* \param datasize if not NULL, will store the number of bytes read
* \returns the data, or NULL if there was an error.
*
* \since This function is available since SDL 2.0.10.
*/
extern DECLSPEC void *SDLCALL SDL_LoadFile(const char *file, size_t *datasize);
/**
* \name Read endian functions
*
* Read an item of the specified endianness and return in native format.
*/
/* @{ */
/**
* Use this function to read a byte from an SDL_RWops.
*
* \param src the SDL_RWops to read from
* \returns the read byte on success or 0 on failure; call SDL_GetError() for
* more information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_WriteU8
*/
extern DECLSPEC Uint8 SDLCALL SDL_ReadU8(SDL_RWops * src);
/**
* Use this function to read 16 bits of little-endian data from an SDL_RWops
* and return in native format.
*
* SDL byteswaps the data only if necessary, so the data returned will be in
* the native byte order.
*
* \param src the stream from which to read data
* \returns 16 bits of data in the native byte order of the platform.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_ReadBE16
*/
extern DECLSPEC Uint16 SDLCALL SDL_ReadLE16(SDL_RWops * src);
/**
* Use this function to read 16 bits of big-endian data from an SDL_RWops and
* return in native format.
*
* SDL byteswaps the data only if necessary, so the data returned will be in
* the native byte order.
*
* \param src the stream from which to read data
* \returns 16 bits of data in the native byte order of the platform.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_ReadLE16
*/
extern DECLSPEC Uint16 SDLCALL SDL_ReadBE16(SDL_RWops * src);
/**
* Use this function to read 32 bits of little-endian data from an SDL_RWops
* and return in native format.
*
* SDL byteswaps the data only if necessary, so the data returned will be in
* the native byte order.
*
* \param src the stream from which to read data
* \returns 32 bits of data in the native byte order of the platform.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_ReadBE32
*/
extern DECLSPEC Uint32 SDLCALL SDL_ReadLE32(SDL_RWops * src);
/**
* Use this function to read 32 bits of big-endian data from an SDL_RWops and
* return in native format.
*
* SDL byteswaps the data only if necessary, so the data returned will be in
* the native byte order.
*
* \param src the stream from which to read data
* \returns 32 bits of data in the native byte order of the platform.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_ReadLE32
*/
extern DECLSPEC Uint32 SDLCALL SDL_ReadBE32(SDL_RWops * src);
/**
* Use this function to read 64 bits of little-endian data from an SDL_RWops
* and return in native format.
*
* SDL byteswaps the data only if necessary, so the data returned will be in
* the native byte order.
*
* \param src the stream from which to read data
* \returns 64 bits of data in the native byte order of the platform.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_ReadBE64
*/
extern DECLSPEC Uint64 SDLCALL SDL_ReadLE64(SDL_RWops * src);
/**
* Use this function to read 64 bits of big-endian data from an SDL_RWops and
* return in native format.
*
* SDL byteswaps the data only if necessary, so the data returned will be in
* the native byte order.
*
* \param src the stream from which to read data
* \returns 64 bits of data in the native byte order of the platform.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_ReadLE64
*/
extern DECLSPEC Uint64 SDLCALL SDL_ReadBE64(SDL_RWops * src);
/* @} *//* Read endian functions */
/**
* \name Write endian functions
*
* Write an item of native format to the specified endianness.
*/
/* @{ */
/**
* Use this function to write a byte to an SDL_RWops.
*
* \param dst the SDL_RWops to write to
* \param value the byte value to write
* \returns 1 on success or 0 on failure; call SDL_GetError() for more
* information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_ReadU8
*/
extern DECLSPEC size_t SDLCALL SDL_WriteU8(SDL_RWops * dst, Uint8 value);
/**
* Use this function to write 16 bits in native format to a SDL_RWops as
* little-endian data.
*
* SDL byteswaps the data only if necessary, so the application always
* specifies native format, and the data written will be in little-endian
* format.
*
* \param dst the stream to which data will be written
* \param value the data to be written, in native format
* \returns 1 on successful write, 0 on error.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_WriteBE16
*/
extern DECLSPEC size_t SDLCALL SDL_WriteLE16(SDL_RWops * dst, Uint16 value);
/**
* Use this function to write 16 bits in native format to a SDL_RWops as
* big-endian data.
*
* SDL byteswaps the data only if necessary, so the application always
* specifies native format, and the data written will be in big-endian format.
*
* \param dst the stream to which data will be written
* \param value the data to be written, in native format
* \returns 1 on successful write, 0 on error.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_WriteLE16
*/
extern DECLSPEC size_t SDLCALL SDL_WriteBE16(SDL_RWops * dst, Uint16 value);
/**
* Use this function to write 32 bits in native format to a SDL_RWops as
* little-endian data.
*
* SDL byteswaps the data only if necessary, so the application always
* specifies native format, and the data written will be in little-endian
* format.
*
* \param dst the stream to which data will be written
* \param value the data to be written, in native format
* \returns 1 on successful write, 0 on error.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_WriteBE32
*/
extern DECLSPEC size_t SDLCALL SDL_WriteLE32(SDL_RWops * dst, Uint32 value);
/**
* Use this function to write 32 bits in native format to a SDL_RWops as
* big-endian data.
*
* SDL byteswaps the data only if necessary, so the application always
* specifies native format, and the data written will be in big-endian format.
*
* \param dst the stream to which data will be written
* \param value the data to be written, in native format
* \returns 1 on successful write, 0 on error.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_WriteLE32
*/
extern DECLSPEC size_t SDLCALL SDL_WriteBE32(SDL_RWops * dst, Uint32 value);
/**
* Use this function to write 64 bits in native format to a SDL_RWops as
* little-endian data.
*
* SDL byteswaps the data only if necessary, so the application always
* specifies native format, and the data written will be in little-endian
* format.
*
* \param dst the stream to which data will be written
* \param value the data to be written, in native format
* \returns 1 on successful write, 0 on error.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_WriteBE64
*/
extern DECLSPEC size_t SDLCALL SDL_WriteLE64(SDL_RWops * dst, Uint64 value);
/**
* Use this function to write 64 bits in native format to a SDL_RWops as
* big-endian data.
*
* SDL byteswaps the data only if necessary, so the application always
* specifies native format, and the data written will be in big-endian format.
*
* \param dst the stream to which data will be written
* \param value the data to be written, in native format
* \returns 1 on successful write, 0 on error.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_WriteLE64
*/
extern DECLSPEC size_t SDLCALL SDL_WriteBE64(SDL_RWops * dst, Uint64 value);
/* @} *//* Write endian functions */
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
}
#endif
#include "close_code.h"
#endif /* SDL_rwops_h_ */
/* vi: set ts=4 sw=4 expandtab: */
```
|
```objective-c
/* your_sha256_hash------------ */
/* Atmel Microcontroller Software Support */
/* your_sha256_hash------------ */
/* */
/* All rights reserved. */
/* */
/* Redistribution and use in source and binary forms, with or without */
/* modification, are permitted provided that the following condition is met: */
/* */
/* - Redistributions of source code must retain the above copyright notice, */
/* this list of conditions and the disclaimer below. */
/* */
/* Atmel's name may not be used to endorse or promote products derived from */
/* this software without specific prior written permission. */
/* */
/* DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR */
/* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE */
/* DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, */
/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */
/* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */
/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */
/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, */
/* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
/* your_sha256_hash------------ */
#ifndef _SAM3XA_HSMCI_INSTANCE_
#define _SAM3XA_HSMCI_INSTANCE_
/* ========== Register definition for HSMCI peripheral ========== */
#if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
#define REG_HSMCI_CR (0x40000000U) /**< \brief (HSMCI) Control Register */
#define REG_HSMCI_MR (0x40000004U) /**< \brief (HSMCI) Mode Register */
#define REG_HSMCI_DTOR (0x40000008U) /**< \brief (HSMCI) Data Timeout Register */
#define REG_HSMCI_SDCR (0x4000000CU) /**< \brief (HSMCI) SD/SDIO Card Register */
#define REG_HSMCI_ARGR (0x40000010U) /**< \brief (HSMCI) Argument Register */
#define REG_HSMCI_CMDR (0x40000014U) /**< \brief (HSMCI) Command Register */
#define REG_HSMCI_BLKR (0x40000018U) /**< \brief (HSMCI) Block Register */
#define REG_HSMCI_CSTOR (0x4000001CU) /**< \brief (HSMCI) Completion Signal Timeout Register */
#define REG_HSMCI_RSPR (0x40000020U) /**< \brief (HSMCI) Response Register */
#define REG_HSMCI_RDR (0x40000030U) /**< \brief (HSMCI) Receive Data Register */
#define REG_HSMCI_TDR (0x40000034U) /**< \brief (HSMCI) Transmit Data Register */
#define REG_HSMCI_SR (0x40000040U) /**< \brief (HSMCI) Status Register */
#define REG_HSMCI_IER (0x40000044U) /**< \brief (HSMCI) Interrupt Enable Register */
#define REG_HSMCI_IDR (0x40000048U) /**< \brief (HSMCI) Interrupt Disable Register */
#define REG_HSMCI_IMR (0x4000004CU) /**< \brief (HSMCI) Interrupt Mask Register */
#define REG_HSMCI_DMA (0x40000050U) /**< \brief (HSMCI) DMA Configuration Register */
#define REG_HSMCI_CFG (0x40000054U) /**< \brief (HSMCI) Configuration Register */
#define REG_HSMCI_WPMR (0x400000E4U) /**< \brief (HSMCI) Write Protection Mode Register */
#define REG_HSMCI_WPSR (0x400000E8U) /**< \brief (HSMCI) Write Protection Status Register */
#define REG_HSMCI_FIFO (0x40000200U) /**< \brief (HSMCI) FIFO Memory Aperture0 */
#else
#define REG_HSMCI_CR (*(__O uint32_t*)0x40000000U) /**< \brief (HSMCI) Control Register */
#define REG_HSMCI_MR (*(__IO uint32_t*)0x40000004U) /**< \brief (HSMCI) Mode Register */
#define REG_HSMCI_DTOR (*(__IO uint32_t*)0x40000008U) /**< \brief (HSMCI) Data Timeout Register */
#define REG_HSMCI_SDCR (*(__IO uint32_t*)0x4000000CU) /**< \brief (HSMCI) SD/SDIO Card Register */
#define REG_HSMCI_ARGR (*(__IO uint32_t*)0x40000010U) /**< \brief (HSMCI) Argument Register */
#define REG_HSMCI_CMDR (*(__O uint32_t*)0x40000014U) /**< \brief (HSMCI) Command Register */
#define REG_HSMCI_BLKR (*(__IO uint32_t*)0x40000018U) /**< \brief (HSMCI) Block Register */
#define REG_HSMCI_CSTOR (*(__IO uint32_t*)0x4000001CU) /**< \brief (HSMCI) Completion Signal Timeout Register */
#define REG_HSMCI_RSPR (*(__I uint32_t*)0x40000020U) /**< \brief (HSMCI) Response Register */
#define REG_HSMCI_RDR (*(__I uint32_t*)0x40000030U) /**< \brief (HSMCI) Receive Data Register */
#define REG_HSMCI_TDR (*(__O uint32_t*)0x40000034U) /**< \brief (HSMCI) Transmit Data Register */
#define REG_HSMCI_SR (*(__I uint32_t*)0x40000040U) /**< \brief (HSMCI) Status Register */
#define REG_HSMCI_IER (*(__O uint32_t*)0x40000044U) /**< \brief (HSMCI) Interrupt Enable Register */
#define REG_HSMCI_IDR (*(__O uint32_t*)0x40000048U) /**< \brief (HSMCI) Interrupt Disable Register */
#define REG_HSMCI_IMR (*(__I uint32_t*)0x4000004CU) /**< \brief (HSMCI) Interrupt Mask Register */
#define REG_HSMCI_DMA (*(__IO uint32_t*)0x40000050U) /**< \brief (HSMCI) DMA Configuration Register */
#define REG_HSMCI_CFG (*(__IO uint32_t*)0x40000054U) /**< \brief (HSMCI) Configuration Register */
#define REG_HSMCI_WPMR (*(__IO uint32_t*)0x400000E4U) /**< \brief (HSMCI) Write Protection Mode Register */
#define REG_HSMCI_WPSR (*(__I uint32_t*)0x400000E8U) /**< \brief (HSMCI) Write Protection Status Register */
#define REG_HSMCI_FIFO (*(__IO uint32_t*)0x40000200U) /**< \brief (HSMCI) FIFO Memory Aperture0 */
#endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
#endif /* _SAM3XA_HSMCI_INSTANCE_ */
```
|
The Index of Industrial Production (IIP) is an index for India which details out the growth of various sectors in an economy such as mineral mining, electricity and manufacturing. The all India IIP is a composite indicator that measures the short-term changes in the volume of production of a basket of industrial products during a given period with respect to that in a chosen base period. It is compiled and published monthly by the National Statistics Office (NSO), Ministry of Statistical and Programme Implementation six weeks after the reference month ends.
The level of the Index of Industrial Production (IIP) is an abstract number, the magnitude of which represents the status of production in the industrial sector for a given period of time as compared to a reference period of time. The base year was at one time fixed at 1993–94 so that year was assigned an index level of 100. The current base year is 2011-2012.
The Eight Core Industries comprise nearly 40.27% of the weight of items included in the Index of Industrial Production (IIP). These are Refinery products, Electricity, Steel, Coal, Crude oil, Natural gas, Cement and Fertilisers.(Arranged in descending order of their share).
The beginning
The first official attempt to compute the IIP was made much earlier than even the recommendations on the subject at the international level. The Office of the Economic Advisor, Ministry of Commerce and Industry made the first attempt of compilation and release of IIP with base year 1937, covering 15 important industries, accounting for more than 90 percent of the total production of the selected industries. The all-India IIP is being released as a monthly series since 1950. With the inception of the Central Statistical Organization in 1951, the responsibility for compilation and publication of IIP was vested with this office.
Successive revisions
As the structure of the industrial sector changes over time, it became necessary to revise the base year of the IIP periodically to capture the changing composition of industrial production and emergence of new products and services so as to measure the real growth of industrial sector (UNSO recommends quinquennial revision of the base year of IIP). After 1937, the successive revised base years were 1946, 1951, 1956, 1960, 1970, 1980–81 and 1993–94. Initially it was covering 15 industries comprising three broad categories: mining, manufacturing and electricity. The scope of the index was restricted to mining and manufacturing sectors consisting of 20 industries with 35 items, when the base year was shifted to 1946 by Economic Adviser, Ministry of Commerce & Industry and it was called Interim Index of Industrial Production. This index was discontinued in April 1956 due to certain shortcomings and was replaced by the revised index with 1951 as the base year covering 88 items, broadly categorised as mining & quarrying (2), manufacturing (17) and electricity (1) compiled by CSO. The items in this index were classified according to the International Standard Industrial Classification (ISIC) 1948 of all economic activities.
The index was revised in July 1962 to the base year 1956 as per the recommendations of a working group constituted by the CSO for the purpose and it had covered 201 items, classified according to the Standard Industrial and Occupational Classification of All Economic Activities published by the CSO in 1962. The index with 1960 as the base year was based on regular monthly series for 312 items and annual series for 436 items. Hence, though the published index was based on regular monthly series for 312 items, weights had been assigned for 436 items with a view to using the same set of weights for the regular monthly index as well as the annual index covering the additional items. However, the mineral index prepared by the IBM excluded gold, salt, petroleum and natural gas.
The next revised series of index numbers with 1970 as the base year, had taken into account of the structural changes occurred in industrial activity of the country since 1960 and this index was released in March 1975 covering 352 items comprising mining (61), manufacturing (290) and electricity (1). The working group (set up in 1978) under the Chairmanship of the then Director General of CSO, decided to shift the base to 1980–81, to reflect the changes that had taken place in the industrial structure and to accommodate the items from small-scale sector.
A notable feature of the revised 1980 index number series was the inclusion of 18 items from the SSI sector, for which the office of the Development Commissioner of Small-Scale Industries (DCSSI) could ensure regular supply of data. The production data for the small-scale sector were included only from the month of July 1984 onwards; prior to this the production data from the directorate general of technical development (DGTD) for large and medium industries alone had been used. For the period April 1981 to June 1984 in respect of these 18 items, average base year (1980–81) production as obtained from DGTD was used. From July 1984 onwards, combined average base year production both for DGTD and DCSSI products was used. The weights for these items were based on ASI 1980–1981 results and no separate weights for DGTD and DCSSI items were allocated in the 1980–81 series.
The next revision of IIP with 1993–94 as the base year containing 543 items (with the addition of 3 items for mining sector and 188 for the manufacturing sector) has come into existence on 27 May 1998 and ever since, the quick estimates of IIP are being released as per the norms set out for the IMF’s SDDS2, with a time lag of six weeks from the reference month. These quick estimates for a given month are revised twice in the subsequent months. To retain the distinctive character and enable the collection of data, the source agencies proposed clubbing of 478 items of the manufacturing sector into 285 item groups and thus making a total of 287 item groups together with one each of electricity and mining & quarrying. The revised series has followed the National Industrial Classification NIC-1987. Another important feature of the latest series is the inclusion of unorganised manufacturing sector (That is, the same 18 SSI products) along with organised sector for the first time in the weighting diagram.
Recent revision of IIP released by CSO with 2004–05 as the base year comprises 682 items. As per chief statistician T C A Anant, this index shall give a better picture of growth in various sectors of the economy, because it is broader and includes technologically advanced goods such as cell phones and iPods. The previous base year (1993–94) was not usable as the list contained an array of outdated items such as typewriters and tape recorders.
Weighted arithmetic mean of quantity relatives with weights being allotted to various items in proportion to value added by manufacture in the base year by using Laspeyres' formula:
where is the index, is the production relative of the ith item for the month in question and is the weight allotted to it.
See also
Industrial production index
References
https://web.archive.org/web/20120422084503/http://mospi.nic.in/mospi_new/upload/iip/IIP_main.htm?status=1&menu_id=89
https://web.archive.org/web/20111113205916/http://www.mospi.nic.in/mospi_new/upload/t2_new.pdf
Economic data
Industry in India
|
```smalltalk
#nullable disable
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ClosedXML.Excel
{
public interface IXLDrawingProtection
{
Boolean Locked { get; set; }
Boolean LockText { get; set; }
IXLDrawingStyle SetLocked(); IXLDrawingStyle SetLocked(Boolean value);
IXLDrawingStyle SetLockText(); IXLDrawingStyle SetLockText(Boolean value);
}
}
```
|
```python
import numpy as np
from keras.models import Model
from keras.layers import Input
from keras.layers.core import Dense
from keras import backend as K
import json
from collections import OrderedDict
```
```python
def format_decimal(arr, places=6):
return [round(x * 10**places) / 10**places for x in arr]
```
```python
DATA = OrderedDict()
```
```markdown
### Dense```
```markdown
**[core.Dense.0] test 1**```
```python
layer_0 = Input(shape=(6,))
layer_1 = Dense(2, activation='linear')(layer_0)
model = Model(inputs=layer_0, outputs=layer_1)
W = np.array([0.1, 0.4, 0.5, 0.1, 1, -2, 0, 0.3, 0.2, 0.1, 3, 0]).reshape((6, 2))
b = np.array([0.5, 0.7])
model.set_weights([W, b])
data_in = [0, 0.2, 0.5, -0.1, 1, 2]
data_in_shape = (6,)
print('in:', data_in)
print('in shape:', data_in_shape)
arr_in = np.array(data_in, dtype='float32').reshape(data_in_shape)
result = model.predict(np.array([arr_in]))
arr_out = result[0]
data_out_shape = arr_out.shape
print('out shape:', data_out_shape)
data_out = format_decimal(arr_out.ravel().tolist())
print('out:', data_out)
DATA['core.Dense.0'] = {
'input': {'data': data_in, 'shape': data_in_shape},
'weights': [{'data': format_decimal(w.ravel().tolist()), 'shape': w.shape} for w in [W, b]],
'expected': {'data': data_out, 'shape': data_out_shape}
}
```
```markdown
**[core.Dense.1] test 2 (with sigmoid activation)**```
```python
layer_0 = Input(shape=(6,))
layer_1 = Dense(2, activation='sigmoid')(layer_0)
model = Model(inputs=layer_0, outputs=layer_1)
W = np.array([0.1, 0.4, 0.5, 0.1, 1, -2, 0, 0.3, 0.2, 0.1, 3, 0]).reshape((6, 2))
b = np.array([0.5, 0.7])
model.set_weights([W, b])
data_in = [0, 0.2, 0.5, -0.1, 1, 2]
data_in_shape = (6,)
print('in:', data_in)
print('in shape:', data_in_shape)
arr_in = np.array(data_in, dtype='float32').reshape(data_in_shape)
result = model.predict(np.array([arr_in]))
arr_out = result[0]
data_out_shape = arr_out.shape
print('out shape:', data_out_shape)
data_out = format_decimal(arr_out.ravel().tolist())
print('out:', data_out)
DATA['core.Dense.1'] = {
'input': {'data': data_in, 'shape': data_in_shape},
'weights': [{'data': format_decimal(w.ravel().tolist()), 'shape': w.shape} for w in [W, b]],
'expected': {'data': data_out, 'shape': data_out_shape}
}
```
```markdown
**[core.Dense.2] test 3 (with softplus activation and no bias)**```
```python
layer_0 = Input(shape=(6,))
layer_1 = Dense(2, activation='softplus', use_bias=False)(layer_0)
model = Model(inputs=layer_0, outputs=layer_1)
W = np.array([0.1, 0.4, 0.5, 0.1, 1, -2, 0, 0.3, 0.2, 0.1, 3, 0]).reshape((6, 2))
model.set_weights([W])
data_in = [0, 0.2, 0.5, -0.1, 1, 2]
data_in_shape = (6,)
print('in:', data_in)
print('in shape:', data_in_shape)
arr_in = np.array(data_in, dtype='float32').reshape(data_in_shape)
result = model.predict(np.array([arr_in]))
arr_out = result[0]
data_out_shape = arr_out.shape
print('out shape:', data_out_shape)
data_out = format_decimal(arr_out.ravel().tolist())
print('out:', data_out)
DATA['core.Dense.2'] = {
'input': {'data': data_in, 'shape': data_in_shape},
'weights': [{'data': format_decimal(w.ravel().tolist()), 'shape': w.shape} for w in [W]],
'expected': {'data': data_out, 'shape': data_out_shape}
}
```
```markdown
**[core.Dense.3] [GPU] test 1**```
```python
layer_0 = Input(shape=(6,))
layer_1 = Dense(2, activation='linear')(layer_0)
model = Model(inputs=layer_0, outputs=layer_1)
W = np.array([0.1, 0.4, 0.5, 0.1, 1, -2, 0, 0.3, 0.2, 0.1, 3, 0]).reshape((6, 2))
b = np.array([0.5, 0.7])
model.set_weights([W, b])
data_in = [0, 0.2, 0.5, -0.1, 1, 2]
data_in_shape = (6,)
print('in:', data_in)
print('in shape:', data_in_shape)
arr_in = np.array(data_in, dtype='float32').reshape(data_in_shape)
result = model.predict(np.array([arr_in]))
arr_out = result[0]
data_out_shape = arr_out.shape
print('out shape:', data_out_shape)
data_out = format_decimal(arr_out.ravel().tolist())
print('out:', data_out)
DATA['core.Dense.3'] = {
'input': {'data': data_in, 'shape': data_in_shape},
'weights': [{'data': format_decimal(w.ravel().tolist()), 'shape': w.shape} for w in [W, b]],
'expected': {'data': data_out, 'shape': data_out_shape}
}
```
```markdown
**[core.Dense.4] [GPU] test 2 (with sigmoid activation)**```
```python
layer_0 = Input(shape=(6,))
layer_1 = Dense(2, activation='sigmoid')(layer_0)
model = Model(inputs=layer_0, outputs=layer_1)
W = np.array([0.1, 0.4, 0.5, 0.1, 1, -2, 0, 0.3, 0.2, 0.1, 3, 0]).reshape((6, 2))
b = np.array([0.5, 0.7])
model.set_weights([W, b])
data_in = [0, 0.2, 0.5, -0.1, 1, 2]
data_in_shape = (6,)
print('in:', data_in)
print('in shape:', data_in_shape)
arr_in = np.array(data_in, dtype='float32').reshape(data_in_shape)
result = model.predict(np.array([arr_in]))
arr_out = result[0]
data_out_shape = arr_out.shape
print('out shape:', data_out_shape)
data_out = format_decimal(arr_out.ravel().tolist())
print('out:', data_out)
DATA['core.Dense.4'] = {
'input': {'data': data_in, 'shape': data_in_shape},
'weights': [{'data': format_decimal(w.ravel().tolist()), 'shape': w.shape} for w in [W, b]],
'expected': {'data': data_out, 'shape': data_out_shape}
}
```
```markdown
**[core.Dense.5] [GPU] test 3 (with softplus activation and no bias)**```
```python
layer_0 = Input(shape=(6,))
layer_1 = Dense(2, activation='softplus', use_bias=False)(layer_0)
model = Model(inputs=layer_0, outputs=layer_1)
W = np.array([0.1, 0.4, 0.5, 0.1, 1, -2, 0, 0.3, 0.2, 0.1, 3, 0]).reshape((6, 2))
model.set_weights([W])
data_in = [0, 0.2, 0.5, -0.1, 1, 2]
data_in_shape = (6,)
print('in:', data_in)
print('in shape:', data_in_shape)
arr_in = np.array(data_in, dtype='float32').reshape(data_in_shape)
result = model.predict(np.array([arr_in]))
arr_out = result[0]
data_out_shape = arr_out.shape
print('out shape:', data_out_shape)
data_out = format_decimal(arr_out.ravel().tolist())
print('out:', data_out)
DATA['core.Dense.5'] = {
'input': {'data': data_in, 'shape': data_in_shape},
'weights': [{'data': format_decimal(w.ravel().tolist()), 'shape': w.shape} for w in [W]],
'expected': {'data': data_out, 'shape': data_out_shape}
}
```
```markdown
### export for Keras.js tests```
```python
import os
filename = '../../../test/data/layers/core/Dense.json'
if not os.path.exists(os.path.dirname(filename)):
os.makedirs(os.path.dirname(filename))
with open(filename, 'w') as f:
json.dump(DATA, f)
```
```python
json.dumps(DATA)
```
```python
```
|
```c++
#include "queryenvironment.h"
#include <vespa/searchlib/common/geo_location.h>
#include <vespa/searchlib/common/geo_location_spec.h>
#include <vespa/searchlib/common/geo_location_parser.h>
#include <vespa/log/log.h>
LOG_SETUP(".searchvisitor.queryenvironment");
using search::IAttributeManager;
using search::common::GeoLocationParser;
using search::common::GeoLocationSpec;
using search::fef::Properties;
using std::string;
namespace streaming {
namespace {
std::vector<GeoLocationSpec>
parseLocation(const string & location_str)
{
std::vector<GeoLocationSpec> fefLocations;
if (location_str.empty()) {
return fefLocations;
}
GeoLocationParser locationParser;
if (!locationParser.parseWithField(location_str)) {
LOG(warning, "Location parse error (location: '%s'): %s. Location ignored.",
location_str.c_str(), locationParser.getParseError());
return fefLocations;
}
auto loc = locationParser.getGeoLocation();
if (loc.has_point) {
fefLocations.push_back(GeoLocationSpec{locationParser.getFieldName(), loc});
}
return fefLocations;
}
}
QueryEnvironment::QueryEnvironment(const string & location_str,
const IndexEnvironment & indexEnv,
const Properties & properties,
const IAttributeManager * attrMgr) :
_indexEnv(indexEnv),
_properties(properties),
_attrCtx(std::make_unique<AttributeAccessRecorder>(attrMgr->createContext())),
_queryTerms(),
_locations(parseLocation(location_str))
{
}
QueryEnvironment::~QueryEnvironment() {}
void QueryEnvironment::addGeoLocation(const std::string &field, const std::string &location_str) {
GeoLocationParser locationParser;
if (! locationParser.parseNoField(location_str)) {
LOG(warning, "Location parse error (location: '%s'): %s. Location ignored.",
location_str.c_str(), locationParser.getParseError());
return;
}
auto loc = locationParser.getGeoLocation();
if (loc.has_point) {
_locations.push_back(GeoLocationSpec{field, loc});
}
}
QueryEnvironment::GeoLocationSpecPtrs
QueryEnvironment::getAllLocations() const
{
GeoLocationSpecPtrs retval;
for (const auto & loc : _locations) {
retval.push_back(&loc);
}
return retval;
}
} // namespace streaming
```
|
The 1927 Stanley Cup playoffs were held from March 29 to April 13, 1927, to determine the championship of the National Hockey League (NHL) and the Stanley Cup. In the first Stanley Cup Finals with two NHL teams, the Ottawa Senators defeated the Boston Bruins 2–0–2 in a best-of-five series.
Playoff format
With the collapse of the Western Hockey League, the Stanley Cup became the championship trophy of the NHL. The NHL teams now battled out amongst themselves for the coveted Cup. The new division alignment and the new playoff format also meant that an American team was guaranteed to be the first American NHL team to make the Cup Finals.
The division winners received a bye to the second round. The second-place and third-place finishers played a two-game, total-goals series to advance to the second round. The second-place Montreal Canadiens and Boston Bruins both advanced to the second round. The Canadiens lost to the first-place Ottawa Senators, while the Bruins upset the first-place New York Rangers to set up the Final. Ties were not broken using overtime. After two ties in the Final, NHL president Frank Calder capped the Final at four games and neither team won three games of the best-of-final. Ottawa won two to Boston's none and the series ended on April 13 with Ottawa the winner.
Playoff bracket
Quarterfinals
(C2) Montreal Canadiens vs. (C3) Montreal Maroons
(A2) Boston Bruins vs. (A3) Chicago Black Hawks
Game one of this series was played in New York.
Semifinals
(C1) Ottawa Senators vs. (C2) Montreal Canadiens
(A1) New York Rangers vs. (A2) Boston Bruins
Stanley Cup Finals
Playoff scoring leaders
Note: GP = Games played; G = Goals; A = Assists; Pts = Points
See also
1926–27 NHL season
References
playoffs
Stanley Cup playoffs
|
```linker script
/*
*
*/
#include <zephyr/devicetree.h>
/*
* SRAM base address and size
*/
#if DT_NODE_HAS_PROP(DT_CHOSEN(zephyr_sram), reg) && \
(DT_REG_SIZE(DT_CHOSEN(zephyr_sram)) > 0)
#define SRAM_START DT_REG_ADDR(DT_CHOSEN(zephyr_sram))
#define SRAM_SIZE DT_REG_SIZE(DT_CHOSEN(zephyr_sram))
#endif
/*
* flash base address and size
*/
#if DT_NODE_HAS_PROP(DT_CHOSEN(zephyr_flash), reg) && \
(DT_REG_SIZE(DT_CHOSEN(zephyr_flash)) > 0)
#define FLASH_START DT_REG_ADDR(DT_CHOSEN(zephyr_flash))
#define FLASH_SIZE DT_REG_SIZE(DT_CHOSEN(zephyr_flash))
#endif
#include <zephyr/arch/arc/v2/linker.ld>
```
|
The Samsung Galaxy J7 (2016) is an Android-based mid-range smartphone produced by Samsung Electronics in 2016 and is either based on the Qualcomm Snapdragon 615 or Exynos 7870 chipset.
Hardware
The Samsung Galaxy J7 comes with a removable back panel, metallic chrome diamond-designed frame and a metal-finish plastic back cover. On the front of the phone, there is a 5.5 inch screen with two capacitive buttons to switch between apps and a hardware home button just below the screen. Above the display, there is a 5-megapixel camera with an LED flash and a chrome grill covering the earpiece and sensors. It has a Samsung S5K3L2 CMOS image sensor.
On the right edge of the phone, there is a power button and there are volume keys on the left edge of the phone. There is a 3.5mm headphone jack and a micro-USB port at the bottom of the device. On the backside of the device, there is a slot for a microSD card and 2 slots for SIM cards and NFC chips with a 3300mAh battery concealed under a plastic rear cover.
Samsung Galaxy J7 has a HD Super AMOLED display with a resolution of 720×1280. The screen comes with scratch resistant glass, which according to Samsung is equivalent to Corning's Gorilla Glass 3.
Software
The Samsung Galaxy J7 (2016) comes with Android 6.0.1 Marshmallow and Samsung's TouchWiz user interface.
The phone then got an update to Android 7.0 Nougat with Samsung Experience 8.1.
In November 2018, the J7 (2016) got an update to Android 8.1.0 Oreo with Samsung Experience 9.5.
References
Samsung mobile phones
Samsung Galaxy
Mobile phones introduced in 2016
Discontinued smartphones
Mobile phones with user-replaceable battery
|
```yaml
---
# FIXME: Anything below in all-caps has it's value replaced by sed in the
# openshiftmasterscript.sh which is not ideal, we should fix that.
localmaster:
hosts:
localhost
vars:
ansible_connection: local
ansible_python_interpreter: /usr/bin/python2
openshift_is_containerized: False
openshift_client_binary: /usr/bin/oc
openshift_image_tag: "vVERSION"
openshift_web_console_image_name: "IMAGE_PREFIX/IMAGE_TYPE-web-console:vVERSION"
oreg_url: 'MASTER_OREG_URL'
openshift_master_default_subdomain: 'TEMPROUTERIP.nip.io'
# FIXME
# This should be type=infra, but we have to live with region=infra for now
# because of legacy reasons
openshift_router_selector: 'region=infra'
openshift_registry_selector: 'region=infra'
# No idea why this is a different data type, but it is
openshift_prometheus_node_selector: {'region': 'infra'}
# Set Azure specific data for hosted registry
openshift_hosted_registry_storage_provider: "azure_blob"
openshift_hosted_registry_storage_kind: "object"
openshift_hosted_registry_storage_azure_blob_accountname: 'REGISTRY_STORAGE_AZURE_ACCOUNTNAME'
openshift_hosted_registry_storage_azure_blob_accountkey: 'REGISTRY_STORAGE_AZURE_ACCOUNTKEY'
openshift_hosted_registry_storage_azure_blob_container: "registry"
openshift_hosted_registry_storage_azure_blob_realm: "core.windows.net"
# FIXME
#
# Hard code this for now.
#
# Currently the cluster state at deployment time does not have the nodes
# registered to the master with labels applied and ready to be queried
# against at the point in time in the deploy that the playbooks run. Also,
# the router replica count default "falls back" to 1 appropriately where as
# the registry replica logic does not. There was also discussion about if
# it's appropriate to do this with replicas == infra nodes because it's
# perfectly feasible to have an infra node count higher than the desired
# replicas.
#
# Revisit later (possibly a daemonset or $other)
openshift_hosted_router_replicas: 1
openshift_hosted_registry_replicas: 1
openshift_prometheus_state: "present"
openshift_prometheus_node_exporter_image_version: 'PROMETHEUS_EXPORTER_VERSION'
openshift_web_console_install: True
openshift_prometheus_image_prefix: "IMAGE_PREFIX/"
openshift_deployment_type: 'ANSIBLE_DEPLOY_TYPE'
ansible_service_broker_install: True
ansible_service_broker_image: {{`"{{ l_asb_default_images_dict[openshift_deployment_type] if openshift_deployment_type == 'origin' else l_asb_image_url }}"`}}
openshift_service_catalog_image: "IMAGE_PREFIX/IMAGE_TYPE-service-catalog:vVERSION"
openshift_master_etcd_urls: ["path_to_url"]
template_service_broker_image: "IMAGE_PREFIX/IMAGE_TYPE-template-service-broker:vVERSION"
# NOTE: This is redundant, but required to handle version skew between
# openshift-ansible in Origin and OCP
openshift_examples_content_version: "vSHORT_VER"
openshift_cockpit_deployer_prefix: "COCKPIT_PREFIX/"
openshift_cockpit_deployer_basename: "COCKPIT_BASENAME"
openshift_cockpit_deployer_version: "COCKPIT_VERSION"
# NOTE: Do not define openshift_hosted_router_replicas so that the task file
# router.yml inside the openshift_hosted role from openshift-ansible will
# autopopulate it using the openshift_hosted_router_selector and querying
# the number of infra nodes
# NOTE: The variables below are internal to openshift-ansible and we're
# providing them here to avoid the incurred cost of fact finding
openshift:
common:
config_base: /etc/origin/
examples_content_version: "vSHORT_VER"
master:
public_console_url: {{ print "https://" .ExternalMasterHostname ":8443/console" | quote }}
public_api_url: {{ print "https://" .ExternalMasterHostname ":8443" | quote }}
etcd_urls: ["path_to_url"] #FIXME: No longer needed as of openshift-ansible-3.9.22-1 but we're not on that version yet
node:
nodename: 'HOSTNAME'
oo_masters_to_config:
hosts:
localhost
```
|
```javascript
PR.registerLangHandler(PR.createSimpleLexer([["var pln",/^\$[\w-]+/,null,"$"]],[["pln",/^[\s=][<>][\s=]/],["lit",/^@[\w-]+/],["tag",/^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["com",/^\(:[\S\s]*?:\)/],["pln",/^[(),/;[\]{}]$/],["str",/^(?:"(?:[^"\\{]|\\[\S\s])*(?:"|$)|'(?:[^'\\{]|\\[\S\s])*(?:'|$))/,null,"\"'"],["kwd",/^(?:xquery|where|version|variable|union|typeswitch|treat|to|then|text|stable|sortby|some|self|schema|satisfies|returns|return|ref|processing-instruction|preceding-sibling|preceding|precedes|parent|only|of|node|namespace|module|let|item|intersect|instance|in|import|if|function|for|follows|following-sibling|following|external|except|every|else|element|descending|descendant-or-self|descendant|define|default|declare|comment|child|cast|case|before|attribute|assert|ascending|as|ancestor-or-self|ancestor|after|eq|order|by|or|and|schema-element|document-node|node|at)\b/],
["typ",/^(?:xs:yearMonthDuration|xs:unsignedLong|xs:time|xs:string|xs:short|xs:QName|xs:Name|xs:long|xs:integer|xs:int|xs:gYearMonth|xs:gYear|xs:gMonthDay|xs:gDay|xs:float|xs:duration|xs:double|xs:decimal|xs:dayTimeDuration|xs:dateTime|xs:date|xs:byte|xs:boolean|xs:anyURI|xf:yearMonthDuration)\b/,null],["fun pln",/^(?:xp:dereference|xinc:node-expand|xinc:link-references|xinc:link-expand|xhtml:restructure|xhtml:clean|xhtml:add-lists|xdmp:zip-manifest|xdmp:zip-get|xdmp:zip-create|xdmp:xquery-version|xdmp:word-convert|xdmp:with-namespaces|xdmp:version|xdmp:value|xdmp:user-roles|xdmp:user-last-login|xdmp:user|xdmp:url-encode|xdmp:url-decode|xdmp:uri-is-file|xdmp:uri-format|xdmp:uri-content-type|xdmp:unquote|xdmp:unpath|xdmp:triggers-database|xdmp:trace|xdmp:to-json|xdmp:tidy|xdmp:subbinary|xdmp:strftime|xdmp:spawn-in|xdmp:spawn|xdmp:sleep|xdmp:shutdown|xdmp:set-session-field|xdmp:set-response-encoding|xdmp:set-response-content-type|xdmp:set-response-code|xdmp:set-request-time-limit|xdmp:set|xdmp:servers|xdmp:server-status|xdmp:server-name|xdmp:server|xdmp:security-database|xdmp:security-assert|xdmp:schema-database|xdmp:save|xdmp:role-roles|xdmp:role|xdmp:rethrow|xdmp:restart|xdmp:request-timestamp|xdmp:request-status|xdmp:request-cancel|xdmp:request|xdmp:redirect-response|xdmp:random|xdmp:quote|xdmp:query-trace|xdmp:query-meters|xdmp:product-edition|xdmp:privilege-roles|xdmp:privilege|xdmp:pretty-print|xdmp:powerpoint-convert|xdmp:platform|xdmp:permission|xdmp:pdf-convert|xdmp:path|xdmp:octal-to-integer|xdmp:node-uri|xdmp:node-replace|xdmp:node-kind|xdmp:node-insert-child|xdmp:node-insert-before|xdmp:node-insert-after|xdmp:node-delete|xdmp:node-database|xdmp:mul64|xdmp:modules-root|xdmp:modules-database|xdmp:merging|xdmp:merge-cancel|xdmp:merge|xdmp:md5|xdmp:logout|xdmp:login|xdmp:log-level|xdmp:log|xdmp:lock-release|xdmp:lock-acquire|xdmp:load|xdmp:invoke-in|xdmp:invoke|xdmp:integer-to-octal|xdmp:integer-to-hex|xdmp:http-put|xdmp:http-post|xdmp:http-options|xdmp:http-head|xdmp:http-get|xdmp:http-delete|xdmp:hosts|xdmp:host-status|xdmp:host-name|xdmp:host|xdmp:hex-to-integer|xdmp:hash64|xdmp:hash32|xdmp:has-privilege|xdmp:groups|xdmp:group-serves|xdmp:group-servers|xdmp:group-name|xdmp:group-hosts|xdmp:group|xdmp:get-session-field-names|xdmp:get-session-field|xdmp:get-response-encoding|xdmp:get-response-code|xdmp:get-request-username|xdmp:get-request-user|xdmp:get-request-url|xdmp:get-request-protocol|xdmp:get-request-path|xdmp:get-request-method|xdmp:get-request-header-names|xdmp:get-request-header|xdmp:get-request-field-names|xdmp:get-request-field-filename|xdmp:get-request-field-content-type|xdmp:get-request-field|xdmp:get-request-client-certificate|xdmp:get-request-client-address|xdmp:get-request-body|xdmp:get-current-user|xdmp:get-current-roles|xdmp:get|xdmp:function-name|xdmp:function-module|xdmp:function|xdmp:from-json|xdmp:forests|xdmp:forest-status|xdmp:forest-restore|xdmp:forest-restart|xdmp:forest-name|xdmp:forest-delete|xdmp:forest-databases|xdmp:forest-counts|xdmp:forest-clear|xdmp:forest-backup|xdmp:forest|xdmp:filesystem-file|xdmp:filesystem-directory|xdmp:exists|xdmp:excel-convert|xdmp:eval-in|xdmp:eval|xdmp:estimate|xdmp:email|xdmp:element-content-type|xdmp:elapsed-time|xdmp:document-set-quality|xdmp:document-set-property|xdmp:document-set-properties|xdmp:document-set-permissions|xdmp:document-set-collections|xdmp:document-remove-properties|xdmp:document-remove-permissions|xdmp:document-remove-collections|xdmp:document-properties|xdmp:document-locks|xdmp:document-load|xdmp:document-insert|xdmp:document-get-quality|xdmp:document-get-properties|xdmp:document-get-permissions|xdmp:document-get-collections|xdmp:document-get|xdmp:document-forest|xdmp:document-delete|xdmp:document-add-properties|xdmp:document-add-permissions|xdmp:document-add-collections|xdmp:directory-properties|xdmp:directory-locks|xdmp:directory-delete|xdmp:directory-create|xdmp:directory|xdmp:diacritic-less|xdmp:describe|xdmp:default-permissions|xdmp:default-collections|xdmp:databases|xdmp:database-restore-validate|xdmp:database-restore-status|xdmp:database-restore-cancel|xdmp:database-restore|xdmp:database-name|xdmp:database-forests|xdmp:database-backup-validate|xdmp:database-backup-status|xdmp:database-backup-purge|xdmp:database-backup-cancel|xdmp:database-backup|xdmp:database|xdmp:collection-properties|xdmp:collection-locks|xdmp:collection-delete|xdmp:collation-canonical-uri|xdmp:castable-as|xdmp:can-grant-roles|xdmp:base64-encode|xdmp:base64-decode|xdmp:architecture|xdmp:apply|xdmp:amp-roles|xdmp:amp|xdmp:add64|xdmp:add-response-header|xdmp:access|trgr:trigger-set-recursive|trgr:trigger-set-permissions|trgr:trigger-set-name|trgr:trigger-set-module|trgr:trigger-set-event|trgr:trigger-set-description|trgr:trigger-remove-permissions|trgr:trigger-module|trgr:trigger-get-permissions|trgr:trigger-enable|trgr:trigger-disable|trgr:trigger-database-online-event|trgr:trigger-data-event|trgr:trigger-add-permissions|trgr:remove-trigger|trgr:property-content|trgr:pre-commit|trgr:post-commit|trgr:get-trigger-by-id|trgr:get-trigger|trgr:document-scope|trgr:document-content|trgr:directory-scope|trgr:create-trigger|trgr:collection-scope|trgr:any-property-content|thsr:set-entry|thsr:remove-term|thsr:remove-synonym|thsr:remove-entry|thsr:query-lookup|thsr:lookup|thsr:load|thsr:insert|thsr:expand|thsr:add-synonym|spell:suggest-detailed|spell:suggest|spell:remove-word|spell:make-dictionary|spell:load|spell:levenshtein-distance|spell:is-correct|spell:insert|spell:double-metaphone|spell:add-word|sec:users-collection|sec:user-set-roles|sec:user-set-password|sec:user-set-name|sec:user-set-description|sec:user-set-default-permissions|sec:user-set-default-collections|sec:user-remove-roles|sec:user-privileges|sec:user-get-roles|sec:user-get-description|sec:user-get-default-permissions|sec:user-get-default-collections|sec:user-doc-permissions|sec:user-doc-collections|sec:user-add-roles|sec:unprotect-collection|sec:uid-for-name|sec:set-realm|sec:security-version|sec:security-namespace|sec:security-installed|sec:security-collection|sec:roles-collection|sec:role-set-roles|sec:role-set-name|sec:role-set-description|sec:role-set-default-permissions|sec:role-set-default-collections|sec:role-remove-roles|sec:role-privileges|sec:role-get-roles|sec:role-get-description|sec:role-get-default-permissions|sec:role-get-default-collections|sec:role-doc-permissions|sec:role-doc-collections|sec:role-add-roles|sec:remove-user|sec:remove-role-from-users|sec:remove-role-from-role|sec:remove-role-from-privileges|sec:remove-role-from-amps|sec:remove-role|sec:remove-privilege|sec:remove-amp|sec:protect-collection|sec:privileges-collection|sec:privilege-set-roles|sec:privilege-set-name|sec:privilege-remove-roles|sec:privilege-get-roles|sec:privilege-add-roles|sec:priv-doc-permissions|sec:priv-doc-collections|sec:get-user-names|sec:get-unique-elem-id|sec:get-role-names|sec:get-role-ids|sec:get-privilege|sec:get-distinct-permissions|sec:get-collection|sec:get-amp|sec:create-user-with-role|sec:create-user|sec:create-role|sec:create-privilege|sec:create-amp|sec:collections-collection|sec:collection-set-permissions|sec:collection-remove-permissions|sec:collection-get-permissions|sec:collection-add-permissions|sec:check-admin|sec:amps-collection|sec:amp-set-roles|sec:amp-remove-roles|sec:amp-get-roles|sec:amp-doc-permissions|sec:amp-doc-collections|sec:amp-add-roles|search:unparse|search:suggest|search:snippet|search:search|search:resolve-nodes|search:resolve|search:remove-constraint|search:parse|search:get-default-options|search:estimate|search:check-options|prof:value|prof:reset|prof:report|prof:invoke|prof:eval|prof:enable|prof:disable|prof:allowed|ppt:clean|pki:template-set-request|pki:template-set-name|pki:template-set-key-type|pki:template-set-key-options|pki:template-set-description|pki:template-in-use|pki:template-get-version|pki:template-get-request|pki:template-get-name|pki:template-get-key-type|pki:template-get-key-options|pki:template-get-id|pki:template-get-description|pki:need-certificate|pki:is-temporary|pki:insert-trusted-certificates|pki:insert-template|pki:insert-signed-certificates|pki:insert-certificate-revocation-list|pki:get-trusted-certificate-ids|pki:get-template-ids|pki:get-template-certificate-authority|pki:get-template-by-name|pki:get-template|pki:get-pending-certificate-requests-xml|pki:get-pending-certificate-requests-pem|pki:get-pending-certificate-request|pki:get-certificates-for-template-xml|pki:get-certificates-for-template|pki:get-certificates|pki:get-certificate-xml|pki:get-certificate-pem|pki:get-certificate|pki:generate-temporary-certificate-if-necessary|pki:generate-temporary-certificate|pki:generate-template-certificate-authority|pki:generate-certificate-request|pki:delete-template|pki:delete-certificate|pki:create-template|pdf:make-toc|pdf:insert-toc-headers|pdf:get-toc|pdf:clean|p:status-transition|p:state-transition|p:remove|p:pipelines|p:insert|p:get-by-id|p:get|p:execute|p:create|p:condition|p:collection|p:action|ooxml:runs-merge|ooxml:package-uris|ooxml:package-parts-insert|ooxml:package-parts|msword:clean|mcgm:polygon|mcgm:point|mcgm:geospatial-query-from-elements|mcgm:geospatial-query|mcgm:circle|math:tanh|math:tan|math:sqrt|math:sinh|math:sin|math:pow|math:modf|math:log10|math:log|math:ldexp|math:frexp|math:fmod|math:floor|math:fabs|math:exp|math:cosh|math:cos|math:ceil|math:atan2|math:atan|math:asin|math:acos|map:put|map:map|map:keys|map:get|map:delete|map:count|map:clear|lnk:to|lnk:remove|lnk:insert|lnk:get|lnk:from|lnk:create|kml:polygon|kml:point|kml:interior-polygon|kml:geospatial-query-from-elements|kml:geospatial-query|kml:circle|kml:box|gml:polygon|gml:point|gml:interior-polygon|gml:geospatial-query-from-elements|gml:geospatial-query|gml:circle|gml:box|georss:point|georss:geospatial-query|georss:circle|geo:polygon|geo:point|geo:interior-polygon|geo:geospatial-query-from-elements|geo:geospatial-query|geo:circle|geo:box|fn:zero-or-one|fn:years-from-duration|fn:year-from-dateTime|fn:year-from-date|fn:upper-case|fn:unordered|fn:true|fn:translate|fn:trace|fn:tokenize|fn:timezone-from-time|fn:timezone-from-dateTime|fn:timezone-from-date|fn:sum|fn:subtract-dateTimes-yielding-yearMonthDuration|fn:subtract-dateTimes-yielding-dayTimeDuration|fn:substring-before|fn:substring-after|fn:substring|fn:subsequence|fn:string-to-codepoints|fn:string-pad|fn:string-length|fn:string-join|fn:string|fn:static-base-uri|fn:starts-with|fn:seconds-from-time|fn:seconds-from-duration|fn:seconds-from-dateTime|fn:round-half-to-even|fn:round|fn:root|fn:reverse|fn:resolve-uri|fn:resolve-QName|fn:replace|fn:remove|fn:QName|fn:prefix-from-QName|fn:position|fn:one-or-more|fn:number|fn:not|fn:normalize-unicode|fn:normalize-space|fn:node-name|fn:node-kind|fn:nilled|fn:namespace-uri-from-QName|fn:namespace-uri-for-prefix|fn:namespace-uri|fn:name|fn:months-from-duration|fn:month-from-dateTime|fn:month-from-date|fn:minutes-from-time|fn:minutes-from-duration|fn:minutes-from-dateTime|fn:min|fn:max|fn:matches|fn:lower-case|fn:local-name-from-QName|fn:local-name|fn:last|fn:lang|fn:iri-to-uri|fn:insert-before|fn:index-of|fn:in-scope-prefixes|fn:implicit-timezone|fn:idref|fn:id|fn:hours-from-time|fn:hours-from-duration|fn:hours-from-dateTime|fn:floor|fn:false|fn:expanded-QName|fn:exists|fn:exactly-one|fn:escape-uri|fn:escape-html-uri|fn:error|fn:ends-with|fn:encode-for-uri|fn:empty|fn:document-uri|fn:doc-available|fn:doc|fn:distinct-values|fn:distinct-nodes|fn:default-collation|fn:deep-equal|fn:days-from-duration|fn:day-from-dateTime|fn:day-from-date|fn:data|fn:current-time|fn:current-dateTime|fn:current-date|fn:count|fn:contains|fn:concat|fn:compare|fn:collection|fn:codepoints-to-string|fn:codepoint-equal|fn:ceiling|fn:boolean|fn:base-uri|fn:avg|fn:adjust-time-to-timezone|fn:adjust-dateTime-to-timezone|fn:adjust-date-to-timezone|fn:abs|feed:unsubscribe|feed:subscription|feed:subscribe|feed:request|feed:item|feed:description|excel:clean|entity:enrich|dom:set-pipelines|dom:set-permissions|dom:set-name|dom:set-evaluation-context|dom:set-domain-scope|dom:set-description|dom:remove-pipeline|dom:remove-permissions|dom:remove|dom:get|dom:evaluation-context|dom:domains|dom:domain-scope|dom:create|dom:configuration-set-restart-user|dom:configuration-set-permissions|dom:configuration-set-evaluation-context|dom:configuration-set-default-domain|dom:configuration-get|dom:configuration-create|dom:collection|dom:add-pipeline|dom:add-permissions|dls:retention-rules|dls:retention-rule-remove|dls:retention-rule-insert|dls:retention-rule|dls:purge|dls:node-expand|dls:link-references|dls:link-expand|dls:documents-query|dls:document-versions-query|dls:document-version-uri|dls:document-version-query|dls:document-version-delete|dls:document-version-as-of|dls:document-version|dls:document-update|dls:document-unmanage|dls:document-set-quality|dls:document-set-property|dls:document-set-properties|dls:document-set-permissions|dls:document-set-collections|dls:document-retention-rules|dls:document-remove-properties|dls:document-remove-permissions|dls:document-remove-collections|dls:document-purge|dls:document-manage|dls:document-is-managed|dls:document-insert-and-manage|dls:document-include-query|dls:document-history|dls:document-get-permissions|dls:document-extract-part|dls:document-delete|dls:document-checkout-status|dls:document-checkout|dls:document-checkin|dls:document-add-properties|dls:document-add-permissions|dls:document-add-collections|dls:break-checkout|dls:author-query|dls:as-of-query|dbk:convert|dbg:wait|dbg:value|dbg:stopped|dbg:stop|dbg:step|dbg:status|dbg:stack|dbg:out|dbg:next|dbg:line|dbg:invoke|dbg:function|dbg:finish|dbg:expr|dbg:eval|dbg:disconnect|dbg:detach|dbg:continue|dbg:connect|dbg:clear|dbg:breakpoints|dbg:break|dbg:attached|dbg:attach|cvt:save-converted-documents|cvt:part-uri|cvt:destination-uri|cvt:basepath|cvt:basename|cts:words|cts:word-query-weight|cts:word-query-text|cts:word-query-options|cts:word-query|cts:word-match|cts:walk|cts:uris|cts:uri-match|cts:train|cts:tokenize|cts:thresholds|cts:stem|cts:similar-query-weight|cts:similar-query-nodes|cts:similar-query|cts:shortest-distance|cts:search|cts:score|cts:reverse-query-weight|cts:reverse-query-nodes|cts:reverse-query|cts:remainder|cts:registered-query-weight|cts:registered-query-options|cts:registered-query-ids|cts:registered-query|cts:register|cts:query|cts:quality|cts:properties-query-query|cts:properties-query|cts:polygon-vertices|cts:polygon|cts:point-longitude|cts:point-latitude|cts:point|cts:or-query-queries|cts:or-query|cts:not-query-weight|cts:not-query-query|cts:not-query|cts:near-query-weight|cts:near-query-queries|cts:near-query-options|cts:near-query-distance|cts:near-query|cts:highlight|cts:geospatial-co-occurrences|cts:frequency|cts:fitness|cts:field-words|cts:field-word-query-weight|cts:field-word-query-text|cts:field-word-query-options|cts:field-word-query-field-name|cts:field-word-query|cts:field-word-match|cts:entity-highlight|cts:element-words|cts:element-word-query-weight|cts:element-word-query-text|cts:element-word-query-options|cts:element-word-query-element-name|cts:element-word-query|cts:element-word-match|cts:element-values|cts:element-value-ranges|cts:element-value-query-weight|cts:element-value-query-text|cts:element-value-query-options|cts:element-value-query-element-name|cts:element-value-query|cts:element-value-match|cts:element-value-geospatial-co-occurrences|cts:element-value-co-occurrences|cts:element-range-query-weight|cts:element-range-query-value|cts:element-range-query-options|cts:element-range-query-operator|cts:element-range-query-element-name|cts:element-range-query|cts:element-query-query|cts:element-query-element-name|cts:element-query|cts:element-pair-geospatial-values|cts:element-pair-geospatial-value-match|cts:element-pair-geospatial-query-weight|cts:element-pair-geospatial-query-region|cts:element-pair-geospatial-query-options|cts:element-pair-geospatial-query-longitude-name|cts:element-pair-geospatial-query-latitude-name|cts:element-pair-geospatial-query-element-name|cts:element-pair-geospatial-query|cts:element-pair-geospatial-boxes|cts:element-geospatial-values|cts:element-geospatial-value-match|cts:element-geospatial-query-weight|cts:element-geospatial-query-region|cts:element-geospatial-query-options|cts:element-geospatial-query-element-name|cts:element-geospatial-query|cts:element-geospatial-boxes|cts:element-child-geospatial-values|cts:element-child-geospatial-value-match|cts:element-child-geospatial-query-weight|cts:element-child-geospatial-query-region|cts:element-child-geospatial-query-options|cts:element-child-geospatial-query-element-name|cts:element-child-geospatial-query-child-name|cts:element-child-geospatial-query|cts:element-child-geospatial-boxes|cts:element-attribute-words|cts:element-attribute-word-query-weight|cts:element-attribute-word-query-text|cts:element-attribute-word-query-options|cts:element-attribute-word-query-element-name|cts:element-attribute-word-query-attribute-name|cts:element-attribute-word-query|cts:element-attribute-word-match|cts:element-attribute-values|cts:element-attribute-value-ranges|cts:element-attribute-value-query-weight|cts:element-attribute-value-query-text|cts:element-attribute-value-query-options|cts:element-attribute-value-query-element-name|cts:element-attribute-value-query-attribute-name|cts:element-attribute-value-query|cts:element-attribute-value-match|cts:element-attribute-value-geospatial-co-occurrences|cts:element-attribute-value-co-occurrences|cts:element-attribute-range-query-weight|cts:element-attribute-range-query-value|cts:element-attribute-range-query-options|cts:element-attribute-range-query-operator|cts:element-attribute-range-query-element-name|cts:element-attribute-range-query-attribute-name|cts:element-attribute-range-query|cts:element-attribute-pair-geospatial-values|cts:element-attribute-pair-geospatial-value-match|cts:element-attribute-pair-geospatial-query-weight|cts:element-attribute-pair-geospatial-query-region|cts:element-attribute-pair-geospatial-query-options|cts:element-attribute-pair-geospatial-query-longitude-name|cts:element-attribute-pair-geospatial-query-latitude-name|cts:element-attribute-pair-geospatial-query-element-name|cts:element-attribute-pair-geospatial-query|cts:element-attribute-pair-geospatial-boxes|cts:document-query-uris|cts:document-query|cts:distance|cts:directory-query-uris|cts:directory-query-depth|cts:directory-query|cts:destination|cts:deregister|cts:contains|cts:confidence|cts:collections|cts:collection-query-uris|cts:collection-query|cts:collection-match|cts:classify|cts:circle-radius|cts:circle-center|cts:circle|cts:box-west|cts:box-south|cts:box-north|cts:box-east|cts:box|cts:bearing|cts:arc-intersection|cts:and-query-queries|cts:and-query-options|cts:and-query|cts:and-not-query-positive-query|cts:and-not-query-negative-query|cts:and-not-query|css:get|css:convert|cpf:success|cpf:failure|cpf:document-set-state|cpf:document-set-processing-status|cpf:document-set-last-updated|cpf:document-set-error|cpf:document-get-state|cpf:document-get-processing-status|cpf:document-get-last-updated|cpf:document-get-error|cpf:check-transition|alert:spawn-matching-actions|alert:rule-user-id-query|alert:rule-set-user-id|alert:rule-set-query|alert:rule-set-options|alert:rule-set-name|alert:rule-set-description|alert:rule-set-action|alert:rule-remove|alert:rule-name-query|alert:rule-insert|alert:rule-id-query|alert:rule-get-user-id|alert:rule-get-query|alert:rule-get-options|alert:rule-get-name|alert:rule-get-id|alert:rule-get-description|alert:rule-get-action|alert:rule-action-query|alert:remove-triggers|alert:make-rule|alert:make-log-action|alert:make-config|alert:make-action|alert:invoke-matching-actions|alert:get-my-rules|alert:get-all-rules|alert:get-actions|alert:find-matching-rules|alert:create-triggers|alert:config-set-uri|alert:config-set-trigger-ids|alert:config-set-options|alert:config-set-name|alert:config-set-description|alert:config-set-cpf-domain-names|alert:config-set-cpf-domain-ids|alert:config-insert|alert:config-get-uri|alert:config-get-trigger-ids|alert:config-get-options|alert:config-get-name|alert:config-get-id|alert:config-get-description|alert:config-get-cpf-domain-names|alert:config-get-cpf-domain-ids|alert:config-get|alert:config-delete|alert:action-set-options|alert:action-set-name|alert:action-set-module-root|alert:action-set-module-db|alert:action-set-module|alert:action-set-description|alert:action-remove|alert:action-insert|alert:action-get-options|alert:action-get-name|alert:action-get-module-root|alert:action-get-module-db|alert:action-get-module|alert:action-get-description|zero-or-one|years-from-duration|year-from-dateTime|year-from-date|upper-case|unordered|true|translate|trace|tokenize|timezone-from-time|timezone-from-dateTime|timezone-from-date|sum|subtract-dateTimes-yielding-yearMonthDuration|subtract-dateTimes-yielding-dayTimeDuration|substring-before|substring-after|substring|subsequence|string-to-codepoints|string-pad|string-length|string-join|string|static-base-uri|starts-with|seconds-from-time|seconds-from-duration|seconds-from-dateTime|round-half-to-even|round|root|reverse|resolve-uri|resolve-QName|replace|remove|QName|prefix-from-QName|position|one-or-more|number|not|normalize-unicode|normalize-space|node-name|node-kind|nilled|namespace-uri-from-QName|namespace-uri-for-prefix|namespace-uri|name|months-from-duration|month-from-dateTime|month-from-date|minutes-from-time|minutes-from-duration|minutes-from-dateTime|min|max|matches|lower-case|local-name-from-QName|local-name|last|lang|iri-to-uri|insert-before|index-of|in-scope-prefixes|implicit-timezone|idref|id|hours-from-time|hours-from-duration|hours-from-dateTime|floor|false|expanded-QName|exists|exactly-one|escape-uri|escape-html-uri|error|ends-with|encode-for-uri|empty|document-uri|doc-available|doc|distinct-values|distinct-nodes|default-collation|deep-equal|days-from-duration|day-from-dateTime|day-from-date|data|current-time|current-dateTime|current-date|count|contains|concat|compare|collection|codepoints-to-string|codepoint-equal|ceiling|boolean|base-uri|avg|adjust-time-to-timezone|adjust-dateTime-to-timezone|adjust-date-to-timezone|abs)\b/],
["pln",/^[\w:-]+/],["pln",/^[\t\n\r \xa0]+/]]),["xq","xquery"]);
```
|
```c++
#include "common.h"
#include <pybind11/pybind11.h>
#include <SPlisHSPlasH/NonPressureForceBase.h>
#include <SPlisHSPlasH/XSPH.h>
namespace py = pybind11;
void XSPHModule(py::module m_sub) {
// ---------------------------------------
// XSPH
// ---------------------------------------
py::class_<SPH::XSPH, SPH::NonPressureForceBase>(m_sub, "XSPH")
.def_readwrite_static("FLUID_COEFFICIENT", &SPH::XSPH::FLUID_COEFFICIENT)
.def_readwrite_static("BOUNDARY_COEFFICIENT", &SPH::XSPH::BOUNDARY_COEFFICIENT)
.def(py::init<SPH::FluidModel*>());
}
```
|
Frank Leon "Doc" Kelker (December 9, 1913 – May 23, 2003) was an All-American college football end, college basketball player, and track star for Western Reserve, now known as Case Western Reserve University, from 1935 to 1937. Spanning high school and college, he played in 54 consecutive football games without a loss. As an African American, his athletic career ended after college as no professional sports had yet broken the color barrier.
Early years
Kelker was born in Woodville, Florida in 1913. He and his family moved north to Dover, Ohio in 1918.
High school
Kelker attended Dover High School in Dover, where he was described as "Mr. Everything," earning 14 varsity letters in football, basketball, baseball, and track. Doc was the first Ohio high school athlete to be named All-Ohio in both football and basketball in the same calendar year.
The Dover football team posted a combined 30–1 record the three seasons he played (1931–1933), including two wins over the Massillon Tigers, famously coached by Paul Brown. He was voted captain his senior year.
As a senior on the basketball team, he played an integral role in the team winning the 1933 Ohio basketball state championship.
As a member of the baseball squad in 1932 and 1933, Kelker's unofficial stats included a .521 batting average with 12 doubles, 7 triples, 5 home runs and 22 stolen bases. The team posted a combined record of 23–4, including a victory over state champion Warren.
In track as a ninth grader, he set the school record for the 100-yard dash at 9.9 seconds.
College
Kelker attended Western Reserve, now known as Case Western Reserve University, in Cleveland, earning nine varsity letters in football, basketball, and track.
During his college football career, the team went a combined 27–2–1, with victories over Cornell, West Virginia, Cincinnati, Bowling Green, Ohio, Toledo, and Akron. In Big Four Conference league play, the team was a perfect 9-0, winning all three titles against John Carroll, Baldwin Wallace, and Case Tech.
The 1937 basketball team went 11-3, including wins over Syracuse, Cincinnati, and Dayton.
Later years
After graduation, Kelker first became a cadet teacher and assistant coach at Cleveland's Central High School, working there for two years. In 1940, he began working at the Cedar Avenue Branch of the Cleveland YMCA as a youth secretary where he served as mentor for many black youths, most notably Louis and Carl Stokes. in 1950, Kelker moved to Kansas City to take the role of executive secretary at the Paseo Branch YMCA. He returned to Cleveland in 1956 to lead as the executive secretary of the Cedar Avenue Branch of the Cleveland YMCA. Kelker also served as a founding trustee and board chair of Cuyahoga Community College.
Legacy
The Frank "Doc" Kelker Scholarship is given annually at Case Western Reserve University to an undergraduate to "remove the barriers between young scholars and their potential".
References
External links
Frank "Doc" Kelker Scholarship
1913 births
2003 deaths
American football ends
American men's basketball players
Case Western Spartans football players
Case Western Spartans men's basketball players
College men's track and field athletes in the United States
YMCA leaders
People from Dover, Ohio
People from Leon County, Florida
Players of American football from Ohio
Basketball players from Ohio
Track and field athletes from Ohio
African-American players of American football
African-American basketball players
African-American male track and field athletes
|
A tympanum (plural, tympana; from Greek and Latin words meaning "drum") is the semi-circular or triangular decorative wall surface over an entrance, door or window, which is bounded by a lintel and an arch. It often contains pedimental sculpture or other imagery or ornaments. Many architectural styles include this element.
Alternatively, the tympanum may hold an inscription, or in modern times, a clock face.
History
In ancient Greek, Roman and Christian architecture, tympana of religious buildings often contain pedimental sculpture or mosaics with religious imagery. A tympanum over a doorway is very often the most important, or only, location for monumental sculpture on the outside of a building. In classical architecture, and in classicising styles from the Renaissance onwards, major examples are usually triangular; in Romanesque architecture, tympana more often has a semi-circular shape, or that of a thinner slice from the top of a circle, and in Gothic architecture they have a more vertical shape, coming to a point at the top. These shapes naturally influence the typical compositions of any sculpture within the tympanum.
The upper portion of a gable when enclosed with a horizontal belt course, is also termed a tympanum.
Bands of molding surrounding the tympanum are referred to as the archivolt.
In medieval French architecture the tympanum is often supported by a decorated pillar called a trumeau.
Gallery
See also
Lunette: semi-circular tympanum
Church architecture
Gable
Pediment
Portal
Citations
External links
Sculpted tympanums Chartres Cathedral, West Front, Central Portal
Tympanum of the last Judgment - western portal of the abbey-church of Saint Foy
Arches and vaults
Architectural elements
|
Archie "Hubbie" Turner (born January 25, 1946), sometimes known as "Hubbie" Mitchell, is an American keyboard player and songwriter who was a member of the Hi Rhythm Section in Memphis, Tennessee and has featured on over forty albums.
Biography
Turner was born in Detroit, Michigan, the son of Horace Turner Sr., who died when Archie was a young child. He acquired the nickname "Hubbie" (sometimes spelled "Hubby" or "Hubie") in childhood, and moved with his brother Horace to Memphis, where they lived with their grandmother. Archie began taking piano lessons, and then lived with his mother, her second husband – musician Willie Mitchell – and their daughters. He attended a Catholic high school in Memphis, and met brothers Teenie and Leroy Hodges. They soon formed a band, the Impalas, with Archie on keyboards, Horace on drums, and the Hodges brothers on guitar and bass, and played in local clubs and at parties, occasionally substituting for their stepfather Willie Mitchell's own band.
After graduating from high school in 1964, Archie studied at Memphis State College while continuing to play with the Impalas, and occasionally made recordings as a session musician. He dropped out of college, and in 1968 was drafted into the US Army, initially forming a band at Fort Polk, Louisiana with his cousin, Donny Mitchell. He was transported to Vietnam as a member of an infantry unit, eventually forming a band there. He was recognized in Stars and Stripes magazine as 1969 Entertainer of the Year in Vietnam. Returning to Memphis in 1970, he restarted his degree but changed his major to Psychology. He also formed a new rock band, Blackrock, with Cornell McFadden (drums – previously a member of The Insect Trust), Curke Dudley (bass), and Willie Pettis (guitar). They recorded one single, "Blackrock, Yeah, Yeah", for the local Select-O-Hits label, and – with Pettis replaced by Larry Lee – traveled to California where they auditioned for Bill Graham, though nothing came of the session and the band split up in 1971. "Blackrock, Yeah, Yeah", co-written by Turner, was sampled on the 2014 album ...And Then You Shoot Your Cousin by The Roots.
Turner then joined the Hodges brothers in the Hi Rhythm Section, recording over the next few years with Al Green, Syl Johnson, Ann Peebles, Otis Clay and others. He also wrote two tracks on Paul Butterfield's 1981 album North-South, and formed a new band, Quo Jr., with Roland Robinson and Brad Webb. During the 1980s he played in the bands of Little Milton; Bobby 'Blue' Bland, with whom he toured in Europe; and Albert King, where he played with guitarist Emmanuel Gales, later known as Little Jimmy King. Turner and Little Jimmy King then formed the Memphis Soul Survivors, who became the house band at B. B. King's Blues Club on Beale Street and recorded several albums for Rounder Records.
In 2008, Turner joined The Bo-Keys in Memphis. Between 2010 and 2012 he toured internationally as a member of Cyndi Lauper's band, and in 2014 toured as a member of the Hi Rhythm Section backing singer Paul Rodgers. In 2010 he gained a W. C. Handy Heritage Award. He has continued to perform as a member of both the Hi Rhythm Section and the Bo-Keys, as well as with other musicians including Stevie Ray Vaughan, and Earl “The Pearl” Banks and the 'Peoples of the Blues' band.
References
1946 births
Living people
Musicians from Memphis, Tennessee
African-American pianists
American session musicians
20th-century American pianists
20th-century American keyboardists
20th-century African-American musicians
21st-century African-American people
United States Army personnel of the Vietnam War
|
The Seattle Film Critics Society Award for Best Documentary Feature is one of the annual awards given by the Seattle Film Critics Society.
Winners and nominees
† indicates the winner of the Academy Award for Best Documentary Feature.
2010s
2020s
References
Documentary Feature
|
```go
// Unless explicitly stated otherwise all files in this repository are licensed
// This product includes software developed at Datadog (path_to_url
//go:build test
// +build test
package agentimpl
import (
"context"
"testing"
traceagent "github.com/DataDog/datadog-agent/comp/trace/agent/def"
gzip "github.com/DataDog/datadog-agent/comp/trace/compression/impl-gzip"
pkgagent "github.com/DataDog/datadog-agent/pkg/trace/agent"
"github.com/DataDog/datadog-agent/pkg/trace/stats"
"github.com/DataDog/datadog-agent/pkg/trace/telemetry"
"github.com/DataDog/datadog-agent/pkg/trace/writer"
"github.com/DataDog/datadog-go/v5/statsd"
)
type noopTraceWriter struct{}
func (n *noopTraceWriter) Run() {}
func (n *noopTraceWriter) Stop() {}
func (n *noopTraceWriter) WriteChunks(_ *writer.SampledChunks) {}
func (n *noopTraceWriter) FlushSync() error { return nil }
type noopConcentrator struct{}
func (c *noopConcentrator) Start() {}
func (c *noopConcentrator) Stop() {}
func (c *noopConcentrator) Add(_ stats.Input) {}
// NewMock creates a new mock agent component.
func NewMock(deps dependencies, _ testing.TB) traceagent.Component {
telemetryCollector := telemetry.NewCollector(deps.Config.Object())
// Several related non-components require a shared context to gracefully stop.
ctx, cancel := context.WithCancel(context.Background())
ag := component{
Agent: pkgagent.NewAgent(
ctx,
deps.Config.Object(),
telemetryCollector,
&statsd.NoOpClient{},
gzip.NewComponent(),
),
cancel: cancel,
config: deps.Config,
params: deps.Params,
telemetryCollector: telemetryCollector,
}
// Temporary copy of pkg/trace/agent.NewTestAgent
ag.TraceWriter = &noopTraceWriter{}
ag.Concentrator = &noopConcentrator{}
return component{}
}
```
|
```scala
package ai.verta.client.entities
import ai.verta.client._
import ai.verta.repository._
import ai.verta.blobs._
import ai.verta.blobs.dataset.PathBlob
import ai.verta.client.entities.utils.ValueType
import ai.verta.dataset_versioning._
import scala.language.reflectiveCalls
import scala.concurrent.ExecutionContext
import scala.util.{Try, Success, Failure}
import scala.collection.mutable
import java.io._
import java.nio.charset.StandardCharsets
import org.scalatest.FunSuite
import org.scalatest.Assertions._
class TestExperimentRun extends FunSuite {
implicit val ec = ExecutionContext.global
def fixture =
new {
val client = new Client(ClientConnection.fromEnvironment())
val repo = client.getOrCreateRepository("My Repo").get
val project = client.getOrCreateProject("scala test").get
val expRun = project.getOrCreateExperiment("experiment")
.flatMap(_.getOrCreateExperimentRun()).get
val dataset = client.getOrCreateDataset("my dataset").get
}
def cleanup(f: AnyRef{val client: Client; val repo: Repository; val project: Project; val expRun: ExperimentRun; val dataset: Dataset}) = {
f.client.deleteRepository(f.repo.id)
f.client.deleteProject(f.project.proj.id.get)
f.client.deleteDataset(f.dataset.id)
f.client.close()
}
/** Helper function to convert byte stream to UTF-8 string
* From path_to_url
*/
def streamToString(inputStream: ByteArrayInputStream) = {
val result = new ByteArrayOutputStream();
val buffer = new Array[Byte](1024)
var length = inputStream.read(buffer);
while (length != -1) {
result.write(buffer, 0, length);
length = inputStream.read(buffer);
}
result.toString("UTF-8");
}
/** Test function to verify that getting should retrieve the correctly logged metadata
* @param logger function to log a single piece metadata
* @param multiLogger function to log multiple pieces of metadata
* @param getter function to retrieve a single piece of metadata
* @param allGetter function to retrieve all stored metadata
* @param someGetter (optional) function to retrieve stored metadata corresponding to a list of keys
*/
def testMetadata(
logger: ExperimentRun => ((String, ValueType) => Try[Unit]),
multiLogger: ExperimentRun => (Map[String, ValueType] => Try[Unit]),
getter: ExperimentRun => (String => Try[Option[ValueType]]),
allGetter: ExperimentRun => (() => Try[Map[String, ValueType]]),
someGetter: Option[ExperimentRun => (List[String] => Try[Map[String, ValueType]])] = None
) = {
val f = fixture
try {
logger(f.expRun)("some", 0.5)
logger(f.expRun)("int", 4)
val listMetadata = List[ValueType](4, 0.5, "some-value")
logger(f.expRun)("list", listMetadata)
multiLogger(f.expRun)(Map("other" -> 0.3, "string" -> "desc"))
assert(getter(f.expRun)("some").get.get.asDouble.get equals 0.5)
assert(getter(f.expRun)("other").get.get.asDouble.get equals 0.3)
assert(getter(f.expRun)("int").get.get.asBigInt.get equals 4)
assert(getter(f.expRun)("string").get.get.asString.get equals "desc")
assert(getter(f.expRun)("list").get.get.asList.get equals listMetadata)
if (someGetter.isDefined)
assert(someGetter.get(f.expRun)(List("some", "other")).get equals
Map[String, ValueType]("some" -> 0.5, "other" -> 0.3)
)
assert(allGetter(f.expRun)().get equals
Map[String, ValueType](
"some" -> 0.5, "int" -> 4, "other" -> 0.3, "string" -> "desc",
"list" -> listMetadata
)
)
} finally {
cleanup(f)
}
}
/** Test function to verify that getting a metadata with non-existing key should fail
* @param getter function to retrieve a single piece of metadata
*/
def testNonExisting(getter: ExperimentRun => (String => Try[Option[ValueType]])) = {
val f = fixture
try {
assert(getter(f.expRun)("non-existing").get.isEmpty)
} finally {
cleanup(f)
}
}
/** Test function to verify that logging a metadata with an existing key should fail
* @param logger function to log a single piece metadata
* @param multiLogger function to log multiple pieces of metadata
* @param getter function to retrieve a single piece of metadata
* @param metadataName type of the metadata
*/
def testAlreadyLogged(
logger: ExperimentRun => ((String, ValueType) => Try[Unit]),
multiLogger: ExperimentRun => (Map[String, ValueType] => Try[Unit]),
getter: ExperimentRun => (String => Try[Option[ValueType]]),
metadataName: String
) = {
val f = fixture
try {
logger(f.expRun)("existing", 0.5)
val logAttempt = logger(f.expRun)("existing", 0.5)
assert(logAttempt.isFailure)
assert(logAttempt match {case Failure(e) => e.getMessage contains f"${metadataName} being logged already exists"})
val logAttempt2 = multiLogger(f.expRun)(Map("existing" -> 0.5, "other" -> 0.3))
assert(logAttempt2.isFailure)
assert(logAttempt2 match {case Failure(e) => e.getMessage contains f"${metadataName} being logged already exists"})
assert(getter(f.expRun)("other").get.isEmpty)
} finally {
cleanup(f)
}
}
/** Test function to verify that the map interface of a metadata works
* @param getMap function to get the map interface of metadata
* @param getter function to retrieve a single piece of metadata
*/
def testMapInterface(
getMap: ExperimentRun => (() => mutable.Map[String, ValueType]),
getter: ExperimentRun => (String => Try[Option[ValueType]])
) = {
val f = fixture
try {
val map = getMap(f.expRun)()
map += ("some" -> 0.5)
assert(map.get("some").get.asDouble.get == 0.5)
assert(getter(f.expRun)("some").get.get.asDouble.get equals 0.5)
assert(map.get("non-existing").isEmpty)
} finally {
cleanup(f)
}
}
test("getMetric should retrieve the correct logged metric") {
testMetadata(_.logMetric, _.logMetrics, _.getMetric, _.getMetrics)
}
test("logMetric(s) should fail when pass an existing key") {
testAlreadyLogged(_.logMetric, _.logMetrics, _.getMetric, "Metric")
}
test("getMetric should return None when a non-existing key is passed") {
testNonExisting(_.getMetric)
}
test("metrics map should behave like other metric methods") {
testMapInterface(_.metrics, _.getMetric)
}
test("getAttribute(s) should retrieve the correct logged attributes") {
testMetadata(
_.logAttribute,
_.logAttributes,
_.getAttribute,
expRun => (() => expRun.getAttributes()),
Some(_.getAttributes)
)
}
test("getAttribute should return None when a non-existing key is passed") {
testNonExisting(_.getAttribute)
}
test("logAttribute(s) should fail when pass an existing key") {
testAlreadyLogged(_.logAttribute, _.logAttributes, _.getAttribute, "Attribute")
}
test("attributes map should behave like other attribute methods") {
testMapInterface(_.attributes, _.getAttribute)
}
test("getHyperparameter(s) should retrieve the correct logged attributes") {
testMetadata(_.logHyperparameter, _.logHyperparameters, _.getHyperparameter, _.getHyperparameters)
}
test("getHyperparameter should return None when a non-existing key is passed") {
testNonExisting(_.getHyperparameter)
}
test("logHyperparameter(s) should fail when pass an existing key") {
testAlreadyLogged(_.logHyperparameter, _.logHyperparameters, _.getHyperparameter, "Hyperparameter")
}
test("hyperparameters map should behave like other hyperparameter methods") {
testMapInterface(_.hyperparameters, _.getHyperparameter)
}
test("getTags should correctly retrieve the added tags") {
val f = fixture
try {
assert(f.expRun.getTags.get equals Nil)
assert(f.expRun.addTags(List("some-tag", "other-tag")).isSuccess)
assert(f.expRun.getTags.get equals List("some-tag", "other-tag").sorted)
} finally {
cleanup(f)
}
}
test("getTags output should not contain deleted tags") {
val f = fixture
try {
f.expRun.addTags(List("some-tag", "other-tag", "to-remove-tag-1", "to-remove-tag-2"))
f.expRun.delTags(List("to-remove-tag-1", "to-remove-tag-2", "non-existing-tag"))
assert(f.expRun.getTags.get equals List("some-tag", "other-tag").sorted)
} finally {
cleanup(f)
}
}
test("tags set should behave like other tag methods") {
val f = fixture
try {
val tags = f.expRun.tags()
tags += "some-tag"
tags += "other-tag"
assert(tags.contains("some-tag") && tags.contains("other-tag"))
assert(f.expRun.getTags.get equals List("some-tag", "other-tag").sorted)
tags -= "other-tag"
assert(!tags.contains("other-tag"))
assert(f.expRun.getTags.get equals List("some-tag"))
} finally {
cleanup(f)
}
}
test("getObservation(s) should get the correct series of logged observation") {
val f = fixture
try {
f.expRun.logObservation("some-obs", 0.5)
f.expRun.logObservation("some-obs", 0.4)
f.expRun.logObservation("some-obs", 0.6)
f.expRun.logObservation("single-obs", 7)
f.expRun.logObservation("string-obs", "some string obs")
assertTypeError("f.expRun.logObservation(\"some-observation\", true)")
assert(f.expRun.getObservation("some-obs").get.map(_._2) equals List[ValueType](0.5, 0.4, 0.6))
assert(f.expRun.getObservation("single-obs").get.map(_._2) equals List[ValueType](7))
assert(f.expRun.getObservation("string-obs").get.map(_._2) equals List[ValueType]("some string obs"))
assert(f.expRun.getObservation("non-existing-obs").get equals Nil)
val allObservations = f.expRun.getObservations().get.mapValues(series => series.map(_._2))
assert(allObservations equals
Map[String, List[ValueType]]("some-obs" -> List(0.5, 0.4, 0.6), "single-obs" -> List(7), "string-obs" -> List("some string obs"))
)
} finally {
cleanup(f)
}
}
test("get commit should retrieve the right commit that was logged") {
val f = fixture
try {
val commit = f.repo.getCommitByBranch().get
val pathBlob = PathBlob(f"${System.getProperty("user.dir")}/src/test/scala/ai/verta/blobs/testdir").get
val logAttempt = f.expRun.logCommit(commit)
assert(logAttempt.isSuccess)
val retrievedCommit = f.expRun.getCommit().get.commit
assert(retrievedCommit equals commit)
// Should not allow updating commit:
val newCommit = commit.update("abc/def", pathBlob)
.flatMap(_.save("Add a blob")).get
val logAttempt2 = f.expRun.logCommit(newCommit, Some(Map[String, String]("mnp/qrs" -> "abc/def")))
assert(logAttempt2.isFailure)
val newRetrievedCommit = f.expRun.getCommit().get.commit
assert(newRetrievedCommit equals commit)
} finally {
cleanup(f)
}
}
test("get commit should fail if there isn't one assigned to the run") {
val f = fixture
try {
val getAttempt = f.expRun.getCommit()
assert(getAttempt.isFailure)
assert(getAttempt match {case Failure(e) => e.getMessage contains "No commit is associated with this experiment run"})
} finally {
cleanup(f)
}
}
test("get artifact object should get the correct logged object") {
val f = fixture
try {
val artifact = new DummyArtifact("hello")
f.expRun.logArtifactObj("dummy", artifact)
assert(f.expRun.getArtifactObj("dummy").get equals artifact)
} finally {
cleanup(f)
}
}
test("get artifact stream should get the correct logged stream of bytes") {
val f = fixture
try {
val arr = new ByteArrayOutputStream()
val stream = new ObjectOutputStream(arr)
stream.writeObject("some weird object")
stream.close
f.expRun.logArtifact("stream", new ByteArrayInputStream(arr.toByteArray))
assert(
streamToString(new ByteArrayInputStream(arr.toByteArray)) ==
streamToString(f.expRun.getArtifact("stream").get)
)
} finally {
cleanup(f)
}
}
test("log artifact with existing key should fail") {
val f = fixture
try {
val artifact = new DummyArtifact("hello")
f.expRun.logArtifactObj("existing", artifact)
val newArtifact = new DummyArtifact("world")
val logAttempt = f.expRun.logArtifactObj("existing", newArtifact)
assert(logAttempt.isFailure)
assert(logAttempt match {case Failure(e) => e.getMessage contains "Artifact being logged already exists"})
val arr = new ByteArrayOutputStream()
val stream = new ObjectOutputStream(arr)
stream.writeObject("some weird object")
stream.close
val logAttempt2 = f.expRun.logArtifact("existing", new ByteArrayInputStream(arr.toByteArray))
assert(logAttempt2.isFailure)
assert(logAttempt2 match {case Failure(e) => e.getMessage contains "Artifact being logged already exists"})
} finally {
cleanup(f)
}
}
test("log/get dataset version") {
val f = fixture
try {
assert(f.expRun.getDatasetVersions().get.isEmpty)
val workingDir = System.getProperty("user.dir")
val testDir = workingDir + "/src/test/scala/ai/verta/blobs/testdir"
val pathVersion = f.dataset.createPathVersion(List(testDir)).get
val queryVersion = f.dataset.createDBVersion("SELECT * FROM my-table", "database.com").get
assert(f.expRun.logDatasetVersion("path", pathVersion).isSuccess)
assert(f.expRun.logDatasetVersion("query", queryVersion).isSuccess)
assert(f.expRun.getDatasetVersion("path").get.id == pathVersion.id)
assert(f.expRun.getDatasetVersions().get.mapValues(_.id) == Map("path" -> pathVersion.id, "query" -> queryVersion.id))
val getAttempt = f.expRun.getDatasetVersion("not-exist")
assert(getAttempt match {
case Failure(e) => e.getMessage contains "no dataset version with the key \'not-exist\' associated with the experiment run"
})
val queryVersion2 = f.dataset.createDBVersion("SELECT * FROM other-table", "database.com").get
val overwriteAttempt = f.expRun.logDatasetVersion("query", queryVersion2)
assert(overwriteAttempt match {case Failure(e) => e.getMessage contains "Dataset being logged already exists"})
assert(f.expRun.logDatasetVersion("query", queryVersion2, true).isSuccess)
assert(f.expRun.getDatasetVersion("query").get.id == queryVersion2.id)
} finally {
cleanup(f)
}
}
}
```
|
The Geraldton Road District was an early form of local government area in the Mid West region of Western Australia. It was based in the town of Geraldton, although Geraldton was not part of the road district, having been separately incorporated as the Municipality of Geraldton.
It was established on 24 January 1871. It met at the Geraldton Town Hall in its early years, later switching to the office of the road board secretary.
A section of the district separated to form the Murchison Road District on 3 August 1875 and another section separated to form the Mullewa Road District on 11 August 1911.
Prominent pastoralist Walter Vernon from Sandsprings Homestead was a long-serving member of the Geraldton Road Board, being first elected to the board in 1910 and serving as its chairman from 1913 to 1944.
The Geraldton Road District ceased to exist on 21 December 1951, when it amalgamated with the Greenough Road District to form the Geraldton-Greenough Road District. A small section of the former road district was added to the Municipality of Geraldton in light of the town having expanded. The amalgamation was largely amicable, with an attempt by the Geraldton board to retain their name for the merged entity being one of the few brief issues of contention.
References
Former local government areas of Western Australia
|
Gatewood is a neighborhood in West Seattle, Seattle, Washington. Situated on the highest hill in Seattle it overlooks Puget Sound, the Olympic Mountains, and downtown Seattle. It is generally bounded to the north and south by Raymond and Thistle Streets respectively, to the east by 35th Avenue, and the west by California Avenue and Fauntleroy Way. The neighborhood's landmarks include the Gatewood School, currently an elementary school. It is minutes from Lincoln Park.
Schools
The public schools in the neighborhood are part of the Seattle Public Schools district. Gatewood Elementary is the third-oldest school in West Seattle. The original building was closed for construction in 1989, and reopened two years later.
Demographics
As of 2008–2009, the population was 5,865 people over 1.127 square miles, with the median household income being $77,693.
References
External links
Seattle City Clerk's Neighborhood Map Atlas — Gatewood
West Seattle, Seattle
|
```java
/*
* code is released under a tri EPL/GPL/LGPL license. You can use it,
* redistribute it and/or modify it under the terms of the:
*
*/
package org.truffleruby.test.internal;
import java.io.IOException;
import java.lang.management.ManagementFactory;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import javax.management.InstanceNotFoundException;
import javax.management.MBeanException;
import javax.management.MBeanServer;
import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;
import javax.management.ReflectionException;
import org.graalvm.launcher.AbstractLanguageLauncher;
import org.graalvm.options.OptionCategory;
import org.graalvm.polyglot.Context;
import org.graalvm.polyglot.Context.Builder;
import org.graalvm.polyglot.Engine;
import org.graalvm.polyglot.PolyglotException;
import org.netbeans.lib.profiler.heap.Heap;
import org.netbeans.lib.profiler.heap.HeapFactory;
import org.netbeans.lib.profiler.heap.Instance;
import org.netbeans.lib.profiler.heap.JavaClass;
import com.sun.management.HotSpotDiagnosticMXBean;
public class LeakTest extends AbstractLanguageLauncher {
public static void main(String[] args) {
String languageId = null;
for (int i = 0; i < args.length; i++) {
if (args[i].equals("--lang")) {
languageId = args[i + 1];
break;
}
}
new LeakTest(languageId).launch(args);
}
LeakTest(String languageId) {
super();
if (languageId == null) {
printHelp(null);
System.exit(255);
}
this.languageId = languageId;
}
// sharedEngine is an instance variable explicitly so we definitely keep the ASTs alive. This is
// to ensure that we actually test that even when the engine is still alive, as the Context is
// closed, no objects should still be reachable
private Engine engine;
private boolean sharedEngine = false;
private boolean keepDump = false;
private String languageId;
private String code;
private List<String> forbiddenClasses = new ArrayList<>();
@SuppressWarnings("serial")
private final class SystemExit extends RuntimeException {
public SystemExit() {
super(null, null);
}
@Override
public synchronized Throwable getCause() {
dumpAndAnalyze();
System.exit(0);
return null;
}
private void dumpAndAnalyze() {
if (sharedEngine && engine == null) {
throw new AssertionError("the engine is no longer alive!");
}
MBeanServer server = doFullGC();
Path dumpFile = dumpHeap(server);
boolean fail = checkForLeaks(dumpFile);
if (fail) {
System.exit(255);
} else {
System.exit(0);
}
}
private boolean checkForLeaks(Path dumpFile) {
boolean fail = false;
try {
Heap heap = HeapFactory.createHeap(dumpFile.toFile());
for (String fqn : forbiddenClasses) {
List<String> errors = new ArrayList<>();
JavaClass cls = heap.getJavaClassByName(fqn);
if (cls == null) {
System.err.println("No such class: " + fqn);
fail = true;
continue;
}
int cnt = getCountAndErrors(cls, errors);
for (Object subCls : cls.getSubClasses()) {
cnt += getCountAndErrors((JavaClass) subCls, errors);
}
if (cnt > 0) {
fail = true;
System.err.println("More instances of " + fqn + " than expected: " + cnt);
for (String e : errors) {
System.err.println(e);
}
}
}
} catch (IOException e) {
throw new RuntimeException(e);
}
return fail;
}
private Path dumpHeap(MBeanServer server) {
Path dumpFile = null;
try {
Path p = Files.createTempDirectory("leakTest");
if (!keepDump) {
p.toFile().deleteOnExit();
}
dumpFile = p.resolve("heapdump.hprof");
if (!keepDump) {
dumpFile.toFile().deleteOnExit();
} else {
System.out.println("Dump file: " + dumpFile.toString());
}
HotSpotDiagnosticMXBean mxBean = ManagementFactory.newPlatformMXBeanProxy(
server,
"com.sun.management:type=HotSpotDiagnostic",
HotSpotDiagnosticMXBean.class);
mxBean.dumpHeap(dumpFile.toString(), true);
} catch (IOException e) {
throw new RuntimeException(e);
}
return dumpFile;
}
private MBeanServer doFullGC() {
// do this a few times to dump a small heap if we can
MBeanServer server = null;
for (int i = 0; i < 10; i++) {
try {
Thread.sleep(1000);
} catch (InterruptedException e1) {
// do nothing
}
System.gc();
Runtime.getRuntime().freeMemory();
server = ManagementFactory.getPlatformMBeanServer();
try {
ObjectName objectName = new ObjectName("com.sun.management:type=DiagnosticCommand");
server.invoke(objectName, "gcRun", new Object[]{ null }, new String[]{ String[].class.getName() });
} catch (MalformedObjectNameException | InstanceNotFoundException | ReflectionException
| MBeanException e) {
throw new RuntimeException(e);
}
}
return server;
}
private int getCountAndErrors(JavaClass cls, List<String> errors) {
int count = cls.getInstancesCount();
if (count > 0) {
boolean realLeak = false;
for (Object i : cls.getInstances()) {
Instance inst = (Instance) i;
if (inst.isGCRoot() || inst.getNearestGCRootPointer() != null) {
realLeak = true;
break;
}
}
if (!realLeak) {
return 0;
}
StringBuilder sb = new StringBuilder();
sb.append(cls.getName()).append(" ").append(count).append(" instance(s)");
errors.add(sb.toString());
}
return count;
}
@SuppressWarnings("sync-override")
@Override
public final Throwable fillInStackTrace() {
return this;
}
}
@Override
protected List<String> preprocessArguments(List<String> arguments, Map<String, String> polyglotOptions) {
ArrayList<String> unrecognized = new ArrayList<>();
for (int i = 0; i < arguments.size(); i++) {
String arg = arguments.get(i);
if (arg.equals("--shared-engine")) {
sharedEngine = true;
} else if (arg.equals("--lang")) {
// already parsed
i++;
} else if (arg.equals("--keep-dump")) {
keepDump = true;
} else if (arg.equals("--code")) {
code = arguments.get(++i);
} else if (arg.equals("--forbidden-class")) {
forbiddenClasses.add(arguments.get(++i));
} else {
unrecognized.add(arg);
}
}
unrecognized.add("--experimental-options");
return unrecognized;
}
@Override
protected void launch(Builder contextBuilder) {
if (sharedEngine) {
engine = Engine.newBuilder()
.allowExperimentalOptions(true)
.option("engine.WarnInterpreterOnly", "false")
.option("engine.TraceCodeSharing", "true")
.build();
contextBuilder.engine(engine);
}
contextBuilder
.allowExperimentalOptions(true)
.allowAllAccess(true)
.option("ruby.experimental-engine-caching", "true");
try (Context context = contextBuilder.build()) {
try {
context.eval(getLanguageId(), code);
} catch (PolyglotException e) {
if (e.isExit()) {
if (e.getExitStatus() == 0) {
throw new SystemExit();
} else {
exit(e.getExitStatus());
}
} else {
e.printStackTrace();
exit(255);
}
}
}
throw new SystemExit();
}
@Override
protected String getLanguageId() {
return languageId;
}
@Override
protected String[] getDefaultLanguages() {
return new String[]{ languageId };
}
@Override
protected void printHelp(OptionCategory maxCategory) {
System.out.println(
"--lang ID --code CODE --forbidden-class FQN [--forbidden-class FQN]* [--shared-engine] [--keep-dump] [POLYGLOT-OPTIONS]");
}
}
```
|
```python
#
#
# path_to_url
#
# Unless required by applicable law or agreed to in writing, software
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
from matplotlib import pyplot as plt
plt.rcParams['figure.figsize']=(16.8,6.0)
plt.rcParams['axes.grid']=True
plt.rcParams['axes.linewidth']=0
plt.rcParams['grid.color']='#DDDDDD'
plt.rcParams['xtick.major.size']=0
plt.rcParams['ytick.major.size']=0
```
|
"Just Like Anyone" is a 1995 song by American alternative rock band Soul Asylum from its seventh album, Let Your Dim Light Shine. Written by the lead singer, Dave Pirner, and produced by the band with Butch Vig, the song was the second single released as the album. It entered the singles charts in Canada and the United Kingdom and reached number 19 on the US Billboard Modern Rock Tracks chart. The song was included on the band's 2000 greatest hits album, Black Gold: The Best of Soul Asylum, and a live version appears on the band's 2004 After the Flood: Live from the Grand Forks Prom, June 28, 1997 album.
Reception
"Just Like Anyone" peaked at number 52 in the United Kingdom and number 55 in Canada, where it also reached number 12 on the Alternative chart. In the United States, the song was not released as a commercial single, but it received enough radio airplay to peak at number 11 on the Billboard Album Rock Tracks chart and number 19 on the Modern Rock Tracks chart.The New York Times music critic, Jon Pareles, said the song's lyrics "could have been written for the insecure high school students in the television drama My So-Called Life," in which Danes also starred.
Music video
A music video for the song was filmed in Los Angeles during summer 1995. Directed by P.J. Hogan and produced by Michelle Alexander, the video features the actress Claire Danes, who plays a high school student who is rejected and taunted by other students because she has two noticeable bumps on her back. Hidden beneath the bumps are angel wings, which are revealed later as she takes flight during a school dance. The video was shown on MTV and MuchMusic, reaching the most-played charts on both networks.
Track listings
CD1
"Just Like Anyone"
"Get On Out" (live at Paradise Rock Club, June 4, 1995)
"Do Anything You Wanna Do"
CD2
"Just Like Anyone"
"Fearless Leader"
"You'll Leave For Now"
Charts
Release history
References
External links
Watch the "Just Like Anyone" video on YouTube''
"Just Like Anyone" lyrics
1995 singles
Soul Asylum songs
Song recordings produced by Butch Vig
Songs written by Dave Pirner
|
```clojure
(ns quo.components.community.community-view
(:require
[quo.components.community.community-stat.view :as community-stat]
[quo.components.community.style :as style]
[quo.components.markdown.text :as text]
[quo.components.tags.permission-tag :as permission]
[quo.components.tags.tag :as tag]
[quo.foundations.colors :as colors]
[quo.theme]
[react-native.core :as rn]
[react-native.gesture :as gesture]))
(defn community-stats-column
[{:keys [type members-count active-count]}]
[rn/view
(if (= type :card-view)
(style/card-stats-container)
(style/list-stats-container))
[community-stat/view
{:accessibility-label :stats-members-count
:icon :i/group
:value members-count
:style {:margin-right 12}}]
[community-stat/view
{:accessibility-label :stats-active-count
:icon :i/active-members
:value active-count}]])
(defn community-tags
[{:keys [tags container-style last-item-style]}]
[gesture/scroll-view
{:shows-horizontal-scroll-indicator false
:horizontal true
:style container-style}
(let [last-index (max 0 (dec (count tags)))]
(map-indexed
(fn [index {tag-name :name emoji :emoji}]
(let [last? (= index last-index)]
[rn/view
{:key tag-name
:style (if last?
last-item-style
{:margin-right 8})}
[tag/tag
{:size 24
:label tag-name
:type :emoji
:labelled? true
:resource emoji}]]))
tags))])
(defn community-title
[{:keys [title description size] :or {size :small}}]
[rn/view (style/community-title-description-container (if (= size :large) 56 32))
(when title
[text/text
{:accessibility-label :chat-name-text
:number-of-lines 1
:ellipsize-mode :tail
:weight :semi-bold
:size (if (= size :large) :heading-1 :heading-2)}
title])
(when description
[text/text
{:accessibility-label :community-description-text
:number-of-lines 2
:ellipsize-mode :tail
:weight :regular
:size :paragraph-1
:style {:margin-top (if (= size :large) 8 2)}}
description])])
(defn permission-tag-container
[{:keys [locked? blur? tokens on-press]}]
(let [theme (quo.theme/use-theme)]
[permission/tag
{:accessibility-label :permission-tag
:background-color (if (and (= :dark theme) blur?)
colors/white-opa-10
(colors/theme-colors colors/neutral-10 colors/neutral-80 theme))
:locked? locked?
:tokens tokens
:size 24
:on-press on-press}]))
```
|
```go
/*
path_to_url
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
/*
Contains functions that handle, normalize, and otherwise modify text.
*/
package summarize
import (
"crypto/sha1"
"fmt"
"hash/crc32"
"io"
"regexp"
"sort"
"strings"
"sync"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/klog/v2"
"k8s.io/test-infra/triage/berghelroach"
"k8s.io/test-infra/triage/utils"
)
var flakeReasonDateRE *regexp.Regexp = regexp.MustCompile(
`[A-Z][a-z]{2}, \d+ \w+ 2\d{3} [\d.-: ]*([-+]\d+)?|` +
`\w{3}\s+\d{1,2} \d+:\d+:\d+(\.\d+)?|(\d{4}-\d\d-\d\d.|.\d{4} )\d\d:\d\d:\d\d(.\d+)?`)
// Find random noisy strings that should be replaced with renumbered strings, for more similarity.
var flakeReasonOrdinalRE *regexp.Regexp = regexp.MustCompile(
`0x[0-9a-fA-F]+` + // hex constants
`|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(:\d+)?` + // IPs + optional port
`|[0-9a-fA-F]{8}-\S{4}-\S{4}-\S{4}-\S{12}(-\d+)?` + // UUIDs + trailing digits
`|[0-9a-f]{12,32}` + // hex garbage
`|(minion-group-|default-pool-)[-0-9a-z]{4,}`) // node names
/*
normalize reduces excess entropy to make clustering easier, given
a traceback or error message from a text.
This includes:
- blanking dates and timestamps
- renumbering unique information like
-- pointer addresses
-- UUIDs
-- IP addresses
- sorting randomly ordered map[] strings.
*/
func normalize(s string, maxClusterTextLength int) string {
// blank out dates
s = flakeReasonDateRE.ReplaceAllLiteralString(s, "TIME")
// do alpha conversion-- rename random garbage strings (hex pointer values, node names, etc)
// into 'UNIQ1', 'UNIQ2', etc.
matches := make(map[string]string)
// Go's maps are in a random order. Try to sort them to reduce diffs.
if strings.Contains(s, "map[") {
// Match anything of the form "map[x]", where x does not contain "]" or "["
sortRE := regexp.MustCompile(`map\[([^][]*)\]`)
s = sortRE.ReplaceAllStringFunc(
s,
func(match string) string {
// Access the 1th submatch to grab the capture goup in sortRE.
// Split the capture group by " " so it can be sorted.
splitMapTypes := strings.Split(sortRE.FindStringSubmatch(match)[1], " ")
sort.StringSlice.Sort(splitMapTypes)
// Rejoin the sorted capture group with " ", and insert it back into "map[]"
return fmt.Sprintf("map[%s]", strings.Join(splitMapTypes, " "))
})
}
s = flakeReasonOrdinalRE.ReplaceAllStringFunc(s, func(match string) string {
if _, ok := matches[match]; !ok {
matches[match] = fmt.Sprintf("UNIQ%d", len(matches)+1)
}
return matches[match]
})
// for long strings, remove repeated lines!
if len(s) > maxClusterTextLength {
s = utils.RemoveDuplicateLines(s)
}
// truncate ridiculously long test output
s = truncate(s, maxClusterTextLength)
return s
}
// normalizeName removes [...] and {...} from a given test name. It matches code in testgrid and
// kubernetes/hack/update_owners.py.
func normalizeName(name string) string {
name = regexp.MustCompile(`\[.*?\]|{.*?\}`).ReplaceAllLiteralString(name, "")
name = regexp.MustCompile(`\s+`).ReplaceAllLiteralString(name, " ")
return strings.TrimSpace(name)
}
/*
ngramEditDist computes a heuristic lower-bound edit distance using ngram counts.
An insert/deletion/substitution can cause up to 4 ngrams to differ:
abcdefg => abcefg
(abcd, bcde, cdef, defg) => (abce, bcef, cefg)
This will underestimate the edit distance in many cases:
- ngrams hashing into the same bucket will get confused
- a large-scale transposition will barely disturb ngram frequencies,
but will have a very large effect on edit distance.
It is useful to avoid more expensive precise computations when they are
guaranteed to exceed some limit (being a lower bound), or as a proxy when
the exact edit distance computation is too expensive (for long inputs).
*/
func ngramEditDist(a string, b string) int {
countsA := makeNgramCounts(a)
countsB := makeNgramCounts(b)
shortestCounts := utils.Min(len(countsA), len(countsB))
result := 0
for i := 0; i < shortestCounts; i++ {
result += utils.Abs(countsA[i] - countsB[i])
}
return result / 4
}
// makeNgramCountsDigest returns a hashed version of the ngram counts.
func makeNgramCountsDigest(s string) string {
ngramResults := makeNgramCounts(s)
// In Python, given an array [x, y, z], calling str() on the array will output
// "[x, y, z]". This will try to replicate that behavior.
// Represent the ngramResults
ngramResultsAsString := strings.Replace(fmt.Sprintf("%v", ngramResults), " ", ", ", -1)
// Generate the hash
hash := sha1.New()
_, err := io.WriteString(hash, ngramResultsAsString)
if err != nil {
klog.Fatalf("Error writing ngram results string to sha1 hash: %s", err)
}
return fmt.Sprintf("%x", hash.Sum(nil))[:20]
}
// findMatch finds a match for a normalized failure string from a selection of candidates.
func findMatch(fnorm string, candidates []string) (result string, found bool) {
type distancePair struct {
distResult int
key string
}
distancePairs := make([]distancePair, len(candidates))
iter := 0
for _, candidate := range candidates {
distancePairs[iter] = distancePair{ngramEditDist(fnorm, candidate), candidate}
iter++
}
// Sort distancePairs by each pair's distResult
sort.Slice(distancePairs, func(i, j int) bool { return distancePairs[i].distResult < distancePairs[j].distResult })
for _, pair := range distancePairs {
// allow up to 10% differences
limit := int(float32(len(fnorm)+len(pair.key)) / 2.0 * 0.10)
if pair.distResult > limit {
continue
}
if limit <= 1 && pair.key != fnorm { // no chance
continue
}
dist := berghelroach.Dist(fnorm, pair.key, limit)
if dist < limit {
return pair.key, true
}
}
return "", false
}
var spanRE = regexp.MustCompile(`\w+|\W+`)
/*
commonSpans finds something similar to the longest common subsequence of xs, but much faster.
Returns a list of [matchlen_1, mismatchlen_2, matchlen_2, mismatchlen_2, ...], representing
sequences of the first element of the list that are present in all members.
*/
func commonSpans(xs []string) []int {
common := make(sets.String)
commonModified := false // Flag to keep track of whether common has been modified at least once
for _, x := range xs {
xSplit := spanRE.FindAllString(x, -1)
if !commonModified { // first iteration
common.Insert(xSplit...)
commonModified = true
} else {
common = common.Intersection(sets.NewString(xSplit...))
}
}
spans := make([]int, 0)
match := true
spanLen := 0
for _, x := range spanRE.FindAllString(xs[0], -1) {
if common.Has(x) {
if !match {
match = true
spans = append(spans, spanLen)
spanLen = 0
}
spanLen += len(x)
} else {
if match {
match = false
spans = append(spans, spanLen)
spanLen = 0
}
spanLen += len(x)
}
}
if spanLen != 0 {
spans = append(spans, spanLen)
}
return spans
}
var memoizedNgramCounts = make(map[string][]int) // Will be used across makeNgramCounts() calls
var memoizedNgramCountsMutex sync.RWMutex // makeNgramCounts is eventually depended on by some parallelized functions
/*
makeNgramCounts converts a string into a histogram of frequencies for different byte combinations.
This can be used as a heuristic to estimate edit distance between two strings in
constant time.
Instead of counting each ngram individually, they are hashed into buckets.
This makes the output count size constant.
*/
func makeNgramCounts(s string) []int {
size := 64
memoizedNgramCountsMutex.RLock() // Lock the map for reading
if _, ok := memoizedNgramCounts[s]; !ok {
memoizedNgramCountsMutex.RUnlock() // Unlock while calculating
counts := make([]int, size)
for x := 0; x < len(s)-3; x++ {
counts[int(crc32.Checksum([]byte(s[x:x+4]), crc32.IEEETable)&uint32(size-1))]++
}
memoizedNgramCountsMutex.Lock() // Lock the map for writing
memoizedNgramCounts[s] = counts // memoize
memoizedNgramCountsMutex.Unlock()
return counts
} else {
result := memoizedNgramCounts[s]
memoizedNgramCountsMutex.RUnlock()
return result
}
}
const truncatedSep = "\n...[truncated]...\n"
func truncate(s string, maxLength int) string {
if len(s) > maxLength {
return s[:maxLength/2] + truncatedSep + s[len(s)-maxLength/2:]
}
return s
}
```
|
Hua can refer to varieties of the following languages:
The Hua (Huva) dialect of the Yagaria language of Papua New Guinea
The Eastern ǂHuan dialect of the ǂ’Amkoe language of Botswana
The Western ǂHuan dialect of the ǃXoon language of Botswana
Standard Chinese in Southeast Asia
|
Small Axe may refer to:
"Small Axe" (song), 1973 song by Bob Marley and the Wailers
Small Axe (anthology), 2020 anthology of films by Steve McQueen
Small Axe Project, academic journal about Caribbean literature
|
```go
//
//
// path_to_url
//
// Unless required by applicable law or agreed to in writing, software
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
package runtime
import (
"encoding/json"
"io"
)
// JSONConsumer creates a new JSON consumer
func JSONConsumer() Consumer {
return ConsumerFunc(func(reader io.Reader, data interface{}) error {
dec := json.NewDecoder(reader)
dec.UseNumber() // preserve number formats
return dec.Decode(data)
})
}
// JSONProducer creates a new JSON producer
func JSONProducer() Producer {
return ProducerFunc(func(writer io.Writer, data interface{}) error {
enc := json.NewEncoder(writer)
enc.SetEscapeHTML(false)
return enc.Encode(data)
})
}
```
|
Du'a al-Baha () (known as Du'a al-Sahar () is a Du'a recommended to Muslims to recite in pre-dawns during Ramadan, when Muslims usually eat Suhur. Since it is very common among Shia, it is known Dua al-Sahar (supplication of pre-dawn), despite there are other supplications for pre-dawns of Ramadan.
Chain of authority
The Du'a ascribed to Muhammad al-Baqir, fifth Shia Imam, and reported by Ali ibn Musa al-Riḍha, eighth Shia Imam.
Authenticity
It is mentioned in Mafatih al-Jinan by Abbas Qumi.
Contents
Dua al-Baha has 23 paragraphs which starts with “O Allah, I ask You to...” and beseech all of his glories, beauties, loftiness, greatness, luminosity, compassion, words, perfections, names, might, volition, omnipotence, knowledge, speeches, questions, honors, authorities, dominions, highness, bounties and signs. Then it is said: “O Allah, I ask You to give me whereby You gives answer to my supplication whenever I turn to You; therefore, hear my prayers, O Allah!”
Interpretation
Several scholar including Ruhollah Khomeini, founder of Islamic revolution, wrote some books to explain the supplication. Description of the Dawn prayer (Sharhe Du'a al-Sahar) is Khomeini's first book.
See also
Supplication of Abu Hamza al-Thumali
Mujeer Du'a
Jawshan Kabir
Dua Ahd
Du'a Kumayl
Du'a Nudba
References
External links
Du'a al-Baha text
Shia prayers
Salah terminology
Ramadan
|
```go
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
package xio
import (
"encoding/binary"
"io"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestBytesReader64(t *testing.T) {
var (
data = []byte{4, 5, 6, 7, 8, 9, 1, 2, 3, 0, 10, 11, 12, 13, 14, 15, 16, 17}
r = NewBytesReader64(nil)
)
for l := 0; l < len(data); l++ {
testBytesReader64(t, r, data[:l])
}
}
func testBytesReader64(t *testing.T, r *BytesReader64, data []byte) {
t.Helper()
r.Reset(data)
var (
peeked = []byte{}
read = []byte{}
buf [8]byte
word uint64
n byte
err error
)
for {
word, n, err = r.Peek64()
if err != nil {
break
}
binary.BigEndian.PutUint64(buf[:], word)
peeked = append(peeked, buf[:n]...)
word, n, err = r.Read64()
if err != nil {
break
}
binary.BigEndian.PutUint64(buf[:], word)
read = append(read, buf[:n]...)
}
require.Equal(t, io.EOF, err)
assert.Equal(t, data, peeked)
assert.Equal(t, data, read)
}
```
|
Consuelo Álvarez Pool, known by her pseudonym "Violeta" (Barcelona, July 24, 1867 – Madrid, January 19, 1959) was a Spanish writer, journalist, politician, trade unionist, suffragist, and feminist. She belonged to the first organization of women telegraphers in Spain.
Career
Telegrapher
Consuelo Álvarez Pool studied at the Escuela de Telégrafos, founded by the Asociación para la Enseñanza de la Mujer, where the students studied for two years, obtained the title of telegrapher and afterward tested for Telégrafos. Her job involved transmitting and receiving messages in morse code in telegraph offices.
When she was 17 years old her father died and her family fell into hardship. She decided to seek economic emancipation and study to join the Cuerpo de Telégrafos. On April 15, 1885, she passed the entrance exam to be a temporary assistant in Telégrafos; it was the first time someone made an exam accessible to single women older than 16, but it was not until 1909 that that access was definitive. She began working in international business since she was fluent in several languages. That year her daughter Esther Azcaráte Álvarez and fellow notable Spanish feminist Clara Campoamor also got jobs as telegraphers.
She belonged to the Cuerpo de Telégrafos until her retirement at 65 years old. She was head of press of the first press office of Telégrafos created in 1915, union representative in the Sindicato de Telégrafos, and a driving force in the creation of the Escuela Técnica Superior de Ingenieros de Telecomunicación.
On November 8, 2018, the "Comisión Filatélica del Estado" approved the issuance of a stamp dedicated to the Telegrapher Woman, with the image of Consuelo Álvarez Pool, "Violeta". On April 22, 2019, a postal envelope and the stamp with the image of Violeta was put into circulation within the series "Personajes". Additionally The Asociación de Amigos del Telégrafo, in the mark of XIII Memorial Clara Campoamor, gave an installment of the insignia of telegraphy to Carmen Marco Azcárete, great-granddaughter of Álvarez Pool, recognizing her whole family and the work that Álvarez Pool did for women telegraphers.
Journalist
She started reporting in Oviedo, where she moved after separating from her husband. Afterwards, she moved to Madrid and began to work at the newspaper El Pais, diario republicano-progresista in a permanent position. She was assigned to write about "women’s issues" – fashion, kitchen, and home – and so she adopted the pseudonym of Violeta. Under that name, she wrote about divorce, women's rights to education and to equal working conditions, prison reform, defense of the working class, violence against women, and more.
Consuelo Álvarez considered it necessary to write to tell the stories of the poverty and misfortune she saw around her. She also thought of the press’ job in those terms: “The mission of the press is not just to write about important events, but also to instruct, moralize, and revolutionize." (Translation)
In current studies about women in journalism Consuelo Álvarez, Violeta is recognized as one of the pioneers, and she is reflected as such in Spanish Writers in the Press 1868–1936. In 1907 she was admitted into the Asociación de la Prensa de Madrid with Carmen de Burgos, Columbine. The press card gave them a professional recognition, being the first two women journalists to join an editorial department, Carmen de Burgos in that of the newspaper Heraldo de Madrid, and Consuelo Álvarez in that of the El Pais, diario republicano-progresista.
Activism and involvement
Activism
As said by her biographer and researcher Victoria Crespo Gutiérrez, Director of the Telegraph and Postal Museum: “Consuelo Álvarez Pool was a part of the first generation of female telegraphers. She belonged to telegraphers for more than 40 years. She was a magnificent writer, a member of the feminine generation of 98, defender of women’s rights, and regular participant in conferences and social gatherings of the Literatura del Ateneo of Madrid . She was preoccupied, throughout her entire life, about social issues, as is reflected in her writing and her participation in representative organizations of telegraphy staff.(Translation) She actively defended women's access to education with the goal of achieving economic independence sufficient enough to not have to consider marriage as the only essential means for survival. Her defense of the right to divorce, recognized in her writing and conferences, is currently an object of investigation and study in academic theses. She was accompanied in this fight by other women such as Carmen de Burgos, Columbine, and her own daughter Esther Azcárate Álvarez.
Her anticlerical thinking was expressed in writing, conferences, and rallies, and was recognized in the press of the era, for example in the meeting of "Anti-Vatican" women celebrated in the Casino de la calle Esparteros de Madrid, the feminist rally celebrated in the Barbieri theater of Madrid on July 4, 1910, or the participation in the cycle of conference organized by the Sindicato de Empleados de Banca y Bolsa de Madrid in Madrid in October 1931, in which her dissertation was about "the social relationship between religion and capitalism".
Political and cultural involvement
She was an active participant in cultural life, she belonged to the Ateneo de Madrid (1907–1936) where she participated in conferences, attended gathering and literary debates. For much of her life she maintained correspondence with fellow literati and politicians, especially with her friend Benito Pérez Galdós (in whose house there are 7 preserved cards from Álvarez Pool), Rafael Salinas, Belén de Sárraga, Rosario de Acuña, Joaquín Costa, Manuel Azaña, Miguel de Unamuno, y Santiago Alba, among others.
She was very involved in politics, and she was a candidate for the Federal Democratic Republican Party in the 1931 elections in Madrid, but she was not elected . Along with her friend Clara Campoamor of the Radical Party, she defended the women's right to vote.
Consuelo Álvarez Pool also belonged to the Freemasonry, under the symbolic name Costa, and was initiated in the Logia de Adopción Ibérica no. 67 in 1910.
During the civil war she was repressed and punished for her outspokenness. The Francoist regime applied the Ley de represión de la Masonería y el Comunismo, being judged by the Tribunal Especial para la Represión de la Masonería y el Comunismo, voting 480–44 against Consuelo Álvarez Pool and condemning her to 12 years in prison. She completed her punishment on a provisional sentence due to her age of 77 years and her very deteriorated health.
Works
She was part of the Generation of '98, included among others such as Emilia Pardo Bazán, Carmen de Burgos "Columbine", Sofía Casanova, Patrocinio de Biedma, Rosario Acuña, Blanca de los Ríos Lampérez, Carmen Baroja, Mará de la O Lejárraga, Regina de Lamo, and María de Maeztu. As a writer, she was recognizer by the writer and literary critic Rafael Cansinos Asséns for her work La nueva literatura, volumen II La literatura feminina (1917) and by the Universidad Autónoma de Madrid professor Raquel Arias Careaga, in an article published in March 2019 entitled Poetas Españoles en la penumbra.
Stories
1900. La Pasionaria, La medalla de la Virgen, Las Amapolas, El Ramo de Claveles, El Primer Vals y Hojas caídas.
Cuentos de "El País". There are 24 stories published between 1904 and 1916, in which Violeta wrote about women's rights, the lower class, prostitution, mistreatment of women and children, workplace harassment, eviction, antimilitarism, and more. Most of the main characters are women.
Stories published in the revista La Vida Socialista.
Poetry
Her poetry was primarily published in the newspapers in which she wrote.
12 poems in El Progreso de Asturias between 1902 and 1903, which appeared on the first page, were generally about love, and were signed by Consuelo Álvarez.
14 poems collected in El País (1909–1919).
One poem in Vida Socialista.
Literary criticism
Monógrafos oratorios de Mariano Aramburu Machado
El huerto de Epiceto de Antonio Zozaya.
Articles on social life and travel
Impresiones de un viaje (1907)
Catalanas (1909–1910)
Veraniegas (1911)
Santanderinas, Aldeanas y Viajeras (1912)
Alicantinas (1913)
Viajeras (1913)
Por tierras gallegas (1916)
Literary prologues and epilogues
Modulaciones de Manuel Camacho Beneytez (1914)
¡Mujeres! Siluetas femeninas de Juan García Cobacho (1930)
Translations from French
Los amores de Gambetta
Novels
La Casona del Pinar. An autobiographical novel, she narrates the life of three generations of the family Hidalgo de Mendoza.
References
1867 births
1959 deaths
Spanish writers
Spanish politicians
Telegraphists
Feminist writers
Spanish journalists
Spanish feminist writers
Spanish feminists
Spanish women journalists
Spanish women writers
Spanish suffragists
19th-century Spanish writers
20th-century Spanish writers
20th-century Spanish people
19th-century Spanish people
|
```scss
@import "../../vars";
.playlist_view_container {
width: 100%;
height: 100%;
margin: 1em 0em;
.playlist {
display: flex;
flex-flow: column;
margin-right: 1em;
}
.playlist_view_info {
display: flex;
flex-flow: row;
margin-bottom: 1em;
img {
width: 15rem;
border-radius: 0.5rem;
box-shadow: 0rem 0rem 1rem 0.5rem rgba($black, 0.4);
}
}
.playlist_header {
display: flex;
flex-flow: column;
justify-content: space-between;
width: 100%;
margin: 0 2rem;
}
.playlist_header_external_source {
display: flex;
flex-flow: row;
justify-content: flex-end;
align-items: center;
}
.playlist_header_external_source_inner {
border-radius: 2em;
text-transform: uppercase;
padding: 0.5em 1em;
color: $white;
background: $purple;
}
.playlist_header_inner {
display: flex;
flex-flow: column;
justify-content: flex-end;
}
.playlist_header_label {
font-variant: all-small-caps;
letter-spacing: 2px;
font-size: 1.5rem;
margin-bottom: 0.5rem;
}
.playlist_name {
display: flex;
align-items: center;
margin: 0 1rem 1rem 0;
font-size: 40px;
line-height: 40px;
font-weight: bold;
button {
margin-left: 1rem;
border: 1px solid rgba($white, 0.3);
&:hover,
&:active,
&:focus {
i {
color: rgba($black, 0.9);
}
}
}
i {
color: rgba($white, 0.6);
}
}
.playlist_details {
display: flex;
flex-flow: row;
margin-bottom: 1em;
color: rgba($white, 0.6);
span {
margin-right: 0.5em;
}
}
.playlist_buttons {
display: flex;
flex-flow: row;
padding-bottom: 1rem;
.play_button {
text-transform: uppercase;
margin-right: 1em;
padding-left: 2em;
padding-right: 2em;
}
.more_button {
i {
margin: 0 !important;
}
}
.delete_button {
background: $red;
color: $white;
border-radius: 1.5rem;
text-transform: uppercase;
margin-right: 2rem;
}
}
.playlist_tracks {
margin: 1rem;
}
.playlist_track {
display: flex;
flex-flow: row;
border-bottom: 1px solid rgba($lightbg, 0.4);
&:first-child {
border-top: 1px solid rgba($lightbg, 0.4);
}
}
}
```
|
```verilog
module RAM64X1D (
output DPO, SPO,
input D, WCLK, WE,
input A0, A1, A2, A3, A4, A5,
input DPRA0, DPRA1, DPRA2, DPRA3, DPRA4, DPRA5
);
parameter INIT = 64'h0;
parameter IS_WCLK_INVERTED = 1'b0;
endmodule
module RAM128X1D (
output DPO, SPO,
input D, WCLK, WE,
input [6:0] A, DPRA
);
parameter INIT = 128'h0;
parameter IS_WCLK_INVERTED = 1'b0;
endmodule
```
|
Peter Williams Gautier (born September 25, 1965) is a United States Coast Guard vice admiral who serves as the deputy commandant for operations. He previously served as the deputy commander of the Coast Guard Pacific Area.
In April 2022, he was nominated for promotion to vice admiral and appointment as deputy commandant for operations.
References
External links
Living people
United States Coast Guard admirals
1965 births
|
```clojure
(ns quo.components.banners.alert-banner.component-spec
(:require
[quo.components.banners.alert-banner.view :as alert-banner]
[test-helpers.component :as h]))
(h/describe "Alert Banner"
(h/test "Render without props is not throwing any error"
(h/render [alert-banner/view {}])
(h/is-truthy (h/query-by-label-text :alert-banner)))
(h/test "Button is not displayed when :action? prop is false"
(h/render [alert-banner/view {}])
(h/is-falsy (h/query-by-label-text :button)))
(h/test "Button is displayed when :action? prop is true"
(h/render [alert-banner/view {:action? true}])
(h/is-truthy (h/query-by-label-text :button)))
(h/test "Button text is displayed when :action? prop is true and :button-text prop is set"
(h/render [alert-banner/view
{:action? true
:button-text "button"}])
(h/is-truthy (h/get-by-text "button")))
(h/test "Button is called when it's pressed and :action? prop is true"
(let [event (h/mock-fn)]
(h/render [alert-banner/view
{:action? true
:on-button-press event}])
(h/fire-event :press (h/query-by-label-text :button))
(h/was-called event)))
(h/test "Text message is displayed :text prop is passed"
(h/render [alert-banner/view {:text "message"}])
(h/is-truthy (h/get-by-text "message"))))
```
|
```rust
/*
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing,
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* specific language governing permissions and limitations
*/
use std::convert::TryFrom;
use std::ffi::CString;
use std::fmt;
use std::os::raw::c_char;
use std::ptr::NonNull;
use std::sync::atomic::AtomicI32;
use tvm_macros::Object;
use tvm_sys::ffi::{
self, TVMObjectFree, TVMObjectRetain, TVMObjectTypeIndex2Key, TVMObjectTypeKey2Index,
};
use tvm_sys::{ArgValue, RetValue};
use crate::errors::Error;
type Deleter = unsafe extern "C" fn(object: *mut Object) -> ();
/// A TVM intrusive smart pointer header, in TVM all FFI compatible types
/// start with an Object as their first field. The base object tracks
/// a type_index which is an index into the runtime type information
/// table, an atomic reference count, and a customized deleter which
/// will be invoked when the reference count is zero.
///
#[derive(Debug, Object)]
#[ref_name = "ObjectRef"]
#[type_key = "runtime.Object"]
#[repr(C)]
pub struct Object {
/// The index into TVM's runtime type information table.
pub(self) type_index: u32,
// TODO(@jroesch): pretty sure Rust and C++ atomics are the same, but not sure.
// NB: in general we should not touch this in Rust.
/// The reference count of the smart pointer.
pub(self) ref_count: AtomicI32,
/// The deleter function which is used to deallocate the underlying data
/// when the reference count is zero. This field must always be set for
/// all objects.
///
/// The common use case is ensuring that the allocator which allocated the
/// data is also the one that deletes it.
pub(self) fdeleter: Deleter,
}
/// The default deleter for objects allocated in Rust, we use a bit of
/// trait magic here to get a monomorphized deleter for each object
/// "subtype".
///
/// This function just converts the pointer to the correct type
/// and reconstructs a Box which then is dropped to deallocate
/// the underlying allocation.
unsafe extern "C" fn delete<T: IsObject>(object: *mut Object) {
let typed_object: *mut T = object as *mut T;
let boxed: Box<T> = Box::from_raw(typed_object);
drop(boxed);
}
fn derived_from(child_type_index: u32, parent_type_index: u32) -> bool {
let mut is_derived = 0;
crate::check_call!(ffi::TVMObjectDerivedFrom(
child_type_index,
parent_type_index,
&mut is_derived
));
if is_derived == 0 {
false
} else {
true
}
}
impl Object {
fn new(type_index: u32, deleter: Deleter) -> Object {
Object {
type_index,
// NB(@jroesch): I believe it is sound to use Rust atomics
// in conjunction with C++ atomics given the memory model
// is nearly identical.
//
// Of course these are famous last words which I may later
// regret.
ref_count: AtomicI32::new(0),
fdeleter: deleter,
}
}
fn get_type_key(&self) -> String {
let mut cstring: *mut c_char = std::ptr::null_mut();
unsafe {
if TVMObjectTypeIndex2Key(self.type_index, &mut cstring as *mut _) != 0 {
panic!("{}", crate::get_last_error());
}
return CString::from_raw(cstring)
.into_string()
.expect("type keys should be valid utf-8");
}
}
fn get_type_index<T: IsObject>() -> u32 {
let type_key = T::TYPE_KEY;
let cstring = CString::new(type_key).expect("type key must not contain null characters");
// TODO(@jroesch): look into TVMObjectTypeKey2Index.
if type_key == "runtime.Object" {
return 0;
} else {
let mut index = 0;
unsafe {
if TVMObjectTypeKey2Index(cstring.as_ptr(), &mut index) != 0 {
panic!("{}", crate::get_last_error())
}
}
return index;
}
}
pub fn count(&self) -> i32 {
// need to do atomic read in C++
// ABI compatible atomics is funky/hard.
self.ref_count.load(std::sync::atomic::Ordering::Relaxed)
}
/// Allocates a base object value for an object subtype of type T.
/// By using associated constants and generics we can provide a
/// type indexed abstraction over allocating objects with the
/// correct index and deleter.
pub fn base<T: IsObject>() -> Object {
let index = Object::get_type_index::<T>();
Object::new(index, delete::<T>)
}
/// Increases the object's reference count by one.
pub(self) fn inc_ref(&self) {
let raw_ptr = self as *const Object as *mut Object as *mut std::ffi::c_void;
unsafe {
assert_eq!(TVMObjectRetain(raw_ptr), 0);
}
}
/// Decreases the object's reference count by one.
pub(self) fn dec_ref(&self) {
let raw_ptr = self as *const Object as *mut Object as *mut std::ffi::c_void;
unsafe {
assert_eq!(TVMObjectFree(raw_ptr), 0);
}
}
}
/// An unsafe trait which should be implemented for an object
/// subtype.
///
/// The trait contains the type key needed to compute the type
/// index, a method for accessing the base object given the
/// subtype, and a typed delete method which is specialized
/// to the subtype.
pub unsafe trait IsObject: AsRef<Object> + std::fmt::Debug {
const TYPE_KEY: &'static str;
}
/// A smart pointer for types which implement IsObject.
/// This type directly corresponds to TVM's C++ type ObjectPtr<T>.
///
/// See object.h for more details.
#[repr(C)]
pub struct ObjectPtr<T: IsObject> {
pub ptr: NonNull<T>,
}
impl ObjectPtr<Object> {
pub fn from_raw(object_ptr: *mut Object) -> Option<ObjectPtr<Object>> {
let non_null = NonNull::new(object_ptr);
non_null.map(|ptr| {
debug_assert!(unsafe { ptr.as_ref().count() } >= 0);
ObjectPtr { ptr }
})
}
}
impl<T: IsObject> Clone for ObjectPtr<T> {
fn clone(&self) -> Self {
unsafe { self.ptr.as_ref().as_ref().inc_ref() }
ObjectPtr { ptr: self.ptr }
}
}
impl<T: IsObject> Drop for ObjectPtr<T> {
fn drop(&mut self) {
unsafe { self.ptr.as_ref().as_ref().dec_ref() }
}
}
impl<T: IsObject> ObjectPtr<T> {
pub fn leak<'a>(object_ptr: ObjectPtr<T>) -> &'a mut T
where
T: 'a,
{
unsafe { &mut *std::mem::ManuallyDrop::new(object_ptr).ptr.as_ptr() }
}
pub fn new(object: T) -> ObjectPtr<T> {
object.as_ref().inc_ref();
let object_ptr = Box::new(object);
let object_ptr = Box::leak(object_ptr);
let ptr = NonNull::from(object_ptr);
ObjectPtr { ptr }
}
pub fn count(&self) -> i32 {
// need to do atomic read in C++
// ABI compatible atomics is funky/hard.
self.as_ref()
.ref_count
.load(std::sync::atomic::Ordering::Relaxed)
}
/// This method avoid running the destructor on self once it's dropped, so we don't accidentally release the memory
unsafe fn cast<U: IsObject>(self) -> ObjectPtr<U> {
let ptr = self.ptr.cast();
std::mem::forget(self);
ObjectPtr { ptr }
}
pub fn upcast<U>(self) -> ObjectPtr<U>
where
U: IsObject,
T: AsRef<U>,
{
unsafe { self.cast() }
}
pub fn downcast<U>(self) -> Result<ObjectPtr<U>, Error>
where
U: IsObject + AsRef<T>,
{
let child_index = Object::get_type_index::<U>();
let object_index = self.as_ref().type_index;
let is_derived = if child_index == object_index {
true
} else {
// TODO(@jroesch): write tests
derived_from(object_index, child_index)
};
if is_derived {
Ok(unsafe { self.cast() })
} else {
let type_key = self.as_ref().get_type_key();
Err(Error::downcast(type_key.into(), U::TYPE_KEY))
}
}
pub unsafe fn into_raw(self) -> *mut T {
self.ptr.as_ptr()
}
pub unsafe fn as_ptr(&self) -> *mut T {
self.ptr.as_ptr()
}
}
impl<T: IsObject> std::ops::Deref for ObjectPtr<T> {
type Target = T;
fn deref(&self) -> &Self::Target {
unsafe { self.ptr.as_ref() }
}
}
impl<T: IsObject> fmt::Debug for ObjectPtr<T> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
use std::ops::Deref;
write!(f, "{:?}", self.deref())
}
}
impl<'a, T: IsObject> From<ObjectPtr<T>> for RetValue {
fn from(object_ptr: ObjectPtr<T>) -> RetValue {
let raw_object_ptr = ObjectPtr::leak(object_ptr) as *mut T as *mut std::ffi::c_void;
assert!(!raw_object_ptr.is_null());
RetValue::ObjectHandle(raw_object_ptr)
}
}
impl<'a, T: IsObject> TryFrom<RetValue> for ObjectPtr<T> {
type Error = Error;
fn try_from(ret_value: RetValue) -> Result<ObjectPtr<T>, Self::Error> {
use crate::ffi::DLTensor;
use crate::ndarray::NDArrayContainer;
match ret_value {
RetValue::ObjectHandle(handle) | RetValue::ModuleHandle(handle) => {
let optr = ObjectPtr::from_raw(handle as *mut Object).ok_or(Error::Null)?;
debug_assert!(optr.count() >= 1);
optr.downcast()
}
RetValue::NDArrayHandle(handle) => {
let optr: ObjectPtr<NDArrayContainer> =
NDArrayContainer::from_raw(handle as *mut DLTensor).ok_or(Error::Null)?;
debug_assert!(optr.count() >= 1);
optr.upcast::<Object>().downcast()
}
_ => Err(Error::downcast(format!("{:?}", ret_value), T::TYPE_KEY)),
}
}
}
impl<'a, T: IsObject> From<&'a ObjectPtr<T>> for ArgValue<'a> {
fn from(object_ptr: &'a ObjectPtr<T>) -> ArgValue<'a> {
debug_assert!(object_ptr.count() >= 1);
let object_ptr = object_ptr.clone().upcast::<Object>();
match T::TYPE_KEY {
"runtime.NDArray" => {
use crate::ndarray::NDArrayContainer;
let dcast_ptr = object_ptr.downcast().unwrap();
let raw_ptr = NDArrayContainer::as_mut_ptr(&dcast_ptr) as *mut std::ffi::c_void;
assert!(!raw_ptr.is_null());
ArgValue::NDArrayHandle(raw_ptr)
}
"runtime.Module" => {
let raw_ptr = unsafe { object_ptr.as_ptr() } as *mut std::ffi::c_void;
assert!(!raw_ptr.is_null());
ArgValue::ModuleHandle(raw_ptr)
}
_ => {
let raw_ptr = unsafe { object_ptr.as_ptr() } as *mut std::ffi::c_void;
assert!(!raw_ptr.is_null());
ArgValue::ObjectHandle(raw_ptr)
}
}
}
}
impl<'a, T: IsObject> TryFrom<ArgValue<'a>> for ObjectPtr<T> {
type Error = Error;
fn try_from(arg_value: ArgValue<'a>) -> Result<ObjectPtr<T>, Self::Error> {
use crate::ffi::DLTensor;
use crate::ndarray::NDArrayContainer;
match arg_value {
ArgValue::ObjectHandle(handle) | ArgValue::ModuleHandle(handle) => {
let optr = ObjectPtr::from_raw(handle as *mut Object).ok_or(Error::Null)?;
optr.inc_ref();
// We are building an owned, ref-counted view into the underlying ArgValue, in order to be safe we must
// bump the reference count by one.
assert!(optr.count() >= 1);
optr.downcast()
}
ArgValue::NDArrayHandle(handle) => {
let optr =
NDArrayContainer::from_raw(handle as *mut DLTensor).ok_or(Error::Null)?;
// We are building an owned, ref-counted view into the underlying ArgValue, in order to be safe we must
// bump the reference count by one.
assert!(optr.count() >= 1);
// TODO(@jroesch): figure out if there is a more optimal way to do this
let object = optr.upcast::<Object>();
object.inc_ref();
object.downcast()
}
_ => Err(Error::downcast(format!("{:?}", arg_value), "ObjectHandle")),
}
}
}
impl<T: IsObject> std::hash::Hash for ObjectPtr<T> {
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
state.write_i64(
super::structural_hash(ObjectRef(Some(self.clone().upcast())), false).unwrap(),
)
}
}
impl<T: IsObject> PartialEq for ObjectPtr<T> {
fn eq(&self, other: &Self) -> bool {
let lhs = ObjectRef(Some(self.clone().upcast()));
let rhs = ObjectRef(Some(other.clone().upcast()));
super::structural_equal(lhs, rhs, false, false).unwrap()
}
}
impl<T: IsObject> Eq for ObjectPtr<T> {}
#[cfg(test)]
mod tests {
use super::{Object, ObjectPtr};
use anyhow::{ensure, Result};
use std::convert::TryInto;
use tvm_sys::{ArgValue, RetValue};
#[test]
fn test_new_object() -> anyhow::Result<()> {
let object = Object::base::<Object>();
let ptr = ObjectPtr::new(object);
assert_eq!(ptr.count(), 1);
Ok(())
}
#[test]
fn test_leak() -> anyhow::Result<()> {
let ptr = ObjectPtr::new(Object::base::<Object>());
assert_eq!(ptr.count(), 1);
let object = ObjectPtr::leak(ptr);
assert_eq!(object.count(), 1);
Ok(())
}
#[test]
fn test_clone() -> anyhow::Result<()> {
let ptr = ObjectPtr::new(Object::base::<Object>());
assert_eq!(ptr.count(), 1);
let ptr2 = ptr.clone();
assert_eq!(ptr2.count(), 2);
drop(ptr);
assert_eq!(ptr2.count(), 1);
Ok(())
}
#[test]
fn roundtrip_retvalue() -> Result<()> {
let ptr = ObjectPtr::new(Object::base::<Object>());
assert_eq!(ptr.count(), 1);
let ret_value: RetValue = ptr.clone().into();
let ptr2: ObjectPtr<Object> = ret_value.try_into()?;
assert_eq!(ptr.count(), ptr2.count());
assert_eq!(ptr.count(), 2);
ensure!(
ptr.type_index == ptr2.type_index,
"type indices do not match"
);
ensure!(
ptr.fdeleter == ptr2.fdeleter,
"objects have different deleters"
);
// After dropping the second pointer we should only see only refcount.
drop(ptr2);
assert_eq!(ptr.count(), 1);
Ok(())
}
#[test]
fn roundtrip_argvalue() -> Result<()> {
let ptr = ObjectPtr::new(Object::base::<Object>());
assert_eq!(ptr.count(), 1);
let ptr_clone = ptr.clone();
assert_eq!(ptr.count(), 2);
let arg_value: ArgValue = (&ptr_clone).into();
assert_eq!(ptr.count(), 2);
let ptr2: ObjectPtr<Object> = arg_value.try_into()?;
assert_eq!(ptr2.count(), 3);
assert_eq!(ptr.count(), ptr2.count());
drop(ptr_clone);
assert_eq!(ptr.count(), 2);
ensure!(
ptr.type_index == ptr2.type_index,
"type indices do not match"
);
ensure!(
ptr.fdeleter == ptr2.fdeleter,
"objects have different deleters"
);
// After dropping the second pointer we should only see only refcount.
drop(ptr2);
assert_eq!(ptr.count(), 1);
Ok(())
}
fn test_fn_raw<'a>(
mut args: crate::to_function::ArgList<'a>,
) -> crate::function::Result<RetValue> {
let v: ArgValue = args.remove(0);
let v2: ArgValue = args.remove(0);
// assert_eq!(o.count(), 2);
let o: ObjectPtr<Object> = v.try_into().unwrap();
assert_eq!(o.count(), 2);
let o2: ObjectPtr<Object> = v2.try_into().unwrap();
assert_eq!(o2.count(), 3);
drop(o2);
assert_eq!(o.count(), 2);
Ok(o.into())
}
#[test]
fn test_ref_count_raw_fn() {
use super::*;
use crate::function::{register_untyped, Function};
let ptr = ObjectPtr::new(Object::base::<Object>());
// Call the function without the wrapping for TVM.
assert_eq!(ptr.count(), 1);
let same = test_fn_raw(vec![(&ptr).into(), (&ptr).into()]).unwrap();
let output: ObjectPtr<Object> = same.try_into().unwrap();
assert_eq!(output.count(), 2);
drop(output);
assert_eq!(ptr.count(), 1);
register_untyped(test_fn_raw, "test_fn_raw", true).unwrap();
let raw_func = Function::get("test_fn_raw").unwrap();
let output = raw_func.invoke(vec![(&ptr).into(), (&ptr).into()]).unwrap();
let output: ObjectPtr<Object> = output.try_into().unwrap();
assert_eq!(output.count(), 2);
drop(output);
assert_eq!(ptr.count(), 1);
}
fn test_fn_typed(o: ObjectPtr<Object>, o2: ObjectPtr<Object>) -> ObjectPtr<Object> {
assert_eq!(o.count(), 3);
assert_eq!(o2.count(), 3);
drop(o2);
assert_eq!(o.count(), 2);
return o;
}
#[test]
fn test_ref_count_typed() {
use super::*;
use crate::function::{register, Function};
let ptr = ObjectPtr::new(Object::base::<Object>());
// Call the function without the wrapping for TVM.
assert_eq!(ptr.count(), 1);
let output = test_fn_typed(ptr.clone(), ptr.clone());
assert_eq!(output.count(), 2);
drop(output);
assert_eq!(ptr.count(), 1);
register(test_fn_typed, "test_fn_typed").unwrap();
let typed_func = Function::get("test_fn_typed").unwrap();
let output = typed_func
.invoke(vec![(&ptr).into(), (&ptr).into()])
.unwrap();
let output: ObjectPtr<Object> = output.try_into().unwrap();
assert_eq!(output.count(), 2);
drop(output);
assert_eq!(ptr.count(), 1);
}
}
```
|
The 1937–38 season was the seventh season of competitive association football in the Football League played by Chester, an English club based in Chester, Cheshire.
It was the club's seventh consecutive season in the Third Division North since the election to the Football League. Alongside competing in the league, the club also participated in the FA Cup and the Welsh Cup.
Football League
Results summary
Results by matchday
Matches
FA Cup
Chester along with Millwall and Notts County were given a bye to the Third round.
Welsh Cup
Season statistics
References
1937-38
English football clubs 1937–38 season
|
Últimos días de la víctima may refer to:
Últimos días de la víctima (novel), a 1979 Argentine novel
Últimos días de la víctima (film), a 1982 film adaptation of the novel
|
Gaspard Robert (1722-1799) was the founder of a factory that made faience in Marseille, France, between 1750 and 1793.
History
Joseph Gaspard Robert first worked in a porcelain factory, and then returned to Marseille in 1750.
Robert operated a factory from about 1750 to 1793.
He collaborated with André Estieu, whom his mother had married after being widowed.
He took over from 1761, and led the pottery into a prodigious expansion. Married to Marguerite Defléchis, he did not have children and devoted himself entirely to his profession. Receiving numerous disciples, he was constantly expanding. In 1773 he teamed up with John Jacob Dortu from Berlin for the production of porcelain.
This production was mainly a range of small objects for use for snacks between meals or for parts of a service.
In 1777 Joseph Gaspard Robert was visited by the Count of Provence, later Louis XVIII of France,
who found that he was busily engaged in manufacturing porcelain. His work included large vases decorated with relief work and bouquets of flowers. Entire sets of tableware were being ordered for shipment abroad.
His factory exported to Northern Europe and England, where his links with Freemasonry opened opportunities for him.
In 1789, he was elected deputy to represent the potters. Faced with the economic crisis of the time, he was forced to cease operations in 1794.
Products
Robert imitated the high-relief decorative style of la Veuve Perrin. He also produced plates with finely painted landscapes in their center, and after 1773 also made porcelain.
He used a less formal style derived from the Rouen manufactory, the style rayonnant.
The Robert pottery products typically use monochrome sepia, green, pink or blue decorations, or multicolored landscapes, animals, fish or flowers.
Gallery
The Musée de la Faïence de Marseille has an important collection of work by Gaspard Robert.
References
Citations
Sources
Ceramics manufacturers of France
1722 births
1799 deaths
Companies based in Marseille
Faience of France
|
Operation MB8 was a British Royal Navy operation in the Mediterranean Sea from 4 to 11 November 1940. It was made up of six forces comprising two aircraft carriers, five battleships, 10 cruisers and 30 destroyers, including much of Force H from Gibraltar, protecting four supply convoys.
It consisted of Operation Coat, Operation Crack, Convoy MW 3, Convoy ME 3, Convoy AN 6 and the main element, Battle of Taranto (Operation Judgement).
Operation Coat
Operation Coat was a reinforcement convoy from Britain to Malta, carrying troops and anti-aircraft guns. The convoy was made up of the battleship , heavy cruisers and and three escorting destroyers. It was covered by the aircraft carrier , light cruiser and three more destroyers, all from Force H, out to mid-Mediterranean; three Force H destroyers would remain, the rest turning back from Sicily.
Convoy MW 3
Convoy MW 3 was made up of three empty merchantmen bound for Malta from Alexandria, plus an Australian destroyer and the monitor bound for the base at Suda Bay in Crete. The convoy was escorted by the anti-aircraft cruiser , accompanied by three destroyers. The convoy left Alexandria on 4 November and reached Malta on 10 November.
Convoy ME 3
Convoy ME 3 comprised four merchantmen sailing in ballast from Malta to Alexandria, under escort of the battleship , Coventry, and two destroyers. The convoy sailed from Malta on 10 November and arrived in Alexandria on 13 November.
Convoy AN 6
Convoy AN 6 consisted of four slow tankers bound for Greece from Egypt, in support of the British expedition there, escorted by a slow trawler.
Shaping a similar course were reinforcements for Crete, embarked in the light cruisers and as Force B, while Force C, the light cruiser (Vice Admiral Henry Pridham-Wippell) transported RAF supplies to Greece and inspected Suda Bay. All three would rejoin to form Force X for an 11/12 November raid on the Otranto Strait.
Operation Crack
Operation Crack was an attack on Cagliari by aircraft from Ark Royal, en route to Malta, branching off from Operation Coat.
Operation Judgement
Operation Judgement, under the command of Admiral Andrew Cunningham, was executed by aircraft from the carrier , escorted by battleships Ramilies, , and . They met the heavy cruiser , the light cruiser and three destroyers, then escorting Convoy MW 3, and provided cover. A rendezvous with the Barham group from Operation Coat was to be met, with Illustrious, Gloucester, York and Berwick detaching to attack Taranto, coincident with the Force X raid.
The Italians were aware of sorties from Alexandria and Gibraltar by 7 November and sent nine submarines to attack a Malta convoy (MW 3) detected on 8 November. Bombers (unsurprisingly) failed even to pinpoint the Judgement force and when Force H was detected headed back toward Gibraltar on 9 November, the Italians presumed MW 3 had turned around, too.
Italian confusion arose when Barham, Berwick, Glasgow and their destroyers were detected 10 November off Lemnos. The correct deduction, they had detached from the Gibraltar-bound force, was not accompanied by a correct guess they would join with Cunningham. The same day, Ramillies, Coventry and two destroyers protecting ME 3 were detected and again, bombers failed even to locate them.
The complexity of Operation MB8, with its various forces and convoys, deceived the Italians into thinking only normal convoying was underway. While Italian reconnaissance was characteristically bad, in the end, the Italians had only failed to keep track of Illustrious. That the Italians expected the British to behave in what was, at the time, their usual way was the root of the mistake.
See also
Battle of the Mediterranean
Malta Convoys
Force H
Notes
References
Naval battles and operations of the European theatre of World War II
MB8
MB8
Naval aviation operations and battles
Conflicts in 1940
1940 in Italy
November 1940 events
|
Maija (Majlis) Grotell (August 19, 1899 — December 6, 1973) was an influential Finnish-American ceramic artist and educator. She is often described as the "Mother of American Ceramics."
Early life and education
Finland
Maija Grotell was born in Helsinki, Finland. She completed six years of graduate work at the University of Art and Design Helsinki housed in the Ateneum. Grotell supported herself during her graduate career by working as a textile designer and working for the Finnish National Museum. Unable to find work after graduation, Grotell left Finland for New York in 1927. She choose the United States because it was less regulated and offered more opportunities for ceramists and women. Grotell later recalled that "after three days in New York, just with the phone, I had a job."
United States
During her first summer in the United States, Maija Grotell travelled to Alfred University to work with Charles Fergus Binns. She clashed with Binns on his teaching methodology, preferring the potter's wheel to Binns's constructive method. Wheel thrown ceramics were not common in the United States at the time; American potters commonly used coiling, slip casting, or slab building. Grotell, and other European émigrés like Gertrude and Otto Natzler and Marguerite Wildenhain, were largely responsible for bringing European wheel thrown techniques to the United States. Her skill with the potter's wheel proved beneficial for Grotell; she was often asked to demonstrate the technique and could easily find work teaching throughout New York City. In 1938, Grotell took a position as the head of the ceramics program at Cranbrook Academy of Art in Bloomfield Hills, Michigan. Grotell was hesitant to take the position at Cranbrook. She had initially been declined for the post because the school preferred a male instructor. When the position was offered to her the following year, Grotell feared she could lose her independence as a single woman and credit for her success would be attributed to her male colleagues.
Cranbrook Academy of Art
At Cranbrook, Grotell worked primarily with high-fire glazes and stoneware clay bodies. Over her three-decade career, she was an avid experimenter; investigating a variety of glaze chemistries, kilns, and clay bodies. Her glaze formulas remain an important part of her legacy—influencing generations of students and paving the way for the use of ceramics in architecture after her colleague Eero Saarinen used her glazes for the exterior of the General Motors Technical Center.
As an educator, Grotell was an innovative and dedicated instructor. She discouraged imitation and promoted her students to develop their individual aesthetic. Grotell was known to work all night at the studio on her own ceramics after teaching, quickly returning home to change cloths and then return to the studio before anyone arrived. Her dedicated work ethic eventually took its toll; in the early 1960s she developed a muscle condition that limited her ability to throw, which impacted her creative production. By the time she retired from Cranbrook in 1966, she had developed the ceramics department into one of the most prominent in the United States. She was responsible for training many leading ceramists, including Marie Woo, Jan Sultz, Richard De Vore, John Parker Glick, Howard Kottler, Suzanne Stephenson and John Stephenson, Toshiko Takaezu, and Jeff Schlanger.
Awards and creative work
Though Maija Grotell faced significant barriers due to being a single woman, she proved to be very successful. In 1929 she received the Diploma di Colabrador at the Barcelona International Exhibition. In 1936 she was the first woman to win a prize in the Ceramic National and in 1938 was named a master craftsman by the Boston Society of the Arts and Crafts. In 1937, she received the silver medal at the Paris International Exhibition. Her work was shown nationally at a time when ceramics were not often exhibited. She continued to participate in the Ceramic National every year between 1933 and 1960. Today her work can be found in many prominent museums' collections, including the Metropolitan Museum of Art, the Smart Museum of Art, the Museum of Art and Design, the Canton Museum of Art, the Brooklyn Museum, the David Owsley Museum of Art, the Los Angeles County Museum of Art, the Detroit Institute of Arts, the Carnegie Museum of Art, the Museum of Fine Arts, Boston, the Cranbrook Art Museum, the University of Michigan Museum of Art, the Yale University Art Gallery, and the Art Institute of Chicago.
References
Further reading
Lynn, Martha Drexler: American Studio Ceramics: Innovation and Identity, 1940 to 1979. New Haven: Yale University Press, 2015.
Koplos, Janet & Metcalf, Bruce: Makers: A History of American Studio Craft. Chapel Hill: The University of North Carolina Press, 2010.
Schlanger, Jeff & Takaezu, Toshiko: Maija Grotell: Works Which Grow from Belief. Goffstown: Studio Potter, 1996.
External links
Maija Grotell Papers. Special Collections Research Center, Syracuse University.
Ceramics Today. Featured Artist.
Studio Potter Magazine. Book Review.
1899 births
1973 deaths
20th-century American women artists
20th-century American ceramists
New York State College of Ceramics alumni
American women ceramists
Artists from Helsinki
Artists from Michigan
Cranbrook Academy of Art faculty
Finnish emigrants to the United States
People from Pontiac, Michigan
Finnish women ceramists
Naturalized citizens of the United States
20th-century American women educators
20th-century American educators
American art educators
American women academics
|
Bulwell Forest is a tram stop on the Nottingham Express Transit (NET) light rail system in the city of Nottingham in the suburb of Bulwell. It is part of the NET's initial system, and is situated on the long single line section between Bulwell and Hucknall tram stops that runs alongside the Robin Hood railway line. Like all the other intermediate stops on this section, the stop has a passing loop with an island platform situated between the two tracks of the loop.
With the opening of NET's phase two, Bulwell Forest is now on NET line 1, which runs from Hucknall through the city centre to Beeston and Chilwell. Trams run at frequencies that vary between 4 and 8 trams per hour, depending on the day and time of day.
The tram stop should not be confused with the former Bulwell Forest railway station, which was situated on the, now closed, Great Northern Railway's Nottingham to Shirebrook line, some to the south-east of the tram stop. The Robin Hood line that passes alongside the stop was originally the former Midland Railway route from Nottingham to Worksop, but there has never been a railway station at the stop's location.
There is a road level crossing just to the south of the tram stop, and pedestrian access to the stop is from this crossing. At the crossing, both tram and railway lines are protected by the automatic barriers. #
References
External links
Nottingham Express Transit stops
Railway stations in Great Britain opened in 2004
|
```java
package com.yahoo.docproc.jdisc.metric;
import com.yahoo.jdisc.Metric;
import java.util.Map;
/**
* @author Einar M R Rosenvinge
*/
public class NullMetric implements Metric {
@Override
public void set(String key, Number val, Context ctx) {
}
@Override
public void add(String key, Number val, Context ctx) {
}
@Override
public Context createContext(Map<String, ?> properties) {
return NullContext.INSTANCE;
}
private static class NullContext implements Context {
private static final NullContext INSTANCE = new NullContext();
}
}
```
|
Joseph Philip Robert Murray (born March 6, 1943) is a Canadian retired police officer who served as the 19th commissioner of the Royal Canadian Mounted Police (RCMP) from 1994 to 2000.
Early years
Murray was born in Ottawa, Ontario, and joined the RCMP in 1962. He spent his early career in Saskatchewan.
He attended the University of Regina, where he was awarded the General Proficiency Scholarship in both 1975 and 1976, a Bachelor of Business Administration degree in 1977 and a Certificate in Business Administration in 1978.
Rising in the ranks
Murray became an Inspector in 1979, then joined the A Division in Ottawa. He was made Superintendent in charge of VIP Security and Airport Security in 1986.
He then became Chief Superintendent and Assistant Commissioner in 1988 and finally Deputy Commissioner in the early 1990s before becoming Commissioner in 1994.
Commissioner of RCMP (1994–2000)
During his service as commissioner, Murray established town hall meetings to improve communication within the Force and initiated corporate sponsorship. In 1997 he ended the RCMP's responsibility for airport security, leaving it to local police establishments and private security agencies. He adopted Alternative Dispute Resolution and developed the Mission, Vision, and Values/Shared Leadership Statement which guides the force today.
Murray officially retired from the RCMP in 2000.
References
Former RCMP Commissioners
1943 births
Living people
People from Ottawa
University of Regina alumni
Royal Canadian Mounted Police commissioners
|
Annæus Schjødt (13 February 1920 – 4 November 2014) was a Norwegian barrister.
Personal life
He was born in Aker as a son of Annæus Schjødt (1888–1972) and Hedevig Schjødt, née Petersen (1892–1966). He was a grandson of Attorney General Annæus J. Schjødt. His sister Karen Hedevig Schjødt married chief physician Thorstein Guthe. From 1947 to 1965 he was married to Sissel Anker Olsen (1927–1987), a daughter of Kristofer Anker Olsen and sister of Sossen Krohg. From 1968 to 1976 he was married to Grethe Buck, a daughter of Bertel Otto Steen and Bodil Braathen. After her release in 1976, he married Mossad agent Sylvia Rafael (1937–2005) whom he had defended in 1974 for her participation in the Lillehammer affair. He died aged 94 on 4 November 2014.
Career
He took the examen artium at Riis in 1938 and the cand.jur. degree in 1947. In between he served four years in the air force during the Second World War, in the UK and Canada. He served for two years in No. 331 Squadron RAF. He was decorated with the War Medal, the Defence Medal 1940–1945 and the Haakon VII 70th Anniversary Medal.
He worked as a deputy judge in 1948. He became a junior solicitor in his father's law firm in 1949 and became partner in 1951. From 1953 he was a barrister with access to work with Supreme Court cases. He is especially known for working with the Lillehammer case in 1974, where he defended his future wife Sylvia Rafael. He is also known from several libel cases. He was also chairman of Hjemmet, Knaben Molybdængruber and Braathens SAFE, and a board member of the Norwegian Bar Association, Wittusen & Jensen, Elektrokontakt, Schibstedgruppen, Bertel O. Steen, Ingeniør F. Selmer, Tostrupgaarden, Hotel Bristol, A. Johnson & Co., Avon Rubber, Rank Xerox, Forsikringsselskapet Minerva and Forsikringsselskapet Viking. He retired in 1992, and moved to Pretoria, South Africa with his wife. She died in 2005, and Schjødt moved back to Norway in 2006.
References
1920 births
2014 deaths
Lawyers from Oslo
Norwegian Army Air Service personnel of World War II
Royal Norwegian Air Force personnel of World War II
Norwegian World War II pilots
Norwegian Royal Air Force pilots of World War II
Norwegian expatriates in the United Kingdom
Norwegian expatriates in Canada
Norwegian expatriates in South Africa
|
The Mark Kendall Bingham Memorial Tournament or the Bingham Cup is a biennial international, non-professional, gay rugby union tournament, first held in 2002. It is named after Mark Bingham, who died on board United Airlines Flight 93 when it crashed during the September 11, 2001 attacks. The most recent tournament was held in Ottawa, Canada, in August 2022 and was won by the worlds first gay and inclusive rugby club the Kings Cross Steelers.
History
Founding
In October 2000, gay and bisexual rugby union teams worldwide founded the International Gay Rugby Association and Board (IGRAB) as a body to promote rugby union as an all-inclusive non-discriminatory sport which everyone can play, regardless of sexuality.
An informal invitational tournament, held in May 2001, was formally inaugurated by IGRAB as a new international rugby union competition — a gay rugby union world cup — which in a unanimous decision by all the members of IGRAB became known as the Bingham Cup.
The tournament was named after Mark Bingham, a former University of California, Berkeley rugby star who had played in the May 2001 tournament for San Francisco Fog RFC and cofounded the Gotham Knights RFC. Bingham died in the September 11, 2001 attacks on board United Airlines Flight 93. According to Jon Barrett of The Advocate, he is generally accepted to be one of a group of passengers who fought with the hijackers aboard the flight, which eventually led to the hijackers crashing the plane into a vacant field in Pennsylvania instead of targets in Washington, D.C. At the time of his death, there were around eight gay-inclusive rugby clubs worldwide, and he was helping to create others.
Washington invitational, 2001
In May 2001, in a precursor to the tournament, the Washington Renegades hosted an IGRAB International Invitational for gay rugby union teams in Washington D.C., United States.
The event was officially a Rugby sevens tournament among the existing IGRAB teams at the time. In addition to the tournament, there was an exhibition rugby union or XVs matches. In the exhibition match between the San Francisco Fog RFC and the Renegades, the two played against each other for the first time in a XVs match. The Fog won 19-0.
San Francisco, 2002
In October 2001, following the 2001 invitational, the San Francisco Fog successfully lobbied IGRAB for the right to put on a XVs rugby tournament in San Francisco in June 2002.
The tournament was fashioned in the style of the Rugby World Cup, both the tournament and the cup prize were named in honor of Mark Kendall Bingham, a club founder who died on United Airlines flight 93 during the September 11th terrorist attacks. Later the name Bingham Cup become the informal name.
Eight teams traveled to San Francisco during gay pride weekend of June 28–29, 2002 to compete over two days with the Fog coming out on top as the Cup’s first winners.
The event was sponsored by Nike and Guinness and was covered by press from around the world, including ESPN.
The Fog A side emerged undefeated, defeating the London Kings Cross Steelers 27-5 in the final. Alice Hoagland, Mark Bingham’s mom, presented the Fog with the trophy. The event was profiled in a two-page article in Rugby World magazine.
London, 2004
In May 2004, the Bingham Cup competition was hosted by London, England, club Kings Cross Steelers. From eight teams just two years prior, twenty teams from four countries were fielded for the 2004 cup, which was won for the second time by the San Francisco Fog RFC. During the 2004 cup, the Bingham Bowl Division was introduced, a middle tier award won by the Philadelphia Gryphons. the inaugural bowl was literally a bowl from the kitchen of the Esher RFC in London.
New York, 2006
Hosting of the third Bingham Cup was awarded to New York City's Gotham Knights RFC in October 2004 in a unanimous vote by the International Gay Rugby Association and Board and was held on Randall's Island in New York's East River on Memorial Day weekend, May 26–28, 2006. 29 teams from 22 clubs in 6 countries participated.
The tournament field was divided into 3 divisions, the Bingham Cup for the strongest teams, Bingham Bowl and Bingham Plate. 2006 also included the first ever Women's division, with 2 teams entering.
In March 2006, the Bingham Cup Organizing Committee announced that donations would be made to two charities: The Mark Kendall Bingham Leadership Fund, a scholarship established in Bingham's name at the University of California-Berkeley, his alma mater, and the Flight 93 Memorial Fund administered by the National Park Service to be constructed in Somerset County, Pennsylvania.
Over 800 registered participants from 29 teams in nine countries took part in the largest Bingham Cup tournament to date.
Australia
Sydney Convicts (A & B)
Canada
Muddy York (Toronto)
Ireland
Emerald Warriors (Dublin)
Netherlands
Amsterdam NOP
United Kingdom
Cardiff Lions
Kings Cross Steelers (London)
Manchester Village Spartans RUFC
United States
Austin Lonestars,
Atlanta Bucks,
Chicago Dragons,
Dallas Diablos,
Gotham Knights (New York A & B),
Boston Ironsides,
Los Angeles Rebellion,
Minneapolis Mayhem,
Phoenix Storm,
Philadelphia Gryphons,
Portland Avalanche,
San Francisco Fog (A & B),
Seattle Quake,
Washington Renegades (A & B),
Scottsdale Lady Blues,
Bingham Motleys,
IGR World Barbarians,
Teams participating for the first time included the Cardiff Lions, the Phoenix Storm, the Portland Avalanche, the Chicago Dragons, the Amsterdam NOP, and the Minneapolis Mayhem.
The cup final was between reigning champions San Francisco Fog A and the Sydney Convicts A, who won the game 16-10. Boston Ironsides defeated the Dallas Diablos to win the inaugural Bingham Bowl. Sydney Convicts B beat the IGR World Barbarians to win the Bingham Plate. The final standings for the tournament are as follows:
Bingham Cup Division
Sydney Convicts A
San Francisco Fog A
Washington Renegades A
Gotham Knights A
Seattle Quake
Kings Cross Steelers
Los Angeles Rebellion
Manchester Village Spartans
Bingham Bowl Division
Boston Ironsides
Dallas Diablos
Philadelphia Gryphons
Austin Lonestars
Chicago Dragons
Atlanta Bucks
Portland Avalanche
Emerald Warriors
Bingham Plate Division
Sydney Convicts B
IGR World Barbarians
Washington Renegades B
Gotham Knights B
Minneapolis Mayhem
Cardiff Lions
Phoenix Storm
San Francisco Fog B
Toronto Muddy York
Amsterdam NOP
The 2008 documentary film Walk Like a Man focuses on the Sydney Convicts and San Francisco Fog as they prepare and compete for this Bingham Cup.
Dublin, 2008
On December 1, 2006, IGRAB announced the success of the bid of Emerald Warriors to host the 2008 competition in Dublin Ireland. Other bidding cities included Sydney, Australia, and Paris, France. In addition, Las Vegas, Nevada, Seattle, Washington, Cardiff, Wales, and Toronto, Ontario, Canada also considered bidding to host the 2008 tournament.
The fourth Bingham cup was held in Dublin on the weekend of the 13–16 June, at Dublin City University campus. 32 teams competed across four divisions (the Cup, the Plate, the Bowl and the Shield). The Sydney Convicts (A Team) took the cup back with them to Australia after winning the Cup competition for the second time in a row, this time defeating the Kings Cross Steelers (A Team) in the Cup final. The IGR World Barbarians team, made up largely of the Nashville Grizzlies, beat the Sydney Convicts (B Team) in the Plate final. Belfast team the Ulster Titans won the shield. The Atlanta Bucks defeated the Kings Cross Steelers (B Team) in the Bowl division, making them the only North American team to win a title in this year's tournament.
Minneapolis, 2010
On January 21, 2009, IGRAB announced that the hosting rights for the 2010 Mark Kendall Bingham Memorial Tournament had been awarded to the Minneapolis Mayhem. The tournament was held at the National Sports Center in Blaine, Minnesota, June 17–20, 2010.
The Cup returned to US soil as the 2006 tourney hosts, the Gotham Knights pulled an upset win over the reigning champions, the Sydney Convicts. The 2010 tournament introduced the Crest and Spoon divisions. The Phoenix Storm won the Crest after defeating the Gotham Knights B-Side in the final. The Bingham Spoon was claimed for the first time by the Seattle Quake B when they defeated the Ottawa Wolves in the final.
Manchester, 2012
It was announced on September 29, 2010, that the Manchester Village Spartans RUFC, England, would host the 2012 Bingham Cup, beating the Sydney Convicts' bid by 6 votes. Notably, Manchester's bid was actively supported by straight professional English rugby player Ben Cohen. The competition was held at Broughton Park RUFC, Manchester, June 1–3 and boasted the largest number of inclusive teams in the tournament's history.
Sydney, 2014
In August 2014, the Sydney Convicts brought the Bingham Cup competition to the southern hemisphere. Twenty-four teams traveled to New South Wales, Australia for three rainy days of competition at the home of the Woollahra Colleagues RFC. The home-town Convicts ultimately won the Cup for the second consecutive tournament.
Nashville, 2016
Hosting of the eighth Bingham Cup was awarded to Tennessee's Nashville Grizzlies, marking the first time the tournament would be held in the American South. The tournament was held on Memorial Day weekend at Nashville's Ted Rhodes Park with players housed at Vanderbilt University. Forty-five teams competed for tournament prizes in twelve divisions. The winners of the twelve divisions were as follows (in ascending order):
Challenger Julep - Chicago Dragons B
Challenger Cup - Dallas Lost Souls
Hoagland Spoon - Ottawa Wolves
Hoagland Vase - Kings Cross Steelers C
Hoagland Shield - Nashville Grizzlies A
Hoagland Bowl - Columbus Coyotes
Hoagland Cup - Caledonian Thebans
Hoagland Plate - San Diego Armada
Bingham Shield - Washington Renegades B
Bingham Bowl - IGR World Barbarians
Bingham Plate - Gotham Knights A
Bingham Cup - Melbourne Chargers A
In addition, the Nashville tournament hosted the inaugural Bingham Old Boys match & marked the first awarding of the Bingham Cane for the winning team.
Amsterdam, 2018
Bingham Cup - Sydney Convicts A
Bingham Plate - San Diego Armada
Bingham Bowl - Washington Renegades A
Bingham Shield - Sydney Convicts B
Bingham Vase - Birmingham Bulls A
Bingham Spoon - Amsterdam Lowlanders
Hoagland Cup - Dallas Lost Souls
Hoagland Plate - Charlotte Royals
Hoagland Bowl - Caledonian Thebans
Hoagland Shield - Newcastle Ravens
Hoagland Vase - Les Gaillards Parisiens
Hoagland Spoon - Lisbon Dark Horses
Challenger Cup - Armada Montreal
Challenger Plate - Birmingham Bulls B
Challenger Bowl - Brighton & Hove Sea Serpents
Challenger Shield - St Louis Crusaders
Challenger Spoon - Portland Lumberjacks
Ottawa, 2020
On October 4, 2018, IGR announced that the 2020 Bingham Cup was awarded to the Ottawa Wolves and that the tournament would be played in Ottawa, Ontario, Canada. Ottawa was to be the first city in Canada to host the tournament, which was originally scheduled to be played August 8–17, 2020.
On March 28, 2020, IGR announced that the 2020 Bingham Cup was postponed until August 2022 because of the Covid-19 outbreak.
Ottawa, 2022
The 10th edition of Bingham begins August 18th.
Rome, 2024
The 11th edition of Bingham will be held in Rome, from the 23rd to the 26th of May 2024.
Tournament Summary
See also
Union Cup
References
External links
Bingham Cup website
IGRAB the International Gay Rugby Union & Board Site
Newsday
Outsports.com tournament report
Reuters news story and video
International rugby union competitions
Rugby union tournaments for clubs
2018 rugby union tournaments for clubs
|
```python
#
#
# path_to_url
#
# Unless required by applicable law or agreed to in writing, software
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
import os
import sys
def GenerateFileStructureForFinalDygraph(eager_dir):
"""
paddle/fluid/eager
|- generated
| |- CMakeLists.txt
| | "add_subdirectory(forwards), add_subdirectory(backwards)"
|
| |- forwards
| |- "dygraph_functions.cc"
| |- "dygraph_functions.h"
|
| |- backwards
| |- "nodes.cc"
| |- "nodes.h"
"""
# Directory Generation
generated_dir = os.path.join(eager_dir, "api/generated/eager_generated")
forwards_dir = os.path.join(generated_dir, "forwards")
nodes_dir = os.path.join(generated_dir, "backwards")
dirs = [generated_dir, forwards_dir, nodes_dir]
for directory in dirs:
if not os.path.exists(directory):
os.mkdir(directory)
# Empty files
dygraph_forward_api_h_path = os.path.join(
generated_dir, "dygraph_functions.h"
)
empty_files = [dygraph_forward_api_h_path]
empty_files.append(os.path.join(forwards_dir, "dygraph_functions.cc"))
empty_files.append(os.path.join(nodes_dir, "nodes.cc"))
empty_files.append(os.path.join(nodes_dir, "nodes.h"))
for path in empty_files:
if not os.path.exists(path):
open(path, 'a').close()
def GenerateFileStructureForIntermediateDygraph(eager_dir, split_count):
"""
paddle/fluid/eager
|- generated
| |- CMakeLists.txt
| | "add_subdirectory(forwards), add_subdirectory(nodes)"
|
| |- forwards
| |- "dygraph_forward_functions.cc"
| |- CMakeLists.txt
| | "cc_library(dygraph_function SRCS dygraph_forward_functions.cc DEPS ${eager_deps} ${fluid_deps} GLOB_OP_LIB)"
|
| |- nodes
| |- "nodes.cc"
| |- "nodes.h"
| |- CMakeLists.txt
| | "cc_library(dygraph_node SRCS nodes.cc DEPS ${eager_deps} ${fluid_deps})"
|
| |- dygraph_forward_api.h
"""
# Directory Generation
generated_dir = os.path.join(eager_dir, "api/generated/fluid_generated")
forwards_dir = os.path.join(generated_dir, "forwards")
nodes_dir = os.path.join(generated_dir, "nodes")
dirs = [generated_dir, forwards_dir, nodes_dir]
for directory in dirs:
if not os.path.exists(directory):
os.mkdir(directory)
# Empty files
dygraph_forward_api_h_path = os.path.join(
generated_dir, "dygraph_forward_api.h"
)
empty_files = [dygraph_forward_api_h_path]
empty_files.append(os.path.join(nodes_dir, "nodes.h"))
for i in range(split_count):
empty_files.append(
os.path.join(
forwards_dir, "dygraph_forward_functions" + str(i + 1) + ".cc"
)
)
empty_files.append(
os.path.join(nodes_dir, "nodes" + str(i + 1) + ".cc")
)
empty_files.append(
os.path.join(forwards_dir, "dygraph_forward_functions_args_info.cc")
)
empty_files.append(
os.path.join(
forwards_dir, "dygraph_forward_functions_args_type_info.cc"
)
)
empty_files.append(
os.path.join(forwards_dir, "dygraph_forward_functions_returns_info.cc")
)
for path in empty_files:
if not os.path.exists(path):
open(path, 'a').close()
# CMakeLists
nodes_level_cmakelist_path = os.path.join(nodes_dir, "CMakeLists.txt")
generated_level_cmakelist_path = os.path.join(
generated_dir, "CMakeLists.txt"
)
forwards_level_cmakelist_path = os.path.join(forwards_dir, "CMakeLists.txt")
with open(nodes_level_cmakelist_path, "w") as f:
f.write("add_custom_target(\n")
f.write(" copy_dygraph_node\n")
f.write(
' COMMAND ${CMAKE_COMMAND} -E copy_if_different "${PADDLE_SOURCE_DIR}/paddle/fluid/eager/api/generated/fluid_generated/nodes/nodes.tmp.h" "${PADDLE_SOURCE_DIR}/paddle/fluid/eager/api/generated/fluid_generated/nodes/nodes.h"\n'
)
for i in range(split_count):
f.write(
' COMMAND ${CMAKE_COMMAND} -E copy_if_different "${PADDLE_SOURCE_DIR}/paddle/fluid/eager/api/generated/fluid_generated/nodes/nodes'
+ str(i + 1)
+ '.tmp.cc" "${PADDLE_SOURCE_DIR}/paddle/fluid/eager/api/generated/fluid_generated/nodes/nodes'
+ str(i + 1)
+ '.cc"\n'
)
f.write(" DEPENDS legacy_eager_codegen\n")
f.write(" VERBATIM)\n")
f.write("cc_library(dygraph_node SRCS ")
for i in range(split_count):
f.write("nodes" + str(i + 1) + ".cc ")
f.write("${fluid_manual_nodes} DEPS ${eager_deps} ${fluid_deps})\n")
f.write(
"add_dependencies(dygraph_node copy_dygraph_node copy_dygraph_forward_functions)\n"
)
with open(forwards_level_cmakelist_path, "w") as f:
f.write("add_custom_target(\n")
f.write(" copy_dygraph_forward_functions\n")
f.write(
' COMMAND ${CMAKE_COMMAND} -E copy_if_different "${PADDLE_SOURCE_DIR}/paddle/fluid/eager/api/generated/fluid_generated/dygraph_forward_api.tmp.h" "${PADDLE_SOURCE_DIR}/paddle/fluid/eager/api/generated/fluid_generated/dygraph_forward_api.h"\n'
)
for i in range(split_count):
f.write(
' COMMAND ${CMAKE_COMMAND} -E copy_if_different "${PADDLE_SOURCE_DIR}/paddle/fluid/eager/api/generated/fluid_generated/forwards/dygraph_forward_functions'
+ str(i + 1)
+ '.tmp.cc" "${PADDLE_SOURCE_DIR}/paddle/fluid/eager/api/generated/fluid_generated/forwards/dygraph_forward_functions'
+ str(i + 1)
+ '.cc"\n'
)
f.write(
' COMMAND ${CMAKE_COMMAND} -E copy_if_different "${PADDLE_SOURCE_DIR}/paddle/fluid/eager/api/generated/fluid_generated/forwards/dygraph_forward_functions_args_info.tmp.cc" "${PADDLE_SOURCE_DIR}/paddle/fluid/eager/api/generated/fluid_generated/forwards/dygraph_forward_functions_args_info.cc"\n'
)
f.write(
' COMMAND ${CMAKE_COMMAND} -E copy_if_different "${PADDLE_SOURCE_DIR}/paddle/fluid/eager/api/generated/fluid_generated/forwards/dygraph_forward_functions_args_type_info.tmp.cc" "${PADDLE_SOURCE_DIR}/paddle/fluid/eager/api/generated/fluid_generated/forwards/dygraph_forward_functions_args_type_info.cc"\n'
)
f.write(
' COMMAND ${CMAKE_COMMAND} -E copy_if_different "${PADDLE_SOURCE_DIR}/paddle/fluid/eager/api/generated/fluid_generated/forwards/dygraph_forward_functions_returns_info.tmp.cc" "${PADDLE_SOURCE_DIR}/paddle/fluid/eager/api/generated/fluid_generated/forwards/dygraph_forward_functions_returns_info.cc"\n'
)
f.write(" DEPENDS legacy_eager_codegen\n")
f.write(" VERBATIM)\n")
f.write("cc_library(dygraph_function SRCS ")
for i in range(split_count):
f.write("dygraph_forward_functions" + str(i + 1) + ".cc ")
f.write("dygraph_forward_functions_args_info.cc ")
f.write("dygraph_forward_functions_args_type_info.cc ")
f.write("dygraph_forward_functions_returns_info.cc ")
f.write(
"${fluid_manual_functions} DEPS ${eager_deps} ${fluid_deps} ${GLOB_OP_LIB} ${GLOB_OPERATOR_DEPS})\n"
)
f.write(
"add_dependencies(dygraph_function copy_dygraph_forward_functions copy_dygraph_node)\n"
)
with open(generated_level_cmakelist_path, "w") as f:
f.write("add_subdirectory(forwards)\nadd_subdirectory(nodes)")
if __name__ == "__main__":
assert len(sys.argv) == 3
eager_dir = sys.argv[1]
split_count = int(sys.argv[2])
GenerateFileStructureForIntermediateDygraph(eager_dir, split_count)
GenerateFileStructureForFinalDygraph(eager_dir)
```
|
```swift
import GPUImage
import GPUImageV4LCamera
// For now, GLUT initialization is done in the render window, so that must come first in sequence
let renderWindow = GLUTRenderWindow(width:1280, height:720, title:"Simple Video Filter", offscreen:false)
let camera = V4LCamera(size:Size(width:1280.0, height:720.0))
let edgeDetection = SobelEdgeDetection()
camera --> edgeDetection --> renderWindow
camera.startCapture()
renderWindow.loopWithFunction(camera.grabFrame)
```
|
```smalltalk
/*
*
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
using System;
using System.Text;
using NUnit.Framework;
namespace ZXing.Common.ReedSolomon.Test
{
/// <summary>
///
/// </summary>
/// <author>Rustam Abdullaev</author>
[TestFixture]
public sealed class GenericGFPolyTestCase
{
private static readonly GenericGF FIELD = GenericGF.QR_CODE_FIELD_256;
[Test]
public void testPolynomialString()
{
Assert.That(FIELD.Zero.ToString(), Is.EqualTo("0"));
Assert.That(FIELD.buildMonomial(0, -1).ToString(), Is.EqualTo("-1"));
var p = new GenericGFPoly(FIELD, new int[] { 3, 0, -2, 1, 1 });
Assert.That(p.ToString(), Is.EqualTo("a^25x^4 - ax^2 + x + 1"));
p = new GenericGFPoly(FIELD, new int[] { 3 });
Assert.That(p.ToString(), Is.EqualTo("a^25"));
}
[Test]
public void testZero()
{
Assert.That(FIELD.Zero, Is.EqualTo(FIELD.buildMonomial(1, 0)));
Assert.That(FIELD.Zero, Is.EqualTo(FIELD.buildMonomial(1, 2).multiply(0)));
}
}
}
```
|
```c
/* packet-uccrsp.c
* Routines for Upstream Channel Change Response dissection
*
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
*
* This program is free software; you can redistribute it and/or
* as published by the Free Software Foundation; either version 2
*
* 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
*
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
#include <epan/packet.h>
void proto_register_docsis_uccrsp(void);
void proto_reg_handoff_docsis_uccrsp(void);
/* Initialize the protocol and registered fields */
static int proto_docsis_uccrsp = -1;
static int hf_docsis_uccrsp_upchid = -1;
/* Initialize the subtree pointers */
static gint ett_docsis_uccrsp = -1;
/* Dissection */
static int
dissect_uccrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
{
proto_item *it;
proto_tree *uccrsp_tree;
guint8 chid;
chid = tvb_get_guint8 (tvb, 0);
col_add_fstr (pinfo->cinfo, COL_INFO,
"Upstream Channel Change response Channel ID = %u (U%u)",
chid, (chid > 0 ? chid - 1 : chid));
if (tree)
{
it =
proto_tree_add_protocol_format (tree, proto_docsis_uccrsp, tvb, 0, -1,
"UCC Response");
uccrsp_tree = proto_item_add_subtree (it, ett_docsis_uccrsp);
proto_tree_add_item (uccrsp_tree, hf_docsis_uccrsp_upchid, tvb, 0, 1,
ENC_BIG_ENDIAN);
}
return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
void
proto_register_docsis_uccrsp (void)
{
static hf_register_info hf[] = {
{&hf_docsis_uccrsp_upchid,
{"Upstream Channel Id", "docsis_uccrsp.upchid",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
},
};
static gint *ett[] = {
&ett_docsis_uccrsp,
};
proto_docsis_uccrsp =
proto_register_protocol ("DOCSIS Upstream Channel Change Response",
"DOCSIS UCC-RSP", "docsis_uccrsp");
proto_register_field_array (proto_docsis_uccrsp, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
register_dissector ("docsis_uccrsp", dissect_uccrsp, proto_docsis_uccrsp);
}
void
proto_reg_handoff_docsis_uccrsp (void)
{
dissector_handle_t docsis_uccrsp_handle;
docsis_uccrsp_handle = find_dissector ("docsis_uccrsp");
dissector_add_uint ("docsis_mgmt", 0x09, docsis_uccrsp_handle);
}
/*
* Editor modelines - path_to_url
*
* Local Variables:
* c-basic-offset: 2
* tab-width: 8
* indent-tabs-mode: nil
* End:
*
* ex: set shiftwidth=2 tabstop=8 expandtab:
* :indentSize=2:tabSize=8:noTabs=true:
*/
```
|
Korhan Öztürk (born 28 June 1982) is a Turkish former football midfielder.
External links
Guardian Stats Centre
1982 births
Living people
People from Bornova
Sportspeople from İzmir Province
Turkish men's footballers
Turkey men's under-21 international footballers
Turkey men's youth international footballers
Antalyaspor footballers
Kasımpaşa S.K. footballers
Süper Lig players
Footballers from İzmir
Men's association football midfielders
|
```javascript
const toNum = util.toNum;
it('basic', function() {
let sum = function(a, b) {
if (a > 100) {
throw Error('a is bigger than 100');
}
return a + b;
};
expect(sum(2, 5)).to.equal(7);
expect(sum('2', '5')).to.equal('25');
expect(() => sum(105)).to.throw();
let totalSum = 0;
/* eslint-disable no-func-assign */
sum = hookFn(sum, {
before(a, b) {
return [toNum(a), toNum(b)];
},
after(result) {
totalSum += result;
return totalSum;
},
error() {
return totalSum;
}
});
expect(sum('2', '5')).to.equal(7);
expect(sum(2, 5)).to.equal(14);
expect(() => {
expect(sum(105)).to.equal(14);
}).to.not.throw();
});
```
|
```c++
// Use, modification and distribution is subject to the Boost Software
// path_to_url
// Authors: Douglas Gregor
// Nick Edmonds
// Andrew Lumsdaine
// The placement of this #include probably looks very odd relative to
// the #ifndef/#define pair below. However, this placement is
// extremely important to allow the various property map headers to be
// included in any order.
#include <boost/property_map/property_map.hpp>
#ifndef BOOST_PARALLEL_DISTRIBUTED_PROPERTY_MAP_HPP
#define BOOST_PARALLEL_DISTRIBUTED_PROPERTY_MAP_HPP
#include <boost/assert.hpp>
#include <boost/type_traits/is_base_and_derived.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp>
#include <boost/optional.hpp>
#include <boost/property_map/parallel/process_group.hpp>
#include <boost/function/function1.hpp>
#include <vector>
#include <set>
#include <boost/property_map/parallel/basic_reduce.hpp>
#include <boost/property_map/parallel/detail/untracked_pair.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/property_map/parallel/local_property_map.hpp>
#include <map>
#include <boost/version.hpp>
#include <boost/property_map/parallel/unsafe_serialize.hpp>
#include <boost/multi_index_container.hpp>
#include <boost/multi_index/hashed_index.hpp>
#include <boost/multi_index/member.hpp>
#include <boost/multi_index/sequenced_index.hpp>
// Serialization functions for constructs we use
#include <boost/serialization/utility.hpp>
namespace boost { namespace parallel {
namespace detail {
/**************************************************************************
* Metafunction that degrades an Lvalue Property Map category tag to
* a Read Write Property Map category tag.
**************************************************************************/
template<bool IsLvaluePropertyMap>
struct make_nonlvalue_property_map
{
template<typename T> struct apply { typedef T type; };
};
template<>
struct make_nonlvalue_property_map<true>
{
template<typename>
struct apply
{
typedef read_write_property_map_tag type;
};
};
/**************************************************************************
* Performs a "put" on a property map so long as the property map is
* a Writable Property Map or a mutable Lvalue Property Map. This
* is required because the distributed property map's message
* handler handles "put" messages even for a const property map,
* although receipt of a "put" message is ill-formed.
**************************************************************************/
template<bool IsLvaluePropertyMap>
struct maybe_put_in_lvalue_pm
{
template<typename PropertyMap, typename Key, typename Value>
static inline void
do_put(PropertyMap, const Key&, const Value&)
{ BOOST_ASSERT(false); }
};
template<>
struct maybe_put_in_lvalue_pm<true>
{
template<typename PropertyMap, typename Key, typename Value>
static inline void
do_put(PropertyMap pm, const Key& key, const Value& value)
{
using boost::put;
put(pm, key, value);
}
};
template<typename PropertyMap, typename Key, typename Value>
inline void
maybe_put_impl(PropertyMap pm, const Key& key, const Value& value,
writable_property_map_tag)
{
using boost::put;
put(pm, key, value);
}
template<typename PropertyMap, typename Key, typename Value>
inline void
maybe_put_impl(PropertyMap pm, const Key& key, const Value& value,
lvalue_property_map_tag)
{
typedef typename property_traits<PropertyMap>::value_type value_type;
typedef typename property_traits<PropertyMap>::reference reference;
// DPG TBD: Some property maps are improperly characterized as
// lvalue_property_maps, when in fact they do not provide true
// references. The most typical example is those property maps
// built from vector<bool> and its iterators, which deal with
// proxies. We don't want to mischaracterize these as not having a
// "put" operation, so we only consider an lvalue_property_map as
// constant if its reference is const value_type&. In fact, this
// isn't even quite correct (think of a
// vector<bool>::const_iterator), but at present C++ doesn't
// provide us with any alternatives.
typedef is_same<const value_type&, reference> is_constant;
maybe_put_in_lvalue_pm<(!is_constant::value)>::do_put(pm, key, value);
}
template<typename PropertyMap, typename Key, typename Value>
inline void
maybe_put_impl(PropertyMap, const Key&, const Value&, ...)
{ BOOST_ASSERT(false); }
template<typename PropertyMap, typename Key, typename Value>
inline void
maybe_put(PropertyMap pm, const Key& key, const Value& value)
{
maybe_put_impl(pm, key, value,
typename property_traits<PropertyMap>::category());
}
} // end namespace detail
/** The consistency model used by the distributed property map. */
enum consistency_model {
cm_forward = 1 << 0,
cm_backward = 1 << 1,
cm_bidirectional = cm_forward | cm_backward,
cm_flush = 1 << 2,
cm_reset = 1 << 3,
cm_clear = 1 << 4
};
/** Distributed property map adaptor.
*
* The distributed property map adaptor is a property map whose
* stored values are distributed across multiple non-overlapping
* memory spaces on different processes. Values local to the current
* process are stored within a local property map and may be
* immediately accessed via @c get and @c put. Values stored on
* remote processes may also be access via @c get and @c put, but the
* behavior differs slightly:
*
* - @c put operations update a local ghost cell and send a "put"
* message to the process that owns the value. The owner is free to
* update its own "official" value or may ignore the put request.
*
* - @c get operations returns the contents of the local ghost
* cell. If no ghost cell is available, one is created using the
* default value provided by the "reduce" operation. See, e.g.,
* @ref basic_reduce and @ref property_reduce.
*
* Using distributed property maps requires a bit more care than using
* local, sequential property maps. While the syntax and semantics are
* similar, distributed property maps may contain out-of-date
* information that can only be guaranteed to be synchronized by
* calling the @ref synchronize function in all processes.
*
* To address the issue of out-of-date values, distributed property
* maps are supplied with a reduction operation. The reduction
* operation has two roles:
*
* -# When a value is needed for a remote key but no value is
* immediately available, the reduction operation provides a
* suitable default. For instance, a distributed property map
* storing distances may have a reduction operation that returns
* an infinite value as the default, whereas a distributed
* property map for vertex colors may return white as the
* default.
*
* -# When a value is received from a remote process, the process
* owning the key associated with that value must determine which
* value---the locally stored value, the value received from a
* remote process, or some combination of the two---will be
* stored as the "official" value in the property map. The
* reduction operation transforms the local and remote values
* into the "official" value to be stored.
*
* @tparam ProcessGroup the type of the process group over which the
* property map is distributed and is also the medium for
* communication.
*
* @tparam StorageMap the type of the property map that will
* store values for keys local to this processor. The @c value_type of
* this property map will become the @c value_type of the distributed
* property map. The distributed property map models the same property
* map concepts as the @c LocalPropertyMap, with one exception: a
* distributed property map cannot be an LvaluePropertyMap (because
* remote values are not addressable), and is therefore limited to
* ReadWritePropertyMap.
*/
template<typename ProcessGroup, typename GlobalMap, typename StorageMap>
class distributed_property_map
{
public:
/// The key type of the property map.
typedef typename property_traits<GlobalMap>::key_type key_type;
/// The value type of the property map.
typedef typename property_traits<StorageMap>::value_type value_type;
typedef typename property_traits<StorageMap>::reference reference;
typedef ProcessGroup process_group_type;
private:
typedef distributed_property_map self_type;
typedef typename property_traits<StorageMap>::category local_category;
typedef typename property_traits<StorageMap>::key_type local_key_type;
typedef typename property_traits<GlobalMap>::value_type owner_local_pair;
typedef typename ProcessGroup::process_id_type process_id_type;
enum property_map_messages {
/** A request to store a value in a property map. The message
* contains a std::pair<key, data>.
*/
property_map_put,
/** A request to retrieve a particular value in a property
* map. The message contains a key. The owner of that key will
* reply with a value.
*/
property_map_get,
/** A request to update values stored on a remote processor. The
* message contains a vector of keys for which the source
* requests updated values. This message will only be transmitted
* during synchronization.
*/
property_map_multiget,
/** A request to store values in a ghost cell. This message
* contains a vector of key/value pairs corresponding to the
* sequence of keys sent to the source processor.
*/
property_map_multiget_reply,
/** The payload containing a vector of local key-value pairs to be
* put into the remote property map. A key-value std::pair will be
* used to store each local key-value pair.
*/
property_map_multiput
};
// Code from Joaqun M Lpez Muoz to work around unusual implementation of
// std::pair in VC++ 10:
template<typename First,typename Second>
class pair_first_extractor {
typedef std::pair<First,Second> value_type;
public:
typedef First result_type;
const result_type& operator()(const value_type& x) const {
return x.first;
}
result_type& operator()(value_type& x) const {
return x.first;
}
};
public:
/// The type of the ghost cells
typedef multi_index::multi_index_container<
std::pair<key_type, value_type>,
multi_index::indexed_by<
multi_index::sequenced<>,
multi_index::hashed_unique<
pair_first_extractor<key_type, value_type>
>
>
> ghost_cells_type;
/// Iterator into the ghost cells
typedef typename ghost_cells_type::iterator iterator;
/// Key-based index into the ghost cells
typedef typename ghost_cells_type::template nth_index<1>::type
ghost_cells_key_index_type;
/// Iterator into the ghost cells (by key)
typedef typename ghost_cells_key_index_type::iterator key_iterator;
/** The property map category. A distributed property map cannot be
* an Lvalue Property Map, because values on remote processes cannot
* be addresses.
*/
typedef typename detail::make_nonlvalue_property_map<
(is_base_and_derived<lvalue_property_map_tag, local_category>::value
|| is_same<lvalue_property_map_tag, local_category>::value)>
::template apply<local_category>::type category;
/** Default-construct a distributed property map. This function
* creates an initialized property map that must be assigned to a
* valid value before being used. It is only provided here because
* property maps must be Default Constructible.
*/
distributed_property_map() {}
/** Construct a distributed property map. Builds a distributed
* property map communicating over the given process group and using
* the given local property map for storage. Since no reduction
* operation is provided, the default reduction operation @c
* basic_reduce<value_type> is used.
*/
distributed_property_map(const ProcessGroup& pg, const GlobalMap& global,
const StorageMap& pm)
: data(new data_t(pg, global, pm, basic_reduce<value_type>(), false))
{
typedef handle_message<basic_reduce<value_type> > Handler;
data->ghost_cells.reset(new ghost_cells_type());
Handler handler(data);
data->process_group.replace_handler(handler, true);
data->process_group.template get_receiver<Handler>()
->setup_triggers(data->process_group);
}
/** Construct a distributed property map. Builds a distributed
* property map communicating over the given process group and using
* the given local property map for storage. The given @p reduce
* parameter is used as the reduction operation.
*/
template<typename Reduce>
distributed_property_map(const ProcessGroup& pg, const GlobalMap& global,
const StorageMap& pm,
const Reduce& reduce);
~distributed_property_map();
/// Set the reduce operation of the distributed property map.
template<typename Reduce>
void set_reduce(const Reduce& reduce);
// Set the consistency model for the distributed property map
void set_consistency_model(int model);
// Get the consistency model
int get_consistency_model() const { return data->model; }
// Set the maximum number of ghost cells that we are allowed to
// maintain. If 0, all ghost cells will be retained.
void set_max_ghost_cells(std::size_t max_ghost_cells);
// Clear out all ghost cells
void clear();
// Reset the values in all ghost cells to the default value
void reset();
// Flush all values destined for remote processors
void flush();
reference operator[](const key_type& key) const
{
owner_local_pair p = get(data->global, key);
if (p.first == process_id(data->process_group)) {
return data->storage[p.second];
} else {
return cell(key);
}
}
process_group_type process_group() const
{
return data->process_group.base();
}
StorageMap& base() { return data->storage; }
const StorageMap& base() const { return data->storage; }
/** Sends a "put" request.
* \internal
*
*/
void
request_put(process_id_type p, const key_type& k, const value_type& v) const
{
send(data->process_group, p, property_map_put,
boost::parallel::detail::make_untracked_pair(k, v));
}
/** Access the ghost cell for the given key.
* \internal
*/
value_type& cell(const key_type& k, bool request_if_missing = true) const;
/** Perform synchronization
* \internal
*/
void do_synchronize();
const GlobalMap& global() const { return data->global; }
GlobalMap& global() { return data->global; }
struct data_t
{
data_t(const ProcessGroup& pg, const GlobalMap& global,
const StorageMap& pm, const function1<value_type, key_type>& dv,
bool has_default_resolver)
: process_group(pg), global(global), storage(pm),
ghost_cells(), max_ghost_cells(1000000), get_default_value(dv),
has_default_resolver(has_default_resolver), model(cm_forward) { }
/// The process group
ProcessGroup process_group;
/// A mapping from the keys of this property map to the global
/// descriptor.
GlobalMap global;
/// Local property map
StorageMap storage;
/// The ghost cells
shared_ptr<ghost_cells_type> ghost_cells;
/// The maximum number of ghost cells we are permitted to hold. If
/// zero, we are permitted to have an infinite number of ghost
/// cells.
std::size_t max_ghost_cells;
/// Default value for remote ghost cells, as defined by the
/// reduction operation.
function1<value_type, key_type> get_default_value;
/// True if this resolver is the "default" resolver, meaning that
/// we should not be able to get() a default value; it needs to be
/// request()ed first.
bool has_default_resolver;
// Current consistency model
int model;
// Function that resets all of the ghost cells to their default
// values. It knows the type of the resolver, so we can eliminate
// a large number of calls through function pointers.
void (data_t::*reset)();
// Clear out all ghost cells
void clear();
// Flush all values destined for remote processors
void flush();
// Send out requests to "refresh" the values of ghost cells that
// we're holding.
void refresh_ghost_cells();
private:
template<typename Resolver> void do_reset();
friend class distributed_property_map;
};
friend struct data_t;
shared_ptr<data_t> data;
private:
// Prunes the least recently used ghost cells until we have @c
// max_ghost_cells or fewer ghost cells.
void prune_ghost_cells() const;
/** Handles incoming messages.
*
* This function object is responsible for handling all incoming
* messages for the distributed property map.
*/
template<typename Reduce>
struct handle_message
{
explicit handle_message(const shared_ptr<data_t>& data,
const Reduce& reduce = Reduce())
: data_ptr(data), reduce(reduce) { }
void operator()(process_id_type source, int tag);
/// Individual message handlers
void
handle_put(int source, int tag,
const boost::parallel::detail::untracked_pair<key_type, value_type>& data,
trigger_receive_context);
value_type
handle_get(int source, int tag, const key_type& data,
trigger_receive_context);
void
handle_multiget(int source, int tag,
const std::vector<key_type>& data,
trigger_receive_context);
void
handle_multiget_reply
(int source, int tag,
const std::vector<boost::parallel::detail::untracked_pair<key_type, value_type> >& msg,
trigger_receive_context);
void
handle_multiput
(int source, int tag,
const std::vector<unsafe_pair<local_key_type, value_type> >& data,
trigger_receive_context);
void setup_triggers(process_group_type& pg);
private:
weak_ptr<data_t> data_ptr;
Reduce reduce;
};
/* Sets up the next stage in a multi-stage synchronization, for
bidirectional consistency. */
struct on_synchronize
{
explicit on_synchronize(const shared_ptr<data_t>& data) : data_ptr(data) { }
void operator()();
private:
weak_ptr<data_t> data_ptr;
};
};
/* An implementation helper macro for the common case of naming
distributed property maps with all of the normal template
parameters. */
#define PBGL_DISTRIB_PMAP \
distributed_property_map<ProcessGroup, GlobalMap, StorageMap>
/* Request that the value for the given remote key be retrieved in
the next synchronization round. */
template<typename ProcessGroup, typename GlobalMap, typename StorageMap>
inline void
request(const PBGL_DISTRIB_PMAP& pm,
typename PBGL_DISTRIB_PMAP::key_type const& key)
{
if (get(pm.data->global, key).first != process_id(pm.data->process_group))
pm.cell(key, false);
}
/** Get the value associated with a particular key. Retrieves the
* value associated with the given key. If the key denotes a
* locally-owned object, it returns the value from the local property
* map; if the key denotes a remotely-owned object, retrieves the
* value of the ghost cell for that key, which may be the default
* value provided by the reduce operation.
*
* Complexity: For a local key, O(1) get operations on the underlying
* property map. For a non-local key, O(1) accesses to the ghost cells.
*/
template<typename ProcessGroup, typename GlobalMap, typename StorageMap>
inline
typename PBGL_DISTRIB_PMAP::value_type
get(const PBGL_DISTRIB_PMAP& pm,
typename PBGL_DISTRIB_PMAP::key_type const& key)
{
using boost::get;
typename property_traits<GlobalMap>::value_type p =
get(pm.data->global, key);
if (p.first == process_id(pm.data->process_group)) {
return get(pm.data->storage, p.second);
} else {
return pm.cell(key);
}
}
/** Put a value associated with the given key into the property map.
* When the key denotes a locally-owned object, this operation updates
* the underlying local property map. Otherwise, the local ghost cell
* is updated and a "put" message is sent to the processor owning this
* key.
*
* Complexity: For a local key, O(1) put operations on the underlying
* property map. For a nonlocal key, O(1) accesses to the ghost cells
* and will send O(1) messages of size O(sizeof(key) + sizeof(value)).
*/
template<typename ProcessGroup, typename GlobalMap, typename StorageMap>
void
put(const PBGL_DISTRIB_PMAP& pm,
typename PBGL_DISTRIB_PMAP::key_type const & key,
typename PBGL_DISTRIB_PMAP::value_type const & value)
{
using boost::put;
typename property_traits<GlobalMap>::value_type p =
get(pm.data->global, key);
if (p.first == process_id(pm.data->process_group)) {
put(pm.data->storage, p.second, value);
} else {
if (pm.data->model & cm_forward)
pm.request_put(p.first, key, value);
pm.cell(key, false) = value;
}
}
/** Put a value associated with a given key into the local view of the
* property map. This operation is equivalent to @c put, but with one
* exception: no message will be sent to the owning processor in the
* case of a remote update. The effect is that any value written via
* @c local_put for a remote key may be overwritten in the next
* synchronization round.
*/
template<typename ProcessGroup, typename GlobalMap, typename StorageMap>
void
local_put(const PBGL_DISTRIB_PMAP& pm,
typename PBGL_DISTRIB_PMAP::key_type const & key,
typename PBGL_DISTRIB_PMAP::value_type const & value)
{
using boost::put;
typename property_traits<GlobalMap>::value_type p =
get(pm.data->global, key);
if (p.first == process_id(pm.data->process_group))
put(pm.data->storage, p.second, value);
else pm.cell(key, false) = value;
}
/** Cache the value associated with the given remote key. If the key
* is local, ignore the operation. */
template<typename ProcessGroup, typename GlobalMap, typename StorageMap>
inline void
cache(const PBGL_DISTRIB_PMAP& pm,
typename PBGL_DISTRIB_PMAP::key_type const & key,
typename PBGL_DISTRIB_PMAP::value_type const & value)
{
typename ProcessGroup::process_id_type id = get(pm.data->global, key).first;
if (id != process_id(pm.data->process_group)) pm.cell(key, false) = value;
}
/// Synchronize the property map.
template<typename ProcessGroup, typename GlobalMap, typename StorageMap>
void
synchronize(PBGL_DISTRIB_PMAP& pm)
{
pm.do_synchronize();
}
/// Create a distributed property map.
template<typename ProcessGroup, typename GlobalMap, typename StorageMap>
inline distributed_property_map<ProcessGroup, GlobalMap, StorageMap>
make_distributed_property_map(const ProcessGroup& pg, GlobalMap global,
StorageMap storage)
{
typedef distributed_property_map<ProcessGroup, GlobalMap, StorageMap>
result_type;
return result_type(pg, global, storage);
}
/**
* \overload
*/
template<typename ProcessGroup, typename GlobalMap, typename StorageMap,
typename Reduce>
inline distributed_property_map<ProcessGroup, GlobalMap, StorageMap>
make_distributed_property_map(const ProcessGroup& pg, GlobalMap global,
StorageMap storage, Reduce reduce)
{
typedef distributed_property_map<ProcessGroup, GlobalMap, StorageMap>
result_type;
return result_type(pg, global, storage, reduce);
}
} } // end namespace boost::parallel
#include <boost/property_map/parallel/impl/distributed_property_map.ipp>
#undef PBGL_DISTRIB_PMAP
#endif // BOOST_PARALLEL_DISTRIBUTED_PROPERTY_MAP_HPP
```
|
```smalltalk
//
// ARSkeleton2D.cs: Nicer code for ARSkeleton2D
//
// Authors:
// Vincent Dondain <vidondai@microsoft.com>
//
//
using System;
using System.Runtime.InteropServices;
#if NET
using Vector2 = global::System.Numerics.Vector2;
#else
using Vector2 = global::OpenTK.Vector2;
#endif
#nullable enable
namespace ARKit {
public partial class ARSkeleton2D {
public unsafe Vector2 [] JointLandmarks {
get {
var count = (int) JointCount;
var rv = new Vector2 [count];
var ptr = (Vector2*) RawJointLandmarks;
for (int i = 0; i < count; i++)
rv [i] = *ptr++;
return rv;
}
}
}
}
```
|
```xml
import * as React from 'react';
import { Context, ContextSelector, ContextValue, ContextVersion } from './types';
import { useIsomorphicLayoutEffect } from './utils';
/**
* This hook returns context selected value by selector.
* It will only accept context created by `createContext`.
* It will trigger re-render if only the selected value is referencially changed.
*/
export const useContextSelector = <Value, SelectedValue>(
context: Context<Value>,
selector: ContextSelector<Value, SelectedValue>,
): SelectedValue => {
const contextValue = React.useContext(context as unknown as Context<ContextValue<Value>>);
const {
value: { current: value },
version: { current: version },
listeners,
} = contextValue;
const selected = selector(value);
const [state, dispatch] = React.useReducer(
(
prevState: readonly [Value /* contextValue */, SelectedValue /* selector(value) */],
payload:
| undefined // undefined from render below
| readonly [ContextVersion, Value], // from provider effect
) => {
if (!payload) {
// early bail out when is dispatched during render
return [value, selected] as const;
}
if (payload[0] <= version) {
if (Object.is(prevState[1], selected)) {
return prevState; // bail out
}
return [value, selected] as const;
}
try {
if (Object.is(prevState[0], payload[1])) {
return prevState; // do not update
}
const nextSelected = selector(payload[1]);
if (Object.is(prevState[1], nextSelected)) {
return prevState; // do not update
}
return [payload[1], nextSelected] as const;
} catch (e) {
// ignored (stale props or some other reason)
}
return [...prevState] as const; // schedule update
},
[value, selected] as const,
);
if (!Object.is(state[1], selected)) {
// schedule re-render
// this is safe because it's self contained
dispatch(undefined);
}
useIsomorphicLayoutEffect(() => {
listeners.push(dispatch);
return () => {
const index = listeners.indexOf(dispatch);
listeners.splice(index, 1);
};
}, [listeners]);
return state[1] as SelectedValue;
};
```
|
```smalltalk
// ==========================================================================
// Squidex Headless CMS
// ==========================================================================
// ==========================================================================
using System.ComponentModel.DataAnnotations;
using Squidex.Domain.Apps.Core.HandleRules;
using Squidex.Domain.Apps.Core.Rules;
using Squidex.Infrastructure.Validation;
namespace Squidex.Extensions.Actions.Script;
[RuleAction(
Title = "Script",
IconImage = "<svg xmlns='path_to_url viewBox='0 0 512 512'><path d='M112.155 67.644h84.212v236.019c0 106.375-50.969 143.497-132.414 143.497-19.944 0-45.429-3.324-62.052-8.864l9.419-68.146c11.635 3.878 26.594 6.648 43.214 6.648 35.458 0 57.621-16.068 57.621-73.687V67.644zM269.484 354.634c22.161 11.635 57.62 23.27 93.632 23.27 38.783 0 59.282-16.066 59.282-40.998 0-22.715-17.729-36.565-62.606-52.079-62.053-22.162-103.05-56.512-103.05-111.36 0-63.715 53.741-111.917 141.278-111.917 42.662 0 73.132 8.313 95.295 18.838l-18.839 67.592c-14.404-7.201-41.553-17.729-77.562-17.729-36.567 0-54.297 17.175-54.297 36.013 0 23.824 20.499 34.349 69.256 53.188 65.928 24.378 96.4 58.728 96.4 111.915 0 62.606-47.647 115.794-150.143 115.794-42.662 0-84.77-11.636-105.82-23.27l17.174-69.257z'/></svg>",
IconColor = "#f0be25",
Display = "Run a Script",
Description = "Runs a custom Javascript")]
public sealed record ScriptAction : RuleAction
{
[LocalizedRequired]
[Display(Name = "Script", Description = "The script to render.")]
[Editor(RuleFieldEditor.Javascript)]
[Formattable]
public string Script { get; set; }
}
```
|
```objective-c
/*
path_to_url
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
#define IDC_MYICON 2
#define IDD_GUI 102
#define IDS_APP_TITLE 103
#define IDI_GUI 107
#define IDI_SMALL 108
#define IDC_GUI 109
#define IDR_MAINFRAME 128
#define IDC_STATIC -1
```
|
Vitali Ermakovich Kabaloev (; born ) is a Russian Greco-Roman wrestler of Kabardian descent. He won gold in the 55 kg event at the 2019 European Championships held in Bucharest, Romania. In 2020, he won the silver medal in the 55 kg event at the 2020 European Championships held in Rome, Italy.
He is a twofold national champion, winning in 2018 and 2019.
In 2018, at the 2018 World U23 Wrestling Championship held in Bucharest, Romania, he won the silver medal in the 55 kg event.
Achievements
References
External links
Living people
Place of birth missing (living people)
Russian male sport wrestlers
1996 births
Sportspeople from Kabardino-Balkaria
European Wrestling Championships medalists
21st-century Russian people
|
```go
// contributor license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright ownership.
//
// path_to_url
//
// Unless required by applicable law or agreed to in writing, software
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
package coderx
import (
"testing"
)
func TestString(t *testing.T) {
tests := []any{
"",
"A novel set of characters",
"Hello, ",
}
for _, v := range tests {
data := encString(v)
result := decString(data)
if v != result {
t.Errorf("dec(enc(%v)) = %v, want %v", v, result, v)
}
}
}
```
|
Adesmus bisellatus is a species of beetle in the family Cerambycidae. It was described by Bates in 1881. It is known from Colombia and Ecuador.
References
Adesmus
Beetles described in 1881
|
Events in the year 1744 in Norway.
Incumbents
Monarch: Christian VI
Events
31 December - The town of Holmestrand was founded.
Arts and literature
Births
15 September - Erik Must Angell, jurist and politician (died 1814)
19 November - Jakob Edvard Colbjørnsen, chief justice (died 1802)
Full date unknown
Catharina Lysholm, businesswoman and ship-owner (died 1815)
Jacob Juel, timber trader and civil servant (died 1800)
Deaths
See also
|
```javascript
/**
* @require common:widget/jquery/jquery.js
*/
(function($, wp, wps, window, undefined) {
'$:nomunge';
var $w = $(window),
waypoints = [],
oldScroll = -99999,
didScroll = false,
didResize = false,
eventName = 'waypoint.reached',
methods = {
init: function(f, options) {
this.each(function() {
var $this = $(this),
ndx = waypointIndex($this),
base = ndx < 0 ? $.fn[wp].defaults: waypoints[ndx].options,
opts = $.extend({},
base, options);
opts.offset = opts.offset === "bottom-in-view" ?
function() {
return $[wps]('viewportHeight') - $(this).outerHeight();
}: opts.offset;
if (ndx < 0) {
waypoints.push({
element: $this,
offset: $this.offset().top,
options: opts
});
}
else {
waypoints[ndx].options = opts;
}
f && $this.bind(eventName, f);
});
$[wps]('refresh');
return this;
},
remove: function() {
return this.each(function() {
var ndx = waypointIndex($(this));
if (ndx >= 0) {
waypoints.splice(ndx, 1);
}
});
},
destroy: function() {
return this.unbind(eventName)[wp]('remove');
}
};
function waypointIndex(el) {
var i = waypoints.length - 1;
while (i >= 0 && waypoints[i].element[0] !== el[0]) {
i -= 1;
}
return i;
}
function triggerWaypoint(way, dir) {
way.element.trigger(eventName, dir)
if (way.options.triggerOnce) {
way.element[wp]('destroy');
}
}
function doScroll() {
var newScroll = $w.scrollTop(),
isDown = newScroll > oldScroll,
pointsHit = $.grep(waypoints,
function(el, i) {
return isDown ? (el.offset > oldScroll && el.offset <= newScroll) : (el.offset <= oldScroll && el.offset > newScroll);
});
if (!oldScroll || !newScroll) {
$[wps]('refresh');
}
oldScroll = newScroll;
if (!pointsHit.length) return;
if ($[wps].settings.continuous) {
$.each(isDown ? pointsHit: pointsHit.reverse(),
function(i, point) {
triggerWaypoint(point, [isDown ? 'down': 'up']);
});
}
else {
triggerWaypoint(pointsHit[isDown ? pointsHit.length - 1: 0], [isDown ? 'down': 'up']);
}
}
$.fn[wp] = function(method) {
if (methods[method]) {
return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
}
else if (typeof method === "function" || !method) {
return methods.init.apply(this, arguments);
}
else if (typeof method === "object") {
return methods.init.apply(this, [null, method]);
}
else {
$.error('Method ' + method + ' does not exist on jQuery' + wp);
}
};
$.fn[wp].defaults = {
offset: 0,
triggerOnce: false
};
var jQMethods = {
refresh: function() {
$.each(waypoints,
function(i, o) {
var adjustment = 0,
oldOffset = o.offset;
if (typeof o.options.offset === "function") {
adjustment = o.options.offset.apply(o.element);
}
else if (typeof o.options.offset === "string") {
var amount = parseFloat(o.options.offset),
adjustment = o.options.offset.indexOf("%") ? Math.ceil($[wps]('viewportHeight') * (amount / 100)) : amount;
}
else {
adjustment = o.options.offset;
}
o.offset = o.element.offset().top - adjustment;
if (oldScroll > oldOffset && oldScroll <= o.offset) {
triggerWaypoint(o, ['up']);
}
else if (oldScroll < oldOffset && oldScroll >= o.offset) {
triggerWaypoint(o, ['down']);
}
});
waypoints.sort(function(a, b) {
return a.offset - b.offset;
});
},
viewportHeight: function() {
return (window.innerHeight ? window.innerHeight: $w.height());
},
aggregate: function() {
var points = $();
$.each(waypoints,
function(i, e) {
points = points.add(e.element);
});
return points;
}
};
$[wps] = function(method) {
if (jQMethods[method]) {
return jQMethods[method].apply(this);
}
else {
return jQMethods["aggregate"]();
}
};
$[wps].settings = {
continuous: true,
resizeThrottle: 200,
scrollThrottle: 100
};
$w.scroll(function() {
if (!didScroll) {
didScroll = true;
window.setTimeout(function() {
doScroll();
didScroll = false;
},
$[wps].settings.scrollThrottle);
}
}).resize(function() {
if (!didResize) {
didResize = true;
window.setTimeout(function() {
$[wps]('refresh');
didResize = false;
},
$[wps].settings.resizeThrottle);
}
}).load(function() {
$[wps]('refresh');
doScroll();
});
})(jQuery, 'waypoint', 'waypoints', this);
```
|
```ruby
# typed: strict
# frozen_string_literal: true
require "cli/parser"
UNDEFINED_CONSTANTS = %w[
AbstractDownloadStrategy
Addressable
Base64
CacheStore
Cask::Cask
Cask::CaskLoader
Completions
CSV
Formula
Formulary
GitRepository
Homebrew::API
Homebrew::Manpages
Homebrew::Settings
JSONSchemer
Kramdown
Metafiles
MethodSource
Minitest
Nokogiri
OS::Mac::Version
Parlour
PatchELF
Pry
ProgressBar
REXML
Red
RSpec
RuboCop
StackProf
Spoom
Tap
Tapioca
UnpackStrategy
Utils::Analytics
Utils::Backtrace
Utils::Bottles
Utils::Curl
Utils::Fork
Utils::Git
Utils::GitHub
Utils::Link
Utils::Svn
Uri
Vernier
YARD
].freeze
module Homebrew
module Cmd
class VerifyUndefined < AbstractCommand
end
end
end
parser = Homebrew::CLI::Parser.new(Homebrew::Cmd::VerifyUndefined) do
usage_banner <<~EOS
`verify-undefined`
Verifies that the following constants have not been defined
at startup to make sure that startup times stay consistent.
Contants:
#{UNDEFINED_CONSTANTS.join("\n")}
EOS
end
parser.parse
UNDEFINED_CONSTANTS.each do |constant_name|
Object.const_get(constant_name)
ofail "#{constant_name} should not be defined at startup"
rescue NameError
# We expect this to error as it should not be defined.
end
```
|
```objective-c
#import "GBImageView.h"
@implementation GBImageViewGridConfiguration
- (instancetype)initWithColor:(NSColor *)color size:(NSUInteger)size
{
self = [super init];
self.color = color;
self.size = size;
return self;
}
@end
@interface GBGridView : NSView
@end
@implementation GBGridView
- (void)drawRect:(NSRect)dirtyRect
{
GBImageView *parent = (GBImageView *)self.superview;
CGFloat y_ratio = parent.frame.size.height / parent.image.size.height;
CGFloat x_ratio = parent.frame.size.width / parent.image.size.width;
for (GBImageViewGridConfiguration *conf in parent.verticalGrids) {
[conf.color set];
for (CGFloat y = conf.size * y_ratio; y < self.frame.size.height; y += conf.size * y_ratio) {
NSBezierPath *line = [NSBezierPath bezierPath];
[line moveToPoint:NSMakePoint(0, y - 0.5)];
[line lineToPoint:NSMakePoint(self.frame.size.width, y - 0.5)];
[line setLineWidth:1.0];
[line stroke];
}
}
for (GBImageViewGridConfiguration *conf in parent.horizontalGrids) {
[conf.color set];
for (CGFloat x = conf.size * x_ratio; x < self.frame.size.width; x += conf.size * x_ratio) {
NSBezierPath *line = [NSBezierPath bezierPath];
[line moveToPoint:NSMakePoint(x + 0.5, 0)];
[line lineToPoint:NSMakePoint(x + 0.5, self.frame.size.height)];
[line setLineWidth:1.0];
[line stroke];
}
}
if (parent.displayScrollRect) {
NSBezierPath *path = [NSBezierPath bezierPathWithRect:CGRectInfinite];
for (unsigned x = 0; x < 2; x++) {
for (unsigned y = 0; y < 2; y++) {
NSRect rect = parent.scrollRect;
rect.origin.x *= x_ratio;
rect.origin.y *= y_ratio;
rect.size.width *= x_ratio;
rect.size.height *= y_ratio;
rect.origin.y = self.frame.size.height - rect.origin.y - rect.size.height;
rect.origin.x -= self.frame.size.width * x;
rect.origin.y += self.frame.size.height * y;
NSBezierPath *subpath = [NSBezierPath bezierPathWithRect:rect];
[path appendBezierPath:subpath];
}
}
[path setWindingRule:NSEvenOddWindingRule];
[path setLineWidth:4.0];
[path setLineJoinStyle:NSRoundLineJoinStyle];
[[NSColor colorWithWhite:0.2 alpha:0.5] set];
[path fill];
[path addClip];
[[NSColor colorWithWhite:0.0 alpha:0.6] set];
[path stroke];
}
}
@end
@implementation GBImageView
{
NSTrackingArea *_trackingArea;
GBGridView *_gridView;
NSRect _scrollRect;
}
- (instancetype)initWithCoder:(NSCoder *)coder
{
self = [super initWithCoder:coder];
self.wantsLayer = true;
_gridView = [[GBGridView alloc] initWithFrame:self.bounds];
_gridView.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable;
[self addSubview:_gridView];
return self;
}
-(void)viewWillDraw
{
[super viewWillDraw];
for (CALayer *layer in self.layer.sublayers) {
layer.magnificationFilter = kCAFilterNearest;
}
}
- (void)setHorizontalGrids:(NSArray *)horizontalGrids
{
self->_horizontalGrids = horizontalGrids;
[_gridView setNeedsDisplay:true];
}
- (void)setVerticalGrids:(NSArray *)verticalGrids
{
self->_verticalGrids = verticalGrids;
[_gridView setNeedsDisplay:true];
}
- (void)setDisplayScrollRect:(bool)displayScrollRect
{
self->_displayScrollRect = displayScrollRect;
[_gridView setNeedsDisplay:true];
}
- (void)updateTrackingAreas
{
if (_trackingArea != nil) {
[self removeTrackingArea:_trackingArea];
}
_trackingArea = [ [NSTrackingArea alloc] initWithRect:[self bounds]
options:NSTrackingMouseEnteredAndExited | NSTrackingActiveAlways | NSTrackingMouseMoved
owner:self
userInfo:nil];
[self addTrackingArea:_trackingArea];
}
- (void)mouseExited:(NSEvent *)theEvent
{
if ([self.delegate respondsToSelector:@selector(mouseDidLeaveImageView:)]) {
[self.delegate mouseDidLeaveImageView:self];
}
}
- (void)mouseMoved:(NSEvent *)theEvent
{
if ([self.delegate respondsToSelector:@selector(imageView:mouseMovedToX:Y:)]) {
NSPoint location = [self convertPoint:theEvent.locationInWindow fromView:nil];
location.x /= self.bounds.size.width;
location.y /= self.bounds.size.height;
location.y = 1 - location.y;
location.x *= self.image.size.width;
location.y *= self.image.size.height;
[self.delegate imageView:self mouseMovedToX:(NSUInteger)location.x Y:(NSUInteger)location.y];
}
}
- (void)setScrollRect:(NSRect)scrollRect
{
if (memcmp(&scrollRect, &_scrollRect, sizeof(scrollRect)) != 0) {
_scrollRect = scrollRect;
[_gridView setNeedsDisplay:true];
}
}
- (NSRect)scrollRect
{
return _scrollRect;
}
@end
```
|
```python
from typing import Union, Callable
from nonebot.plugin import on_command
from nonebot.typing import CommandHandler_T, CommandName_T
class CommandGroup:
"""
Group a set of commands with same name prefix.
"""
__slots__ = ('basename', 'base_kwargs')
def __init__(self, name: Union[str, CommandName_T], **kwargs):
if 'aliases' in kwargs or 'patterns' in kwargs:
raise ValueError('aliases or patterns should not be used as base kwargs for group')
self.basename = (name,) if isinstance(name, str) else name
self.base_kwargs = kwargs
def command(self, name: Union[str, CommandName_T],
**kwargs) -> Callable[[CommandHandler_T], CommandHandler_T]:
"""
Decorator to register a function as a command. Its has the same usage as
`on_command`.
:param kwargs: keyword arguments will be passed to `on_command`. For each
argument in the signature of this method here, if it is not
present when calling, default value for the command group is
used (e.g. `self.permission`). If that value is also not set,
default value for `on_command` is used.
"""
sub_name = (name,) if isinstance(name, str) else name
name = self.basename + sub_name
final_kwargs = { **self.base_kwargs, **kwargs }
return on_command(name, **final_kwargs)
```
|
```python
#
#
# path_to_url
#
# Unless required by applicable law or agreed to in writing, software
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# ==============================================================================
"""create_def_file.py - tool to create a windows def file.
The def file can be used to export symbols from the tensorflow dll to enable
tf.load_library().
Because the linker allows only 64K symbols to be exported per dll
we filter the symbols down to the essentials. The regular expressions
we use for this are specific to tensorflow.
TODO: this works fine but there is an issue with exporting
'const char * const' and importing it from a user_ops. The problem is
on the importing end and using __declspec(dllimport) works around it.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import codecs
import os
import re
import subprocess
import sys
import tempfile
# External tools we use that come with visual studio sdk and
# we assume that the caller has the correct PATH to the sdk
UNDNAME = "undname.exe"
DUMPBIN = "dumpbin.exe"
# Exclude if matched
EXCLUDE_RE = re.compile(r"RTTI|deleting destructor|::internal::")
# Include if matched before exclude
INCLUDEPRE_RE = re.compile(r"google::protobuf::internal::ExplicitlyConstructed|"
r"tensorflow::internal::LogMessage|"
r"tensorflow::internal::LogString|"
r"tensorflow::internal::CheckOpMessageBuilder|"
r"tensorflow::internal::PickUnusedPortOrDie|"
r"tensorflow::internal::ValidateDevice|"
r"tensorflow::ops::internal::Enter|"
r"tensorflow::strings::internal::AppendPieces|"
r"tensorflow::strings::internal::CatPieces|"
r"tensorflow::io::internal::JoinPathImpl")
# Include if matched after exclude
INCLUDE_RE = re.compile(r"^(TF_\w*)$|"
r"^(TFE_\w*)$|"
r"tensorflow::|"
r"functor::|"
r"nsync_|"
r"perftools::gputools")
# We want to identify data members explicitly in the DEF file, so that no one
# can implicitly link against the DLL if they use one of the variables exported
# from the DLL and the header they use does not decorate the symbol with
# __declspec(dllimport). It is easier to detect what a data symbol does
# NOT look like, so doing it with the below regex.
DATA_EXCLUDE_RE = re.compile(r"[)(]|"
r"vftable|"
r"vbtable|"
r"vcall|"
r"RTTI|"
r"protobuf::internal::ExplicitlyConstructed")
def get_args():
"""Parse command line."""
filename_list = lambda x: x.split(";")
parser = argparse.ArgumentParser()
parser.add_argument("--input", type=filename_list,
help="paths to input libraries separated by semicolons",
required=True)
parser.add_argument("--output", help="output deffile", required=True)
parser.add_argument("--target", help="name of the target", required=True)
args = parser.parse_args()
return args
def main():
"""main."""
args = get_args()
# Pipe dumpbin to extract all linkable symbols from libs.
# Good symbols are collected in candidates and also written to
# a temp file.
candidates = []
tmpfile = tempfile.NamedTemporaryFile(mode="w", delete=False)
for lib_path in args.input:
proc = subprocess.Popen([DUMPBIN, "/nologo", "/linkermember:1", lib_path],
stdout=subprocess.PIPE)
for line in codecs.getreader("utf-8")(proc.stdout):
cols = line.split()
if len(cols) < 2:
continue
sym = cols[1]
tmpfile.file.write(sym + "\n")
candidates.append(sym)
exit_code = proc.wait()
if exit_code != 0:
print("{} failed, exit={}".format(DUMPBIN, exit_code))
return exit_code
tmpfile.file.close()
# Run the symbols through undname to get their undecorated name
# so we can filter on something readable.
with open(args.output, "w") as def_fp:
# track dupes
taken = set()
# Header for the def file.
def_fp.write("LIBRARY " + args.target + "\n")
def_fp.write("EXPORTS\n")
def_fp.write("\t ??1OpDef@tensorflow@@UEAA@XZ\n")
# Each symbols returned by undname matches the same position in candidates.
# We compare on undname but use the decorated name from candidates.
dupes = 0
proc = subprocess.Popen([UNDNAME, tmpfile.name], stdout=subprocess.PIPE)
for idx, line in enumerate(codecs.getreader("utf-8")(proc.stdout)):
decorated = candidates[idx]
if decorated in taken:
# Symbol is already in output, done.
dupes += 1
continue
if not INCLUDEPRE_RE.search(line):
if EXCLUDE_RE.search(line):
continue
if not INCLUDE_RE.search(line):
continue
if "deleting destructor" in line:
# Some of the symbols convered by INCLUDEPRE_RE export deleting
# destructor symbols, which is a bad idea.
# So we filter out such symbols here.
continue
if DATA_EXCLUDE_RE.search(line):
def_fp.write("\t" + decorated + "\n")
else:
def_fp.write("\t" + decorated + " DATA\n")
taken.add(decorated)
exit_code = proc.wait()
if exit_code != 0:
print("{} failed, exit={}".format(UNDNAME, exit_code))
return exit_code
os.unlink(tmpfile.name)
print("symbols={}, taken={}, dupes={}"
.format(len(candidates), len(taken), dupes))
return 0
if __name__ == "__main__":
sys.exit(main())
```
|
```css
Prepare for `will-animate`
Animation basics in CSS
Using animation delay in debugging
Use `max-height` for pure CSS sliders
Shorthand Transitions
```
|
The 1982 Arizona Wildcats football team represented the University of Arizona in the Pacific-10 Conference (Pac-10) during the 1982 NCAA Division I-A football season. In their third season under head coach Larry Smith, the Wildcats compiled a 6–4–1 record (4–3–1 against Pac-10 opponents), finished in fifth place in the Pac-10, and outscored their opponents, 311 to 219. The team played its home games in Arizona Stadium in Tucson, Arizona. Despite being bowl-eligible with a winning record, the Wildcats did not appear in a bowl game, as they self-imposed a postseason ban due to NCAA violations prior to Smith becoming coach in 1980 (see below).
Memorable highlights of the season included a big road win at Notre Dame and a huge upset of rival Arizona State which denied ASU a chance to potentially play in the Rose Bowl.
The team's statistical leaders included Tom Tunnicliffe with 2,520 passing yards, Vance Johnson with 443 rushing yards, and Brad Anderson with 870 receiving yards. Linebacker Ricky Hunley led the team with 173 total tackles.
Before the season
Arizona completed the 1981 season with a 6–5 record, highlighted by a huge road upset victory over USC. The Wildcats entered 1982 with high hopes that they were contenders for the Pac-10 title, with fans crediting Smith for rebuilding the program.
However, despite Smith rebuilding the team, the Wildcats have been embroiled in a scandal that happened in the late 1970s under Smith’s predecessor Tony Mason. Both the NCAA and the Pac-10 investigated and determined that Arizona operated a slush fund which involved Mason allegedly paying players cash, which turned out to be fraud, and the Wildcats were put on probation as a result. As NCAA sanctions were soon to be handed out, Arizona decided to self-impose a postseason ban for the 1982 season as punishment, which meant that they would become ineligible for the Pac-10 title and Rose Bowl appearance. The NCAA would eventually penalize the Wildcats as a result of the scandal and put them on probation, as well as handing the team bowl bans in 1983 and 1984, respectively.
Personnel
Schedule
Game summaries
Washington
After a dominant season-opening victory against Oregon State, Arizona hosted Washington, who was ranked first at the time. The Wildcats would play tough, but it became difficult for the Arizona offense to score points against a top-ranked opponent like the Huskies, and Arizona ultimately came up short. The loss prevented the Wildcats from upsetting a number-one-ranked team for a second straight season (Arizona defeated USC the previous year). It would be another ten years before Arizona finally got an upset victory over a top-ranked Washington squad at home.
Iowa
Arizona faced Iowa at home. The Wildcats defeated the Hawkeyes on the road in coach Smith's first season in 1980. A late Iowa field goal in the fourth quarter decided the game, and led to an Arizona loss.
UCLA
Arizona visited UCLA and played at the Rose Bowl for the first time ever (UCLA began playing home games here this season after decades playing at the Los Angeles Memorial Coliseum, sharing with USC). Both the Wildcats and Bruins fought tough and the game ultimately ended in a tie. The Bruins would go on to win the Pac-10 and play in the Rose Bowl at home.
Notre Dame
On the road at Notre Dame, the Wildcats and Irish battled back and forth and the game came down to the last play. With the score tied, Arizona got into Irish territory. Kicker Max Zendejas kicked a 48-yard field goal as time expired to win the game, and Smith and the Wildcats earned yet another win over a top-10 ranked team (Notre Dame was ranked ninth), as well as defeating the Irish for the first and only time in school history. It also avenged Arizona’s loss to Notre Dame in Smith’s first season in 1980. To date, this remains the last time that both Arizona and Notre Dame would meet on the football field, and given the parity between two schools, it is highly unlikely that they will play each other again unless they meet in a bowl game in the near future.
Similar to the 1981 win over USC, fans greeted the Wildcats with celebrations at the Tucson airport when they returned home hours after the game concluded.
USC
On homecoming weekend, the Wildcats hosted USC. Arizona had upset the Trojans in the previous year and were looking to make it two wins in a row against them. However, USC capitalized on the Wildcats’ mistakes throughout the game, including returning three interceptions for touchdowns, which set an NCAA record, and Arizona never recovered afterwards, despite rallying in the fourth quarter and ultimately coming up short as the Trojans held on for the win. Smith blamed the loss on Arizona being blitzed by USC, which led to the turnovers and USC avenging their loss to the Wildcats the year before.
Arizona State
To conclude the season, Arizona hosted the rivalry game against Arizona State, who were ranked sixth and was near the top of the Pac-10 standings with a possible Rose Bowl berth on the line and the Wildcats looking to spoil ASU’s chances of that happening (ASU needed a win against Arizona to punch their ticket to Pasadena).
As Arizona State was favored to win and was expected to continue its dominance over Arizona in the rivalry, many Wildcat fans theorized that Tucson was becoming more friendly towards ASU in terms of relevance, given that ASU was the state’s top football team at the time. With bowl-eligibility being out of the picture for Arizona, Smith referred to the game as the Wildcats’ bowl game in an attempt to salvage the season.
In the game itself, Arizona would blitz ASU all night, and the Wildcat defense recorded a pair of safeties and the offense came up big by connecting on two long touchdown passes to help the Wildcats upset Arizona State and deny the Sun Devils a trip to the Rose Bowl. It was the Wildcats' first win over ASU at home since 1974 and the victory also began a reign of dominance against the Devils after being dominated by ASU throughout most of the previous two decades. After the game, fans rushed the field and tore down the Arizona Stadium goal posts by celebrating the Wildcats knocking their rivals out of the Rose Bowl.
Smith said during the postgame that the win put the Wildcats back on top and climbed them out of ASU’s shadow in the rivalry that lasted for decades, a reference to remarks that he made about ASU in 1980.
The win gave Arizona a sixth win of the year and became bowl-eligible. However, the Wildcats had already self-imposed a bowl ban prior to the start of the season and that they were ineligible for the postseason as a result.
Awards and honors
Ricky Hunley, LB, Consensus and AP All-American, First-team All-Pac-10
Season notes
Prior to the start of the season, the scoreboard on Arizona Stadium’s north side was upgraded with a more computerized look. The scoreboard would last until the end of the 1992 season.
Arizona began the year with games against two consecutive conference opponents, both at home, which became a rare achievement for the Wildcats.
The Wildcats started a string of dominance over Arizona State this season, and went on to a 8–0–1 record against them, which was known as "The Streak" to fans, which lasted until 1991. This dominance lasted for the rest of Smith's tenure with the Wildcats, as he would not lose to ASU again, and it continued during the era under Smith's successor Dick Tomey that lasted through the 1990s.
After defeating Notre Dame, the Wildcats and Fighting Irish have not met on the football field since. Arizona claimed that they couldn't afford scheduling non-conference games against tradition-rich powerhouse schools like Notre Dame due to it being too expensive for Arizona's athletic budget and a small market like Tucson. However, things would change in the future, as Arizona would play big opponents such as LSU (1984, 2003, 2006), Georgia (1985), Oklahoma (1988, 1989), Ohio State (1991, 1997, 2000), Miami (FL) (1991, 1992, 1993), Iowa (1998, 2009, 2010), Nebraska (1998, 2009, 2028, 2031), Penn State (1999), Wisconsin (2002, 2004), Purdue (2003, 2005, 2017), Oklahoma State (2010, 2011, 2012), Boston College (2013), Boise State (2014), Mississippi State (2022, 2023), Kansas State (2024, 2025), Virginia Tech (2029, 2030), and Alabama (2032, 2033).
The Wildcats played at the Rose Bowl for the first time in its history (by playing a conference game against UCLA and not the actual bowl game itself, in which they have yet to appear in as of today).
This was the third consecutive season in which Smith's Wildcats defeated a top ten opponent (UCLA in 1980, USC in 1981, and Notre Dame and Arizona State in 1982), and the only one to date where they won at least twice against the ranked teams. Arizona did tie UCLA, who was then ranked eighth.
Arizona wore their white road jerseys in its final three home games against Pacific (won), USC (lost), and ASU (won), as they wore their blue ones at home earlier in the season. Smith said that they wore white due to them in the wake of the Wildcats’ tie against UCLA and their big win over Notre Dame, and that he believed that the team played mediocre in blue in the earlier home games and wanted to “white out” the remaining home opponents (the Wildcats joined LSU as one of the few college teams that wore white at home.) The NCAA forced a rule that teams were required to wear colored jerseys at home beginning in the 1983 season. ASU, who wore their maroon home jerseys against Arizona, would not wear their home jerseys in Tucson again until 2020. Arizona would not wear white jerseys for a home game again until 2014.
By winning several games on the road during the season, Smith, as well as fans, referred to the team as “road warriors” (a reference to the 1981 film Mad Max 2: The Road Warrior that was released in America earlier in the year). The team's kicker, Max Zendejas, was often known as the team's true “road warrior” and “Mad Max” after kicking the winning field goal against Notre Dame, also referencing the film. The tie against UCLA and the loss at Oregon were the only two road games that the Wildcats failed to win all season.
After the victory over ASU, many Wildcat players and fans claimed to have found roses that were either destroyed or tossed in trash cans around Arizona Stadium left behind by ASU fans. This was due to ASU needing a win over the Wildcats to clinch a Rose Bowl berth, and Arizona winning that prevented their rival from accomplishing that goal.
Days after Arizona's upset of ASU, the Arizona Daily Wildcat (the university's newspaper), published an article of the game and featured a fan-made picture of Wilbur the Wildcat (Arizona’s mascot) defeating its ASU counterpart (Sparky the Sun Devil) with Wilbur standing in victory raising a helmet and carrying a football, while Sparky was lying on the ground covered in blood in defeat along with Sparky’s pitchfork split in two (implied to be broken by Wilbur) and pieces of roses scattered across the Arizona desert, referencing the Wildcats’ win over the Sun Devils.
Despite the Wildcats winning six games during the season, they did not play in the postseason due to them self-imposing a bowl ban as a result of an NCAA investigation of fraud within the program (see above). Arizona was worried about losing bowl-eligibility due to the scandal and that they would be soon penalized, which led to the self-imposed ban.
Fans have believed that the 1982 season began a resurgence that turned the Wildcats into contenders despite a tough schedule, and made headlines as a result. One article was posted at the end of the season about Arizona’s successful season while referencing memorable films released during the year, such as “having E.T.” in the Arizona Stadium crowd to cheer them”, a “Road Warrior making a clutch kick” to win against Notre Dame, “haunted by a Poltergeist” after losses, and “going the distance like Rocky” after wins.
Arizona played all of its home games at night and all road game in the daytime, something that had never happened before in modern history for the program, though the Wildcats also played their home games in the evening during the 1981 season.
After the season
With the Wildcats finishing the season on a high note, the victory over ASU in the finale would become the turning point for the program under coach Smith, as he would build the team into contenders for the Pac-10 title through the middle part of the decade and restore Arizona’s tradition of winning. As Arizona was ineligible for bowl games in 1983–84, they would continue to improve and Smith would finally lead them to a bowl in 1985.
As the football team was returning to their winning ways, many fans have speculated that their interest in football affected Arizona’s basketball program, which led to losses, low attendance, and lack of popularity for that team. However, as the decade progressed, both programs would become a force in the Pac-10 by both winning and recruiting that would last through most of the 1990s, and would energize the university.
References
Arizona
Arizona Wildcats football seasons
Arizona Wildcats football
|
```objective-c
//
//
// path_to_url
//
// Unless required by applicable law or agreed to in writing, software
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#ifndef _SOC_INTERRUPT_CORE0_STRUCT_H_
#define _SOC_INTERRUPT_CORE0_STRUCT_H_
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef volatile struct interrupt_core0_dev_s {
union {
struct {
uint32_t core0_mac_intr_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_mac_intr_map;
union {
struct {
uint32_t core0_mac_nmi_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_mac_nmi_map;
union {
struct {
uint32_t core0_pwr_intr_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_pwr_intr_map;
union {
struct {
uint32_t core0_bb_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_bb_int_map;
union {
struct {
uint32_t core0_bt_mac_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_bt_mac_int_map;
union {
struct {
uint32_t core0_bt_bb_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_bt_bb_int_map;
union {
struct {
uint32_t core0_bt_bb_nmi_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_bt_bb_nmi_map;
union {
struct {
uint32_t core0_rwbt_irq_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_rwbt_irq_map;
union {
struct {
uint32_t core0_rwble_irq_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_rwble_irq_map;
union {
struct {
uint32_t core0_rwbt_nmi_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_rwbt_nmi_map;
union {
struct {
uint32_t core0_rwble_nmi_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_rwble_nmi_map;
union {
struct {
uint32_t core0_i2c_mst_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_i2c_mst_int_map;
union {
struct {
uint32_t core0_slc0_intr_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_slc0_intr_map;
union {
struct {
uint32_t core0_slc1_intr_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_slc1_intr_map;
union {
struct {
uint32_t core0_uhci0_intr_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_uhci0_intr_map;
union {
struct {
uint32_t core0_uhci1_intr_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_uhci1_intr_map;
union {
struct {
uint32_t core0_gpio_interrupt_pro_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_gpio_interrupt_pro_map;
union {
struct {
uint32_t core0_gpio_interrupt_pro_nmi_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_gpio_interrupt_pro_nmi_map;
union {
struct {
uint32_t core0_gpio_interrupt_app_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_gpio_interrupt_app_map;
union {
struct {
uint32_t core0_gpio_interrupt_app_nmi_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_gpio_interrupt_app_nmi_map;
union {
struct {
uint32_t core0_spi_intr_1_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_spi_intr_1_map;
union {
struct {
uint32_t core0_spi_intr_2_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_spi_intr_2_map;
union {
struct {
uint32_t core0_spi_intr_3_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_spi_intr_3_map;
union {
struct {
uint32_t core0_spi_intr_4_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_spi_intr_4_map;
union {
struct {
uint32_t core0_lcd_cam_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_lcd_cam_int_map;
union {
struct {
uint32_t core0_i2s0_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_i2s0_int_map;
union {
struct {
uint32_t core0_i2s1_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_i2s1_int_map;
union {
struct {
uint32_t core0_uart_intr_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_uart_intr_map;
union {
struct {
uint32_t core0_uart1_intr_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_uart1_intr_map;
union {
struct {
uint32_t core0_uart2_intr_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_uart2_intr_map;
union {
struct {
uint32_t core0_sdio_host_interrupt_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_sdio_host_interrupt_map;
union {
struct {
uint32_t core0_pwm0_intr_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_pwm0_intr_map;
union {
struct {
uint32_t core0_pwm1_intr_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_pwm1_intr_map;
union {
struct {
uint32_t core0_pwm2_intr_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_pwm2_intr_map;
union {
struct {
uint32_t core0_pwm3_intr_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_pwm3_intr_map;
union {
struct {
uint32_t core0_ledc_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_ledc_int_map;
union {
struct {
uint32_t core0_efuse_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_efuse_int_map;
union {
struct {
uint32_t core0_can_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_can_int_map;
union {
struct {
uint32_t core0_usb_intr_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_usb_intr_map;
union {
struct {
uint32_t core0_rtc_core_intr_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_rtc_core_intr_map;
union {
struct {
uint32_t core0_rmt_intr_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_rmt_intr_map;
union {
struct {
uint32_t core0_pcnt_intr_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_pcnt_intr_map;
union {
struct {
uint32_t core0_i2c_ext0_intr_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_i2c_ext0_intr_map;
union {
struct {
uint32_t core0_i2c_ext1_intr_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_i2c_ext1_intr_map;
union {
struct {
uint32_t core0_spi2_dma_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_spi2_dma_int_map;
union {
struct {
uint32_t core0_spi3_dma_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_spi3_dma_int_map;
union {
struct {
uint32_t core0_spi4_dma_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_spi4_dma_int_map;
union {
struct {
uint32_t core0_wdg_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_wdg_int_map;
union {
struct {
uint32_t core0_timer_int1_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_timer_int1_map;
union {
struct {
uint32_t core0_timer_int2_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_timer_int2_map;
union {
struct {
uint32_t core0_tg_t0_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_tg_t0_int_map;
union {
struct {
uint32_t core0_tg_t1_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_tg_t1_int_map;
union {
struct {
uint32_t core0_tg_wdt_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_tg_wdt_int_map;
union {
struct {
uint32_t core0_tg1_t0_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_tg1_t0_int_map;
union {
struct {
uint32_t core0_tg1_t1_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_tg1_t1_int_map;
union {
struct {
uint32_t core0_tg1_wdt_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_tg1_wdt_int_map;
union {
struct {
uint32_t core0_cache_ia_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_cache_ia_int_map;
union {
struct {
uint32_t core0_systimer_target0_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_systimer_target0_int_map;
union {
struct {
uint32_t core0_systimer_target1_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_systimer_target1_int_map;
union {
struct {
uint32_t core0_systimer_target2_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_systimer_target2_int_map;
union {
struct {
uint32_t core0_spi_mem_reject_intr_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_spi_mem_reject_intr_map;
union {
struct {
uint32_t core0_dcache_preload_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_dcache_preload_int_map;
union {
struct {
uint32_t core0_icache_preload_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_icache_preload_int_map;
union {
struct {
uint32_t core0_dcache_sync_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_dcache_sync_int_map;
union {
struct {
uint32_t core0_icache_sync_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_icache_sync_int_map;
union {
struct {
uint32_t core0_apb_adc_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_apb_adc_int_map;
union {
struct {
uint32_t core0_dma_in_ch0_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_dma_in_ch0_int_map;
union {
struct {
uint32_t core0_dma_in_ch1_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_dma_in_ch1_int_map;
union {
struct {
uint32_t core0_dma_in_ch2_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_dma_in_ch2_int_map;
union {
struct {
uint32_t core0_dma_in_ch3_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_dma_in_ch3_int_map;
union {
struct {
uint32_t core0_dma_in_ch4_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_dma_in_ch4_int_map;
union {
struct {
uint32_t core0_dma_out_ch0_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_dma_out_ch0_int_map;
union {
struct {
uint32_t core0_dma_out_ch1_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_dma_out_ch1_int_map;
union {
struct {
uint32_t core0_dma_out_ch2_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_dma_out_ch2_int_map;
union {
struct {
uint32_t core0_dma_out_ch3_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_dma_out_ch3_int_map;
union {
struct {
uint32_t core0_dma_out_ch4_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_dma_out_ch4_int_map;
union {
struct {
uint32_t core0_rsa_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_rsa_int_map;
union {
struct {
uint32_t core0_aes_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_aes_int_map;
union {
struct {
uint32_t core0_sha_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_sha_int_map;
union {
struct {
uint32_t core0_cpu_intr_from_cpu_0_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_cpu_intr_from_cpu_0_map;
union {
struct {
uint32_t core0_cpu_intr_from_cpu_1_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_cpu_intr_from_cpu_1_map;
union {
struct {
uint32_t core0_cpu_intr_from_cpu_2_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_cpu_intr_from_cpu_2_map;
union {
struct {
uint32_t core0_cpu_intr_from_cpu_3_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_cpu_intr_from_cpu_3_map;
union {
struct {
uint32_t core0_assist_debug_intr_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_assist_debug_intr_map;
union {
struct {
uint32_t core0_dma_apbperi_pms_monitor_violate_intr_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_dma_apbperi_pms_monitor_violate_intr_map;
union {
struct {
uint32_t core0_core_0_iram0_pms_monitor_violate_intr_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_core_0_iram0_pms_monitor_violate_intr_map;
union {
struct {
uint32_t core0_core_0_dram0_pms_monitor_violate_intr_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_core_0_dram0_pms_monitor_violate_intr_map;
union {
struct {
uint32_t core0_core_0_pif_pms_monitor_violate_intr_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_core_0_pif_pms_monitor_violate_intr_map;
union {
struct {
uint32_t core0_core_0_pif_pms_monitor_violate_size_intr_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_core_0_pif_pms_monitor_violate_size_intr_map;
union {
struct {
uint32_t core0_core_1_iram0_pms_monitor_violate_intr_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_core_1_iram0_pms_monitor_violate_intr_map;
union {
struct {
uint32_t core0_core_1_dram0_pms_monitor_violate_intr_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_core_1_dram0_pms_monitor_violate_intr_map;
union {
struct {
uint32_t core0_core_1_pif_pms_monitor_violate_intr_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_core_1_pif_pms_monitor_violate_intr_map;
union {
struct {
uint32_t core0_core_1_pif_pms_monitor_violate_size_intr_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_core_1_pif_pms_monitor_violate_size_intr_map;
union {
struct {
uint32_t core0_backup_pms_violate_intr_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_backup_pms_violate_intr_map;
union {
struct {
uint32_t core0_cache_core0_acs_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_cache_core0_acs_int_map;
union {
struct {
uint32_t core0_cache_core1_acs_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_cache_core1_acs_int_map;
union {
struct {
uint32_t core0_usb_device_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_usb_device_int_map;
union {
struct {
uint32_t core0_peri_backup_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_peri_backup_int_map;
union {
struct {
uint32_t core0_dma_extmem_reject_int_map: 5;
uint32_t reserved5: 27;
};
uint32_t val;
} core0_dma_extmem_reject_int_map;
uint32_t core0_intr_status_0; /**/
uint32_t core0_intr_status_1; /**/
uint32_t core0_intr_status_2; /**/
uint32_t core0_intr_status_3; /**/
union {
struct {
uint32_t core0_clk_en: 1;
uint32_t reserved1: 31;
};
uint32_t val;
} core0_clock_gate;
uint32_t reserved_1a0;
uint32_t reserved_1a4;
uint32_t reserved_1a8;
uint32_t reserved_1ac;
uint32_t reserved_1b0;
uint32_t reserved_1b4;
uint32_t reserved_1b8;
uint32_t reserved_1bc;
uint32_t reserved_1c0;
uint32_t reserved_1c4;
uint32_t reserved_1c8;
uint32_t reserved_1cc;
uint32_t reserved_1d0;
uint32_t reserved_1d4;
uint32_t reserved_1d8;
uint32_t reserved_1dc;
uint32_t reserved_1e0;
uint32_t reserved_1e4;
uint32_t reserved_1e8;
uint32_t reserved_1ec;
uint32_t reserved_1f0;
uint32_t reserved_1f4;
uint32_t reserved_1f8;
uint32_t reserved_1fc;
uint32_t reserved_200;
uint32_t reserved_204;
uint32_t reserved_208;
uint32_t reserved_20c;
uint32_t reserved_210;
uint32_t reserved_214;
uint32_t reserved_218;
uint32_t reserved_21c;
uint32_t reserved_220;
uint32_t reserved_224;
uint32_t reserved_228;
uint32_t reserved_22c;
uint32_t reserved_230;
uint32_t reserved_234;
uint32_t reserved_238;
uint32_t reserved_23c;
uint32_t reserved_240;
uint32_t reserved_244;
uint32_t reserved_248;
uint32_t reserved_24c;
uint32_t reserved_250;
uint32_t reserved_254;
uint32_t reserved_258;
uint32_t reserved_25c;
uint32_t reserved_260;
uint32_t reserved_264;
uint32_t reserved_268;
uint32_t reserved_26c;
uint32_t reserved_270;
uint32_t reserved_274;
uint32_t reserved_278;
uint32_t reserved_27c;
uint32_t reserved_280;
uint32_t reserved_284;
uint32_t reserved_288;
uint32_t reserved_28c;
uint32_t reserved_290;
uint32_t reserved_294;
uint32_t reserved_298;
uint32_t reserved_29c;
uint32_t reserved_2a0;
uint32_t reserved_2a4;
uint32_t reserved_2a8;
uint32_t reserved_2ac;
uint32_t reserved_2b0;
uint32_t reserved_2b4;
uint32_t reserved_2b8;
uint32_t reserved_2bc;
uint32_t reserved_2c0;
uint32_t reserved_2c4;
uint32_t reserved_2c8;
uint32_t reserved_2cc;
uint32_t reserved_2d0;
uint32_t reserved_2d4;
uint32_t reserved_2d8;
uint32_t reserved_2dc;
uint32_t reserved_2e0;
uint32_t reserved_2e4;
uint32_t reserved_2e8;
uint32_t reserved_2ec;
uint32_t reserved_2f0;
uint32_t reserved_2f4;
uint32_t reserved_2f8;
uint32_t reserved_2fc;
uint32_t reserved_300;
uint32_t reserved_304;
uint32_t reserved_308;
uint32_t reserved_30c;
uint32_t reserved_310;
uint32_t reserved_314;
uint32_t reserved_318;
uint32_t reserved_31c;
uint32_t reserved_320;
uint32_t reserved_324;
uint32_t reserved_328;
uint32_t reserved_32c;
uint32_t reserved_330;
uint32_t reserved_334;
uint32_t reserved_338;
uint32_t reserved_33c;
uint32_t reserved_340;
uint32_t reserved_344;
uint32_t reserved_348;
uint32_t reserved_34c;
uint32_t reserved_350;
uint32_t reserved_354;
uint32_t reserved_358;
uint32_t reserved_35c;
uint32_t reserved_360;
uint32_t reserved_364;
uint32_t reserved_368;
uint32_t reserved_36c;
uint32_t reserved_370;
uint32_t reserved_374;
uint32_t reserved_378;
uint32_t reserved_37c;
uint32_t reserved_380;
uint32_t reserved_384;
uint32_t reserved_388;
uint32_t reserved_38c;
uint32_t reserved_390;
uint32_t reserved_394;
uint32_t reserved_398;
uint32_t reserved_39c;
uint32_t reserved_3a0;
uint32_t reserved_3a4;
uint32_t reserved_3a8;
uint32_t reserved_3ac;
uint32_t reserved_3b0;
uint32_t reserved_3b4;
uint32_t reserved_3b8;
uint32_t reserved_3bc;
uint32_t reserved_3c0;
uint32_t reserved_3c4;
uint32_t reserved_3c8;
uint32_t reserved_3cc;
uint32_t reserved_3d0;
uint32_t reserved_3d4;
uint32_t reserved_3d8;
uint32_t reserved_3dc;
uint32_t reserved_3e0;
uint32_t reserved_3e4;
uint32_t reserved_3e8;
uint32_t reserved_3ec;
uint32_t reserved_3f0;
uint32_t reserved_3f4;
uint32_t reserved_3f8;
uint32_t reserved_3fc;
uint32_t reserved_400;
uint32_t reserved_404;
uint32_t reserved_408;
uint32_t reserved_40c;
uint32_t reserved_410;
uint32_t reserved_414;
uint32_t reserved_418;
uint32_t reserved_41c;
uint32_t reserved_420;
uint32_t reserved_424;
uint32_t reserved_428;
uint32_t reserved_42c;
uint32_t reserved_430;
uint32_t reserved_434;
uint32_t reserved_438;
uint32_t reserved_43c;
uint32_t reserved_440;
uint32_t reserved_444;
uint32_t reserved_448;
uint32_t reserved_44c;
uint32_t reserved_450;
uint32_t reserved_454;
uint32_t reserved_458;
uint32_t reserved_45c;
uint32_t reserved_460;
uint32_t reserved_464;
uint32_t reserved_468;
uint32_t reserved_46c;
uint32_t reserved_470;
uint32_t reserved_474;
uint32_t reserved_478;
uint32_t reserved_47c;
uint32_t reserved_480;
uint32_t reserved_484;
uint32_t reserved_488;
uint32_t reserved_48c;
uint32_t reserved_490;
uint32_t reserved_494;
uint32_t reserved_498;
uint32_t reserved_49c;
uint32_t reserved_4a0;
uint32_t reserved_4a4;
uint32_t reserved_4a8;
uint32_t reserved_4ac;
uint32_t reserved_4b0;
uint32_t reserved_4b4;
uint32_t reserved_4b8;
uint32_t reserved_4bc;
uint32_t reserved_4c0;
uint32_t reserved_4c4;
uint32_t reserved_4c8;
uint32_t reserved_4cc;
uint32_t reserved_4d0;
uint32_t reserved_4d4;
uint32_t reserved_4d8;
uint32_t reserved_4dc;
uint32_t reserved_4e0;
uint32_t reserved_4e4;
uint32_t reserved_4e8;
uint32_t reserved_4ec;
uint32_t reserved_4f0;
uint32_t reserved_4f4;
uint32_t reserved_4f8;
uint32_t reserved_4fc;
uint32_t reserved_500;
uint32_t reserved_504;
uint32_t reserved_508;
uint32_t reserved_50c;
uint32_t reserved_510;
uint32_t reserved_514;
uint32_t reserved_518;
uint32_t reserved_51c;
uint32_t reserved_520;
uint32_t reserved_524;
uint32_t reserved_528;
uint32_t reserved_52c;
uint32_t reserved_530;
uint32_t reserved_534;
uint32_t reserved_538;
uint32_t reserved_53c;
uint32_t reserved_540;
uint32_t reserved_544;
uint32_t reserved_548;
uint32_t reserved_54c;
uint32_t reserved_550;
uint32_t reserved_554;
uint32_t reserved_558;
uint32_t reserved_55c;
uint32_t reserved_560;
uint32_t reserved_564;
uint32_t reserved_568;
uint32_t reserved_56c;
uint32_t reserved_570;
uint32_t reserved_574;
uint32_t reserved_578;
uint32_t reserved_57c;
uint32_t reserved_580;
uint32_t reserved_584;
uint32_t reserved_588;
uint32_t reserved_58c;
uint32_t reserved_590;
uint32_t reserved_594;
uint32_t reserved_598;
uint32_t reserved_59c;
uint32_t reserved_5a0;
uint32_t reserved_5a4;
uint32_t reserved_5a8;
uint32_t reserved_5ac;
uint32_t reserved_5b0;
uint32_t reserved_5b4;
uint32_t reserved_5b8;
uint32_t reserved_5bc;
uint32_t reserved_5c0;
uint32_t reserved_5c4;
uint32_t reserved_5c8;
uint32_t reserved_5cc;
uint32_t reserved_5d0;
uint32_t reserved_5d4;
uint32_t reserved_5d8;
uint32_t reserved_5dc;
uint32_t reserved_5e0;
uint32_t reserved_5e4;
uint32_t reserved_5e8;
uint32_t reserved_5ec;
uint32_t reserved_5f0;
uint32_t reserved_5f4;
uint32_t reserved_5f8;
uint32_t reserved_5fc;
uint32_t reserved_600;
uint32_t reserved_604;
uint32_t reserved_608;
uint32_t reserved_60c;
uint32_t reserved_610;
uint32_t reserved_614;
uint32_t reserved_618;
uint32_t reserved_61c;
uint32_t reserved_620;
uint32_t reserved_624;
uint32_t reserved_628;
uint32_t reserved_62c;
uint32_t reserved_630;
uint32_t reserved_634;
uint32_t reserved_638;
uint32_t reserved_63c;
uint32_t reserved_640;
uint32_t reserved_644;
uint32_t reserved_648;
uint32_t reserved_64c;
uint32_t reserved_650;
uint32_t reserved_654;
uint32_t reserved_658;
uint32_t reserved_65c;
uint32_t reserved_660;
uint32_t reserved_664;
uint32_t reserved_668;
uint32_t reserved_66c;
uint32_t reserved_670;
uint32_t reserved_674;
uint32_t reserved_678;
uint32_t reserved_67c;
uint32_t reserved_680;
uint32_t reserved_684;
uint32_t reserved_688;
uint32_t reserved_68c;
uint32_t reserved_690;
uint32_t reserved_694;
uint32_t reserved_698;
uint32_t reserved_69c;
uint32_t reserved_6a0;
uint32_t reserved_6a4;
uint32_t reserved_6a8;
uint32_t reserved_6ac;
uint32_t reserved_6b0;
uint32_t reserved_6b4;
uint32_t reserved_6b8;
uint32_t reserved_6bc;
uint32_t reserved_6c0;
uint32_t reserved_6c4;
uint32_t reserved_6c8;
uint32_t reserved_6cc;
uint32_t reserved_6d0;
uint32_t reserved_6d4;
uint32_t reserved_6d8;
uint32_t reserved_6dc;
uint32_t reserved_6e0;
uint32_t reserved_6e4;
uint32_t reserved_6e8;
uint32_t reserved_6ec;
uint32_t reserved_6f0;
uint32_t reserved_6f4;
uint32_t reserved_6f8;
uint32_t reserved_6fc;
uint32_t reserved_700;
uint32_t reserved_704;
uint32_t reserved_708;
uint32_t reserved_70c;
uint32_t reserved_710;
uint32_t reserved_714;
uint32_t reserved_718;
uint32_t reserved_71c;
uint32_t reserved_720;
uint32_t reserved_724;
uint32_t reserved_728;
uint32_t reserved_72c;
uint32_t reserved_730;
uint32_t reserved_734;
uint32_t reserved_738;
uint32_t reserved_73c;
uint32_t reserved_740;
uint32_t reserved_744;
uint32_t reserved_748;
uint32_t reserved_74c;
uint32_t reserved_750;
uint32_t reserved_754;
uint32_t reserved_758;
uint32_t reserved_75c;
uint32_t reserved_760;
uint32_t reserved_764;
uint32_t reserved_768;
uint32_t reserved_76c;
uint32_t reserved_770;
uint32_t reserved_774;
uint32_t reserved_778;
uint32_t reserved_77c;
uint32_t reserved_780;
uint32_t reserved_784;
uint32_t reserved_788;
uint32_t reserved_78c;
uint32_t reserved_790;
uint32_t reserved_794;
uint32_t reserved_798;
uint32_t reserved_79c;
uint32_t reserved_7a0;
uint32_t reserved_7a4;
uint32_t reserved_7a8;
uint32_t reserved_7ac;
uint32_t reserved_7b0;
uint32_t reserved_7b4;
uint32_t reserved_7b8;
uint32_t reserved_7bc;
uint32_t reserved_7c0;
uint32_t reserved_7c4;
uint32_t reserved_7c8;
uint32_t reserved_7cc;
uint32_t reserved_7d0;
uint32_t reserved_7d4;
uint32_t reserved_7d8;
uint32_t reserved_7dc;
uint32_t reserved_7e0;
uint32_t reserved_7e4;
uint32_t reserved_7e8;
uint32_t reserved_7ec;
uint32_t reserved_7f0;
uint32_t reserved_7f4;
uint32_t reserved_7f8;
union {
struct {
uint32_t core0_interrupt_date:28;
uint32_t reserved28: 4;
};
uint32_t val;
} core0_interrupt_date;
} interrupt_core0_dev_t;
extern interrupt_core0_dev_t INTERRUPT_CORE0;
#ifdef __cplusplus
}
#endif
#endif /* _SOC_INTERRUPT_CORE0_STRUCT_H_ */
```
|
```sqlpl
SET optimize_trivial_insert_select = 1;
drop table if exists x;
create table x (i int, j int, k int) engine MergeTree order by tuple() settings index_granularity=8192, index_granularity_bytes = '10Mi', min_bytes_for_wide_part=0, min_rows_for_wide_part=0, ratio_of_defaults_for_sparse_serialization=1;
insert into x select number, number * 2, number * 3 from numbers(100000);
-- One granule, (_part_offset (8 bytes) + <one minimal physical column> (4 bytes)) * 8192 + <other two physical columns>(8 bytes) * 1 = 98312
select * from x prewhere _part_offset = 0 settings max_bytes_to_read = 98312;
drop table x;
```
|
```smalltalk
using System;
using System.Collections.Generic;
using NUnit.Framework;
using Xamarin.Forms;
using Xamarin.Forms.Core.UnitTests;
namespace Xamarin.Forms.Xaml.UnitTests
{
public partial class Bz41048 : ContentPage
{
public Bz41048()
{
InitializeComponent();
}
public Bz41048(bool useCompiledXaml)
{
//this stub will be replaced at compile time
}
[TestFixture]
class Tests
{
[SetUp]
public void Setup()
{
Device.PlatformServices = new MockPlatformServices();
}
[TearDown]
public void TearDown()
{
Application.Current = null;
Device.PlatformServices = null;
}
[TestCase(true)]
[TestCase(false)]
public void StyleDoesNotOverrideValues(bool useCompiledXaml)
{
var layout = new Bz41048(useCompiledXaml);
var label = layout.label0;
Assert.That(label.TextColor, Is.EqualTo(Color.Red));
Assert.That(label.FontAttributes, Is.EqualTo(FontAttributes.Bold));
Assert.That(label.LineBreakMode, Is.EqualTo(LineBreakMode.WordWrap));
}
}
}
}
```
|
```smalltalk
using Volo.Abp.Application.Dtos;
namespace Volo.Abp.TenantManagement;
public class GetTenantsInput : PagedAndSortedResultRequestDto
{
public string Filter { get; set; }
}
```
|
```html
<app-doc docTitle="Angular PanelMenu Component" header="PanelMenu" description="PanelMenu is a hybrid of Accordion and Tree components." [docs]="docs" [apiDocs]="['PanelMenu', 'MenuItem']"></app-doc>
```
|
```c++
//
//
// path_to_url
//
#include "pxr/pxr.h"
#include "pxr/base/plug/notice.h"
#include "pxr/base/tf/pyResultConversions.h"
#include "pxr/base/tf/pyNoticeWrapper.h"
#include <boost/python/class.hpp>
#include <boost/python/scope.hpp>
using namespace boost::python;
PXR_NAMESPACE_USING_DIRECTIVE
namespace {
TF_INSTANTIATE_NOTICE_WRAPPER(PlugNotice::Base, TfNotice);
TF_INSTANTIATE_NOTICE_WRAPPER(PlugNotice::DidRegisterPlugins, PlugNotice::Base);
} // anonymous namespace
void
wrapNotice()
{
scope noticeScope = class_<PlugNotice>("Notice", no_init);
TfPyNoticeWrapper<PlugNotice::Base, TfNotice>::Wrap()
;
TfPyNoticeWrapper<PlugNotice::DidRegisterPlugins, PlugNotice::Base>::Wrap()
.def("GetNewPlugins",
make_function(&PlugNotice::DidRegisterPlugins::GetNewPlugins,
return_value_policy<TfPySequenceToList>()))
;
}
```
|
```objective-c
#ifndef VALHALLA_BALDR_TRANSITSTOP_H_
#define VALHALLA_BALDR_TRANSITSTOP_H_
#include <cstdint>
#include <stdexcept>
#include <valhalla/baldr/graphconstants.h>
namespace valhalla {
namespace baldr {
/**
* Information held for each transit stop. This is information not required
* during path generation. Such information is held within NodeInfo (lat,lng,
* type, etc.).
*/
class TransitStop {
public:
// Constructor with arguments
TransitStop(const uint32_t one_stop_offset,
const uint32_t name_offset,
const bool generated,
const uint32_t traversability)
: generated_(generated), traversability_(traversability), spare_(0) {
if (one_stop_offset > kMaxNameOffset) {
throw std::runtime_error("TransitStop: Exceeded maximum name offset");
}
one_stop_offset_ = one_stop_offset;
if (name_offset > kMaxNameOffset) {
throw std::runtime_error("TransitStop: Exceeded maximum name offset");
}
name_offset_ = name_offset;
}
/**
* Get the one stop Id offset for the stop.
* @return Returns the one stop Id offset.
*/
uint32_t one_stop_offset() const {
return one_stop_offset_;
}
/**
* Get the text/name offset for the stop name.
* @return Returns the name offset in the text/name list.
*/
uint32_t name_offset() const {
return name_offset_;
}
/**
* Get the generated flag that indicates if
* the stop has been generated or exists in
* real world
* @return Returns the generated flag.
*/
bool generated() const {
return generated_;
}
/**
* Get the traversability indicates if
* the egress can be entered, exited, or both
* in the real world.
* @return Returns the traversability.
*/
Traversability traversability() const {
return static_cast<Traversability>(traversability_);
}
protected:
uint64_t one_stop_offset_ : 24; // one stop Id offset.
uint64_t name_offset_ : 24; // Stop name offset in the text/name list.
uint64_t generated_ : 1;
uint64_t traversability_ : 2;
uint64_t spare_ : 13;
// size of tests
};
} // namespace baldr
} // namespace valhalla
#endif // VALHALLA_BALDR_TRANSITSTOP_H_
```
|
Phellodon putidus is a species of tooth fungus in the family Bankeraceae. Found in North America, it was first described scientifically by George F. Atkinson as Hydnum putidum in 1900. Howard James Banker transferred it to the genus Phellodon in 1906.
References
External links
Fungi described in 1900
Fungi of North America
putidus
|
```objective-c
/*
*
*
* This file is based on dw1000_regs.h and dw1000_mac.c from
* path_to_url
* (d6b1414f1b4527abda7521a304baa1c648244108)
* The content was modified and restructured to meet the
* coding style and resolve namespace issues.
*
* This file is derived from material that is:
*
*
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing,
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* specific language governing permissions and limitations
*/
#ifndef ZEPHYR_INCLUDE_DW1000_REGS_H_
#define ZEPHYR_INCLUDE_DW1000_REGS_H_
/* Device ID register, includes revision info (0xDECA0130) */
#define DWT_DEV_ID_ID 0x00
#define DWT_DEV_ID_LEN 4
/* Revision */
#define DWT_DEV_ID_REV_MASK 0x0000000FUL
/* Version */
#define DWT_DEV_ID_VER_MASK 0x000000F0UL
/* The MODEL identifies the device. The DW1000 is device type 0x01 */
#define DWT_DEV_ID_MODEL_MASK 0x0000FF00UL
/* Register Identification Tag 0XDECA */
#define DWT_DEV_ID_RIDTAG_MASK 0xFFFF0000UL
/* IEEE Extended Unique Identifier (63:0) */
#define DWT_EUI_64_ID 0x01
#define DWT_EUI_64_OFFSET 0x00
#define DWT_EUI_64_LEN 8
/* PAN ID (31:16) and Short Address (15:0) */
#define DWT_PANADR_ID 0x03
#define DWT_PANADR_LEN 4
#define DWT_PANADR_SHORT_ADDR_OFFSET 0
/* Short Address */
#define DWT_PANADR_SHORT_ADDR_MASK 0x0000FFFFUL
#define DWT_PANADR_PAN_ID_OFFSET 2
/* PAN Identifier */
#define DWT_PANADR_PAN_ID_MASK 0xFFFF00F0UL
#define DWT_REG_05_ID_RESERVED 0x05
/* System Configuration (31:0) */
#define DWT_SYS_CFG_ID 0x04
#define DWT_SYS_CFG_LEN 4
/* Access mask to SYS_CFG_ID */
#define DWT_SYS_CFG_MASK 0xF047FFFFUL
/* Frame filtering options all frames allowed */
#define DWT_SYS_CFG_FF_ALL_EN 0x000001FEUL
/* Frame Filtering Enable. This bit enables the frame filtering functionality */
#define DWT_SYS_CFG_FFE 0x00000001UL
/* Frame Filtering Behave as a Co-ordinator */
#define DWT_SYS_CFG_FFBC 0x00000002UL
/* Frame Filtering Allow Beacon frame reception */
#define DWT_SYS_CFG_FFAB 0x00000004UL
/* Frame Filtering Allow Data frame reception */
#define DWT_SYS_CFG_FFAD 0x00000008UL
/* Frame Filtering Allow Acknowledgment frame reception */
#define DWT_SYS_CFG_FFAA 0x00000010UL
/* Frame Filtering Allow MAC command frame reception */
#define DWT_SYS_CFG_FFAM 0x00000020UL
/* Frame Filtering Allow Reserved frame types */
#define DWT_SYS_CFG_FFAR 0x00000040UL
/* Frame Filtering Allow frames with frame type field of 4, (binary 100) */
#define DWT_SYS_CFG_FFA4 0x00000080UL
/* Frame Filtering Allow frames with frame type field of 5, (binary 101) */
#define DWT_SYS_CFG_FFA5 0x00000100UL
/* Host interrupt polarity */
#define DWT_SYS_CFG_HIRQ_POL 0x00000200UL
/* SPI data launch edge */
#define DWT_SYS_CFG_SPI_EDGE 0x00000400UL
/* Disable frame check error handling */
#define DWT_SYS_CFG_DIS_FCE 0x00000800UL
/* Disable Double RX Buffer */
#define DWT_SYS_CFG_DIS_DRXB 0x00001000UL
/* Disable receiver abort on PHR error */
#define DWT_SYS_CFG_DIS_PHE 0x00002000UL
/* Disable Receiver Abort on RSD error */
#define DWT_SYS_CFG_DIS_RSDE 0x00004000UL
/* initial seed value for the FCS generation and checking function */
#define DWT_SYS_CFG_FCS_INIT2F 0x00008000UL
#define DWT_SYS_CFG_PHR_MODE_SHFT 16
/* Standard Frame mode */
#define DWT_SYS_CFG_PHR_MODE_00 0x00000000UL
/* Long Frames mode */
#define DWT_SYS_CFG_PHR_MODE_11 0x00030000UL
/* Disable Smart TX Power control */
#define DWT_SYS_CFG_DIS_STXP 0x00040000UL
/* Receiver Mode 110 kbps data rate */
#define DWT_SYS_CFG_RXM110K 0x00400000UL
/* Receive Wait Timeout Enable. */
#define DWT_SYS_CFG_RXWTOE 0x10000000UL
/*
* Receiver Auto-Re-enable.
* This bit is used to cause the receiver to re-enable automatically
*/
#define DWT_SYS_CFG_RXAUTR 0x20000000UL
/* Automatic Acknowledgement Enable */
#define DWT_SYS_CFG_AUTOACK 0x40000000UL
/* Automatic Acknowledgement Pending bit control */
#define DWT_SYS_CFG_AACKPEND 0x80000000UL
/* System Time Counter (40-bit) */
#define DWT_SYS_TIME_ID 0x06
#define DWT_SYS_TIME_OFFSET 0x00
/* Note 40 bit register */
#define DWT_SYS_TIME_LEN 5
#define DWT_REG_07_ID_RESERVED 0x07
/* Transmit Frame Control */
#define DWT_TX_FCTRL_ID 0x08
/* Note 40 bit register */
#define DWT_TX_FCTRL_LEN 5
/* Bit mask to access Transmit Frame Length */
#define DWT_TX_FCTRL_TFLEN_MASK 0x0000007FUL
/* Bit mask to access Transmit Frame Length Extension */
#define DWT_TX_FCTRL_TFLE_MASK 0x00000380UL
/* Bit mask to access Frame Length field */
#define DWT_TX_FCTRL_FLE_MASK 0x000003FFUL
/* Bit mask to access Transmit Bit Rate */
#define DWT_TX_FCTRL_TXBR_MASK 0x00006000UL
/* Bit mask to access Transmit Pulse Repetition Frequency */
#define DWT_TX_FCTRL_TXPRF_MASK 0x00030000UL
/* Bit mask to access Transmit Preamble Symbol Repetitions (PSR). */
#define DWT_TX_FCTRL_TXPSR_MASK 0x000C0000UL
/* Bit mask to access Preamble Extension */
#define DWT_TX_FCTRL_PE_MASK 0x00300000UL
/* Bit mask to access Transmit Preamble Symbol Repetitions (PSR). */
#define DWT_TX_FCTRL_TXPSR_PE_MASK 0x003C0000UL
/* FSCTRL has fields which should always be writen zero */
#define DWT_TX_FCTRL_SAFE_MASK_32 0xFFFFE3FFUL
/* Transmit Bit Rate = 110k */
#define DWT_TX_FCTRL_TXBR_110k 0x00000000UL
/* Transmit Bit Rate = 850k */
#define DWT_TX_FCTRL_TXBR_850k 0x00002000UL
/* Transmit Bit Rate = 6.8M */
#define DWT_TX_FCTRL_TXBR_6M 0x00004000UL
/* Shift to access Data Rate field */
#define DWT_TX_FCTRL_TXBR_SHFT 13
/* Transmit Ranging enable */
#define DWT_TX_FCTRL_TR 0x00008000UL
/* Shift to access Ranging bit */
#define DWT_TX_FCTRL_TR_SHFT 15
/* Shift to access Pulse Repetition Frequency field */
#define DWT_TX_FCTRL_TXPRF_SHFT 16
/* Transmit Pulse Repetition Frequency = 4 Mhz */
#define DWT_TX_FCTRL_TXPRF_4M 0x00000000UL
/* Transmit Pulse Repetition Frequency = 16 Mhz */
#define DWT_TX_FCTRL_TXPRF_16M 0x00010000UL
/* Transmit Pulse Repetition Frequency = 64 Mhz */
#define DWT_TX_FCTRL_TXPRF_64M 0x00020000UL
/* Shift to access Preamble Symbol Repetitions field */
#define DWT_TX_FCTRL_TXPSR_SHFT 18
/*
* shift to access Preamble length Extension to allow specification
* of non-standard values
*/
#define DWT_TX_FCTRL_PE_SHFT 20
/* Bit mask to access Preamble Extension = 16 */
#define DWT_TX_FCTRL_TXPSR_PE_16 0x00000000UL
/* Bit mask to access Preamble Extension = 64 */
#define DWT_TX_FCTRL_TXPSR_PE_64 0x00040000UL
/* Bit mask to access Preamble Extension = 128 */
#define DWT_TX_FCTRL_TXPSR_PE_128 0x00140000UL
/* Bit mask to access Preamble Extension = 256 */
#define DWT_TX_FCTRL_TXPSR_PE_256 0x00240000UL
/* Bit mask to access Preamble Extension = 512 */
#define DWT_TX_FCTRL_TXPSR_PE_512 0x00340000UL
/* Bit mask to access Preamble Extension = 1024 */
#define DWT_TX_FCTRL_TXPSR_PE_1024 0x00080000UL
/* Bit mask to access Preamble Extension = 1536 */
#define DWT_TX_FCTRL_TXPSR_PE_1536 0x00180000UL
/* Bit mask to access Preamble Extension = 2048 */
#define DWT_TX_FCTRL_TXPSR_PE_2048 0x00280000UL
/* Bit mask to access Preamble Extension = 4096 */
#define DWT_TX_FCTRL_TXPSR_PE_4096 0x000C0000UL
/* Shift to access transmit buffer index offset */
#define DWT_TX_FCTRL_TXBOFFS_SHFT 22
/* Bit mask to access Transmit buffer index offset 10-bit field */
#define DWT_TX_FCTRL_TXBOFFS_MASK 0xFFC00000UL
/* Bit mask to access Inter-Frame Spacing field */
#define DWT_TX_FCTRL_IFSDELAY_MASK 0xFF00000000ULL
/* Transmit Data Buffer */
#define DWT_TX_BUFFER_ID 0x09
#define DWT_TX_BUFFER_LEN 1024
/* Delayed Send or Receive Time (40-bit) */
#define DWT_DX_TIME_ID 0x0A
#define DWT_DX_TIME_LEN 5
#define DWT_REG_0B_ID_RESERVED 0x0B
/* Receive Frame Wait Timeout Period */
#define DWT_RX_FWTO_ID 0x0C
#define DWT_RX_FWTO_OFFSET 0x00
#define DWT_RX_FWTO_LEN 2
#define DWT_RX_FWTO_MASK 0xFFFF
/* System Control Register */
#define DWT_SYS_CTRL_ID 0x0D
#define DWT_SYS_CTRL_OFFSET 0x00
#define DWT_SYS_CTRL_LEN 4
/*
* System Control Register access mask
* (all unused fields should always be writen as zero)
*/
#define DWT_SYS_CTRL_MASK_32 0x010003CFUL
/* Suppress Auto-FCS Transmission (on this frame) */
#define DWT_SYS_CTRL_SFCST 0x00000001UL
/* Start Transmitting Now */
#define DWT_SYS_CTRL_TXSTRT 0x00000002UL
/* Transmitter Delayed Sending (initiates sending when SYS_TIME == TXD_TIME */
#define DWT_SYS_CTRL_TXDLYS 0x00000004UL
/* Cancel Suppression of auto-FCS transmission (on the current frame) */
#define DWT_SYS_CTRL_CANSFCS 0x00000008UL
/* Transceiver Off. Force Transciever OFF abort TX or RX immediately */
#define DWT_SYS_CTRL_TRXOFF 0x00000040UL
/* Wait for Response */
#define DWT_SYS_CTRL_WAIT4RESP 0x00000080UL
/* Enable Receiver Now */
#define DWT_SYS_CTRL_RXENAB 0x00000100UL
/*
* Receiver Delayed Enable
* (Enables Receiver when SY_TIME[0x??] == RXD_TIME[0x??] CHECK comment
*/
#define DWT_SYS_CTRL_RXDLYE 0x00000200UL
/*
* Host side receiver buffer pointer toggle - toggles 0/1
* host side data set pointer
*/
#define DWT_SYS_CTRL_HSRBTOGGLE 0x01000000UL
#define DWT_SYS_CTRL_HRBT DWT_SYS_CTRL_HSRBTOGGLE
#define DWT_SYS_CTRL_HRBT_OFFSET 3
/* System Event Mask Register */
#define DWT_SYS_MASK_ID 0x0E
#define DWT_SYS_MASK_LEN 4
/*
* System Event Mask Register access mask
* (all unused fields should always be writen as zero)
*/
#define DWT_SYS_MASK_MASK_32 0x3FF7FFFEUL
/* Mask clock PLL lock event */
#define DWT_SYS_MASK_MCPLOCK 0x00000002UL
/* Mask clock PLL lock event */
#define DWT_SYS_MASK_MESYNCR 0x00000004UL
/* Mask automatic acknowledge trigger event */
#define DWT_SYS_MASK_MAAT 0x00000008UL
/* Mask transmit frame begins event */
#define DWT_SYS_MASK_MTXFRB 0x00000010UL
/* Mask transmit preamble sent event */
#define DWT_SYS_MASK_MTXPRS 0x00000020UL
/* Mask transmit PHY Header Sent event */
#define DWT_SYS_MASK_MTXPHS 0x00000040UL
/* Mask transmit frame sent event */
#define DWT_SYS_MASK_MTXFRS 0x00000080UL
/* Mask receiver preamble detected event */
#define DWT_SYS_MASK_MRXPRD 0x00000100UL
/* Mask receiver SFD detected event */
#define DWT_SYS_MASK_MRXSFDD 0x00000200UL
/* Mask LDE processing done event */
#define DWT_SYS_MASK_MLDEDONE 0x00000400UL
/* Mask receiver PHY header detect event */
#define DWT_SYS_MASK_MRXPHD 0x00000800UL
/* Mask receiver PHY header error event */
#define DWT_SYS_MASK_MRXPHE 0x00001000UL
/* Mask receiver data frame ready event */
#define DWT_SYS_MASK_MRXDFR 0x00002000UL
/* Mask receiver FCS good event */
#define DWT_SYS_MASK_MRXFCG 0x00004000UL
/* Mask receiver FCS error event */
#define DWT_SYS_MASK_MRXFCE 0x00008000UL
/* Mask receiver Reed Solomon Frame Sync Loss event */
#define DWT_SYS_MASK_MRXRFSL 0x00010000UL
/* Mask Receive Frame Wait Timeout event */
#define DWT_SYS_MASK_MRXRFTO 0x00020000UL
/* Mask leading edge detection processing error event */
#define DWT_SYS_MASK_MLDEERR 0x00040000UL
/* Mask Receiver Overrun event */
#define DWT_SYS_MASK_MRXOVRR 0x00100000UL
/* Mask Preamble detection timeout event */
#define DWT_SYS_MASK_MRXPTO 0x00200000UL
/* Mask GPIO interrupt event */
#define DWT_SYS_MASK_MGPIOIRQ 0x00400000UL
/* Mask SLEEP to INIT event */
#define DWT_SYS_MASK_MSLP2INIT 0x00800000UL
/* Mask RF PLL Loosing Lock warning event */
#define DWT_SYS_MASK_MRFPLLLL 0x01000000UL
/* Mask Clock PLL Loosing Lock warning event */
#define DWT_SYS_MASK_MCPLLLL 0x02000000UL
/* Mask Receive SFD timeout event */
#define DWT_SYS_MASK_MRXSFDTO 0x04000000UL
/* Mask Half Period Delay Warning event */
#define DWT_SYS_MASK_MHPDWARN 0x08000000UL
/* Mask Transmit Buffer Error event */
#define DWT_SYS_MASK_MTXBERR 0x10000000UL
/* Mask Automatic Frame Filtering rejection event */
#define DWT_SYS_MASK_MAFFREJ 0x20000000UL
/* System event Status Register */
#define DWT_SYS_STATUS_ID 0x0F
#define DWT_SYS_STATUS_OFFSET 0x00
/* Note 40 bit register */
#define DWT_SYS_STATUS_LEN 5
/*
* System event Status Register access mask
* (all unused fields should always be writen as zero)
*/
#define DWT_SYS_STATUS_MASK_32 0xFFF7FFFFUL
/* Interrupt Request Status READ ONLY */
#define DWT_SYS_STATUS_IRQS 0x00000001UL
/* Clock PLL Lock */
#define DWT_SYS_STATUS_CPLOCK 0x00000002UL
/* External Sync Clock Reset */
#define DWT_SYS_STATUS_ESYNCR 0x00000004UL
/* Automatic Acknowledge Trigger */
#define DWT_SYS_STATUS_AAT 0x00000008UL
/* Transmit Frame Begins */
#define DWT_SYS_STATUS_TXFRB 0x00000010UL
/* Transmit Preamble Sent */
#define DWT_SYS_STATUS_TXPRS 0x00000020UL
/* Transmit PHY Header Sent */
#define DWT_SYS_STATUS_TXPHS 0x00000040UL
/*
* Transmit Frame Sent:
* This is set when the transmitter has completed the sending of a frame
*/
#define DWT_SYS_STATUS_TXFRS 0x00000080UL
/* Receiver Preamble Detected status */
#define DWT_SYS_STATUS_RXPRD 0x00000100UL
/* Receiver Start Frame Delimiter Detected. */
#define DWT_SYS_STATUS_RXSFDD 0x00000200UL
/* LDE processing done */
#define DWT_SYS_STATUS_LDEDONE 0x00000400UL
/* Receiver PHY Header Detect */
#define DWT_SYS_STATUS_RXPHD 0x00000800UL
/* Receiver PHY Header Error */
#define DWT_SYS_STATUS_RXPHE 0x00001000UL
/* Receiver Data Frame Ready */
#define DWT_SYS_STATUS_RXDFR 0x00002000UL
/* Receiver FCS Good */
#define DWT_SYS_STATUS_RXFCG 0x00004000UL
/* Receiver FCS Error */
#define DWT_SYS_STATUS_RXFCE 0x00008000UL
/* Receiver Reed Solomon Frame Sync Loss */
#define DWT_SYS_STATUS_RXRFSL 0x00010000UL
/* Receive Frame Wait Timeout */
#define DWT_SYS_STATUS_RXRFTO 0x00020000UL
/* Leading edge detection processing error */
#define DWT_SYS_STATUS_LDEERR 0x00040000UL
/* bit19 reserved */
#define DWT_SYS_STATUS_reserved 0x00080000UL
/* Receiver Overrun */
#define DWT_SYS_STATUS_RXOVRR 0x00100000UL
/* Preamble detection timeout */
#define DWT_SYS_STATUS_RXPTO 0x00200000UL
/* GPIO interrupt */
#define DWT_SYS_STATUS_GPIOIRQ 0x00400000UL
/* SLEEP to INIT */
#define DWT_SYS_STATUS_SLP2INIT 0x00800000UL
/* RF PLL Losing Lock */
#define DWT_SYS_STATUS_RFPLL_LL 0x01000000UL
/* Clock PLL Losing Lock */
#define DWT_SYS_STATUS_CLKPLL_LL 0x02000000UL
/* Receive SFD timeout */
#define DWT_SYS_STATUS_RXSFDTO 0x04000000UL
/* Half Period Delay Warning */
#define DWT_SYS_STATUS_HPDWARN 0x08000000UL
/* Transmit Buffer Error */
#define DWT_SYS_STATUS_TXBERR 0x10000000UL
/* Automatic Frame Filtering rejection */
#define DWT_SYS_STATUS_AFFREJ 0x20000000UL
/* Host Side Receive Buffer Pointer */
#define DWT_SYS_STATUS_HSRBP 0x40000000UL
/* IC side Receive Buffer Pointer READ ONLY */
#define DWT_SYS_STATUS_ICRBP 0x80000000UL
/* Receiver Reed-Solomon Correction Status */
#define DWT_SYS_STATUS_RXRSCS 0x0100000000ULL
/* Receiver Preamble Rejection */
#define DWT_SYS_STATUS_RXPREJ 0x0200000000ULL
/* Transmit power up time error */
#define DWT_SYS_STATUS_TXPUTE 0x0400000000ULL
/*
* These bits are the 16 high bits of status register TXPUTE and
* HPDWARN flags
*/
#define DWT_SYS_STATUS_TXERR (0x0408)
/* All RX events after a correct packet reception mask. */
#define DWT_SYS_STATUS_ALL_RX_GOOD (DWT_SYS_STATUS_RXDFR | \
DWT_SYS_STATUS_RXFCG | \
DWT_SYS_STATUS_RXPRD | \
DWT_SYS_STATUS_RXSFDD | \
DWT_SYS_STATUS_RXPHD)
/* All TX events mask. */
#define DWT_SYS_STATUS_ALL_TX (DWT_SYS_STATUS_AAT | \
DWT_SYS_STATUS_TXFRB | \
DWT_SYS_STATUS_TXPRS | \
DWT_SYS_STATUS_TXPHS | \
DWT_SYS_STATUS_TXFRS)
/* All double buffer events mask. */
#define DWT_SYS_STATUS_ALL_DBLBUFF (DWT_SYS_STATUS_RXDFR | \
DWT_SYS_STATUS_RXFCG)
/* All RX errors mask. */
#define DWT_SYS_STATUS_ALL_RX_ERR (DWT_SYS_STATUS_RXPHE | \
DWT_SYS_STATUS_RXFCE | \
DWT_SYS_STATUS_RXRFSL | \
DWT_SYS_STATUS_RXOVRR | \
DWT_SYS_STATUS_RXSFDTO | \
DWT_SYS_STATUS_AFFREJ)
#define DWT_SYS_MASK_ALL_RX_ERR (DWT_SYS_MASK_MRXPHE | \
DWT_SYS_MASK_MRXFCE | \
DWT_SYS_MASK_MRXRFSL | \
DWT_SYS_STATUS_RXOVRR | \
DWT_SYS_MASK_MRXSFDTO | \
DWT_SYS_MASK_MAFFREJ)
/*
* User defined RX timeouts
* (frame wait timeout and preamble detect timeout) mask.
*/
#define DWT_SYS_STATUS_ALL_RX_TO (DWT_SYS_STATUS_RXRFTO | \
DWT_SYS_STATUS_RXPTO)
#define DWT_SYS_MASK_ALL_RX_TO (DWT_SYS_MASK_MRXRFTO | \
DWT_SYS_MASK_MRXPTO)
/* RX Frame Information (in double buffer set) */
#define DWT_RX_FINFO_ID 0x10
#define DWT_RX_FINFO_OFFSET 0x00
#define DWT_RX_FINFO_LEN 4
/*
* System event Status Register access mask
* (all unused fields should always be writen as zero)
*/
#define DWT_RX_FINFO_MASK_32 0xFFFFFBFFUL
/* Receive Frame Length (0 to 127) */
#define DWT_RX_FINFO_RXFLEN_MASK 0x0000007FUL
/* Receive Frame Length Extension (0 to 7)<<7 */
#define DWT_RX_FINFO_RXFLE_MASK 0x00000380UL
/* Receive Frame Length Extension (0 to 1023) */
#define DWT_RX_FINFO_RXFL_MASK_1023 0x000003FFUL
/* Receive Non-Standard Preamble Length */
#define DWT_RX_FINFO_RXNSPL_MASK 0x00001800UL
/*
* RX Preamble Repetition.
* 00 = 16 symbols, 01 = 64 symbols, 10 = 1024 symbols, 11 = 4096 symbols
*/
#define DWT_RX_FINFO_RXPSR_MASK 0x000C0000UL
/* Receive Preamble Length = RXPSR+RXNSPL */
#define DWT_RX_FINFO_RXPEL_MASK 0x000C1800UL
/* Receive Preamble length = 64 */
#define DWT_RX_FINFO_RXPEL_64 0x00040000UL
/* Receive Preamble length = 128 */
#define DWT_RX_FINFO_RXPEL_128 0x00040800UL
/* Receive Preamble length = 256 */
#define DWT_RX_FINFO_RXPEL_256 0x00041000UL
/* Receive Preamble length = 512 */
#define DWT_RX_FINFO_RXPEL_512 0x00041800UL
/* Receive Preamble length = 1024 */
#define DWT_RX_FINFO_RXPEL_1024 0x00080000UL
/* Receive Preamble length = 1536 */
#define DWT_RX_FINFO_RXPEL_1536 0x00080800UL
/* Receive Preamble length = 2048 */
#define DWT_RX_FINFO_RXPEL_2048 0x00081000UL
/* Receive Preamble length = 4096 */
#define DWT_RX_FINFO_RXPEL_4096 0x000C0000UL
/* Receive Bit Rate report. This field reports the received bit rate */
#define DWT_RX_FINFO_RXBR_MASK 0x00006000UL
/* Received bit rate = 110 kbps */
#define DWT_RX_FINFO_RXBR_110k 0x00000000UL
/* Received bit rate = 850 kbps */
#define DWT_RX_FINFO_RXBR_850k 0x00002000UL
/* Received bit rate = 6.8 Mbps */
#define DWT_RX_FINFO_RXBR_6M 0x00004000UL
#define DWT_RX_FINFO_RXBR_SHIFT 13
/*
* Receiver Ranging. Ranging bit in the received PHY header
* identifying the frame as a ranging packet.
*/
#define DWT_RX_FINFO_RNG 0x00008000UL
#define DWT_RX_FINFO_RNG_SHIFT 15
/* RX Pulse Repetition Rate report */
#define DWT_RX_FINFO_RXPRF_MASK 0x00030000UL
/* PRF being employed in the receiver = 16M */
#define DWT_RX_FINFO_RXPRF_16M 0x00010000UL
/* PRF being employed in the receiver = 64M */
#define DWT_RX_FINFO_RXPRF_64M 0x00020000UL
#define DWT_RX_FINFO_RXPRF_SHIFT 16
/* Preamble Accumulation Count */
#define DWT_RX_FINFO_RXPACC_MASK 0xFFF00000UL
#define DWT_RX_FINFO_RXPACC_SHIFT 20
/* Receive Data Buffer (in double buffer set) */
#define DWT_RX_BUFFER_ID 0x11
#define DWT_RX_BUFFER_LEN 1024
/* Rx Frame Quality information (in double buffer set) */
#define DWT_RX_FQUAL_ID 0x12
/* Note 64 bit register */
#define DWT_RX_FQUAL_LEN 8
/* Standard Deviation of Noise */
#define DWT_RX_EQUAL_STD_NOISE_MASK 0x0000FFFFULL
#define DWT_RX_EQUAL_STD_NOISE_SHIFT 0
#define DWT_STD_NOISE_MASK DWT_RX_EQUAL_STD_NOISE_MASK
#define DWT_STD_NOISE_SHIFT DWT_RX_EQUAL_STD_NOISE_SHIFT
/* First Path Amplitude point 2 */
#define DWT_RX_EQUAL_FP_AMPL2_MASK 0xFFFF0000ULL
#define DWT_RX_EQUAL_FP_AMPL2_SHIFT 16
#define DWT_FP_AMPL2_MASK DWT_RX_EQUAL_FP_AMPL2_MASK
#define DWT_FP_AMPL2_SHIFT DWT_RX_EQUAL_FP_AMPL2_SHIFT
/* First Path Amplitude point 3 */
#define DWT_RX_EQUAL_PP_AMPL3_MASK 0x0000FFFF00000000ULL
#define DWT_RX_EQUAL_PP_AMPL3_SHIFT 32
#define DWT_PP_AMPL3_MASK DWT_RX_EQUAL_PP_AMPL3_MASK
#define DWT_PP_AMPL3_SHIFT DWT_RX_EQUAL_PP_AMPL3_SHIFT
/* Channel Impulse Response Max Growth */
#define DWT_RX_EQUAL_CIR_MXG_MASK 0xFFFF000000000000ULL
#define DWT_RX_EQUAL_CIR_MXG_SHIFT 48
#define DWT_CIR_MXG_MASK DWT_RX_EQUAL_CIR_MXG_MASK
#define DWT_CIR_MXG_SHIFT DWT_RX_EQUAL_CIR_MXG_SHIFT
/* Receiver Time Tracking Interval (in double buffer set) */
#define DWT_RX_TTCKI_ID 0x13
#define DWT_RX_TTCKI_LEN 4
/* Receiver Time Tracking Offset (in double buffer set) */
#define DWT_RX_TTCKO_ID 0x14
/* Note 40 bit register */
#define DWT_RX_TTCKO_LEN 5
/*
* Receiver Time Tracking Offset access mask
* (all unused fields should always be writen as zero)
*/
#define DWT_RX_TTCKO_MASK_32 0xFF07FFFFUL
/* RX time tracking offset. This RXTOFS value is a 19-bit signed quantity */
#define DWT_RX_TTCKO_RXTOFS_MASK 0x0007FFFFUL
/* This 8-bit field reports an internal re-sampler delay value */
#define DWT_RX_TTCKO_RSMPDEL_MASK 0xFF000000UL
/*
* This 7-bit field reports the receive carrier phase adjustment
* at time the ranging timestamp is made.
*/
#define DWT_RX_TTCKO_RCPHASE_MASK 0x7F0000000000ULL
/* Receive Message Time of Arrival (in double buffer set) */
#define DWT_RX_TIME_ID 0x15
#define DWT_RX_TIME_LLEN 14
/* read only 5 bytes (the adjusted timestamp (40:0)) */
#define DWT_RX_TIME_RX_STAMP_LEN 5
#define DWT_RX_STAMP_LEN DWT_RX_TIME_RX_STAMP_LEN
/* byte 0..4 40 bit Reports the fully adjusted time of reception. */
#define DWT_RX_TIME_RX_STAMP_OFFSET 0
/* byte 5..6 16 bit First path index. */
#define DWT_RX_TIME_FP_INDEX_OFFSET 5
/* byte 7..8 16 bit First Path Amplitude point 1 */
#define DWT_RX_TIME_FP_AMPL1_OFFSET 7
/* byte 9..13 40 bit Raw Timestamp for the frame */
#define DWT_RX_TIME_FP_RAWST_OFFSET 9
#define DWT_REG_16_ID_RESERVED 0x16
/* Transmit Message Time of Sending */
#define DWT_TX_TIME_ID 0x17
#define DWT_TX_TIME_LLEN 10
/* 40-bits = 5 bytes */
#define DWT_TX_TIME_TX_STAMP_LEN 5
#define DWT_TX_STAMP_LEN DWT_TX_TIME_TX_STAMP_LEN
/* byte 0..4 40 bit Reports the fully adjusted time of transmission */
#define DWT_TX_TIME_TX_STAMP_OFFSET 0
/* byte 5..9 40 bit Raw Timestamp for the frame */
#define DWT_TX_TIME_TX_RAWST_OFFSET 5
/* 16-bit Delay from Transmit to Antenna */
#define DWT_TX_ANTD_ID 0x18
#define DWT_TX_ANTD_OFFSET 0x00
#define DWT_TX_ANTD_LEN 2
/* System State information READ ONLY */
#define DWT_SYS_STATE_ID 0x19
#define DWT_SYS_STATE_LEN 5
/* 7:0 TX _STATE Bits 3:0 */
#define DWT_TX_STATE_OFFSET 0x00
#define DWT_TX_STATE_MASK 0x07
#define DWT_TX_STATE_IDLE 0x00
#define DWT_TX_STATE_PREAMBLE 0x01
#define DWT_TX_STATE_SFD 0x02
#define DWT_TX_STATE_PHR 0x03
#define DWT_TX_STATE_SDE 0x04
#define DWT_TX_STATE_DATA 0x05
#define DWT_TX_STATE_RSP_DATE 0x06
#define DWT_TX_STATE_TAIL 0x07
#define DWT_RX_STATE_OFFSET 0x01
#define DWT_RX_STATE_IDLE 0x00
#define DWT_RX_STATE_START_ANALOG 0x01
#define DWT_RX_STATE_RX_RDY 0x04
#define DWT_RX_STATE_PREAMBLE_FOUND 0x05
#define DWT_RX_STATE_PRMBL_TIMEOUT 0x06
#define DWT_RX_STATE_SFD_FOUND 0x07
#define DWT_RX_STATE_CNFG_PHR_RX 0x08
#define DWT_RX_STATE_PHR_RX_STRT 0x09
#define DWT_RX_STATE_DATA_RATE_RDY 0x0A
#define DWT_RX_STATE_DATA_RX_SEQ 0x0C
#define DWT_RX_STATE_CNFG_DATA_RX 0x0D
#define DWT_RX_STATE_PHR_NOT_OK 0x0E
#define DWT_RX_STATE_LAST_SYMBOL 0x0F
#define DWT_RX_STATE_WAIT_RSD_DONE 0x10
#define DWT_RX_STATE_RSD_OK 0x11
#define DWT_RX_STATE_RSD_NOT_OK 0x12
#define DWT_RX_STATE_RECONFIG_110 0x13
#define DWT_RX_STATE_WAIT_110_PHR 0x14
#define DWT_PMSC_STATE_OFFSET 0x02
#define DWT_PMSC_STATE_INIT 0x00
#define DWT_PMSC_STATE_IDLE 0x01
#define DWT_PMSC_STATE_TX_WAIT 0x02
#define DWT_PMSC_STATE_RX_WAIT 0x03
#define DWT_PMSC_STATE_TX 0x04
#define DWT_PMSC_STATE_RX 0x05
/*
* Acknowledge (31:24 preamble symbol delay before auto ACK is sent) and
* response (19:0 - unit 1us) timer
*/
/* Acknowledgement Time and Response Time */
#define DWT_ACK_RESP_T_ID 0x1A
#define DWT_ACK_RESP_T_LEN 4
/* Acknowledgement Time and Response access mask */
#define DWT_ACK_RESP_T_MASK 0xFF0FFFFFUL
#define DWT_ACK_RESP_T_W4R_TIM_OFFSET 0
/* Wait-for-Response turn-around Time 20 bit field */
#define DWT_ACK_RESP_T_W4R_TIM_MASK 0x000FFFFFUL
#define DWT_W4R_TIM_MASK DWT_ACK_RESP_T_W4R_TIM_MASK
#define DWT_ACK_RESP_T_ACK_TIM_OFFSET 3
/* Auto-Acknowledgement turn-around Time */
#define DWT_ACK_RESP_T_ACK_TIM_MASK 0xFF000000UL
#define DWT_ACK_TIM_MASK DWT_ACK_RESP_T_ACK_TIM_MASK
#define DWT_REG_1B_ID_RESERVED 0x1B
#define DWT_REG_1C_ID_RESERVED 0x1C
/* Sniff Mode Configuration */
#define DWT_RX_SNIFF_ID 0x1D
#define DWT_RX_SNIFF_OFFSET 0x00
#define DWT_RX_SNIFF_LEN 4
#define DWT_RX_SNIFF_MASK 0x0000FF0FUL
/* SNIFF Mode ON time. Specified in units of PAC */
#define DWT_RX_SNIFF_SNIFF_ONT_MASK 0x0000000FUL
#define DWT_SNIFF_ONT_MASK DWT_RX_SNIFF_SNIFF_ONT_MASK
/*
* SNIFF Mode OFF time specified in units of approximately 1mkS,
* or 128 system clock cycles.
*/
#define DWT_RX_SNIFF_SNIFF_OFFT_MASK 0x0000FF00UL
#define DWT_SNIFF_OFFT_MASK DWT_RX_SNIFF_SNIFF_OFFT_MASK
/* TX Power Control */
#define DWT_TX_POWER_ID 0x1E
#define DWT_TX_POWER_LEN 4
/*
* Mask and shift definition for Smart Transmit Power Control:
*
* This is the normal power setting used for frames that do not fall.
*/
#define DWT_TX_POWER_BOOSTNORM_MASK 0x00000000UL
#define DWT_BOOSTNORM_MASK DWT_TX_POWER_BOOSTNORM_MASK
#define DWT_TX_POWER_BOOSTNORM_SHIFT 0
/*
* This value sets the power applied during transmission
* at the 6.8 Mbps data rate frames that are less than 0.5 ms duration
*/
#define DWT_TX_POWER_BOOSTP500_MASK 0x00000000UL
#define DWT_BOOSTP500_MASK DWT_TX_POWER_BOOSTP500_MASK
#define DWT_TX_POWER_BOOSTP500_SHIFT 8
/*
* This value sets the power applied during transmission
* at the 6.8 Mbps data rate frames that are less than 0.25 ms duration
*/
#define DWT_TX_POWER_BOOSTP250_MASK 0x00000000UL
#define DWT_BOOSTP250_MASK DWT_TX_POWER_BOOSTP250_MASK
#define DWT_TX_POWER_BOOSTP250_SHIFT 16
/*
* This value sets the power applied during transmission
* at the 6.8 Mbps data rate frames that are less than 0.125 ms
*/
#define DWT_TX_POWER_BOOSTP125_MASK 0x00000000UL
#define DWT_BOOSTP125_MASK DWT_TX_POWER_BOOSTP125_MASK
#define DWT_TX_POWER_BOOSTP125_SHIFT 24
/*
* Mask and shift definition for Manual Transmit Power Control
* (DIS_STXP=1 in SYS_CFG)
*/
#define DWT_TX_POWER_MAN_DEFAULT 0x0E080222UL
/*
* This power setting is applied during the transmission
* of the PHY header (PHR) portion of the frame.
*/
#define DWT_TX_POWER_TXPOWPHR_MASK 0x0000FF00UL
/*
* This power setting is applied during the transmission
* of the synchronisation header (SHR) and data portions of the frame.
*/
#define DWT_TX_POWER_TXPOWSD_MASK 0x00FF0000UL
/* Channel Control */
#define DWT_CHAN_CTRL_ID 0x1F
#define DWT_CHAN_CTRL_LEN 4
/* Channel Control Register access mask */
#define DWT_CHAN_CTRL_MASK 0xFFFF00FFUL
/* Supported channels are 1, 2, 3, 4, 5, and 7. */
#define DWT_CHAN_CTRL_TX_CHAN_MASK 0x0000000FUL
/* Bits 0..3 TX channel number 0-15 selection */
#define DWT_CHAN_CTRL_TX_CHAN_SHIFT 0
#define DWT_CHAN_CTRL_RX_CHAN_MASK 0x000000F0UL
/* Bits 4..7 RX channel number 0-15 selection */
#define DWT_CHAN_CTRL_RX_CHAN_SHIFT 4
/*
* Bits 18..19 Specify (Force) RX Pulse Repetition Rate:
* 00 = 4 MHz, 01 = 16 MHz, 10 = 64MHz.
*/
#define DWT_CHAN_CTRL_RXFPRF_MASK 0x000C0000UL
#define DWT_CHAN_CTRL_RXFPRF_SHIFT 18
/*
* Specific RXFPRF configuration:
*
* Specify (Force) RX Pulse Repetition Rate:
* 00 = 4 MHz, 01 = 16 MHz, 10 = 64MHz.
*/
#define DWT_CHAN_CTRL_RXFPRF_4 0x00000000UL
/*
* Specify (Force) RX Pulse Repetition Rate:
* 00 = 4 MHz, 01 = 16 MHz, 10 = 64MHz.
*/
#define DWT_CHAN_CTRL_RXFPRF_16 0x00040000UL
/*
* Specify (Force) RX Pulse Repetition Rate:
* 00 = 4 MHz, 01 = 16 MHz, 10 = 64MHz.
*/
#define DWT_CHAN_CTRL_RXFPRF_64 0x00080000UL
/* Bits 22..26 TX Preamble Code selection, 1 to 24. */
#define DWT_CHAN_CTRL_TX_PCOD_MASK 0x07C00000UL
#define DWT_CHAN_CTRL_TX_PCOD_SHIFT 22
/* Bits 27..31 RX Preamble Code selection, 1 to 24. */
#define DWT_CHAN_CTRL_RX_PCOD_MASK 0xF8000000UL
#define DWT_CHAN_CTRL_RX_PCOD_SHIFT 27
/* Bit 17 This bit enables a non-standard DecaWave proprietary SFD sequence. */
#define DWT_CHAN_CTRL_DWSFD 0x00020000UL
#define DWT_CHAN_CTRL_DWSFD_SHIFT 17
/* Bit 20 Non-standard SFD in the transmitter */
#define DWT_CHAN_CTRL_TNSSFD 0x00100000UL
#define DWT_CHAN_CTRL_TNSSFD_SHIFT 20
/* Bit 21 Non-standard SFD in the receiver */
#define DWT_CHAN_CTRL_RNSSFD 0x00200000UL
#define DWT_CHAN_CTRL_RNSSFD_SHIFT 21
#define DWT_REG_20_ID_RESERVED 0x20
/* User-specified short/long TX/RX SFD sequences */
#define DWT_USR_SFD_ID 0x21
#define DWT_USR_SFD_LEN 41
/* Decawave non-standard SFD length for 110 kbps */
#define DWT_DW_NS_SFD_LEN_110K 64
/* Decawave non-standard SFD length for 850 kbps */
#define DWT_DW_NS_SFD_LEN_850K 16
/* Decawave non-standard SFD length for 6.8 Mbps */
#define DWT_DW_NS_SFD_LEN_6M8 8
#define DWT_REG_22_ID_RESERVED 0x22
/* Automatic Gain Control configuration */
#define DWT_AGC_CTRL_ID 0x23
#define DWT_AGC_CTRL_LEN 32
#define DWT_AGC_CFG_STS_ID DWT_AGC_CTRL_ID
#define DWT_AGC_CTRL1_OFFSET (0x02)
#define DWT_AGC_CTRL1_LEN 2
/* Access mask to AGC configuration and control register */
#define DWT_AGC_CTRL1_MASK 0x0001
/* Disable AGC Measurement. The DIS_AM bit is set by default. */
#define DWT_AGC_CTRL1_DIS_AM 0x0001
/*
* Offset from AGC_CTRL_ID in bytes.
* Please take care not to write other values to this register as doing so
* may cause the DW1000 to malfunction
*/
#define DWT_AGC_TUNE1_OFFSET (0x04)
#define DWT_AGC_TUNE1_LEN 2
/* It is a 16-bit tuning register for the AGC. */
#define DWT_AGC_TUNE1_MASK 0xFFFF
#define DWT_AGC_TUNE1_16M 0x8870
#define DWT_AGC_TUNE1_64M 0x889B
/*
* Offset from AGC_CTRL_ID in bytes.
* Please take care not to write other values to this register as doing so
* may cause the DW1000 to malfunction
*/
#define DWT_AGC_TUNE2_OFFSET (0x0C)
#define DWT_AGC_TUNE2_LEN 4
#define DWT_AGC_TUNE2_MASK 0xFFFFFFFFUL
#define DWT_AGC_TUNE2_VAL 0X2502A907UL
/*
* Offset from AGC_CTRL_ID in bytes.
* Please take care not to write other values to this register as doing so
* may cause the DW1000 to malfunction
*/
#define DWT_AGC_TUNE3_LEN 2
#define DWT_AGC_TUNE3_MASK 0xFFFF
#define DWT_AGC_TUNE3_VAL 0X0055
#define DWT_AGC_STAT1_OFFSET (0x1E)
#define DWT_AGC_STAT1_LEN 3
#define DWT_AGC_STAT1_MASK 0x0FFFFF
/* This 5-bit gain value relates to input noise power measurement. */
#define DWT_AGC_STAT1_EDG1_MASK 0x0007C0
/* This 9-bit value relates to the input noise power measurement. */
#define DWT_AGC_STAT1_EDG2_MASK 0x0FF800
/* External synchronisation control */
#define DWT_EXT_SYNC_ID 0x24
#define DWT_EXT_SYNC_LEN 12
#define DWT_EC_CTRL_OFFSET (0x00)
#define DWT_EC_CTRL_LEN 4
/*
* Sub-register 0x00 is the External clock synchronisation counter
* configuration register
*/
#define DWT_EC_CTRL_MASK 0x00000FFBUL
/* External transmit synchronisation mode enable */
#define DWT_EC_CTRL_OSTSM 0x00000001UL
/* External receive synchronisation mode enable */
#define DWT_EC_CTRL_OSRSM 0x00000002UL
/* PLL lock detect enable */
#define DWT_EC_CTRL_PLLLCK 0x04
/* External timebase reset mode enable */
#define DWT_EC_CTRL_OSTRM 0x00000800UL
/*
* Wait counter used for external transmit synchronisation and
* external timebase reset
*/
#define DWT_EC_CTRL_WAIT_MASK 0x000007F8UL
#define DWT_EC_RXTC_OFFSET (0x04)
#define DWT_EC_RXTC_LEN 4
/* External clock synchronisation counter captured on RMARKER */
#define DWT_EC_RXTC_MASK 0xFFFFFFFFUL
#define DWT_EC_GOLP (0x08)
#define DWT_EC_GOLP_LEN 4
/*
* Sub-register 0x08 is the External clock offset to first path 1 GHz counter,
* EC_GOLP
*/
#define DWT_EC_GOLP_MASK 0x0000003FUL
/*
* This register contains the 1 GHz count from the arrival of the RMARKER and
* the next edge of the external clock.
*/
#define DWT_EC_GOLP_OFFSET_EXT_MASK 0x0000003FUL
/* Read access to accumulator data */
#define DWT_ACC_MEM_ID 0x25
#define DWT_ACC_MEM_LEN 4064
/* Peripheral register bus 1 access - GPIO control */
#define DWT_GPIO_CTRL_ID 0x26
#define DWT_GPIO_CTRL_LEN 44
/* Sub-register 0x00 is the GPIO Mode Control Register */
#define DWT_GPIO_MODE_OFFSET 0x00
#define DWT_GPIO_MODE_LEN 4
#define DWT_GPIO_MODE_MASK 0x00FFFFC0UL
/* Mode Selection for GPIO0/RXOKLED */
#define DWT_GPIO_MSGP0_MASK 0x000000C0UL
/* Mode Selection for GPIO1/SFDLED */
#define DWT_GPIO_MSGP1_MASK 0x00000300UL
/* Mode Selection for GPIO2/RXLED */
#define DWT_GPIO_MSGP2_MASK 0x00000C00UL
/* Mode Selection for GPIO3/TXLED */
#define DWT_GPIO_MSGP3_MASK 0x00003000UL
/* Mode Selection for GPIO4/EXTPA */
#define DWT_GPIO_MSGP4_MASK 0x0000C000UL
/* Mode Selection for GPIO5/EXTTXE */
#define DWT_GPIO_MSGP5_MASK 0x00030000UL
/* Mode Selection for GPIO6/EXTRXE */
#define DWT_GPIO_MSGP6_MASK 0x000C0000UL
/* Mode Selection for SYNC/GPIO7 */
#define DWT_GPIO_MSGP7_MASK 0x00300000UL
/* Mode Selection for IRQ/GPIO8 */
#define DWT_GPIO_MSGP8_MASK 0x00C00000UL
/* The pin operates as the RXLED output */
#define DWT_GPIO_PIN2_RXLED 0x00000400UL
/* The pin operates as the TXLED output */
#define DWT_GPIO_PIN3_TXLED 0x00001000UL
/* The pin operates as the EXTPA output */
#define DWT_GPIO_PIN4_EXTPA 0x00004000UL
/* The pin operates as the EXTTXE output */
#define DWT_GPIO_PIN5_EXTTXE 0x00010000UL
/* The pin operates as the EXTRXE output */
#define DWT_GPIO_PIN6_EXTRXE 0x00040000UL
/* Sub-register 0x08 is the GPIO Direction Control Register */
#define DWT_GPIO_DIR_OFFSET 0x08
#define DWT_GPIO_DIR_LEN 3
#define DWT_GPIO_DIR_MASK 0x0011FFFFUL
/*
* GPIO0 only changed if the GxM0 mask bit has a value of 1
* for the write operation
*/
#define DWT_GxP0 0x00000001UL
/* GPIO1. (See GDP0). */
#define DWT_GxP1 0x00000002UL
/* GPIO2. (See GDP0). */
#define DWT_GxP2 0x00000004UL
/* GPIO3. (See GDP0). */
#define DWT_GxP3 0x00000008UL
/* GPIO4. (See GDP0). */
#define DWT_GxP4 0x00000100UL
/* GPIO5. (See GDP0). */
#define DWT_GxP5 0x00000200UL
/* GPIO6. (See GDP0). */
#define DWT_GxP6 0x00000400UL
/* GPIO7. (See GDP0). */
#define DWT_GxP7 0x00000800UL
/* GPIO8 */
#define DWT_GxP8 0x00010000UL
/* Mask for GPIO0 */
#define DWT_GxM0 0x00000010UL
/* Mask for GPIO1. (See GDM0). */
#define DWT_GxM1 0x00000020UL
/* Mask for GPIO2. (See GDM0). */
#define DWT_GxM2 0x00000040UL
/* Mask for GPIO3. (See GDM0). */
#define DWT_GxM3 0x00000080UL
/* Mask for GPIO4. (See GDM0). */
#define DWT_GxM4 0x00001000UL
/* Mask for GPIO5. (See GDM0). */
#define DWT_GxM5 0x00002000UL
/* Mask for GPIO6. (See GDM0). */
#define DWT_GxM6 0x00004000UL
/* Mask for GPIO7. (See GDM0). */
#define DWT_GxM7 0x00008000UL
/* Mask for GPIO8. (See GDM0). */
#define DWT_GxM8 0x00100000UL
/*
* Direction Selection for GPIO0. 1 = input, 0 = output.
* Only changed if the GDM0 mask bit has a value of 1 for the write operation
*/
#define DWT_GDP0 GxP0
/* Direction Selection for GPIO1. (See GDP0). */
#define DWT_GDP1 GxP1
/* Direction Selection for GPIO2. (See GDP0). */
#define DWT_GDP2 GxP2
/* Direction Selection for GPIO3. (See GDP0). */
#define DWT_GDP3 GxP3
/* Direction Selection for GPIO4. (See GDP0). */
#define DWT_GDP4 GxP4
/* Direction Selection for GPIO5. (See GDP0). */
#define DWT_GDP5 GxP5
/* Direction Selection for GPIO6. (See GDP0). */
#define DWT_GDP6 GxP6
/* Direction Selection for GPIO7. (See GDP0). */
#define DWT_GDP7 GxP7
/* Direction Selection for GPIO8 */
#define DWT_GDP8 GxP8
/* Mask for setting the direction of GPIO0 */
#define DWT_GDM0 GxM0
/* Mask for setting the direction of GPIO1. (See GDM0). */
#define DWT_GDM1 GxM1
/* Mask for setting the direction of GPIO2. (See GDM0). */
#define DWT_GDM2 GxM2
/* Mask for setting the direction of GPIO3. (See GDM0). */
#define DWT_GDM3 GxM3
/* Mask for setting the direction of GPIO4. (See GDM0). */
#define DWT_GDM4 GxM4
/* Mask for setting the direction of GPIO5. (See GDM0). */
#define DWT_GDM5 GxM5
/* Mask for setting the direction of GPIO6. (See GDM0). */
#define DWT_GDM6 GxM6
/* Mask for setting the direction of GPIO7. (See GDM0). */
#define DWT_GDM7 GxM7
/* Mask for setting the direction of GPIO8. (See GDM0). */
#define DWT_GDM8 GxM8
/* Sub-register 0x0C is the GPIO data output register. */
#define DWT_GPIO_DOUT_OFFSET 0x0C
#define DWT_GPIO_DOUT_LEN 3
#define DWT_GPIO_DOUT_MASK DWT_GPIO_DIR_MASK
/* Sub-register 0x10 is the GPIO interrupt enable register */
#define DWT_GPIO_IRQE_OFFSET 0x10
#define DWT_GPIO_IRQE_LEN 4
#define DWT_GPIO_IRQE_MASK 0x000001FFUL
/* IRQ bit0 */
#define DWT_GIRQx0 0x00000001UL
/* IRQ bit1 */
#define DWT_GIRQx1 0x00000002UL
/* IRQ bit2 */
#define DWT_GIRQx2 0x00000004UL
/* IRQ bit3 */
#define DWT_GIRQx3 0x00000008UL
/* IRQ bit4 */
#define DWT_GIRQx4 0x00000010UL
/* IRQ bit5 */
#define DWT_GIRQx5 0x00000020UL
/* IRQ bit6 */
#define DWT_GIRQx6 0x00000040UL
/* IRQ bit7 */
#define DWT_GIRQx7 0x00000080UL
/* IRQ bit8 */
#define DWT_GIRQx8 0x00000100UL
/* GPIO IRQ Enable for GPIO0 input. Value 1 = enable, 0 = disable */
#define DWT_GIRQE0 GIRQx0
#define DWT_GIRQE1 GIRQx1
#define DWT_GIRQE2 GIRQx2
#define DWT_GIRQE3 GIRQx3
#define DWT_GIRQE4 GIRQx4
#define DWT_GIRQE5 GIRQx5
#define DWT_GIRQE6 GIRQx6
#define DWT_GIRQE7 GIRQx7
#define DWT_GIRQE8 GIRQx8
/* Sub-register 0x14 is the GPIO interrupt sense selection register */
#define DWT_GPIO_ISEN_OFFSET 0x14
#define DWT_GPIO_ISEN_LEN 4
#define DWT_GPIO_ISEN_MASK DWT_GPIO_IRQE_MASK
/* GPIO IRQ Sense selection GPIO0 input.
* Value 0 = High or Rising-Edge,
* 1 = Low or falling-edge.
*/
#define DWT_GISEN0 GIRQx0
#define DWT_GISEN1 GIRQx1
#define DWT_GISEN2 GIRQx2
#define DWT_GISEN3 GIRQx3
#define DWT_GISEN4 GIRQx4
#define DWT_GISEN5 GIRQx5
#define DWT_GISEN6 GIRQx6
#define DWT_GISEN7 GIRQx7
#define DWT_GISEN8 GIRQx8
/* Sub-register 0x18 is the GPIO interrupt mode selection register */
#define DWT_GPIO_IMODE_OFFSET 0x18
#define DWT_GPIO_IMODE_LEN 4
#define DWT_GPIO_IMODE_MASK DWT_GPIO_IRQE_MASK
/* GPIO IRQ Mode selection for GPIO0 input.
* Value 0 = Level sensitive interrupt.
* Value 1 = Edge triggered interrupt
*/
#define DWT_GIMOD0 GIRQx0
#define DWT_GIMOD1 GIRQx1
#define DWT_GIMOD2 GIRQx2
#define DWT_GIMOD3 GIRQx3
#define DWT_GIMOD4 GIRQx4
#define DWT_GIMOD5 GIRQx5
#define DWT_GIMOD6 GIRQx6
#define DWT_GIMOD7 GIRQx7
#define DWT_GIMOD8 GIRQx8
/* Sub-register 0x1C is the GPIO interrupt "Both Edge" selection register */
#define DWT_GPIO_IBES_OFFSET 0x1C
#define DWT_GPIO_IBES_LEN 4
#define DWT_GPIO_IBES_MASK DWT_GPIO_IRQE_MASK
/* GPIO IRQ "Both Edge" selection for GPIO0 input.
* Value 0 = GPIO_IMODE register selects the edge.
* Value 1 = Both edges trigger the interrupt.
*/
#define DWT_GIBES0 GIRQx0
#define DWT_GIBES1 GIRQx1
#define DWT_GIBES2 GIRQx2
#define DWT_GIBES3 GIRQx3
#define DWT_GIBES4 GIRQx4
#define DWT_GIBES5 GIRQx5
#define DWT_GIBES6 GIRQx6
#define DWT_GIBES7 GIRQx7
#define DWT_GIBES8 GIRQx8
/* Sub-register 0x20 is the GPIO interrupt clear register */
#define DWT_GPIO_ICLR_OFFSET 0x20
#define DWT_GPIO_ICLR_LEN 4
#define DWT_GPIO_ICLR_MASK DWT_GPIO_IRQE_MASK
/* GPIO IRQ latch clear for GPIO0 input.
* Write 1 to clear the GPIO0 interrupt latch.
* Writing 0 has no effect. Reading returns zero
*/
#define DWT_GICLR0 GIRQx0
#define DWT_GICLR1 GIRQx1
#define DWT_GICLR2 GIRQx2
#define DWT_GICLR3 GIRQx3
#define DWT_GICLR4 GIRQx4
#define DWT_GICLR5 GIRQx5
#define DWT_GICLR6 GIRQx6
#define DWT_GICLR7 GIRQx7
#define DWT_GICLR8 GIRQx8
/* Sub-register 0x24 is the GPIO interrupt de-bounce enable register */
#define DWT_GPIO_IDBE_OFFSET 0x24
#define DWT_GPIO_IDBE_LEN 4
#define DWT_GPIO_IDBE_MASK DWT_GPIO_IRQE_MASK
/* GPIO IRQ de-bounce enable for GPIO0.
* Value 1 = de-bounce enabled.
* Value 0 = de-bounce disabled
*/
#define DWT_GIDBE0 GIRQx0
#define DWT_GIDBE1 GIRQx1
#define DWT_GIDBE2 GIRQx2
#define DWT_GIDBE3 GIRQx3
#define DWT_GIDBE4 GIRQx4
#define DWT_GIDBE5 GIRQx5
#define DWT_GIDBE6 GIRQx6
#define DWT_GIDBE7 GIRQx7
/* Value 1 = de-bounce enabled, 0 = de-bounce disabled */
#define DWT_GIDBE8 GIRQx8
/* Sub-register 0x28 allows the raw state of the GPIO pin to be read. */
#define DWT_GPIO_RAW_OFFSET 0x28
#define DWT_GPIO_RAW_LEN 4
#define DWT_GPIO_RAW_MASK DWT_GPIO_IRQE_MASK
/* This bit reflects the raw state of GPIO0 .. GPIO8 */
#define DWT_GRAWP0 GIRQx0
#define DWT_GRAWP1 GIRQx1
#define DWT_GRAWP2 GIRQx2
#define DWT_GRAWP3 GIRQx3
#define DWT_GRAWP4 GIRQx4
#define DWT_GRAWP5 GIRQx5
#define DWT_GRAWP6 GIRQx6
#define DWT_GRAWP7 GIRQx7
#define DWT_GRAWP8 GIRQx8
/* Digital Receiver configuration */
#define DWT_DRX_CONF_ID 0x27
#define DWT_DRX_CONF_LEN 44
/* Sub-register 0x02 is a 16-bit tuning register. */
#define DWT_DRX_TUNE0b_OFFSET (0x02)
#define DWT_DRX_TUNE0b_LEN 2
/* 7.2.40.2 Sub-Register 0x27:02 DRX_TUNE0b */
#define DWT_DRX_TUNE0b_MASK 0xFFFF
#define DWT_DRX_TUNE0b_110K_STD 0x000A
#define DWT_DRX_TUNE0b_110K_NSTD 0x0016
#define DWT_DRX_TUNE0b_850K_STD 0x0001
#define DWT_DRX_TUNE0b_850K_NSTD 0x0006
#define DWT_DRX_TUNE0b_6M8_STD 0x0001
#define DWT_DRX_TUNE0b_6M8_NSTD 0x0002
/* 7.2.40.3 Sub-Register 0x27:04 DRX_TUNE1a */
#define DWT_DRX_TUNE1a_OFFSET 0x04
#define DWT_DRX_TUNE1a_LEN 2
#define DWT_DRX_TUNE1a_MASK 0xFFFF
#define DWT_DRX_TUNE1a_PRF16 0x0087
#define DWT_DRX_TUNE1a_PRF64 0x008D
/* 7.2.40.4 Sub-Register 0x27:06 DRX_TUNE1b */
#define DWT_DRX_TUNE1b_OFFSET 0x06
#define DWT_DRX_TUNE1b_LEN 2
#define DWT_DRX_TUNE1b_MASK 0xFFFF
#define DWT_DRX_TUNE1b_110K 0x0064
#define DWT_DRX_TUNE1b_850K_6M8 0x0020
#define DWT_DRX_TUNE1b_6M8_PRE64 0x0010
/* 7.2.40.5 Sub-Register 0x27:08 DRX_TUNE2 */
#define DWT_DRX_TUNE2_OFFSET 0x08
#define DWT_DRX_TUNE2_LEN 4
#define DWT_DRX_TUNE2_MASK 0xFFFFFFFFUL
#define DWT_DRX_TUNE2_PRF16_PAC8 0x311A002DUL
#define DWT_DRX_TUNE2_PRF16_PAC16 0x331A0052UL
#define DWT_DRX_TUNE2_PRF16_PAC32 0x351A009AUL
#define DWT_DRX_TUNE2_PRF16_PAC64 0x371A011DUL
#define DWT_DRX_TUNE2_PRF64_PAC8 0x313B006BUL
#define DWT_DRX_TUNE2_PRF64_PAC16 0x333B00BEUL
#define DWT_DRX_TUNE2_PRF64_PAC32 0x353B015EUL
#define DWT_DRX_TUNE2_PRF64_PAC64 0x373B0296UL
/* WARNING: Please do NOT set DRX_SFDTOC to zero
* (disabling SFD detection timeout) since this risks IC malfunction
* due to prolonged receiver activity in the event of false preamble detection.
*/
/* 7.2.40.7 Sub-Register 0x27:20 DRX_SFDTOC */
#define DWT_DRX_SFDTOC_OFFSET 0x20
#define DWT_DRX_SFDTOC_LEN 2
#define DWT_DRX_SFDTOC_MASK 0xFFFF
/* 7.2.40.9 Sub-Register 0x27:24 DRX_PRETOC */
#define DWT_DRX_PRETOC_OFFSET 0x24
#define DWT_DRX_PRETOC_LEN 2
#define DWT_DRX_PRETOC_MASK 0xFFFF
/* 7.2.40.10 Sub-Register 0x27:26 DRX_TUNE4H */
#define DWT_DRX_TUNE4H_OFFSET 0x26
#define DWT_DRX_TUNE4H_LEN 2
#define DWT_DRX_TUNE4H_MASK 0xFFFF
#define DWT_DRX_TUNE4H_PRE64 0x0010
#define DWT_DRX_TUNE4H_PRE128PLUS 0x0028
/*
* Offset from DRX_CONF_ID in bytes to 21-bit signed
* RX carrier integrator value
*/
#define DWT_DRX_CARRIER_INT_OFFSET 0x28
#define DWT_DRX_CARRIER_INT_LEN 3
#define DWT_DRX_CARRIER_INT_MASK 0x001FFFFF
/* 7.2.40.11 Sub-Register 0x27:2C - RXPACC_NOSAT */
#define DWT_RPACC_NOSAT_OFFSET 0x2C
#define DWT_RPACC_NOSAT_LEN 2
#define DWT_RPACC_NOSAT_MASK 0xFFFF
/* Analog RF Configuration */
#define DWT_RF_CONF_ID 0x28
#define DWT_RF_CONF_LEN 58
/* TX enable */
#define DWT_RF_CONF_TXEN_MASK 0x00400000UL
/* RX enable */
#define DWT_RF_CONF_RXEN_MASK 0x00200000UL
/* Turn on power all LDOs */
#define DWT_RF_CONF_TXPOW_MASK 0x001F0000UL
/* Enable PLLs */
#define DWT_RF_CONF_PLLEN_MASK 0x0000E000UL
/* Enable TX blocks */
#define DWT_RF_CONF_TXBLOCKSEN_MASK 0x00001F00UL
#define DWT_RF_CONF_TXPLLPOWEN_MASK (DWT_RF_CONF_PLLEN_MASK | \
DWT_RF_CONF_TXPOW_MASK)
#define DWT_RF_CONF_TXALLEN_MASK (DWT_RF_CONF_TXEN_MASK | \
DWT_RF_CONF_TXPOW_MASK | \
DWT_RF_CONF_PLLEN_MASK | \
DWT_RF_CONF_TXBLOCKSEN_MASK)
/* Analog RX Control Register */
#define DWT_RF_RXCTRLH_OFFSET 0x0B
#define DWT_RF_RXCTRLH_LEN 1
/* RXCTRLH value for narrow bandwidth channels */
#define DWT_RF_RXCTRLH_NBW 0xD8
/* RXCTRLH value for wide bandwidth channels */
#define DWT_RF_RXCTRLH_WBW 0xBC
/* Analog TX Control Register */
#define DWT_RF_TXCTRL_OFFSET 0x0C
#define DWT_RF_TXCTRL_LEN 4
/* Transmit mixer tuning register */
#define DWT_RF_TXCTRL_TXMTUNE_MASK 0x000001E0UL
/* Transmit mixer Q-factor tuning register */
#define DWT_RF_TXCTRL_TXTXMQ_MASK 0x00000E00UL
/* 32-bit value to program to Sub-Register 0x28:0C RF_TXCTRL */
#define DWT_RF_TXCTRL_CH1 0x00005C40UL
/* 32-bit value to program to Sub-Register 0x28:0C RF_TXCTRL */
#define DWT_RF_TXCTRL_CH2 0x00045CA0UL
/* 32-bit value to program to Sub-Register 0x28:0C RF_TXCTRL */
#define DWT_RF_TXCTRL_CH3 0x00086CC0UL
/* 32-bit value to program to Sub-Register 0x28:0C RF_TXCTRL */
#define DWT_RF_TXCTRL_CH4 0x00045C80UL
/* 32-bit value to program to Sub-Register 0x28:0C RF_TXCTRL */
#define DWT_RF_TXCTRL_CH5 0x001E3FE0UL
/* 32-bit value to program to Sub-Register 0x28:0C RF_TXCTRL */
#define DWT_RF_TXCTRL_CH7 0x001E7DE0UL
#define DWT_RF_STATUS_OFFSET 0x2C
#define DWT_REG_29_ID_RESERVED 0x29
/* Transmitter calibration block */
#define DWT_TX_CAL_ID 0x2A
#define DWT_TX_CAL_LEN 52
/* SAR control */
#define DWT_TC_SARL_SAR_C 0
/* Cause bug in register block TX_CAL, we need to read 1 byte in a time */
/* Latest SAR reading for Voltage level */
#define DWT_TC_SARL_SAR_LVBAT_OFFSET 3
/* Latest SAR reading for Temperature level */
#define DWT_TC_SARL_SAR_LTEMP_OFFSET 4
/* SAR reading of Temperature level taken at last wakeup event */
#define DWT_TC_SARW_SAR_WTEMP_OFFSET 0x06
/* SAR reading of Voltage level taken at last wakeup event */
#define DWT_TC_SARW_SAR_WVBAT_OFFSET 0x07
/* Transmitter Calibration Pulse Generator Delay */
#define DWT_TC_PGDELAY_OFFSET 0x0B
#define DWT_TC_PGDELAY_LEN 1
/* Recommended value for channel 1 */
#define DWT_TC_PGDELAY_CH1 0xC9
/* Recommended value for channel 2 */
#define DWT_TC_PGDELAY_CH2 0xC2
/* Recommended value for channel 3 */
#define DWT_TC_PGDELAY_CH3 0xC5
/* Recommended value for channel 4 */
#define DWT_TC_PGDELAY_CH4 0x95
/* Recommended value for channel 5 */
#define DWT_TC_PGDELAY_CH5 0xC0
/* Recommended value for channel 7 */
#define DWT_TC_PGDELAY_CH7 0x93
/* Transmitter Calibration Pulse Generator Test */
#define DWT_TC_PGTEST_OFFSET 0x0C
#define DWT_TC_PGTEST_LEN 1
/* Normal operation */
#define DWT_TC_PGTEST_NORMAL 0x00
/* Continuous Wave (CW) Test Mode */
#define DWT_TC_PGTEST_CW 0x13
/* Frequency synthesiser control block */
#define DWT_FS_CTRL_ID 0x2B
#define DWT_FS_CTRL_LEN 21
/*
* Offset from FS_CTRL_ID in bytes, reserved area.
* Please take care not to write to this area as doing so
* may cause the DW1000 to malfunction.
*/
#define DWT_FS_RES1_OFFSET 0x00
#define DWT_FS_RES1_LEN 7
/* Frequency synthesiser PLL configuration */
#define DWT_FS_PLLCFG_OFFSET 0x07
#define DWT_FS_PLLCFG_LEN 5
/* Operating Channel 1 */
#define DWT_FS_PLLCFG_CH1 0x09000407UL
/* Operating Channel 2 */
#define DWT_FS_PLLCFG_CH2 0x08400508UL
/* Operating Channel 3 */
#define DWT_FS_PLLCFG_CH3 0x08401009UL
/* Operating Channel 4 (same as 2) */
#define DWT_FS_PLLCFG_CH4 DWT_FS_PLLCFG_CH2
/* Operating Channel 5 */
#define DWT_FS_PLLCFG_CH5 0x0800041DUL
/* Operating Channel 7 (same as 5) */
#define DWT_FS_PLLCFG_CH7 DWT_FS_PLLCFG_CH5
/* Frequency synthesiser PLL Tuning */
#define DWT_FS_PLLTUNE_OFFSET 0x0B
#define DWT_FS_PLLTUNE_LEN 1
/* Operating Channel 1 */
#define DWT_FS_PLLTUNE_CH1 0x1E
/* Operating Channel 2 */
#define DWT_FS_PLLTUNE_CH2 0x26
/* Operating Channel 3 */
#define DWT_FS_PLLTUNE_CH3 0x56
/* Operating Channel 4 (same as 2) */
#define DWT_FS_PLLTUNE_CH4 DWT_FS_PLLTUNE_CH2
/* Operating Channel 5 */
#define DWT_FS_PLLTUNE_CH5 0xBE
/* Operating Channel 7 (same as 5) */
#define DWT_FS_PLLTUNE_CH7 DWT_FS_PLLTUNE_CH5
/*
* Offset from FS_CTRL_ID in bytes.
* Please take care not to write to this area as doing so
* may cause the DW1000 to malfunction.
*/
#define DWT_FS_RES2_OFFSET 0x0C
#define DWT_FS_RES2_LEN 2
/* Frequency synthesiser Crystal trim */
#define DWT_FS_XTALT_OFFSET 0x0E
#define DWT_FS_XTALT_LEN 1
/*
* Crystal Trim.
* Crystals may be trimmed using this register setting to tune out errors,
* see 8.1 IC Calibration Crystal Oscillator Trim.
*/
#define DWT_FS_XTALT_MASK 0x1F
#define DWT_FS_XTALT_MIDRANGE 0x10
/*
* Offset from FS_CTRL_ID in bytes.
* Please take care not to write to this area as doing so
* may cause the DW1000 to malfunction.
*/
#define DWT_FS_RES3_OFFSET 0x0F
#define DWT_FS_RES3_LEN 6
/* Always-On register set */
#define DWT_AON_ID 0x2C
#define DWT_AON_LEN 12
/*
* Offset from AON_ID in bytes
* Used to control what the DW1000 IC does as it wakes up from
* low-power SLEEP or DEEPSLEEPstates.
*/
#define DWT_AON_WCFG_OFFSET 0x00
#define DWT_AON_WCFG_LEN 2
/* Access mask to AON_WCFG register */
#define DWT_AON_WCFG_MASK 0x09CB
/* On Wake-up Run the (temperature and voltage) Analog-to-Digital Converters */
#define DWT_AON_WCFG_ONW_RADC 0x0001
/* On Wake-up turn on the Receiver */
#define DWT_AON_WCFG_ONW_RX 0x0002
/*
* On Wake-up load the EUI from OTP memory into Register file:
* 0x01 Extended Unique Identifier.
*/
#define DWT_AON_WCFG_ONW_LEUI 0x0008
/*
* On Wake-up load configurations from the AON memory
* into the host interface register set
*/
#define DWT_AON_WCFG_ONW_LDC 0x0040
/* On Wake-up load the Length64 receiver operating parameter set */
#define DWT_AON_WCFG_ONW_L64P 0x0080
/*
* Preserve Sleep. This bit determines what the DW1000 does
* with respect to the ARXSLP and ATXSLP sleep controls
*/
#define DWT_AON_WCFG_PRES_SLEEP 0x0100
/* On Wake-up load the LDE microcode. */
#define DWT_AON_WCFG_ONW_LLDE 0x0800
/* On Wake-up load the LDO tune value. */
#define DWT_AON_WCFG_ONW_LLDO 0x1000
/*
* The bits in this register in general cause direct activity
* within the AON block with respect to the stored AON memory
*/
#define DWT_AON_CTRL_OFFSET 0x02
#define DWT_AON_CTRL_LEN 1
/* Access mask to AON_CTRL register */
#define DWT_AON_CTRL_MASK 0x8F
/*
* When this bit is set the DW1000 will copy the user configurations
* from the AON memory to the host interface register set.
*/
#define DWT_AON_CTRL_RESTORE 0x01
/*
* When this bit is set the DW1000 will copy the user configurations
* from the host interface register set into the AON memory
*/
#define DWT_AON_CTRL_SAVE 0x02
/* Upload the AON block configurations to the AON */
#define DWT_AON_CTRL_UPL_CFG 0x04
/* Direct AON memory access read */
#define DWT_AON_CTRL_DCA_READ 0x08
/* Direct AON memory access enable bit */
#define DWT_AON_CTRL_DCA_ENAB 0x80
/* AON Direct Access Read Data Result */
#define DWT_AON_RDAT_OFFSET 0x03
#define DWT_AON_RDAT_LEN 1
/* AON Direct Access Address */
#define DWT_AON_ADDR_OFFSET 0x04
#define DWT_AON_ADDR_LEN 1
/* Address of low-power oscillator calibration value (lower byte) */
#define DWT_AON_ADDR_LPOSC_CAL_0 117
/* Address of low-power oscillator calibration value (lower byte) */
#define DWT_AON_ADDR_LPOSC_CAL_1 118
/* 32-bit configuration register for the always on block. */
#define DWT_AON_CFG0_OFFSET 0x06
#define DWT_AON_CFG0_LEN 4
/* This is the sleep enable configuration bit */
#define DWT_AON_CFG0_SLEEP_EN 0x00000001UL
/* Wake using WAKEUP pin */
#define DWT_AON_CFG0_WAKE_PIN 0x00000002UL
/* Wake using SPI access SPICSn */
#define DWT_AON_CFG0_WAKE_SPI 0x00000004UL
/* Wake when sleep counter elapses */
#define DWT_AON_CFG0_WAKE_CNT 0x00000008UL
/* Low power divider enable configuration */
#define DWT_AON_CFG0_LPDIV_EN 0x00000010UL
/*
* Divider count for dividing the raw DW1000 XTAL oscillator frequency
* to set an LP clock frequency
*/
#define DWT_AON_CFG0_LPCLKDIVA_MASK 0x0000FFE0UL
#define DWT_AON_CFG0_LPCLKDIVA_SHIFT 5
/* Sleep time. This field configures the sleep time count elapse value */
#define DWT_AON_CFG0_SLEEP_TIM 0xFFFF0000UL
#define DWT_AON_CFG0_SLEEP_SHIFT 16
#define DWT_AON_CFG0_SLEEP_TIM_OFFSET 2
#define DWT_AON_CFG1_OFFSET 0x0A
#define DWT_AON_CFG1_LEN 2
/* access mask to AON_CFG1 */
#define DWT_AON_CFG1_MASK 0x0007
/* This bit enables the sleep counter */
#define DWT_AON_CFG1_SLEEP_CEN 0x0001
/*
* This bit needs to be set to 0 for correct operation
* in the SLEEP state within the DW1000
*/
#define DWT_AON_CFG1_SMXX 0x0002
/*
* This bit enables the calibration function that measures
* the period of the ICs internal low powered oscillator.
*/
#define DWT_AON_CFG1_LPOSC_CAL 0x0004
/* One Time Programmable Memory Interface */
#define DWT_OTP_IF_ID 0x2D
#define DWT_OTP_IF_LEN 18
/* 32-bit register. The data value to be programmed into an OTP location */
#define DWT_OTP_WDAT 0x00
#define DWT_OTP_WDAT_LEN 4
/* 16-bit register used to select the address within the OTP memory block */
#define DWT_OTP_ADDR 0x04
#define DWT_OTP_ADDR_LEN 2
/*
* This 11-bit field specifies the address within OTP memory
* that will be accessed read or written.
*/
#define DWT_OTP_ADDR_MASK 0x07FF
/* used to control the operation of the OTP memory */
#define DWT_OTP_CTRL 0x06
#define DWT_OTP_CTRL_LEN 2
#define DWT_OTP_CTRL_MASK 0x8002
/* This bit forces the OTP into manual read mode */
#define DWT_OTP_CTRL_OTPRDEN 0x0001
/*
* This bit commands a read operation from the address specified
* in the OTP_ADDR register
*/
#define DWT_OTP_CTRL_OTPREAD 0x0002
/* This bit forces a load of LDE microcode */
#define DWT_OTP_CTRL_LDELOAD 0x8000
/*
* Setting this bit will cause the contents of OTP_WDAT to be written
* to OTP_ADDR.
*/
#define DWT_OTP_CTRL_OTPPROG 0x0040
#define DWT_OTP_STAT 0x08
#define DWT_OTP_STAT_LEN 2
#define DWT_OTP_STAT_MASK 0x0003
/* OTP Programming Done */
#define DWT_OTP_STAT_OTPPRGD 0x0001
/* OTP Programming Voltage OK */
#define DWT_OTP_STAT_OTPVPOK 0x0002
/* 32-bit register. The data value read from an OTP location will appear here */
#define DWT_OTP_RDAT 0x0A
#define DWT_OTP_RDAT_LEN 4
/*
* 32-bit register. The data value stored in the OTP SR (0x400) location
* will appear here after power up
*/
#define DWT_OTP_SRDAT 0x0E
#define DWT_OTP_SRDAT_LEN 4
/*
* 8-bit special function register used to select and
* load special receiver operational parameter
*/
#define DWT_OTP_SF 0x12
#define DWT_OTP_SF_LEN 1
#define DWT_OTP_SF_MASK 0x63
/*
* This bit when set initiates a load of the operating parameter set
* selected by the OPS_SEL
*/
#define DWT_OTP_SF_OPS_KICK 0x01
/* This bit when set initiates a load of the LDO tune code */
#define DWT_OTP_SF_LDO_KICK 0x02
#define DWT_OTP_SF_OPS_SEL_SHFT 5
#define DWT_OTP_SF_OPS_SEL_MASK 0x60
/* Operating parameter set selection: Length64 */
#define DWT_OTP_SF_OPS_SEL_L64 0x00
/* Operating parameter set selection: Tight */
#define DWT_OTP_SF_OPS_SEL_TIGHT 0x40
/* Leading edge detection control block */
#define DWT_LDE_IF_ID 0x2E
#define DWT_LDE_IF_LEN 0
/*
* 16-bit status register reporting the threshold that was used
* to find the first path
*/
#define DWT_LDE_THRESH_OFFSET 0x0000
#define DWT_LDE_THRESH_LEN 2
/*8-bit configuration register */
#define DWT_LDE_CFG1_OFFSET 0x0806
#define DWT_LDE_CFG1_LEN 1
/* Number of Standard Deviations mask. */
#define DWT_LDE_CFG1_NSTDEV_MASK 0x1F
/* Peak Multiplier mask. */
#define DWT_LDE_CFG1_PMULT_MASK 0xE0
/*
* Reporting the position within the accumulator that the LDE algorithm
* has determined to contain the maximum
*/
#define DWT_LDE_PPINDX_OFFSET 0x1000
#define DWT_LDE_PPINDX_LEN 2
/*
* Reporting the magnitude of the peak signal seen
* in the accumulator data memory
*/
#define DWT_LDE_PPAMPL_OFFSET 0x1002
#define DWT_LDE_PPAMPL_LEN 2
/* 16-bit configuration register for setting the receive antenna delay */
#define DWT_LDE_RXANTD_OFFSET 0x1804
#define DWT_LDE_RXANTD_LEN 2
/* 16-bit LDE configuration tuning register */
#define DWT_LDE_CFG2_OFFSET 0x1806
#define DWT_LDE_CFG2_LEN 2
/*
* 16-bit configuration register for setting
* the replica avoidance coefficient
*/
#define DWT_LDE_REPC_OFFSET 0x2804
#define DWT_LDE_REPC_LEN 2
#define DWT_LDE_REPC_PCODE_1 0x5998
#define DWT_LDE_REPC_PCODE_2 0x5998
#define DWT_LDE_REPC_PCODE_3 0x51EA
#define DWT_LDE_REPC_PCODE_4 0x428E
#define DWT_LDE_REPC_PCODE_5 0x451E
#define DWT_LDE_REPC_PCODE_6 0x2E14
#define DWT_LDE_REPC_PCODE_7 0x8000
#define DWT_LDE_REPC_PCODE_8 0x51EA
#define DWT_LDE_REPC_PCODE_9 0x28F4
#define DWT_LDE_REPC_PCODE_10 0x3332
#define DWT_LDE_REPC_PCODE_11 0x3AE0
#define DWT_LDE_REPC_PCODE_12 0x3D70
#define DWT_LDE_REPC_PCODE_13 0x3AE0
#define DWT_LDE_REPC_PCODE_14 0x35C2
#define DWT_LDE_REPC_PCODE_15 0x2B84
#define DWT_LDE_REPC_PCODE_16 0x35C2
#define DWT_LDE_REPC_PCODE_17 0x3332
#define DWT_LDE_REPC_PCODE_18 0x35C2
#define DWT_LDE_REPC_PCODE_19 0x35C2
#define DWT_LDE_REPC_PCODE_20 0x47AE
#define DWT_LDE_REPC_PCODE_21 0x3AE0
#define DWT_LDE_REPC_PCODE_22 0x3850
#define DWT_LDE_REPC_PCODE_23 0x30A2
#define DWT_LDE_REPC_PCODE_24 0x3850
/* Digital Diagnostics Interface */
#define DWT_DIG_DIAG_ID 0x2F
#define DWT_DIG_DIAG_LEN 41
/* Event Counter Control */
#define DWT_EVC_CTRL_OFFSET 0x00
#define DWT_EVC_CTRL_LEN 4
/*
* Access mask to Register for bits should always be set to zero
* to avoid any malfunction of the device.
*/
#define DWT_EVC_CTRL_MASK 0x00000003UL
/* Event Counters Enable bit */
#define DWT_EVC_EN 0x00000001UL
#define DWT_EVC_CLR 0x00000002UL
/* PHR Error Event Counter */
#define DWT_EVC_PHE_OFFSET 0x04
#define DWT_EVC_PHE_LEN 2
#define DWT_EVC_PHE_MASK 0x0FFF
/* Reed Solomon decoder (Frame Sync Loss) Error Event Counter */
#define DWT_EVC_RSE_OFFSET 0x06
#define DWT_EVC_RSE_LEN 2
#define DWT_EVC_RSE_MASK 0x0FFF
/*
* The EVC_FCG field is a 12-bit counter of the frames received with
* good CRC/FCS sequence.
*/
#define DWT_EVC_FCG_OFFSET 0x08
#define DWT_EVC_FCG_LEN 2
#define DWT_EVC_FCG_MASK 0x0FFF
/*
* The EVC_FCE field is a 12-bit counter of the frames received with
* bad CRC/FCS sequence.
*/
#define DWT_EVC_FCE_OFFSET 0x0A
#define DWT_EVC_FCE_LEN 2
#define DWT_EVC_FCE_MASK 0x0FFF
/*
* The EVC_FFR field is a 12-bit counter of the frames rejected
* by the receive frame filtering function.
*/
#define DWT_EVC_FFR_OFFSET 0x0C
#define DWT_EVC_FFR_LEN 2
#define DWT_EVC_FFR_MASK 0x0FFF
/* The EVC_OVR field is a 12-bit counter of receive overrun events */
#define DWT_EVC_OVR_OFFSET 0x0E
#define DWT_EVC_OVR_LEN 2
#define DWT_EVC_OVR_MASK 0x0FFF
/* The EVC_STO field is a 12-bit counter of SFD Timeout Error events */
#define DWT_EVC_STO_OFFSET 0x10
#define DWT_EVC_OVR_LEN 2
#define DWT_EVC_OVR_MASK 0x0FFF
/* The EVC_PTO field is a 12-bit counter of Preamble detection Timeout events */
#define DWT_EVC_PTO_OFFSET 0x12
#define DWT_EVC_PTO_LEN 2
#define DWT_EVC_PTO_MASK 0x0FFF
/*
* The EVC_FWTO field is a 12-bit counter of receive
* frame wait timeout events
*/
#define DWT_EVC_FWTO_OFFSET 0x14
#define DWT_EVC_FWTO_LEN 2
#define DWT_EVC_FWTO_MASK 0x0FFF
/*
* The EVC_TXFS field is a 12-bit counter of transmit frames sent.
* This is incremented every time a frame is sent
*/
#define DWT_EVC_TXFS_OFFSET 0x16
#define DWT_EVC_TXFS_LEN 2
#define DWT_EVC_TXFS_MASK 0x0FFF
/* The EVC_HPW field is a 12-bit counter of Half Period Warnings. */
#define DWT_EVC_HPW_OFFSET 0x18
#define DWT_EVC_HPW_LEN 2
#define DWT_EVC_HPW_MASK 0x0FFF
/* The EVC_TPW field is a 12-bit counter of Transmitter Power-Up Warnings. */
#define DWT_EVC_TPW_OFFSET 0x1A
#define DWT_EVC_TPW_LEN 2
#define DWT_EVC_TPW_MASK 0x0FFF
/*
* Offset from DIG_DIAG_ID in bytes,
* Please take care not to write to this area as doing so
* may cause the DW1000 to malfunction.
*/
#define DWT_EVC_RES1_OFFSET 0x1C
#define DWT_DIAG_TMC_OFFSET 0x24
#define DWT_DIAG_TMC_LEN 2
#define DWT_DIAG_TMC_MASK 0x0010
/*
* This test mode is provided to help support regulatory approvals
* spectral testing. When the TX_PSTM bit is set it enables a
* repeating transmission of the data from the TX_BUFFER
*/
#define DWT_DIAG_TMC_TX_PSTM 0x0010
#define DWT_REG_30_ID_RESERVED 0x30
#define DWT_REG_31_ID_RESERVED 0x31
#define DWT_REG_32_ID_RESERVED 0x32
#define DWT_REG_33_ID_RESERVED 0x33
#define DWT_REG_34_ID_RESERVED 0x34
#define DWT_REG_35_ID_RESERVED 0x35
/* Power Management System Control Block */
#define DWT_PMSC_ID 0x36
#define DWT_PMSC_LEN 48
#define DWT_PMSC_CTRL0_OFFSET 0x00
#define DWT_PMSC_CTRL0_LEN 4
/* Access mask to register PMSC_CTRL0 */
#define DWT_PMSC_CTRL0_MASK 0xF18F847FUL
/*
* The system clock will run off the 19.2 MHz XTI clock until the PLL is
* calibrated and locked, then it will switch over the 125 MHz PLL clock
*/
#define DWT_PMSC_CTRL0_SYSCLKS_AUTO 0x00000000UL
/* Force system clock to be the 19.2 MHz XTI clock. */
#define DWT_PMSC_CTRL0_SYSCLKS_19M 0x00000001UL
/* Force system clock to the 125 MHz PLL clock. */
#define DWT_PMSC_CTRL0_SYSCLKS_125M 0x00000002UL
/* The RX clock will be disabled until it is required for an RX operation */
#define DWT_PMSC_CTRL0_RXCLKS_AUTO 0x00000000UL
/* Force RX clock enable and sourced clock from the 19.2 MHz XTI clock */
#define DWT_PMSC_CTRL0_RXCLKS_19M 0x00000004UL
/* Force RX clock enable and sourced from the 125 MHz PLL clock */
#define DWT_PMSC_CTRL0_RXCLKS_125M 0x00000008UL
/* Force RX clock off. */
#define DWT_PMSC_CTRL0_RXCLKS_OFF 0x0000000CUL
/* The TX clock will be disabled until it is required for a TX operation */
#define DWT_PMSC_CTRL0_TXCLKS_AUTO 0x00000000UL
/* Force TX clock enable and sourced clock from the 19.2 MHz XTI clock */
#define DWT_PMSC_CTRL0_TXCLKS_19M 0x00000010UL
/* Force TX clock enable and sourced from the 125 MHz PLL clock */
#define DWT_PMSC_CTRL0_TXCLKS_125M 0x00000020UL
/* Force TX clock off */
#define DWT_PMSC_CTRL0_TXCLKS_OFF 0x00000030UL
/* Force Accumulator Clock Enable */
#define DWT_PMSC_CTRL0_FACE 0x00000040UL
/* GPIO clock enable */
#define DWT_PMSC_CTRL0_GPCE 0x00010000UL
/* GPIO reset (NOT), active low */
#define DWT_PMSC_CTRL0_GPRN 0x00020000UL
/* GPIO De-bounce Clock Enable */
#define DWT_PMSC_CTRL0_GPDCE 0x00040000UL
/* Kilohertz Clock Enable */
#define DWT_PMSC_CTRL0_KHZCLEN 0x00800000UL
/* Enable PLL2 on/off sequencing by SNIFF mode */
#define DWT_PMSC_CTRL0_PLL2_SEQ_EN 0x01000000UL
#define DWT_PMSC_CTRL0_SOFTRESET_OFFSET 3
/* Assuming only 4th byte of the register is read */
#define DWT_PMSC_CTRL0_RESET_ALL 0x00
/* Assuming only 4th byte of the register is read */
#define DWT_PMSC_CTRL0_RESET_RX 0xE0
/* Assuming only 4th byte of the register is read */
#define DWT_PMSC_CTRL0_RESET_CLEAR 0xF0
#define DWT_PMSC_CTRL1_OFFSET 0x04
#define DWT_PMSC_CTRL1_LEN 4
/* Access mask to register PMSC_CTRL1 */
#define DWT_PMSC_CTRL1_MASK 0xFC02F802UL
/* Automatic transition from receive mode into the INIT state */
#define DWT_PMSC_CTRL1_ARX2INIT 0x00000002UL
/*
* If this bit is set then the DW1000 will automatically transition
* into SLEEP or DEEPSLEEP mode after transmission of a frame
*/
#define DWT_PMSC_CTRL1_ATXSLP 0x00000800UL
/*
* This bit is set then the DW1000 will automatically transition
* into SLEEP mode after a receive attempt
*/
#define DWT_PMSC_CTRL1_ARXSLP 0x00001000UL
/* Snooze Enable */
#define DWT_PMSC_CTRL1_SNOZE 0x00002000UL
/* The SNOZR bit is set to allow the snooze timer to repeat twice */
#define DWT_PMSC_CTRL1_SNOZR 0x00004000UL
/* This enables a special 1 GHz clock used for some external SYNC modes */
#define DWT_PMSC_CTRL1_PLLSYN 0x00008000UL
/* This bit enables the running of the LDE algorithm */
#define DWT_PMSC_CTRL1_LDERUNE 0x00020000UL
/* Kilohertz clock divisor */
#define DWT_PMSC_CTRL1_KHZCLKDIV_MASK 0xFC000000UL
/*
* Writing this to PMSC CONTROL 1 register (bits 10-3) disables
* PMSC control of analog RF subsystems
*/
#define DWT_PMSC_CTRL1_PKTSEQ_DISABLE 0x00
/*
* Writing this to PMSC CONTROL 1 register (bits 10-3) enables
* PMSC control of analog RF subsystems
*/
#define DWT_PMSC_CTRL1_PKTSEQ_ENABLE 0xE7
#define DWT_PMSC_RES1_OFFSET 0x08
/* PMSC Snooze Time Register */
#define DWT_PMSC_SNOZT_OFFSET 0x0C
#define DWT_PMSC_SNOZT_LEN 1
#define DWT_PMSC_RES2_OFFSET 0x10
#define DWT_PMSC_RES3_OFFSET 0x24
#define DWT_PMSC_TXFINESEQ_OFFSET 0x26
/* Writing this disables fine grain sequencing in the transmitter */
#define DWT_PMSC_TXFINESEQ_DISABLE 0x0
/* Writing this enables fine grain sequencing in the transmitter */
#define DWT_PMSC_TXFINESEQ_ENABLE 0x0B74
#define DWT_PMSC_LEDC_OFFSET 0x28
#define DWT_PMSC_LEDC_LEN 4
/* 32-bit LED control register. */
#define DWT_PMSC_LEDC_MASK 0x000001FFUL
/*
* This field determines how long the LEDs remain lit after an event
* that causes them to be set on.
*/
#define DWT_PMSC_LEDC_BLINK_TIM_MASK 0x000000FFUL
/* Blink Enable. When this bit is set to 1 the LED blink feature is enabled. */
#define DWT_PMSC_LEDC_BLNKEN 0x00000100UL
/*
* Default blink time. Blink time is expressed in multiples of 14 ms.
* The value defined here is ~225 ms.
*/
#define DWT_PMSC_LEDC_BLINK_TIME_DEF 0x10
/* Command a blink of all LEDs */
#define DWT_PMSC_LEDC_BLINK_NOW_ALL 0x000F0000UL
#define DWT_REG_37_ID_RESERVED 0x37
#define DWT_REG_38_ID_RESERVED 0x38
#define DWT_REG_39_ID_RESERVED 0x39
#define DWT_REG_3A_ID_RESERVED 0x3A
#define DWT_REG_3B_ID_RESERVED 0x3B
#define DWT_REG_3C_ID_RESERVED 0x3C
#define DWT_REG_3D_ID_RESERVED 0x3D
#define DWT_REG_3E_ID_RESERVED 0x3E
#define DWT_REG_3F_ID_RESERVED 0x3F
/*
* Map the channel number to the index in the configuration arrays below.
* Channel: na 1 2 3 4 5 na 7
*/
const uint8_t dwt_ch_to_cfg[] = {0, 0, 1, 2, 3, 4, 0, 5};
/* Defaults from Table 38: Sub-Register 0x28:0C RF_TXCTRL values */
const uint32_t dwt_txctrl_defs[] = {
DWT_RF_TXCTRL_CH1,
DWT_RF_TXCTRL_CH2,
DWT_RF_TXCTRL_CH3,
DWT_RF_TXCTRL_CH4,
DWT_RF_TXCTRL_CH5,
DWT_RF_TXCTRL_CH7,
};
/* Defaults from Table 43: Sub-Register 0x2B:07 FS_PLLCFG values */
const uint32_t dwt_pllcfg_defs[] = {
DWT_FS_PLLCFG_CH1,
DWT_FS_PLLCFG_CH2,
DWT_FS_PLLCFG_CH3,
DWT_FS_PLLCFG_CH4,
DWT_FS_PLLCFG_CH5,
DWT_FS_PLLCFG_CH7
};
/* Defaults from Table 44: Sub-Register 0x2B:0B FS_PLLTUNE values */
const uint8_t dwt_plltune_defs[] = {
DWT_FS_PLLTUNE_CH1,
DWT_FS_PLLTUNE_CH2,
DWT_FS_PLLTUNE_CH3,
DWT_FS_PLLTUNE_CH4,
DWT_FS_PLLTUNE_CH5,
DWT_FS_PLLTUNE_CH7
};
/* Defaults from Table 37: Sub-Register 0x28:0B RF_RXCTRLH values */
const uint8_t dwt_rxctrlh_defs[] = {
DWT_RF_RXCTRLH_NBW,
DWT_RF_RXCTRLH_NBW,
DWT_RF_RXCTRLH_NBW,
DWT_RF_RXCTRLH_WBW,
DWT_RF_RXCTRLH_NBW,
DWT_RF_RXCTRLH_WBW
};
/* Defaults from Table 40: Sub-Register 0x2A:0B TC_PGDELAY */
const uint8_t dwt_pgdelay_defs[] = {
DWT_TC_PGDELAY_CH1,
DWT_TC_PGDELAY_CH2,
DWT_TC_PGDELAY_CH3,
DWT_TC_PGDELAY_CH4,
DWT_TC_PGDELAY_CH5,
DWT_TC_PGDELAY_CH7
};
/*
* Defaults from Table 19: Reference values for Register file:
* 0x1E Transmit Power Control for Smart Transmit Power Control
* Transmit Power Control values for 16 MHz, with DIS_STXP = 0
*/
const uint32_t dwt_txpwr_stxp0_16[] = {
0x15355575,
0x15355575,
0x0F2F4F6F,
0x1F1F3F5F,
0x0E082848,
0x32527292
};
/*
* Defaults from Table 19: Reference values for Register file:
* 0x1E Transmit Power Control for Smart Transmit Power Control
* Transmit Power Control values for 64 MHz, with DIS_STXP = 0
*/
const uint32_t dwt_txpwr_stxp0_64[] = {
0x07274767,
0x07274767,
0x2B4B6B8B,
0x3A5A7A9A,
0x25456585,
0x5171B1D1
};
/*
* Default from Table 20: Reference values Register file:
* 0x1E Transmit Power Control for Manual Transmit Power Control
* Transmit Power Control values for 16 MHz, with DIS_STXP = 1
*/
const uint32_t dwt_txpwr_stxp1_16[] = {
0x75757575,
0x75757575,
0x6F6F6F6F,
0x5F5F5F5F,
0x48484848,
0x92929292
};
/*
* Default from Table 20: Reference values Register file:
* 0x1E Transmit Power Control for Manual Transmit Power Control
* Transmit Power Control values for 64 MHz, with DIS_STXP = 1
*/
const uint32_t dwt_txpwr_stxp1_64[] = {
0x67676767,
0x67676767,
0x8B8B8B8B,
0x9A9A9A9A,
0x85858585,
0xD1D1D1D1
};
enum dwt_pulse_repetition_frequency {
DWT_PRF_16M = 0,
DWT_PRF_64M,
DWT_NUMOF_PRFS,
};
/* Defaults from Table 24: Sub-Register 0x23:04 AGC_TUNE1 values */
const uint16_t dwt_agc_tune1_defs[] = {
DWT_AGC_TUNE1_16M,
DWT_AGC_TUNE1_64M
};
enum dwt_baud_rate {
DWT_BR_110K = 0,
DWT_BR_850K,
DWT_BR_6M8,
DWT_NUMOF_BRS,
};
/* Decawave non-standard SFD lengths */
const uint8_t dwt_ns_sfdlen[] = {
DWT_DW_NS_SFD_LEN_110K,
DWT_DW_NS_SFD_LEN_850K,
DWT_DW_NS_SFD_LEN_6M8
};
/* Defaults from Table 30: Sub-Register 0x27:02 DRX_TUNE0b values */
const uint16_t dwt_tune0b_defs[DWT_NUMOF_BRS][2] = {
{
DWT_DRX_TUNE0b_110K_STD,
DWT_DRX_TUNE0b_110K_NSTD
},
{
DWT_DRX_TUNE0b_850K_STD,
DWT_DRX_TUNE0b_850K_NSTD
},
{
DWT_DRX_TUNE0b_6M8_STD,
DWT_DRX_TUNE0b_6M8_NSTD
}
};
/* Defaults from Table 31: Sub-Register 0x27:04 DRX_TUNE1a values */
const uint16_t dwt_tune1a_defs[] = {
DWT_DRX_TUNE1a_PRF16,
DWT_DRX_TUNE1a_PRF64
};
enum dwt_acquisition_chunk_size {
DWT_PAC8 = 0,
DWT_PAC16,
DWT_PAC32,
DWT_PAC64,
DWT_NUMOF_PACS,
};
/* Defaults from Table 33: Sub-Register 0x27:08 DRX_TUNE2 values */
const uint32_t dwt_tune2_defs[DWT_NUMOF_PRFS][DWT_NUMOF_PACS] = {
{
DWT_DRX_TUNE2_PRF16_PAC8,
DWT_DRX_TUNE2_PRF16_PAC16,
DWT_DRX_TUNE2_PRF16_PAC32,
DWT_DRX_TUNE2_PRF16_PAC64
},
{
DWT_DRX_TUNE2_PRF64_PAC8,
DWT_DRX_TUNE2_PRF64_PAC16,
DWT_DRX_TUNE2_PRF64_PAC32,
DWT_DRX_TUNE2_PRF64_PAC64
}
};
/*
* Defaults from Table 51:
* Sub-Register 0x2E:2804 LDE_REPC configurations for (850 kbps & 6.8 Mbps)
*
* For 110 kbps the values have to be divided by 8.
*/
const uint16_t dwt_lde_repc_defs[] = {
0,
DWT_LDE_REPC_PCODE_1,
DWT_LDE_REPC_PCODE_2,
DWT_LDE_REPC_PCODE_3,
DWT_LDE_REPC_PCODE_4,
DWT_LDE_REPC_PCODE_5,
DWT_LDE_REPC_PCODE_6,
DWT_LDE_REPC_PCODE_7,
DWT_LDE_REPC_PCODE_8,
DWT_LDE_REPC_PCODE_9,
DWT_LDE_REPC_PCODE_10,
DWT_LDE_REPC_PCODE_11,
DWT_LDE_REPC_PCODE_12,
DWT_LDE_REPC_PCODE_13,
DWT_LDE_REPC_PCODE_14,
DWT_LDE_REPC_PCODE_15,
DWT_LDE_REPC_PCODE_16,
DWT_LDE_REPC_PCODE_17,
DWT_LDE_REPC_PCODE_18,
DWT_LDE_REPC_PCODE_19,
DWT_LDE_REPC_PCODE_20,
DWT_LDE_REPC_PCODE_21,
DWT_LDE_REPC_PCODE_22,
DWT_LDE_REPC_PCODE_23,
DWT_LDE_REPC_PCODE_24
};
enum dwt_plen_idx {
DWT_PLEN_64 = 0,
DWT_PLEN_128,
DWT_PLEN_256,
DWT_PLEN_512,
DWT_PLEN_1024,
DWT_PLEN_2048,
DWT_PLEN_4096,
DWT_NUM_OF_PLEN,
};
/*
* Transmit Preamble Symbol Repetitions (TXPSR) and Preamble Extension (PE)
* constants for TX_FCTRL - Transmit Frame Control register.
* From Table 16: Preamble length selection
* BIT(19) | BIT(18) | BIT(21) | BIT(20)
*/
const uint32_t dwt_plen_cfg[] = {
(0 | BIT(18) | 0 | 0),
(0 | BIT(18) | 0 | BIT(20)),
(0 | BIT(18) | BIT(21) | 0),
(0 | BIT(18) | BIT(21) | BIT(20)),
(BIT(19) | 0 | 0 | 0),
(BIT(19) | 0 | BIT(21) | 0),
(BIT(19) | BIT(18) | 0 | 0),
};
/*
* Noise Threshold Multiplier (default NTM is 13) and
* Peak Multiplier (default PMULT is 3).
*/
#define DWT_DEFAULT_LDE_CFG1 ((3 << 5) | 13)
/* From Table 50: Sub-Register 0x2E:1806 LDE_CFG2 values */
#define DWT_DEFAULT_LDE_CFG2_PRF64 0x0607
#define DWT_DEFAULT_LDE_CFG2_PRF16 0x1607
#define DWT_RX_SIG_PWR_A_CONST_PRF64 121.74
#define DWT_RX_SIG_PWR_A_CONST_PRF16 113.77
#define DWT_DEVICE_ID 0xDECA0130
#define DWT_SFDTOC_DEF 0x1041
#define DWT_OTP_LDOTUNE_ADDR 0x04
#define DWT_OTP_PARTID_ADDR 0x06
#define DWT_OTP_LOTID_ADDR 0x07
#define DWT_OTP_VBAT_ADDR 0x08
#define DWT_OTP_VTEMP_ADDR 0x09
#define DWT_OTP_XTRIM_ADDR 0x1E
#endif /* ZEPHYR_INCLUDE_DW1000_REGS_H_ */
```
|
```groff
.\" $OpenBSD: round.3,v 1.5 2011/07/07 01:34:52 martynas Exp $
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $FreeBSD: src/lib/msun/man/round.3,v 1.6 2005/06/15 19:04:04 ru Exp $
.\"
.Dd $Mdocdate: July 7 2011 $
.Dt ROUND 3
.Os
.Sh NAME
.Nm round ,
.Nm roundf ,
.Nm roundl
.Nd round to nearest integral value
.Sh SYNOPSIS
.In math.h
.Ft double
.Fn round "double x"
.Ft float
.Fn roundf "float x"
.Ft long double
.Fn roundl "long double x"
.Sh DESCRIPTION
The
.Fn round ,
.Fn roundf
and
.Fn roundl
functions return the nearest integral value to
.Fa x ;
if
.Fa x
lies halfway between two integral values, then these
functions return the integral value with the larger
absolute value (i.e., they round away from zero).
.Sh SEE ALSO
.Xr ceil 3 ,
.Xr floor 3 ,
.Xr lrint 3 ,
.Xr lround 3 ,
.Xr nextafter 3 ,
.Xr rint 3 ,
.Xr trunc 3
.Sh STANDARDS
These functions conform to
.St -isoC-99 .
```
|
A pram is a small utility dinghy with a transom bow rather than a pointed bow. This type of pram provides a more efficient use of space than does a traditional skiff of the same size. The Mirror and Optimist sailboats are examples of this form. Modern prams are often 8 to 10 feet long and built of plywood, fibreglass, plastic or aluminum. They are usually oar powered. The Norwegian pram is commonly made of solid timber with much fore and aft rocker with a U-shaped cross section. In New Zealand and Australia the most common pram is an arc or v bottom rowboat commonly made of 6mm marine plywood often sealed with paint and/or epoxy resin. In the past often used as a tender; it has been replaced in this role by the small inflatable.
There is an unrelated type of ship called "pram" or "pramm".
Dinghies
|
```javascript
/**
* @license Apache-2.0
*
*
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
'use strict';
// MODULES //
var bench = require( '@stdlib/bench' );
var isIteratorLike = require( '@stdlib/assert/is-iterator-like' );
var isNonNegativeIntegerArray = require( '@stdlib/assert/is-nonnegative-integer-array' ).primitives;
var array = require( '@stdlib/ndarray/array' );
var pkg = require( './../package.json' ).name;
var nditerIndices = require( './../lib' );
// MAIN //
bench( pkg, function benchmark( b ) {
var iter;
var x;
var i;
x = array( [ [ 1, 2, 3, 4 ] ] );
b.tic();
for ( i = 0; i < b.iterations; i++ ) {
iter = nditerIndices( x.shape );
if ( typeof iter !== 'object' ) {
b.fail( 'should return an object' );
}
}
b.toc();
if ( !isIteratorLike( iter ) ) {
b.fail( 'should return an iterator protocol-compliant object' );
}
b.pass( 'benchmark finished' );
b.end();
});
bench( pkg+'::iteration', function benchmark( b ) {
var xbuf;
var iter;
var x;
var z;
var i;
xbuf = [];
xbuf.length = b.iterations + 1;
x = array( xbuf, {
'shape': [ xbuf.length, 1 ],
'dtype': 'generic',
'copy': false
});
iter = nditerIndices( x.shape );
b.tic();
for ( i = 0; i < b.iterations; i++ ) {
z = iter.next().value;
if ( typeof z !== 'object' ) {
b.fail( 'should return an array' );
}
}
b.toc();
if ( !isNonNegativeIntegerArray( z ) ) {
b.fail( 'should return an array' );
}
b.pass( 'benchmark finished' );
b.end();
});
```
|
Boysidia is a genus of air-breathing land snails in the family Gastrocoptidae.
Species
Boysidia chiangmaiensis Panha & J. B. Burch, 1999
Boysidia conspicua (Möllendorff, 1885)
Boysidia dilamellaris D.-N. Chen, Y.-H. Liu & W.-X. Wu, 1995
Boysidia dorsata (Ancey, 1881)
Boysidia elephas (van Benthem Jutting, 1950)
Boysidia fengxianensis D.-N. Chen, Y.-H. Liu & W.-X. Wu, 1995
Boysidia gongyaoshanensis H.-F. Yang, W.-H. Zhang & D.-N. Chen, 2012
Boysidia gracilis Haas, 1937
Boysidia hangchowensis (Pilsbry & Y. Hirase, 1908)
Boysidia huangguoshuensis T.-C. Luo, D.-N. Chen & G.-Q. Zhang, 2000
Boysidia hunana (Gredler, 1881)
Boysidia hupeana (Gredler, 1901)
Boysidia lamothei Bavay & Dautzenberg, 1912
Boysidia megaphonum (van Benthem Jutting, 1950)
Boysidia novemdentata Saurin, 1953
Boysidia orientalis B. Rensch, 1935
Boysidia pahpetensis Saurin, 1953
Boysidia paini F. G. Thompson & Dance, 1983
Boysidia paviei Bavay & Dautzenberg, 1912
Boysidia pentadens D.-N. Chen, M. Wu & G.-Q. Zhang, 1999
Boysidia perigyra (van Benthem Jutting, 1950)
Boysidia phatangensis Dumrongrojwattana & Assawawattagee, 2018
Boysidia procera F. G. Thompson & Dance, 1983
Boysidia ringens van Benthem Jutting, 1950
Boysidia robusta Bavay & Dautzenberg, 1912
Boysidia salpinx F. G. Thompson & Dance, 1983
Boysidia strophostoma (Möllendorff, 1885)
Boysidia taibaiensis D.-N. Chen, M. Wu & G.-Q. Zhang, 1999
Boysidia tamtouriana Pokryszko & Auffenberg, 2009
Boysidia terae (Tomlin, 1939)
Boysidia tholus Panha, 2002
Boysidia xianfengensis W.-H. Zhang, D.-N. Chen & W.-C. Zhou, 2014
Boysidia xiaoguanensis W.-H. Zhang, D.-N. Chen & W.-C. Zhou, 2014
Boysidia xishanensis D.-N. Chen, M. Wu & G.-Q. Zhang, 1999
References
Thompson, F. G. & Dance, S. P. (1983). Non-marine mollusks of Borneo. II Pulmonata: Pupillidae, Clausiliidae. III Prosobranchia: Hydrocenidae, Helicinidae. Bulletin of the Florida State Museum Biological Science. 29 (3): 101-152. Gainesville page(s): 105
Bank, R. A. (2017). Classification of the Recent terrestrial Gastropoda of the World. Last update: July 16th, 2017
Gastrocoptidae
Cave snails
Gastropod genera
|
Presidential elections were held in East Timor on 20 March 2017. Incumbent President Taur Matan Ruak, who was eligible for a second term, chose not to run for re-election. The result was a victory for Francisco Guterres of FRETILIN.
Electoral system
The President of East Timor is elected using the two-round system. If it had been required, a second round would have been held on 20 April.
Candidates
José Neves (Independent), a former guerilla leader and was deputy commissioner of the Anti-Corruption Commission (Comissão Anti-Corrupção (CAC)) until July 2016.
António da Conceição (Democratic Party)
José Luís Guterres (Frenti-Mudança)
Amorim Vieira (Independent)
Luís Alves Tilman (Independent)
Francisco Guterres (FRETILIN)
Antonio Maher Lopes (Socialist Party of Timor)
Ángela Freitas (Timorese Labor Party)
Results
References
Further reading
External links
East Timor
2017 in East Timor
East Timor
Presidential elections in East Timor
|
Agnes Inglis (1870–1952) was a Detroit, Michigan-born anarchist who became the primary architect of the Labadie Collection at the University of Michigan.
Early life
Agnes Inglis was born on December 3, 1870, in Detroit, Michigan, to Agnes (née Lambie) and Richard Inglis. Both of her parents were from Scotland. Her father was a medical doctor. She was the youngest child in a conservative, religious family, and educated at a Massachusetts girls' academy. Her father died in 1874, her sister died of cancer some time later, and her mother died in 1899 before Inglis was thirty years old.
After her mother's death, Inglis studied history and literature at the University of Michigan, receiving an allowance from her extended family. She left the university before graduating, and spent several years as a social worker at Chicago's Hull House, the Franklin Street Settlement House in Detroit, and the YWCA in Ann Arbor. While working in these settings, she became sympathetic to the condition of immigrant laborers in the United States, ultimately developing strong political convictions from the experiences.
In 1915 Inglis met and befriended Emma Goldman, and shortly thereafter, Goldman's lover and comrade Alexander Berkman. She increased her radical activities with the onset of World War I, and used much of her time and family's money for legal support, particularly during the Red Scare of 1919–1920.
The Labadie Collection
She befriended Joseph Labadie and in 1924 discovered the materials on radical movements he donated to University of Michigan in 1911 had hardly been cared for. The collection remained unprocessed, kept in a locked cage. She began volunteering full-time, carefully organizing and cataloguing what would be known as the Labadie Collection. Her contributions to the collection were unique. She used unorthodox methods of arranging the collection. On the catalog cards, personal opinions were sometimes added to the bibliographic information about the items.
After a few years, Inglis and Labadie sent letters to 400 radicals soliciting contributions on their personal experiences and organizing efforts. While the initial response was weak, over the next 28 years anarchists would donate an enormous volume of publications, writings, and documentary material to her collection. These include the papers of Roger Baldwin, Elizabeth Gurley Flynn, and Ralph Chaplin. She also helped many in their research and publications, such as Henry David with The Haymarket Tragedy and James J. Martin with Man Against the State. Inglis' work was known around the U.S., and after many anarchists died decades later, their families would donate their collections to the Labadie Collection. It is estimated that her efforts increased the size of the original collection by approximately twentyfold.
Death
Inglis died on January 30, 1952, in Michigan, leaving an expansive and comprehensive library on radical social movements. With her death, however, some of the nuances of the collection's organization were lost.
References
Avrich, Paul. Anarchist Voices: An Oral History of Anarchism In America. Princeton University Press, 1995. Princeton, NJ.
Jo Labadie and His Gift to Michigan, University of Michigan.
Agnes Inglis Papers 1909 - 1952, Special Collections Library, University of Michigan.
External links
1870 births
1951 deaths
American anarchists
American librarians
American women librarians
Industrial Workers of the World members
University of Michigan alumni
American librarianship and human rights
|
USS Ethan Allen was a 556-ton bark acquired by the Union Navy during the beginning of the American Civil War, and used as a gunboat in support of the blockade of Confederate waterways.
History
Ethan Allen was built in 1859 at Boston, Massachusetts; purchased by the Navy 23 August 1861; and commissioned 3 October 1861, Acting Volunteer Lieutenant W. B. Eaton in command. During her first wartime cruise, 27 October 1861 to 30 March 1863, Ethan Allen patrolled in the Gulf of Mexico, capturing eight prizes, and destroying extensive salt works along the Florida coast, thus hampering the Confederate war effort and civilian economy. Ethan Allen returned to Boston for repairs, and between 22 June and 28 October 1863, cruised along the New England coast to protect merchantmen and fishing craft from Southern cruisers. On 9 November, she sailed from Boston to join the South Atlantic Blockading Squadron off Port Royal, South Carolina, 26 November. During the following year and a half, she patrolled the Carolina coast, and for several months served as practice ship for junior officers of her squadron. She arrived at Portsmouth, New Hampshire, 5 June 1865, and was decommissioned there 26 June 1865, and sold 20 July 1865.
References
Ships built in Boston
Ships of the Union Navy
Barques of the United States Navy
Gunboats of the United States Navy
American Civil War patrol vessels of the United States
1859 ships
|
```objective-c
//
// FCUUID.h
//
// Created by Fabio Caccamo on 26/06/14.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
extern NSString *const FCUUIDsOfUserDevicesDidChangeNotification;
@interface FCUUID : NSObject
{
NSMutableDictionary *_uuidForKey;
NSString *_uuidForSession;
NSString *_uuidForInstallation;
NSString *_uuidForVendor;
NSString *_uuidForDevice;
NSString *_uuidsOfUserDevices;
BOOL _uuidsOfUserDevices_iCloudAvailable;
}
+(NSString *)uuid;
+(NSString *)uuidForKey:(id<NSCopying>)key;
+(NSString *)uuidForSession;
+(NSString *)uuidForInstallation;
+(NSString *)uuidForVendor;
+(NSString *)uuidForDevice;
+(NSString *)uuidForDeviceMigratingValue:(NSString *)value commitMigration:(BOOL)commitMigration;
+(NSString *)uuidForDeviceMigratingValueForKey:(NSString *)key commitMigration:(BOOL)commitMigration;
+(NSString *)uuidForDeviceMigratingValueForKey:(NSString *)key service:(NSString *)service commitMigration:(BOOL)commitMigration;
+(NSString *)uuidForDeviceMigratingValueForKey:(NSString *)key service:(NSString *)service accessGroup:(NSString *)accessGroup commitMigration:(BOOL)commitMigration;
+(NSArray *)uuidsOfUserDevices;
+(NSArray *)uuidsOfUserDevicesExcludingCurrentDevice;
+(BOOL)uuidValueIsValid:(NSString *)uuidValue;
@end
```
|
```yaml
zh-CN:
activemodel:
attributes:
collaborative_draft:
address:
body:
category_id:
decidim_scope_id:
has_address:
scope_id:
state:
title:
user_group_id:
proposal:
address:
answer:
answered_at:
automatic_hashtags:
body:
category_id:
decidim_scope_id:
has_address:
scope_id:
state:
suggested_hashtags:
title:
user_group_id:
proposal_answer:
answer:
proposals_copy:
origin_component_id:
proposals_import:
import_proposals:
keep_authors:
valuation_assignment:
admin_log:
valuator_role_id:
errors:
models:
proposal:
attributes:
add_documents:
needs_to_be_reattached:
add_photos:
needs_to_be_reattached:
body:
cant_be_equal_to_template:
identical:
title:
identical:
models:
decidim/proposals/admin/update_proposal_category_event:
decidim/proposals/admin/update_proposal_scope_event:
decidim/proposals/creation_enabled_event:
decidim/proposals/endorsing_enabled_event:
decidim/proposals/proposal_mentioned_event:
decidim/proposals/publish_proposal_event:
decidim/proposals/voting_enabled_event:
activerecord:
models:
decidim/proposals/collaborative_draft:
other:
decidim/proposals/proposal:
other:
decidim/proposals/proposal_note:
other:
decidim:
admin:
filters:
proposals:
category_id_eq:
label:
is_emendation_true:
label:
values:
'false':
'true':
scope_id_eq:
label:
state_eq:
label:
values:
accepted:
evaluating:
published:
rejected:
validating:
withdrawn:
valuator_role_ids_has:
label:
search_placeholder:
id_string_or_title_cont: ID %{collection}
components:
proposals:
actions:
amend:
create:
endorse:
withdraw:
name:
settings:
global:
amendments_enabled:
amendments_enabled_help:
amendments_wizard_help_text:
announcement:
attachments_allowed:
collaborative_drafts_enabled:
comments_enabled:
comments_max_length: (0)
geocoding_enabled:
new_proposal_body_template:
new_proposal_body_template_help:
new_proposal_help_text:
official_proposals_enabled:
participatory_texts_enabled:
participatory_texts_enabled_readonly: "" ""
proposal_answering_enabled:
proposal_length:
proposal_limit:
proposal_wizard_step_1_help_text:
resources_permissions_enabled:
scope_id:
scopes_enabled:
threshold_per_proposal:
step:
amendment_creation_enabled:
amendment_creation_enabled_help:
amendment_promotion_enabled:
amendment_promotion_enabled_help:
amendment_reaction_enabled:
amendment_reaction_enabled_help:
amendments_visibility:
amendments_visibility_choices:
all:
participants:
amendments_visibility_help:
announcement:
answers_with_costs:
automatic_hashtags:
comments_blocked:
endorsements_blocked:
endorsements_enabled:
proposal_answering_enabled:
publish_answers_immediately:
suggested_hashtags:
events:
proposals:
admin:
proposal_note_created:
email_outro:
email_subject: %{resource_title}
collaborative_draft_access_accepted:
email_subject: "%{requester_name} %{resource_title}"
collaborative_draft_access_rejected:
email_subject: "%{requester_name} %{resource_title} "
notification_title: <a href="%{requester_path}">%{requester_name} %{requester_nickname}</a> <strong></strong> <a href="%{resource_path}">%{resource_title}</a>
collaborative_draft_access_requested:
email_subject: "%{requester_name} %{resource_title} "
notification_title: <a href="%{requester_path}">%{requester_name} %{requester_nickname}</a> <a href="%{resource_path}">%{resource_title}</a> <strong></strong>
collaborative_draft_access_requester_accepted:
email_subject: %{resource_title}
collaborative_draft_access_requester_rejected:
email_subject: %{resource_title}
notification_title: <a href="%{resource_path}">%{resource_title}</a> <strong></strong>
collaborative_draft_withdrawn:
email_subject: "%{author_name} %{author_nickname} %{resource_title} "
notification_title: <a href="%{author_path}">%{author_name} %{author_nickname}</a> <strong></strong> <a href="%{resource_path}">%{resource_title}</a>
creation_enabled:
email_intro: ' %{participatory_space_title} '
email_outro: %{participatory_space_title}
email_subject: %{participatory_space_title}
endorsing_enabled:
email_intro: ' %{participatory_space_title}'
email_outro: %{participatory_space_title}
email_subject: '%{participatory_space_title} '
proposal_mentioned:
email_outro: "%{resource_title} "
email_subject: "%{mentioned_proposal_title}"
proposal_published:
email_intro: '%{author_name} %{author_nickname}, "%{resource_title}"'
email_outro: %{author_nickname}
email_subject: '%{resource_title} %{author_nickname} '
notification_title: <a href="%{resource_path}">%{resource_title}</a> <a href="%{author_path}">%{author_name} %{author_nickname}</a>
proposal_published_for_space:
email_intro: "%{resource_title}" "%{participatory_space_title}"
email_outro: "%{participatory_space_title}"
email_subject: "%{resource_title}" %{participatory_space_title}
proposal_update_category:
email_intro: ' "%{resource_title}"'
email_outro:
email_subject: '%{resource_title} '
notification_title: <a href="%{resource_path}">%{resource_title}</a>
proposal_update_scope:
email_intro: ' "%{resource_title}"'
email_outro:
email_subject: '%{resource_title} '
notification_title: <a href="%{resource_path}">%{resource_title}</a>
voting_enabled:
email_outro: %{participatory_space_title}
gamification:
badges:
accepted_proposals:
conditions:
-
-
description:
description_another: %{score}
description_own: %{score}
name:
next_level_in: %{score}
unearned_another:
unearned_own:
proposal_votes:
conditions:
-
-
proposals:
conditions:
-
-
description:
description_another: %{score}
description_own: %{score}
name:
next_level_in: %{score}
unearned_own:
metrics:
accepted_proposals:
description:
object:
title:
endorsements:
description:
object:
title:
proposals:
description:
object:
title:
participatory_spaces:
highlighted_proposals:
see_all: (%{count})
proposals:
actions:
answer_proposal:
edit_proposal:
import:
new:
participatory_texts:
show:
title:
admin:
actions:
preview:
exports:
proposals:
models:
proposal:
name:
participatory_texts:
bulk-actions:
are_you_sure:
discard_all:
import_doc:
discard:
success:
import:
invalid:
invalid_file:
success:
index:
info_1:
publish_document:
save_draft:
title:
new_import:
accepted_mime_types:
md: Markdown
bottom_hint: "()"
title:
upload_document:
sections:
article: "<em></em>"
sub-section: "<em></em> %{title}"
update:
success:
proposal_answers:
form:
answer_proposal:
title: %{title}
proposal_notes:
form:
note:
submit:
title:
proposals:
edit:
title:
update:
form:
attachment_legend: "() "
created_in_meeting:
select_a_category:
select_a_meeting:
index:
actions:
assign_to_valuator:
assign_to_valuator_button:
cancel:
change_category:
change_scope:
merge:
merge_button:
publish:
publish_answers:
select_component:
selected:
split:
split_button:
title:
unassign_from_valuator:
unassign_from_valuator_button:
update:
update_scope_button:
new:
create:
title:
show:
amendments_count:
assigned_valuators:
body:
comments_count:
documents: www.un.org/webcast
endorsements_count:
endorsers:
n_more_endorsers:
other: %{count}
photos:
ranking: "%{ranking} / %{total}"
related_meetings:
remove_assignment:
remove_assignment_confirmation:
valuators:
update_category:
invalid: ' %{subject_name} : %{proposals}'
success: ' %{subject_name} %{proposals}'
update_scope:
invalid: ' %{subject_name} %{proposals}'
success: ' %{subject_name} %{proposals}'
proposals_imports:
new:
create:
no_components:
select_component:
select_states:
proposals_merges:
create:
success:
proposals_splits:
create:
success:
admin_log:
proposal:
answer: "%{user_name} %{resource_name} %{space_name} "
create: "%{user_name} %{space_name} %{resource_name} "
publish_answer: "%{user_name} %{space_name} %{resource_name} "
update: "%{user_name} %{resource_name} %{space_name} "
proposal_note:
create: "%{user_name} %{space_name} %{resource_name} "
valuation_assignment:
create: "%{user_name} %{resource_name} "
delete: "%{user_name} %{proposal_title} "
answers:
accepted:
evaluating:
not_answered:
rejected:
withdrawn:
application_helper:
filter_origin_values:
all:
meetings:
official:
user_groups:
filter_state_values:
all:
not_answered:
filter_type_values:
all:
amendments:
proposals:
collaborative_drafts:
collaborative_draft:
publish:
error:
irreversible_action_modal:
cancel:
ok:
title:
success:
withdraw:
error:
irreversible_action_modal:
cancel:
ok:
title:
success:
create:
success:
edit:
attachment_legend: "() "
back:
select_a_category:
send:
title:
filters:
all:
amendment:
category:
open:
published:
related_to:
scope:
search:
state:
withdrawn:
filters_small_view:
close_modal:
filter:
filter_by:
unfold: ...
index:
count:
other: "%{count} "
new:
send:
new_collaborative_draft_button:
new_collaborative_draft:
orders:
label: ''
most_contributed:
random:
recent:
requests:
accepted_request:
error:
access_requested:
error:
collaboration_requests:
accept_request:
reject_request:
title:
rejected_request:
error:
show:
edit:
final_proposal:
final_proposal_help_text:
hidden_authors_count:
other: %{count}
publish:
publish_info:
published_proposal:
request_access:
requested_access:
withdraw:
states:
open:
published:
withdrawn:
update:
error:
success:
wizard_aside:
back_from_collaborative_draft:
wizard_header:
title:
create:
error:
success:
destroy_draft:
error:
success:
models:
proposal:
fields:
category:
comments:
id: ID
notes:
official_proposal:
published_answer:
published_at:
scope:
state:
title:
valuator:
valuators:
votes:
participatory_text_proposal:
alternative_title:
buttons:
amend:
comment:
proposals:
edit:
attachment_legend: "() "
back:
select_a_category:
send:
title:
edit_draft:
discard:
discard_confirmation:
send:
title:
filters:
activity:
all:
amendment_type:
category:
my_proposals:
origin:
related_to:
scope:
search:
state:
type:
index:
collaborative_drafts_list:
count:
other: "%{count} "
new_proposal:
see_all_withdrawn:
new:
send:
orders:
label: ''
most_commented:
most_endorsed:
most_followed:
random:
recent:
with_more_authors:
preview:
modify:
proposal_edit_before_minutes:
other: %{count}
publish:
title:
show:
answer:
changes_at_title: "%{title}"
edit_proposal:
estimated_cost:
hidden_endorsers_count:
other: %{count}
link_to_collaborative_draft_help_text:
link_to_collaborative_draft_text:
link_to_promoted_emendation_help_text:
link_to_promoted_emendation_text:
link_to_proposal_from_emendation_help_text:
link_to_proposal_from_emendation_text:
proposal_accepted_reason: ''
proposal_in_evaluation_reason:
proposal_rejected_reason: ''
withdraw_confirmation_html: <br><br><strong></strong>
withdraw_proposal:
update:
title:
voting_rules:
proposal_limit:
description: %{limit}
wizard_aside:
back:
back_from_step_1:
wizard_steps:
current_step:
step_1:
title:
proposals_picker:
choose_proposals:
publish:
error:
success:
publish_answers:
success:
update:
error:
success:
update_draft:
error:
success:
versions:
index:
title:
resource_links:
copied_from_component:
proposal_proposal:
included_projects:
project_result: ''
included_proposals:
proposal_project: ''
proposal_result: ''
```
|
Temešvár is a municipality and village in Písek District in the South Bohemian Region of the Czech Republic. It has about 100 inhabitants.
Temešvár lies approximately north-east of Písek, north of České Budějovice, and south of Prague.
References
Villages in Písek District
|
```kotlin
package mega.privacy.android.domain.exception
import mega.privacy.android.domain.entity.sync.SyncError
/**
* Mega Exception for sync errors
*
* @property syncError SyncError object
*/
class MegaSyncException(
errorCode: Int,
errorString: String?,
val syncError: SyncError? = null,
) : MegaException(errorCode, errorString) {
}
```
|
Histone H1 is one of the five main histone protein families which are components of chromatin in eukaryotic cells. Though highly conserved, it is nevertheless the most variable histone in sequence across species.
Structure
Metazoan H1 proteins feature a central globular "winged helix" domain and long C- and short N-terminal tails. H1 is involved with the packing of the "beads on a string" sub-structures into a high order structure, whose details have not yet been solved. H1 found in protists and bacteria, otherwise known as nucleoproteins HC1 and HC2 (, ), lack the central domain and the N-terminal tail.
H1 is less conserved than core histones. The globular domain is the most conserved part of H1.
Function
Unlike the other histones, H1 does not make up the nucleosome "bead". Instead, it sits on top of the structure, keeping in place the DNA that has wrapped around the nucleosome. H1 is present in half the amount of the other four histones, which contribute two molecules to each nucleosome bead. In addition to binding to the nucleosome, the H1 protein binds to the "linker DNA" (approximately 20-80 nucleotides in length) region between nucleosomes, helping stabilize the zig-zagged 30 nm chromatin fiber. Much has been learned about histone H1 from studies on purified chromatin fibers. Ionic extraction of linker histones from native or reconstituted chromatin promotes its unfolding under hypotonic conditions from fibers of 30 nm width to beads-on-a-string nucleosome arrays.
It is uncertain whether H1 promotes a solenoid-like chromatin fiber, in which exposed linker DNA is shortened, or whether it merely promotes a change in the angle of adjacent nucleosomes, without affecting linker length However, linker histones have been demonstrated to drive the compaction of chromatin fibres that had been reconstituted in vitro using synthetic DNA arrays of the strong '601' nucleosome positioning element. Nuclease digestion and DNA footprinting experiments suggest that the globular domain of histone H1 localizes near the nucleosome dyad, where it protects approximately 15-30 base pairs of additional DNA. In addition, experiments on reconstituted chromatin reveal a characteristic stem motif at the dyad in the presence of H1. Despite gaps in our understanding, a general model has emerged wherein H1's globular domain closes the nucleosome by crosslinking incoming and outgoing DNA, while the tail binds to linker DNA and neutralizes its negative charge.
Many experiments addressing H1 function have been performed on purified, processed chromatin under low-salt conditions, but H1's role in vivo is less certain. Cellular studies have shown that overexpression of H1 can cause aberrant nuclear morphology and chromatin structure, and that H1 can serve as both a positive and negative regulator of transcription, depending on the gene. In Xenopus egg extracts, linker histone depletion causes ~2-fold lengthwise extension of mitotic chromosomes, while overexpression causes chromosomes to hypercompact into an inseparable mass. Complete knockout of H1 in vivo has not been achieved in multicellular organisms due to the existence of multiple isoforms that may be present in several gene clusters, but various linker histone isoforms have been depleted to varying degrees in Tetrahymena, C. elegans, Arabidopsis, fruit fly, and mouse, resulting in various organism-specific defects in nuclear morphology, chromatin structure, DNA methylation, and/or specific gene expression.
Dynamics
While most histone H1 in the nucleus is bound to chromatin, H1 molecules shuttle between chromatin regions at a fairly high rate.
It is difficult to understand how such a dynamic protein could be a structural component of chromatin, but it has been suggested that the steady-state equilibrium within the nucleus still strongly favors association between H1 and chromatin, meaning that despite its dynamics, the vast majority of H1 at any given timepoint is chromatin bound. H1 compacts and stabilizes DNA under force and during chromatin assembly, which suggests that dynamic binding of H1 may provide protection for DNA in situations where nucleosomes need to be removed.
Cytoplasmic factors appear to be necessary for the dynamic exchange of histone H1 on chromatin, but these have yet to be specifically identified. H1 dynamics may be mediated to some degree by O-glycosylation and phosphorylation. O-glycosylation of H1 may promote chromatin condensation and compaction. Phosphorylation during interphase has been shown to decrease H1 affinity for chromatin and may promote chromatin decondensation and active transcription. However, during mitosis phosphorylation has been shown to increase the affinity of H1 for chromosomes and therefore promote mitotic chromosome condensation.
Isoforms
The H1 family in animals includes multiple H1 isoforms that can be expressed in different or overlapping tissues and developmental stages within a single organism. The reason for these multiple isoforms remains unclear, but both their evolutionary conservation from sea urchin to humans as well as significant differences in their amino acid sequences suggest that they are not functionally equivalent. One isoform is histone H5, which is only found in avian erythrocytes, which are unlike mammalian erythrocytes in that they have nuclei. Another isoform is the oocyte/zygotic H1M isoform (also known as B4 or H1foo), found in sea urchins, frogs, mice, and humans, which is replaced in the embryo by somatic isoforms H1A-E, and H10 which resembles H5. Despite having more negative charges than somatic isoforms, H1M binds with higher affinity to mitotic chromosomes in Xenopus egg extracts.
Post-translational modifications
Like other histones, the histone H1 family is extensively post-translationally modified (PTMs). This includes serine and threonine phosphorylation, lysine acetylation, lysine methylation and ubiquitination. These PTMs serve a variety of functions but are less well studied than the PTMs of other histones.
See also
Nucleosome
Histone
Chromatin
Linker histone H1 variants
Other histone proteins involved in chromatin:
H2A
H2B
H3
H4
References
Proteins
|
```html
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>createPortal | @xarc/react</title><meta name="description" content="Documentation for @xarc/react"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@xarc/react</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../index.html">@xarc/react</a></li><li><a href="../modules/common.html">common</a></li><li><a href="../modules/common.ReactDom.html">ReactDom</a></li><li><a href="common.ReactDom.createPortal.html">createPortal</a></li></ul><h1>Function createPortal</h1></div><section class="tsd-panel"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="createPortal" class="tsd-anchor"></a><span class="tsd-kind-call-signature">create<wbr/>Portal</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">children</span>, <span class="tsd-kind-parameter">container</span>, <span class="tsd-kind-parameter">key</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/common.React.ReactPortal.html" class="tsd-signature-type tsd-kind-interface">ReactPortal</a><a href="#createPortal" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">children</span>: <a href="../types/common.React.ReactNode.html" class="tsd-signature-type tsd-kind-type-alias">ReactNode</a></span></li><li><span><span class="tsd-kind-parameter">container</span>: <span class="tsd-signature-type">Element</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">DocumentFragment</span></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">key</span>: <span class="tsd-signature-type">string</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="../interfaces/common.React.ReactPortal.html" class="tsd-signature-type tsd-kind-interface">ReactPortal</a></h4><aside class="tsd-sources"><ul><li>Defined in common/temp/node_modules/.pnpm/@types+react-dom@18.3.0/node_modules/@types/react-dom/index.d.ts:29</li></ul></aside></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-index-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><h4 class="uppercase">Member Visibility</h4><form><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div><div class="tsd-theme-toggle"><h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@xarc/react</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="path_to_url" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
```
|
```javascript
(function() {
'use strict';
/**
* Model for User API, this is used to wrap all User objects specified actions and data change actions.
*/
angular.module('frontend.users')
.service('UserModel', [
'DataModel','DataService','$q','$log','$http',
function(DataModel,DataService,$q,$log,$http) {
var model = new DataModel('user');
model.handleError = function($scope,err) {
$scope.errors = {}
if(err.data){
if(err.data.Errors) {
Object.keys(err.data.Errors).forEach(function (key) {
$scope.errors[key] = err.data.Errors[key][0].message
})
}
for(var key in err.data.invalidAttributes){
$scope.errors[key] = err.data.invalidAttributes[key][0].message
}
//
// Passport errors
if(err.data.raw && err.data.raw.length) {
err.data.raw.forEach(function(raw){
for(var key in raw.err.invalidAttributes){
$scope.errors[key] = raw.err.invalidAttributes[key][0].message
}
})
}
//
// if(err.data.failedTransactions && err.data.failedTransactions.length) {
// err.data.failedTransactions.forEach(function(failedTrans){
// if(failedTrans.err && failedTrans.err.invalidAttributes){
// for(var key in failedTrans.err.invalidAttributes){
//
// if(key == 'password') {
// failedTrans.err.invalidAttributes[key].forEach(function(item){
//
// if(item.rule == 'minLength') {
// $scope.errors[key] = "The password must be at least 7 characters long."
// }
//
// })
// }
//
// if(key == 'username') {
// failedTrans.err.invalidAttributes[key].forEach(function(item){
//
// if(item.rule == 'minLength') {
// $scope.errors[key] = "The username must be at least 7 characters long."
// }
//
// })
// }
//
// }
// }
//
// })
// }
}
}
model.signup = function signup(data) {
return $http.post('auth/signup',data)
}
return model;
}
])
;
}());
```
|
James Branch (27 February 1845 – 16 November 1918), was a British boot manufacturer and Liberal politician.
Branch was born in Bethnal Green in the East End of London, where he established a boot factory. An active member of the Liberal Party, he was president of the Bethnal Green Liberal Association for twenty years. In 1889 he was elected to the first London County Council as a member of the Liberal-backed Progressive Party representing Bethnal Green South West until 1907. He was a justice of the peace for the County of London, and well known for his philanthropic work in the East End and as a prominent member of the Congregational Church.
At the 1906 general election Branch successfully contested the parliamentary constituency of Enfield, one of many Liberals who unseated sitting Conservative MPs. He was defeated at the next election in January 1910, following a campaign where his Conservative opponents alleged that he was a Polish Jew and was using a false name. They also falsely claimed that he had discharged his British employees in favour of foreign workers. He attempted to regain the seat at the next election in December of the same year, but failed to be elected.
References
External links
1845 births
1918 deaths
Liberal Party (UK) MPs for English constituencies
UK MPs 1906–1910
Members of London County Council
Progressive Party (London) politicians
English Congregationalists
People from Bethnal Green
|
Sofia Tillström (born 15 May 1976) is a former professional tennis player from Sweden. She competed during her career as Sofia Finér.
Finér played on the professional tour in the 1990s, reaching a best singles ranking of 289 in the world, with two ITF titles. As a doubles player she had a top ranking of 254 and won three doubles titles on the ITF circuit.
In 1997 she featured as a doubles player in three Fed Cup ties. Partnering Annica Lindstedt, the pair won two of their three matches together for Sweden.
Now known as Sofia Tillström, she is a coach at the Ekerö Tennisklubb in the Stockholm region. Her husband is former ATP Tour player Mikael Tillström.
ITF finals
Singles (2–3)
Doubles (3–6)
See also
List of Sweden Fed Cup team representatives
References
External links
1976 births
Living people
Swedish female tennis players
20th-century Swedish women
21st-century Swedish women
|
Alexander Murray Palmer Haley (August 11, 1921 – February 10, 1992) was an American writer and the author of the 1976 book Roots: The Saga of an American Family. ABC adapted the book as a television miniseries of the same name and aired it in 1977 to a record-breaking audience of 130 million viewers. In the United States, the book and miniseries raised the public awareness of black American history and inspired a broad interest in genealogy and family history.
Haley's first book was The Autobiography of Malcolm X, published in 1965, a collaboration through numerous lengthy interviews with Malcolm X.
He was working on a second family history novel at his death. Haley had requested that David Stevens, a screenwriter, complete it; the book was published as Queen: The Story of an American Family. It was adapted as a miniseries, Alex Haley's Queen, broadcast in 1993.
Early life and education
Alex Haley was born in Ithaca, New York, on August 11, 1921, and was the eldest of three brothers (the other two being George and Julius) and a half-sister (from his father's second marriage). Haley lived with his family in Henning, Tennessee, before returning to Ithaca with his family when he was five years old. Haley's father was Simon Haley, a professor of agriculture at Alabama A&M University, and his mother was Bertha George Haley (née Palmer), who had grown up in Henning. The family had Mandinka, other African, Cherokee, Scottish, and Scottish-Irish roots. The younger Haley always spoke proudly of his father and the obstacles of racism he had overcome.
Like his father, Alex Haley was enrolled at Alcorn State University, a historically black college in Mississippi and, a year later, enrolled at Elizabeth City State College, also historically black, in Elizabeth City, North Carolina. The following year, he withdrew from college. His father felt that Alex needed discipline and growth, and convinced him to enlist in the military. On May 24, 1939, Alex Haley began what became a 20-year career in the United States Coast Guard.
Haley traced back his maternal ancestry, through genealogical research, to Jufureh, in The Gambia.
Coast Guard career
Haley enlisted as a mess attendant. Later he was promoted to the rate of petty officer third-class in the rating of steward, one of the few ratings open to black personnel at that time. It was during his service in the Pacific theater of operations that Haley taught himself the craft of writing stories. During his enlistment other sailors often paid him to write love letters to their girlfriends. He said that the greatest enemy he and his crew faced during their long voyages was not the Japanese forces but rather boredom.
After World War II, Haley petitioned the U.S. Coast Guard to allow him to transfer into the field of journalism. By 1949 he had become a petty officer first-class in the rating of a journalist. He later advanced to chief petty officer and held this rank until his retirement from the Coast Guard in 1959. He was the first chief journalist in the Coast Guard, the rating having been expressly created for him in recognition of his literary ability.
Haley's awards and decorations from the Coast Guard include the Coast Guard Good Conduct Medal (6 awards represented by 1 silver and 1 bronze service star), American Defense Service Medal (with "Sea" clasp), American Campaign Medal, Asiatic-Pacific Campaign Medal, European-African-Middle Eastern Campaign Medal, World War II Victory Medal, Korean Service Medal, National Defense Service Medal, United Nations Service Medal, and the Coast Guard Expert Marksmanship Medal. The Republic of Korea awarded him the War Service Medal, ten years after he died. The United States Coast Guard dedicated the cutter formerly known as USS Edenton to Haley by recommissioning it as in July 1999. The cutter currently serves from Kodiak, Alaska.
Literary career
After retiring from the U.S. Coast Guard, Haley began another phase of his journalism career. He eventually became a senior editor for Reader's Digest magazine. Haley wrote an article for the magazine about his brother George's struggles to succeed as one of the first black students at a Southern law school.
Playboy magazine
Haley conducted the first interview for Playboy magazine. Haley elicited candid comments from jazz musician Miles Davis about his thoughts and feelings on racism in an interview he had started, but not finished, for Show Business Illustrated, another magazine created by Playboy founder Hugh Hefner that folded in early 1962. Haley completed the interview and it appeared in Playboy'''s September 1962 issue. That interview set the tone for what became a significant feature of the magazine. Rev. Martin Luther King Jr.'s Playboy Interview with Haley was the longest he ever granted to any publication.
Throughout the 1960s, Haley was responsible for some of the magazine's most notable interviews, including one with George Lincoln Rockwell, leader of the American Nazi Party. He agreed to meet with Haley only after gaining assurance from the writer that he was not Jewish. Haley remained professional during the interview, although Rockwell kept a handgun on the table throughout it. (The interview was recreated in Roots: The Next Generations, with James Earl Jones as Haley and Marlon Brando as Rockwell.) Haley also interviewed Muhammad Ali, who spoke about changing his name from Cassius Clay. Other interviews include Jack Ruby's defense attorney Melvin Belli, entertainer Sammy Davis, Jr., football player Jim Brown, TV host Johnny Carson, and music producer Quincy Jones.
The Autobiography of Malcolm XThe Autobiography of Malcolm X, published in 1965, was Haley's first book. It describes the trajectory of Malcolm X's life from street criminal to national spokesman for the Nation of Islam to his conversion to Sunni Islam. It also outlines Malcolm X's philosophy of black pride, black nationalism, and pan-Africanism. Haley wrote an epilogue to the book summarizing the end of Malcolm X's life, including his assassination in New York's Audubon Ballroom.
Haley ghostwrote The Autobiography of Malcolm X based on more than 50 in-depth interviews he conducted with Malcolm X between 1963 and Malcolm X's February 1965 assassination. The two men had first met in 1960 when Haley wrote an article about the Nation of Islam for Reader's Digest. They met again when Haley interviewed Malcolm X for Playboy.
The initial interviews for the autobiography frustrated Haley. Rather than discussing his own life, Malcolm X spoke about Elijah Muhammad, the leader of the Nation of Islam; he became angry about Haley's reminders that the book was supposed to be about Malcolm X. After several meetings, Haley asked Malcolm X to tell him something about his mother. That question drew Malcolm X into recounting his life story.The Autobiography of Malcolm X has been a consistent best-seller since its 1965 publication. The New York Times reported that six million copies of the book had sold by 1977. In 1998, Time magazine ranked The Autobiography of Malcolm X as one of the 10 most influential nonfiction books of the 20th century.
In 1966, Haley received the Anisfield-Wolf Book Award for The Autobiography of Malcolm X.
Super Fly T.N.T.
In 1973, Haley wrote his only screenplay, Super Fly T.N.T. The film starred and was directed by Ron O'Neal.
Roots
In 1976, Haley published Roots: The Saga of an American Family, a novel based on his family's history, going back to slavery days. It started with the story of Kunta Kinte, who was kidnapped in the Gambia in 1767 and transported to the Province of Maryland to be sold as a slave. Haley claimed to be a seventh-generation descendant of Kunta Kinte, and his work on the novel involved twelve years of research, intercontinental travel, and writing. He went to the village of Juffure, where Kunta Kinte grew up and listened to a tribal historian (griot) tell the story of Kinte's capture. Haley also traced the records of the ship, The Lord Ligonier, which he said carried his ancestor to the Americas.
Haley stated that the most emotional moment of his life occurred on September 29, 1967, when he stood at the site in Annapolis, Maryland, where his ancestor had arrived from Africa in chains exactly 200 years before. A memorial depicting Haley reading a story to young children gathered at his feet has since been erected in the center of Annapolis.Roots was eventually published in 37 languages. Haley won a special Pulitzer Prize for the work in 1977. The same year, Roots was adapted as a popular television miniseries of the same name by ABC. The serial reached a record-breaking 130 million viewers. Roots emphasized that black Americans have a long history and that not all of that history is necessarily lost, as many believed. Its popularity also sparked a greatly increased public interest in genealogy.
In 1979, ABC aired the sequel miniseries, Roots: The Next Generations, which continued the story of Kunta Kinte's descendants. It concluded with Haley's travel to Juffure. Haley was portrayed at different ages by Kristoff St. John, The Jeffersons actor Damon Evans, and Tony Award winner James Earl Jones. In 2016, History aired a remake of the original miniseries. Haley appeared briefly, portrayed by Tony Award winner Laurence Fishburne.
Haley was briefly a "writer in residence" at Hamilton College in Clinton, New York, where he began writing Roots. He enjoyed spending time at a local bistro called the Savoy in nearby Rome, where he would sometimes pass the time listening to the piano player. Today, there is a special table in honor of Haley at the Savoy, and a painting of Haley writing Roots on a yellow legal tablet.
Plagiarism lawsuits and other criticismRoots faced two lawsuits that charged plagiarism and copyright infringement. The lawsuit brought by Margaret Walker was dismissed, but Harold Courlander's suit was successful. Courlander's novel The African describes an African boy who is captured by slave traders, follows him across the Atlantic on a slave ship, and describes his attempts to hold on to his African traditions on a plantation in America. Haley admitted that some passages from The African had made it into Roots, settling the case out of court in 1978 and paying Courlander $650,000 ().
Genealogists have also disputed Haley's research and conclusions in Roots. The Gambian griot turned out not to be a real griot, and the story of Kunta Kinte appears to have been a case of circular reporting, in which Haley's own words were repeated back to him.MacDonald, Edgar. "A Twig Atop Running Water – Griot History," Virginia Genealogical Society Newsletter, July/August 1991 None of the written records in Virginia and North Carolina line up with the Roots story until after the Civil War. Some elements of Haley's family story can be found in the written records, but the most likely genealogy would be different from the one described in Roots.
Haley and his work have been excluded from the Norton Anthology of African-American Literature, despite his status as the United States' best-selling black author. Harvard University professor Dr. Henry Louis Gates, Jr., one of the anthology's general editors, has denied that the controversies surrounding Haley's works are the reason for this exclusion. In 1998, Dr. Gates acknowledged the doubts surrounding Haley's claims about Roots, saying, "Most of us feel it's highly unlikely that Alex actually found the village whence his ancestors sprang. Roots is a work of the imagination rather than strict historical scholarship."
In 2023, Jonathan Eig suggested that Haley had made a number of fabrications in his 1965 Playboy interview with Martin Luther King Jr., including embellishing his criticisms of Malcolm X.
Later life and death
Early in the 1980s, Haley worked with the Walt Disney Company to develop an Equatorial Africa pavilion for its Epcot Center theme park. Haley appeared on a CBS broadcast of Epcot Center's opening day celebration, discussing the plans and exhibiting concept art with host Danny Kaye. Ultimately, the pavilion was not built due to political and financial issues.
Late in the 1970s, Haley had begun working on a second historical novel based on another branch of his family, traced through his grandmother Queen; she was the daughter of a black slave woman and her white master.
He did not finish the novel before dying in Seattle, Washington, of a heart attack on February 10, 1992. He was buried beside his childhood home in Henning, Tennessee.
At his request, the novel was finished by David Stevens and was published as Alex Haley's Queen in 1993. Earlier the same year, it was adapted as a miniseries of the same name.
Late in Haley's life he had acquired a small farm in Clinton, Tennessee, although at the time it had a Norris, Tennessee address. The farm is a few miles from the Museum of Appalachia, and Haley lived there until his death. After he died, the property was sold to the Children's Defense Fund (CDF), which calls it the Alex Haley Farm. The nonprofit organization uses the farm as a national training center and retreat site. An abandoned barn on the farm property was rebuilt as a traditional cantilevered barn, using a design by architect Maya Lin. The building now serves as a library for the CDF.
Awards and recognition
In 1977, Haley earned The Pulitzer Prize for Roots: "The story of a black family from its origins in Africa through seven generations to the present day in America." In 1977 Haley received the Spingarn Medal from the NAACP, for his exhaustive research and literary skill combined in Roots.
In 1977, Haley received the Golden Plate Award of the American Academy of Achievement.
The food-service building at the U.S. Coast Guard Training Center, Petaluma, California, was named Haley Hall in honor of the author.
In 1999 the Coast Guard honored Haley by naming the cutter after him.
The U.S. Coast Guard annually awards the Chief Journalist Alex Haley Award, which is named in honor of the writer as the Coast Guard's first chief journalist (the first Coast Guardsman in the rating of journalist to be advanced to the rate of chief petty officer). It rewards individual authors and photographers who have had articles or photographs communicating the Coast Guard story published in internal newsletters or external publications.
In 2002 the Republic of Korea (South Korea) posthumously awarded Haley its Korean War Service Medal (created in 1951), which the U.S. government did not allow its service members to accept until 1999.
Works
The Autobiography of Malcolm X (1965), biography
Super Fly T.N.T. (1973), screenplay
Roots: The Saga of an American Family (1976), novel
Alex Haley Tells the Story of His Search for Roots (1977) – 2-LP recording of a two-hour lecture
Palmerstown, U.S.A. (1980–1981), TV series
A Different Kind of Christmas (1988), stories
Queen: The Story of an American Family (1992), novel
Alex Haley: The Playboy Interviews (1993), collection
Never Turn Back: Father Serra's Mission (Stories of America) (1993), editor, stories
Mama Flora's Family (1998), novel
Legacy
Collection of Alex Haley's personal works
The University of Tennessee Libraries, in Knoxville, Tennessee, maintains a collection of Alex Haley's personal works in its Special Collections Department. The works contain notes, outlines, bibliographies, research, and legal papers documenting Haley's Roots through 1977. Of particular interest are the items showing Harold Courlander's lawsuit against Haley, Doubleday & Company, and various affiliated groups.
Portions of Alex Haley's personal collection is also located at the African-American Research Library and Cultural Center's Special Collections and Archives in Fort Lauderdale, FL. The keeper of the Word Foundation in Detroit, Michigan maintains Alex Haley's Coast Guard notes, writings, and love letter notes that developed Haley's writings. Along with the digital unpublished Autobiography of Malcolm X and Epilogue, omitted introduction and chapters, outline, letters, handwritten notes, Haley's complete interviews of Malcolm X's, poetry and edited notes, and digital rights.
Kunta Kinte-Alex Haley Memorial
In the city dock section of Annapolis, Maryland, there is a memorial to mark the arrival location of Kunta Kinte in 1767. The monument, dedicated on June 12, 2002, also celebrates the preservation of African-American heritage and family history.
See also
Alex Haley House and Museum
References
Citations
References cited
Originally published in Essence'', November 1983.
External links
Alex Haley Roots Foundation
Alex Haley Tribute Site
Alex Haley (Open Library)
The Kunta Kinte–Alex Haley Foundation
Official Roots: 30th Anniversary Edition website
1921 births
1992 deaths
20th-century American novelists
Alcorn State University alumni
American people who self-identify as being of Cherokee descent
American people of Gambian descent
American people of Mandinka descent
American people of Scottish descent
American people of Scotch-Irish descent
American male biographers
American male journalists
20th-century American journalists
American male novelists
African-American novelists
United States Coast Guard personnel of World War II
Burials in Tennessee
People involved in plagiarism controversies
Elizabeth City State University alumni
People from Henning, Tennessee
Writers from Knoxville, Tennessee
Military personnel from New York (state)
Writers from Ithaca, New York
Pulitzer Prize winners
United States Coast Guard non-commissioned officers
Novelists from Tennessee
Malcolm X
Spingarn Medal winners
Bancarella Prize winners
Member of the Academy of the Kingdom of Morocco
African Americans in World War II
20th-century American historians
American male non-fiction writers
20th-century American biographers
Novelists from New York (state)
20th-century American male writers
African-American United States Coast Guard personnel
African Americans in the Korean War
|
is a Japanese columnist and cartoonist. Born in Tokyo to Jun'ichi Natsume, eldest son of novelist Natsume Sōseki, he attended Aoyama Gakuin University, where he graduated in 1973.
He was awarded the Tezuka Osamu Cultural Prize (Special Award) in 1999 for excellence in criticism of manga.
He has written the book (2005), which was illustrated by Fumi Yoshinaga.
References
External links
Official blog
A 2004 interview with Fusanosuke Natsume
Anime and manga critics
Aoyama Gakuin University alumni
Japanese writers
Living people
1950 births
Winner of Tezuka Osamu Cultural Prize (Special Award)
|
```python
"""
Given a string s, partition s such that every substring of the
partition is a palindrome.
Find the minimum cuts needed for a palindrome partitioning of s.
Time Complexity: O(n^2)
Space Complexity: O(n^2)
For other explanations refer to: path_to_url
"""
def find_minimum_partitions(string: str) -> int:
"""
Returns the minimum cuts needed for a palindrome partitioning of string
>>> find_minimum_partitions("aab")
1
>>> find_minimum_partitions("aaa")
0
>>> find_minimum_partitions("ababbbabbababa")
3
"""
length = len(string)
cut = [0] * length
is_palindromic = [[False for i in range(length)] for j in range(length)]
for i, c in enumerate(string):
mincut = i
for j in range(i + 1):
if c == string[j] and (i - j < 2 or is_palindromic[j + 1][i - 1]):
is_palindromic[j][i] = True
mincut = min(mincut, 0 if j == 0 else (cut[j - 1] + 1))
cut[i] = mincut
return cut[length - 1]
if __name__ == "__main__":
s = input("Enter the string: ").strip()
ans = find_minimum_partitions(s)
print(f"Minimum number of partitions required for the '{s}' is {ans}")
```
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.