text
stringlengths 1
22.8M
|
|---|
```php
<?php
declare(strict_types=1);
/**
* Passbolt ~ Open source password manager for teams
*
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @link path_to_url Passbolt(tm)
* @since 4.0.0
*/
namespace Passbolt\JwtAuthentication\Error\Exception\RefreshToken;
use Passbolt\JwtAuthentication\Error\Exception\AbstractJwtAttackException;
/**
* Exception raised when the refresh token is not associated to any user.
*/
class RefreshTokenUserIdMismatchException extends AbstractJwtAttackException
{
}
```
|
```xml
import { describe, expect, it, vi } from 'vitest';
import { awsCredentialsProvider } from '../../../src/oidc';
const getVercelOidcTokenMock = vi.fn().mockResolvedValue('token');
const fromWebTokenExectionMock = vi.fn();
const fromWebTokenMock = vi.fn().mockReturnValue(fromWebTokenExectionMock);
describe('awsCredentialsProvider', () => {
vi.mock('../../../src/oidc/get-vercel-oidc-token', () => {
return {
getVercelOidcToken: async () => getVercelOidcTokenMock(),
};
});
vi.mock('@aws-sdk/credential-provider-web-identity', () => {
return {
fromWebToken: (...args: any[]) => fromWebTokenMock(...args),
};
});
it('returns a function', () => {
expect(awsCredentialsProvider({ roleArn: 'roleArn' })).toBeInstanceOf(
Function
);
});
it('calls fromWebToken with the correct arguments', async () => {
const init = {
roleArn: 'roleArn',
roleSessionName: 'roleSessionName',
};
const fn = awsCredentialsProvider(init);
await fn();
expect(fromWebTokenMock).toHaveBeenCalledWith({
...init,
webIdentityToken: await getVercelOidcTokenMock(),
});
});
it('calls the function returned by fromWebToken', async () => {
const init = {
roleArn: 'roleArn',
roleSessionName: 'roleSessionName',
};
const fn = awsCredentialsProvider(init);
await fn();
expect(fromWebTokenExectionMock).toHaveBeenCalled();
});
});
```
|
Wood Lake Township may refer to the following townships in the United States:
Wood Lake Township, Yellow Medicine County, Minnesota
Wood Lake Township, Benson County, North Dakota
|
```scss
//
// !!! THIS FILE WAS AUTOMATICALLY GENERATED !!!
// !!! DO NOT MODIFY IT BY HAND !!!
// Design system display name: Google Material 3
// Design system version: v0.161
//
@use 'sass:map';
@use './md-sys-color';
@use './md-sys-elevation';
@use './md-sys-shape';
@use './md-sys-state';
@use './md-sys-typescale';
$_default: (
'md-sys-color': md-sys-color.values-light(),
'md-sys-elevation': md-sys-elevation.values(),
'md-sys-shape': md-sys-shape.values(),
'md-sys-state': md-sys-state.values(),
'md-sys-typescale': md-sys-typescale.values(),
);
@function values($deps: $_default, $exclude-hardcoded-values: false) {
@return (
'container-color': map.get($deps, 'md-sys-color', 'surface'),
'container-elevation': map.get($deps, 'md-sys-elevation', 'level3'),
'container-height': if($exclude-hardcoded-values, null, 456px),
'container-shape': map.get($deps, 'md-sys-shape', 'corner-large'),
'container-surface-tint-layer-color':
map.get($deps, 'md-sys-color', 'surface-tint'),
'container-width': if($exclude-hardcoded-values, null, 360px),
'date-container-height': if($exclude-hardcoded-values, null, 48px),
'date-container-shape': map.get($deps, 'md-sys-shape', 'corner-full'),
'date-container-width': if($exclude-hardcoded-values, null, 48px),
'date-focus-state-layer-opacity':
map.get($deps, 'md-sys-state', 'focus-state-layer-opacity'),
'date-hover-state-layer-opacity':
map.get($deps, 'md-sys-state', 'hover-state-layer-opacity'),
'date-label-text-font':
map.get($deps, 'md-sys-typescale', 'body-large-font'),
'date-label-text-line-height':
map.get($deps, 'md-sys-typescale', 'body-large-line-height'),
'date-label-text-size':
map.get($deps, 'md-sys-typescale', 'body-large-size'),
'date-label-text-tracking':
map.get($deps, 'md-sys-typescale', 'body-large-tracking'),
'date-label-text-type':
if(
$exclude-hardcoded-values,
null,
/** Warning: risk of reduced fidelity from using this composite typography token. Tokens md.comp.date-picker.docked.date.label-text.tracking cannot be represented in the "font" property shorthand. Consider using the discrete properties instead. */
map.get($deps, 'md-sys-typescale', 'body-large-weight')
map.get($deps, 'md-sys-typescale', 'body-large-size') #{'/'} map.get(
$deps,
'md-sys-typescale',
'body-large-line-height'
) map.get($deps, 'md-sys-typescale', 'body-large-font')
),
'date-label-text-weight':
map.get($deps, 'md-sys-typescale', 'body-large-weight'),
'date-pressed-state-layer-opacity':
map.get($deps, 'md-sys-state', 'pressed-state-layer-opacity'),
'date-selected-container-color': map.get($deps, 'md-sys-color', 'primary'),
'date-selected-focus-state-layer-color':
map.get($deps, 'md-sys-color', 'on-primary'),
'date-selected-hover-state-layer-color':
map.get($deps, 'md-sys-color', 'on-primary'),
'date-selected-label-text-color':
map.get($deps, 'md-sys-color', 'on-primary'),
'date-selected-pressed-state-layer-color':
map.get($deps, 'md-sys-color', 'on-primary'),
'date-state-layer-height': if($exclude-hardcoded-values, null, 40px),
'date-state-layer-shape': map.get($deps, 'md-sys-shape', 'corner-full'),
'date-state-layer-width': if($exclude-hardcoded-values, null, 40px),
'date-today-container-outline-color':
map.get($deps, 'md-sys-color', 'primary'),
'date-today-container-outline-width':
if($exclude-hardcoded-values, null, 1px),
'date-today-focus-state-layer-color':
map.get($deps, 'md-sys-color', 'primary'),
'date-today-hover-state-layer-color':
map.get($deps, 'md-sys-color', 'primary'),
'date-today-label-text-color': map.get($deps, 'md-sys-color', 'primary'),
'date-today-pressed-state-layer-color':
map.get($deps, 'md-sys-color', 'primary'),
'date-unselected-focus-state-layer-color':
map.get($deps, 'md-sys-color', 'on-surface-variant'),
'date-unselected-hover-state-layer-color':
map.get($deps, 'md-sys-color', 'on-surface-variant'),
'date-unselected-label-text-color':
map.get($deps, 'md-sys-color', 'on-surface'),
'date-unselected-outside-month-label-text-color':
map.get($deps, 'md-sys-color', 'on-surface-variant'),
'date-unselected-pressed-state-layer-color':
map.get($deps, 'md-sys-color', 'on-surface-variant'),
'header-height': if($exclude-hardcoded-values, null, 64px),
'menu-button-container-height': if($exclude-hardcoded-values, null, 40px),
'menu-button-container-shape': map.get($deps, 'md-sys-shape', 'corner-full'),
'menu-button-disabled-icon-color':
map.get($deps, 'md-sys-color', 'on-surface'),
'menu-button-disabled-icon-opacity':
if($exclude-hardcoded-values, null, 0.38),
'menu-button-disabled-label-text-color':
map.get($deps, 'md-sys-color', 'on-surface'),
'menu-button-disabled-label-text-opacity':
if($exclude-hardcoded-values, null, 0.38),
'menu-button-focus-icon-color':
map.get($deps, 'md-sys-color', 'on-surface-variant'),
'menu-button-focus-label-text-color':
map.get($deps, 'md-sys-color', 'on-surface-variant'),
'menu-button-focus-state-layer-color':
map.get($deps, 'md-sys-color', 'on-surface-variant'),
'menu-button-focus-state-layer-opacity':
map.get($deps, 'md-sys-state', 'focus-state-layer-opacity'),
'menu-button-hover-icon-color':
map.get($deps, 'md-sys-color', 'on-surface-variant'),
'menu-button-hover-label-text-color':
map.get($deps, 'md-sys-color', 'on-surface-variant'),
'menu-button-hover-state-layer-color':
map.get($deps, 'md-sys-color', 'on-surface-variant'),
'menu-button-hover-state-layer-opacity':
map.get($deps, 'md-sys-state', 'hover-state-layer-opacity'),
'menu-button-icon-color':
map.get($deps, 'md-sys-color', 'on-surface-variant'),
'menu-button-icon-size': if($exclude-hardcoded-values, null, 18px),
'menu-button-label-text-color':
map.get($deps, 'md-sys-color', 'on-surface-variant'),
'menu-button-label-text-font':
map.get($deps, 'md-sys-typescale', 'label-large-font'),
'menu-button-label-text-line-height':
map.get($deps, 'md-sys-typescale', 'label-large-line-height'),
'menu-button-label-text-size':
map.get($deps, 'md-sys-typescale', 'label-large-size'),
'menu-button-label-text-tracking':
map.get($deps, 'md-sys-typescale', 'label-large-tracking'),
'menu-button-label-text-type':
if(
$exclude-hardcoded-values,
null,
/** Warning: risk of reduced fidelity from using this composite typography token. Tokens md.comp.date-picker.docked.menu-button.label-text.tracking cannot be represented in the "font" property shorthand. Consider using the discrete properties instead. */
map.get($deps, 'md-sys-typescale', 'label-large-weight')
map.get($deps, 'md-sys-typescale', 'label-large-size') #{'/'} map.get(
$deps,
'md-sys-typescale',
'label-large-line-height'
) map.get($deps, 'md-sys-typescale', 'label-large-font')
),
'menu-button-label-text-weight':
map.get($deps, 'md-sys-typescale', 'label-large-weight'),
'menu-button-pressed-icon-color':
map.get($deps, 'md-sys-color', 'on-surface-variant'),
'menu-button-pressed-label-text-color':
map.get($deps, 'md-sys-color', 'on-surface-variant'),
'menu-button-pressed-state-layer-color':
map.get($deps, 'md-sys-color', 'on-surface-variant'),
'menu-button-pressed-state-layer-opacity':
map.get($deps, 'md-sys-state', 'pressed-state-layer-opacity'),
'menu-list-item-container-height': if($exclude-hardcoded-values, null, 48px),
'menu-list-item-focus-label-text-color':
map.get($deps, 'md-sys-color', 'on-surface'),
'menu-list-item-focus-state-layer-color':
map.get($deps, 'md-sys-color', 'on-surface'),
'menu-list-item-focus-state-layer-opacity':
map.get($deps, 'md-sys-state', 'focus-state-layer-opacity'),
'menu-list-item-hover-label-text-color':
map.get($deps, 'md-sys-color', 'on-surface'),
'menu-list-item-hover-state-layer-color':
map.get($deps, 'md-sys-color', 'on-surface'),
'menu-list-item-hover-state-layer-opacity':
map.get($deps, 'md-sys-state', 'hover-state-layer-opacity'),
'menu-list-item-label-text-color':
map.get($deps, 'md-sys-color', 'on-surface'),
'menu-list-item-label-text-font':
map.get($deps, 'md-sys-typescale', 'body-large-font'),
'menu-list-item-label-text-line-height':
map.get($deps, 'md-sys-typescale', 'body-large-line-height'),
'menu-list-item-label-text-size':
map.get($deps, 'md-sys-typescale', 'body-large-size'),
'menu-list-item-label-text-tracking':
map.get($deps, 'md-sys-typescale', 'body-large-tracking'),
'menu-list-item-label-text-type':
if(
$exclude-hardcoded-values,
null,
/** Warning: risk of reduced fidelity from using this composite typography token. Tokens md.comp.date-picker.docked.menu.list-item.label-text.tracking cannot be represented in the "font" property shorthand. Consider using the discrete properties instead. */
map.get($deps, 'md-sys-typescale', 'body-large-weight')
map.get($deps, 'md-sys-typescale', 'body-large-size') #{'/'} map.get(
$deps,
'md-sys-typescale',
'body-large-line-height'
) map.get($deps, 'md-sys-typescale', 'body-large-font')
),
'menu-list-item-label-text-weight':
map.get($deps, 'md-sys-typescale', 'body-large-weight'),
'menu-list-item-pressed-label-text-color':
map.get($deps, 'md-sys-color', 'on-surface'),
'menu-list-item-pressed-state-layer-color':
map.get($deps, 'md-sys-color', 'on-surface'),
'menu-list-item-pressed-state-layer-opacity':
map.get($deps, 'md-sys-state', 'pressed-state-layer-opacity'),
'menu-list-item-selected-container-color':
map.get($deps, 'md-sys-color', 'surface-variant'),
'menu-list-item-selected-focus-leading-icon-color':
map.get($deps, 'md-sys-color', 'on-surface-variant'),
'menu-list-item-selected-hover-leading-icon-color':
map.get($deps, 'md-sys-color', 'on-surface-variant'),
'menu-list-item-selected-leading-icon-color':
map.get($deps, 'md-sys-color', 'on-surface'),
'menu-list-item-selected-leading-icon-size':
if($exclude-hardcoded-values, null, 24px),
'menu-list-item-selected-pressed-leading-icon-color':
map.get($deps, 'md-sys-color', 'on-surface-variant'),
'weekdays-label-text-color': map.get($deps, 'md-sys-color', 'on-surface'),
'weekdays-label-text-font':
map.get($deps, 'md-sys-typescale', 'body-large-font'),
'weekdays-label-text-line-height':
map.get($deps, 'md-sys-typescale', 'body-large-line-height'),
'weekdays-label-text-size':
map.get($deps, 'md-sys-typescale', 'body-large-size'),
'weekdays-label-text-tracking':
map.get($deps, 'md-sys-typescale', 'body-large-tracking'),
'weekdays-label-text-type':
if(
$exclude-hardcoded-values,
null,
/** Warning: risk of reduced fidelity from using this composite typography token. Tokens md.comp.date-picker.docked.weekdays.label-text.tracking cannot be represented in the "font" property shorthand. Consider using the discrete properties instead. */
map.get($deps, 'md-sys-typescale', 'body-large-weight')
map.get($deps, 'md-sys-typescale', 'body-large-size') #{'/'} map.get(
$deps,
'md-sys-typescale',
'body-large-line-height'
) map.get($deps, 'md-sys-typescale', 'body-large-font')
),
'weekdays-label-text-weight':
map.get($deps, 'md-sys-typescale', 'body-large-weight')
);
}
```
|
```c
#include "sensors.h"
/* ADC handle declaration */
ADC_HandleTypeDef AdcHandle;
/* Sensors data */
Quaternion quaternion;
bool isPhotoDiodesInitialized = false;
bool isSensorsInitialized = false;
/* Robot positioning variables */
RingBuffer positionBitBuffer[NB_PHOTODIODES];
Position photoDiodesPositions[NB_PHOTODIODES];
Position robotPosition;
float robotAngle;
bool firstBitEver[NB_PHOTODIODES];
bool readyToUpdate0 = false;
bool readyToUpdate1 = false;
volatile bool batteryLevelReady = false;
OrientationVec orientation;
uint8_t currentTouch = 0;
bool blinded = false;
bool tapped = false;
bool doubleTapped = false;
bool shaken = false;
bool caseId0 = false;
bool caseId1 = false;
uint32_t batteryLevel;
/*============================================================================
Name : initSensors
your_sha256_hash--------------
Purpose : initializes the sensors, with the I2C bus first, then the QT1070
touch sensor and finally the IMU
Input :
Output : none
Return :
Notes :
============================================================================*/
bool initSensors()
{
GPIO_InitTypeDef GPIO_InitStructure;
/* Configure the INT pins */
GPIO_InitStructure.Mode = GPIO_MODE_IT_FALLING;
GPIO_InitStructure.Pull = GPIO_NOPULL;
GPIO_InitStructure.Speed = GPIO_SPEED_HIGH;
GPIO_InitStructure.Pin = TOUCH_CHANGE_PIN;
HAL_GPIO_Init(TOUCH_CHANGE_GPIO_PORT, &GPIO_InitStructure);
GPIO_InitStructure.Mode = GPIO_MODE_IT_RISING_FALLING;
GPIO_InitStructure.Pin = CHARGING_STATUS_PIN;
HAL_GPIO_Init(CHARGING_STATUS_GPIO_PORT, &GPIO_InitStructure);
GPIO_InitStructure.Mode = GPIO_MODE_IT_RISING;
GPIO_InitStructure.Pin = IMU_INT_PIN;
HAL_GPIO_Init(IMU_INT_GPIO_PORT, &GPIO_InitStructure);
HAL_NVIC_SetPriority(TOUCH_CHANGE_IRQn, TOUCH_CHANGE_IRQ_PRIORITY, 0);
HAL_NVIC_EnableIRQ(TOUCH_CHANGE_IRQn);
HAL_NVIC_SetPriority(CHARGING_STATUS_IRQn, CHARGING_STATUS_IRQ_PRIORITY, 0);
HAL_NVIC_EnableIRQ(CHARGING_STATUS_IRQn);
HAL_NVIC_SetPriority(IMU_INT_IRQn, IMU_INT_IRQ_PRIORITY, 0);
HAL_NVIC_EnableIRQ(IMU_INT_IRQn);
orientation.x = orientation.y = orientation.z = 1;
quaternion.w = 1.0f;
quaternion.x = quaternion.y = quaternion.z = 0.0f;
robotPosition.x = robotPosition.y = 500;
robotAngle = 0.0f;
initBatteryMonitor();
initPhotoDiodes();
if (I2CInit())
{
HAL_Delay(200);
isSensorsInitialized = initImu() & initTouch();
}
if(isSensorsInitialized)
updateMotionInformation();
initCaseReader();
return isSensorsInitialized;
}
/*============================================================================
Name : initPhotoDiodes
your_sha256_hash--------------
Purpose : initializes the two photodiodes, by configuring first the pins
Input :
Output : none
Return :
Notes :
============================================================================*/
void initPhotoDiodes()
{
GPIO_InitTypeDef GPIO_InitStructure;
PHOTODIODE_1_GPIO_CLK_ENABLE();
PHOTODIODE_2_GPIO_CLK_ENABLE();
/* Configure the GPIO pin */
GPIO_InitStructure.Mode = GPIO_MODE_IT_RISING_FALLING;
GPIO_InitStructure.Pull = GPIO_PULLUP;
GPIO_InitStructure.Speed = GPIO_SPEED_HIGH;
GPIO_InitStructure.Pin = PHOTODIODE_1_PIN;
HAL_GPIO_Init(PHOTODIODE_1_GPIO_PORT, &GPIO_InitStructure);
HAL_NVIC_SetPriority(PHOTODIODE_1_IRQn, PHOTODIODE_1_IRQ_PRIORITY, 0);
GPIO_InitStructure.Pin = PHOTODIODE_2_PIN;
HAL_GPIO_Init(PHOTODIODE_2_GPIO_PORT, &GPIO_InitStructure);
HAL_NVIC_SetPriority(PHOTODIODE_2_IRQn, PHOTODIODE_2_IRQ_PRIORITY, 0);
for (uint8_t i = 0; i < NB_PHOTODIODES; i++)
{
firstBitEver[i] = true;
RingBuffer_init(&positionBitBuffer[i]);
}
isPhotoDiodesInitialized = true;
HAL_NVIC_EnableIRQ(PHOTODIODE_1_IRQn);
HAL_NVIC_EnableIRQ(PHOTODIODE_2_IRQn);
}
/*============================================================================
Name : initBatteryMonitor
your_sha256_hash--------------
Purpose : returns the current orienation of the robot
Input :
Output :
Return :
Notes :
============================================================================*/
void initBatteryMonitor()
{
/* ADC channel configuration structure declaration */
ADC_ChannelConfTypeDef sConfig;
/* ### - 1 - Initialize ADC peripheral #################################### */
/*
* Instance = ADC1.
* ClockPrescaler = PCLK divided by 4.
* LowPowerAutoWait = Disabled
* LowPowerAutoPowerOff = Disabled
* Resolution = 12 bit (increased to 16 bit with oversampler)
* ScanConvMode = ADC_SCAN_ENABLE
* DataAlign = Right
* ContinuousConvMode = Enabled
* DiscontinuousConvMode = Enabled
* ExternalTrigConv = ADC_SOFTWARE_START
* ExternalTrigConvEdge = None (Software start)
* EOCSelection = End Of Conversion event
* DMAContinuousRequests = ENABLE
*/
AdcHandle.Instance = ADC1;
AdcHandle.Init.ClockPrescaler = ADC_CLOCK_SYNC_PCLK_DIV4;
AdcHandle.Init.LowPowerAutoWait = DISABLE;
AdcHandle.Init.LowPowerAutoPowerOff = DISABLE;
AdcHandle.Init.Resolution = ADC_RESOLUTION_10B;
AdcHandle.Init.ScanConvMode = ADC_SCAN_ENABLE;
AdcHandle.Init.DataAlign = ADC_DATAALIGN_RIGHT;
AdcHandle.Init.ContinuousConvMode = DISABLE;
AdcHandle.Init.DiscontinuousConvMode = DISABLE;
AdcHandle.Init.ExternalTrigConv = ADC_SOFTWARE_START;
AdcHandle.Init.ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_NONE;
AdcHandle.Init.EOCSelection = ADC_EOC_SINGLE_CONV;
AdcHandle.Init.DMAContinuousRequests = DISABLE;
AdcHandle.Init.Overrun = ADC_OVR_DATA_OVERWRITTEN;
/* Initialize ADC peripheral according to the passed parameters */
if (HAL_ADC_Init(&AdcHandle) != HAL_OK)
{
Error_Handler();
}
/* ### - 2 - Start calibration ############################################ */
if (HAL_ADCEx_Calibration_Start(&AdcHandle) != HAL_OK)
{
Error_Handler();
}
/* ### - 3 - Channel configuration ######################################## */
/* Select Channel 0 to be converted */
sConfig.Channel = ADC_CHANNEL_VBAT;
sConfig.Rank = ADC_RANK_NONE; //ADC_RANK_CHANNEL_NUMBER;
sConfig.SamplingTime = ADC_SAMPLETIME_239CYCLES_5;
if (HAL_ADC_ConfigChannel(&AdcHandle, &sConfig) != HAL_OK)
{
Error_Handler();
}
}
/*============================================================================
Name : readPhotoDiodes
your_sha256_hash--------------
Purpose : reads the two photodiodes
Input :
Output : none
Return :
Notes :
============================================================================*/
void readPhotoDiode(uint8_t photodiodeId)
{
static uint64_t previousTime[NB_PHOTODIODES] = {0};
uint8_t value = 0;
uint64_t currentTime = 0;
uint64_t period = 0;
uint32_t nbBits = 0;
if (isPhotoDiodesInitialized)
{
if (firstBitEver[photodiodeId] == false)
{
currentTime = getMicroSeconds();
period = currentTime - previousTime[photodiodeId];
nbBits = period / BIT_DURATION;
previousTime[photodiodeId] = currentTime;
// if remainder is greater than half of BIT_DURATION, increase n by 1
if (period % BIT_DURATION > BIT_DURATION / 2)
nbBits++;
// get the negative as it represents the previous state
if (photodiodeId == 0)
value = !HAL_GPIO_ReadPin(PHOTODIODE_1_GPIO_PORT, PHOTODIODE_1_PIN);
else if (photodiodeId == 1)
value = !HAL_GPIO_ReadPin(PHOTODIODE_2_GPIO_PORT, PHOTODIODE_2_PIN);
//save bits, even if the pattern is all black, all white or white bits before the end pattern
//otherwise it means it didn't see the pattern properly so discard the bits
if (nbBits <= 2 * SIZEOF_END)
{
for (uint8_t i = 0; i < nbBits; i++)
RingBuffer_push(&positionBitBuffer[photodiodeId], value);
}
}
else
{
previousTime[photodiodeId] = getMicroSeconds();
firstBitEver[photodiodeId] = false;
}
}
}
/*============================================================================
Name : calculatePhotodiodePosition
your_sha256_hash--------------
Purpose : Calculate the row and column for one photodiode
Input : photodiodeId : id of the photodiode
Output :
Return : bool : if new position has been calculated
Notes :
============================================================================*/
bool calculatePhotodiodePosition(uint8_t photodiodeId)
{
/* Read PRIMASK register, check interrupt status before you disable them */
/* Returns 0 if they are enabled, or non-zero if disabled */
uint32_t prim = __get_PRIMASK();
bool result = false;
bool endFound = true;
if (RingBuffer_get(&positionBitBuffer[photodiodeId], 0) == BLACK)
{
for (uint8_t i = 0; i < SIZEOF_END; i++)
{
if (RingBuffer_get(&positionBitBuffer[photodiodeId], i + SIZEOF_START + SIZEOF_COLUMN + SIZEOF_ROW) != WHITE)
{
endFound = false;
break;
}
}
if (endFound)
{
__disable_irq();
//decode gray code for x
uint16_t grayTmp = RingBuffer_get(&positionBitBuffer[photodiodeId], SIZEOF_START);
photoDiodesPositions[photodiodeId].x = (uint16_t)((uint16_t)grayTmp << (SIZEOF_COLUMN - 1));
for (uint8_t i = 1 + SIZEOF_START; i <= SIZEOF_COLUMN; i++)
{
grayTmp = grayTmp ^ RingBuffer_get(&positionBitBuffer[photodiodeId], i);
photoDiodesPositions[photodiodeId].x += (uint16_t)((uint16_t)grayTmp << (SIZEOF_COLUMN - i));
}
//decode gray code for y
grayTmp = RingBuffer_get(&positionBitBuffer[photodiodeId], SIZEOF_START + SIZEOF_COLUMN);
photoDiodesPositions[photodiodeId].y = (uint16_t)((uint16_t)grayTmp << (SIZEOF_ROW - 1));
for (uint8_t i = 1 + SIZEOF_START + SIZEOF_COLUMN; i <= SIZEOF_COLUMN + SIZEOF_ROW; i++)
{
grayTmp = grayTmp ^ RingBuffer_get(&positionBitBuffer[photodiodeId], i);
photoDiodesPositions[photodiodeId].y += (uint16_t)((uint16_t)grayTmp << (SIZEOF_COLUMN + SIZEOF_ROW - i));
}
RingBuffer_erase(&positionBitBuffer[photodiodeId], SIZEOF_PATTERN);
if (!prim)
__enable_irq();
return true;
}
else
RingBuffer_pop(&positionBitBuffer[photodiodeId]);
}
else
RingBuffer_pop(&positionBitBuffer[photodiodeId]);
return false;
}
/*============================================================================
Name : updateRobotPosition
your_sha256_hash--------------
Purpose : Updates the positioning information from the photodiodes' readings
Input :
Output :
Return :
Notes :
============================================================================*/
bool updateRobotPosition()
{
static uint32_t lastPositionTimestamp = 0;
if (positionBitBuffer[0].count >= SIZEOF_PATTERN)
readyToUpdate0 = calculatePhotodiodePosition(0);
if (positionBitBuffer[1].count >= SIZEOF_PATTERN)
readyToUpdate1 = calculatePhotodiodePosition(1);
//if all photodiodes have decoded their patterns
if (readyToUpdate0 == true && readyToUpdate1 == true)
{
lastPositionTimestamp = HAL_GetTick();
robotPosition.x = (photoDiodesPositions[1].x + photoDiodesPositions[0].x) / 2;
robotPosition.y = (photoDiodesPositions[1].y + photoDiodesPositions[0].y) / 2;
robotAngle = atan2f((float)(photoDiodesPositions[1].y - photoDiodesPositions[0].y), (float)(photoDiodesPositions[1].x - photoDiodesPositions[0].x)) * RAD_TO_DEG_CST + 90.0f;
if(robotAngle > 180.0f)
robotAngle -= 360.0f;
readyToUpdate0 = false;
readyToUpdate1 = false;
blinded = false;
return true;
}
// no new position for a while then stop
else if(HAL_GetTick()-lastPositionTimestamp > 100)
blinded = true;
return false;
}
/*============================================================================
Name : getRobotPosition
your_sha256_hash--------------
Purpose : returns the current position of the robot
Input :
Output :
Return :
Notes :
============================================================================*/
Position *getRobotPosition()
{
return &robotPosition;
}
/*============================================================================
Name : getRobotAngle
your_sha256_hash--------------
Purpose : returns the current orienation of the robot
Input :
Output :
Return :
Notes :
============================================================================*/
float *getRobotAngle()
{
return &robotAngle;
}
/*============================================================================
Name : startReadBatteryLevel
your_sha256_hash--------------
Purpose : returns the current orienation of the robot
Input :
Output :
Return :
Notes :
============================================================================*/
void startReadBatteryLevel()
{
/* ### - 4 - Start conversion in DMA mode ################################# */
if (isSensorsInitialized)
{
if (HAL_ADC_Start_DMA(&AdcHandle, &batteryLevel, 1) != HAL_OK)
{
Error_Handler();
}
}
}
/*============================================================================
Name : getBatteryLevel
your_sha256_hash--------------
Purpose : returns the current orienation of the robot
Input :
Output :
Return :
Notes :
============================================================================*/
uint8_t getBatteryLevel()
{
if(batteryLevelReady && DEBUG_ENABLED())
{
debug_printf("%d\n", batteryLevel);
batteryLevelReady = false;
}
batteryLevelReady = false;
return (batteryLevel < 530) ? 0 : 100;
}
/*============================================================================
Name : isCharging
your_sha256_hash--------------
Purpose : returns the current orienation of the robot
Input :
Output :
Return :
Notes :
============================================================================*/
bool isCharging()
{
return (HAL_GPIO_ReadPin(CHARGING_STATUS_GPIO_PORT, CHARGING_STATUS_PIN) == LOW) ? true : false;
}
/*============================================================================
Name : updateMotionInformation
your_sha256_hash--------------
Purpose : as the IMU has triggered an interrupt, fetch the source and
process the data accordingly
Input :
Output :
Return :
Notes :
============================================================================*/
void updateMotionInformation()
{
updateTap();
updateOrientation();
}
/*============================================================================
Name : getInteractionState
your_sha256_hash--------------
Purpose : compile all the interactions into one bitmap:
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
--------------------------------------------------------
| - | - | - | Shaken | DoubleTap | Tap | Blind | Touch |
Input :
Output :
Return : a bitmap containing the state for each interaction
Notes :
============================================================================*/
uint8_t getInteractionState()
{
uint8_t state = 0;
if(currentTouch > 0) state |= 1;
if(blinded) state |= 2;
if(tapped) state |= 4;
if(doubleTapped) state |= 8;
if(shaken) state |= 16;
if(caseId0) state |= 32;
if(caseId1) state |= 64;
return state;
}
/*============================================================================
Name : isBlinded
your_sha256_hash--------------
Purpose : indicates if the robot is blinded
Input :
Output :
Return : boolean: true if blinded, false otherwise
Notes :
============================================================================*/
bool isBlinded()
{
return blinded;
}
/*============================================================================
Name : isTouched
your_sha256_hash--------------
Purpose : indicates if the robot is touched or not
Input :
Output :
Return : boolean: true for touched, false for untouched
Notes :
============================================================================*/
bool isTouched()
{
return (currentTouch>0);
}
/*============================================================================
Name : updateTouch
your_sha256_hash--------------
Purpose : fetches the new touch status
Input :
Output :
Return : return true if the sensor has not pulled down the interrupt
Notes :
============================================================================*/
bool updateTouch()
{
currentTouch = readTouchKeyStatus();
if(HAL_GPIO_ReadPin(TOUCH_CHANGE_GPIO_PORT, TOUCH_CHANGE_PIN) == HIGH)
return true;
else
return false;
}
/*============================================================================
Name : updateOrientation
your_sha256_hash--------------
Purpose : acquires the last IMU measurements and updates the quaternion
Input : interrupt source from
Output : none
Return :
Notes :
============================================================================*/
void updateOrientation()
{
// MotionData m;
// uint32_t currentTimestep = 0;
// uint32_t previousTimestamp = 0;
//
// uint32_t currentTimestamp = HAL_GetTick();
//
// currentTimestep = currentTimestamp - previousTimestamp;
// getMotionT(&m);
// MadgwickAHRSupdateIMU(&quaternion, m.gx, m.gy, m.gz, m.ax, m.ay, m.az, currentTimestep);
// previousTimestamp = currentTimestamp;
uint8_t interruptSrc = getD6DSource();
if(interruptSrc != 0xff)
{
if(interruptSrc & LSM6DS3_INT_FLAG_XH) orientation.x = 1;
if(interruptSrc & LSM6DS3_INT_FLAG_XL) orientation.x = -1;
if(interruptSrc & LSM6DS3_INT_FLAG_YH) orientation.y = 1;
if(interruptSrc & LSM6DS3_INT_FLAG_YL) orientation.y = -1;
if(interruptSrc & LSM6DS3_INT_FLAG_ZH) orientation.z = 1;
if(interruptSrc & LSM6DS3_INT_FLAG_ZL) orientation.z = -1;
}
}
/*============================================================================
Name : updateTap
your_sha256_hash--------------
Purpose : acquires the last IMU measurements and updates the quaternion
Input : none
Output : none
Return :
Notes :
============================================================================*/
void updateTap()
{
uint8_t interruptSrc = getTapSource();
if(interruptSrc != 0xff)
{
if(interruptSrc & LSM6DS3_INT_FLAG_SINGLE_TAP)
{
tapped = true;
}
if(interruptSrc & LSM6DS3_INT_FLAG_DOUBLE_TAP)
{
doubleTapped = true;
}
}
}
void initCaseReader()
{
GPIO_InitTypeDef GPIO_InitStructure;
CASE_SEL_0_GPIO_CLK_ENABLE();
GPIO_InitStructure.Mode = GPIO_MODE_INPUT;
GPIO_InitStructure.Pull = GPIO_PULLDOWN;
GPIO_InitStructure.Speed = GPIO_SPEED_HIGH;
GPIO_InitStructure.Pin = CASE_SEL_0_PIN;
HAL_GPIO_Init(CASE_SEL_0_GPIO_PORT, &GPIO_InitStructure);
CASE_SEL_1_GPIO_CLK_ENABLE();
GPIO_InitStructure.Mode = GPIO_MODE_INPUT;
GPIO_InitStructure.Pull = GPIO_PULLDOWN;
GPIO_InitStructure.Speed = GPIO_SPEED_HIGH;
GPIO_InitStructure.Pin = CASE_SEL_1_PIN;
HAL_GPIO_Init(CASE_SEL_1_GPIO_PORT, &GPIO_InitStructure);
}
uint8_t readCaseId()
{
uint8_t caseId = 0;
if(HAL_GPIO_ReadPin(CASE_SEL_0_GPIO_PORT, CASE_SEL_0_PIN) == HIGH) {
caseId += 1;
caseId0 = true;
}
else
caseId0 = false;
if(HAL_GPIO_ReadPin(CASE_SEL_1_GPIO_PORT, CASE_SEL_1_PIN) == HIGH){
caseId += 2;
caseId1 = true;
}
else
caseId1 = false;
return caseId;
}
```
|
Grand Prix motorcycle racing sponsorship liveries have been used since the late 1960s, replacing the previously used national colours. With sponsors becoming more important with the rising costs in the motorcycle CC classes, many teams wanted to be able to display the logos of their sponsors as clearly as possible.
The liveries are usually changed for every season in the sport, marking the marketing ideas of the sponsors. Some teams keep some consistency over the years however, like the red colour of Ducati, which has its origin in a shade of red known as rosso corsa being the national racing colour of Italy. Tobacco and alcohol advertising was common in motorsport, however as bans spread throughout the world, teams used an alternate livery which alluded to the tobacco or alcohol sponsor, or entirely eliminated their name when in nations with a ban – this is now only seen on Ducati's Marlboro sponsored vehicles – where the sponsor is technically banned from advertising in all host nations. At historical events, bikes are allowed to use the livery which was used when the bike was actively competing.
SKY VR46 MotoGP
The SKY Racing Team VR46 is a motorcycle racing team owned by Valentino Rossi and based in Tavullia (Marche, Italy). The team enters Grand Prix motorcycle racing in the Moto2 category with Kalex chassis and previously in Moto3 category with KTM RC250GP motorcycles. The team manager is the former road racer Pablo Nieto. The team has collected 24 wins (9 in Moto3 and 15 in Moto2) and one riders' championship (with Bagnaia in 2018). Expanded to MotoGP in 2021 with Esponsorama Racing
Ángel Nieto Team
Ángel Nieto Team (formerly Aspar Racing Team) is a Grand Prix motorcycle racing team from Spain, currently competing in the MotoGP and Moto3 World Championships.
In the 2010 season the Aspar team entered the MotoGP class with Héctor Barberá, who finished in twelfth place aboard a Ducati Desmosedici GP10. Simón finished in second place in the inaugural Moto2 campaign, with teammate Mike Di Meglio finishing in twentieth place. Both riders started the season on Honda-powered RSV Motors frames, switching to a Suter chassis after two races. Nicolás Terol finished in second place in the 125cc class while his teammate Bradley Smith finished fourth, both riding Aprilia RSA 125 motorcycles.
Barberá remained with the team for 2011, recording a best result of 6th at the Spanish Grand Prix. The team expanded to two bikes in 2012, switching from Ducati to ART. Aleix Espargaró and Randy de Puniet dominated the recently created CRT (Claiming Rule Teams) class for two straight years. In 2014, Aspar entered two Honda bikes, after hiring former World Champion Nicky Hayden to partner Hiroshi Aoyama. The duo scored points regularly, but Espargaró claimed a 3rd straight title in the CRT class with Forward Racing. Irishman Eugene Laverty joined the team in 2015, the last year for Hayden in the World Championship before switching to the Superbike World Championship.
Before the 2018 season began, the team changed their name from Aspar Racing Team to Ángel Nieto Team, as a tribute by former team principal Jorge Fernandez to his former compatriot Ángel Nieto. The team also announced Ángel's son Gelete as the new team principal.
MotoGP
Aprilia
Despite being a relatively small company by global motorcycling standards, Aprilia is very active in motorcycle sports. It contested many Road Racing formulae, including the now-defunct 125, 250 and 500cc Grand Prix classes of the FIM World Championship. From 2002 to 2004 they participated in the FIM MotoGP World Championship, and from 1999 to 2002 they participated in the FIM Superbike World Championship. Aprilia has returned to World Superbike since the 2009 season and in MotoGP since the 2012 season.
Aprilia made their international racing debut in the Motocross World Championship competing in the 125cc class from 1976 until 1981 with a best result being a fifth place in the 1979 season with rider Corrado Maddi. The firm then focused on the Grand Prix road racing world championships in 1985 and since then it has seen varying successes. Aprilia won their first world championship race at the 1991 Czechoslovak motorcycle Grand Prix with rider Alessandro Gramigni winning the 125cc race. In 1992 they won their first road racing world championship with Gramigni winning the 125cc class. They continued to be successful in the smaller displacement categories, winning numerous races and championships in the 125 and 250cc Grand Prix classes.
However, their 500 cc Grand Prix bikes failed to attain the same success. They began campaigning in the 500cc class in 1994 with a 250 V twin motor enlarged to 380cc in hopes of using its lighter weight and nimble handling as an advantage against the heavier, V4 engine bikes used by the competition. The bike eventually displaced 430cc and had its best result with a third place by rider Doriano Romboni at the 1997 Dutch TT but, could never overcome power disadvantage during the starting line sprint and was withdrawn at the end of the 1997 season for further development. Their first MotoGP effort, dubbed the Aprilia RS Cube, was technically advanced but difficult to ride and performed poorly in the championship. The Cube did, however, pioneer many advanced technologies including ride by wire throttle and pneumatic valve actuation systems. Aprilia left the MotoGP class at the end of 2004 and then left the lower classes when two-stroke engines were banned. Aprilia set the record for the most points earned by a manufacturer in a single season from the 125cc class with 410 points in 2007. It was also the highest points earned by a constructor in Grand Prix motorcycle racing's history until 2011 when 420 points were won by the same bikes winning 16 out of 17 races.
Aprilia rejoined the MotoGP class in 2012, taking advantage of the newly introduced Claiming Rule Team category that encouraged independent teams with lower budgets to use bikes from manufacturers not officially involved in MotoGP. Aprilia supplied RSV4 SBK-derived bikes under the ART (Aprilia Racing Technology) name to Aspar, Paul Bird Motorsport and Speed Master teams. In both the 2012 and 2013 seasons Aprilia's ART machinery stood out as the best CRT bikes.
For 2015 Aprilia returned to the world championship with a factory effort.
500cc/MotoGP
Avintia Racing
Avintia Racing is a motorcycle racing team currently competing in the MotoGP World Championship.
In 2012 the team changed its name to Avintia Racing, following an alliance between BQR and the Grupo Avintia. The team debuted in the MotoGP class as a Claiming Rule Team using both FTR Moto and Inmotec frames badged as BQR, powered by Kawasaki engines. The riders were Iván Silva and Yonny Hernández. In 2013 Avintia entered the MotoGP class with Kawasaki-engined FTR frames, fielding two bikes for Hiroshi Aoyama and Héctor Barberá.
For the 2014 season Aoyama was replaced by Mike Di Meglio and the team fielded a new bike badged as the Avintia GP14, reportedly based on the 2007-2009 Kawasaki Ninja ZX-RR with some input from Kawasaki. Following a mid-season agreement between Avintia and Ducati, Barberá received an Open-specification Ducati Desmosedici for the last five rounds.
In 2015 the team entered two Open class Desmosedici GP14 motorcycles, for Barberá and Di Meglio. For 2016 Di Meglio was replaced by Loris Baz. In 2017 the team changed its name to Reale Esponsorama Racing.
MotoGP
Cagiva
At the end of the 1970s, Cagiva began campaigning the Grand Prix motorcycle racing circuit. Randy Mamola was its lead rider from 1988 to 1990, and he achieved Cagiva’s first podium result. The company would also have some technical assistance from Yamaha. In 1991 it signed former world champion Eddie Lawson to its team. Lawson would claim the company's first victory when he won the 1992 Hungarian Grand Prix. John Kocinski would also win a Grand Prix on a Cagiva GP500 (C594), finishing third in the 1994 world championship. While Kocinski had the best results to date on the Cagiva in 1994, the company withdrew at the end of the season. The bike made one appearance in 1995 at the Italian Grand Prix, where Pierfrancesco Chili finished 10th.
Overall, the Cagiva team had achieved 3 victories, 11 podiums, 6 pole position and 3 fastest laps in the 500cc.
500cc
Ducati
When the MotoGP technical rules changed in the 2002 season, giving priority to four-stroke machinery, Ducati decided to enter Grand Prix motorcycle racing.
Ducati's first MotoGP motorcycle was unveiled at the 2002 Italian GP at Mugello, for use in the 2003 MotoGP championship. Ducati began taking part in the MotoGP Championship in the 2003 season and won one title in the 2007 season. Ducati has collected 40 wins: 23 by Casey Stoner, 8 by Andrea Dovizioso 7 by Loris Capirossi and 1 each by Troy Bayliss and Andrea Iannone.
MotoGP
Honda Racing Corporation
Honda Racing Corporation (HRC) is a division of the Honda Motor Company formed in 1982. The company combines participation in motorcycle races throughout the world with the development of high potential racing machines. Its racing activities are an important source for the creation of leading edge technologies used in the development of Honda motorcycles. HRC also contributes to the advancement of motorcycle sports through a range of activities that include sales of production racing motorcycles, support for satellite teams, and rider education programs.
In 1979, Honda returned to Grand Prix motorcycle racing with the monocoque-framed, four-stroke NR500. The FIM rules limited engines to four cylinders, so the NR500 had non-circular, 'race-track', cylinders, each with 8 valves and two connecting rods, in order to provide sufficient valve area to compete with the dominant two-stroke racers. Unfortunately, it seemed Honda tried to accomplish too much at one time and the experiment failed. For the 1982 season, Honda debuted their first two-stroke race bike, the NS500 and in 1983, Honda won their first 500 cc Grand Prix World Championship with Freddie Spencer. Since then, Honda has become a dominant marque in motorcycle Grand Prix racing, winning a plethora of top level titles with riders such as Mick Doohan and Valentino Rossi.
500cc/MotoGP
Kawasaki Motors Racing
Kawasaki returned after an absence of 20 years at the 2002 Pacific motorcycle Grand Prix. Kawasaki, with their four-stroke Ninja ZX-RR, raced as wildcards in the last four races of the season as a preparation before entering the championship full-time in the following season.
In 2004, Shinya Nakano joined the team and managed to get the ZX-RR's first podium with a third place at the Japanese Grand Prix. In 2005, Olivier Jacque scored a second place at the Chinese Grand Prix. The next year Nakano finished second at the Dutch TT. In 2007, Randy de Puniet scored a second place at the Japanese Grand Prix. In 2008 John Hopkins and Anthony West rode the machine.
The ZX-RR struggled in 2008, with the best results being two fifth-place finishes from John Hopkins in Portugal and Anthony West in Brno. Hopkins and West blamed both a lack of feeling in the front end and rear traction on corner exit. Previous ZX-RRs have been difficult to ride, but beyond the limited statements by the riders it is unclear what the problems with the 2008 bike were.
In August 2008, Kawasaki signed Marco Melandri to join John Hopkins for the 2009 season. However, the global financial crisis of 2008 caused Kawasaki to reconsider its MotoGP program, and the Italian sports daily Tuttosport reported on December 30 that Kawasaki would be pulling out of MotoGP for 2009.
On January 9, 2009, Kawasaki announced it had decided to "... suspend its MotoGP racing activities from 2009 season onward and reallocate management resources more efficiently". The company stated that it will continue racing activities using mass-produced motorcycles as well as supporting general race oriented consumers.
MotoGP
KTM
KTM AG (the former KTM Sportmotorcycle AG) is an Austrian motorcycle and sports car manufacturer owned by KTM Industries AG and Indian manufacturer Bajaj Auto. It was formed in 1992 but traces its foundation to as early as 1934. Today, KTM AG is the parent company of the KTM Group.
In 2003, KTM started sponsoring and supporting Road racing in various capacities, with the most successful results stemming from their Supermoto efforts. From 2003 to 2009, a KTM factory team competed in the 125cc class of the motorcycle Grand Prix, and between 2005 and 2008 in the 250cc class. Notable successes in the 125 cc class were the second and third place in the overall ranking scored in 2005 by KTM riders Mika Kallio and Gábor Talmácsi, the second place in 2006 by Mika Kallio, the third place in 2007 by Tomoyoshi Koyama and the 2005 KTM victory in the 125 cc constructor championship. In the 250 cc class, Mika Kallio won third place in 2008. Since the first Rookies Cup season in 2007, KTM has supplied the bike for the Red Bull MotoGP Rookies Cup. In 2009, KTM announced their withdrawal from Grand Prix motorcycle racing in all classes, and did not return until 2012 in the new Moto3 class.
In 2012, KTM won the Moto3 manufacturers' championship. During the next season, KTM riders prevailed in every race of the Moto3 class and won the world title as well as second and third place, making KTM the obvious victor of the manufacturers' standing. KTM won the manufacturer title in the 2014 and 2016 as well as the world title in 2016 in the Moto3 class. Starting in 2017, KTM fields bikes in both MotoGP and Moto2 classes as well. The main class team features Bradley Smith and Pol Espargaró as full-season riders, and Mika Kallio as wildcard rider. The Moto2 KTM Ajo team features Miguel Oliveira and Brad Binder.
MotoGP
Marc VDS Racing Team
Marc VDS Racing Team is a Belgian motorcycle racing team founded by Marc van der Straten, although it is composed of several smaller teams all operating under the Marc VDS banner. The team currently competes in two disciplines of motorsport: motorcycle racing in the MotoGP World Championship and the Moto2 World Championship, and rallying in various rally raid events. It has also formerly competed in many auto racing championships, such as the Blancpain Endurance Series and the European Le Mans Series.
MotoGP
Pramac Racing
Pramac Racing is a motorcycle racing team currently competing in the MotoGP World Championship. The team was created in 2002 by Italian company Pramac. In 2005 Pramac Racing joined forces with d'Antin MotoGP to form Pramac d'Antin and in 2007 the team became part of the Pramac Group. After d'Antin left the team in 2008, the team became known as Pramac Racing.
MotoGP
Suzuki MotoGP
Suzuki MotoGP is the official factory-backed team of Suzuki in the MotoGP World Championship. Suzuki first entered a works team in the 500cc Grand Prix World Championship in 1974 with riders Barry Sheene and Findlay riding the Suzuki RG500. A second-place finish by Sheene in the opening round was the best result of the season. The team's first victory came in 1975, a pole-to-finish win by Barry Sheene at the Dutch TT. Sheene finished the season 6th overall with two wins.
Barry Sheene won the riders' championship in 1976 with a total of five wins. Sheene's second 500cc riders' championship came in 1977 with six wins. Teammate Steve Parrish was fifth.
Marco Lucchinelli became the 500cc World Champion in 1981, riding the new Suzuki RG 500 gamma for the Roberto Gallina racing team. Lucchinelli left Suzuki to join Honda in 1982. He was replaced on the Gallina team by Franco Uncini who went on to win the World Championship with five wins. Uncini was severely injured at the Dutch TT at Assen in 1983 and was unable to defend his title. Suzuki withdrew factory support at the end of the season.
After three years away Suzuki returned in 1987 with factory supported entries. While not a full-time return, riders Takumi Itoh and Kevin Schwantz had some good results aboard the new Suzuki RGV500. Suzuki made a full return to racing in 1988 with Schwantz finishing 8th overall with two wins whilst teammate Rob McElnea finished the season in 10th place. With a total of six wins, Schwantz was ranked fourth for the 1989 season.
Schwantz won his long-awaited first World Championship in 1993 with four race wins. His new teammate Alex Barros also scored a win and finished 6th overall.
Kenny Roberts Jr. became World Champion in 2000 with a total of four victories, while Nobuatsu Aoki was 10th overall.
For the 2011 season, the team fielded only one GSV-R for Álvaro Bautista with no replacement for Loris Capirossi, who moved to the Pramac Racing team. At the end of 2011 Suzuki pulled out of MotoGP citing the need to reduce costs amid the global economic downturn.
On 30 September 2014 Suzuki Motor Corporation announced that it would participate in MotoGP from 2015, with Aleix Espargaró and Maverick Viñales as their two riders. They raced a newly developed MotoGP machine, the GSX-RR, with a restructured team organisation led by Davide Brivio.
500cc/MotoGP
Team LCR
Team LCR is a motorcycle racing team currently competing in the MotoGP World Championship under the name LCR Honda. The team was founded in 1996 by Italian rider Lucio Cecchinello. In 2015, they were represented by British rider Cal Crutchlow on a factory-specification Honda RC213V bike, and Australian rookie Jack Miller, riding an open-specification Honda RC213V-RS. However, the team downgraded to a single bike for Crutchlow in 2016, as Miller moved to the Estrella Galicia 0,0 Marc VDS Team.
MotoGP
Tech 3
Tech 3 is a motorcycle racing team currently competing in the MotoGP World Championship under the name Monster Yamaha Tech 3 and in the Moto2 World Championship under the name Tech 3 Moto2.
Tech 3 functions as a junior team to the Movistar Yamaha MotoGP Team, with the aim of developing the skills of promising riders for the senior team. The team was founded by ex-racer Hervé Poncharal, engineer Guy Coulon and Bernard Martignac and started racing in 1990 in the 250 cc class, using Honda and Suzuki motorcycles. In 1999, the team partnered with Yamaha for the factory team and in 2000 their riders, Olivier Jacque and Shinya Nakano, placed first and second in the 250 world championship. In 2001 the team moved the whole operation to the premier class, again with Yamaha, Jacque and Nakano on the YZR500,"MotoGP – Tech 3 Yamaha". though their status changed to that of satellite team through to the present.
Towards the end of the 2002 season, the team was given use of the YZR-M1. In 2006 and 2007 the team used Dunlop tyres, but returned to Michelin in 2008. In the 2008 Grand Prix motorcycle racing season, the two-time and reigning Superbike World Champion James Toseland partnered with the two-time Superbike World Champion Colin Edwards. For 2010, Ben Spies replaced Toseland. Spies finished the season in sixth place while Edwards finished in eleventh place. In the new Moto2 category, Tech 3 rider Yuki Takahashi finished the season in twelfth place while Raffaele De Rosa finished 27th, aboard Honda-powered bikes using a Tech 3 chassis.
For 2011, Spies moved to the factory Yamaha team, and was being replaced by Cal Crutchlow; the team again retained Colin Edwards for a fourth season. For 2012, Crutchlow moves into the second year of his two-year deal, while Edwards announced that he was leaving for the Forward Racing team with Andrea Dovizioso having been confirmed as his replacement. Bradley Smith signed a deal to ride for the team in MotoGP in 2013 and 2014.
500cc/MotoGP
Yamaha Motor Racing
Yamaha Motor Racing or Yamaha Factory Racing is the official Italian-Japanese factory team of Yamaha in MotoGP.
In motorcycle racing Yamaha has won 39 world championships, including 6 in MotoGP and 9 in the preceding 500 cc two-stroke class, and 1 in World Superbike. In addition Yamaha have recorded 208 victories at the Isle of Man TT and head the list of victories at the Sidecar TT with 40. Past Yamaha riders include: Giacomo Agostini, Bob Hannah, Heikki Mikkola, Kenny Roberts, Eddie Lawson, Wayne Rainey, Jeremy McGrath, Stefan Merriman, Dave Molyneux, Ian Hutchinson, Phil Read, Chad Reed, Ben Spies and Jorge Lorenzo. Their current lineup consists of 9 time champion Valentino Rossi and Maverick Viñales.
500cc/MotoGP
References
Grand Prix motorcycle racing
Motorcycle road racing series
Fédération Internationale de Motocyclisme
Liveries
|
Chinese Cinema: Culture and Politics since 1949 is a 1988 non-fiction book by Paul Clark, published by Cambridge University Press.
It discusses films produced by the Chinese Communist Party and groups with its ideology beginning in 1934, and through the time it established the People's Republic of China. The book's coverage ends in the year 1984.
Contents
The chapters are ordered in a chronological manner. The author chose to use the dates 1964-1978 for the Cultural Revolution chapter as the Communist authorities had, in 1964, issued public criticism of several film works.
Reception
W. J. F. Jenner, in China Quarterly, praised the book for not using "monstrous language of the higher film criticism" in film criticism sections, and instead using "brevity and unpretentiousness", with a "clear" organization and "quiet and reasonable" tone. They criticized "weakness" in the book's analyses and the book failing to "go deeply enough into either the culture or the politics of the Chinese film world."
Colin Mackerras of Griffith University called the book a "first-rate study" and that the "documentation and bibliography are superb." He stated that the book should have had a conclusion section and not a postscript section.
References
- See also at ProQuest
Notes
Further reading
External links
Chinese Cinema: Culture and Politics since 1949 - Cambridge University Press
Cambridge University Press books
Books about film
Books about China
1988 books
|
```c++
// 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
#include "arrow/array/array_nested.h"
#include <atomic>
#include <cstddef>
#include <cstdint>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "arrow/array/array_base.h"
#include "arrow/array/array_primitive.h"
#include "arrow/array/builder_base.h"
#include "arrow/array/builder_nested.h"
#include "arrow/array/concatenate.h"
#include "arrow/array/util.h"
#include "arrow/buffer.h"
#include "arrow/status.h"
#include "arrow/type.h"
#include "arrow/type_fwd.h"
#include "arrow/type_traits.h"
#include "arrow/util/bit_util.h"
#include "arrow/util/bitmap_generate.h"
#include "arrow/util/bitmap_ops.h"
#include "arrow/util/checked_cast.h"
#include "arrow/util/list_util.h"
#include "arrow/util/logging.h"
#include "arrow/util/unreachable.h"
namespace arrow {
using internal::BitmapAnd;
using internal::checked_cast;
using internal::checked_pointer_cast;
using internal::CopyBitmap;
// your_sha256_hash------
// ListArray / LargeListArray / ListViewArray / LargeListViewArray (common utilities)
namespace {
/// \brief Clean offsets when their null_count is greater than 0
///
/// \pre offsets.null_count() > 0
template <typename TYPE>
Result<BufferVector> CleanListOffsets(const std::shared_ptr<Buffer>& validity_buffer,
const Array& offsets, MemoryPool* pool) {
using offset_type = typename TYPE::offset_type;
using OffsetArrowType = typename CTypeTraits<offset_type>::ArrowType;
using OffsetArrayType = typename TypeTraits<OffsetArrowType>::ArrayType;
DCHECK_GT(offsets.null_count(), 0);
const int64_t num_offsets = offsets.length();
if (!offsets.IsValid(num_offsets - 1)) {
return Status::Invalid("Last list offset should be non-null");
}
ARROW_ASSIGN_OR_RAISE(auto clean_offsets,
AllocateBuffer(num_offsets * sizeof(offset_type), pool));
// Copy valid bits, ignoring the final offset (since for a length N list array,
// we have N + 1 offsets)
ARROW_ASSIGN_OR_RAISE(
auto clean_validity_buffer,
CopyBitmap(pool, offsets.null_bitmap()->data(), offsets.offset(), num_offsets - 1));
const offset_type* raw_offsets =
checked_cast<const OffsetArrayType&>(offsets).raw_values();
auto clean_raw_offsets = reinterpret_cast<offset_type*>(clean_offsets->mutable_data());
// Must work backwards so we can tell how many values were in the last non-null value
offset_type current_offset = raw_offsets[num_offsets - 1];
for (int64_t i = num_offsets - 1; i >= 0; --i) {
if (offsets.IsValid(i)) {
current_offset = raw_offsets[i];
}
clean_raw_offsets[i] = current_offset;
}
return BufferVector({std::move(clean_validity_buffer), std::move(clean_offsets)});
}
template <typename TYPE>
Result<std::shared_ptr<typename TypeTraits<TYPE>::ArrayType>> ListArrayFromArrays(
std::shared_ptr<DataType> type, const Array& offsets, const Array& values,
MemoryPool* pool, std::shared_ptr<Buffer> null_bitmap = NULLPTR,
int64_t null_count = kUnknownNullCount) {
using offset_type = typename TYPE::offset_type;
using ArrayType = typename TypeTraits<TYPE>::ArrayType;
using OffsetArrowType = typename CTypeTraits<offset_type>::ArrowType;
if (offsets.length() == 0) {
return Status::Invalid("List offsets must have non-zero length");
}
if (offsets.type_id() != OffsetArrowType::type_id) {
return Status::TypeError("List offsets must be ", OffsetArrowType::type_name());
}
if (null_bitmap != nullptr && offsets.data()->MayHaveNulls()) {
return Status::Invalid(
"Ambiguous to specify both validity map and offsets with nulls");
}
if (null_bitmap != nullptr && offsets.offset() != 0) {
return Status::NotImplemented("Null bitmap with offsets slice not supported.");
}
// Clean the offsets if they contain nulls.
if (offsets.null_count() > 0) {
ARROW_ASSIGN_OR_RAISE(auto buffers,
CleanListOffsets<TYPE>(null_bitmap, offsets, pool));
auto data = ArrayData::Make(type, offsets.length() - 1, std::move(buffers),
{values.data()}, offsets.null_count(), /*offset=*/0);
return std::make_shared<ArrayType>(std::move(data));
}
using OffsetArrayType = typename TypeTraits<OffsetArrowType>::ArrayType;
const auto& typed_offsets = checked_cast<const OffsetArrayType&>(offsets);
auto buffers = BufferVector({std::move(null_bitmap), typed_offsets.values()});
auto data = ArrayData::Make(type, offsets.length() - 1, std::move(buffers),
{values.data()}, null_count, offsets.offset());
return std::make_shared<ArrayType>(std::move(data));
}
template <typename TYPE>
Result<std::shared_ptr<typename TypeTraits<TYPE>::ArrayType>> ListViewArrayFromArrays(
std::shared_ptr<DataType> type, const Array& offsets, const Array& sizes,
const Array& values, MemoryPool* pool, std::shared_ptr<Buffer> null_bitmap = NULLPTR,
int64_t null_count = kUnknownNullCount) {
using offset_type = typename TYPE::offset_type;
using ArrayType = typename TypeTraits<TYPE>::ArrayType;
using OffsetArrowType = typename CTypeTraits<offset_type>::ArrowType;
if (offsets.type_id() != OffsetArrowType::type_id) {
return Status::TypeError("List offsets must be ", OffsetArrowType::type_name());
}
if (sizes.length() != offsets.length() && sizes.length() != offsets.length() - 1) {
return Status::Invalid(
"List sizes must have the same length as offsets or one less than offsets");
}
if (sizes.type_id() != OffsetArrowType::type_id) {
return Status::TypeError("List sizes must be ", OffsetArrowType::type_name());
}
if (offsets.offset() != sizes.offset()) {
return Status::Invalid("List offsets and sizes must have the same offset");
}
const int64_t array_offset = sizes.offset();
if (null_bitmap) {
if (offsets.null_count() > 0 || sizes.null_count() > 0) {
return Status::Invalid(
"Ambiguous to specify both validity map and offsets or sizes with nulls");
}
if (array_offset != 0) {
return Status::Invalid(
"List offsets and sizes must not be slices if a validity map is specified");
}
} else {
if (offsets.null_count() > 0 && sizes.null_count() > 0) {
return Status::Invalid("Ambiguous to specify both offsets and sizes with nulls");
}
}
DCHECK(offsets.length() == sizes.length() || offsets.length() - 1 == sizes.length());
using OffsetArrayType = typename TypeTraits<OffsetArrowType>::ArrayType;
const auto& typed_offsets = checked_cast<const OffsetArrayType&>(offsets);
const auto& typed_sizes = checked_cast<const OffsetArrayType&>(sizes);
auto derived_validity_buffer = std::move(null_bitmap);
if (offsets.null_count() > 0) {
derived_validity_buffer = offsets.null_bitmap();
null_count = offsets.null_count();
// We allow construction from an offsets array containing one extra value.
// If that is the case, we might need to discount one null from out_null_count.
if (offsets.length() - 1 == sizes.length() && !offsets.IsValid(sizes.length())) {
null_count -= 1;
}
} else if (sizes.null_count() > 0) {
derived_validity_buffer = sizes.null_bitmap();
null_count = sizes.null_count();
}
auto buffers = BufferVector({
std::move(derived_validity_buffer),
typed_offsets.values(),
typed_sizes.values(),
});
auto data = ArrayData::Make(type, sizes.length(), std::move(buffers), {values.data()},
null_count, array_offset);
return std::make_shared<ArrayType>(std::move(data));
}
static std::shared_ptr<Array> SliceArrayWithOffsets(const Array& array, int64_t begin,
int64_t end) {
return array.Slice(begin, end - begin);
}
template <typename ListArrayT>
Result<std::shared_ptr<Array>> FlattenListArray(const ListArrayT& list_array,
MemoryPool* memory_pool) {
const int64_t list_array_length = list_array.length();
std::shared_ptr<arrow::Array> value_array = list_array.values();
// Shortcut: if a ListArray does not contain nulls, then simply slice its
// value array with the first and the last offsets.
if (list_array.null_count() == 0) {
return SliceArrayWithOffsets(*value_array, list_array.value_offset(0),
list_array.value_offset(list_array_length));
}
// Second shortcut: if the list array is *all* nulls, then just return
// an empty array.
if (list_array.null_count() == list_array.length()) {
return MakeEmptyArray(value_array->type(), memory_pool);
}
// The ListArray contains nulls: there may be a non-empty sub-list behind
// a null and it must not be contained in the result.
std::vector<std::shared_ptr<Array>> non_null_fragments;
int64_t valid_begin = 0;
while (valid_begin < list_array_length) {
int64_t valid_end = valid_begin;
while (valid_end < list_array_length &&
(list_array.IsValid(valid_end) || list_array.value_length(valid_end) == 0)) {
++valid_end;
}
if (valid_begin < valid_end) {
non_null_fragments.push_back(
SliceArrayWithOffsets(*value_array, list_array.value_offset(valid_begin),
list_array.value_offset(valid_end)));
}
valid_begin = valid_end + 1; // skip null entry
}
// Final attempt to avoid invoking Concatenate().
if (non_null_fragments.size() == 1) {
return non_null_fragments[0];
} else if (non_null_fragments.size() == 0) {
return MakeEmptyArray(value_array->type(), memory_pool);
}
return Concatenate(non_null_fragments, memory_pool);
}
template <typename ListViewArrayT, bool HasNulls>
Result<std::shared_ptr<Array>> FlattenListViewArray(const ListViewArrayT& list_view_array,
MemoryPool* memory_pool) {
using offset_type = typename ListViewArrayT::offset_type;
const int64_t list_view_array_offset = list_view_array.offset();
const int64_t list_view_array_length = list_view_array.length();
std::shared_ptr<arrow::Array> value_array = list_view_array.values();
if (list_view_array_length == 0) {
return SliceArrayWithOffsets(*value_array, 0, 0);
}
// If the list array is *all* nulls, then just return an empty array.
if constexpr (HasNulls) {
if (list_view_array.null_count() == list_view_array.length()) {
return MakeEmptyArray(value_array->type(), memory_pool);
}
}
const auto* validity = list_view_array.data()->template GetValues<uint8_t>(0, 0);
const auto* offsets = list_view_array.data()->template GetValues<offset_type>(1);
const auto* sizes = list_view_array.data()->template GetValues<offset_type>(2);
auto is_null_or_empty = [&](int64_t i) {
if (HasNulls && !bit_util::GetBit(validity, list_view_array_offset + i)) {
return true;
}
return sizes[i] == 0;
};
// Index of the first valid, non-empty list-view.
int64_t first_i = 0;
for (; first_i < list_view_array_length; first_i++) {
if (!is_null_or_empty(first_i)) {
break;
}
}
// If all list-views are empty, return an empty array.
if (first_i == list_view_array_length) {
return MakeEmptyArray(value_array->type(), memory_pool);
}
std::vector<std::shared_ptr<Array>> slices;
{
int64_t i = first_i;
auto begin_offset = offsets[i];
auto end_offset = offsets[i] + sizes[i];
i += 1;
// Inductive invariant: slices and the always non-empty values slice
// [begin_offset, end_offset) contains all the maximally contiguous slices of the
// values array that are covered by all the list-views before list-view i.
for (; i < list_view_array_length; i++) {
if (is_null_or_empty(i)) {
// The invariant is preserved by simply preserving the current set of slices.
} else {
if (offsets[i] == end_offset) {
end_offset += sizes[i];
// The invariant is preserved because since the non-empty list-view i
// starts at end_offset, the current range can be extended to end at
// offsets[i] + sizes[i] (the same as end_offset + sizes[i]).
} else {
// The current slice can't be extended because the list-view i either
// shares values with the current slice or starts after the position
// immediately after the end of the current slice.
slices.push_back(SliceArrayWithOffsets(*value_array, begin_offset, end_offset));
begin_offset = offsets[i];
end_offset = offsets[i] + sizes[i];
// The invariant is preserved because a maximally contiguous slice of
// the values array (i.e. one that can't be extended) was added to slices
// and [begin_offset, end_offset) is non-empty and contains the
// current list-view i.
}
}
}
slices.push_back(SliceArrayWithOffsets(*value_array, begin_offset, end_offset));
}
// Final attempt to avoid invoking Concatenate().
switch (slices.size()) {
case 0:
return MakeEmptyArray(value_array->type(), memory_pool);
case 1:
return slices[0];
}
return Concatenate(slices, memory_pool);
}
std::shared_ptr<Array> BoxOffsets(const std::shared_ptr<DataType>& boxed_type,
const ArrayData& data) {
const int64_t num_offsets =
is_list_view(data.type->id()) ? data.length : data.length + 1;
std::vector<std::shared_ptr<Buffer>> buffers = {nullptr, data.buffers[1]};
auto offsets_data =
std::make_shared<ArrayData>(boxed_type, /*length=*/num_offsets, std::move(buffers),
/*null_count=*/0, data.offset);
return MakeArray(offsets_data);
}
std::shared_ptr<Array> BoxSizes(const std::shared_ptr<DataType>& boxed_type,
const ArrayData& data) {
DCHECK(is_list_view(data.type->id()));
std::vector<std::shared_ptr<Buffer>> buffers = {nullptr, data.buffers[2]};
auto sizes_data =
std::make_shared<ArrayData>(boxed_type, data.length, std::move(buffers),
/*null_count=*/0, data.offset);
return MakeArray(sizes_data);
}
template <typename DestListViewType, typename SrcListType>
Result<std::shared_ptr<ArrayData>> ListViewFromListImpl(
const std::shared_ptr<ArrayData>& list_data, MemoryPool* pool) {
static_assert(
std::is_same<typename SrcListType::offset_type,
typename DestListViewType::offset_type>::value,
"Offset types between list type and list-view type are expected to match");
using offset_type = typename SrcListType::offset_type;
const auto& list_type = checked_cast<const SrcListType&>(*list_data->type);
// To re-use the validity and offsets buffers, a sizes buffer with enough
// padding on the beginning is allocated and filled with the sizes after
// list_data->offset.
const int64_t buffer_length = list_data->offset + list_data->length;
ARROW_ASSIGN_OR_RAISE(auto sizes_buffer,
AllocateBuffer(buffer_length * sizeof(offset_type), pool));
const auto* offsets = list_data->template GetValues<offset_type>(1, 0);
auto* sizes = sizes_buffer->mutable_data_as<offset_type>();
// Zero the initial padding area to avoid leaking any data when buffers are
// sent over IPC or through the C Data interface.
memset(sizes, 0, list_data->offset * sizeof(offset_type));
for (int64_t i = list_data->offset; i < buffer_length; i++) {
sizes[i] = offsets[i + 1] - offsets[i];
}
BufferVector buffers = {list_data->buffers[0], list_data->buffers[1],
std::move(sizes_buffer)};
return ArrayData::Make(std::make_shared<DestListViewType>(list_type.value_type()),
list_data->length, std::move(buffers),
{list_data->child_data[0]}, list_data->null_count,
list_data->offset);
}
template <typename DestListType, typename SrcListViewType>
Result<std::shared_ptr<ArrayData>> ListFromListViewImpl(
const std::shared_ptr<ArrayData>& list_view_data, MemoryPool* pool) {
static_assert(
std::is_same<typename SrcListViewType::offset_type,
typename DestListType::offset_type>::value,
"Offset types between list type and list-view type are expected to match");
using offset_type = typename DestListType::offset_type;
using ListBuilderType = typename TypeTraits<DestListType>::BuilderType;
const auto& list_view_type =
checked_cast<const SrcListViewType&>(*list_view_data->type);
const auto& value_type = list_view_type.value_type();
const auto list_type = std::make_shared<DestListType>(value_type);
ARROW_ASSIGN_OR_RAISE(auto sum_of_list_view_sizes,
list_util::internal::SumOfLogicalListSizes(*list_view_data));
ARROW_ASSIGN_OR_RAISE(std::shared_ptr<ArrayBuilder> value_builder,
MakeBuilder(value_type, pool));
RETURN_NOT_OK(value_builder->Reserve(sum_of_list_view_sizes));
auto list_builder = std::make_shared<ListBuilderType>(pool, value_builder, list_type);
RETURN_NOT_OK(list_builder->Reserve(list_view_data->length));
ArraySpan values{*list_view_data->child_data[0]};
const auto* in_validity_bitmap = list_view_data->GetValues<uint8_t>(0);
const auto* in_offsets = list_view_data->GetValues<offset_type>(1);
const auto* in_sizes = list_view_data->GetValues<offset_type>(2);
for (int64_t i = 0; i < list_view_data->length; ++i) {
const bool is_valid =
!in_validity_bitmap ||
bit_util::GetBit(in_validity_bitmap, list_view_data->offset + i);
const int64_t size = is_valid ? in_sizes[i] : 0;
RETURN_NOT_OK(list_builder->Append(is_valid, size));
RETURN_NOT_OK(value_builder->AppendArraySlice(values, in_offsets[i], size));
}
std::shared_ptr<ArrayData> list_array_data;
RETURN_NOT_OK(list_builder->FinishInternal(&list_array_data));
return list_array_data;
}
} // namespace
namespace internal {
template <typename TYPE>
inline void SetListData(VarLengthListLikeArray<TYPE>* self,
const std::shared_ptr<ArrayData>& data,
Type::type expected_type_id) {
ARROW_CHECK_EQ(data->buffers.size(), is_list_view(TYPE::type_id) ? 3 : 2);
ARROW_CHECK_EQ(data->type->id(), expected_type_id);
ARROW_CHECK_EQ(data->child_data.size(), 1);
self->Array::SetData(data);
self->list_type_ = checked_cast<const TYPE*>(data->type.get());
self->raw_value_offsets_ =
data->GetValuesSafe<typename TYPE::offset_type>(1, /*offset=*/0);
// BaseListViewArray::SetData takes care of setting raw_value_sizes_.
ARROW_CHECK_EQ(self->list_type_->value_type()->id(), data->child_data[0]->type->id());
DCHECK(self->list_type_->value_type()->Equals(data->child_data[0]->type));
self->values_ = MakeArray(self->data_->child_data[0]);
}
Result<std::shared_ptr<Array>> FlattenLogicalListRecursively(const Array& in_array,
MemoryPool* memory_pool) {
std::shared_ptr<Array> array = in_array.Slice(0, in_array.length());
for (auto kind = array->type_id(); is_list(kind) || is_list_view(kind);
kind = array->type_id()) {
switch (kind) {
case Type::LIST: {
ARROW_ASSIGN_OR_RAISE(
array, (checked_cast<const ListArray*>(array.get())->Flatten(memory_pool)));
break;
}
case Type::LARGE_LIST: {
ARROW_ASSIGN_OR_RAISE(
array,
(checked_cast<const LargeListArray*>(array.get())->Flatten(memory_pool)));
break;
}
case Type::LIST_VIEW: {
ARROW_ASSIGN_OR_RAISE(
array,
(checked_cast<const ListViewArray*>(array.get())->Flatten(memory_pool)));
break;
}
case Type::LARGE_LIST_VIEW: {
ARROW_ASSIGN_OR_RAISE(
array,
(checked_cast<const LargeListViewArray*>(array.get())->Flatten(memory_pool)));
break;
}
case Type::FIXED_SIZE_LIST: {
ARROW_ASSIGN_OR_RAISE(
array,
(checked_cast<const FixedSizeListArray*>(array.get())->Flatten(memory_pool)));
break;
}
default:
Unreachable("unexpected non-list type");
break;
}
}
return array;
}
} // namespace internal
// your_sha256_hash------
// ListArray
ListArray::ListArray(std::shared_ptr<ArrayData> data) {
ListArray::SetData(std::move(data));
}
ListArray::ListArray(std::shared_ptr<DataType> type, int64_t length,
std::shared_ptr<Buffer> value_offsets, std::shared_ptr<Array> values,
std::shared_ptr<Buffer> null_bitmap, int64_t null_count,
int64_t offset) {
ARROW_CHECK_EQ(type->id(), Type::LIST);
auto internal_data = ArrayData::Make(
std::move(type), length,
BufferVector{std::move(null_bitmap), std::move(value_offsets)}, null_count, offset);
internal_data->child_data.emplace_back(values->data());
SetData(std::move(internal_data));
}
void ListArray::SetData(const std::shared_ptr<ArrayData>& data) {
internal::SetListData(this, data);
}
Result<std::shared_ptr<ListArray>> ListArray::FromArrays(
const Array& offsets, const Array& values, MemoryPool* pool,
std::shared_ptr<Buffer> null_bitmap, int64_t null_count) {
return ListArrayFromArrays<ListType>(std::make_shared<ListType>(values.type()), offsets,
values, pool, null_bitmap, null_count);
}
Result<std::shared_ptr<ListArray>> ListArray::FromListView(const ListViewArray& source,
MemoryPool* pool) {
ARROW_ASSIGN_OR_RAISE(
auto data, (ListFromListViewImpl<ListType, ListViewType>(source.data(), pool)));
return std::make_shared<ListArray>(std::move(data));
}
Result<std::shared_ptr<ListArray>> ListArray::FromArrays(
std::shared_ptr<DataType> type, const Array& offsets, const Array& values,
MemoryPool* pool, std::shared_ptr<Buffer> null_bitmap, int64_t null_count) {
if (type->id() != Type::LIST) {
return Status::TypeError("Expected list type, got ", type->ToString());
}
const auto& list_type = checked_cast<const ListType&>(*type);
if (!list_type.value_type()->Equals(values.type())) {
return Status::TypeError("Mismatching list value type");
}
return ListArrayFromArrays<ListType>(std::move(type), offsets, values, pool,
null_bitmap, null_count);
}
Result<std::shared_ptr<Array>> ListArray::Flatten(MemoryPool* memory_pool) const {
return FlattenListArray(*this, memory_pool);
}
std::shared_ptr<Array> ListArray::offsets() const { return BoxOffsets(int32(), *data_); }
// your_sha256_hash------
// LargeListArray
LargeListArray::LargeListArray(const std::shared_ptr<ArrayData>& data) {
LargeListArray::SetData(data);
}
LargeListArray::LargeListArray(const std::shared_ptr<DataType>& type, int64_t length,
const std::shared_ptr<Buffer>& value_offsets,
const std::shared_ptr<Array>& values,
const std::shared_ptr<Buffer>& null_bitmap,
int64_t null_count, int64_t offset) {
ARROW_CHECK_EQ(type->id(), Type::LARGE_LIST);
auto internal_data =
ArrayData::Make(type, length, {null_bitmap, value_offsets}, null_count, offset);
internal_data->child_data.emplace_back(values->data());
LargeListArray::SetData(internal_data);
}
void LargeListArray::SetData(const std::shared_ptr<ArrayData>& data) {
internal::SetListData(this, data);
}
Result<std::shared_ptr<LargeListArray>> LargeListArray::FromArrays(
const Array& offsets, const Array& values, MemoryPool* pool,
std::shared_ptr<Buffer> null_bitmap, int64_t null_count) {
return ListArrayFromArrays<LargeListType>(
std::make_shared<LargeListType>(values.type()), offsets, values, pool, null_bitmap,
null_count);
}
Result<std::shared_ptr<LargeListArray>> LargeListArray::FromListView(
const LargeListViewArray& source, MemoryPool* pool) {
ARROW_ASSIGN_OR_RAISE(
auto data,
(ListFromListViewImpl<LargeListType, LargeListViewType>(source.data(), pool)));
return std::make_shared<LargeListArray>(std::move(data));
}
Result<std::shared_ptr<LargeListArray>> LargeListArray::FromArrays(
std::shared_ptr<DataType> type, const Array& offsets, const Array& values,
MemoryPool* pool, std::shared_ptr<Buffer> null_bitmap, int64_t null_count) {
if (type->id() != Type::LARGE_LIST) {
return Status::TypeError("Expected large list type, got ", type->ToString());
}
const auto& list_type = checked_cast<const LargeListType&>(*type);
if (!list_type.value_type()->Equals(values.type())) {
return Status::TypeError("Mismatching list value type");
}
return ListArrayFromArrays<LargeListType>(std::move(type), offsets, values, pool,
null_bitmap, null_count);
}
Result<std::shared_ptr<Array>> LargeListArray::Flatten(MemoryPool* memory_pool) const {
return FlattenListArray(*this, memory_pool);
}
std::shared_ptr<Array> LargeListArray::offsets() const {
return BoxOffsets(int64(), *data_);
}
// your_sha256_hash------
// ListViewArray
ListViewArray::ListViewArray(std::shared_ptr<ArrayData> data) {
ListViewArray::SetData(std::move(data));
}
ListViewArray::ListViewArray(std::shared_ptr<DataType> type, int64_t length,
std::shared_ptr<Buffer> value_offsets,
std::shared_ptr<Buffer> value_sizes,
std::shared_ptr<Array> values,
std::shared_ptr<Buffer> null_bitmap, int64_t null_count,
int64_t offset) {
ListViewArray::SetData(ArrayData::Make(
std::move(type), length,
{std::move(null_bitmap), std::move(value_offsets), std::move(value_sizes)},
/*child_data=*/{values->data()}, null_count, offset));
}
void ListViewArray::SetData(const std::shared_ptr<ArrayData>& data) {
internal::SetListData(this, data);
raw_value_sizes_ = data->GetValuesSafe<ListViewType::offset_type>(2, /*offset=*/0);
}
Result<std::shared_ptr<ListViewArray>> ListViewArray::FromArrays(
const Array& offsets, const Array& sizes, const Array& values, MemoryPool* pool,
std::shared_ptr<Buffer> null_bitmap, int64_t null_count) {
return ListViewArrayFromArrays<ListViewType>(
std::make_shared<ListViewType>(values.type()), offsets, sizes, values, pool,
null_bitmap, null_count);
}
Result<std::shared_ptr<ListViewArray>> ListViewArray::FromArrays(
std::shared_ptr<DataType> type, const Array& offsets, const Array& sizes,
const Array& values, MemoryPool* pool, std::shared_ptr<Buffer> null_bitmap,
int64_t null_count) {
if (type->id() != Type::LIST_VIEW) {
return Status::TypeError("Expected list-view type, got ", type->ToString());
}
const auto& list_view_type = checked_cast<const ListViewType&>(*type);
if (!list_view_type.value_type()->Equals(values.type())) {
return Status::TypeError("Mismatching list-view value type");
}
return ListViewArrayFromArrays<ListViewType>(std::move(type), offsets, sizes, values,
pool, null_bitmap, null_count);
}
Result<std::shared_ptr<ListViewArray>> ListViewArray::FromList(const ListArray& source,
MemoryPool* pool) {
ARROW_ASSIGN_OR_RAISE(
auto data, (ListViewFromListImpl<ListViewType, ListType>(source.data(), pool)));
return std::make_shared<ListViewArray>(std::move(data));
}
Result<std::shared_ptr<LargeListViewArray>> LargeListViewArray::FromList(
const LargeListArray& source, MemoryPool* pool) {
ARROW_ASSIGN_OR_RAISE(
auto data,
(ListViewFromListImpl<LargeListViewType, LargeListType>(source.data(), pool)));
return std::make_shared<LargeListViewArray>(std::move(data));
}
Result<std::shared_ptr<Array>> ListViewArray::Flatten(MemoryPool* memory_pool) const {
if (null_count() > 0) {
return FlattenListViewArray<ListViewArray, true>(*this, memory_pool);
}
return FlattenListViewArray<ListViewArray, false>(*this, memory_pool);
}
std::shared_ptr<Array> ListViewArray::offsets() const {
return BoxOffsets(int32(), *data_);
}
std::shared_ptr<Array> ListViewArray::sizes() const { return BoxSizes(int32(), *data_); }
// your_sha256_hash------
// LargeListViewArray
LargeListViewArray::LargeListViewArray(std::shared_ptr<ArrayData> data) {
LargeListViewArray::SetData(std::move(data));
}
LargeListViewArray::LargeListViewArray(std::shared_ptr<DataType> type, int64_t length,
std::shared_ptr<Buffer> value_offsets,
std::shared_ptr<Buffer> value_sizes,
std::shared_ptr<Array> values,
std::shared_ptr<Buffer> null_bitmap,
int64_t null_count, int64_t offset) {
LargeListViewArray::SetData(ArrayData::Make(
type, length,
{std::move(null_bitmap), std::move(value_offsets), std::move(value_sizes)},
/*child_data=*/{values->data()}, null_count, offset));
}
void LargeListViewArray::SetData(const std::shared_ptr<ArrayData>& data) {
internal::SetListData(this, data);
raw_value_sizes_ = data->GetValuesSafe<LargeListViewType::offset_type>(2, /*offset=*/0);
}
Result<std::shared_ptr<LargeListViewArray>> LargeListViewArray::FromArrays(
const Array& offsets, const Array& sizes, const Array& values, MemoryPool* pool,
std::shared_ptr<Buffer> null_bitmap, int64_t null_count) {
return ListViewArrayFromArrays<LargeListViewType>(
std::make_shared<LargeListViewType>(values.type()), offsets, sizes, values, pool,
null_bitmap, null_count);
}
Result<std::shared_ptr<LargeListViewArray>> LargeListViewArray::FromArrays(
std::shared_ptr<DataType> type, const Array& offsets, const Array& sizes,
const Array& values, MemoryPool* pool, std::shared_ptr<Buffer> null_bitmap,
int64_t null_count) {
if (type->id() != Type::LARGE_LIST_VIEW) {
return Status::TypeError("Expected large list-view type, got ", type->ToString());
}
const auto& large_list_view_type = checked_cast<const LargeListViewType&>(*type);
if (!large_list_view_type.value_type()->Equals(values.type())) {
return Status::TypeError("Mismatching large list-view value type");
}
return ListViewArrayFromArrays<LargeListViewType>(
std::move(type), offsets, sizes, values, pool, null_bitmap, null_count);
}
Result<std::shared_ptr<Array>> LargeListViewArray::Flatten(
MemoryPool* memory_pool) const {
if (null_count() > 0) {
return FlattenListViewArray<LargeListViewArray, true>(*this, memory_pool);
}
return FlattenListViewArray<LargeListViewArray, false>(*this, memory_pool);
}
std::shared_ptr<Array> LargeListViewArray::offsets() const {
return BoxOffsets(int64(), *data_);
}
std::shared_ptr<Array> LargeListViewArray::sizes() const {
return BoxSizes(int64(), *data_);
}
// your_sha256_hash------
// MapArray
MapArray::MapArray(const std::shared_ptr<ArrayData>& data) { SetData(data); }
MapArray::MapArray(const std::shared_ptr<DataType>& type, int64_t length,
const std::shared_ptr<Buffer>& offsets,
const std::shared_ptr<Array>& values,
const std::shared_ptr<Buffer>& null_bitmap, int64_t null_count,
int64_t offset) {
SetData(ArrayData::Make(type, length, {null_bitmap, offsets}, {values->data()},
null_count, offset));
}
MapArray::MapArray(const std::shared_ptr<DataType>& type, int64_t length,
BufferVector buffers, const std::shared_ptr<Array>& keys,
const std::shared_ptr<Array>& items, int64_t null_count,
int64_t offset) {
auto pair_data = ArrayData::Make(type->fields()[0]->type(), keys->data()->length,
{nullptr}, {keys->data(), items->data()}, 0);
auto map_data =
ArrayData::Make(type, length, std::move(buffers), {pair_data}, null_count, offset);
SetData(map_data);
}
MapArray::MapArray(const std::shared_ptr<DataType>& type, int64_t length,
const std::shared_ptr<Buffer>& offsets,
const std::shared_ptr<Array>& keys,
const std::shared_ptr<Array>& items,
const std::shared_ptr<Buffer>& null_bitmap, int64_t null_count,
int64_t offset)
: MapArray(type, length, {null_bitmap, offsets}, keys, items, null_count, offset) {}
Result<std::shared_ptr<Array>> MapArray::FromArraysInternal(
std::shared_ptr<DataType> type, const std::shared_ptr<Array>& offsets,
const std::shared_ptr<Array>& keys, const std::shared_ptr<Array>& items,
MemoryPool* pool, std::shared_ptr<Buffer> null_bitmap) {
using offset_type = typename MapType::offset_type;
using OffsetArrowType = typename CTypeTraits<offset_type>::ArrowType;
if (offsets->length() == 0) {
return Status::Invalid("Map offsets must have non-zero length");
}
if (offsets->type_id() != OffsetArrowType::type_id) {
return Status::TypeError("Map offsets must be ", OffsetArrowType::type_name());
}
if (keys->null_count() != 0) {
return Status::Invalid("Map cannot contain NULL valued keys");
}
if (keys->length() != items->length()) {
return Status::Invalid("Map key and item arrays must be equal length");
}
if (null_bitmap != nullptr && offsets->data()->MayHaveNulls()) {
return Status::Invalid(
"Ambiguous to specify both validity map and offsets with nulls");
}
if (null_bitmap != nullptr && offsets->offset() != 0) {
return Status::NotImplemented("Null bitmap with offsets slice not supported.");
}
if (offsets->data()->MayHaveNulls()) {
ARROW_ASSIGN_OR_RAISE(auto buffers,
CleanListOffsets<MapType>(NULLPTR, *offsets, pool));
return std::make_shared<MapArray>(type, offsets->length() - 1, std::move(buffers),
keys, items, offsets->null_count(), 0);
}
using OffsetArrayType = typename TypeTraits<OffsetArrowType>::ArrayType;
const auto& typed_offsets = checked_cast<const OffsetArrayType&>(*offsets);
BufferVector buffers;
buffers.resize(2);
int64_t null_count = 0;
if (null_bitmap) {
buffers[0] = std::move(null_bitmap);
null_count = kUnknownNullCount;
}
buffers[1] = typed_offsets.values();
return std::make_shared<MapArray>(type, offsets->length() - 1, std::move(buffers), keys,
items, /*null_count=*/null_count, offsets->offset());
}
Result<std::shared_ptr<Array>> MapArray::FromArrays(const std::shared_ptr<Array>& offsets,
const std::shared_ptr<Array>& keys,
const std::shared_ptr<Array>& items,
MemoryPool* pool,
std::shared_ptr<Buffer> null_bitmap) {
return FromArraysInternal(std::make_shared<MapType>(keys->type(), items->type()),
offsets, keys, items, pool, std::move(null_bitmap));
}
Result<std::shared_ptr<Array>> MapArray::FromArrays(std::shared_ptr<DataType> type,
const std::shared_ptr<Array>& offsets,
const std::shared_ptr<Array>& keys,
const std::shared_ptr<Array>& items,
MemoryPool* pool,
std::shared_ptr<Buffer> null_bitmap) {
if (type->id() != Type::MAP) {
return Status::TypeError("Expected map type, got ", type->ToString());
}
const auto& map_type = checked_cast<const MapType&>(*type);
if (!map_type.key_type()->Equals(keys->type())) {
return Status::TypeError("Mismatching map keys type");
}
if (!map_type.item_type()->Equals(items->type())) {
return Status::TypeError("Mismatching map items type");
}
return FromArraysInternal(std::move(type), offsets, keys, items, pool,
std::move(null_bitmap));
}
Status MapArray::ValidateChildData(
const std::vector<std::shared_ptr<ArrayData>>& child_data) {
if (child_data.size() != 1) {
return Status::Invalid("Expected one child array for map array");
}
const auto& pair_data = child_data[0];
if (pair_data->type->id() != Type::STRUCT) {
return Status::Invalid("Map array child array should have struct type");
}
if (pair_data->MayHaveNulls()) {
return Status::Invalid("Map array child array should have no nulls");
}
if (pair_data->child_data.size() != 2) {
return Status::Invalid("Map array child array should have two fields");
}
if (pair_data->child_data[0]->MayHaveNulls()) {
return Status::Invalid("Map array keys array should have no nulls");
}
return Status::OK();
}
void MapArray::SetData(const std::shared_ptr<ArrayData>& data) {
ARROW_CHECK_OK(ValidateChildData(data->child_data));
internal::SetListData(this, data, Type::MAP);
map_type_ = checked_cast<const MapType*>(data->type.get());
const auto& pair_data = data->child_data[0];
keys_ = MakeArray(pair_data->child_data[0]);
items_ = MakeArray(pair_data->child_data[1]);
}
// your_sha256_hash------
// FixedSizeListArray
FixedSizeListArray::FixedSizeListArray(const std::shared_ptr<ArrayData>& data) {
SetData(data);
}
FixedSizeListArray::FixedSizeListArray(const std::shared_ptr<DataType>& type,
int64_t length,
const std::shared_ptr<Array>& values,
const std::shared_ptr<Buffer>& null_bitmap,
int64_t null_count, int64_t offset) {
auto internal_data = ArrayData::Make(type, length, {null_bitmap}, null_count, offset);
internal_data->child_data.emplace_back(values->data());
SetData(internal_data);
}
void FixedSizeListArray::SetData(const std::shared_ptr<ArrayData>& data) {
ARROW_CHECK_EQ(data->type->id(), Type::FIXED_SIZE_LIST);
this->Array::SetData(data);
ARROW_CHECK_EQ(list_type()->value_type()->id(), data->child_data[0]->type->id());
DCHECK(list_type()->value_type()->Equals(data->child_data[0]->type));
list_size_ = list_type()->list_size();
ARROW_CHECK_EQ(data_->child_data.size(), 1);
values_ = MakeArray(data_->child_data[0]);
}
const FixedSizeListType* FixedSizeListArray::list_type() const {
return checked_cast<const FixedSizeListType*>(data_->type.get());
}
const std::shared_ptr<DataType>& FixedSizeListArray::value_type() const {
return list_type()->value_type();
}
const std::shared_ptr<Array>& FixedSizeListArray::values() const { return values_; }
Result<std::shared_ptr<Array>> FixedSizeListArray::FromArrays(
const std::shared_ptr<Array>& values, int32_t list_size,
std::shared_ptr<Buffer> null_bitmap, int64_t null_count) {
if (list_size <= 0) {
return Status::Invalid("list_size needs to be a strict positive integer");
}
if ((values->length() % list_size) != 0) {
return Status::Invalid(
"The length of the values Array needs to be a multiple of the list_size");
}
int64_t length = values->length() / list_size;
auto list_type = std::make_shared<FixedSizeListType>(values->type(), list_size);
return std::make_shared<FixedSizeListArray>(list_type, length, values, null_bitmap,
null_count);
}
Result<std::shared_ptr<Array>> FixedSizeListArray::FromArrays(
const std::shared_ptr<Array>& values, std::shared_ptr<DataType> type,
std::shared_ptr<Buffer> null_bitmap, int64_t null_count) {
if (type->id() != Type::FIXED_SIZE_LIST) {
return Status::TypeError("Expected fixed size list type, got ", type->ToString());
}
const auto& list_type = checked_cast<const FixedSizeListType&>(*type);
if (!list_type.value_type()->Equals(values->type())) {
return Status::TypeError("Mismatching list value type");
}
if ((values->length() % list_type.list_size()) != 0) {
return Status::Invalid(
"The length of the values Array needs to be a multiple of the list size");
}
int64_t length = values->length() / list_type.list_size();
return std::make_shared<FixedSizeListArray>(type, length, values, null_bitmap,
null_count);
}
Result<std::shared_ptr<Array>> FixedSizeListArray::Flatten(
MemoryPool* memory_pool) const {
return FlattenListArray(*this, memory_pool);
}
// your_sha256_hash------
// Struct
StructArray::StructArray(const std::shared_ptr<ArrayData>& data) {
ARROW_CHECK_EQ(data->type->id(), Type::STRUCT);
SetData(data);
boxed_fields_.resize(data->child_data.size());
}
StructArray::StructArray(const std::shared_ptr<DataType>& type, int64_t length,
const std::vector<std::shared_ptr<Array>>& children,
std::shared_ptr<Buffer> null_bitmap, int64_t null_count,
int64_t offset) {
ARROW_CHECK_EQ(type->id(), Type::STRUCT);
SetData(ArrayData::Make(type, length, {null_bitmap}, null_count, offset));
for (const auto& child : children) {
data_->child_data.push_back(child->data());
}
boxed_fields_.resize(children.size());
}
Result<std::shared_ptr<StructArray>> StructArray::Make(
const std::vector<std::shared_ptr<Array>>& children,
const std::vector<std::shared_ptr<Field>>& fields,
std::shared_ptr<Buffer> null_bitmap, int64_t null_count, int64_t offset) {
if (children.size() != fields.size()) {
return Status::Invalid("Mismatching number of fields and child arrays");
}
if (children.empty()) {
return Status::Invalid("Can't infer struct array length with 0 child arrays");
}
const int64_t length = children.front()->length();
for (const auto& child : children) {
if (length != child->length()) {
return Status::Invalid("Mismatching child array lengths");
}
}
if (offset > length) {
return Status::IndexError("Offset greater than length of child arrays");
}
if (null_bitmap == nullptr) {
if (null_count > 0) {
return Status::Invalid("null_count = ", null_count, " but no null bitmap given");
}
null_count = 0;
}
return std::make_shared<StructArray>(struct_(fields), length - offset, children,
null_bitmap, null_count, offset);
}
Result<std::shared_ptr<StructArray>> StructArray::Make(
const std::vector<std::shared_ptr<Array>>& children,
const std::vector<std::string>& field_names, std::shared_ptr<Buffer> null_bitmap,
int64_t null_count, int64_t offset) {
if (children.size() != field_names.size()) {
return Status::Invalid("Mismatching number of field names and child arrays");
}
std::vector<std::shared_ptr<Field>> fields(children.size());
for (size_t i = 0; i < children.size(); ++i) {
fields[i] = ::arrow::field(field_names[i], children[i]->type());
}
return Make(children, fields, std::move(null_bitmap), null_count, offset);
}
const StructType* StructArray::struct_type() const {
return checked_cast<const StructType*>(data_->type.get());
}
const ArrayVector& StructArray::fields() const {
for (int i = 0; i < num_fields(); ++i) {
(void)field(i);
}
return boxed_fields_;
}
const std::shared_ptr<Array>& StructArray::field(int i) const {
std::shared_ptr<Array> result = std::atomic_load(&boxed_fields_[i]);
if (!result) {
std::shared_ptr<ArrayData> field_data;
if (data_->offset != 0 || data_->child_data[i]->length != data_->length) {
field_data = data_->child_data[i]->Slice(data_->offset, data_->length);
} else {
field_data = data_->child_data[i];
}
std::shared_ptr<Array> result = MakeArray(field_data);
std::atomic_store(&boxed_fields_[i], result);
return boxed_fields_[i];
}
return boxed_fields_[i];
}
std::shared_ptr<Array> StructArray::GetFieldByName(const std::string& name) const {
int i = struct_type()->GetFieldIndex(name);
return i == -1 ? nullptr : field(i);
}
Status StructArray::CanReferenceFieldByName(const std::string& name) const {
if (GetFieldByName(name) == nullptr) {
return Status::Invalid("Field named '", name,
"' not found or not unique in the struct.");
}
return Status::OK();
}
Status StructArray::CanReferenceFieldsByNames(
const std::vector<std::string>& names) const {
for (const auto& name : names) {
ARROW_RETURN_NOT_OK(CanReferenceFieldByName(name));
}
return Status::OK();
}
Result<ArrayVector> StructArray::Flatten(MemoryPool* pool) const {
ArrayVector flattened;
flattened.resize(data_->child_data.size());
std::shared_ptr<Buffer> null_bitmap = data_->buffers[0];
for (int i = 0; static_cast<size_t>(i) < data_->child_data.size(); i++) {
ARROW_ASSIGN_OR_RAISE(flattened[i], GetFlattenedField(i, pool));
}
return flattened;
}
Result<std::shared_ptr<Array>> StructArray::GetFlattenedField(int index,
MemoryPool* pool) const {
std::shared_ptr<Buffer> null_bitmap = data_->buffers[0];
auto child_data = data_->child_data[index]->Copy();
std::shared_ptr<Buffer> flattened_null_bitmap;
int64_t flattened_null_count = kUnknownNullCount;
// Need to adjust for parent offset
if (data_->offset != 0 || data_->length != child_data->length) {
child_data = child_data->Slice(data_->offset, data_->length);
}
std::shared_ptr<Buffer> child_null_bitmap = child_data->buffers[0];
const int64_t child_offset = child_data->offset;
// The validity of a flattened datum is the logical AND of the struct
// element's validity and the individual field element's validity.
if (null_bitmap && child_null_bitmap) {
ARROW_ASSIGN_OR_RAISE(
flattened_null_bitmap,
BitmapAnd(pool, child_null_bitmap->data(), child_offset, null_bitmap_data_,
data_->offset, data_->length, child_offset));
} else if (child_null_bitmap) {
flattened_null_bitmap = child_null_bitmap;
flattened_null_count = child_data->null_count;
} else if (null_bitmap) {
if (child_offset == data_->offset) {
flattened_null_bitmap = null_bitmap;
} else {
// If the child has an offset, need to synthesize a validity
// buffer with an offset too
ARROW_ASSIGN_OR_RAISE(flattened_null_bitmap,
AllocateEmptyBitmap(child_offset + data_->length, pool));
CopyBitmap(null_bitmap_data_, data_->offset, data_->length,
flattened_null_bitmap->mutable_data(), child_offset);
}
flattened_null_count = data_->null_count;
} else {
flattened_null_count = 0;
}
auto flattened_data = child_data->Copy();
flattened_data->buffers[0] = flattened_null_bitmap;
flattened_data->null_count = flattened_null_count;
return MakeArray(flattened_data);
}
// your_sha256_hash------
// UnionArray
void UnionArray::SetData(std::shared_ptr<ArrayData> data) {
this->Array::SetData(std::move(data));
union_type_ = checked_cast<const UnionType*>(data_->type.get());
ARROW_CHECK_GE(data_->buffers.size(), 2);
raw_type_codes_ = data->GetValuesSafe<int8_t>(1, /*offset=*/0);
boxed_fields_.resize(data_->child_data.size());
}
void SparseUnionArray::SetData(std::shared_ptr<ArrayData> data) {
this->UnionArray::SetData(std::move(data));
ARROW_CHECK_EQ(data_->type->id(), Type::SPARSE_UNION);
ARROW_CHECK_EQ(data_->buffers.size(), 2);
// No validity bitmap
ARROW_CHECK_EQ(data_->buffers[0], nullptr);
}
void DenseUnionArray::SetData(const std::shared_ptr<ArrayData>& data) {
this->UnionArray::SetData(data);
ARROW_CHECK_EQ(data_->type->id(), Type::DENSE_UNION);
ARROW_CHECK_EQ(data_->buffers.size(), 3);
// No validity bitmap
ARROW_CHECK_EQ(data_->buffers[0], nullptr);
raw_value_offsets_ = data->GetValuesSafe<int32_t>(2, /*offset=*/0);
}
SparseUnionArray::SparseUnionArray(std::shared_ptr<ArrayData> data) {
SetData(std::move(data));
}
SparseUnionArray::SparseUnionArray(std::shared_ptr<DataType> type, int64_t length,
ArrayVector children,
std::shared_ptr<Buffer> type_codes, int64_t offset) {
auto internal_data = ArrayData::Make(std::move(type), length,
BufferVector{nullptr, std::move(type_codes)},
/*null_count=*/0, offset);
for (const auto& child : children) {
internal_data->child_data.push_back(child->data());
}
SetData(std::move(internal_data));
}
Result<std::shared_ptr<Array>> SparseUnionArray::GetFlattenedField(
int index, MemoryPool* pool) const {
if (index < 0 || index >= num_fields()) {
return Status::Invalid("Index out of range: ", index);
}
auto child_data = data_->child_data[index]->Copy();
// Adjust the result offset/length to be absolute.
if (data_->offset != 0 || data_->length != child_data->length) {
child_data = child_data->Slice(data_->offset, data_->length);
}
std::shared_ptr<Buffer> child_null_bitmap = child_data->buffers[0];
const int64_t child_offset = child_data->offset;
// Synthesize a null bitmap based on the union discriminant.
// Make sure the bitmap has extra bits corresponding to the child offset.
ARROW_ASSIGN_OR_RAISE(std::shared_ptr<Buffer> flattened_null_bitmap,
AllocateEmptyBitmap(child_data->length + child_offset, pool));
const int8_t type_code = union_type()->type_codes()[index];
const int8_t* type_codes = raw_type_codes();
int64_t offset = 0;
internal::GenerateBitsUnrolled(flattened_null_bitmap->mutable_data(), child_offset,
data_->length,
[&] { return type_codes[offset++] == type_code; });
// The validity of a flattened datum is the logical AND of the synthesized
// null bitmap buffer and the individual field element's validity.
if (child_null_bitmap) {
BitmapAnd(flattened_null_bitmap->data(), child_offset, child_null_bitmap->data(),
child_offset, child_data->length, child_offset,
flattened_null_bitmap->mutable_data());
}
child_data->buffers[0] = std::move(flattened_null_bitmap);
child_data->null_count = kUnknownNullCount;
return MakeArray(child_data);
}
DenseUnionArray::DenseUnionArray(const std::shared_ptr<ArrayData>& data) {
SetData(data);
}
DenseUnionArray::DenseUnionArray(std::shared_ptr<DataType> type, int64_t length,
ArrayVector children, std::shared_ptr<Buffer> type_ids,
std::shared_ptr<Buffer> value_offsets, int64_t offset) {
auto internal_data = ArrayData::Make(
std::move(type), length,
BufferVector{nullptr, std::move(type_ids), std::move(value_offsets)},
/*null_count=*/0, offset);
for (const auto& child : children) {
internal_data->child_data.push_back(child->data());
}
SetData(internal_data);
}
Result<std::shared_ptr<Array>> DenseUnionArray::Make(
const Array& type_ids, const Array& value_offsets, ArrayVector children,
std::vector<std::string> field_names, std::vector<type_code_t> type_codes) {
if (value_offsets.type_id() != Type::INT32) {
return Status::TypeError("UnionArray offsets must be signed int32");
}
if (type_ids.type_id() != Type::INT8) {
return Status::TypeError("UnionArray type_ids must be signed int8");
}
if (type_ids.null_count() != 0) {
return Status::Invalid("Union type ids may not have nulls");
}
if (value_offsets.null_count() != 0) {
return Status::Invalid("Make does not allow nulls in value_offsets");
}
if (field_names.size() > 0 && field_names.size() != children.size()) {
return Status::Invalid("field_names must have the same length as children");
}
if (type_codes.size() > 0 && type_codes.size() != children.size()) {
return Status::Invalid("type_codes must have the same length as children");
}
BufferVector buffers = {nullptr, checked_cast<const Int8Array&>(type_ids).values(),
checked_cast<const Int32Array&>(value_offsets).values()};
auto union_type = dense_union(children, std::move(field_names), std::move(type_codes));
auto internal_data =
ArrayData::Make(std::move(union_type), type_ids.length(), std::move(buffers),
/*null_count=*/0, type_ids.offset());
for (const auto& child : children) {
internal_data->child_data.push_back(child->data());
}
return std::make_shared<DenseUnionArray>(std::move(internal_data));
}
Result<std::shared_ptr<Array>> SparseUnionArray::Make(
const Array& type_ids, ArrayVector children, std::vector<std::string> field_names,
std::vector<int8_t> type_codes) {
if (type_ids.type_id() != Type::INT8) {
return Status::TypeError("UnionArray type_ids must be signed int8");
}
if (type_ids.null_count() != 0) {
return Status::Invalid("Union type ids may not have nulls");
}
if (field_names.size() > 0 && field_names.size() != children.size()) {
return Status::Invalid("field_names must have the same length as children");
}
if (type_codes.size() > 0 && type_codes.size() != children.size()) {
return Status::Invalid("type_codes must have the same length as children");
}
BufferVector buffers = {nullptr, checked_cast<const Int8Array&>(type_ids).values()};
auto union_type = sparse_union(children, std::move(field_names), std::move(type_codes));
auto internal_data =
ArrayData::Make(std::move(union_type), type_ids.length(), std::move(buffers),
/*null_count=*/0, type_ids.offset());
for (const auto& child : children) {
internal_data->child_data.push_back(child->data());
if (child->length() != type_ids.length()) {
return Status::Invalid(
"Sparse UnionArray must have len(child) == len(type_ids) for all children");
}
}
return std::make_shared<SparseUnionArray>(std::move(internal_data));
}
std::shared_ptr<Array> UnionArray::field(int i) const {
if (i < 0 ||
static_cast<decltype(boxed_fields_)::size_type>(i) >= boxed_fields_.size()) {
return nullptr;
}
std::shared_ptr<Array> result = std::atomic_load(&boxed_fields_[i]);
if (!result) {
std::shared_ptr<ArrayData> child_data = data_->child_data[i]->Copy();
if (mode() == UnionMode::SPARSE) {
// Sparse union: need to adjust child if union is sliced
// (for dense unions, the need to lookup through the offsets
// makes this unnecessary)
if (data_->offset != 0 || child_data->length > data_->length) {
child_data = child_data->Slice(data_->offset, data_->length);
}
}
result = MakeArray(child_data);
std::atomic_store(&boxed_fields_[i], result);
}
return result;
}
} // namespace arrow
```
|
Flowery Field Cricket Club is located in the Flowery Field area of Hyde, Greater Manchester and was formed in 1838. It celebrated its sesquicentennial year in 1988 with a number of special matches.
The club runs three senior teams together with several junior sides and has modern facilities including an air-conditioned pavilion and enclosed practice nets.
FFCC was a member of the Saddleworth and District Cricket League for most of the twentieth century but resigned as reigning champions in 2003 to join the Lancashire County League.
In their first season in the Lancashire County League they finished 7th and in their second season in 2005 they reached the final of the Walkden Cup which they lost to Denton St Lawrence whilst also finishing 4th in the League to qualify for the Lancashire Cup in season 2006. In the first round of the competition they were drawn against Bootle Cricket Club and lost a close match against a strong Merseyside team including former England batsman Graham Lloyd.
For season 2008 their professional was all-rounder Andrew Gleave and he replaced left-arm spin bowler Damien Eyre who was paid man from 2005 to 2007. In 2009 Gleave was replaced by fast bowler Stephen Oddy from Rochdale who completed his fourth season as paid man in 2012 with his replacement for 2013 being experienced all rounder Ghulam Abbas. By 2015 their professional was Australian batsman Liam Castellas. Previous professionals have included South Australian state batsman Robert Zadow, former Lancashire and Somerset all-rounder Andrew Payne and South African international Steve Elworthy.
For 2016 FFCC joined the newly created Greater Manchester Cricket League with their professional then being Sean Gibson an off-spinning all-rounder with the position taken for 2017 by fast bowler Mike Burns from Littleborough.
Cricket clubs established in 1838
Club cricket teams in England
Sport in Tameside
1838 establishments in England
Cricket in Greater Manchester
Hyde, Greater Manchester
Organisations based in Tameside
|
```scss
.vr {
inline-size: 0;
block-size: auto;
flex: 0 0 0;
border-inline-end: 1px solid var(--border-norm);
}
```
|
Import and export or import/export may refer to:
Import and export of goods
International trade
Import/export regulations, trade regulations of such goods
Import/export tariffs, taxes on the trade in such goods
Import and export of data in computing, the moving of data between applications
Import and export of formats, data conversion from one file type to another
Import/Export, a 2007 Austrian film
An import statement used as a form or analog of an include directive in some programming languages
Import–export (logic), a form of deductive argument in classical logic
|
```xml
import { DisplayObject } from '@antv/g';
import { OverflowHideLabelTransform } from '../spec';
import { LabelTransformComponent as LLC } from '../runtime';
import { isOverflow, parseAABB } from '../utils/bounds';
import { hide, show } from '../utils/style';
export type OverflowHideOptions = Omit<OverflowHideLabelTransform, 'type'>;
/**
* Hide the label when the label is overflowed from the element.
*/
export const OverflowHide: LLC<OverflowHideOptions> = () => {
return (labels: DisplayObject[]) => {
labels.forEach((l) => {
show(l);
const bounds = l.attr('bounds');
const b = l.getLocalBounds();
const overflow = isOverflow(parseAABB(b), bounds);
if (overflow) hide(l);
});
return labels;
};
};
```
|
Henriksen Buttress () is a prominent rock buttress, high, standing southeast of Mount Sugartop in the central part of the Allardyce Range of South Georgia. It was surveyed by the South Georgia Survey in the period 1951–57, and was named by the UK Antarctic Place-Names Committee for Henrik N. Henriksen who, in 1909, built the South Georgia Whaling Company station at Leith Harbour, and was manager there from 1909 until 1920.
References
Rock formations of Antarctica
|
```c
#include "image.h"
#include "vff.h"
#include "nandcmac.h"
static FIL mount_file;
static u64 mount_state = 0;
static char mount_path[256] = { 0 };
static bool fix_cmac = false;
int ReadImageBytes(void* buffer, u64 offset, u64 count) {
UINT bytes_read;
UINT ret;
if (!count) return -1;
if (!mount_state) return FR_INVALID_OBJECT;
if (fvx_tell(&mount_file) != offset) {
if (fvx_size(&mount_file) < offset) return -1;
fvx_lseek(&mount_file, offset);
}
ret = fvx_read(&mount_file, buffer, count, &bytes_read);
return (ret != 0) ? (int) ret : (bytes_read != count) ? -1 : 0;
}
int WriteImageBytes(const void* buffer, u64 offset, u64 count) {
UINT bytes_written;
UINT ret;
if (!count) return -1;
if (!mount_state) return FR_INVALID_OBJECT;
if (fvx_tell(&mount_file) != offset)
fvx_lseek(&mount_file, offset);
ret = fvx_write(&mount_file, buffer, count, &bytes_written);
if (ret == 0) fix_cmac = true;
return (ret != 0) ? (int) ret : (bytes_written != count) ? -1 : 0;
}
int ReadImageSectors(void* buffer, u32 sector, u32 count) {
return ReadImageBytes(buffer, sector * 0x200, count * 0x200);
}
int WriteImageSectors(const void* buffer, u32 sector, u32 count) {
return WriteImageBytes(buffer, sector * 0x200, count * 0x200);
}
int SyncImage(void) {
return mount_state ? fvx_sync(&mount_file) : FR_INVALID_OBJECT;
}
u64 GetMountSize(void) {
return mount_state ? fvx_size(&mount_file) : 0;
}
u64 GetMountState(void) {
return mount_state;
}
const char* GetMountPath(void) {
return mount_path;
}
u64 MountImage(const char* path) {
if (mount_state) {
fvx_close(&mount_file);
if (fix_cmac) FixFileCmac(mount_path, false);
fix_cmac = false;
mount_state = 0;
*mount_path = 0;
}
u64 type = (path) ? IdentifyFileType(path) : 0;
if (!type) return 0;
if ((fvx_open(&mount_file, path, FA_READ | FA_WRITE | FA_OPEN_EXISTING) != FR_OK) &&
(fvx_open(&mount_file, path, FA_READ | FA_OPEN_EXISTING) != FR_OK))
return 0;
fvx_lseek(&mount_file, 0);
fvx_sync(&mount_file);
strncpy(mount_path, path, 256);
return (mount_state = type);
}
```
|
```objective-c
/*
* 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.
* 3. Neither the name of the copyright holder nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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.
*/
/**
* @file
* @brief
* This file defines the logging rtt interfaces and default constants used by logging_rtt.c.
*/
#ifndef UTILS_LOGGING_RTT_H
#define UTILS_LOGGING_RTT_H
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>
#include "openthread-core-config.h"
#include <openthread/config.h>
#include <openthread/platform/logging.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @def LOG_RTT_BUFFER_INDEX
*
* RTT's buffer index.
*
*/
#ifndef LOG_RTT_BUFFER_INDEX
#define LOG_RTT_BUFFER_INDEX 0
#endif
/**
* @def LOG_RTT_BUFFER_NAME
*
* RTT's name. Only used if LOG_RTT_BUFFER_INDEX is not 0. Otherwise,
* the buffer name is fixed to "Terminal".
*
*/
#ifndef LOG_RTT_BUFFER_NAME
#define LOG_RTT_BUFFER_NAME "Terminal"
#endif
/**
* @def LOG_RTT_BUFFER_SIZE
*
* LOG RTT's buffer size. Only used if LOG_RTT_BUFFER_INDEX is not 0. To
* configure buffer #0 size, check the BUFFER_SIZE_UP definition in
* SEGGER_RTT_Conf.h
*
*/
#ifndef LOG_RTT_BUFFER_SIZE
#define LOG_RTT_BUFFER_SIZE 256
#endif
/**
* @def LOG_RTT_COLOR_ENABLE
*
* Enable colors on RTT Viewer.
*
*/
#ifndef LOG_RTT_COLOR_ENABLE
#define LOG_RTT_COLOR_ENABLE 1
#endif
/**
* @def LOG_PARSE_BUFFER_SIZE
*
* LOG buffer used to parse print format. It will be locally allocated on the
* stack.
*
*/
#ifndef LOG_PARSE_BUFFER_SIZE
#define LOG_PARSE_BUFFER_SIZE 128
#endif
/**
* @def LOG_TIMESTAMP_ENABLE
*
* Enable timestamp in the logs.
*
*/
#ifndef LOG_TIMESTAMP_ENABLE
#define LOG_TIMESTAMP_ENABLE 1
#endif
/**
* Initialization of Logger driver.
*
*/
void utilsLogRttInit(void);
/**
* Deinitialization of Logger driver.
*
*/
void utilsLogRttDeinit(void);
/**
* Outputs logs to SEGGER RTT.
*
* @param[in] aLogLevel The log level.
* @param[in] aLogRegion The log region.
* @param[in] aFormat A pointer to the format string.
* @param[in] ap va_list matching information for aFormat
*
*/
void utilsLogRttOutput(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, va_list ap);
#ifdef __cplusplus
} // extern "C"
#endif
#endif // UTILS_LOGGING_RTT_H
```
|
National Weather Service - Tulsa, Oklahoma (TSA) is a local weather forecast office responsible for monitoring weather conditions for 7 counties in Northwestern Arkansas, and 25 counties in Eastern Oklahoma. The current office in Tulsa maintains a WSR-88D (NEXRAD) radar system, and Advanced Weather Interactive Processing System (AWIPS) that greatly improve forecasting in the region. Tulsa is in charge of weather forecasts, warnings and local statements as well as aviation weather and NOAA Weather Radio broadcasts in its service area. The office operates two Doppler radars, one in Tulsa (INX), and the other in Fort Smith, Arkansas (SRX). Steve Piltz is the Meteorologist-In-Charge (MIC) of this office.
References
External links
NWS Forecast Office Tulsa, OK
Tulsa, Oklahoma
|
```java
/*
* 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
*/
package org.apache.bookkeeper.mledger.offload.jcloud;
import org.apache.bookkeeper.common.annotation.InterfaceAudience.LimitedPrivate;
import org.apache.bookkeeper.common.annotation.InterfaceStability.Unstable;
/**
* The Index Entry in OffloadIndexBlock.
* It consists of the message entry id, the tiered storage block part id for this message entry,
* and the offset in tiered storage block for this message id.
*/
@Unstable
@LimitedPrivate
public interface OffloadIndexEntry {
/**
* Get the entryId that this entry contains.
*/
long getEntryId();
/**
* Get the block part id of tiered storage.
*/
int getPartId();
/**
* Get the offset of this block within the object.
*/
long getOffset();
/**
* Get the offset of the block's data within the object.
*/
long getDataOffset();
}
```
|
```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 v2alpha1
// This file contains a collection of methods that can be used from go-restful to
// generate Swagger API documentation for its models. Please read this PR for more
// information on the implementation: path_to_url
//
// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
// they are on one line! For multiple line or blocks that you want to ignore use ---.
// Any context after a --- is ignored.
//
// Those methods can be generated by using hack/update-generated-swagger-docs.sh
// AUTO-GENERATED FUNCTIONS START HERE
var map_CrossVersionObjectReference = map[string]string{
"": "CrossVersionObjectReference contains enough information to let you identify the referred resource.",
"kind": "Kind of the referent; More info: path_to_url#types-kinds\"",
"name": "Name of the referent; More info: path_to_url#names",
"apiVersion": "API version of the referent",
}
func (CrossVersionObjectReference) SwaggerDoc() map[string]string {
return map_CrossVersionObjectReference
}
var map_HorizontalPodAutoscaler = map[string]string{
"": "HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified.",
"metadata": "metadata is the standard object metadata. More info: path_to_url#metadata",
"spec": "spec is the specification for the behaviour of the autoscaler. More info: path_to_url#spec-and-status.",
"status": "status is the current information about the autoscaler.",
}
func (HorizontalPodAutoscaler) SwaggerDoc() map[string]string {
return map_HorizontalPodAutoscaler
}
var map_HorizontalPodAutoscalerCondition = map[string]string{
"": "HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point.",
"type": "type describes the current condition",
"status": "status is the status of the condition (True, False, Unknown)",
"lastTransitionTime": "lastTransitionTime is the last time the condition transitioned from one status to another",
"reason": "reason is the reason for the condition's last transition.",
"message": "message is a human-readable explanation containing details about the transition",
}
func (HorizontalPodAutoscalerCondition) SwaggerDoc() map[string]string {
return map_HorizontalPodAutoscalerCondition
}
var map_HorizontalPodAutoscalerList = map[string]string{
"": "HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects.",
"metadata": "metadata is the standard list metadata.",
"items": "items is the list of horizontal pod autoscaler objects.",
}
func (HorizontalPodAutoscalerList) SwaggerDoc() map[string]string {
return map_HorizontalPodAutoscalerList
}
var map_HorizontalPodAutoscalerSpec = map[string]string{
"": "HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.",
"scaleTargetRef": "scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics should be collected, as well as to actually change the replica count.",
"minReplicas": "minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod.",
"maxReplicas": "maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas.",
"metrics": "metrics contains the specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond.",
}
func (HorizontalPodAutoscalerSpec) SwaggerDoc() map[string]string {
return map_HorizontalPodAutoscalerSpec
}
var map_HorizontalPodAutoscalerStatus = map[string]string{
"": "HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.",
"observedGeneration": "observedGeneration is the most recent generation observed by this autoscaler.",
"lastScaleTime": "lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods, used by the autoscaler to control how often the number of pods is changed.",
"currentReplicas": "currentReplicas is current number of replicas of pods managed by this autoscaler, as last seen by the autoscaler.",
"desiredReplicas": "desiredReplicas is the desired number of replicas of pods managed by this autoscaler, as last calculated by the autoscaler.",
"currentMetrics": "currentMetrics is the last read state of the metrics used by this autoscaler.",
"conditions": "conditions is the set of conditions required for this autoscaler to scale its target, and indicates whether or not those conditions are met.",
}
func (HorizontalPodAutoscalerStatus) SwaggerDoc() map[string]string {
return map_HorizontalPodAutoscalerStatus
}
var map_MetricSpec = map[string]string{
"": "MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once).",
"type": "type is the type of metric source. It should match one of the fields below.",
"object": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).",
"pods": "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.",
"resource": "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.",
}
func (MetricSpec) SwaggerDoc() map[string]string {
return map_MetricSpec
}
var map_MetricStatus = map[string]string{
"": "MetricStatus describes the last-read state of a single metric.",
"type": "type is the type of metric source. It will match one of the fields below.",
"object": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).",
"pods": "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.",
"resource": "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.",
}
func (MetricStatus) SwaggerDoc() map[string]string {
return map_MetricStatus
}
var map_ObjectMetricSource = map[string]string{
"": "ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).",
"target": "target is the described Kubernetes object.",
"metricName": "metricName is the name of the metric in question.",
"targetValue": "targetValue is the target value of the metric (as a quantity).",
}
func (ObjectMetricSource) SwaggerDoc() map[string]string {
return map_ObjectMetricSource
}
var map_ObjectMetricStatus = map[string]string{
"": "ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).",
"target": "target is the described Kubernetes object.",
"metricName": "metricName is the name of the metric in question.",
"currentValue": "currentValue is the current value of the metric (as a quantity).",
}
func (ObjectMetricStatus) SwaggerDoc() map[string]string {
return map_ObjectMetricStatus
}
var map_PodsMetricSource = map[string]string{
"": "PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.",
"metricName": "metricName is the name of the metric in question",
"targetAverageValue": "targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity)",
}
func (PodsMetricSource) SwaggerDoc() map[string]string {
return map_PodsMetricSource
}
var map_PodsMetricStatus = map[string]string{
"": "PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).",
"metricName": "metricName is the name of the metric in question",
"currentAverageValue": "currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity)",
}
func (PodsMetricStatus) SwaggerDoc() map[string]string {
return map_PodsMetricStatus
}
var map_ResourceMetricSource = map[string]string{
"": "ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.",
"name": "name is the name of the resource in question.",
"targetAverageUtilization": "targetAverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.",
"targetAverageValue": "targetAverageValue is the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type.",
}
func (ResourceMetricSource) SwaggerDoc() map[string]string {
return map_ResourceMetricSource
}
var map_ResourceMetricStatus = map[string]string{
"": "ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.",
"name": "name is the name of the resource in question.",
"currentAverageUtilization": "currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. It will only be present if `targetAverageValue` was set in the corresponding metric specification.",
"currentAverageValue": "currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type. It will always be set, regardless of the corresponding metric specification.",
}
func (ResourceMetricStatus) SwaggerDoc() map[string]string {
return map_ResourceMetricStatus
}
// AUTO-GENERATED FUNCTIONS END HERE
```
|
```php
<?php
/*
*
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
*/
namespace Google\Service\RemoteBuildExecution;
class BuildBazelRemoteExecutionV2Platform extends \Google\Collection
{
protected $collection_key = 'properties';
protected $propertiesType = BuildBazelRemoteExecutionV2PlatformProperty::class;
protected $propertiesDataType = 'array';
/**
* @param BuildBazelRemoteExecutionV2PlatformProperty[]
*/
public function setProperties($properties)
{
$this->properties = $properties;
}
/**
* @return BuildBazelRemoteExecutionV2PlatformProperty[]
*/
public function getProperties()
{
return $this->properties;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(BuildBazelRemoteExecutionV2Platform::class, your_sha256_hashlatform');
```
|
Arya is a 2004 Indian Telugu-language romantic action comedy film written and directed by debutant Sukumar. Produced by Dil Raju under Sri Venkateswara Creations banner, the film stars Allu Arjun, Anu Mehta, and Siva Balaji. The music was composed by Devi Sri Prasad and cinematography was by R. Rathnavelu. The plot revolves around Aarya, an outgoing and free-spirited boy falling in love with Geetha, an introverted girl who is on the shield of another person Ajay.
Arya was released on 7 May 2004, the film received positive response and was commercially successful, grossing worldwide. It has developed a cult following over the years. A dubbed version in Malayalam was released in 2006. The film was remade in Bangladeshi Bengali as Badha (2005), in Odia as Pagala Premi (2007) and in Tamil as Kutty (2010). A spiritual sequel titled Arya 2 was released in 2009.
Arya is considered one of the best films of Allu Arjun and provided a major breakthrough in his career as an actor and brought recognition for Sukumar as a director in Telugu cinema.
Plot
Geetanjali a.k.a. Geetha, a college student, goes to Kanyakumari on a trip. She finds a poem in a diary left on a beach and signs in it, saying that she wishes the poet will succeed in his love. Later on, her anklet falls into the ocean, and a guy jumps into the water in front of her eyes, but no one sees him resurfacing. However, Geetha did not see who jumped in the ocean. She dreams about the incident frequently with the idea that the guy who jumped has died, but her friends ask her to forget it.
Back to the present in Vishakhapatnam, here comes Ajay, a spoiled college student and the son of the local MP Avataram. He likes to flirt with beautiful girls and wants them to be his girlfriends. One day he sees Geetha and proposes to her. When she refuses, he threatens to jump from the top of the college building. Being afraid of being held responsible for a death, Geetha accepts the proposal with the thought that as some guy has already died for her, and she doesn't want someone to get hurt because of her and starts dating him. Aarya is a happy-go-lucky guy who enjoys his life with friends and kids. On his first day to the college, he sees Geetha, who was just confessing her love to Ajay, who was at the top of the college building, threatening her. Charmed by her beauty, Aarya falls in love with her and proposes to her. One day Avataram arranges a party in his house, and it so turns out that Ajay introduces Geetha to his father and persuades him to fix their marriage. Ajay's father, who initially pretended to accept his son's marriage with Geetha, turns tables upside down by introducing another girl Lalasa and announces that his son is going to marry Lalasa. He threatens his son not to marry anyone except Lalasa. Being embarrassed by the situation and helpless, Ajay sits down and starts to get frustrated. Aarya, who loves Geetha so much that he never hesitated to help her, decides to bring Ajay to Geetha and helps them elope. On their way, they are followed by Avataram's henchmen. They eventually find a train and get into it.
When they get down of the train in the night, they are shocked to see the leader of Avataram's henchmen, who forces Geetha to come with him, defying his boss' order. On the other hand, Ajay remains helpless, while Aarya fights all the men and finally defeats them, rescuing Ajay and Geetha. They walk on to the nearby town, which happens to be Aarya's hometown. Being tired, the three go to bed.
The next morning they wake up and realize that Ajay is missing. Aarya tries to convince Geetha that Ajay left to win over his father. This leaves private time for Aarya and Geetha, and they grow close to each other. Geetha starts liking Aarya and begins to understand him. When she tries to confess it to him, Ajay and his father return. Avataram agrees to get Ajay married to Geetha.
On the day of the wedding, Geetha finds out that Aarya was the guy who dove into the sea for her anklet and realizes that he came into her life much before Ajay. She realizes that while Ajay blackmailed her into loving him; Aarya just wanted to see her happy. Geetha also realizes that Aarya truly loves her, while Ajay was just acting on his impulse of wanting what he couldn't have. She leaves the wedding hall in tears and confesses her love to Aarya, and they both reconcile with each other, and this time he successfully throws the stone into the Plastic Coke Cup, indicating he truly succeeded in his love.
Cast
Allu Arjun as Arya
Anuradha Mehta as Geethanjali aka Geetha
Siva Balaji as Ajay
Rajan P. Dev as MP Avataram, Ajay's father
Subbaraju as Subbu
Sunil as "Punch" Falaknama, Train Ticket Examiner
Venu Madhav as Ajay's friend
Sudha as Geetha's mother
Vidya as Shanti
J. V. Ramana Murthi as Priest
Shravya as one of Arya's young friends
Babloo as Aarya's friend
Sandra Jai Chandran as Geetha's friend
Devi Charan
Jogi Naidu
Krishnam Raju
Srikanth Addala
Prudhviraj as Reddy (cameo)
Abhinayasri in item number "Aa Ante Amalapuram"
Production
Sukumar began working on the script of his directorial debut Aarya (2004) in Vishakhapatnam before joining the sets of Vinayak's Dil. Its producer Dil Raju assured that he would produce the film if Dil becomes a commercial success. Sukumar chose to narrate the story of a boy who confess his love to a girl right in the beginning, opposed to films like Darr (1993), Kabhie Haan Kabhie Naa (1994), and Kaadhal Kondein (2003) where the protagonist's love/obsession for the female lead is revealed towards the end, as he found that idea an "obsolete" one. Raju was impressed with Sukumar's script and Allu Arjun was selected as its protagonist after considering Ravi Teja, Nithin, and Prabhas. Anuradha Mehta and Siva Balaji were chosen for the other two lead roles. R. Rathnavelu and Devi Sri Prasad were chosen as the film's director of photography and music director respectively; they both collaborated with Sukumar in many of his future projects.
Soundtrack
The success and popularity of the song "Aa Ante Amalapuram" song eventually led to its adaptation in the 2012 Hindi film Maximum.
Malayalam (Dub)
Music is composed by Devi Sri Prasad and lyrics were penned by Mankombu Gopalakrishnan and Rajeev Alunkal
Reception
Critical reception
Aarya received highly positive reviews from critics. idlebrain.com gave a review stating, "You feel like you are watching a Mani Rathnam film. There is a soul in the film and you end up having a thin layer of tears in your eyes while leaving the theater. This film announces the arrival of Sukumar – director – a class apart. 'Aarya' is a must watch film for all Telugu film lovers. Don't miss it" and rated the film 4/5, calling the film "A class apart". IndiaGlitz gave a review stating "To start with, the hype machine was at work incessantly before the release of the movie. And after watching the film you also feel that there is a movie that is every inch worth its pre-release hype. Not only Aarya is expected to lead the pack in the long summer of seemingly never-ending releases but also give the hero of the film, Allu Arjun, a new identity. Aarya is an unabashed package showcasing Allu Arjun and his dancing and fighting abilities. The thing it looks like it will work at the box-office", further calling the film "A cocktail of fun and more fun". fullhyderabad.com gave a review stating "Aarya is not at all what you expect it to be. It is a special package that consists of fun, entertainment, laughs, frolic, merriment, high times, bashes and more. It has them all. Romance, eternal love, mush, flowers, embraces, sacrifices, sunsets. It has them ALL. Action, fights, stunts, feats, tricks, battles, blood, bullies, henchmen, chases. Did we mention that this has it all? Emotions, sentiments, passion, craze and feelings. See one. See all," and rated the film 7/10.
Box office
Aarya made on a budget of , grossed about .
The film's dubbed version in Malayalam collected between in Kerala. Owing to the film's success, Allu Arjun received major acclaim across the region and the Malayali people and earned him fanbase there.
Awards
52nd Filmfare Awards
Best Director – Sukumar
2004 CineMAA Awards
Best Director (Jury) – Sukumar
Best Screenplay - Sukumar
Best Editor - Marthand K Venkatesh
Sensational Producer - Dil Raju
2004 Nandi Awards
Best Screenplay Writer – Sukumar
Special Jury – Allu Arjun
Best Fight Master - Ram-Lakshman
Best Male Playback Singer - Sagar
2004 Santosham Film Awards
Santosham Best Young Performers Award – Allu Arjun
Best first film Director - Sukumar
Best new Female Singer - Malathi
Best Costumer - Kumar
Best item Dancer - Abhinayasri
2004 Gemini TV Awards
Best Director – Sukumar
Best Actor – Allu Arjun
References
Bibliography
External links
2004 films
Telugu films remade in other languages
Films directed by Sukumar
Films scored by Devi Sri Prasad
2000s Telugu-language films
Indian romantic comedy films
2004 romantic comedy films
Films shot in Visakhapatnam
2004 directorial debut films
Indian romantic action films
2000s romantic action films
Sri Venkateswara Creations films
|
Huequenia is a genus of beetles in the family Cerambycidae, containing the following species:
Huequenia araucana (Cerda, 1980)
Huequenia livida (Germain, 1898)
References
Achrysonini
|
```c
/*
** Include Files
*/
#include "ring.h"
#include "ring_vmopenssl.h"
#include "openssl/md5.h"
#include "openssl/sha.h"
#include "openssl/evp.h"
#include "openssl/err.h"
#include "openssl/pem.h"
#include "openssl/rand.h"
#include "openssl/rsa.h"
#include "openssl/bn.h"
#include "ring_vmopenssl.h"
/* Functions Depend on the Library Version */
#if OPENSSL_VERSION_NUMBER >= 0x00908000L
/* OpenSSL 0.98 and later */
#include "encrypt_v2.c"
#else
#include "encrypt_v1.c"
#endif
#include "openssl_rsa.c"
/* Functions */
typedef struct ListCipherArg {
void *pPointer;
List *pList;
} ListCipherArg;
RING_LIBINIT
{
RING_API_REGISTER("md5init",ring_vm_openssl_md5_init);
RING_API_REGISTER("md5update",ring_vm_openssl_md5_update);
RING_API_REGISTER("md5final",ring_vm_openssl_md5_final);
RING_API_REGISTER("md5",ring_vm_openssl_md5);
RING_API_REGISTER("sha1init",ring_vm_openssl_sha1_init);
RING_API_REGISTER("sha1update",ring_vm_openssl_sha1_update);
RING_API_REGISTER("sha1final",ring_vm_openssl_sha1_final);
RING_API_REGISTER("sha1",ring_vm_openssl_sha1);
RING_API_REGISTER("sha256init",ring_vm_openssl_sha256_init);
RING_API_REGISTER("sha256update",ring_vm_openssl_sha256_update);
RING_API_REGISTER("sha256final",ring_vm_openssl_sha256_final);
RING_API_REGISTER("sha256",ring_vm_openssl_sha256);
RING_API_REGISTER("sha512init",ring_vm_openssl_sha512_init);
RING_API_REGISTER("sha512update",ring_vm_openssl_sha512_update);
RING_API_REGISTER("sha512final",ring_vm_openssl_sha512_final);
RING_API_REGISTER("sha512",ring_vm_openssl_sha512);
RING_API_REGISTER("sha384init",ring_vm_openssl_sha384_init);
RING_API_REGISTER("sha384update",ring_vm_openssl_sha384_update);
RING_API_REGISTER("sha384final",ring_vm_openssl_sha384_final);
RING_API_REGISTER("sha384",ring_vm_openssl_sha384);
RING_API_REGISTER("sha224init",ring_vm_openssl_sha224_init);
RING_API_REGISTER("sha224update",ring_vm_openssl_sha224_update);
RING_API_REGISTER("sha224final",ring_vm_openssl_sha224_final);
RING_API_REGISTER("sha224",ring_vm_openssl_sha224);
RING_API_REGISTER("encrypt",ring_vm_openssl_encrypt);
RING_API_REGISTER("decrypt",ring_vm_openssl_decrypt);
RING_API_REGISTER("randbytes",ring_vm_openssl_randbytes);
RING_API_REGISTER("supportedciphers",ring_vm_openssl_list_ciphers);
RING_API_REGISTER("rsa_generate",ring_vm_openssl_rsa_generate);
RING_API_REGISTER("rsa_is_privatekey",ring_vm_openssl_rsa_is_privatekey);
RING_API_REGISTER("rsa_export_params",ring_vm_openssl_rsa_export_params);
RING_API_REGISTER("rsa_import_params",ring_vm_openssl_rsa_import_params);
RING_API_REGISTER("rsa_export_pem",ring_vm_openssl_rsa_export_pem);
RING_API_REGISTER("rsa_import_pem",ring_vm_openssl_rsa_import_pem);
RING_API_REGISTER("rsa_encrypt_pkcs",ring_vm_openssl_rsa_encrypt_pkcs);
RING_API_REGISTER("rsa_decrypt_pkcs",ring_vm_openssl_rsa_decrypt_pkcs);
RING_API_REGISTER("rsa_encrypt_oaep",ring_vm_openssl_rsa_encrypt_oaep);
RING_API_REGISTER("rsa_decrypt_oaep",ring_vm_openssl_rsa_decrypt_oaep);
RING_API_REGISTER("rsa_encrypt_raw", ring_vm_openssl_rsa_encrypt_raw);
RING_API_REGISTER("rsa_decrypt_raw", ring_vm_openssl_rsa_decrypt_raw);
RING_API_REGISTER("rsa_sign_pkcs", ring_vm_openssl_rsa_sign_pkcs);
RING_API_REGISTER("rsa_verify_pkcs", ring_vm_openssl_rsa_verify_pkcs);
RING_API_REGISTER("rsa_signhash_pkcs", ring_vm_openssl_rsa_signhash_pkcs);
RING_API_REGISTER("rsa_verifyhash_pkcs", ring_vm_openssl_rsa_verifyhash_pkcs);
RING_API_REGISTER("rsa_sign_pss", ring_vm_openssl_rsa_sign_pss);
RING_API_REGISTER("rsa_verify_pss", ring_vm_openssl_rsa_verify_pss);
RING_API_REGISTER("rsa_signhash_pss", ring_vm_openssl_rsa_signhash_pss);
RING_API_REGISTER("rsa_verifyhash_pss", ring_vm_openssl_rsa_verifyhash_pss);
RING_API_REGISTER("openssl_versiontext",ring_vm_openssl_versiontext);
RING_API_REGISTER("openssl_version",ring_vm_openssl_version);
/* Before OpenSSL 1.1, calling OpenSSL_add_all_algorithms is required */
/* Ref: path_to_url */
#if OPENSSL_VERSION_NUMBER < 0x10100000L
OpenSSL_add_all_algorithms();
ERR_load_crypto_strings();
#else
/* Ref: path_to_url */
OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS | OPENSSL_INIT_ADD_ALL_DIGESTS | OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL);
#endif
}
static void ring_vm_openssl_buf2hex (const unsigned char* pData, int nLen, char* cStr)
{
static const char cHexChars[] = "0123456789abcdef" ;
unsigned char bVal ;
int i ;
for (i = 0; i < nLen; i++) {
bVal = pData[i];
cStr[i*2] = cHexChars[bVal >> 4] ;
cStr[(i*2)+1] = cHexChars[bVal & 0x0F] ;
}
cStr[2*nLen] = 0;
}
void ring_vm_openssl_md5_init ( void *pPointer )
{
if ( RING_API_PARACOUNT != 0 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
else {
MD5_CTX* pValue ;
pValue = (MD5_CTX *) ring_state_malloc(((VM *) pPointer)->pRingState,sizeof(MD5_CTX)) ;
MD5_Init (pValue);
RING_API_RETMANAGEDCPOINTER(pValue,"MD5_CTX",ring_state_free);
}
}
void ring_vm_openssl_md5_update ( void *pPointer )
{
int nSize ;
char *cInput ;
MD5_CTX* pValue ;
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISCPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISSTRING(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
pValue = (MD5_CTX *) RING_API_GETCPOINTER(1,"MD5_CTX") ;
if ( pValue == NULL) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
cInput = RING_API_GETSTRING(2) ;
nSize = RING_API_GETSTRINGSIZE(2) ;
RING_API_RETNUMBER(MD5_Update(pValue, cInput, (unsigned long) nSize));
}
void ring_vm_openssl_md5_final ( void *pPointer )
{
unsigned char digest[MD5_DIGEST_LENGTH] ;
char cString[MD5_DIGEST_LENGTH*2+1] ;
MD5_CTX* pValue ;
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISCPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return;
}
pValue = (MD5_CTX *) RING_API_GETCPOINTER(1,"MD5_CTX") ;
if ( pValue == NULL) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
MD5_Final (digest, pValue);
ring_vm_openssl_buf2hex (digest, MD5_DIGEST_LENGTH, cString);
RING_API_RETSTRING(cString);
}
void ring_vm_openssl_md5 ( void *pPointer )
{
unsigned char digest[MD5_DIGEST_LENGTH] ;
char cString[33] ;
int nSize ;
char *cInput ;
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( RING_API_ISSTRING(1) ) {
cInput = RING_API_GETSTRING(1) ;
nSize = RING_API_GETSTRINGSIZE(1) ;
MD5((unsigned char *) cInput, nSize, (unsigned char *) &digest);
ring_vm_openssl_buf2hex (digest, MD5_DIGEST_LENGTH, cString);
RING_API_RETSTRING(cString);
} else {
RING_API_ERROR(RING_API_BADPARATYPE);
}
}
void ring_vm_openssl_sha1_init ( void *pPointer )
{
if ( RING_API_PARACOUNT != 0 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
else {
SHA_CTX* pValue ;
pValue = (SHA_CTX *) ring_state_malloc(((VM *) pPointer)->pRingState,sizeof(SHA_CTX)) ;
SHA1_Init (pValue);
RING_API_RETMANAGEDCPOINTER(pValue,"SHA_CTX",ring_state_free);
}
}
void ring_vm_openssl_sha1_update ( void *pPointer )
{
int nSize ;
char *cInput ;
SHA_CTX* pValue ;
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISCPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISSTRING(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
pValue = (SHA_CTX *) RING_API_GETCPOINTER(1,"SHA_CTX") ;
if ( pValue == NULL ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
cInput = RING_API_GETSTRING(2) ;
nSize = RING_API_GETSTRINGSIZE(2) ;
RING_API_RETNUMBER(SHA1_Update(pValue, cInput, (unsigned long) nSize));
}
void ring_vm_openssl_sha1_final ( void *pPointer )
{
unsigned char digest[SHA_DIGEST_LENGTH] ;
char cString[SHA_DIGEST_LENGTH*2+1] ;
SHA_CTX* pValue ;
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISCPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
}
pValue = (SHA_CTX *) RING_API_GETCPOINTER(1,"SHA_CTX") ;
if ( pValue == NULL ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
SHA1_Final (digest, pValue);
ring_vm_openssl_buf2hex (digest, SHA_DIGEST_LENGTH, cString);
RING_API_RETSTRING(cString);
}
void ring_vm_openssl_sha1 ( void *pPointer )
{
unsigned char digest[SHA_DIGEST_LENGTH] ;
char cString[SHA_DIGEST_LENGTH*2+1] ;
int nSize ;
char *cInput ;
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( RING_API_ISSTRING(1) ) {
cInput = RING_API_GETSTRING(1) ;
nSize = RING_API_GETSTRINGSIZE(1) ;
SHA1((unsigned char *) cInput, nSize, (unsigned char *) &digest);
ring_vm_openssl_buf2hex (digest, SHA_DIGEST_LENGTH, cString);
RING_API_RETSTRING(cString);
} else {
RING_API_ERROR(RING_API_BADPARATYPE);
}
}
void ring_vm_openssl_sha256_init ( void *pPointer )
{
if ( RING_API_PARACOUNT != 0 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
else {
SHA256_CTX* pValue;
pValue = (SHA256_CTX *) ring_state_malloc(((VM *) pPointer)->pRingState,sizeof(SHA256_CTX)) ;
SHA256_Init (pValue);
RING_API_RETMANAGEDCPOINTER(pValue,"SHA256_CTX",ring_state_free);
}
}
void ring_vm_openssl_sha256_update ( void *pPointer )
{
int nSize ;
char *cInput ;
SHA256_CTX* pValue ;
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISCPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISSTRING(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
pValue = (SHA256_CTX *) RING_API_GETCPOINTER(1,"SHA256_CTX");
if ( ! pValue ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
cInput = RING_API_GETSTRING(2) ;
nSize = RING_API_GETSTRINGSIZE(2) ;
RING_API_RETNUMBER(SHA256_Update(pValue, cInput, (unsigned long) nSize));
}
void ring_vm_openssl_sha256_final ( void *pPointer )
{
unsigned char digest[SHA256_DIGEST_LENGTH] ;
char cString[SHA256_DIGEST_LENGTH*2+1] ;
SHA256_CTX* pValue ;
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISCPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
pValue = (SHA256_CTX *) RING_API_GETCPOINTER(1,"SHA256_CTX") ;
if ( ! pValue ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
SHA256_Final (digest, pValue);
ring_vm_openssl_buf2hex (digest, SHA256_DIGEST_LENGTH, cString);
RING_API_RETSTRING(cString);
}
void ring_vm_openssl_sha256 ( void *pPointer )
{
unsigned char digest[SHA256_DIGEST_LENGTH] ;
char cString[SHA256_DIGEST_LENGTH*2+1] ;
int nSize ;
char *cInput ;
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( RING_API_ISSTRING(1) ) {
cInput = RING_API_GETSTRING(1) ;
nSize = RING_API_GETSTRINGSIZE(1) ;
SHA256((unsigned char *) cInput, nSize, (unsigned char *) &digest);
ring_vm_openssl_buf2hex (digest, SHA256_DIGEST_LENGTH, cString);
RING_API_RETSTRING(cString);
} else {
RING_API_ERROR(RING_API_BADPARATYPE);
}
}
void ring_vm_openssl_sha512_init ( void *pPointer )
{
if ( RING_API_PARACOUNT != 0 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
else {
SHA512_CTX* pValue;
pValue = (SHA512_CTX *) ring_state_malloc(((VM *) pPointer)->pRingState,sizeof(SHA512_CTX)) ;
SHA512_Init (pValue);
RING_API_RETMANAGEDCPOINTER(pValue,"SHA512_CTX",ring_state_free);
}
}
void ring_vm_openssl_sha512_update ( void *pPointer )
{
int nSize ;
char *cInput ;
SHA512_CTX* pValue ;
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISCPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISSTRING(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
pValue = (SHA512_CTX *) RING_API_GETCPOINTER(1,"SHA512_CTX") ;
if ( ! pValue ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
cInput = RING_API_GETSTRING(2) ;
nSize = RING_API_GETSTRINGSIZE(2) ;
RING_API_RETNUMBER(SHA512_Update(pValue, cInput, (unsigned long) nSize));
}
void ring_vm_openssl_sha512_final ( void *pPointer )
{
unsigned char digest[SHA512_DIGEST_LENGTH] ;
char cString[SHA512_DIGEST_LENGTH*2+1] ;
SHA512_CTX* pValue ;
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISCPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
}
pValue = (SHA512_CTX *) RING_API_GETCPOINTER(1,"SHA512_CTX") ;
if ( ! pValue ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
SHA512_Final (digest, pValue);
ring_vm_openssl_buf2hex (digest, SHA512_DIGEST_LENGTH, cString);
RING_API_RETSTRING(cString);
}
void ring_vm_openssl_sha512 ( void *pPointer )
{
unsigned char digest[SHA512_DIGEST_LENGTH] ;
char cString[SHA512_DIGEST_LENGTH*2+1] ;
int nSize ;
char *cInput ;
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( RING_API_ISSTRING(1) ) {
cInput = RING_API_GETSTRING(1) ;
nSize = RING_API_GETSTRINGSIZE(1) ;
SHA512((unsigned char *) cInput, nSize, (unsigned char *) &digest);
ring_vm_openssl_buf2hex (digest, SHA512_DIGEST_LENGTH, cString);
RING_API_RETSTRING(cString);
} else {
RING_API_ERROR(RING_API_BADPARATYPE);
}
}
void ring_vm_openssl_sha384_init ( void *pPointer )
{
if ( RING_API_PARACOUNT != 0 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
else {
SHA512_CTX* pValue;
pValue = (SHA512_CTX *) ring_state_malloc(((VM *) pPointer)->pRingState,sizeof(SHA512_CTX)) ;
SHA384_Init (pValue);
RING_API_RETMANAGEDCPOINTER(pValue,"SHA384_CTX",ring_state_free);
}
}
void ring_vm_openssl_sha384_update ( void *pPointer )
{
int nSize ;
char *cInput ;
SHA512_CTX* pValue ;
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISCPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISSTRING(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
pValue = (SHA512_CTX *) RING_API_GETCPOINTER(1,"SHA384_CTX") ;
if ( ! pValue ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
cInput = RING_API_GETSTRING(2) ;
nSize = RING_API_GETSTRINGSIZE(2) ;
RING_API_RETNUMBER(SHA384_Update(pValue, cInput, (unsigned long) nSize));
}
void ring_vm_openssl_sha384_final ( void *pPointer )
{
unsigned char digest[SHA384_DIGEST_LENGTH] ;
char cString[SHA384_DIGEST_LENGTH*2+1] ;
SHA512_CTX* pValue ;
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISCPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
}
pValue = (SHA512_CTX *) RING_API_GETCPOINTER(1,"SHA384_CTX") ;
if ( ! pValue ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
SHA384_Final (digest, pValue);
ring_vm_openssl_buf2hex (digest, SHA384_DIGEST_LENGTH, cString);
RING_API_RETSTRING(cString);
}
void ring_vm_openssl_sha384 ( void *pPointer )
{
unsigned char digest[SHA384_DIGEST_LENGTH] ;
char cString[SHA384_DIGEST_LENGTH*2+1] ;
int nSize ;
char *cInput ;
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( RING_API_ISSTRING(1) ) {
cInput = RING_API_GETSTRING(1) ;
nSize = RING_API_GETSTRINGSIZE(1) ;
SHA384((unsigned char *) cInput, nSize, (unsigned char *) &digest);
ring_vm_openssl_buf2hex (digest, SHA384_DIGEST_LENGTH, cString);
RING_API_RETSTRING(cString);
} else {
RING_API_ERROR(RING_API_BADPARATYPE);
}
}
void ring_vm_openssl_sha224_init ( void *pPointer )
{
if ( RING_API_PARACOUNT != 0 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
else {
SHA256_CTX* pValue;
pValue = (SHA256_CTX *) ring_state_malloc(((VM *) pPointer)->pRingState,sizeof(SHA256_CTX)) ;
SHA224_Init (pValue);
RING_API_RETMANAGEDCPOINTER(pValue,"SHA224_CTX",ring_state_free);
}
}
void ring_vm_openssl_sha224_update ( void *pPointer )
{
int nSize ;
char *cInput ;
SHA256_CTX* pValue ;
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISCPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
if ( ! RING_API_ISSTRING(2) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
pValue = (SHA256_CTX *) RING_API_GETCPOINTER(1,"SHA224_CTX") ;
if ( ! pValue ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
cInput = RING_API_GETSTRING(2) ;
nSize = RING_API_GETSTRINGSIZE(2) ;
RING_API_RETNUMBER(SHA224_Update(pValue, cInput, (unsigned long) nSize));
}
void ring_vm_openssl_sha224_final ( void *pPointer )
{
unsigned char digest[SHA224_DIGEST_LENGTH] ;
char cString[SHA224_DIGEST_LENGTH*2+1] ;
SHA256_CTX* pValue ;
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( ! RING_API_ISCPOINTER(1) ) {
RING_API_ERROR(RING_API_BADPARATYPE);
}
pValue = (SHA256_CTX *) RING_API_GETCPOINTER(1,"SHA224_CTX") ;
if ( ! pValue ) {
RING_API_ERROR(RING_API_BADPARATYPE);
return ;
}
SHA224_Final (digest, pValue);
ring_vm_openssl_buf2hex (digest, SHA224_DIGEST_LENGTH, cString);
RING_API_RETSTRING(cString);
}
void ring_vm_openssl_sha224 ( void *pPointer )
{
unsigned char digest[SHA224_DIGEST_LENGTH] ;
char cString[SHA224_DIGEST_LENGTH*2+1] ;
int nSize ;
char *cInput ;
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( RING_API_ISSTRING(1) ) {
cInput = RING_API_GETSTRING(1) ;
nSize = RING_API_GETSTRINGSIZE(1) ;
SHA224((unsigned char *) cInput, nSize, (unsigned char *) &digest);
ring_vm_openssl_buf2hex (digest, SHA224_DIGEST_LENGTH, cString);
RING_API_RETSTRING(cString);
} else {
RING_API_ERROR(RING_API_BADPARATYPE);
}
}
void ring_vm_openssl_versiontext ( void *pPointer )
{
if ( RING_API_PARACOUNT != 0 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
RING_API_RETSTRING(OPENSSL_VERSION_TEXT);
}
void ring_vm_openssl_version ( void *pPointer )
{
int nMajor,nMinor,nFix ;
List *pList ;
if ( RING_API_PARACOUNT != 0 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
nMajor = (int) ((OPENSSL_VERSION_NUMBER >> 28) & 0x000000FF);
nMinor = (int) ((OPENSSL_VERSION_NUMBER >> 20) & 0x000000FF);
nFix = (int) ((OPENSSL_VERSION_NUMBER >> 12) & 0x000000FF);
/* return a list: [major,minor, fix] */
pList = RING_API_NEWLIST ;
ring_list_addint_gc(((VM *) pPointer)->pRingState, pList, nMajor);
ring_list_addint_gc(((VM *) pPointer)->pRingState, pList, nMinor);
ring_list_addint_gc(((VM *) pPointer)->pRingState, pList, nFix);
RING_API_RETLIST(pList);
}
void ring_vm_openssl_randbytes ( void *pPointer )
{
unsigned char *cStr ;
int nNum1 ;
if ( RING_API_PARACOUNT != 1 ) {
RING_API_ERROR(RING_API_MISS1PARA);
return ;
}
if ( RING_API_ISNUMBER(1) ) {
nNum1 = (int) RING_API_GETNUMBER(1) ;
if ( nNum1 > 0 ) {
cStr = malloc(nNum1) ;
if ( cStr == NULL ) {
RING_API_ERROR(RING_OOM);
return ;
}
if ( RAND_bytes(cStr,nNum1) ) {
RING_API_RETSTRING2((const char *) cStr,nNum1);
}
else {
RING_API_ERROR(RING_API_INTERNALFAILURE);
}
free(cStr);
} else {
RING_API_ERROR(RING_API_BADPARATYPE);
}
} else {
RING_API_ERROR(RING_API_BADPARATYPE);
}
}
static void list_ciphers_fn(const OBJ_NAME *name, void *arg)
{
const char *cStr = name->name ;
const EVP_CIPHER *cipher;
ListCipherArg* pCipherArg = (ListCipherArg*) arg;
if (!islower((unsigned char)*cStr))
return;
/* Filter out ciphers that we cannot use */
cipher = EVP_get_cipherbyname(cStr);
if (cipher == NULL)
return;
/* add only if the string doesn't already exist in the list*/
if ( (ring_list_getsize(pCipherArg->pList) == 0) || (ring_list_findstring(pCipherArg->pList,cStr,0) < 1) ) {
ring_list_addstring_gc(((VM *) pCipherArg->pPointer)->pRingState,pCipherArg->pList,cStr);
}
}
void ring_vm_openssl_list_ciphers ( void *pPointer )
{
List *pList ;
ListCipherArg cipherArg;
if ( RING_API_PARACOUNT != 0 ) {
RING_API_ERROR(RING_API_BADPARACOUNT);
return ;
}
else {
pList = RING_API_NEWLIST ;
cipherArg.pList = pList;
cipherArg.pPointer = pPointer;
OBJ_NAME_do_all_sorted(OBJ_NAME_TYPE_CIPHER_METH, list_ciphers_fn, &cipherArg);
RING_API_RETLIST(pList);
}
}
```
|
The Bridges Point 24 is an American trailerable sailboat that was designed by Joel White as a daysailer and cruiser and first built in 1985.
Production
The design was built by Bridges Point Boatyard, starting in 1985 and later by the Bridges Point Boat Company in Bar Harbor, Maine, United States and remains in production.
The boat was originally a 1984 design commission by Wade Dow, a local lobster fisherman, who wanted a boat to sail in the off-season, with an emphasis on traditional aesthetics. Dow put the boat into production and produced 80 examples over 25 years. In 2008, with waning demand, the molds were put into storage.
In 2012 Dow offered the molds to Jock Williams of the John Williams Boat Company to restart production, but Williams declined. The molds were instead purchased by an employee of his, Bill Wright, the production department manager, who formed the Bridges Point Boat Company to produce the design.
Design
The Bridges Point 24 is a recreational keelboat, built predominantly of seven-layer, hand laid fiberglass, with extensive wood trim. It has a fractional sloop rig; a spooned, raked stem; a raised counter, angled transom; a lazarette; a keel-mounted rudder controlled by a tiller and a fixed long keel. It displaces and carries of lead ballast.
The boat has a draft of with the standard keel.
The boat has a choice of inboard Yanmar diesel engines or gasoline engines, or outboard motors for docking and maneuvering. If an outboard motor is fitted it is mounted in a stern well.
The design has sleeping accommodation for four people, with a double "V"-berth in the bow cabin and two quarter berths aft, under the cockpit. The galley is located on the port side just forward of the companionway ladder. The galley is equipped with a two-burner stove and a sink, with an icebox optional. The head is portable type. Cabin headroom is .
During early production a daysailer or cruiser option was offered. The former has a longer cockpit and smaller cabin. Kits for amateur completion were also offered.
The design has a PHRF racing average handicap of 246 and a hull speed of .
Operational history
The boat is supported by an active class club that organizes racing events, the Bridges Point Sailing Club.
In a 2010 review of the Bridges Point Boatyard model, Steve Henkel wrote, "Best features: This boat features very high quality construction in the Maine boatyard tradition. If you buy new, you can have pretty much whatever kind of boat you want. Worst feature: New or used, you'd better bring your checkbook with
you—the one for the account with lots of disposable cash."
See also
List of sailing boat types
References
External links
Old official Bridges Point Boatyard website archives on Archive.org
Keelboats
1980s sailboat type designs
Sailing yachts
Trailer sailers
Sailboat type designs by Joel White
Sailboat types built by Bridges Point Boat Company
Sailboat types built by Bridges Point Boatyard
|
Jamal Mustafa (born Terrance Ladd Blalock) is an American professional wrestler, better known by his ring name, Mustafa Saed. He is best known for his appearances with Smoky Mountain Wrestling and Extreme Championship Wrestling in the 1990s.
Professional wrestling career
Early career (1990–1994)
Mustafa was trained as a professional wrestler by Gene Anderson. He made his debut on the August 18 (taped August 6), 1990 episode of WCW Worldwide teaming with Scott Williams in a match against WCW World Tag Team Champions Doom. He would make his singles debut against J.W. Storm on the October 27, 1990 edition of World Championship Wrestling. Over the following years made appearances with the World Wrestling Federation and World Championship Wrestling as a jobber.
Smoky Mountain Wrestling (1994–1995)
In 1994 at Smokey Mountain Wrestling, the pairing of Saed, New Jack and, for a brief time, D'Lo Brown were collectively known as The Gangstas. A controversial gimmick, the Gangstas would cut promos about activist Medgar Evers and O. J. Simpson to infuriate the southern white crowd, they would also use fried chicken and watermelons as props and would win matches via only a two count rather than the conventional three count purportedly due to Affirmative Action. The Gangstas would feud with The Rock 'n' Roll Express for several months in chase of the SMW Tag Team Championship which they would eventually win on October 3 but would lose the titles back the Rock 'n' Roll Express two months later. After the loss, the Gangstas would feud with teams such as Tony Anthony and Tracy Smothers and The Heavenly Bodies. In 1995 The Gangstas, now consisting of only Saed and New Jack, left SMW in a controversial fashion which escalated the long-standing dispute between Paul Heyman and Jim Cornette.
Extreme Championship Wrestling (1995–1997, 1999)
Making their Extreme Championship Wrestling debut on June 27 at Barbed Wire, Hoodies & Chokeslams, and their Hardcore TV debut on July 20, the Gangstas would quickly become faces and a draw for ECW, regularly bringing weapons such as guitars, crutches and staple guns in trash cans and shopping carts to the ring. The Gangstas would enter a lengthy feud with the Public Enemy that would last until the beginning of 1996 where the Public Enemy would beat the Gangstas in a street fight. Several months later the Gangstas would feud with the Eliminators, challenging them for the ECW World Tag Team Championship on several occasions before finally winning them on August 3 at The Doctor Is In. Although they lost the titles several months later in December, they would become two-time champions on July 19, 1997 at Heat Wave. Following the loss of the second championship, Saed split with New Jack and left ECW.
Saed would return to ECW on February 12, 1999 at Crossing the Line '99 in Queens, New York. Mustafa reunited with New Jack to battle the Dudley Boys, only for Mustafa to attack his partner, revealing himself as the mysterious benefactor who wanted to run the Public Enemy and New Jack out of ECW. Now known as Mr. Mustafa, he would be defeated by New Jack at Living Dangerously 1999 and leave the company again by May.
Independent circuit (1997–present)
Saed would wrestle for the top Puerto Rican promotion, World Wrestling Council between 1999 and 2001 where he would win the WWC Puerto Rico Heavyweight Championship once, the WWC World Television Championship once and the WWC World Tag Team Championship once with Rastaman. In 2000, Saed would go on his first and only tour of Japan with Big Japan Pro Wrestling where he participated in the World Extreme Cup 2000.
On August 8, 2010, Saed and New Jack reunited for a single night at the Total Nonstop Action Wrestling pay-per-view Hardcore Justice, assaulting Team 3D and Joel Gertner after a match.
Nowadays, Mustafa appears regularly with Supreme Pro Wrestling, All Pro Wrestling, Portland Wrestling, and the Sacramento Wrestling Federation.
Championships and accomplishments
All Pro Wrestling
APW/Vendetta Pro Unified Tag Team Championship (1 time) - with Boyce LeGrande
APW Tag Team Championship (1 time) - with Boyce LeGrande
Coastal Pro Wrestling
CPW Television Championship (1 time)
Extreme Championship Wrestling
ECW World Tag Team Championship (2 times) - with New Jack
Extreme Wrestling Alliance
EWA Heavyweight Championship (3 times)
North Georgia Wrestling Alliance
NGWA Tag Team Championship (1 time) - with New Jack
Pro Wrestling Bushido
PWB Tag Team Championship (1 time) - with Cjay Kurz
Pro Wrestling Illustrated
Ranked No. 427 of the 500 best singles wrestlers during the PWI Years in 2003
Smoky Mountain Wrestling
SMW Tag Team Championship (1 time) - with New Jack
Supreme Pro Wrestling
SPW Tag Team Championship (1 time) - with RJ Bishop
Vendetta Pro Wrestling
Unified Tag-Team Championship (1 time) - with Boyce LeGrande
World Wrestling Council
WWC Puerto Rico Heavyweight Championship (1 time)
WWC World Tag Team Championship (1 time) - with Rastaman
WWC World Television Championship (1 time)
References
External links
1963 births
21st-century African-American people
20th-century African-American sportspeople
African-American male professional wrestlers
American male professional wrestlers
ECW World Tag Team Champions
Living people
People from Kings Mountain, North Carolina
Professional wrestlers from North Carolina
20th-century professional wrestlers
WWC Puerto Rico Champions
WWC Television Champions
SMW Tag Team Champions
|
```javascript
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
(function MaterializeStrictArguments() {
"use strict"
function f(x, y) {
return x + y;
}
function test1() {
%DeoptimizeNow();
return f.apply(null, arguments);
}
assertEquals(test1(1, 2), 3);
assertEquals(test1(1, 2, 3), 3);
%OptimizeFunctionOnNextCall(test1);
assertEquals(test1(1, 2), 3);
%OptimizeFunctionOnNextCall(test1);
assertEquals(test1(1, 2, 3), 3);
})();
(function MaterializeSloppyArguments() {
function f(x, y) {
return x + y;
}
function test2() {
%DeoptimizeNow();
return f.apply(null, arguments);
}
assertEquals(test2(1, 2), 3);
assertEquals(test2(1, 2, 3), 3);
%OptimizeFunctionOnNextCall(test2);
assertEquals(test2(1, 2), 3);
%OptimizeFunctionOnNextCall(test2);
assertEquals(test2(1, 2, 3), 3);
})();
(function MaterializeStrictOverwrittenArguments() {
"use strict"
function f(x, y) {
return x + y;
}
function test3(a, b) {
a = 4;
%DeoptimizeNow();
return f.apply(null, arguments);
}
assertEquals(test3(1, 2), 3);
assertEquals(test3(1, 2, 3), 3);
%OptimizeFunctionOnNextCall(test3);
assertEquals(test3(11, 12), 23);
%OptimizeFunctionOnNextCall(test3);
assertEquals(test3(11, 12, 13), 23);
})();
(function MaterializeSloppyOverwrittenArguments() {
function f(x, y) {
return x + y;
}
function test4(a, b) {
a = 4;
%DeoptimizeNow();
return f.apply(null, arguments);
}
test4(1, 2);
test4(3, 4, 5);
assertEquals(test4(1, 2), 6);
assertEquals(test4(1, 2, 3), 6);
%OptimizeFunctionOnNextCall(test4);
assertEquals(test4(1, 2), 6);
%OptimizeFunctionOnNextCall(test4);
assertEquals(test4(1, 2, 3), 6);
})();
(function ArgumentsAccessStrict () {
"use strict"
function sum1(a,b,c) {
var sum = 0;
var rest = arguments;
for (var i = 0; i < rest.length; ++i) {
var j = i;
if (rest.length % 15 == 0 && i == 10) j += 10000;
sum += rest[j] || i+1;
}
return sum;
};
var args = []
for (var i = 1; i < 30; ++i) {
args.push(i);
if (i%10 == 0) %OptimizeFunctionOnNextCall(sum1);
assertEquals(i*(i+1)/2, sum1(...args));
}
})();
(function ArgumentsAccessSloppy () {
function sum2(a,b,c) {
var sum = 0;
for (var i = 0; i < arguments.length; ++i) {
var j = i;
if (arguments.length % 15 == 0 && i == 10) j += 10000;
sum += arguments[j] || i+1;
}
return sum;
};
var args = []
for (var i = 1; i < 30; ++i) {
args.push(i);
if (i%10 == 0) %OptimizeFunctionOnNextCall(sum2);
assertEquals(i*(i+1)/2, sum2(...args));
}
})();
(function RestAccess0 () {
function sum3(...rest) {
var sum = 0;
for (var i = 0; i < rest.length; ++i) {
var j = i;
if (rest.length % 15 == 0 && i == 10) j += 10000;
sum += rest[j] || i+1;
}
return sum;
};
var args = []
for (var i = 1; i < 30; ++i) {
args.push(i);
if (i%10 == 0) %OptimizeFunctionOnNextCall(sum3);
assertEquals(i*(i+1)/2, sum3(...args));
}
})();
(function RestAccess1 () {
function sum4(a,...rest) {
var sum = 0;
for (var i = 0; i < rest.length; ++i) {
var j = i;
if (rest.length % 15 == 0 && i == 10) j += 10000;
sum += rest[j] || i+2;
}
return sum;
};
var args = []
for (var i = 1; i < 30; ++i) {
args.push(i);
if (i%10 == 0) %OptimizeFunctionOnNextCall(sum4);
assertEquals(i*(i+1)/2-1, sum4(...args));
}
})();
(function ReadArguments () {
function read() {
if (arguments.length % 10 == 5) %DeoptimizeNow();
return arguments[arguments.length-1];
};
var args = []
for (var i = 1; i < 30; ++i) {
args.push(i);
if (i%10 == 0) %OptimizeFunctionOnNextCall(read);
assertEquals(i, read(...args));
}
})();
```
|
```c++
/*!
@file
Forward declares `boost::hana::Searchable`.
@copyright Louis Dionne 2013-2017
(See accompanying file LICENSE.md or copy at path_to_url
*/
#ifndef BOOST_HANA_FWD_CONCEPT_SEARCHABLE_HPP
#define BOOST_HANA_FWD_CONCEPT_SEARCHABLE_HPP
#include <boost/hana/config.hpp>
BOOST_HANA_NAMESPACE_BEGIN
//! @ingroup group-concepts
//! @defgroup group-Searchable Searchable
//! The `Searchable` concept represents structures that can be searched.
//!
//! Intuitively, a `Searchable` is any structure, finite or infinite,
//! containing elements that can be searched using a predicate. Sometimes,
//! `Searchable`s will associate keys to values; one can search for a key
//! with a predicate, and the value associated to it is returned. This
//! gives rise to map-like data structures. Other times, the elements of
//! the structure that are searched (i.e. those to which the predicate is
//! applied) are the same that are returned, which gives rise to set-like
//! data structures. In general, we will refer to the _keys_ of a
//! `Searchable` structure as those elements that are used for searching,
//! and to the _values_ of a `Searchable` as those elements that are
//! returned when a search is successful. As was explained, there is no
//! requirement that both notions differ, and it is often useful to have
//! keys and values coincide (think about `std::set`).
//!
//! Some methods like `any_of`, `all_of` and `none_of` allow simple queries
//! to be performed on the keys of the structure, while other methods like
//! `find` and `find_if` make it possible to find the value associated
//! to a key. The most specific method should always be used if one
//! cares about performance, because it is usually the case that heavy
//! optimizations can be performed in more specific methods. For example,
//! an associative data structure implemented as a hash table will be much
//! faster to access using `find` than `find_if`, because in the second
//! case it will have to do a linear search through all the entries.
//! Similarly, using `contains` will likely be much faster than `any_of`
//! with an equivalent predicate.
//!
//! > __Insight__\n
//! > In a lazy evaluation context, any `Foldable` can also become a model
//! > of `Searchable` because we can search lazily through the structure
//! > with `fold_right`. However, in the context of C++, some `Searchable`s
//! > can not be folded; think for example of an infinite set.
//!
//!
//! Minimal complete definition
//! ---------------------------
//! `find_if` and `any_of`
//!
//! When `find_if` and `any_of` are provided, the other functions are
//! implemented according to the laws explained below.
//!
//! @note
//! We could implement `any_of(xs, pred)` by checking whether
//! `find_if(xs, pred)` is an empty `optional` or not, and then reduce
//! the minimal complete definition to `find_if`. However, this is not
//! done because that implementation requires the predicate of `any_of`
//! to return a compile-time `Logical`, which is more restrictive than
//! what we have right now.
//!
//!
//! Laws
//! ----
//! In order for the semantics of the methods to be consistent, some
//! properties must be satisfied by any model of the `Searchable` concept.
//! Rigorously, for any `Searchable`s `xs` and `ys` and any predicate `p`,
//! the following laws should be satisfied:
//! @code
//! any_of(xs, p) <=> !all_of(xs, negated p)
//! <=> !none_of(xs, p)
//!
//! contains(xs, x) <=> any_of(xs, equal.to(x))
//!
//! find(xs, x) == find_if(xs, equal.to(x))
//! find_if(xs, always(false_)) == nothing
//!
//! is_subset(xs, ys) <=> all_of(xs, [](auto x) { return contains(ys, x); })
//! is_disjoint(xs, ys) <=> none_of(xs, [](auto x) { return contains(ys, x); })
//! @endcode
//!
//! Additionally, if all the keys of the `Searchable` are `Logical`s,
//! the following laws should be satisfied:
//! @code
//! any(xs) <=> any_of(xs, id)
//! all(xs) <=> all_of(xs, id)
//! none(xs) <=> none_of(xs, id)
//! @endcode
//!
//!
//! Concrete models
//! ---------------
//! `hana::map`, `hana::optional`, `hana::range`, `hana::set`,
//! `hana::string`, `hana::tuple`
//!
//!
//! Free model for builtin arrays
//! -----------------------------
//! Builtin arrays whose size is known can be searched as-if they were
//! homogeneous tuples. However, since arrays can only hold objects of
//! a single type and the predicate to `find_if` must return a compile-time
//! `Logical`, the `find_if` method is fairly useless. For similar reasons,
//! the `find` method is also fairly useless. This model is provided mainly
//! because of the `any_of` method & friends, which are both useful and
//! compile-time efficient.
//!
//!
//! Structure preserving functions
//! ------------------------------
//! Given two `Searchables` `S1` and `S2`, a function
//! @f$ f : S_1(X) \to S_2(X) @f$ is said to preserve the `Searchable`
//! structure if for all `xs` of data type `S1(X)` and predicates
//! @f$ \mathtt{pred} : X \to Bool @f$ (for a `Logical` `Bool`),
//! @code
//! any_of(xs, pred) if and only if any_of(f(xs), pred)
//! find_if(xs, pred) == find_if(f(xs), pred)
//! @endcode
//!
//! This is really just a generalization of the following, more intuitive
//! requirements. For all `xs` of data type `S1(X)` and `x` of data type
//! `X`,
//! @code
//! x ^in^ xs if and only if x ^in^ f(xs)
//! find(xs, x) == find(f(xs), x)
//! @endcode
//!
//! These requirements can be understood as saying that `f` does not
//! change the content of `xs`, although it may reorder elements.
//! As usual, such a structure-preserving transformation is said to
//! be an embedding if it is also injective, i.e. if it is a lossless
//! transformation.
template <typename S>
struct Searchable;
BOOST_HANA_NAMESPACE_END
#endif // !BOOST_HANA_FWD_CONCEPT_SEARCHABLE_HPP
```
|
Hounsdown School is a secondary school in Totton, near Southampton, Hampshire, England The school has 1,215 pupils, spanning ages 11 to 16. Classes are held in renovated 1960s buildings and new specialist blocks built since 2000.
Science College and Academy status
Hounsdown gained Science College status in 2005, and the school changed its official title to 'Hounsdown School – A Science College'. With the new title came a new logo, new uniform and a £500,000 government grant to be spent on science equipment. However, rather than spending all the money on science equipment, part was spent to buy a new sports hall.
On 1 August 2011, Hounsdown School officially gained academy status.
Ofsted
The school's most recent Ofsted inspection judgement, in 2017, was Outstanding.
Department for Education Investment
In May 2013, Hounsdown School was successful in achieving approximately £1.3 million for essential Capital refurbishments/decorating works.
Structure
Pupils begin at the school in year seven, most having attended one of the three feeder primary schools: Abbotswood Junior School (majority), Bartley Junior School or Foxhills Junior School. Until KS3 SATs were abandoned nationally, pupils studied the Key Stage 3 syllabus until the SATs. In 2005, instead of taking SATs in year nine, the decision was taken that students would take them in year 8 to give students an extra year of GCSE help. They then pick a cycle of three subjects at the end of year 8 (e.g. drama, music, history) and a language to carry on into year nine. Students then try out these subjects and pick their final GCSE options at the end of year nine, which they could drop at any time during year 10. Many schools in Scotland and Wales use a more traditional system, which, in year nine, has pupils consolidating their learning from primary school and KS3. GCSE courses start for all subjects in year 10, with the examinations held during the summer term of year 11. Pupils can then enter employment, or continue their education at 6th Form College.
Colleges which most students go onto from Hounsdown are Totton, and Brockenhurst.
Key Stage Four
Unlike most schools, pupils at Hounsdown start studying for their GCSE in year nine, rather than year 10. The pupils choose their GCSE options at the start of year nine, but they can be changed at the start of year 10 at the pupil's behest. Compulsory subjects including Science, Mathematics, English, ICT and Religious Education (also known as Applied Ethics) although this may be subject to change. Students were previously required to take one foreign language as well as a course from the Design and Technology category but these are no longer compulsory.
Most students take their final GCSE exams in Year 11 but some students take them in Year 10 for particular subjects. Coursework, commonly associated with subjects such as Art and Design and Technology, is also accounted towards their final GCSE grades.
Resource centre
The Resources Centre provides a wide range of materials for pupils to use for their coursework in different subjects. The Resources Centre is involved with the Hampshire Book Award, and pupils regularly review new books for the school's library service.
The library keeps audio tapes, CDs, and computers, the latter of which include word-processing programs. Photocopying and document-production is also available at the library. The Library has movie editing facilities and has a range of Technical Resources.
Facilities/ Sport
The school provides for hire a swimming pool (although this has been block booked by the Swim School Academy for the last couple of years and is no longer available for other clubs), two rugby pitches, two football pitches, their classrooms, the sports hall and the Library (Resources Centre). The Main hall provides a large and flexible staging area where concerts and productions are regularly performed, and is also equipped with lighting and PA theatre equipment. The School provides 6 ICT suites and in early 2013, the school applied for funding for an Apple Mac suite, now situated in the Art block. The Library (Resources Centre) was recently refurbished in 2009 and provides a vast array of books, as well as 50 Networked computers, and a number of Apple Macs. The school has 10 science laboratories, a sports hall and 3 Drama studios and a brand new dance studio, each fitted with multi-fixture lighting rigs and PA systems, also used for lower scale productions. In 2014, the East Block was completed of Re-cladding, a brand-new purpose built Dance Studio was built next to the Sports Hall and the Music areas were refurbished with the inclusion of a new recording studio for GCSE work and professional standard compositions. In 2005, the year 10 team reached the National Cup Semi-Finals losing to Bayhouse in Fareham, Matt Ritchie, who now plays for Newcastle scored 2 goals. In 2018, The year 9 football team successfully reached the national cup quarter finals after defeating Steyning grammar school (Worthing, Sussex) with goals from Harvey Hughes, Joseph “Jando” Stevens, Callum Stratton and Billy Lightfoot.
In 2020 a new history block was established and has now been completed, no temporary classrooms were needed as the new state-of-the-art block was built in a different area of the school grounds.
Hounsdown Eco-School status
Hounsdown has an eco-school system that consists of 72 representatives (2 from each tutor group). There is an eco-school club that runs every Monday at lunchtime, which is led by the science department's community links class teacher and is run mainly by the lead team that consists of pupils from all years that have shown a high interest in Eco schools. The school has won the bronze and silver awards and achieved the green flag which was raised on 22 October 2009.
Organic garden project
The Organic Garden Project is a project funded by the Young Roots Lottery fund. The project is a pupil-led, fully functional organic garden behind the drama and sports hall it was opened by Chris Packham in 2009.
BBC School Report
Hounsdown is part of the Annual BBC Project – BBC School Report – during the time in which the school has been running the project, they have created many Reports which can be viewed on the school website, including a report on the Closure of the Southampton General Heart Unit, which was broadcast on live BBC South Today on 25 March 2011.
Drink spike scandal
The school was in the news in 2015 due to an incident that took place in a Year 11 class. A pupil's drink was spiked with hydrochloric acid. Two students were suspended over the incident pending investigation. These students were then allowed to return to the school on an isolated basis.
References
External links
Secondary schools in Hampshire
Academies in Hampshire
|
```julia
#!/usr/bin/env julia
#
# @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.
import Distributions: var, Hypergeometric
import JSON
"""
gen( N, K, n, name )
Generate fixture data and write to file.
# Arguments
* `N`: population size
* `K`: subpopulation size
* `n`: number of draws
* `name::AbstractString`: output filename
# Examples
``` julia
julia> N = round.( ( rand( 1000 ) .* 200 ) .+ 20 );
julia> K = round.( rand( 1000 ) .* N );
julia> n = round.( rand( 1000 ) .* K );
julia> gen( N, K, n, "data.json" );
```
"""
function gen( N, K, n, name )
z = Array{Float64}( undef, length(N) );
for i in eachindex(N)
z[ i ] = var( Hypergeometric( K[i], N[i] - K[i], n[i] ) );
end
# Store data to be written to file as a collection:
data = Dict([
("N", N),
("K", K),
("n", n),
("expected", z)
]);
# Based on the script directory, create an output filepath:
filepath = joinpath( dir, name );
# Write the data to the output filepath as JSON:
outfile = open( filepath, "w" );
write( outfile, JSON.json(data) );
write( outfile, "\n" );
close( outfile );
end
# Get the filename:
file = @__FILE__;
# Extract the directory in which this file resides:
dir = dirname( file );
# Generate fixtures:
N = round.( ( rand( 100 ) .* 200 ) .+ 20 );
K = round.( rand( 100 ) .* N );
n = round.( rand( 100 ) .* K );
gen( N, K, n, "data.json" );
```
|
```java
//
//
// 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 google.registry.tmch;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.net.HttpHeaders.LOCATION;
import static com.google.common.net.MediaType.CSV_UTF_8;
import static google.registry.persistence.transaction.QueryComposer.Comparator.EQ;
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
import static google.registry.request.UrlConnectionUtils.getResponseBytes;
import static google.registry.tmch.LordnTaskUtils.COLUMNS_CLAIMS;
import static google.registry.tmch.LordnTaskUtils.COLUMNS_SUNRISE;
import static google.registry.tmch.LordnTaskUtils.getCsvLineForClaimsDomain;
import static google.registry.tmch.LordnTaskUtils.getCsvLineForSunriseDomain;
import static jakarta.servlet.http.HttpServletResponse.SC_ACCEPTED;
import static java.nio.charset.StandardCharsets.US_ASCII;
import com.google.api.client.http.HttpMethods;
import com.google.cloud.tasks.v2.Task;
import com.google.common.base.Ascii;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMultimap;
import com.google.common.flogger.FluentLogger;
import google.registry.batch.CloudTasksUtils;
import google.registry.config.RegistryConfig.Config;
import google.registry.model.domain.Domain;
import google.registry.request.Action;
import google.registry.request.Action.Service;
import google.registry.request.Parameter;
import google.registry.request.RequestParameters;
import google.registry.request.UrlConnectionService;
import google.registry.request.UrlConnectionUtils;
import google.registry.request.auth.Auth;
import google.registry.tmch.LordnTaskUtils.LordnPhase;
import google.registry.util.Clock;
import google.registry.util.Retrier;
import google.registry.util.UrlConnectionException;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
import java.security.GeneralSecurityException;
import java.security.SecureRandom;
import java.util.List;
import java.util.Optional;
import java.util.Random;
import javax.inject.Inject;
import org.joda.time.Duration;
/**
* Action that reads the NORDN pull queues, uploads claims and sunrise marks data to TMCH, and
* enqueues subsequent upload verification tasks. A unique actionLogId is generated and passed along
* to the verify action so that connected verify tasks can be identified by looking at logs.
*
* @see NordnVerifyAction
*/
@Action(
service = Action.Service.BACKEND,
path = NordnUploadAction.PATH,
method = Action.Method.POST,
automaticallyPrintOk = true,
auth = Auth.AUTH_ADMIN)
public final class NordnUploadAction implements Runnable {
static final String PATH = "/_dr/task/nordnUpload";
static final String LORDN_PHASE_PARAM = "lordnPhase";
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
/**
* A unique (enough) id that is outputted in log lines to make it clear which log lines are
* associated with a given invocation of the NordnUploadAction in the event that multiple
* instances execute simultaneously.
*/
private final String actionLogId = String.valueOf(1000000000 + new Random().nextInt(1000000000));
@Inject Clock clock;
@Inject Retrier retrier;
@Inject SecureRandom random;
@Inject LordnRequestInitializer lordnRequestInitializer;
@Inject UrlConnectionService urlConnectionService;
@Inject
@Config("tmchMarksdbUrl")
String tmchMarksdbUrl;
@Inject
@Parameter(LORDN_PHASE_PARAM)
String phase;
@Inject
@Parameter(RequestParameters.PARAM_TLD)
String tld;
@Inject CloudTasksUtils cloudTasksUtils;
@Inject
NordnUploadAction() {}
/**
* These LORDN parameter names correspond to the relative paths in LORDN URLs and cannot be
* changed on our end.
*/
private static final String PARAM_LORDN_PHASE_SUNRISE =
Ascii.toLowerCase(LordnPhase.SUNRISE.toString());
private static final String PARAM_LORDN_PHASE_CLAIMS =
Ascii.toLowerCase(LordnPhase.CLAIMS.toString());
/** How long to wait before attempting to verify an upload by fetching the log. */
private static final Duration VERIFY_DELAY = Duration.standardMinutes(30);
@Override
public void run() {
checkArgument(
phase.equals(PARAM_LORDN_PHASE_SUNRISE) || phase.equals(PARAM_LORDN_PHASE_CLAIMS),
"Invalid phase specified to NordnUploadAction: %s.",
phase);
Optional<URL> uploadUrl =
tm().transact(
() -> {
// Note here that we load all domains pending Nordn in one batch, which should not
// be a problem for the rate of domain registration that we see. If we anticipate
// a peak in claims during TLD launch (sunrise is NOT first-come-first-serve, so
// there should be no expectation of a peak during it), we can consider
// temporarily increasing the frequency of Nordn upload to reduce the size of each
// batch.
//
// We did not further divide the domains into smaller batches because the
// read-upload-write operation per small batch needs to be inside a single
// transaction to prevent race conditions, and running several uploads in rapid
// succession will likely overwhelm the MarksDB upload server, which recommends a
// maximum upload frequency of every 3 hours.
//
// See:
// path_to_url#section-5.2.3.3
List<Domain> domains =
tm().createQueryComposer(Domain.class)
.where("lordnPhase", EQ, LordnPhase.valueOf(Ascii.toUpperCase(phase)))
.where("tld", EQ, tld)
.orderBy("creationTime")
.list();
if (domains.isEmpty()) {
return Optional.empty();
}
StringBuilder csv = new StringBuilder();
ImmutableList.Builder<Domain> newDomains = new ImmutableList.Builder<>();
domains.forEach(
domain -> {
if (phase.equals(PARAM_LORDN_PHASE_SUNRISE)) {
csv.append(getCsvLineForSunriseDomain(domain)).append('\n');
} else {
csv.append(getCsvLineForClaimsDomain(domain)).append('\n');
}
Domain newDomain =
domain.asBuilder().setLordnPhase(LordnPhase.NONE).build();
newDomains.add(newDomain);
});
String columns =
phase.equals(PARAM_LORDN_PHASE_SUNRISE) ? COLUMNS_SUNRISE : COLUMNS_CLAIMS;
String header =
String.format("1,%s,%d\n%s\n", clock.nowUtc(), domains.size(), columns);
try {
URL url =
uploadCsvToLordn(String.format("/LORDN/%s/%s", tld, phase), header + csv);
tm().updateAll(newDomains.build());
return Optional.of(url);
} catch (IOException | GeneralSecurityException e) {
throw new RuntimeException(e);
}
});
uploadUrl.ifPresent(
url -> cloudTasksUtils.enqueue(NordnVerifyAction.QUEUE, makeVerifyTask(url)));
}
/**
* Upload LORDN file to MarksDB.
*
* <p>Idempotency: If the exact same LORDN report is uploaded twice, the MarksDB server will
* return the same confirmation number.
*
* @see <a href="path_to_url#section-6.3">TMCH
* functional specifications - LORDN File</a>
*/
private URL uploadCsvToLordn(String urlPath, String csvData)
throws IOException, GeneralSecurityException {
String url = tmchMarksdbUrl + urlPath;
logger.atInfo().log(
"LORDN upload task %s: Sending to URL: %s ; data: %s", actionLogId, url, csvData);
HttpURLConnection connection = urlConnectionService.createConnection(new URL(url));
connection.setRequestMethod(HttpMethods.POST);
lordnRequestInitializer.initialize(connection, tld);
UrlConnectionUtils.setPayloadMultipart(
connection, "file", "claims.csv", CSV_UTF_8, csvData, random);
try {
int responseCode = connection.getResponseCode();
if (logger.atInfo().isEnabled()) {
String responseContent = new String(getResponseBytes(connection), US_ASCII);
if (responseContent.isEmpty()) {
responseContent = "(null)";
}
logger.atInfo().log(
"LORDN upload task %s response: HTTP response code %d, response data: %s",
actionLogId, responseCode, responseContent);
}
if (responseCode != SC_ACCEPTED) {
throw new UrlConnectionException(
String.format(
"LORDN upload task %s error: Failed to upload LORDN claims to MarksDB",
actionLogId),
connection);
}
String location = connection.getHeaderField(LOCATION);
if (location == null) {
throw new UrlConnectionException(
String.format(
"LORDN upload task %s error: MarksDB failed to provide a Location header",
actionLogId),
connection);
}
return new URL(location);
} catch (IOException e) {
throw new IOException(String.format("Error connecting to MarksDB at URL %s", url), e);
} finally {
connection.disconnect();
}
}
private Task makeVerifyTask(URL url) {
// The actionLogId is used to uniquely associate the verify task back to the upload task.
return cloudTasksUtils.createPostTaskWithDelay(
NordnVerifyAction.PATH,
Service.BACKEND,
ImmutableMultimap.<String, String>builder()
.put(NordnVerifyAction.NORDN_URL_PARAM, url.toString())
.put(NordnVerifyAction.NORDN_LOG_ID_PARAM, actionLogId)
.put(RequestParameters.PARAM_TLD, tld)
.build(),
Duration.millis(VERIFY_DELAY.getMillis()));
}
}
```
|
```c++
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
#ident "$Id$"
/*
COPYING CONDITIONS NOTICE:
This program is free software; you can redistribute it and/or modify
published by the Free Software Foundation, and provided that the
following conditions are met:
* Redistributions of source code must retain this COPYING
CONDITIONS NOTICE, the COPYRIGHT NOTICE (below), the
DISCLAIMER (below), the UNIVERSITY PATENT NOTICE (below), the
PATENT MARKING NOTICE (below), and the PATENT RIGHTS
GRANT (below).
* Redistributions in binary form must reproduce this COPYING
CONDITIONS NOTICE, the COPYRIGHT NOTICE (below), the
DISCLAIMER (below), the UNIVERSITY PATENT NOTICE (below), the
PATENT MARKING NOTICE (below), and the PATENT RIGHTS
GRANT (below) in the documentation and/or other materials
provided with the distribution.
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
COPYRIGHT NOTICE:
TokuFT, Tokutek Fractal Tree Indexing Library.
DISCLAIMER:
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
UNIVERSITY PATENT NOTICE:
The technology is licensed by the Massachusetts Institute of
Technology, Rutgers State University of New Jersey, and the Research
Foundation of State University of New York at Stony Brook under
United States of America Serial No. 11/760379 and to the patents
and/or patent applications resulting from it.
PATENT MARKING NOTICE:
This software is covered by US Patent No. 8,185,551.
This software is covered by US Patent No. 8,489,638.
PATENT RIGHTS GRANT:
"THIS IMPLEMENTATION" means the copyrightable works distributed by
Tokutek as part of the Fractal Tree project.
"PATENT CLAIMS" means the claims of patents that are owned or
licensable by Tokutek, both currently or in the future; and that in
the absence of this license would be infringed by THIS
IMPLEMENTATION or by using or running THIS IMPLEMENTATION.
"PATENT CHALLENGE" shall mean a challenge to the validity,
patentability, enforceability and/or non-infringement of any of the
PATENT CLAIMS or otherwise opposing any of the PATENT CLAIMS.
Tokutek hereby grants to you, for the term and geographical scope of
the PATENT CLAIMS, a non-exclusive, no-charge, royalty-free,
irrevocable (except as stated in this section) patent license to
make, have made, use, offer to sell, sell, import, transfer, and
otherwise run, modify, and propagate the contents of THIS
IMPLEMENTATION, where such license applies only to the PATENT
CLAIMS. This grant does not include claims that would be infringed
only as a consequence of further modifications of THIS
IMPLEMENTATION. If you or your agent or licensee institute or order
or agree to the institution of patent litigation against any entity
(including a cross-claim or counterclaim in a lawsuit) alleging that
THIS IMPLEMENTATION constitutes direct or contributory patent
infringement, or inducement of patent infringement, then any rights
such litigation is filed. If you or your agent or exclusive
licensee institute or order or agree to the institution of a PATENT
CHALLENGE, then Tokutek may terminate any rights granted to you
*/
#include "logger/logcursor.h"
#include "test.h"
const int N = 2;
int
test_main (int argc, const char *argv[]) {
default_parse_args(argc, argv);
int r;
toku_os_recursive_delete(TOKU_TEST_FILENAME);
r = toku_os_mkdir(TOKU_TEST_FILENAME, S_IRWXU); assert(r==0);
TOKULOGGER logger;
LSN lsn = ZERO_LSN;
int helloseq = 0;
// create N log files with a hello message
for (int i=0; i<N; i++) {
r = toku_logger_create(&logger);
assert(r == 0);
r = toku_logger_open(TOKU_TEST_FILENAME, logger);
assert(r == 0);
char str[32];
sprintf(str, "hello%d", helloseq++);
BYTESTRING bs0 = { .len = (uint32_t) strlen(str), .data = str };
toku_log_comment(logger, &lsn, 0, 0, bs0);
r = toku_logger_close(&logger);
assert(r == 0);
}
// create N empty log files
for (int i=0; i<N; i++) {
r = toku_logger_create(&logger);
assert(r == 0);
r = toku_logger_open(TOKU_TEST_FILENAME, logger);
assert(r == 0);
r = toku_logger_close(&logger);
assert(r == 0);
}
// create N log files with a hello message
for (int i=0; i<N; i++) {
r = toku_logger_create(&logger);
assert(r == 0);
r = toku_logger_open(TOKU_TEST_FILENAME, logger);
assert(r == 0);
char str[32];
sprintf(str, "hello%d", helloseq++);
BYTESTRING bs0 = { .len = (uint32_t) strlen(str), .data = str };
toku_log_comment(logger, &lsn, 0, 0, bs0);
r = toku_logger_close(&logger);
assert(r == 0);
}
// verify the log forwards
TOKULOGCURSOR lc = NULL;
struct log_entry *le;
r = toku_logcursor_create(&lc, TOKU_TEST_FILENAME);
assert(r == 0 && lc != NULL);
helloseq = 0;
for (int i=0; i<2*N; i++) {
r = toku_logcursor_next(lc, &le);
assert(r == 0 && le->cmd == LT_comment);
char expect[32];
sprintf(expect, "hello%d", helloseq++);
assert(le->u.comment.comment.len == strlen(expect) && memcmp(le->u.comment.comment.data, expect, le->u.comment.comment.len) == 0);
}
r = toku_logcursor_next(lc, &le);
assert(r != 0);
r = toku_logcursor_destroy(&lc);
assert(r == 0 && lc == NULL);
// verify the log backwards
r = toku_logcursor_create(&lc, TOKU_TEST_FILENAME);
assert(r == 0 && lc != NULL);
helloseq = 2*N;
for (int i=0; i<2*N; i++) {
r = toku_logcursor_prev(lc, &le);
assert(r == 0 && le->cmd == LT_comment);
char expect[32];
sprintf(expect, "hello%d", --helloseq);
assert(le->u.comment.comment.len == strlen(expect) && memcmp(le->u.comment.comment.data, expect, le->u.comment.comment.len) == 0);
}
r = toku_logcursor_prev(lc, &le);
assert(r != 0);
r = toku_logcursor_destroy(&lc);
assert(r == 0 && lc == NULL);
toku_os_recursive_delete(TOKU_TEST_FILENAME);
return 0;
}
```
|
Betty McDonald (born 1950) is an Australian former cricketer who played as a left-arm medium bowler. She appeared in one Test match for Australia in 1976, and six One Day Internationals for International XI at the 1973 World Cup. She played domestic cricket for Western Australia and South Australia.
References
External links
Living people
1950 births
Cricketers from Western Australia
Australia women Test cricketers
International XI women One Day International cricketers
Western Australia women cricketers
South Australian Scorpions cricketers
Sportswomen from Western Australia
Place of birth missing (living people)
|
Darreh-ye Garm () is a village in Mazu Rural District, Alvar-e Garmsiri District, Andimeshk County, Khuzestan Province, Iran. At the 2006 census, its population was 18, in 4 families.
References
Populated places in Andimeshk County
|
Mattie may refer to:
Mattie (name), a list of people and fictional characters with the given name or nickname
Mattie, Piedmont, Italy, a municipality
Mattie, West Virginia, United States, a ghost town
Grace Bailey (schooner), known as Mattie for many years
See also
Matty (disambiguation)
Matti (disambiguation)
|
Trupanea distincta is a species of tephritid or fruit flies in the genus Trupanea of the family Tephritidae.
Distribution
Taiwan.
References
Tephritinae
Insects described in 1931
Diptera of Asia
|
```raw token data
IP ADDRESS MAC ADDRESS EXPIRE(M) TYPE INTERFACE VPN-INSTANCE
VLAN/CEVLAN(SIP/DIP)
your_sha256_hash--------------
192.168.1.253 b076-1b65-6a40 I - MEth0/0/1
10.10.10.1 b076-1b65-6a4b I - Vlanif10
10.10.10.2 b8d6-f6ff-739b 17 D-0 XGE0/0/1
10/-
10.10.20.1 b076-1b65-6a46 I - Vlanif20
10.10.20.2 b8d6-f6ff-7396 17 D-0 XGE0/0/1
20/-
your_sha256_hash--------------
Total:5 Dynamic:2 Static:0 Interface:3
```
|
"Cola" is a song by CamelPhat and Elderbrook, released as a single on 17 June 2017 by Defected Records. It was recorded, co-written, and produced by the British electronic house duo CamelPhat featuring vocals from Alexander "Elderbrook" Kotz, who was also a co-writer of the track.
It reached number one on Billboard's Dance Club Songs chart in November 2017, giving the collaboration their first American chart topper. The single was nominated for a Best Dance Recording at the 2018 Grammy Awards.
Track listing
Charts
Weekly charts
Year-end charts
Certifications
References
External links
2017 singles
2017 songs
CamelPhat songs
Elderbrook songs
Big Beat Records (American record label) singles
Electronic songs
House music songs
Song recordings produced by Elderbrook
Songs written by Elderbrook
Songs written by Mike Di Scala
|
```raw token data
IP Address and Netmask: 10.255.5.55 255.255.0.0 on VLAN 255,
Address Mode: User specified
```
|
Arthrostylidium judziewiczii is a species of Arthrostylidium bamboo in the grass family. The species is native to Central America, the West Indies, northern South America, and southern Mexico.
References
judziewiczii
|
```java
package org.liquidplayer.service;
import org.liquidplayer.javascript.JSValue;
/**
* Supported addons must expose a public {@code Object} that implements this interface. The
* object must expose a public constructor that takes {@code android.content.Context} as
* its lone parameter.
* <br><br>
* The package and naming of this class is extremely important. The class *must* be in
* the {@code org.liquidplayer.addon} package, and it must be named the same as the native
* module that will be requested by JavaScript, with the following exceptions:
* <br><br>
* 1. The first character must be capitalized<br>
* 2. Any non-alphanumeric or underscore ('_') characters must be ommitted and the *next*
* character capitalized.
* <br><br>
* For example, if node attempts to require "my-native-moDULE.node", LiquidCore will look for
* the class {@code org.liquidplayer.addon.MyNativeModULE} to resolve the addon.
*/
public interface AddOn {
/**
* When {@code require('<MODULE_NAME>.node')} is called from JavaScript, this method will
* be triggered if {@code <MODULE_NAME>} resolves to this class as described above. This method
* must then (1) load any required native libraries and (2) execute the
* {@code __register_<MODULE_NAME>()} static function created from {@code NODE_MODULE_*} macros
* in {@code node.h}.
*
* As a best practice, do not call {@code System.loadLibrary()} statically, but instead call
* it lazily when this method is triggered.
*
* @param module The name of the module to register.
*/
void register(String module);
/**
* Each time {@code require()} is called for this module from JS, this method will be triggered
* before returning the bound object to the caller. This is an opportunity to attach anything
* else to the object that may be required from Java before returning it to the caller.
*
* @param binding The native binding object.
* @param service The {@code #org.liquidplayer.service.MicroService} of this process
*/
void require(JSValue binding, MicroService service);
}
```
|
Kalise is a Spanish ice cream and dessert manufacturing company, established in 1960 and based on Las Palmas de Gran Canaria in the Canary Islands. The company was part of the "Grupo Kalise–La Menorquina S.A.", after merging with another ice cream company of Spain, La Menorquina. During that partnership, Kalise commercialised its products for public sale, while La Menorquina focused on the restaurant trade.
In 2017, both companies separated again when the GKM was acquired by Grupo Farga for EU 40 million. Since then, Kalise has remained as a separate company.
History
Following the World War II, businessman Fernando Pons Sintes founded "La Estrella" in 1950 on the island of Menorca, with the vision of taking ice cream and cake to the island's restaurants. Five years later in 1955, the company would be renamed from La Estrella, to "La Menorquina". By the mid-1950s, the company reached collaboration agreements with companies in Barcelona. In 1956, Sintes acquired the Mahon-based chocolate company La Tropical de Mahón, founded in 1883 and in which Sintes had worked as a baking apprentice.
In 1960, ice cream still remained a luxurious product, though the development of tourism and restaurants meant greater access to refrigerators, helping Sintes and La Menorquina gain presence on the islands. By the mid-1960s, increased competition attempting to capitalise on the tourism boost forced La Menorquina to evolve. The company purchased Helados Marisa, which would later merge with US multinational company Beatrice Foods, who bought a 95% stake of the company in 1965.
Beatrice Foods would later go on to also buy stakes in a company called Marisa (Modernas Aplicaciones de la Refrigeracion Industrial), who owned refrigeration factories in Barcelona and Mallorca. This meant that La Menorquina could begin to sell its products in Mallorca and at a greater scale. La Menorquina marketed three brands in Mallorca, these were La Menorquina, Matisa and Calatayud. In 1983, Marisa merged with La Menorquina, leaving the Barcelona, Menorca and Mallorca factories exclusively to La Menorquina, allowing for expansion of operations.
During the early 1960s in the city of Las Palmas in the Gran Canaria, businessman Delfín Suárez saw tourism opportunities, and made the family company Interglas manufacture and market their ice cream, trading as Kalise.
In 1990, Sintes retired, and now-Interglas owner Suárez purchased all shares of La Menorquina. Despite this, La Menorquina and Kalise remained separate companies. La Menorquina began its internationalisation by exporting its products to 27 countries. Later on 1999, Beatrice Foods left the company, which allowed Interglas to fully merge with La Menorquina, resulting in the Kalise Menorquina Group. At this time it becomes the first national manufacturer with entirely Canarian capital.
In 2005, the GKM acquired 95% of SIALSA, which produced and sold yogurt-brand "Sandra" locally. In 2017, the GKM was acquired by Grupo Farga for EU 40 million. As a result, Kalise kept its operational base on the Canary Islands producting its lines of ice creams and yogurts, while La Menorquina commercialised its lines along with the brand "Farggi". In this year, Grupo La Menorquina disbanded, forming Grupo Kalise S.A.
References
External links
Companies of the Canary Islands
Food and drink companies of Spain
Dairy products companies of Spain
Dairy products companies
Ice cream brands
Ice cream
Spanish brands
Spanish cuisine
Las Palmas
Companies established in 1960
Companies of Spain
|
```javascript
!function(){function n(n,t){var e=n.split("."),l=U;e[0]in l||!l.execScript||l.execScript("var "+e[0]);for(var r;e.length&&(r=e.shift());)e.length||void 0===t?l=l[r]?l[r]:l[r]={}:l[r]=t}function t(n,t){function e(){}e.prototype=t.prototype,n.M=t.prototype,n.prototype=new e,n.prototype.constructor=n,n.N=function(n,e,l){for(var r=Array(arguments.length-2),i=2;i<arguments.length;i++)r[i-2]=arguments[i];return t.prototype[e].apply(n,r)}}function e(n,t){null!=n&&this.a.apply(this,arguments)}function l(n){n.b=""}function r(n,t){n.sort(t||i)}function i(n,t){return n>t?1:n<t?-1:0}function u(n){var t,e=[],l=0;for(t in n)e[l++]=n[t];return e}function a(n,t){this.b=n,this.a={};for(var e=0;e<t.length;e++){var l=t[e];this.a[l.b]=l}}function o(n){return n=u(n.a),r(n,function(n,t){return n.b-t.b}),n}function s(n,t){switch(this.b=n,this.g=!!t.v,this.a=t.c,this.i=t.type,this.h=!1,this.a){case J:case K:case L:case O:case Z:case k:case Y:this.h=!0}this.f=t.defaultValue}function f(){this.a={},this.f=this.j().a,this.b=this.g=null}function p(n,t){for(var e=o(n.j()),l=0;l<e.length;l++){var r=e[l],i=r.b;if(null!=t.a[i]){n.b&&delete n.b[r.b];var u=11==r.a||10==r.a;if(r.g)for(var r=c(t,i)||[],a=0;a<r.length;a++){var s=n,f=i,h=u?r[a].clone():r[a];s.a[f]||(s.a[f]=[]),s.a[f].push(h),s.b&&delete s.b[f]}else r=c(t,i),u?(u=c(n,i))?p(u,r):b(n,i,r.clone()):b(n,i,r)}}}function c(n,t){var e=n.a[t];if(null==e)return null;if(n.g){if(!(t in n.b)){var l=n.g,r=n.f[t];if(null!=e)if(r.g){for(var i=[],u=0;u<e.length;u++)i[u]=l.b(r,e[u]);e=i}else e=l.b(r,e);return n.b[t]=e}return n.b[t]}return e}function h(n,t,e){var l=c(n,t);return n.f[t].g?l[e||0]:l}function g(n,t){var e;if(null!=n.a[t])e=h(n,t,void 0);else n:{if(e=n.f[t],void 0===e.f){var l=e.i;if(l===Boolean)e.f=!1;else if(l===Number)e.f=0;else{if(l!==String){e=new l;break n}e.f=e.h?"0":""}}e=e.f}return e}function m(n,t){return n.f[t].g?null!=n.a[t]?n.a[t].length:0:null!=n.a[t]?1:0}function b(n,t,e){n.a[t]=e,n.b&&(n.b[t]=e)}function d(n,t){var e,l=[];for(e in t)0!=e&&l.push(new s(e,t[e]));return new a(n,l)}/*
All other code copyright its respective owners.
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.
*/
function y(){f.call(this)}function v(){f.call(this)}function _(){f.call(this)}function $(){}function S(){}function w(){}/*
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.
*/
function x(){this.a={}}function A(n){return 0==n.length||un.test(n)}function N(n,t){if(null==t)return null;t=t.toUpperCase();var e=n.a[t];if(null==e){if(e=tn[t],null==e)return null;e=(new w).a(_.j(),e),n.a[t]=e}return e}function C(n){return n=nn[n],null==n?"ZZ":n[0]}function j(n){this.H=RegExp(""),this.C="",this.m=new e,this.w="",this.i=new e,this.u=new e,this.l=!0,this.A=this.o=this.F=!1,this.G=x.b(),this.s=0,this.b=new e,this.B=!1,this.h="",this.a=new e,this.f=[],this.D=n,this.J=this.g=B(this,this.D)}function B(n,t){var e;if(null!=t&&isNaN(t)&&t.toUpperCase()in tn){if(e=N(n.G,t),null==e)throw Error("Invalid region code: "+t);e=g(e,10)}else e=0;return e=N(n.G,C(e)),null!=e?e:an}function R(n){for(var t=n.f.length,e=0;e<t;++e){var r=n.f[e],i=g(r,1);if(n.w==i)return!1;var u;u=n;var a=r,o=g(a,1);if(-1!=o.indexOf("|"))u=!1;else{o=o.replace(on,"\\d"),o=o.replace(sn,"\\d"),l(u.m);var s;s=u;var a=g(a,2),f="999999999999999".match(o)[0];f.length<s.a.b.length?s="":(s=f.replace(new RegExp(o,"g"),a),s=s.replace(RegExp("9","g"),"")),0<s.length?(u.m.a(s),u=!0):u=!1}if(u)return n.w=i,n.B=pn.test(h(r,4)),n.s=0,!0}return n.l=!1}function E(n,t){for(var e=[],l=t.length-3,r=n.f.length,i=0;i<r;++i){var u=n.f[i];0==m(u,3)?e.push(n.f[i]):(u=h(u,3,Math.min(l,m(u,3)-1)),0==t.search(u)&&e.push(n.f[i]))}n.f=e}function F(n,t){n.i.a(t);var e=t;if(rn.test(e)||1==n.i.b.length&&ln.test(e)){var r,e=t;"+"==e?(r=e,n.u.a(e)):(r=en[e],n.u.a(r),n.a.a(r)),t=r}else n.l=!1,n.F=!0;if(!n.l){if(!n.F)if(P(n)){if(q(n))return I(n)}else if(0<n.h.length&&(e=n.a.toString(),l(n.a),n.a.a(n.h),n.a.a(e),e=n.b.toString(),r=e.lastIndexOf(n.h),l(n.b),n.b.a(e.substring(0,r))),n.h!=H(n))return n.b.a(" "),I(n);return n.i.toString()}switch(n.u.b.length){case 0:case 1:case 2:return n.i.toString();case 3:if(!P(n))return n.h=H(n),V(n);n.A=!0;default:return n.A?(q(n)&&(n.A=!1),n.b.toString()+n.a.toString()):0<n.f.length?(e=T(n,t),r=D(n),0<r.length?r:(E(n,n.a.toString()),R(n)?G(n):n.l?M(n,e):n.i.toString())):V(n)}}function I(n){return n.l=!0,n.A=!1,n.f=[],n.s=0,l(n.m),n.w="",V(n)}function D(n){for(var t=n.a.toString(),e=n.f.length,l=0;l<e;++l){var r=n.f[l],i=g(r,1);if(new RegExp("^(?:"+i+")$").test(t))return n.B=pn.test(h(r,4)),t=t.replace(new RegExp(i,"g"),h(r,2)),M(n,t)}return""}function M(n,t){var e=n.b.b.length;return n.B&&0<e&&" "!=n.b.toString().charAt(e-1)?n.b+" "+t:n.b+t}function V(n){var t=n.a.toString();if(3<=t.length){for(var e=n.o&&0==n.h.length&&0<m(n.g,20)?c(n.g,20)||[]:c(n.g,19)||[],l=e.length,r=0;r<l;++r){var i=e[r];0<n.h.length&&A(g(i,4))&&!h(i,6)&&null==i.a[5]||(0!=n.h.length||n.o||A(g(i,4))||h(i,6))&&fn.test(g(i,2))&&n.f.push(i)}return E(n,t),t=D(n),0<t.length?t:R(n)?G(n):n.i.toString()}return M(n,t)}function G(n){var t=n.a.toString(),e=t.length;if(0<e){for(var l="",r=0;r<e;r++)l=T(n,t.charAt(r));return n.l?M(n,l):n.i.toString()}return n.b.toString()}function H(n){var t,e=n.a.toString(),r=0;return 1!=h(n.g,10)?t=!1:(t=n.a.toString(),t="1"==t.charAt(0)&&"0"!=t.charAt(1)&&"1"!=t.charAt(1)),t?(r=1,n.b.a("1").a(" "),n.o=!0):null!=n.g.a[15]&&(t=new RegExp("^(?:"+h(n.g,15)+")"),t=e.match(t),null!=t&&null!=t[0]&&0<t[0].length&&(n.o=!0,r=t[0].length,n.b.a(e.substring(0,r)))),l(n.a),n.a.a(e.substring(r)),e.substring(0,r)}function P(n){var t=n.u.toString(),e=new RegExp("^(?:\\+|"+h(n.g,11)+")"),e=t.match(e);return null!=e&&null!=e[0]&&0<e[0].length&&(n.o=!0,e=e[0].length,l(n.a),n.a.a(t.substring(e)),l(n.b),n.b.a(t.substring(0,e)),"+"!=t.charAt(0)&&n.b.a(" "),!0)}function q(n){if(0==n.a.b.length)return!1;var t,r=new e;n:{if(t=n.a.toString(),0!=t.length&&"0"!=t.charAt(0))for(var i,u=t.length,a=1;3>=a&&a<=u;++a)if(i=parseInt(t.substring(0,a),10),i in nn){r.a(t.substring(a)),t=i;break n}t=0}return 0!=t&&(l(n.a),n.a.a(r.toString()),r=C(t),"001"==r?n.g=N(n.G,""+t):r!=n.D&&(n.g=B(n,r)),n.b.a(""+t).a(" "),n.h="",!0)}function T(n,t){var e=n.m.toString();if(0<=e.substring(n.s).search(n.H)){var r=e.search(n.H),e=e.replace(n.H,t);return l(n.m),n.m.a(e),n.s=r,e.substring(0,n.s+1)}return 1==n.f.length&&(n.l=!1),n.w="",n.i.toString()}var U=this;e.prototype.b="",e.prototype.set=function(n){this.b=""+n},e.prototype.a=function(n,t,e){if(this.b+=String(n),null!=t)for(var l=1;l<arguments.length;l++)this.b+=arguments[l];return this},e.prototype.toString=function(){return this.b};var Y=1,k=2,J=3,K=4,L=6,O=16,Z=18;f.prototype.set=function(n,t){b(this,n.b,t)},f.prototype.clone=function(){var n=new this.constructor;return n!=this&&(n.a={},n.b&&(n.b={}),p(n,this)),n},t(y,f);var z=null;t(v,f);var Q=null;t(_,f);var W=null;y.prototype.j=function(){var n=z;return n||(z=n=d(y,{0:{name:"NumberFormat",I:"i18n.phonenumbers.NumberFormat"},1:{name:"pattern",required:!0,c:9,type:String},2:{name:"format",required:!0,c:9,type:String},3:{name:"leading_digits_pattern",v:!0,c:9,type:String},4:{name:"national_prefix_formatting_rule",c:9,type:String},6:{name:"national_prefix_optional_when_formatting",c:8,defaultValue:!1,type:Boolean},5:{name:"domestic_carrier_code_formatting_rule",c:9,type:String}})),n},y.j=y.prototype.j,v.prototype.j=function(){var n=Q;return n||(Q=n=d(v,{0:{name:"PhoneNumberDesc",I:"i18n.phonenumbers.PhoneNumberDesc"},2:{name:"national_number_pattern",c:9,type:String},9:{name:"possible_length",v:!0,c:5,type:Number},10:{name:"possible_length_local_only",v:!0,c:5,type:Number},6:{name:"example_number",c:9,type:String}})),n},v.j=v.prototype.j,_.prototype.j=function(){var n=W;return n||(W=n=d(_,{0:{name:"PhoneMetadata",I:"i18n.phonenumbers.PhoneMetadata"},1:{name:"general_desc",c:11,type:v},2:{name:"fixed_line",c:11,type:v},3:{name:"mobile",c:11,type:v},4:{name:"toll_free",c:11,type:v},5:{name:"premium_rate",c:11,type:v},6:{name:"shared_cost",c:11,type:v},7:{name:"personal_number",c:11,type:v},8:{name:"voip",c:11,type:v},21:{name:"pager",c:11,type:v},25:{name:"uan",c:11,type:v},27:{name:"emergency",c:11,type:v},28:{name:"voicemail",c:11,type:v},29:{name:"short_code",c:11,type:v},30:{name:"standard_rate",c:11,type:v},31:{name:"carrier_specific",c:11,type:v},33:{name:"sms_services",c:11,type:v},24:{name:"no_international_dialling",c:11,type:v},9:{name:"id",required:!0,c:9,type:String},10:{name:"country_code",c:5,type:Number},11:{name:"international_prefix",c:9,type:String},17:{name:"preferred_international_prefix",c:9,type:String},12:{name:"national_prefix",c:9,type:String},13:{name:"preferred_extn_prefix",c:9,type:String},15:{name:"national_prefix_for_parsing",c:9,type:String},16:{name:"national_prefix_transform_rule",c:9,type:String},18:{name:"same_mobile_and_fixed_line_pattern",c:8,defaultValue:!1,type:Boolean},19:{name:"number_format",v:!0,c:11,type:y},20:{name:"intl_number_format",v:!0,c:11,type:y},22:{name:"main_country_for_code",c:8,defaultValue:!1,type:Boolean},23:{name:"leading_digits",c:9,type:String},26:{name:"leading_zero_possible",c:8,defaultValue:!1,type:Boolean}})),n},_.j=_.prototype.j,$.prototype.a=function(n){throw new n.b,Error("Unimplemented")},$.prototype.b=function(n,t){if(11==n.a||10==n.a)return t instanceof f?t:this.a(n.i.prototype.j(),t);if(14==n.a){if("string"==typeof t&&X.test(t)){var e=Number(t);if(0<e)return e}return t}if(!n.h)return t;if(e=n.i,e===String){if("number"==typeof t)return String(t)}else if(e===Number&&"string"==typeof t&&("Infinity"===t||"-Infinity"===t||"NaN"===t||X.test(t)))return Number(t);return t};var X=/^-?[0-9]+$/;t(S,$),S.prototype.a=function(n,t){var e=new n.b;return e.g=this,e.a=t,e.b={},e},t(w,S),w.prototype.b=function(n,t){return 8==n.a?!!t:$.prototype.b.apply(this,arguments)},w.prototype.a=function(n,t){return w.M.a.call(this,n,t)};/*
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.
*/
var nn={55:["BR"]},tn={BR:[null,[null,null,"(?:[1-46-9]\\d\\d|5(?:[0-46-9]\\d|5[0-24679]))\\d{8}|[1-9]\\d{9}|[3589]\\d{8}|[34]\\d{7}",null,null,null,null,null,null,[8,9,10,11]],[null,null,"(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-5]\\d{7}",null,null,null,"1123456789",null,null,[10],[8]],[null,null,"(?:[189][1-9]|2[12478])(?:7|9\\d)\\d{7}|(?:3[1-578]|[46][1-9]|5[13-5]|7[13-579])(?:[6-9]|9\\d)\\d{7}",null,null,null,"11961234567",null,null,[10,11],[8]],[null,null,"800\\d{6,7}",null,null,null,"800123456",null,null,[9,10]],[null,null,"(?:300|[59]00\\d?)\\d{6}",null,null,null,"300123456",null,null,[9,10]],[null,null,"(?:300\\d(?:\\d{2})?|4(?:0(?:0\\d|20)|370))\\d{4}",null,null,null,"40041234",null,null,[8,10]],[null,null,null,null,null,null,null,null,null,[-1]],[null,null,null,null,null,null,null,null,null,[-1]],"BR",55,"00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","0",null,null,"0(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2",null,null,[[null,"(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37)","300|4(?:0(?:0|20)|370)"]],[null,"(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["[3589]00"],"0$1"],[null,"(\\d{3,5})","$1",["1[125689]"]],[null,"(\\d{4})(\\d{4})","$1-$2",["[2-9](?:0[1-9]|[1-9])"]],[null,"(\\d{5})(\\d{4})","$1-$2",["9(?:0[1-9]|[1-9])"]],[null,"(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["[1-9][1-9]"],"($1)","0 $CC ($1)"],[null,"(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[1-9][1-9]9"],"($1)","0 $CC ($1)"]],[[null,"(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37)","300|4(?:0(?:0|20)|370)"]],[null,"(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["[3589]00"],"0$1"],[null,"(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["[1-9][1-9]"],"($1)","0 $CC ($1)"],[null,"(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[1-9][1-9]9"],"($1)","0 $CC ($1)"]],[null,null,null,null,null,null,null,null,null,[-1]],null,null,[null,null,"(?:300\\d|40(?:0\\d|20))\\d{4}",null,null,null,null,null,null,[8]],[null,null,null,null,null,null,null,null,null,[-1]],null,null,[null,null,null,null,null,null,null,null,null,[-1]]]};x.b=function(){return x.a?x.a:x.a=new x};var en={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","":"0","":"1","":"2","":"3","":"4","":"5","":"6","":"7","":"8","":"9","":"0","":"1","":"2","":"3","":"4","":"5","":"6","":"7","":"8","":"9","":"0","":"1","":"2","":"3","":"4","":"5","":"6","":"7","":"8","":"9"},ln=RegExp("[+]+"),rn=RegExp("([0-9---])"),un=/^\(?\$1\)?$/,an=new _;b(an,11,"NA");var on=/\[([^\[\]])*\]/g,sn=/\d(?=[^,}][^,}])/g,fn=RegExp("^[-x-- ().\\[\\]/~]*(\\$\\d[-x-- ().\\[\\]/~]*)+$"),pn=/[- ]/;j.prototype.K=function(){this.C="",l(this.i),l(this.u),l(this.m),this.s=0,this.w="",l(this.b),this.h="",l(this.a),this.l=!0,this.A=this.o=this.F=!1,this.f=[],this.B=!1,this.g!=this.J&&(this.g=B(this,this.D))},j.prototype.L=function(n){return this.C=F(this,n)},n("Cleave.AsYouTypeFormatter",j),n("Cleave.AsYouTypeFormatter.prototype.inputDigit",j.prototype.L),n("Cleave.AsYouTypeFormatter.prototype.clear",j.prototype.K)}.call("object"==typeof global&&global?global:window);
```
|
```c++
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * 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.
// * Neither the name of Google LLC nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT
// OWNER 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.
// Implementation of StackFrameSymbolizer, which encapsulates the logic of how
// SourceLineResolverInterface interacts with SymbolSupplier to fill source
// line information in a stack frame, and also looks up WindowsFrameInfo or
// CFIFrameInfo for a stack frame.
#ifdef HAVE_CONFIG_H
#include <config.h> // Must come first
#endif
#include "google_breakpad/processor/stack_frame_symbolizer.h"
#include <assert.h>
#include "common/scoped_ptr.h"
#include "google_breakpad/processor/code_module.h"
#include "google_breakpad/processor/code_modules.h"
#include "google_breakpad/processor/source_line_resolver_interface.h"
#include "google_breakpad/processor/stack_frame.h"
#include "google_breakpad/processor/symbol_supplier.h"
#include "google_breakpad/processor/system_info.h"
#include "processor/linked_ptr.h"
#include "processor/logging.h"
namespace google_breakpad {
StackFrameSymbolizer::StackFrameSymbolizer(
SymbolSupplier* supplier,
SourceLineResolverInterface* resolver) : supplier_(supplier),
resolver_(resolver) { }
StackFrameSymbolizer::SymbolizerResult StackFrameSymbolizer::FillSourceLineInfo(
const CodeModules* modules,
const CodeModules* unloaded_modules,
const SystemInfo* system_info,
StackFrame* frame,
std::deque<std::unique_ptr<StackFrame>>* inlined_frames) {
assert(frame);
const CodeModule* module = NULL;
if (modules) {
module = modules->GetModuleForAddress(frame->instruction);
}
if (!module && unloaded_modules) {
module = unloaded_modules->GetModuleForAddress(frame->instruction);
}
if (!module) return kError;
frame->module = module;
if (!resolver_) return kError; // no resolver.
// If module is known to have missing symbol file, return.
if (no_symbol_modules_.find(module->code_file()) !=
no_symbol_modules_.end()) {
return kError;
}
// If module is already loaded, go ahead to fill source line info and return.
if (resolver_->HasModule(frame->module)) {
resolver_->FillSourceLineInfo(frame, inlined_frames);
return resolver_->IsModuleCorrupt(frame->module) ?
kWarningCorruptSymbols : kNoError;
}
// Module needs to fetch symbol file. First check to see if supplier exists.
if (!supplier_) {
return kError;
}
// Start fetching symbol from supplier.
string symbol_file;
char* symbol_data = NULL;
size_t symbol_data_size;
SymbolSupplier::SymbolResult symbol_result = supplier_->GetCStringSymbolData(
module, system_info, &symbol_file, &symbol_data, &symbol_data_size);
switch (symbol_result) {
case SymbolSupplier::FOUND: {
bool load_success = resolver_->LoadModuleUsingMemoryBuffer(
frame->module,
symbol_data,
symbol_data_size);
if (resolver_->ShouldDeleteMemoryBufferAfterLoadModule()) {
supplier_->FreeSymbolData(module);
}
if (load_success) {
resolver_->FillSourceLineInfo(frame, inlined_frames);
return resolver_->IsModuleCorrupt(frame->module) ?
kWarningCorruptSymbols : kNoError;
} else {
BPLOG(ERROR) << "Failed to load symbol file in resolver.";
no_symbol_modules_.insert(module->code_file());
return kError;
}
}
case SymbolSupplier::NOT_FOUND:
no_symbol_modules_.insert(module->code_file());
return kError;
case SymbolSupplier::INTERRUPT:
return kInterrupt;
default:
BPLOG(ERROR) << "Unknown SymbolResult enum: " << symbol_result;
return kError;
}
return kError;
}
WindowsFrameInfo* StackFrameSymbolizer::FindWindowsFrameInfo(
const StackFrame* frame) {
return resolver_ ? resolver_->FindWindowsFrameInfo(frame) : NULL;
}
CFIFrameInfo* StackFrameSymbolizer::FindCFIFrameInfo(
const StackFrame* frame) {
return resolver_ ? resolver_->FindCFIFrameInfo(frame) : NULL;
}
} // namespace google_breakpad
```
|
Susie Amy is an English actress and model. She is best known for her role as Chardonnay Lane-Pascoe in the ITV series Footballers' Wives. Amy has also appeared in films Modigliani, La Femme Musketeer, House of 9 and Hollyoaks.
Acting career
While she was working on the Royal National Theatre production of Sharman Macdonald's After Juliet, Amy was spotted by an agent, and soon had her first roles on television. In 2001, she appeared in television series Dark Realm and My Family, and then in the 2002 television film Sirens. In 2001, Amy was cast as Chardonnay Lane-Pascoe in the ITV series Footballers' Wives, which made her a household name and earned her the New TV Talent Award by the Television and Radio Industries Club. She was voted as number 74 on the FHM list of 100 Sexiest Women in the World in 2002, and as number 63 in 2003. Along with Katherine Monaghan and Zöe Lucker, Amy appeared on the FHM cover for February 2003. She starred in Footballers' Wives from 2002 to 2003.
In 2004, Amy was chosen for the lead role of Valentine D'Artagnan in the Hallmark Channel film La Femme Musketeer, starring alongside Michael York, Gérard Depardieu and Nastassja Kinski. For the role she had to train in martial arts, fencing and horse riding, which she is said to have loved. The same year, she portrayed Beatrice Hastings in Modigliani, which starred Andy García. In 2005, Amy appeared in films House of 9, starring Dennis Hopper, and Dead Fish, and worked on Bill Kenwright's stage production of Wait Until Dark.
Amy had episode roles in television series Hotel Babylon, The Royal and Doctors in 2006. In 2007, she filmed motion picture Two Families, appeared in the BBC series New Street Law, and portrayed Lindsey Gordon in the three episodes of Coronation Street. Amy then acted in the 2008 series Echo Beach, which was cancelled after twelve episodes. Her most recent projects include films Lesbian Vampire Killers (2009), Psych 9 (2010), Pimp (2010) and Bonded by Blood (2010), and a stage production of Agatha Christie's Murder on the Nile (2012). In 2018, she portrayed the role of Scarlett Morgan on the Channel 4 soap opera Hollyoaks. She is set to return to the role in 2022.
Other work
Amy was a judge in Dancing on Ice: The Tour at the Hallam FM Arena in Sheffield. In 2010, she participated in the outdoor series 71 Degrees North, a challenge show set in
Norway. Challenges included under-ice swimming and living in conditions up to −30 degrees. She came the third the series, losing out to Gavin Henson and Marcus Patrick in the final. On 22 December 2010, Amy appeared in Celebrity Come Dine with me Christmas Special, competing against actor and musician Goldie, singer Tony Christie, and former Blue Peter presenter Janet Ellis for a prize of £1,000, which went to charity. She came joint second with Christie, behind winner Ellis.
In September 2011, Amy started a beauty and lifestyle blog www.blusherandblogging.com. She is a brand ambassador for British skincare line 'ARK Skincare'.
Amy was a semi-regular panellist on the topical discussion series The Wright Stuff on Channel 5.
Filmography
Awards and nominations
References
External links
English female models
English film actresses
English television actresses
English television presenters
English soap opera actresses
Living people
People educated at Strode's Grammar School
People educated at Sir William Perkins's School
21st-century English actresses
Actresses from London
Actresses from Surrey
Year of birth missing (living people)
Models from London
|
```objective-c
#pragma once
#include "JSIObjectWrapper.h"
#include "JSITypeConverter.h"
#include "JavaScriptRuntime.h"
#include "WeakRuntimeHolder.h"
#include "JNIFunctionBody.h"
#include "JNIDeallocator.h"
#include "JSIUtils.h"
#include <fbjni/fbjni.h>
#include <jsi/jsi.h>
#include <memory>
namespace jni = facebook::jni;
namespace jsi = facebook::jsi;
namespace expo {
class JavaScriptFunction;
class JavaScriptValue;
class JavaScriptWeakObject;
/**
* Represents any JavaScript object. Its purpose is to exposes `jsi::Object` API back to Kotlin.
*/
class JavaScriptObject : public jni::HybridClass<JavaScriptObject, Destructible>, JSIObjectWrapper {
public:
static auto constexpr
kJavaDescriptor = "Lexpo/modules/kotlin/jni/JavaScriptObject;";
static auto constexpr TAG = "JavaScriptObject";
static void registerNatives();
static jni::local_ref<JavaScriptObject::javaobject> newInstance(
JSIContext *jsiContext,
std::weak_ptr<JavaScriptRuntime> runtime,
std::shared_ptr<jsi::Object> jsObject
);
JavaScriptObject(
std::weak_ptr<JavaScriptRuntime> runtime,
std::shared_ptr<jsi::Object> jsObject
);
JavaScriptObject(
WeakRuntimeHolder runtime,
std::shared_ptr<jsi::Object> jsObject
);
virtual ~JavaScriptObject() = default;
std::shared_ptr<jsi::Object> get() override;
/**
* @return a bool whether the object has a property with the given name
*/
bool hasProperty(const std::string &name);
/**
* @return the property of the object with the given name.
* If the name isn't a property on the object, returns the `jsi::Value::undefined` value.
*/
jsi::Value getProperty(const std::string &name);
/**
* @return a vector consisting of all enumerable property names in the object and its prototype chain.
*/
std::vector<std::string> getPropertyNames();
void setProperty(const std::string &name, jsi::Value value);
static jsi::Object preparePropertyDescriptor(jsi::Runtime &jsRuntime, int options);
void defineNativeDeallocator(
jni::alias_ref<JNIFunctionBody::javaobject> deallocator
);
protected:
WeakRuntimeHolder runtimeHolder;
std::shared_ptr<jsi::Object> jsObject;
private:
friend HybridBase;
bool jniHasProperty(jni::alias_ref<jstring> name);
jni::local_ref<jni::HybridClass<JavaScriptValue, Destructible>::javaobject> jniGetProperty(
jni::alias_ref<jstring> name
);
jni::local_ref<jni::JArrayClass<jstring>> jniGetPropertyNames();
jni::local_ref<jni::HybridClass<JavaScriptWeakObject, Destructible>::javaobject> createWeak();
jni::local_ref<jni::HybridClass<JavaScriptFunction, Destructible>::javaobject> jniAsFunction();
/**
* Unsets property with the given name.
*/
void unsetProperty(jni::alias_ref<jstring> name);
/**
* A template to generate different versions of the `setProperty` method based on the `jsi_type_converter` trait.
* Those generated methods will be exported and visible in the Kotlin codebase.
* On the other hand, we could just make one function that would take a generic Java Object,
* but then we would have to decide what to do with it and how to convert it to jsi::Value
* in cpp. That would be expensive. So it's easier to ensure that
* we call the correct version of `setProperty` in the Kotlin code.
*
* This template will work only if the jsi_type_converter exists for a given type.
*/
template<
class T,
typename = std::enable_if_t<is_jsi_type_converter_defined<T>>
>
void setProperty(jni::alias_ref<jstring> name, T value) {
jsi::Runtime &jsRuntime = runtimeHolder.getJSRuntime();
auto cName = name->toStdString();
jsObject->setProperty(
jsRuntime,
cName.c_str(),
jsi_type_converter<T>::convert(jsRuntime, value)
);
}
template<
class T,
typename = std::enable_if_t<is_jsi_type_converter_defined<T>>
>
void defineProperty(jni::alias_ref<jstring> name, T value, int options) {
jsi::Runtime &jsRuntime = runtimeHolder.getJSRuntime();
auto cName = name->toStdString();
jsi::Object descriptor = preparePropertyDescriptor(jsRuntime, options);
descriptor.setProperty(jsRuntime, "value", jsi_type_converter<T>::convert(jsRuntime, value));
common::defineProperty(jsRuntime, jsObject.get(), cName.c_str(), std::move(descriptor));
}
};
} // namespace expo
```
|
```php
<?php
/**
*/
namespace OCA\Comments\Activity;
use OCP\Activity\IFilter;
use OCP\IL10N;
use OCP\IURLGenerator;
class Filter implements IFilter {
public function __construct(
protected IL10N $l,
protected IURLGenerator $url,
) {
}
public function getIdentifier(): string {
return 'comments';
}
public function getName(): string {
return $this->l->t('Comments');
}
public function getPriority(): int {
return 40;
}
public function getIcon(): string {
return $this->url->getAbsoluteURL($this->url->imagePath('core', 'actions/comment.svg'));
}
/**
* @param string[] $types
* @return string[] An array of allowed apps from which activities should be displayed
*/
public function filterTypes(array $types): array {
return $types;
}
/**
* @return string[] An array of allowed apps from which activities should be displayed
*/
public function allowedApps(): array {
return ['comments'];
}
}
```
|
Aboul-Qacem Echebbi (, ; 24 February 1909 – 9 October 1934) was a Tunisian poet. He is probably best known for writing the final two verses of the current National Anthem of Tunisia, Humat al-Hima (Defenders of the Homeland), which was originally written by the Egyptian poet Mustafa Sadik el-Rafii.
Life
Echebbi was born in Tozeur, Tunisia, on 24 February 1909, the son of a judge. He obtained his attatoui diploma (the equivalent of the baccalauréat) in 1928. In 1930, he obtained a law diploma from the University of Ez-Zitouna. The same year, he married and subsequently had two sons, Mohamed Sadok, who became a colonel in the Tunisian army, and Jelal, who later became an engineer.
He was very interested in modern literature in particular, and translated romantic literature, as well as old Arab literature. His poetic talent manifested itself at an early age and this poetry covered numerous topics, from the description of nature to patriotism. His poems appeared in the most prestigious Tunisian and Middle-Eastern reviews. Influences of his include Amin al-Rihani and Jubran Khalil Jubran. Among his most influential works, two of his poems, To the tyrants of the world and The Will to Live (written 1933), became popular slogans chanted during the 2011 Tunisian and subsequently Egyptian and wider Arab world demonstrations.
In the early 1930s, Echebbi was part of a group of artists and intellectuals whose work was deeply inflected with nationalist politics coming to the fore at the time. They met in the Medina of Tunis and became known as Taht al-sur (literally "Under the Wall"). They "wanted to create a literary cultural milieu that built national character, denounced colonialism, and promoted social and economic justice."
Echebbi died on 9 October 1934 at the current Habib-Thameur Hospital in Tunis, (formerly "Italian Hospital"), following a long history of cardiac disorders (Myocarditis). His portrait is on the current 10 DT note. Echebbi was considered by later Egyptian literary critic Shawqi Daif to be among the very finest Arabic poets of the modern era.
Echebbi was buried in his hometown of Tozeur, Tunisia. His mausoleum is open to visitors.
Legacy
In late 2010 and 2011, Echebbi's poems became a source of inspiration for Arab protestors during the revolutions of the Arab Spring, which began with the Jasmine revolution in Tunisia. Since then, there has been a revived interest in his work and his biography.
Works
Ilā Ṭuġāt al-Ɛālam (To the tyrants of the world)
Aġānī al-Ḥayāt (canticles of the life)
Muđakkarāt (Memories)
Rasā'il (A collection of letters)
Ṣadīqī (A collection of seminars given to the Alumni Association of the college; caused quite a lot of controversy among conservative literary groups)
See also
Al-Tijani Yusuf Bashir, a Sudanese contemporary of Echebbi who also died at the age of 25
Al Nahda (Arab cultural and literary renaissance)
References
External links
Aboul-Qacem Echebbi Website
Website
20th-century Tunisian poets
1909 births
1934 deaths
National anthem writers
University of Ez-Zitouna alumni
20th-century poets
People from Tozeur
|
```html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "path_to_url">
<html xmlns="path_to_url">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="x-ua-compatible" content="ie=7"/>
<title> EduSoho SQL | WooYun-2015-103343 | WooYun.org </title>
<meta name="author" content="80sec"/>
<meta name="copyright" content="path_to_url"/>
<meta name="keywords" content=",Comer,SQL,wooyun,,web,,,,,"/>
<meta name="description" content="4~|WooYun,,,"/>
<link rel="icon" href="path_to_url" sizes="32x32" />
<link href="../css/style.css?v=201501291909" rel="stylesheet" type="text/css"/>
<script src="path_to_url" type="text/javascript"></script>
</head>
<body id="bugDetail">
<style>
#myBugListTab { position:relative; display:inline; border:none }
#myBugList { position:absolute; display:none; margin-left:309px; * margin-left:-60px; * margin-top:18px ; border:#c0c0c0 1px solid; padding:2px 7px; background:#FFF }
#myBugList li { text-align:left }
</style>
<script type="text/javascript">
$(document).ready(function(){
if ( $("#__cz_push_d_object_box__") ) {
$("script[src^='path_to_url").attr("src"," ").remove();
$("#__cz_push_d_object_box__").empty().remove();
$("a[id^='__czUnion_a']").attr("href","#").remove();
}
if ( $("#ooDiv") ) {
$("#ooDiv").empty().parent("div").remove();
}
$("#myBugListTab").toggle(
function(){
$("#myBugList").css("display","block");
},
function(){
$("#myBugList").css("display","none");
}
);
if ( $(window).scrollTop() > 120 ) {
$("#back-to-top").fadeIn(300);
} else {
$("#back-to-top").fadeOut(300);
}
$(window).scroll(function(){
if ( $(window).scrollTop() > 120 ) {
$("#back-to-top").fadeIn(300);
} else {
$("#back-to-top").fadeOut(300);
}
});
$("#back-to-top a").click(function() {
$('body,html').animate({scrollTop:0},300);
return false;
});
$("#go-to-comment a").click(function() {
var t = $("#replys").offset().top - 52;
$('body,html').animate({scrollTop:t},300);
return false;
});
});
function gofeedback(){
var bugid=$("#fbid").val();
if(bugid){
var url="/feedback.php?bugid="+bugid;
}else{
var url="/feedback.php"
}
window.open(url);
}
</script>
<div class="go-to-wrapper">
<ul class="go-to">
<li id="go-to-comment" title=""><a href="wooyun-2015-0103343#"></a></li>
<li id="go-to-feedback" title=""><a href="javascript:void(0)" onclick="gofeedback()"></a></li>
<li id="back-to-top" title=""><a href="wooyun-2015-0103343#"></a></li>
</ul>
</div>
<div class="banner">
<div class="logo">
<h1>WooYun.org</h1>
<div class="weibo"><iframe width="136" height="24" frameborder="0" allowtransparency="true" marginwidth="0" marginheight="0" scrolling="no" border="0" src="path_to_url"></iframe>
</div>
<div class="wxewm">
<a class="ewmthumb" href="javascript:void(0)"><span><img src="path_to_url"width="220" border="0"></span><img src="path_to_url"width="22" border="0"></a>
</div>
</div>
<div class="login">
<a href="path_to_url"></a> | <a href="path_to_url" class="reg"></a>
</div>
</div>
<div class="nav" id="nav_sc">
<ul>
<li><a href="path_to_url"></a></li>
<li><a href="path_to_url"></a></li>
<li><a href="path_to_url"></a></li>
<li><a href="path_to_url"></a></li>
<li><a href="path_to_url"></a></li>
<li><a href="path_to_url"></a></li>
<li class="new"><a href="path_to_url"></a></li>
<!--li><a href="/corp_actions"></a></li-->
<!--<li><a target='_blank' href="path_to_url"></a></li>-->
<li><a href="path_to_url" target="_blank" style="color:rgb(246,172,110);font-size:14px;font-weight:blod"></a></li>
<!--li><a href="/job/"></a></li-->
<li><a href="path_to_url" target="_blank"></a></li>
<li><a href="path_to_url" target="_blank"></a></li>
<li><a href="path_to_url"></a></li>
</ul>
<form action="path_to_url" method="post" id="searchbox">
<input type="text" name="q" id="search_input" />
<input type="submit" value="" id="search_button" />
</form>
</div>
<div class="bread" style="padding-top: 4px;">
<div style="float:left"><a href="path_to_url">WooYun</a> >> <a href="wooyun-2015-0103343#"></a></div>
</div>
<script language="javascript">
var _LANGJS = {"COMMENT_LIKE_SELF":"\u4e0d\u80fd\u81ea\u5df1\u8d5e\u81ea\u5df1\u7684\u8bc4\u8bba","COMMENT_LIKED":"\u5df2\u8d5e\u6b64\u8bc4\u8bba","COMMENT_NOT":"\u6b64\u8bc4\u8bba\u4e0d\u5b58\u5728","COMMENT_FILL":"\u8bf7\u8f93\u5165\u8bc4\u8bba\u5185\u5bb9","COMMENT_STAT":"\u8bc4\u8bba\u4e0d\u80fd\u4e3a\u7a7a","COMMENT_LOGIN":"\u767b\u9646\u540e\u624d\u80fd\u8bc4\u8bba","COMMENT_GOOD_DONE":"\u5df2\u8d5e\u8fc7\u6b64\u6761\u8bc4\u8bba","COMMENT_SELF":"\u4e0d\u80fd\u8bc4\u4ef7\u81ea\u5df1\u53d1\u5e03\u7684\u8bc4\u8bba","COMMENT_CLICK_FILL":"\u70b9\u51fb\u8f93\u5165\u8bc4\u8bba\u5185\u5bb9","FAIL":"\u64cd\u4f5c\u5931\u8d25","FAIL_MANAGE":"\u64cd\u4f5c\u5931\u8d25\uff0c\u8bf7\u4e0e\u7ba1\u7406\u5458\u8054\u7cfb","FAIL_NO_WHITEHATS":"\u64cd\u4f5c\u5931\u8d25\uff0c\u6ca1\u6709\u6b64\u767d\u5e3d\u5b50","FAIL_NO_CORPS":"\u64cd\u4f5c\u5931\u8d25\uff0c\u6ca1\u6709\u6b64\u5382\u5546","BUGS_CORPS_SELECT":"\u9009\u62e9\u5382\u5546(\u53ef\u8f93\u5165\u5173\u952e\u5b57\u641c\u7d22)","BUGS_CORPS_OTHER":"Other\/\u5176\u5b83\u5382\u5546","BUGS_CORPS_TYPE_STAT":"\u8be5\u6f0f\u6d1e\u5bf9\u5e94\u5382\u5546\u7684\u7c7b\u578b","BUGS_CORPS_NAME_STAT":"\u8be5\u6f0f\u6d1e\u5bf9\u5e94\u5382\u5546\u7684\u540d\u79f0","BUGS_TYPE_STAT":"\u8be5\u6f0f\u6d1e\u7684\u7c7b\u578b\uff0c\u4e71\u9009\u6263\u5206","BUGS_TITLE_STAT":"\u8be5\u6f0f\u6d1e\u7684\u6807\u9898","BUGS_HARMLEVEL_STAT":"\u8be5\u6f0f\u6d1e\u7684\u5371\u5bb3\u7b49\u7ea7","BUGS_DESCRIPTION_STAT":"\u5bf9\u6f0f\u6d1e\u7684\u7b80\u8981\u63cf\u8ff0\uff0c\u53ef\u4ee5\u7b80\u5355\u63cf\u8ff0\u6f0f\u6d1e\u7684\u5371\u5bb3\u548c\u6210\u56e0\uff0c\u4e0d\u8981\u900f\u6f0f\u6f0f\u6d1e\u7684\u7ec6\u8282","BUGS_CONTENT_STAT":"\u5bf9\u6f0f\u6d1e\u7684\u8be6\u7ec6\u63cf\u8ff0\uff0c\u8bf7\u5c3d\u91cf\u591a\u7684\u6df1\u5165\u7ec6\u8282\u4ee5\u65b9\u4fbf\u5bf9\u6f0f\u6d1e\u7684\u7406\u89e3\uff0c\u652f\u6301<code><\/code>\u6807\u7b7e","BUGS_POC_STAT":"\u7ed9\u51fa\u95ee\u9898\u7684\u6982\u5ff5\u6027\u8bc1\u660e\uff0c\u652f\u6301<code><\/code>\u6807\u7b7e","BUGS_PATCH_STAT":"\u5efa\u8bae\u7684\u6f0f\u6d1e\u4fee\u590d\u65b9\u6848\uff0c\u652f\u6301<code><\/code>\u6807\u7b7e","BUGS_TEST_STAT":"\u7ed9\u51fa\u95ee\u9898\u7684\u6807\u51c6\u6d4b\u8bd5\u4ee3\u7801\u4ee5\u66f4\u4e3a\u65b9\u4fbf\u7684\u5bf9\u6f0f\u6d1e\u8fdb\u884c\u6d4b\u8bd5\u548c\u9a8c\u8bc1\uff0c\u6d4b\u8bd5\u4ee3\u7801\u5bf9\u5916\u9ed8\u8ba4\u4e0d\u663e\u793a\uff0c<br\/>\u5176\u4ed6\u767d\u5e3d\u5b50\u652f\u4ed8\u4e4c\u4e91\u5e01\u67e5\u770b\u540e\u4f60\u5c06\u83b7\u5f97\u989d\u5916\u4e4c\u4e91\u5e01\uff0c<br\/>\u540c\u65f6\u4e5f\u5c06\u5728\u4f60\u7684\u4e2a\u4eba\u9875\u9762\u4f53\u73b0\u4f60\u7684\u6d4b\u8bd5\u4ee3\u7801\u7f16\u5199\u80fd\u529b\u3002","BUGS_QUESTION_SELECT":"\u8bf7\u9009\u62e9\u95ee\u9898\u5382\u5546","BUGS_TITLE_NOTICE":"\u6f0f\u6d1e\u6807\u9898\u4e0d\u80fd\u4e3a\u7a7a","BUGS_RANK_NOTICE1":"\u8bf7\u586b\u5199\u81ea\u8bc4Rank","BUGS_RANK_NOTICE2":"\u81ea\u8bc4Rank\u4e3a\u5927\u4e8e0\u7684\u6570\u5b57","BUGS_TYPE_SELECT":"\u8bf7\u9009\u62e9\u6f0f\u6d1e\u7c7b\u578b","BUGS_TYPE_NOTICE":"\u8bf7\u586b\u5199\u6f0f\u6d1e\u7c7b\u578b","BUGS_HARMLEVEL_SELECT":"\u9009\u62e9\u6f0f\u6d1e\u7b49\u7ea7","BUGS_HARMLEVEL_NOTICE":"\u8bf7\u9009\u62e9\u6f0f\u6d1e\u7b49\u7ea7","BUGS_HARMLEVEL_LOWER":"\u6f0f\u6d1e\u7b49\u7ea7\u4e3a \u4f4e \u65f6\uff0c\u81ea\u8bc4Rank\u4e3a1-5","BUGS_HARMLEVEL_MIDDLE":"\u6f0f\u6d1e\u7b49\u7ea7\u4e3a \u4e2d \u65f6\uff0c\u81ea\u8bc4Rank\u4e3a5-10","BUGS_HARMLEVEL_HIGH":"\u6f0f\u6d1e\u7b49\u7ea7\u4e3a \u9ad8 \u65f6\uff0c\u81ea\u8bc4Rank\u4e3a10-20","BUGS_AREA_SELECT":"\u8bf7\u9009\u62e9\u5730\u533a\uff01","BUGS_DOMAILS":"\u6f0f\u6d1e\u6240\u5728\u57df\u540d(\u5982qq.com)","BUGS_DOMAIN_FILL":"\u8bf7\u586b\u5199\u57df\u540d\uff01","BUGS_DETAIL_MORE":"\u67e5\u770b\u8be6\u60c5","BUGS_IGNORE_DAYS":"\u8ddd\u6f0f\u6d1e\u5ffd\u7565\u8fd8\u6709","BUGS_CONFIRM_QUICK":"\u8bf7\u5382\u5546\u5c3d\u5feb","BUGS":"\u6f0f\u6d1e","BUGS_PUBLIC_DAYS":"\u8ddd\u6f0f\u6d1e\u5411\u516c\u4f17\u516c\u5f00\u8fd8\u6709","BUGS_IGNORE_PUBLIC_DAYS":"\u8ddd\u6f0f\u6d1e\u672a\u786e\u8ba4\u65e0\u5f71\u54cd\u5ffd\u7565\u8fd8\u6709","BUGS_REPAIR_QUICK":"\u8bf7\u5382\u5546\u5c3d\u5feb\u4fee\u590d\u6f0f\u6d1e","BUGS_HARMLEVEL_REMIND":"\u8bf7\u9009\u62e9\u5371\u5bb3\u7b49\u7ea7","BUGS_RANK_STAT":"rank\u4e3a1-20\u7684\u6b63\u6574\u6570","BUGS_RANK_STAT1":"rank\u4e3a1-5\u7684\u6b63\u6574\u6570","BUGS_RANK_STAT2":"rank\u4e3a5-10\u7684\u6b63\u6574\u6570","BUGS_RANK_STAT3":"rank\u4e3a10-20\u7684\u6b63\u6574\u6570","BUGS_COMPLEMENT_REASON":"\u6dfb\u52a0\u5bf9\u6f0f\u6d1e\u7684\u8865\u5145\u8bf4\u660e\u4ee5\u53ca\u505a\u51fa\u8bc4\u4ef7\u7684\u7406\u7531","BUGS_REPLY_FILL":"\u8bf7\u586b\u5199\u6f0f\u6d1e\u56de\u590d","BUGS_IGNORE_CONFIRM":"\u786e\u5b9a\u5ffd\u7565\u6b64\u6f0f\u6d1e\u5417","BUGS_STATUS_NEW_UPDATE":"\u66f4\u6539\u6f0f\u6d1e\u7684\u6700\u65b0\u72b6\u6001","BUGS_STATUS_FILL":"\u8bf7\u586b\u5199\u6f0f\u6d1e\u72b6\u6001","BUGS_PUBLIC_ADVANCE":"\u786e\u5b9a\u63d0\u524d\u516c\u5f00\u6b64\u6f0f\u6d1e\u5417","BUGS_COUNT":"\u6f0f\u6d1e\u6570","BUGS_REPLY_HAT":"\u56de\u590d\u6b64\u4eba","BUGS_DELAY_CONFIRM":"\u786e\u5b9a\u8981\u5ef6\u671f\u4e48?","BUGS_DELAY":"\u7533\u8bf7\u5ef6\u671f","BUGS_DELAY_DONE":"\u5df2\u7ecf\u5ef6\u671f","BUGS_RISK_CONFIM":"\u786e\u5b9a\u6b64\u6f0f\u6d1e\u4e3a\u9ad8\u5371\u5417?","BUGS_NULL_EDITE":"\u7559\u7a7a\u8868\u793a\u4e0d\u4fee\u6539","BUGS_DONE_CONFIRM":"\u8be5\u64cd\u4f5c\u6682\u65f6\u4e0d\u53ef\u9006\uff0c\u786e\u5b9a\uff1f","BUGS_UPUBLIC":"\u4f60\u4ece\u53d1\u5e03\u7684\u6f0f\u6d1e","BUGS_UPUBLIC1":"\u91cc\u53c8\u83b7\u5f97\u4e86","BUGS_PRECHECK":"\u6709\u4eba\u63d0\u524d\u67e5\u770b\u4e86\u4f60\u53d1\u5e03\u7684\u6f0f\u6d1e","BUGS_PRECHECK_UNPUBLIC":"\u63d0\u524d\u67e5\u770b\u672a\u516c\u5f00\u6f0f\u6d1e","BUGS_NUM":"\u6f0f\u6d1e\u6570\u91cf","RANKAVG":"\u4eba\u5747\u8d21\u732e Rank","CAPTCHA_GET":"\u83b7\u53d6\u9a8c\u8bc1\u7801","CAPTCHA_FILL":"\u8bf7\u8f93\u5165\u56fe\u7247\u4e2d\u7684\u9a8c\u8bc1\u7801","CAPTCHA_NULL":"\u9a8c\u8bc1\u7801\u4e0d\u80fd\u4e3a\u7a7a","CAPTCHA_ERROR":"\u9a8c\u8bc1\u7801\u8f93\u5165\u9519\u8bef","CAPTCHA_PHONE_ERROR":"\u624b\u673a\u9a8c\u8bc1\u7801\u4e0d\u6b63\u786e","CAPTCHA_PHONE_SEND":"\u9a8c\u8bc1\u7801\u5df2\u53d1\u9001\u5230\u4f60\u7684\u624b\u673a\u4e0a\u8bf7\u6ce8\u610f\u67e5\u6536","CAPTCHA_SEND_AGAIN":"\u540e\u53ef\u91cd\u53d1","CAPTCHA_SEND_OVER":"\u77ed\u4fe1\u5df2\u53d1\u9001\u6210\u529f,\u9a8c\u8bc1\u7801\u533a\u5206\u5927\u5c0f\u5199","CAPTCHA_PHONE_NO":"\u4e0d\u9700\u8981\u77ed\u4fe1\u9a8c\u8bc1\u7801","CAPTCHA_PHONE_NULL":"\u77ed\u4fe1\u5bc6\u7801\u4e0d\u80fd\u4e3a\u7a7a","PHONE_TYPE_ERROR":"\u7535\u8bdd\u683c\u5f0f\u4e0d\u5bf9","PHONE_NOTING":"\u7535\u8bdd\u4e0d\u80fd\u4e3a\u7a7a","PHONE_FILL":"\u8bf7\u586b\u5199\u624b\u673a\u53f7","PHONE_CAPTCHA_NOTING":"\u624b\u673a\u9a8c\u8bc1\u7801\u4e0d\u80fd\u4e3a\u7a7a","PASSWORD_NOTING":"\u5bc6\u7801\u4e0d\u80fd\u4e3a\u7a7a","PASSWORD_CONFIRM_NOTING":"\u5bc6\u7801\u786e\u8ba4\u4e0d\u80fd\u4e3a\u7a7a","PASSWORD_PAY_LESS":"\u652f\u4ed8\u5bc6\u7801\u4e0d\u80fd\u5c11\u4e8e6\u4f4d","PASSWORD_FILL_DIFFERENT":"\u8f93\u5165\u7684\u4e24\u6b21\u5bc6\u7801\u4e0d\u4e00\u6837","PASSWORD_PAY_LOGIN_SAME":"\u652f\u4ed8\u5bc6\u7801\u4e0d\u80fd\u540c\u767b\u9646\u5bc6\u7801\u4e00\u6837","PASSWORD_PAY_FILL":"\u8bf7\u586b\u5199\u652f\u4ed8\u5bc6\u7801","PASSWORD_LENGH_LESS":"\u5bc6\u7801\u957f\u5ea6\u4e0d\u80fd\u5c0f\u4e8e6\u4f4d","PASSWORD_SEND_OK":"\u53d1\u9001\u5bc6\u7801\u90ae\u4ef6\u6210\u529f","PASSWORD_OFER_WRROR":"\u60a8\u63d0\u4f9b\u7684\u627e\u56de\u5bc6\u7801\u4fe1\u606f\u4e0d\u6b63\u786e","PASSWORD_OLD_ERROR":"\u539f\u5bc6\u7801\u9519\u8bef","PASSWORD_UPDATE_OK":"\u5bc6\u7801\u4fee\u6539\u6210\u529f","EMAILL_USED":"\u90ae\u7bb1\u5df2\u88ab\u5360\u7528","EMAILL_NULL":"\u90ae\u7bb1\u4e0d\u80fd\u4e3a\u7a7a\uff01","NOTING":"\u65e0","LEAVEWORDS_NULL":"\u7559\u8a00\u5185\u5bb9\u4e0d\u80fd\u4e3a\u7a7a","LOGIN_FIRST":"\u8bf7\u5148\u767b\u5f55","CONFIRM":"\u786e\u8ba4","YEAR":"\u5e74","DAYS":"\u5929","HOURS":"\u65f6","HOUR":"\u5c0f\u65f6","MINUTE":"\u5206","SECOND":"\u79d2","IS":"\u4e3a","ONE":"\u4e00","TWE":"\u4e8c","TIMES":"\u6b21","COUNTENT_UPDATE_FILL":"\u8bf7\u586b\u5199\u4fee\u6539\u5185\u5bb9","CANCLE":"\u53d6\u6d88","OPERATE_CONFIRM":"\u786e\u5b9a\u6b64\u64cd\u4f5c\u5417\uff1f","USERNAME":"\u59d3\u540d","SUCCESS":"\u64cd\u4f5c\u6210\u529f","FAIL_REPLY":"\u64cd\u4f5c\u5931\u8d25\uff0c\u8bf7\u586b\u5199\u56de\u590d\u4fe1\u606f","SEND_OK":"\u53d1\u9001\u6210\u529f","PHONE_BIND_DONE":"\u5df2\u7ed1\u5b9a","TAGS_USE":"\u4f7f\u7528\u6b64\u6807\u7b7e","WHITEHATS":"\u767d\u5e3d\u5b50","WHITEHATS_VERTIFY":"\u8ba4\u8bc1\u767d\u5e3d\u5b50","WHITEHATES_NAME":"\u8bf7\u8f93\u5165\u767d\u5e3d\u5b50\u7528\u6237\u540d","USER_ZONE_EDIT":"\u7f16\u8f91\u9886\u57df","WB_TRANSFER":"\u6211\u8981\u8f6c\u8d26","WB_TRANSFER_CANCEL":"\u53d6\u6d88\u8f6c\u8d26","WB_NUM":"\u8bf7\u8f93\u5165\u4e4c\u4e91\u5e01\u6570\u91cf","WB_NUMBER":"\u4e4c\u4e91\u5e01\u6570\u91cf\u4e3a\u6b63\u6574\u6570","WB_NEED_LESS":"\u81f3\u5c11\u9700\u8981","WB_NEED_SUM":"\u4e2a\u4e4c\u4e91\u5e01","WB_TRANSFER_OK":"\u8f6c\u8d26\u6210\u529f","WB_MY":"\u6211\u7684\u4e4c\u4e91\u5e01","WB_CAN_USE":"\u53ef\u7528\u7684\u4e4c\u4e91\u5e01","WB_FROZEN":"\u51bb\u7ed3\u7684\u4e4c\u4e91\u5e01","WB_LACK":"\u4e4c\u4e91\u5e01\u4e0d\u8db3","WB_SET_SCOPE":"\u51fa\u4ef7\u8303\u56f4\u4e3a","WB_BIND_CANCEL_STAT":"(\u70b9\u51fb\u201c\u53d6\u6d88\u7ed1\u5b9a\u201d\u83b7\u53d6\u9a8c\u8bc1\u7801\uff0c\u5411\u4e4c\u4e91\u516c\u4f17\u8d26\u53f7\u53d1\u9001\u9a8c\u8bc1\u7801\u53d6\u6d88\u5fae\u4fe1\u7ed1\u5b9a\uff0c\u7136\u540e\u5237\u65b0\u672c\u9875\u9762)","EMAIL_LOGIN_MEXT":"\u90ae\u4ef6\u53d1\u9001\u6210\u529f,\u8bf7\u767b\u9646\u60a8\u7684\u90ae\u7bb1\u8fdb\u884c\u4e0b\u4e00\u6b65\u64cd\u4f5c","EMAIL_UPDATE_LOGIN_MEXT":"\u66f4\u6539\u8bf7\u6c42\u5df2\u53d1\u9001\u5230\u90ae\u7bb1,\u8bf7\u767b\u9646\u60a8\u7684\u90ae\u7bb1\u8fdb\u884c\u4e0b\u4e00\u6b65\u64cd\u4f5c","EMAIL_SEND_OK":"\u90ae\u4ef6\u53d1\u9001\u6210\u529f\uff01","CORPS":"\u5382\u5546","TEAM_NAME_NULL":"\u56e2\u961f\u540d\u79f0\u4e0d\u80fd\u4e3a\u7a7a","TEAM_HOMEPAGE_NULL":"\u56e2\u961f\u4e3b\u9875\u4e0d\u80fd\u4e3a\u7a7a","TEAM_QQ_NULL":"\u56e2\u961fqq\u4e0d\u80fd\u4e3a\u7a7a","TEAM_BRIEF_NULL":"\u56e2\u961f\u7b80\u4ecb\u4e0d\u80fd\u4e3a\u7a7a","TEAM_EXIST":"\u56e2\u961f\u5df2\u5b58\u5728","TEAM_DISMISS_CONFIRM":"\u786e\u5b9a\u89e3\u6563\u672c\u56e2\u961f\u5417?","TEAM_NAME":"\u56e2\u961f\u540d\u79f0","TEAM_CREATER":"\u521b\u5efa\u4eba","TEAM_DONATER":"\u56e2\u961f\u4e3b\u529b","TEAM_MUMBER":"\u4eba\u6570","TEAM":"\u56e2\u961f","REGISTER_BRIEF":"*\u8bf7\u8f93\u5165\u4e2a\u4eba\u7684\u7b80\u8981\u4ecb\u7ecd","REGISTER_TYPE":"*\u9009\u62e9\u6ce8\u518c\u7c7b\u578b","REGISTER_CORPS_BRIEF":"*\u8f93\u5165\u5382\u5546\u7684\u7b80\u8981\u4ecb\u7ecd","REGISTER_EMAIL":"*\u5382\u5546\u90ae\u4ef6\u5fc5\u987b\u4e3a\u4f01\u4e1a\u4f7f\u7528\u7684\u6b63\u5f0f\u90ae\u4ef6","REGISTER_NAME_NULL":"\u7528\u6237\u540d\u4e0d\u80fd\u4e3a\u7a7a","REGISTER_HOMEPAGE_NULL":"\u4e2a\u4eba\u4e3b\u9875\u4e0d\u80fd\u4e3a\u7a7a","REGISTER_BREIF_NULL":"\u7b80\u8981\u4ecb\u7ecd\u4e0d\u80fd\u4e3a\u7a7a","REGISTER_CORPNAME_NULL":"\u5382\u5546\u540d\u79f0\u4e0d\u80fd\u4e3a\u7a7a","REGISTER_CORPHOMEPAGE_NULL":"\u5b98\u65b9\u4e3b\u9875\u4e0d\u80fd\u4e3a\u7a7a","REGISTER_LAW_AGREE":"\u540c\u610f\u300a\u4fe1\u606f\u5b89\u5168\u76f8\u5173\u4fdd\u62a4\u548c\u58f0\u660e\u300b\u624d\u80fd\u6ce8\u518c","ATTENTION":"\u5173\u6ce8","ATTENTION_SUM":"\u5173\u6ce8\u6570","ATTENTION_DONE":"\u5df2\u5173\u6ce8","ATTENTION_CANCEL":"\u53d6\u6d88\u5173\u6ce8","ATTENTION_BUG_DONE":"\u5df2\u5173\u6ce8\u6b64\u6f0f\u6d1e","ATTENTION_BUG_CONFIRM":"\u786e\u5b9a\u53d6\u6d88\u5bf9\u6b64\u6f0f\u6d1e\u7684\u5173\u6ce8","ATTENTION_BUG":"\u5173\u6ce8\u6b64\u6f0f\u6d1e","ATTENTION_BUG_UNDO":"\u6ca1\u6709\u5173\u6ce8\u6b64\u6f0f\u6d1e","ATTENTION_HAT_DONE":"\u5df2\u5173\u6ce8\u6b64\u767d\u5e3d\u5b50","ATTENTION_HAT_CONFIRM":"\u786e\u5b9a\u53d6\u6d88\u5bf9\u6b64\u767d\u5e3d\u5b50\u7684\u5173\u6ce8?","COLLECTION":"\u6536\u85cf","COLLECTION_DONE":"\u5df2\u6536\u85cf","COLLECTION_BUG_DONE":"\u5df2\u6536\u85cf\u6b64\u6f0f\u6d1e","COLLECTION_BUG_UNDO":"\u6ca1\u6709\u6536\u85cf\u6b64\u6f0f\u6d1e","COLLECTION_BUG_CONFIRM":"\u786e\u5b9a\u53d6\u6d88\u5bf9\u6b64\u6f0f\u6d1e\u7684\u6536\u85cf","SMS_SEND_NAME":"* \u7528\u6237\u6635\u79f0\/\u5382\u5546\u540d\u79f0\u4e0d\u80fd\u4e3a\u7a7a<br \/>","SMS_SEND_TITLE":"* \u6807\u9898\u4e0d\u80fd\u4e3a\u7a7a<br \/>","SMS_SEND_CONTENT":"* \u5185\u5bb9\u4e0d\u80fd\u4e3a\u7a7a<br \/>","SMS_SEND_CAPTCHA":"* \u9a8c\u8bc1\u7801\u4e0d\u80fd\u4e3a\u7a7a<br \/>","NUMBER":"\u7684\u6b63\u6574\u6570","RATING_SUCCESS":"\u8bc4\u5206\u6210\u529f","RATING_BUGS_DONE":"\u5df2\u5bf9\u6b64\u6f0f\u6d1e\u8fdb\u884c\u8fc7\u8bc4\u5206","RATING_BUGS_SELF":"\u4e0d\u80fd\u5bf9\u81ea\u5df1\u53d1\u5e03\u7684\u6f0f\u6d1e\u8fdb\u884c\u8bc4\u5206","RATING_SUBMIT_CANCLE":"\u53d6\u6d88\u63d0\u4ea4\u8bc4\u5206","RATING_SUBMIT":"\u63d0\u4ea4\u6211\u7684\u8bc4\u5206","RATING_SUBMIT_CHECK":"\u8bf7\u786e\u5b9a\u6bcf\u4e00\u9879\u90fd\u9009\u62e9\u4e86\u8bc4\u5206","RATING_CONFIRM":"\u786e\u5b9a\u63d0\u4ea4\u5bf9\u6b64\u5382\u5546\u7684\u8bc4\u5206\u5417\uff1f","RATING_LOGIN":"\u53ea\u6709\u767b\u5f55\u7684\u767d\u5e3d\u5b50\u624d\u80fd\u8bc4\u5206","RATING_DONE":"\u5df2\u7ecf\u8bc4\u8fc7\u5206\u4e86","WOOYUN_CORPS":"\u4e4c\u4e91\u5382\u5546","MARST_IMAGE":"\u5bf9\u56fe\u7247\u6253\u7801","FEEDBACK_LINK_NULL":"\u94fe\u63a5\u4e0d\u80fd\u4e3a\u7a7a\uff01","FEEDBACK_LINK_ERROR":"\u8bf7\u4e66\u5199\u6b63\u786e\u7684\u94fe\u63a5\u5730\u5740\uff01","FEEDBACK_CONTENT_NULL":"\u95ee\u9898\u5185\u5bb9\u4e0d\u80fd\u4e3a\u7a7a\uff01","FEEDBACK_ALLOW_LIMIT":"\u534a\u5c0f\u65f6\u53ea\u5141\u8bb8\u53cd\u9988\u4e00\u6b21","TOP_RANK":"\u6392\u540d","TOP_BUG_TITLE":"\u6f0f\u6d1e\u6807\u9898","TOP_RANK_NONE":"\u6682\u65e0\u6392\u540d","TOP_BUGS_GOOD":"\u4f18\u8d28\u6f0f\u6d1e\u6570","NICKNAME":"\u6635\u79f0","LEVEL":"\u7b49\u7ea7","VALUE":"\u503c","EDITOR_INSERT_PIC":"\u63d2\u5165\u56fe\u7247","EDITOR_PIC_ADDR":"\u5730\u5740\uff1a","EDITOR_CONFIRM":"\u786e\u5b9a","EDITOR_PIC_NULL":"\u8bf7\u4e0a\u4f20\u56fe\u7247\u6216\u586b\u5199\u56fe\u7247\u5730\u5740","EDITOR_INSERT_VIDIO":"\u63d2\u5165\u89c6\u9891","EDITOR_VIDIO_ADDR":"\u89c6\u9891\u5730\u5740\uff1a","EDITOR_VIDIO_NULL":"\u8bf7\u586b\u5199\u89c6\u9891\u5730\u5740(.swf)","EDITOR_VIDIO_TYPE":"\u76ee\u524d\u4ec5\u652f\u6301.swf\u683c\u5f0f","PIC_SELECT":"\u8bf7\u9009\u62e9\u5f85\u4e0a\u4f20\u7684\u56fe\u7247","PIC_TYPE_IS":"\u56fe\u7247\u7c7b\u578b\u4e3a","UPLOAD":"\u4e0a\u4f20","RANK_AVG":"\u6f0f\u6d1e\u5e73\u5747"};
$(function(){
function getParamsOfShareWindow(width, height) {
return ['toolbar=0,status=0,resizable=1,width=' + width + ',height=' + height + ',left=',(screen.width-width)/2,',top=',(screen.height-height)/2].join('');
}
});
function errimg(img){
tmp=img.src;
nimg=tmp.replace("path_to_url","path_to_url");
img.src=nimg;
$(img).parent().attr('href',nimg);
img.onerror=null;
}
function AttendBug(id){
$.get('/ajaxdo.php',{module:'attendbug',id:id,rid:Math.random(),token:$("#token").val()},function(re){
if(re==1){
$("#attention_num").html(parseInt($("#attention_num").html())+1);
$("#attend_action").html(''+_LANGJS.ATTENTION_DONE+' <a class="btn" href="javascript:void(0)" onclick="AttendCancel('+id+')">'+_LANGJS.ATTENTION_CANCEL+'</a></span>');
}else if(re==2){
alert(_LANGJS.LOGIN_FIRST);
}else if(re==3){
alert(_LANGJS.ATTENTION_BUG_DONE);
}else{
alert(_LANGJS.FAIL_MANAGE);
}
});
}
function AttendCancel(id){
if(confirm(_LANGJS.ATTENTION_BUG_CONFIRM+"?")){
$.get('/ajaxdo.php',{module:'attendcancel',id:id,rid:Math.random(),token:$("#token").val()},function(re){
if(re==1){
$("#attention_num").html(parseInt($("#attention_num").html())-1);
$("#attend_action").html('<a class="btn" href="javascript:void(0)" onclick="AttendBug('+id+')">'+_LANGJS.ATTENTION_BUG+'</a></span>');
}else{
alert(_LANGJS.FAIL_MANAGE);
}
});
}
}
function CollectBug(id,token){
$.get('/ajaxdo.php',{'module':'collect','id':id,'token':token,'rid':Math.random()},function(re){
if(re==1){
$("#collection_num").html(parseInt($("#collection_num").html())+1);
$(".btn-fav").removeClass("fav-add");
$(".btn-fav").addClass("fav-cancel");
$(".btn-fav").unbind();
$(".btn-fav").click(function(){
CollectCancel(id,token);
});
}else if(re==2){
alert(_LANGJS.LOGIN_FIRST);
}else if(re==3){
alert(_LANGJS.COLLECTION_BUG_DONE);
}else{
alert(_LANGJS.FAIL_MANAGE);
}
});
}
function CollectCancel(id,token){
if(confirm(_LANGJS.COLLECTION_BUG_CONFIRM+"?")){
$.get('/ajaxdo.php',{'module':'collectcancel','id':id,'token':token,'rid':Math.random()},function(re){
if(re==1){
$("#collection_num").html(parseInt($("#collection_num").html())-1);
$(".btn-fav").removeClass("fav-cancel");
$(".btn-fav").addClass("fav-add");
$(".btn-fav").unbind();
$(".btn-fav").click(function(){
CollectBug(id,token);
});
}else{
alert(_LANGJS.FAIL_MANAGE);
}
});
}
}
</script>
<div class="content">
<input type="hidden" id="token" style="display:none" value="" />
<h2>
<span style="margin:0 0 0 580px; float:right; position:absolute; font-size:14px; font-weight:normal">(<span id="attention_num">18</span>)
<span id="attend_action">
<a class="btn" href="javascript:void(0)" onclick="AttendBug(103343)"></a></span>
</span></h2>
<h3> <a href="wooyun-2015-0103343">WooYun-2015-103343</a>
<input id="fbid" type="hidden" value="103343">
</h3>
<h3 class='wybug_title'> EduSoho SQL <img src="path_to_url" alt="" class="credit">
</h3>
<h3 class='wybug_corp'> <a href="path_to_url">
edusoho.com </a>
</h3>
<h3 class='wybug_author'> <a href="path_to_url">Comer</a></h3>
<h3 class='wybug_date'> 2015-03-24 16:32</h3>
<h3 class='wybug_open_date'> 2015-06-22 17:18</h3>
<h3 class='wybug_type'> SQL</h3>
<h3 class='wybug_level'> </h3>
<h3>Rank 20</h3>
<h3 class='wybug_status'>
</h3>
<h3> <a href="path_to_url">path_to_url help@wooyun.org</h3>
<h3>Tags
<span class="tag"><a href="path_to_url">php+</a></span>
<span class="tag"><a href="path_to_url">php</a></span>
</h3>
<h3>
<!-- Baidu Button BEGIN -->
<div id="share">
<div style="float:right; margin-right:100px;font-size:12px">
<span class="fav-num"><a id="collection_num">3</a></span>
<a style="text-decoration:none; font-size:12px" href="javascript:void(0)" class="fav-add btn-fav"></a>
<script type="text/javascript">
var token="";
var id="103343";
$(".btn-fav").click(function(){ CollectBug(id,token); });
</script>
</div>
<span style="float:left;"></span>
<div id="bdshare" class="bdshare_b" style="line-height: 12px;"><img src="path_to_url" />
<a class="shareCount"></a>
</div>
</div>
<!-- Baidu Button END -->
</h3>
<hr align="center"/>
<h2></h2>
<h3 class="detailTitle"></h3>
<p class="detail" style="padding-bottom:0">
</p>
<p class="detail wybug_open_status">
2015-03-24 <br/>
2015-03-24 <br/>
2015-03-27 <a href="path_to_url" target="_blank"></a><a href="path_to_url" target="_blank"></a><a href="path_to_url" target="_blank"></a><br/>
2015-05-18 <br/>
2015-05-28 <br/>
2015-06-07 <br/>
2015-06-22 <br/>
</p>
<h3 class="detailTitle"></h3>
<p class="detail wybug_description">4~</p>
<h3 class="detailTitle"></h3>
<div class='wybug_detail'>
<p class="detail">down<br />
<br />
src/Topxia/WebBundle/Controller/SearchController.php 36categoryIds</p><fieldset class='fieldset fieldset-code'><legend>code </legend><pre><code><?php<br />
namespace Topxia\WebBundle\Controller;<br />
<br />
use Symfony\Component\HttpFoundation\Request;<br />
use Topxia\Common\Paginator;<br />
use Topxia\Common\ArrayToolkit;<br />
<br />
class SearchController extends BaseController<br />
{<br />
public function indexAction(Request $request)<br />
{<br />
$courses = $paginator = null;<br />
$code = 'Vip';<br />
<br />
$currentUser = $this->getCurrentUser();<br />
<br />
$keywords = $request->query->get('q');<br />
$keywords=trim($keywords);<br />
<br />
$vip = $this->getAppService()->findInstallApp($code);<br />
<br />
$isShowVipSearch = $vip && version_compare($vip['version'], "1.0.7", ">=");<br />
<br />
$currentUserVipLevel = "";<br />
$vipLevelIds = "";<br />
if($isShowVipSearch){<br />
$currentUserVip = $this->getVipService()->getMemberByUserId($currentUser['id']);<br />
$currentUserVipLevel = $this->getLevelService()->getLevel($currentUserVip['levelId']);<br />
$vipLevels = $this->getLevelService()->findAllLevelsLessThanSeq($currentUserVipLevel['seq']);<br />
$vipLevelIds = ArrayToolkit::column($vipLevels, "id");<br />
}<br />
<br />
$parentId = 0;<br />
$categories = $this->getCategoryService()->findAllCategoriesByParentId($parentId);<br />
<br />
$categoryIds=array();<br />
for($i=0;$i<count($categories);$i++){<br />
$id = $categories[$i]['id'];<br />
$name = $categories[$i]['name'];<br />
$categoryIds[$id] = $name;<br />
}<br />
<br />
$categoryId = $request->query->get('categoryIds');<br />
$coursesTypeChoices = $request->query->get('coursesTypeChoices'); <br />
<br />
if (!$keywords) {<br />
goto response;<br />
}<br />
<br />
if($coursesTypeChoices == 'vipCourses'){<br />
$conditions = array(<br />
'status' => 'published',<br />
'title' => $keywords,<br />
'categoryId' => $categoryId,<br />
'vipLevelIds' => $vipLevelIds<br />
);<br />
}elseif($coursesTypeChoices == 'liveCourses'){<br />
$conditions = array(<br />
'status' => 'published',<br />
'title' => $keywords,<br />
'categoryId' => $categoryId,<br />
'type' => 'live'<br />
);<br />
}else{<br />
$conditions = array(<br />
'status' => 'published',<br />
'title' => $keywords,<br />
'categoryId' => $categoryId<br />
);<br />
}<br />
<br />
$paginator = new Paginator(<br />
$this->get('request'),<br />
$this->getCourseService()->searchCourseCount($conditions)<br />
, 10<br />
);<br />
<br />
$courses = $this->getCourseService()->searchCourses(<br />
$conditions,<br />
'latest',<br />
$paginator->getOffsetCount(),<br />
$paginator->getPerPageCount()<br />
);<br />
<br />
<br />
response:<br />
return $this->render('TopxiaWebBundle:Search:**.**.**.**ig', array(<br />
'courses' => $courses,<br />
'paginator' => $paginator,<br />
'keywords' => $keywords,<br />
'isShowVipSearch' => $isShowVipSearch,<br />
'currentUserVipLevel' => $currentUserVipLevel,<br />
'categoryIds' => $categoryIds,<br />
'coursesTypeChoices' => $coursesTypeChoices<br />
));<br />
}<br />
...</code></pre></fieldset><p class='detail'>SQLSymfonycode....AdminBundle</p><p class="detail usemasaic"><a href="../upload/201503/240058479320883eded565604d84d66833e3e654.png" target="_blank"><img src="../upload/201503/240058479320883eded565604d84d66833e3e654.png" alt="1.png" width="600" onerror="javascript:errimg(this);"/></a></p><p class="detail"><br />
<br />
</p>
</div>
<h3 class="detailTitle"></h3>
<div class='wybug_poc'>
<p class="detail">localhost</p><p class="detail usemasaic"><a href="../upload/201503/2401074353032b82b14ec7ad97cc784a4df41773.png" target="_blank"><img src="../upload/201503/2401074353032b82b14ec7ad97cc784a4df41773.png" alt="2.png" width="600" onerror="javascript:errimg(this);"/></a></p><p class="detail">**.**.**.**</p><fieldset class='fieldset fieldset-code'><legend>code </legend><pre><code>web server operating system: Linux Ubuntu<br />
web application technology: Nginx, PHP 5.5.9<br />
back-end DBMS: MySQL >= 5.0.0<br />
database management system users [1]:<br />
[*] 'demoedusohouser'@'localhost'<br />
<br />
available databases [2]:<br />
[*] `**.**.**.**`<br />
[*] information_schema</code></pre></fieldset><p class='detail'></p><p class="detail usemasaic"><a href="../upload/201503/240111453c1de789723f30e30520c898fb7071fc.png" target="_blank"><img src="../upload/201503/240111453c1de789723f30e30520c898fb7071fc.png" alt="5.png" width="600" onerror="javascript:errimg(this);"/></a></p><p class="detail"></p><p class="detail usemasaic"><a href="../upload/201503/24011153d543525a7d60fd51fcd379c0c4b65507.png" target="_blank"><img src="../upload/201503/24011153d543525a7d60fd51fcd379c0c4b65507.png" alt="4.png" width="600" onerror="javascript:errimg(this);"/></a></p><p class="detail"><br />
<br />
4~55.1.41-23~ </p>
</div>
<h3 class="detailTitle"></h3>
<div class='wybug_patch'>
<p class="detail">... </p>
</div>
<h3 class="detailTitle"> <a style="font-weight:normal" href="path_to_url" title="Comer">Comer</a>@<a style="font-weight:normal" href="path_to_url" title="EduSoho SQL"></a></h3>
<hr align="center"/>
<h2 id="bugreply"></h2>
<div class='bug_result'>
<h3 class="detailTitle"></h3>
<p class="detail"></p>
<p class="detail">Rank10 </p>
<p class="detail">2015-03-24 17:17</p>
<h3 class="detailTitle"></h3>
<p class="detail">@Comer</p>
<h3 class="detailTitle"></h3>
<p class="detail">2015-03-25</p>
</div>
<hr align="center" />
<script type="text/javascript">
var bugid="103343";
var bugRating="-3";
var myRating="";
var ratingCount="0";
function ShowBugRating(k){
var ratingItems=$(".myrating span");
$.each(ratingItems,function(i,n){
var nk=parseInt($(n).attr("rel"));
if(nk<=k){
$(n).addClass("on");
}else{
$(n).removeClass("on");
}
});
$(".myrating span").hover(
function(){
$("#ratingShow").html($(this).attr("data-title"));
},
function(){
$("#ratingShow").html("");
}
);
}
$(document).ready(function(){
if(myRating==""){
var ratingItems=$(".myrating span");
$(".myrating span").hover(
function(){
$(this).addClass("hover");
var k=parseInt($(this).attr("rel"));
$.each(ratingItems,function(i,n){
var nk=parseInt($(n).attr("rel"));
if(nk<k) $(n).addClass("on");
if(nk>k) $(n).removeClass("on");
});
$("#ratingShow").html($(this).attr("data-title"));
},
function(){
$(this).removeClass("hover");
if($("#myRating").val()==""){
$.each(ratingItems,function(i,n){
$(n).removeClass("on");
});
}
$("#ratingShow").html("");
}
);
$(".myrating span").click(function(){
var rating=$(this).attr("rel");
var k=parseInt($(this).attr("rel"));
$.post("/ajaxdo.php?module=bugrating",{"id":bugid,"rating":rating,"token":$("#token").val()},function(re){
//
$(".myrating span").unbind();
re=parseInt(re);
switch(re){
case 1:
$("#ratingShow").html(_LANGJS.RATING_SUCCESS);
$("#ratingSpan").html(parseInt($("#ratingSpan").html())+1);
$.each(ratingItems,function(i,n){
var nk=parseInt($(n).attr("rel"));
if(nk<=k){
$(n).addClass("on");
}else{
$(n).removeClass("on");
}
});
ShowBugRating(rating);
break;
case 2:
$("#ratingShow").html(_LANGJS.LOGIN_FIRST);
break;
case 4:
$("#ratingShow").html(_LANGJS.RATING_BUGS_DONE);
break;
case 6:
$("#ratingShow").html(_LANGJS.RATING_BUGS_SELF);
break;
default:break;
}
});
});
}else{
if(ratingCount>2){
ShowBugRating(bugRating);
}else{
ShowBugRating(-3);
}
}
});
</script>
<h3 class="detailTitle"></h3>
<p class="detail"></p>
<h5 class="rating">
<div class="ratingText"><span>(<span id="ratingSpan">0</span>)</span>:</div>
<div class="myrating">
<span rel="-2" data-title=""></span>
<span rel="-1" data-title=""></span>
<span rel="0" data-title=""></span>
<span rel="1" data-title=""></span>
<span rel="2" data-title=""></span>
<div id="ratingShow">
</div>
</div>
</h5>
<input type="hidden" id="myRating" value="" />
<hr align="center" />
<h2></h2>
<div id="replys" class="replys">
<ol class="replylist">
<li class="reply clearfix">
<div class="reply-content">
<div class="reply-info">
<span class="addtime">2015-03-27 21:38</span> |
<a target='_blank' href="path_to_url">lupin</a> <!-- @zm 2013-12-13 Begin -->
( | <!-- @zm 2013-12-13 End -->
Rank:256 :49 | )
<div class="likebox">
<span class="likepre" title="" rel="138375"></span>
<span class="liketext liketext_min"><span id="likenum_138375">2</span></span>
<span class="likesuf"></span>
</div>
</div><!-- reply-info End -->
<div class="description">
<p> </p>
</div>
<div class="replylist-act">
<span class="floor">1#</span>
<a title=" lupin" href="javascript:void(0)" class="replyBtn" onclick="Reply('lupin')"></a>
</div>
</div><!-- reply-content End -->
</li>
<li class="reply clearfix">
<div class="reply-content">
<div class="reply-info">
<span class="addtime">2015-03-29 17:53</span> |
<a target='_blank' href="path_to_url">90Snake</a> <!-- @zm 2013-12-13 Begin -->
( | <!-- @zm 2013-12-13 End -->
Rank:167 :53 | )
<div class="likebox">
<span class="likepre" title="" rel="138512"></span>
<span class="liketext liketext_min"><span id="likenum_138512">0</span></span>
<span class="likesuf"></span>
</div>
</div><!-- reply-info End -->
<div class="description">
<p>@lupin 23 </p>
</div>
<div class="replylist-act">
<span class="floor">2#</span>
<a title=" 90Snake" href="javascript:void(0)" class="replyBtn" onclick="Reply('90Snake')"></a>
</div>
</div><!-- reply-content End -->
</li>
<li class="reply clearfix">
<div class="reply-content">
<div class="reply-info">
<span class="addtime">2015-03-30 09:46</span> |
<a target='_blank' href="path_to_url">Comer</a> <!-- @zm 2013-12-13 Begin -->
( | <!-- @zm 2013-12-13 End -->
Rank:336 :40 | | )
<div class="likebox">
<span class="likepre" title="" rel="138566"></span>
<span class="liketext liketext_min"><span id="likenum_138566">1</span></span>
<span class="likesuf"></span>
</div>
</div><!-- reply-info End -->
<div class="description">
<p>@lupin @90Snake ~ </p>
</div>
<div class="replylist-act">
<span class="floor">3#</span>
<a title=" Comer" href="javascript:void(0)" class="replyBtn" onclick="Reply('Comer')"></a>
</div>
</div><!-- reply-content End -->
</li>
<li class="reply clearfix">
<div class="reply-content">
<div class="reply-info">
<span class="addtime">2015-03-30 10:02</span> |
<a target='_blank' href="path_to_url">Xser</a> <!-- @zm 2013-12-13 Begin -->
( | <!-- @zm 2013-12-13 End -->
Rank:390 :88 | JDSec)
<div class="likebox">
<span class="likepre" title="" rel="138578"></span>
<span class="liketext liketext_min"><span id="likenum_138578">0</span></span>
<span class="likesuf"></span>
</div>
</div><!-- reply-info End -->
<div class="description">
<p>@comer </p>
</div>
<div class="replylist-act">
<span class="floor">4#</span>
<a title=" Xser" href="javascript:void(0)" class="replyBtn" onclick="Reply('Xser')"></a>
</div>
</div><!-- reply-content End -->
</li>
<li class="reply clearfix">
<div class="reply-content">
<div class="reply-info">
<span class="addtime">2015-03-30 17:19</span> |
<a target='_blank' href="path_to_url">90Snake</a> <!-- @zm 2013-12-13 Begin -->
( | <!-- @zm 2013-12-13 End -->
Rank:167 :53 | )
<div class="likebox">
<span class="likepre" title="" rel="138713"></span>
<span class="liketext liketext_min"><span id="likenum_138713">0</span></span>
<span class="likesuf"></span>
</div>
</div><!-- reply-info End -->
<div class="description">
<p>@Comer ... </p>
</div>
<div class="replylist-act">
<span class="floor">5#</span>
<a title=" 90Snake" href="javascript:void(0)" class="replyBtn" onclick="Reply('90Snake')"></a>
</div>
</div><!-- reply-content End -->
</li>
</ol><!-- replylist End -->
</div><!-- replys End -->
<div id="reply" class="reply">
<a name="comment"></a>
<p class="detail">
<a href="path_to_url"><u></u></a>
</p>
<script type="text/javascript">
var masaic = '0';
function CommentLike(id){
$.post("/ajaxdo.php?module=commentrating",{"id":id,"token":$("#token").val()},function(re){
re=parseInt(re);
switch(re){
case 1:
$("#likenum_"+id).html(parseInt($("#likenum_"+id).html())+1);
break;
case 4:
alert(_LANGJS.COMMENT_GOOD_DONE);
break;
case 6:
alert(_LANGJS.COMMENT_SELF);
break;
default:break;
}
});
}
$(document).ready(function(){
$(".likebox .likepre").click(function(){
CommentLike($(this).attr("rel"));
});
});
</script>
<div>
</div>
<div id="footer">
<span class="copyright fleft">
<a href="path_to_url">ICP15041338-1</a>
<!--a href="path_to_url" target="_blank"><img src="/images/sae_bottom_logo.png" title="Powered by Sina App Engine"></a-->
</span>
<span class="other fright">
<a href="path_to_url"></a>
<a href="path_to_url"></a>
<a href="path_to_url"></a>
<a href="path_to_url"></a>
<a href="path_to_url"></a>
</span>
</div>
<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3Fc12f88b5c1cd041a732dea597a5ec94c' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript" id="bdshare_js" data="type=button" ></script>
<script type="text/javascript" id="bdshell_js"></script>
<script type="text/javascript">
document.getElementById("bdshell_js").src = "path_to_url" + new Date().getHours();
if (top.location !== self.location) top.location=self.location;
</script>
</body>
</html>
```
|
```javascript
"use strict";(self.webpackChunknextcloud=self.webpackChunknextcloud||[]).push([[1642],{94929:(t,e,n)=>{n.d(e,{A:()=>i});var a=n(71354),o=n.n(a),s=n(76314),l=n.n(s)()(o());l.push([t.id,".legacy-prompt__text[data-v-8cfbac52]{margin-block:0 .75em}.legacy-prompt__input[data-v-8cfbac52]{margin-block:0 1em}[data-v-8cfbac52] .legacy-prompt__dialog .dialog__actions{min-width:calc(100% - 12px);justify-content:space-between}","",{version:3,sources:["webpack://./core/src/components/LegacyDialogPrompt.vue"],names:[],mappings:"AAEC,sCACC,oBAAA,CAGD,uCACC,kBAAA,CAIF,0DACC,2BAAA,CACA,6BAAA",sourcesContent:["\n.legacy-prompt {\n\t&__text {\n\t\tmargin-block: 0 .75em;\n\t}\n\n\t&__input {\n\t\tmargin-block: 0 1em;\n\t}\n}\n\n:deep(.legacy-prompt__dialog .dialog__actions) {\n\tmin-width: calc(100% - 12px);\n\tjustify-content: space-between;\n}\n"],sourceRoot:""}]);const i=l},71642:(t,e,n)=>{n.r(e),n.d(e,{default:()=>v});var a=n(53334),o=n(85471),s=n(94219),l=n(82182),i=n(16044);const c=(0,o.pM)({name:"LegacyDialogPrompt",components:{NcDialog:s.A,NcTextField:l.A,NcPasswordField:i.A},props:{name:{type:String,required:!0},text:{type:String,required:!0},isPassword:{type:Boolean,required:!0},inputName:{type:String,default:"prompt-input"}},emits:["close"],data:()=>({inputValue:""}),computed:{buttons(){return[{label:(0,a.Tl)("core","No"),callback:()=>this.$emit("close",!1,this.inputValue)},{label:(0,a.Tl)("core","Yes"),type:"primary",callback:()=>this.$emit("close",!0,this.inputValue)}]}},mounted(){this.$nextTick((()=>this.$refs.input?.focus?.()))}});var p=n(85072),u=n.n(p),r=n(97825),m=n.n(r),d=n(77659),A=n.n(d),g=n(55056),_=n.n(g),b=n(10540),y=n.n(b),f=n(41113),C=n.n(f),x=n(94929),h={};h.styleTagTransform=C(),h.setAttributes=_(),h.insert=A().bind(null,"head"),h.domAPI=m(),h.insertStyleElement=y(),u()(x.A,h),x.A&&x.A.locals&&x.A.locals;const v=(0,n(14486).A)(c,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("NcDialog",{attrs:{"dialog-classes":"legacy-prompt__dialog",buttons:t.buttons,name:t.name},on:{"update:open":function(e){return t.$emit("close",!1,t.inputValue)}}},[e("p",{staticClass:"legacy-prompt__text",domProps:{textContent:t._s(t.text)}}),t._v(" "),t.isPassword?e("NcPasswordField",{ref:"input",staticClass:"legacy-prompt__input",attrs:{autocomplete:"new-password",label:t.name,name:t.inputName,value:t.inputValue},on:{"update:value":function(e){t.inputValue=e}}}):e("NcTextField",{ref:"input",staticClass:"legacy-prompt__input",attrs:{label:t.name,name:t.inputName,value:t.inputValue},on:{"update:value":function(e){t.inputValue=e}}})],1)}),[],!1,null,"8cfbac52",null).exports}}]);
//# sourceMappingURL=1642-1642.js.map?v=0e50a2b32d2d64b50afa
```
|
The canton of La Grand-Combe is an administrative division of the Gard department, southern France. Its borders were modified at the French canton reorganisation which came into effect in March 2015. Its seat is in La Grand-Combe.
It consists of the following communes:
Aujac
Bonnevaux
Branoux-les-Taillades
Cendras
Chambon
Chamborigaud
Concoules
Corbès
Génolhac
La Grand-Combe
Lamelouze
Laval-Pradel
Malons-et-Elze
Mialet
Ponteils-et-Brésis
Portes
Saint-Bonnet-de-Salendrinque
Sainte-Cécile-d'Andorge
Sainte-Croix-de-Caderle
Saint-Jean-du-Gard
Saint-Paul-la-Coste
Saint-Sébastien-d'Aigrefeuille
Les Salles-du-Gardon
Sénéchas
Soustelle
Thoiras
Vabres
La Vernarède
References
Cantons of Gard
|
Neil Gerard Giuliano (born October 26, 1956) is an American politician who served as mayor of Tempe, Arizona for four terms, from 1994 to 2004 (Three two-year terms and one four-year term). After serving in elected office he served as president of the Gay & Lesbian Alliance Against Defamation (GLAAD) from 2005 to 2009, and served as President/CEO of the San Francisco AIDS Foundation from December 2010 to December 2015. Giuliano was the first directly-elected openly gay mayor in the United States, and Tempe was the largest city in America with an openly gay mayor for nearly six years, 1996- 2001.
Since January 2016 he has served as President/CEO of Greater Phoenix Leadership.
Education and work at ASU
Giuliano attended Bloomfield High School in Bloomfield, New Jersey. While a student he was a member of the Bloomfield High School Key Club. Giuliano graduated with a BA degree from what is now the Hugh Downs School of Communication at Arizona State University in 1979, and received a master's degree in Higher Education Administration in 1983. While a student, he served as student body president (1982–83) as well as the 1977–78 International President of Circle K International. He worked professionally at ASU from 1981 to 2005 in numerous student affairs and university relations roles. He also taught a 3-credit hour course in Personal Leadership Development during most of his tenure at the university.
Community service
He remains an active member of the Kiwanis Club of Tempe, which he joined in February 1981, and served as president of the club from 1986 to 1987. He also served as president of Tempe Leadership and on numerous non-profit boards of directors including the Tempe Community Council, Big Brothers-Big Sisters and the Friends of the Tempe Center for the Arts. He currently serves on the board of director for the Valley of the Sun United Way and was a founding member of the Friends of Tempe Center for the Arts board of directors. He currently serves on the board of directors for The Partnership for Economic Innovation, Valley of the Sun United Way and Visit Phoenix.
Political career
Giuliano began his political career as a city council member, elected in May 1990, and was appointed vice-mayor of Tempe, Arizona for 1992–94. He was elected mayor of Tempe four times, serving from 1994 to 2004; the first three terms were two-years each, the fourth was for four years. After he first came out as gay in August 1996, political opponents tried to initiate a recall election to remove him from office, but that effort failed. Following a controversy over city funds being directed to the Boy Scouts of America in 2000, a successful recall effort proceeded to the ballot. The recall election was held on September 11, 2001. Giuliano won in a landslide, defeating a campaign that was called "blatantly homophobic". He also co-chaired the planning the third debate of the 2004 United States presidential elections. Upon retiring from elected office in 2004 and a 24-year career at Arizona State University in 2005, where he served as director of federal relations among other positions, Giuliano received praise from Senator John McCain and then-Governor Janet Napolitano. In 2008, Giuliano changed his registration from the Republican Party to the Democratic Party and The Arizona Republic reported that he has considered running for governor of Arizona in 2010 as a Democrat but he declined to run. In 2014, it was again speculated that he would run for governor, but he instead endorsed Fred DuVal for the Democratic nomination.
GLAAD
Giuliano served as president of the Gay & Lesbian Alliance Against Defamation (GLAAD), a national LGBT organization dedicated to ensuring fair, accurate and inclusive representation of LGBT people and events in the media, from 2005 to 2009. He initiated LGBT media advocacy programs and awareness in the areas of sports, advertising and religion/faith/values, helping bridge the divide about LGBT issues in these critical communities. During his tenure the GLAAD Media Awards were first broadcast on the BRAVO Network, reaching over 80 million homes with LGBT affirming messages.
Giuliano was featured on CBS Sunday Morning in 1999 and has appeared on CNN, ABC World News Tonight, Showbiz Tonight, and Access Hollywood. He has been quoted in Newsweek, TIME, USA Today and numerous state and regional media outlets discussing LGBT images in the media and issues as well as the state of HIV/AIDS in the United States.
Awards and recognition
Giuliano was named one of the Top 25 of 2005 by Instinct Magazine. In 2004, he received the Individual Achievement Award from the Arizona Human Rights Fund. He was named to the OUT 100 by OUT Magazine, which notes the top 100 people in gay culture in the US. While he was mayor in 2003, Tempe was named an "All American-City," an award honoring local governments demonstrating success in problem solving. He was named Tempe Humanitarian of the year in 2014 and among the Most Admired Leaders of the Phoenix region in 2017 by the Phoenix Business Journal. In 2018 he received the highest recognition for leadership and community service when selected as the 69th Man of the Year. Former US Senator Barry Goldwater was the first recipient of the award in 1949.
Giuliano is the author of The Campaign Within: A Mayor's Private Journey to Public Leadership.
References
1956 births
Living people
American people of Italian descent
LGBT mayors of places in the United States
LGBT people from Arizona
American LGBT rights activists
Mayors of Tempe, Arizona
Gay politicians
Arizona Republicans
Arizona Democrats
|
Leslie Arthur Walcott (18 January 1894 – 27 February 1984) was a West Indian cricketer who played for Barbados between 1925–26 and 1935-36 as a batsman, off-spinner and, in 1934-35, wicket-keeper.
In January 1930 he scored 73 not out against the MCC and was selected to play shortly afterwards in the first Test played at home by the West Indies, against England at Bridgetown. He made 24 and 16 not out and took the wicket of George Gunn. He was one of four players omitted for the Second Test, and played no further Test cricket.
He continued playing for Barbados until he was 42, captaining the side in several matches.
Walcott was born at Saint Michael Parish, Barbados. He was educated at Combermere School and Harrison College. In 1923 he became games master at Harrison College, and in 1932 moved to The Lodge School. There he made a significant contribution and coached several Barbadian players including Wilfred Farmer, Michael Frederick, John Goddard, Ken Goddard, Roy Marshall and Laurie Johnson.
Walcott died at Saint Michael Parish, Barbados at the age of 90. He was not related to Clyde Walcott.
References
External links
Leslie Walcott at Cricket Archive
Leslie Walcott at Cricinfo
1894 births
1984 deaths
West Indies Test cricketers
Barbadian cricketers
Barbados cricketers
Cricketers from Saint Michael, Barbados
People educated at Harrison College (Barbados)
|
Cieszyn folk costume, also known as Valachian, is a Silesian folk costume, which used to be worn within majority of the area of Cieszyn Silesia, but mostly by Cieszyn Vlachs. Taking into consideration ornamentation, cutting and materials, it can be observed that it is a replica of historical costumes of the Renaissance. The male folk costume was worn only to the late 19th century, whereas the female folk costume was more popular and spread in the vicinity of the Wisła, Istebna and Koniaków. Previously in this area the costumes of Silesian Gorals prevailed. Female folk costumes in Cieszyn were subjected to many changes, especially in respect to ornamentations and better quality of materials. Due to its richness and elegance the costume quickly became a target of artists and specialists in folk culture.
Cieszyn folk costumes at the beginning of the 20th century
A significant change concerning sets of garments, cutting and materials can be observed in the second half of the 19th century. Moreover, the process of modernization intensified after the first World War. Since that time Cieszyn folk costumes have never come to their traditional form again. Men constituted the social group which was most prone to change and they first ceased to wear traditional costumes. It may be due to the fact that majority of men migrated to industrial cities for economic reasons. A clash of different cultures resulted in greater standardization. Tastes have changed and new materials were introduced to modify traditional cuttings. Kabotek is the conspicuous example of this process. The cutting of this short waist shift was simplified. What is more, handmade ornaments were replaced by machine embroidery and laces. Leather and silver elements in Cieszynian belt were frequently replaced by rubber and beads.
Female folk costume
The female folk costume featured the lush and elegance, due to its essential element, silver jewellery. In the 18th and 19th century, women in Cieszyn wore splendorous clothes which consisted of a lace cap, covered with headgear, a short shirt (kabotek), redbreas, padded corset (żywotek), sewn at the waist, apron, white stockings and black shoes. It was not until a century later that the jewellery previously worn by the nobility and the bourgeoisie was adapted as the traditional costume by the population of small towns and villages.
Elements of the female folk costume
Kabotek- a short waist shift with puffed, elbowlength sleeves. Wedding version of the shirt has long sleeves. Trimming of a thin collar, named lemiec, was embroidered a half cross stitch in black or brown. Later, satin stitch embroidery was introduced. Gradually, in the 20th century a half cross stitch was entirely supplanted by white satin stitch embroidery and broderie anglaise. Floral patterns became dominant.
Żywotek- embroidered with silver or golden thread, stiffen kind of a corset with braces. The front part of żywotek, przedniczki, is widely cut in the shape of a rectangle. The back part of , , forms a characteristic triangle, called . The item of clothing is velvet and usually black or claret. Most frequently a golden thread is used for red velvet while silver thread is used for black velvet embroidery. However, it is not a strict rule. The cutting of żywotek has undergone many changes. The most remarkable one is an extension of the embroidered surface. Also decorative patterns were modified. Three bouquets, two flowers, and garlands became the most common ones. For embroidery metal threads were used, however, poorer women used silk threads. With time, silk floss gained popularity. Żywotek is decorated also with sequins, pearls and bead, so that they form a colourful mosaic. The item of clothing is stiffen with cardboard and lined lining.
Dress- a dark colour wollen skirt, a sewed corset, and żywotek. Skirts were sewn with 6-8 meters of fabric panels and were 5-6 m wide.
Zapaska- long, tied at the waist apron.
Apron – more often linen than damask, consisted of two: front and back aprons, which replaced skirt.
Slip
Bonnet cap, named czepiec- consisting of a reticulated top and very decorative crocheted cap, named czółko. At first, czółko was to adhere as closely as possible to the head, later it became wider. Czółka were embroidered in small motifs, stars or dots. Czepiec is tied at the back and covered with usually linen cloth (chusta czepinowa). Currently, more common are silk cherry-gold or dark brown silk clothes, with a floral motif. Czepiec, was handmade, and his appearance differed depending on age and wealth of the owner.
Loincloth- a patterned gibbon, tied in a bow at the waist. Its scarves often reached the end of the dress.
Jewellery
Similarly to Cieszynian folk costume, jewellery is a replica of ornaments from times of the Renaissance and the Reformation. Because of its being a trade rout and having fertile soil, Cieszyn was rather a rich city. Fashion was being modified in accordance to European markets thanks to trips of the last descendants of the Piast dynasty in Cieszyn on the turn of the 16th and 17th century. Cieszyn was the biggest centre of jewellery trade in the region. Ornaments were made of silver, gold, and some alloys. Metalwork techniques were filigree and casting. Male costumes were decorated only with metal buttons (). A set of jewellery of a wealthy woman consisted of a collar stud, orpant, hoczki and belt.
Collar stud- used to fasten a collar of kabotek. The studs were of round or heart shape.
Orpant- a piece of jewellery consisting of four chains which fall into semicircle. They were attached to braces of żywotek.
Hoczki- metal items with small holes, which enable żywotek to be laced up. The wealthier woman, the more hoczki she had installed in her żywotek
Belt- usually silver, most valuable item of jewellery. Its production required the greatest precision. Originally the belts consisted of small, profusely decorated silver plates, which were joined by a chain. In latter versions the technique of filigree was used.
References
Bibliography
B. Bazielich, Śląskie Stroje Ludowe. Katowice 1988
M. Michalczyk, Hoczki, knefle, orpanty... Biżuteria cieszyńska w zbiorach Muzeum Śląskiego. Katowice 2007
E. Piskorz- Branekova, Biżuteria Ludowa w Polsce. Warszawa 2008
E. Piskorz- Branekova, Polskie Hafty i Koronki. Warszawa 2009
E. Piskorz- Branekova, Polskie Stroje Ludowe. Warszawa 2009
External links
Cieszyn folk costumes
http://muzeumcieszyn.pl/index.php
http://www.muzeum.bytom.pl/
http://www.muzeumslaskie.pl/
Cieszyn Silesia
Polish clothing
Silesian culture
|
```c++
// All Rights Reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// - Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// - Redistribution 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.
//
// - Neither the name of Sun Microsystems or the names of contributors may
// be used to endorse or promote products derived from this software without
// specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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
// COPYRIGHT OWNER 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.
// The original source code covered by the above license above has been modified
// significantly by Google Inc.
#include "src/codegen/ia32/assembler-ia32.h"
#include <cstring>
#if V8_TARGET_ARCH_IA32
#if V8_LIBC_MSVCRT
#include <intrin.h> // _xgetbv()
#endif
#if V8_OS_MACOSX
#include <sys/sysctl.h>
#endif
#include "src/base/bits.h"
#include "src/base/cpu.h"
#include "src/codegen/assembler-inl.h"
#include "src/codegen/macro-assembler.h"
#include "src/codegen/string-constants.h"
#include "src/deoptimizer/deoptimizer.h"
#include "src/diagnostics/disassembler.h"
#include "src/init/v8.h"
#include "src/numbers/conversions-inl.h"
namespace v8 {
namespace internal {
Immediate Immediate::EmbeddedNumber(double value) {
int32_t smi;
if (DoubleToSmiInteger(value, &smi)) return Immediate(Smi::FromInt(smi));
Immediate result(0, RelocInfo::FULL_EMBEDDED_OBJECT);
result.is_heap_object_request_ = true;
result.value_.heap_object_request = HeapObjectRequest(value);
return result;
}
Immediate Immediate::EmbeddedStringConstant(const StringConstantBase* str) {
Immediate result(0, RelocInfo::FULL_EMBEDDED_OBJECT);
result.is_heap_object_request_ = true;
result.value_.heap_object_request = HeapObjectRequest(str);
return result;
}
// your_sha256_hash-------------
// Implementation of CpuFeatures
namespace {
#if !V8_LIBC_MSVCRT
V8_INLINE uint64_t _xgetbv(unsigned int xcr) {
unsigned eax, edx;
// Check xgetbv; this uses a .byte sequence instead of the instruction
// directly because older assemblers do not include support for xgetbv and
// there is no easy way to conditionally compile based on the assembler
// used.
__asm__ volatile(".byte 0x0F, 0x01, 0xD0" : "=a"(eax), "=d"(edx) : "c"(xcr));
return static_cast<uint64_t>(eax) | (static_cast<uint64_t>(edx) << 32);
}
#define _XCR_XFEATURE_ENABLED_MASK 0
#endif // !V8_LIBC_MSVCRT
bool OSHasAVXSupport() {
#if V8_OS_MACOSX
// Mac OS X up to 10.9 has a bug where AVX transitions were indeed being
// caused by ISRs, so we detect that here and disable AVX in that case.
char buffer[128];
size_t buffer_size = arraysize(buffer);
int ctl_name[] = {CTL_KERN, KERN_OSRELEASE};
if (sysctl(ctl_name, 2, buffer, &buffer_size, nullptr, 0) != 0) {
FATAL("V8 failed to get kernel version");
}
// The buffer now contains a string of the form XX.YY.ZZ, where
// XX is the major kernel version component.
char* period_pos = strchr(buffer, '.');
DCHECK_NOT_NULL(period_pos);
*period_pos = '\0';
long kernel_version_major = strtol(buffer, nullptr, 10); // NOLINT
if (kernel_version_major <= 13) return false;
#endif // V8_OS_MACOSX
// Check whether OS claims to support AVX.
uint64_t feature_mask = _xgetbv(_XCR_XFEATURE_ENABLED_MASK);
return (feature_mask & 0x6) == 0x6;
}
#undef _XCR_XFEATURE_ENABLED_MASK
} // namespace
void CpuFeatures::ProbeImpl(bool cross_compile) {
base::CPU cpu;
CHECK(cpu.has_sse2()); // SSE2 support is mandatory.
CHECK(cpu.has_cmov()); // CMOV support is mandatory.
// Only use statically determined features for cross compile (snapshot).
if (cross_compile) return;
if (cpu.has_sse41() && FLAG_enable_sse4_1) supported_ |= 1u << SSE4_1;
if (cpu.has_ssse3() && FLAG_enable_ssse3) supported_ |= 1u << SSSE3;
if (cpu.has_sse3() && FLAG_enable_sse3) supported_ |= 1u << SSE3;
if (cpu.has_avx() && FLAG_enable_avx && cpu.has_osxsave() &&
OSHasAVXSupport()) {
supported_ |= 1u << AVX;
}
if (cpu.has_fma3() && FLAG_enable_fma3 && cpu.has_osxsave() &&
OSHasAVXSupport()) {
supported_ |= 1u << FMA3;
}
if (cpu.has_bmi1() && FLAG_enable_bmi1) supported_ |= 1u << BMI1;
if (cpu.has_bmi2() && FLAG_enable_bmi2) supported_ |= 1u << BMI2;
if (cpu.has_lzcnt() && FLAG_enable_lzcnt) supported_ |= 1u << LZCNT;
if (cpu.has_popcnt() && FLAG_enable_popcnt) supported_ |= 1u << POPCNT;
if (strcmp(FLAG_mcpu, "auto") == 0) {
if (cpu.is_atom()) supported_ |= 1u << ATOM;
} else if (strcmp(FLAG_mcpu, "atom") == 0) {
supported_ |= 1u << ATOM;
}
}
void CpuFeatures::PrintTarget() {}
void CpuFeatures::PrintFeatures() {
printf(
"SSE3=%d SSSE3=%d SSE4_1=%d AVX=%d FMA3=%d BMI1=%d BMI2=%d LZCNT=%d "
"POPCNT=%d ATOM=%d\n",
CpuFeatures::IsSupported(SSE3), CpuFeatures::IsSupported(SSSE3),
CpuFeatures::IsSupported(SSE4_1), CpuFeatures::IsSupported(AVX),
CpuFeatures::IsSupported(FMA3), CpuFeatures::IsSupported(BMI1),
CpuFeatures::IsSupported(BMI2), CpuFeatures::IsSupported(LZCNT),
CpuFeatures::IsSupported(POPCNT), CpuFeatures::IsSupported(ATOM));
}
// your_sha256_hash-------------
// Implementation of Displacement
void Displacement::init(Label* L, Type type) {
DCHECK(!L->is_bound());
int next = 0;
if (L->is_linked()) {
next = L->pos();
DCHECK_GT(next, 0); // Displacements must be at positions > 0
}
// Ensure that we _never_ overflow the next field.
DCHECK(NextField::is_valid(Assembler::kMaximalBufferSize));
data_ = NextField::encode(next) | TypeField::encode(type);
}
// your_sha256_hash-------------
// Implementation of RelocInfo
const int RelocInfo::kApplyMask =
RelocInfo::ModeMask(RelocInfo::CODE_TARGET) |
RelocInfo::ModeMask(RelocInfo::INTERNAL_REFERENCE) |
RelocInfo::ModeMask(RelocInfo::OFF_HEAP_TARGET) |
RelocInfo::ModeMask(RelocInfo::RUNTIME_ENTRY);
bool RelocInfo::IsCodedSpecially() {
// The deserializer needs to know whether a pointer is specially coded. Being
// specially coded on IA32 means that it is a relative address, as used by
// branch instructions. These are also the ones that need changing when a
// code object moves.
return RelocInfo::ModeMask(rmode_) & kApplyMask;
}
bool RelocInfo::IsInConstantPool() { return false; }
uint32_t RelocInfo::wasm_call_tag() const {
DCHECK(rmode_ == WASM_CALL || rmode_ == WASM_STUB_CALL);
return ReadUnalignedValue<uint32_t>(pc_);
}
// your_sha256_hash-------------
// Implementation of Operand
Operand::Operand(Register base, int32_t disp, RelocInfo::Mode rmode) {
// [base + disp/r]
if (disp == 0 && RelocInfo::IsNone(rmode) && base != ebp) {
// [base]
set_modrm(0, base);
if (base == esp) set_sib(times_1, esp, base);
} else if (is_int8(disp) && RelocInfo::IsNone(rmode)) {
// [base + disp8]
set_modrm(1, base);
if (base == esp) set_sib(times_1, esp, base);
set_disp8(disp);
} else {
// [base + disp/r]
set_modrm(2, base);
if (base == esp) set_sib(times_1, esp, base);
set_dispr(disp, rmode);
}
}
Operand::Operand(Register base, Register index, ScaleFactor scale, int32_t disp,
RelocInfo::Mode rmode) {
DCHECK(index != esp); // illegal addressing mode
// [base + index*scale + disp/r]
if (disp == 0 && RelocInfo::IsNone(rmode) && base != ebp) {
// [base + index*scale]
set_modrm(0, esp);
set_sib(scale, index, base);
} else if (is_int8(disp) && RelocInfo::IsNone(rmode)) {
// [base + index*scale + disp8]
set_modrm(1, esp);
set_sib(scale, index, base);
set_disp8(disp);
} else {
// [base + index*scale + disp/r]
set_modrm(2, esp);
set_sib(scale, index, base);
set_dispr(disp, rmode);
}
}
Operand::Operand(Register index, ScaleFactor scale, int32_t disp,
RelocInfo::Mode rmode) {
DCHECK(index != esp); // illegal addressing mode
// [index*scale + disp/r]
set_modrm(0, esp);
set_sib(scale, index, ebp);
set_dispr(disp, rmode);
}
bool Operand::is_reg_only() const {
return (buf_[0] & 0xF8) == 0xC0; // Addressing mode is register only.
}
Register Operand::reg() const {
DCHECK(is_reg_only());
return Register::from_code(buf_[0] & 0x07);
}
void Assembler::AllocateAndInstallRequestedHeapObjects(Isolate* isolate) {
DCHECK_IMPLIES(isolate == nullptr, heap_object_requests_.empty());
for (auto& request : heap_object_requests_) {
Handle<HeapObject> object;
switch (request.kind()) {
case HeapObjectRequest::kHeapNumber:
object = isolate->factory()->NewHeapNumber(request.heap_number(),
AllocationType::kOld);
break;
case HeapObjectRequest::kStringConstant: {
const StringConstantBase* str = request.string();
CHECK_NOT_NULL(str);
object = str->AllocateStringConstant(isolate);
break;
}
}
Address pc = reinterpret_cast<Address>(buffer_start_) + request.offset();
WriteUnalignedValue(pc, object);
}
}
// your_sha256_hash-------------
// Implementation of Assembler.
// Emit a single byte. Must always be inlined.
#define EMIT(x) *pc_++ = (x)
Assembler::Assembler(const AssemblerOptions& options,
std::unique_ptr<AssemblerBuffer> buffer)
: AssemblerBase(options, std::move(buffer)) {
reloc_info_writer.Reposition(buffer_start_ + buffer_->size(), pc_);
}
void Assembler::GetCode(Isolate* isolate, CodeDesc* desc,
SafepointTableBuilder* safepoint_table_builder,
int handler_table_offset) {
const int code_comments_size = WriteCodeComments();
// Finalize code (at this point overflow() may be true, but the gap ensures
// that we are still not overlapping instructions and relocation info).
DCHECK(pc_ <= reloc_info_writer.pos()); // No overlap.
AllocateAndInstallRequestedHeapObjects(isolate);
// Set up code descriptor.
// TODO(jgruber): Reconsider how these offsets and sizes are maintained up to
// this point to make CodeDesc initialization less fiddly.
static constexpr int kConstantPoolSize = 0;
const int instruction_size = pc_offset();
const int code_comments_offset = instruction_size - code_comments_size;
const int constant_pool_offset = code_comments_offset - kConstantPoolSize;
const int handler_table_offset2 = (handler_table_offset == kNoHandlerTable)
? constant_pool_offset
: handler_table_offset;
const int safepoint_table_offset =
(safepoint_table_builder == kNoSafepointTable)
? handler_table_offset2
: safepoint_table_builder->GetCodeOffset();
const int reloc_info_offset =
static_cast<int>(reloc_info_writer.pos() - buffer_->start());
CodeDesc::Initialize(desc, this, safepoint_table_offset,
handler_table_offset2, constant_pool_offset,
code_comments_offset, reloc_info_offset);
}
void Assembler::FinalizeJumpOptimizationInfo() {
// Collection stage
auto jump_opt = jump_optimization_info();
if (jump_opt && jump_opt->is_collecting()) {
auto& bitmap = jump_opt->farjmp_bitmap();
int num = static_cast<int>(farjmp_positions_.size());
if (num && bitmap.empty()) {
bool can_opt = false;
bitmap.resize((num + 31) / 32, 0);
for (int i = 0; i < num; i++) {
int disp_pos = farjmp_positions_[i];
int disp = long_at(disp_pos);
if (is_int8(disp)) {
bitmap[i / 32] |= 1 << (i & 31);
can_opt = true;
}
}
if (can_opt) {
jump_opt->set_optimizable();
}
}
}
}
void Assembler::Align(int m) {
DCHECK(base::bits::IsPowerOfTwo(m));
int mask = m - 1;
int addr = pc_offset();
Nop((m - (addr & mask)) & mask);
}
bool Assembler::IsNop(Address addr) {
byte* a = reinterpret_cast<byte*>(addr);
while (*a == 0x66) a++;
if (*a == 0x90) return true;
if (a[0] == 0xF && a[1] == 0x1F) return true;
return false;
}
void Assembler::Nop(int bytes) {
EnsureSpace ensure_space(this);
// Multi byte nops from path_to_url
while (bytes > 0) {
switch (bytes) {
case 2:
EMIT(0x66);
V8_FALLTHROUGH;
case 1:
EMIT(0x90);
return;
case 3:
EMIT(0xF);
EMIT(0x1F);
EMIT(0);
return;
case 4:
EMIT(0xF);
EMIT(0x1F);
EMIT(0x40);
EMIT(0);
return;
case 6:
EMIT(0x66);
V8_FALLTHROUGH;
case 5:
EMIT(0xF);
EMIT(0x1F);
EMIT(0x44);
EMIT(0);
EMIT(0);
return;
case 7:
EMIT(0xF);
EMIT(0x1F);
EMIT(0x80);
EMIT(0);
EMIT(0);
EMIT(0);
EMIT(0);
return;
default:
case 11:
EMIT(0x66);
bytes--;
V8_FALLTHROUGH;
case 10:
EMIT(0x66);
bytes--;
V8_FALLTHROUGH;
case 9:
EMIT(0x66);
bytes--;
V8_FALLTHROUGH;
case 8:
EMIT(0xF);
EMIT(0x1F);
EMIT(0x84);
EMIT(0);
EMIT(0);
EMIT(0);
EMIT(0);
EMIT(0);
bytes -= 8;
}
}
}
void Assembler::CodeTargetAlign() {
Align(16); // Preferred alignment of jump targets on ia32.
}
void Assembler::cpuid() {
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0xA2);
}
void Assembler::pushad() {
EnsureSpace ensure_space(this);
EMIT(0x60);
}
void Assembler::popad() {
EnsureSpace ensure_space(this);
EMIT(0x61);
}
void Assembler::pushfd() {
EnsureSpace ensure_space(this);
EMIT(0x9C);
}
void Assembler::popfd() {
EnsureSpace ensure_space(this);
EMIT(0x9D);
}
void Assembler::push(const Immediate& x) {
EnsureSpace ensure_space(this);
if (x.is_int8()) {
EMIT(0x6A);
EMIT(x.immediate());
} else {
EMIT(0x68);
emit(x);
}
}
void Assembler::push_imm32(int32_t imm32) {
EnsureSpace ensure_space(this);
EMIT(0x68);
emit(imm32);
}
void Assembler::push(Register src) {
EnsureSpace ensure_space(this);
EMIT(0x50 | src.code());
}
void Assembler::push(Operand src) {
EnsureSpace ensure_space(this);
EMIT(0xFF);
emit_operand(esi, src);
}
void Assembler::pop(Register dst) {
DCHECK_NOT_NULL(reloc_info_writer.last_pc());
EnsureSpace ensure_space(this);
EMIT(0x58 | dst.code());
}
void Assembler::pop(Operand dst) {
EnsureSpace ensure_space(this);
EMIT(0x8F);
emit_operand(eax, dst);
}
void Assembler::enter(const Immediate& size) {
EnsureSpace ensure_space(this);
EMIT(0xC8);
emit_w(size);
EMIT(0);
}
void Assembler::leave() {
EnsureSpace ensure_space(this);
EMIT(0xC9);
}
void Assembler::mov_b(Register dst, Operand src) {
CHECK(dst.is_byte_register());
EnsureSpace ensure_space(this);
EMIT(0x8A);
emit_operand(dst, src);
}
void Assembler::mov_b(Operand dst, const Immediate& src) {
EnsureSpace ensure_space(this);
EMIT(0xC6);
emit_operand(eax, dst);
EMIT(static_cast<int8_t>(src.immediate()));
}
void Assembler::mov_b(Operand dst, Register src) {
CHECK(src.is_byte_register());
EnsureSpace ensure_space(this);
EMIT(0x88);
emit_operand(src, dst);
}
void Assembler::mov_w(Register dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0x8B);
emit_operand(dst, src);
}
void Assembler::mov_w(Operand dst, Register src) {
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0x89);
emit_operand(src, dst);
}
void Assembler::mov_w(Operand dst, const Immediate& src) {
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0xC7);
emit_operand(eax, dst);
EMIT(static_cast<int8_t>(src.immediate() & 0xFF));
EMIT(static_cast<int8_t>(src.immediate() >> 8));
}
void Assembler::mov(Register dst, int32_t imm32) {
EnsureSpace ensure_space(this);
EMIT(0xB8 | dst.code());
emit(imm32);
}
void Assembler::mov(Register dst, const Immediate& x) {
EnsureSpace ensure_space(this);
EMIT(0xB8 | dst.code());
emit(x);
}
void Assembler::mov(Register dst, Handle<HeapObject> handle) {
EnsureSpace ensure_space(this);
EMIT(0xB8 | dst.code());
emit(handle);
}
void Assembler::mov(Register dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0x8B);
emit_operand(dst, src);
}
void Assembler::mov(Register dst, Register src) {
EnsureSpace ensure_space(this);
EMIT(0x89);
EMIT(0xC0 | src.code() << 3 | dst.code());
}
void Assembler::mov(Operand dst, const Immediate& x) {
EnsureSpace ensure_space(this);
EMIT(0xC7);
emit_operand(eax, dst);
emit(x);
}
void Assembler::mov(Operand dst, Address src, RelocInfo::Mode rmode) {
EnsureSpace ensure_space(this);
EMIT(0xC7);
emit_operand(eax, dst);
emit(src, rmode);
}
void Assembler::mov(Operand dst, Handle<HeapObject> handle) {
EnsureSpace ensure_space(this);
EMIT(0xC7);
emit_operand(eax, dst);
emit(handle);
}
void Assembler::mov(Operand dst, Register src) {
EnsureSpace ensure_space(this);
EMIT(0x89);
emit_operand(src, dst);
}
void Assembler::movsx_b(Register dst, Operand src) {
DCHECK_IMPLIES(src.is_reg_only(), src.reg().is_byte_register());
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0xBE);
emit_operand(dst, src);
}
void Assembler::movsx_w(Register dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0xBF);
emit_operand(dst, src);
}
void Assembler::movzx_b(Register dst, Operand src) {
DCHECK_IMPLIES(src.is_reg_only(), src.reg().is_byte_register());
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0xB6);
emit_operand(dst, src);
}
void Assembler::movzx_w(Register dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0xB7);
emit_operand(dst, src);
}
void Assembler::movq(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0xF3);
EMIT(0x0F);
EMIT(0x7E);
emit_operand(dst, src);
}
void Assembler::cmov(Condition cc, Register dst, Operand src) {
EnsureSpace ensure_space(this);
// Opcode: 0f 40 + cc /r.
EMIT(0x0F);
EMIT(0x40 + cc);
emit_operand(dst, src);
}
void Assembler::cld() {
EnsureSpace ensure_space(this);
EMIT(0xFC);
}
void Assembler::rep_movs() {
EnsureSpace ensure_space(this);
EMIT(0xF3);
EMIT(0xA5);
}
void Assembler::rep_stos() {
EnsureSpace ensure_space(this);
EMIT(0xF3);
EMIT(0xAB);
}
void Assembler::stos() {
EnsureSpace ensure_space(this);
EMIT(0xAB);
}
void Assembler::xchg(Register dst, Register src) {
EnsureSpace ensure_space(this);
if (src == eax || dst == eax) { // Single-byte encoding.
EMIT(0x90 | (src == eax ? dst.code() : src.code()));
} else {
EMIT(0x87);
EMIT(0xC0 | src.code() << 3 | dst.code());
}
}
void Assembler::xchg(Register dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0x87);
emit_operand(dst, src);
}
void Assembler::xchg_b(Register reg, Operand op) {
DCHECK(reg.is_byte_register());
EnsureSpace ensure_space(this);
EMIT(0x86);
emit_operand(reg, op);
}
void Assembler::xchg_w(Register reg, Operand op) {
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0x87);
emit_operand(reg, op);
}
void Assembler::lock() {
EnsureSpace ensure_space(this);
EMIT(0xF0);
}
void Assembler::cmpxchg(Operand dst, Register src) {
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0xB1);
emit_operand(src, dst);
}
void Assembler::cmpxchg_b(Operand dst, Register src) {
DCHECK(src.is_byte_register());
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0xB0);
emit_operand(src, dst);
}
void Assembler::cmpxchg_w(Operand dst, Register src) {
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0x0F);
EMIT(0xB1);
emit_operand(src, dst);
}
void Assembler::cmpxchg8b(Operand dst) {
EnsureSpace enure_space(this);
EMIT(0x0F);
EMIT(0xC7);
emit_operand(ecx, dst);
}
void Assembler::mfence() {
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0xAE);
EMIT(0xF0);
}
void Assembler::lfence() {
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0xAE);
EMIT(0xE8);
}
void Assembler::pause() {
EnsureSpace ensure_space(this);
EMIT(0xF3);
EMIT(0x90);
}
void Assembler::adc(Register dst, int32_t imm32) {
EnsureSpace ensure_space(this);
emit_arith(2, Operand(dst), Immediate(imm32));
}
void Assembler::adc(Register dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0x13);
emit_operand(dst, src);
}
void Assembler::add(Register dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0x03);
emit_operand(dst, src);
}
void Assembler::add(Operand dst, Register src) {
EnsureSpace ensure_space(this);
EMIT(0x01);
emit_operand(src, dst);
}
void Assembler::add(Operand dst, const Immediate& x) {
DCHECK_NOT_NULL(reloc_info_writer.last_pc());
EnsureSpace ensure_space(this);
emit_arith(0, dst, x);
}
void Assembler::and_(Register dst, int32_t imm32) {
and_(dst, Immediate(imm32));
}
void Assembler::and_(Register dst, const Immediate& x) {
EnsureSpace ensure_space(this);
emit_arith(4, Operand(dst), x);
}
void Assembler::and_(Register dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0x23);
emit_operand(dst, src);
}
void Assembler::and_(Operand dst, const Immediate& x) {
EnsureSpace ensure_space(this);
emit_arith(4, dst, x);
}
void Assembler::and_(Operand dst, Register src) {
EnsureSpace ensure_space(this);
EMIT(0x21);
emit_operand(src, dst);
}
void Assembler::cmpb(Operand op, Immediate imm8) {
DCHECK(imm8.is_int8() || imm8.is_uint8());
EnsureSpace ensure_space(this);
if (op.is_reg(eax)) {
EMIT(0x3C);
} else {
EMIT(0x80);
emit_operand(edi, op); // edi == 7
}
emit_b(imm8);
}
void Assembler::cmpb(Operand op, Register reg) {
CHECK(reg.is_byte_register());
EnsureSpace ensure_space(this);
EMIT(0x38);
emit_operand(reg, op);
}
void Assembler::cmpb(Register reg, Operand op) {
CHECK(reg.is_byte_register());
EnsureSpace ensure_space(this);
EMIT(0x3A);
emit_operand(reg, op);
}
void Assembler::cmpw(Operand op, Immediate imm16) {
DCHECK(imm16.is_int16() || imm16.is_uint16());
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0x81);
emit_operand(edi, op);
emit_w(imm16);
}
void Assembler::cmpw(Register reg, Operand op) {
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0x3B);
emit_operand(reg, op);
}
void Assembler::cmpw(Operand op, Register reg) {
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0x39);
emit_operand(reg, op);
}
void Assembler::cmp(Register reg, int32_t imm32) {
EnsureSpace ensure_space(this);
emit_arith(7, Operand(reg), Immediate(imm32));
}
void Assembler::cmp(Register reg, Handle<HeapObject> handle) {
EnsureSpace ensure_space(this);
emit_arith(7, Operand(reg), Immediate(handle));
}
void Assembler::cmp(Register reg, Operand op) {
EnsureSpace ensure_space(this);
EMIT(0x3B);
emit_operand(reg, op);
}
void Assembler::cmp(Operand op, Register reg) {
EnsureSpace ensure_space(this);
EMIT(0x39);
emit_operand(reg, op);
}
void Assembler::cmp(Operand op, const Immediate& imm) {
EnsureSpace ensure_space(this);
emit_arith(7, op, imm);
}
void Assembler::cmp(Operand op, Handle<HeapObject> handle) {
EnsureSpace ensure_space(this);
emit_arith(7, op, Immediate(handle));
}
void Assembler::cmpb_al(Operand op) {
EnsureSpace ensure_space(this);
EMIT(0x38); // CMP r/m8, r8
emit_operand(eax, op); // eax has same code as register al.
}
void Assembler::cmpw_ax(Operand op) {
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0x39); // CMP r/m16, r16
emit_operand(eax, op); // eax has same code as register ax.
}
void Assembler::dec_b(Register dst) {
CHECK(dst.is_byte_register());
EnsureSpace ensure_space(this);
EMIT(0xFE);
EMIT(0xC8 | dst.code());
}
void Assembler::dec_b(Operand dst) {
EnsureSpace ensure_space(this);
EMIT(0xFE);
emit_operand(ecx, dst);
}
void Assembler::dec(Register dst) {
EnsureSpace ensure_space(this);
EMIT(0x48 | dst.code());
}
void Assembler::dec(Operand dst) {
EnsureSpace ensure_space(this);
EMIT(0xFF);
emit_operand(ecx, dst);
}
void Assembler::cdq() {
EnsureSpace ensure_space(this);
EMIT(0x99);
}
void Assembler::idiv(Operand src) {
EnsureSpace ensure_space(this);
EMIT(0xF7);
emit_operand(edi, src);
}
void Assembler::div(Operand src) {
EnsureSpace ensure_space(this);
EMIT(0xF7);
emit_operand(esi, src);
}
void Assembler::imul(Register reg) {
EnsureSpace ensure_space(this);
EMIT(0xF7);
EMIT(0xE8 | reg.code());
}
void Assembler::imul(Register dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0xAF);
emit_operand(dst, src);
}
void Assembler::imul(Register dst, Register src, int32_t imm32) {
imul(dst, Operand(src), imm32);
}
void Assembler::imul(Register dst, Operand src, int32_t imm32) {
EnsureSpace ensure_space(this);
if (is_int8(imm32)) {
EMIT(0x6B);
emit_operand(dst, src);
EMIT(imm32);
} else {
EMIT(0x69);
emit_operand(dst, src);
emit(imm32);
}
}
void Assembler::inc(Register dst) {
EnsureSpace ensure_space(this);
EMIT(0x40 | dst.code());
}
void Assembler::inc(Operand dst) {
EnsureSpace ensure_space(this);
EMIT(0xFF);
emit_operand(eax, dst);
}
void Assembler::lea(Register dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0x8D);
emit_operand(dst, src);
}
void Assembler::mul(Register src) {
EnsureSpace ensure_space(this);
EMIT(0xF7);
EMIT(0xE0 | src.code());
}
void Assembler::neg(Register dst) {
EnsureSpace ensure_space(this);
EMIT(0xF7);
EMIT(0xD8 | dst.code());
}
void Assembler::neg(Operand dst) {
EnsureSpace ensure_space(this);
EMIT(0xF7);
emit_operand(ebx, dst);
}
void Assembler::not_(Register dst) {
EnsureSpace ensure_space(this);
EMIT(0xF7);
EMIT(0xD0 | dst.code());
}
void Assembler::not_(Operand dst) {
EnsureSpace ensure_space(this);
EMIT(0xF7);
emit_operand(edx, dst);
}
void Assembler::or_(Register dst, int32_t imm32) {
EnsureSpace ensure_space(this);
emit_arith(1, Operand(dst), Immediate(imm32));
}
void Assembler::or_(Register dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0x0B);
emit_operand(dst, src);
}
void Assembler::or_(Operand dst, const Immediate& x) {
EnsureSpace ensure_space(this);
emit_arith(1, dst, x);
}
void Assembler::or_(Operand dst, Register src) {
EnsureSpace ensure_space(this);
EMIT(0x09);
emit_operand(src, dst);
}
void Assembler::rcl(Register dst, uint8_t imm8) {
EnsureSpace ensure_space(this);
DCHECK(is_uint5(imm8)); // illegal shift count
if (imm8 == 1) {
EMIT(0xD1);
EMIT(0xD0 | dst.code());
} else {
EMIT(0xC1);
EMIT(0xD0 | dst.code());
EMIT(imm8);
}
}
void Assembler::rcr(Register dst, uint8_t imm8) {
EnsureSpace ensure_space(this);
DCHECK(is_uint5(imm8)); // illegal shift count
if (imm8 == 1) {
EMIT(0xD1);
EMIT(0xD8 | dst.code());
} else {
EMIT(0xC1);
EMIT(0xD8 | dst.code());
EMIT(imm8);
}
}
void Assembler::ror(Operand dst, uint8_t imm8) {
EnsureSpace ensure_space(this);
DCHECK(is_uint5(imm8)); // illegal shift count
if (imm8 == 1) {
EMIT(0xD1);
emit_operand(ecx, dst);
} else {
EMIT(0xC1);
emit_operand(ecx, dst);
EMIT(imm8);
}
}
void Assembler::ror_cl(Operand dst) {
EnsureSpace ensure_space(this);
EMIT(0xD3);
emit_operand(ecx, dst);
}
void Assembler::sar(Operand dst, uint8_t imm8) {
EnsureSpace ensure_space(this);
DCHECK(is_uint5(imm8)); // illegal shift count
if (imm8 == 1) {
EMIT(0xD1);
emit_operand(edi, dst);
} else {
EMIT(0xC1);
emit_operand(edi, dst);
EMIT(imm8);
}
}
void Assembler::sar_cl(Operand dst) {
EnsureSpace ensure_space(this);
EMIT(0xD3);
emit_operand(edi, dst);
}
void Assembler::sbb(Register dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0x1B);
emit_operand(dst, src);
}
void Assembler::shld(Register dst, Register src, uint8_t shift) {
DCHECK(is_uint5(shift));
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0xA4);
emit_operand(src, Operand(dst));
EMIT(shift);
}
void Assembler::shld_cl(Register dst, Register src) {
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0xA5);
emit_operand(src, Operand(dst));
}
void Assembler::shl(Operand dst, uint8_t imm8) {
EnsureSpace ensure_space(this);
DCHECK(is_uint5(imm8)); // illegal shift count
if (imm8 == 1) {
EMIT(0xD1);
emit_operand(esp, dst);
} else {
EMIT(0xC1);
emit_operand(esp, dst);
EMIT(imm8);
}
}
void Assembler::shl_cl(Operand dst) {
EnsureSpace ensure_space(this);
EMIT(0xD3);
emit_operand(esp, dst);
}
void Assembler::shr(Operand dst, uint8_t imm8) {
EnsureSpace ensure_space(this);
DCHECK(is_uint5(imm8)); // illegal shift count
if (imm8 == 1) {
EMIT(0xD1);
emit_operand(ebp, dst);
} else {
EMIT(0xC1);
emit_operand(ebp, dst);
EMIT(imm8);
}
}
void Assembler::shr_cl(Operand dst) {
EnsureSpace ensure_space(this);
EMIT(0xD3);
emit_operand(ebp, dst);
}
void Assembler::shrd(Register dst, Register src, uint8_t shift) {
DCHECK(is_uint5(shift));
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0xAC);
emit_operand(dst, Operand(src));
EMIT(shift);
}
void Assembler::shrd_cl(Operand dst, Register src) {
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0xAD);
emit_operand(src, dst);
}
void Assembler::sub(Operand dst, const Immediate& x) {
EnsureSpace ensure_space(this);
emit_arith(5, dst, x);
}
void Assembler::sub(Register dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0x2B);
emit_operand(dst, src);
}
void Assembler::sub(Operand dst, Register src) {
EnsureSpace ensure_space(this);
EMIT(0x29);
emit_operand(src, dst);
}
void Assembler::sub_sp_32(uint32_t imm) {
EnsureSpace ensure_space(this);
EMIT(0x81); // using a literal 32-bit immediate.
static constexpr Register ireg = Register::from_code<5>();
emit_operand(ireg, Operand(esp));
emit(imm);
}
void Assembler::test(Register reg, const Immediate& imm) {
if (imm.is_uint8()) {
test_b(reg, imm);
return;
}
EnsureSpace ensure_space(this);
// This is not using emit_arith because test doesn't support
// sign-extension of 8-bit operands.
if (reg == eax) {
EMIT(0xA9);
} else {
EMIT(0xF7);
EMIT(0xC0 | reg.code());
}
emit(imm);
}
void Assembler::test(Register reg, Operand op) {
EnsureSpace ensure_space(this);
EMIT(0x85);
emit_operand(reg, op);
}
void Assembler::test_b(Register reg, Operand op) {
CHECK(reg.is_byte_register());
EnsureSpace ensure_space(this);
EMIT(0x84);
emit_operand(reg, op);
}
void Assembler::test(Operand op, const Immediate& imm) {
if (op.is_reg_only()) {
test(op.reg(), imm);
return;
}
if (imm.is_uint8()) {
return test_b(op, imm);
}
EnsureSpace ensure_space(this);
EMIT(0xF7);
emit_operand(eax, op);
emit(imm);
}
void Assembler::test_b(Register reg, Immediate imm8) {
DCHECK(imm8.is_uint8());
EnsureSpace ensure_space(this);
// Only use test against byte for registers that have a byte
// variant: eax, ebx, ecx, and edx.
if (reg == eax) {
EMIT(0xA8);
emit_b(imm8);
} else if (reg.is_byte_register()) {
emit_arith_b(0xF6, 0xC0, reg, static_cast<uint8_t>(imm8.immediate()));
} else {
EMIT(0x66);
EMIT(0xF7);
EMIT(0xC0 | reg.code());
emit_w(imm8);
}
}
void Assembler::test_b(Operand op, Immediate imm8) {
if (op.is_reg_only()) {
test_b(op.reg(), imm8);
return;
}
EnsureSpace ensure_space(this);
EMIT(0xF6);
emit_operand(eax, op);
emit_b(imm8);
}
void Assembler::test_w(Register reg, Immediate imm16) {
DCHECK(imm16.is_int16() || imm16.is_uint16());
EnsureSpace ensure_space(this);
if (reg == eax) {
EMIT(0xA9);
emit_w(imm16);
} else {
EMIT(0x66);
EMIT(0xF7);
EMIT(0xC0 | reg.code());
emit_w(imm16);
}
}
void Assembler::test_w(Register reg, Operand op) {
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0x85);
emit_operand(reg, op);
}
void Assembler::test_w(Operand op, Immediate imm16) {
DCHECK(imm16.is_int16() || imm16.is_uint16());
if (op.is_reg_only()) {
test_w(op.reg(), imm16);
return;
}
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0xF7);
emit_operand(eax, op);
emit_w(imm16);
}
void Assembler::xor_(Register dst, int32_t imm32) {
EnsureSpace ensure_space(this);
emit_arith(6, Operand(dst), Immediate(imm32));
}
void Assembler::xor_(Register dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0x33);
emit_operand(dst, src);
}
void Assembler::xor_(Operand dst, Register src) {
EnsureSpace ensure_space(this);
EMIT(0x31);
emit_operand(src, dst);
}
void Assembler::xor_(Operand dst, const Immediate& x) {
EnsureSpace ensure_space(this);
emit_arith(6, dst, x);
}
void Assembler::bswap(Register dst) {
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0xC8 + dst.code());
}
void Assembler::bt(Operand dst, Register src) {
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0xA3);
emit_operand(src, dst);
}
void Assembler::bts(Operand dst, Register src) {
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0xAB);
emit_operand(src, dst);
}
void Assembler::bsr(Register dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0xBD);
emit_operand(dst, src);
}
void Assembler::bsf(Register dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0xBC);
emit_operand(dst, src);
}
void Assembler::hlt() {
EnsureSpace ensure_space(this);
EMIT(0xF4);
}
void Assembler::int3() {
EnsureSpace ensure_space(this);
EMIT(0xCC);
}
void Assembler::nop() {
EnsureSpace ensure_space(this);
EMIT(0x90);
}
void Assembler::ret(int imm16) {
EnsureSpace ensure_space(this);
DCHECK(is_uint16(imm16));
if (imm16 == 0) {
EMIT(0xC3);
} else {
EMIT(0xC2);
EMIT(imm16 & 0xFF);
EMIT((imm16 >> 8) & 0xFF);
}
}
void Assembler::ud2() {
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0x0B);
}
// Labels refer to positions in the (to be) generated code.
// There are bound, linked, and unused labels.
//
// Bound labels refer to known positions in the already
// generated code. pos() is the position the label refers to.
//
// Linked labels refer to unknown positions in the code
// to be generated; pos() is the position of the 32bit
// Displacement of the last instruction using the label.
void Assembler::print(const Label* L) {
if (L->is_unused()) {
PrintF("unused label\n");
} else if (L->is_bound()) {
PrintF("bound label to %d\n", L->pos());
} else if (L->is_linked()) {
Label l;
l.link_to(L->pos());
PrintF("unbound label");
while (l.is_linked()) {
Displacement disp = disp_at(&l);
PrintF("@ %d ", l.pos());
disp.print();
PrintF("\n");
disp.next(&l);
}
} else {
PrintF("label in inconsistent state (pos = %d)\n", L->pos_);
}
}
void Assembler::bind_to(Label* L, int pos) {
EnsureSpace ensure_space(this);
DCHECK(0 <= pos && pos <= pc_offset()); // must have a valid binding position
while (L->is_linked()) {
Displacement disp = disp_at(L);
int fixup_pos = L->pos();
if (disp.type() == Displacement::CODE_ABSOLUTE) {
long_at_put(fixup_pos, reinterpret_cast<int>(buffer_start_ + pos));
internal_reference_positions_.push_back(fixup_pos);
} else if (disp.type() == Displacement::CODE_RELATIVE) {
// Relative to Code heap object pointer.
long_at_put(fixup_pos, pos + Code::kHeaderSize - kHeapObjectTag);
} else {
if (disp.type() == Displacement::UNCONDITIONAL_JUMP) {
DCHECK_EQ(byte_at(fixup_pos - 1), 0xE9); // jmp expected
}
// Relative address, relative to point after address.
int imm32 = pos - (fixup_pos + sizeof(int32_t));
long_at_put(fixup_pos, imm32);
}
disp.next(L);
}
while (L->is_near_linked()) {
int fixup_pos = L->near_link_pos();
int offset_to_next =
static_cast<int>(*reinterpret_cast<int8_t*>(addr_at(fixup_pos)));
DCHECK_LE(offset_to_next, 0);
// Relative address, relative to point after address.
int disp = pos - fixup_pos - sizeof(int8_t);
CHECK(0 <= disp && disp <= 127);
set_byte_at(fixup_pos, disp);
if (offset_to_next < 0) {
L->link_to(fixup_pos + offset_to_next, Label::kNear);
} else {
L->UnuseNear();
}
}
// Optimization stage
auto jump_opt = jump_optimization_info();
if (jump_opt && jump_opt->is_optimizing()) {
auto it = label_farjmp_maps_.find(L);
if (it != label_farjmp_maps_.end()) {
auto& pos_vector = it->second;
for (auto fixup_pos : pos_vector) {
int disp = pos - (fixup_pos + sizeof(int8_t));
CHECK(is_int8(disp));
set_byte_at(fixup_pos, disp);
}
label_farjmp_maps_.erase(it);
}
}
L->bind_to(pos);
}
void Assembler::bind(Label* L) {
EnsureSpace ensure_space(this);
DCHECK(!L->is_bound()); // label can only be bound once
bind_to(L, pc_offset());
}
void Assembler::record_farjmp_position(Label* L, int pos) {
auto& pos_vector = label_farjmp_maps_[L];
pos_vector.push_back(pos);
}
bool Assembler::is_optimizable_farjmp(int idx) {
if (predictable_code_size()) return false;
auto jump_opt = jump_optimization_info();
CHECK(jump_opt->is_optimizing());
auto& bitmap = jump_opt->farjmp_bitmap();
CHECK(idx < static_cast<int>(bitmap.size() * 32));
return !!(bitmap[idx / 32] & (1 << (idx & 31)));
}
void Assembler::call(Label* L) {
EnsureSpace ensure_space(this);
if (L->is_bound()) {
const int long_size = 5;
int offs = L->pos() - pc_offset();
DCHECK_LE(offs, 0);
// 1110 1000 #32-bit disp.
EMIT(0xE8);
emit(offs - long_size);
} else {
// 1110 1000 #32-bit disp.
EMIT(0xE8);
emit_disp(L, Displacement::OTHER);
}
}
void Assembler::call(Address entry, RelocInfo::Mode rmode) {
EnsureSpace ensure_space(this);
DCHECK(!RelocInfo::IsCodeTarget(rmode));
EMIT(0xE8);
if (RelocInfo::IsRuntimeEntry(rmode)) {
emit(entry, rmode);
} else {
emit(entry - (reinterpret_cast<Address>(pc_) + sizeof(int32_t)), rmode);
}
}
void Assembler::wasm_call(Address entry, RelocInfo::Mode rmode) {
EnsureSpace ensure_space(this);
EMIT(0xE8);
emit(entry, rmode);
}
void Assembler::call(Operand adr) {
EnsureSpace ensure_space(this);
EMIT(0xFF);
emit_operand(edx, adr);
}
void Assembler::call(Handle<Code> code, RelocInfo::Mode rmode) {
EnsureSpace ensure_space(this);
DCHECK(RelocInfo::IsCodeTarget(rmode));
EMIT(0xE8);
emit(code, rmode);
}
void Assembler::jmp_rel(int offset) {
EnsureSpace ensure_space(this);
const int short_size = 2;
const int long_size = 5;
if (is_int8(offset - short_size)) {
// 1110 1011 #8-bit disp.
EMIT(0xEB);
EMIT((offset - short_size) & 0xFF);
} else {
// 1110 1001 #32-bit disp.
EMIT(0xE9);
emit(offset - long_size);
}
}
void Assembler::jmp(Label* L, Label::Distance distance) {
if (L->is_bound()) {
int offset = L->pos() - pc_offset();
DCHECK_LE(offset, 0); // backward jump.
jmp_rel(offset);
return;
}
EnsureSpace ensure_space(this);
if (distance == Label::kNear) {
EMIT(0xEB);
emit_near_disp(L);
} else {
auto jump_opt = jump_optimization_info();
if (V8_UNLIKELY(jump_opt)) {
if (jump_opt->is_optimizing() && is_optimizable_farjmp(farjmp_num_++)) {
EMIT(0xEB);
record_farjmp_position(L, pc_offset());
EMIT(0);
return;
}
if (jump_opt->is_collecting()) {
farjmp_positions_.push_back(pc_offset() + 1);
}
}
// 1110 1001 #32-bit disp.
EMIT(0xE9);
emit_disp(L, Displacement::UNCONDITIONAL_JUMP);
}
}
void Assembler::jmp(Address entry, RelocInfo::Mode rmode) {
EnsureSpace ensure_space(this);
DCHECK(!RelocInfo::IsCodeTarget(rmode));
EMIT(0xE9);
if (RelocInfo::IsRuntimeEntry(rmode) || RelocInfo::IsWasmCall(rmode)) {
emit(entry, rmode);
} else {
emit(entry - (reinterpret_cast<Address>(pc_) + sizeof(int32_t)), rmode);
}
}
void Assembler::jmp(Operand adr) {
EnsureSpace ensure_space(this);
EMIT(0xFF);
emit_operand(esp, adr);
}
void Assembler::jmp(Handle<Code> code, RelocInfo::Mode rmode) {
EnsureSpace ensure_space(this);
DCHECK(RelocInfo::IsCodeTarget(rmode));
EMIT(0xE9);
emit(code, rmode);
}
void Assembler::j(Condition cc, Label* L, Label::Distance distance) {
EnsureSpace ensure_space(this);
DCHECK(0 <= cc && static_cast<int>(cc) < 16);
if (L->is_bound()) {
const int short_size = 2;
const int long_size = 6;
int offs = L->pos() - pc_offset();
DCHECK_LE(offs, 0);
if (is_int8(offs - short_size)) {
// 0111 tttn #8-bit disp
EMIT(0x70 | cc);
EMIT((offs - short_size) & 0xFF);
} else {
// 0000 1111 1000 tttn #32-bit disp
EMIT(0x0F);
EMIT(0x80 | cc);
emit(offs - long_size);
}
} else if (distance == Label::kNear) {
EMIT(0x70 | cc);
emit_near_disp(L);
} else {
auto jump_opt = jump_optimization_info();
if (V8_UNLIKELY(jump_opt)) {
if (jump_opt->is_optimizing() && is_optimizable_farjmp(farjmp_num_++)) {
// 0111 tttn #8-bit disp
EMIT(0x70 | cc);
record_farjmp_position(L, pc_offset());
EMIT(0);
return;
}
if (jump_opt->is_collecting()) {
farjmp_positions_.push_back(pc_offset() + 2);
}
}
// 0000 1111 1000 tttn #32-bit disp
// Note: could eliminate cond. jumps to this jump if condition
// is the same however, seems to be rather unlikely case.
EMIT(0x0F);
EMIT(0x80 | cc);
emit_disp(L, Displacement::OTHER);
}
}
void Assembler::j(Condition cc, byte* entry, RelocInfo::Mode rmode) {
EnsureSpace ensure_space(this);
DCHECK((0 <= cc) && (static_cast<int>(cc) < 16));
// 0000 1111 1000 tttn #32-bit disp.
EMIT(0x0F);
EMIT(0x80 | cc);
if (RelocInfo::IsRuntimeEntry(rmode)) {
emit(reinterpret_cast<uint32_t>(entry), rmode);
} else {
emit(entry - (pc_ + sizeof(int32_t)), rmode);
}
}
void Assembler::j(Condition cc, Handle<Code> code, RelocInfo::Mode rmode) {
EnsureSpace ensure_space(this);
// 0000 1111 1000 tttn #32-bit disp
EMIT(0x0F);
EMIT(0x80 | cc);
emit(code, rmode);
}
// FPU instructions.
void Assembler::fld(int i) {
EnsureSpace ensure_space(this);
emit_farith(0xD9, 0xC0, i);
}
void Assembler::fstp(int i) {
EnsureSpace ensure_space(this);
emit_farith(0xDD, 0xD8, i);
}
void Assembler::fld1() {
EnsureSpace ensure_space(this);
EMIT(0xD9);
EMIT(0xE8);
}
void Assembler::fldpi() {
EnsureSpace ensure_space(this);
EMIT(0xD9);
EMIT(0xEB);
}
void Assembler::fldz() {
EnsureSpace ensure_space(this);
EMIT(0xD9);
EMIT(0xEE);
}
void Assembler::fldln2() {
EnsureSpace ensure_space(this);
EMIT(0xD9);
EMIT(0xED);
}
void Assembler::fld_s(Operand adr) {
EnsureSpace ensure_space(this);
EMIT(0xD9);
emit_operand(eax, adr);
}
void Assembler::fld_d(Operand adr) {
EnsureSpace ensure_space(this);
EMIT(0xDD);
emit_operand(eax, adr);
}
void Assembler::fstp_s(Operand adr) {
EnsureSpace ensure_space(this);
EMIT(0xD9);
emit_operand(ebx, adr);
}
void Assembler::fst_s(Operand adr) {
EnsureSpace ensure_space(this);
EMIT(0xD9);
emit_operand(edx, adr);
}
void Assembler::fstp_d(Operand adr) {
EnsureSpace ensure_space(this);
EMIT(0xDD);
emit_operand(ebx, adr);
}
void Assembler::fst_d(Operand adr) {
EnsureSpace ensure_space(this);
EMIT(0xDD);
emit_operand(edx, adr);
}
void Assembler::fild_s(Operand adr) {
EnsureSpace ensure_space(this);
EMIT(0xDB);
emit_operand(eax, adr);
}
void Assembler::fild_d(Operand adr) {
EnsureSpace ensure_space(this);
EMIT(0xDF);
emit_operand(ebp, adr);
}
void Assembler::fistp_s(Operand adr) {
EnsureSpace ensure_space(this);
EMIT(0xDB);
emit_operand(ebx, adr);
}
void Assembler::fisttp_s(Operand adr) {
DCHECK(IsEnabled(SSE3));
EnsureSpace ensure_space(this);
EMIT(0xDB);
emit_operand(ecx, adr);
}
void Assembler::fisttp_d(Operand adr) {
DCHECK(IsEnabled(SSE3));
EnsureSpace ensure_space(this);
EMIT(0xDD);
emit_operand(ecx, adr);
}
void Assembler::fist_s(Operand adr) {
EnsureSpace ensure_space(this);
EMIT(0xDB);
emit_operand(edx, adr);
}
void Assembler::fistp_d(Operand adr) {
EnsureSpace ensure_space(this);
EMIT(0xDF);
emit_operand(edi, adr);
}
void Assembler::fabs() {
EnsureSpace ensure_space(this);
EMIT(0xD9);
EMIT(0xE1);
}
void Assembler::fchs() {
EnsureSpace ensure_space(this);
EMIT(0xD9);
EMIT(0xE0);
}
void Assembler::fcos() {
EnsureSpace ensure_space(this);
EMIT(0xD9);
EMIT(0xFF);
}
void Assembler::fsin() {
EnsureSpace ensure_space(this);
EMIT(0xD9);
EMIT(0xFE);
}
void Assembler::fptan() {
EnsureSpace ensure_space(this);
EMIT(0xD9);
EMIT(0xF2);
}
void Assembler::fyl2x() {
EnsureSpace ensure_space(this);
EMIT(0xD9);
EMIT(0xF1);
}
void Assembler::f2xm1() {
EnsureSpace ensure_space(this);
EMIT(0xD9);
EMIT(0xF0);
}
void Assembler::fscale() {
EnsureSpace ensure_space(this);
EMIT(0xD9);
EMIT(0xFD);
}
void Assembler::fninit() {
EnsureSpace ensure_space(this);
EMIT(0xDB);
EMIT(0xE3);
}
void Assembler::fadd(int i) {
EnsureSpace ensure_space(this);
emit_farith(0xDC, 0xC0, i);
}
void Assembler::fadd_i(int i) {
EnsureSpace ensure_space(this);
emit_farith(0xD8, 0xC0, i);
}
void Assembler::fsub(int i) {
EnsureSpace ensure_space(this);
emit_farith(0xDC, 0xE8, i);
}
void Assembler::fsub_i(int i) {
EnsureSpace ensure_space(this);
emit_farith(0xD8, 0xE0, i);
}
void Assembler::fisub_s(Operand adr) {
EnsureSpace ensure_space(this);
EMIT(0xDA);
emit_operand(esp, adr);
}
void Assembler::fmul_i(int i) {
EnsureSpace ensure_space(this);
emit_farith(0xD8, 0xC8, i);
}
void Assembler::fmul(int i) {
EnsureSpace ensure_space(this);
emit_farith(0xDC, 0xC8, i);
}
void Assembler::fdiv(int i) {
EnsureSpace ensure_space(this);
emit_farith(0xDC, 0xF8, i);
}
void Assembler::fdiv_i(int i) {
EnsureSpace ensure_space(this);
emit_farith(0xD8, 0xF0, i);
}
void Assembler::faddp(int i) {
EnsureSpace ensure_space(this);
emit_farith(0xDE, 0xC0, i);
}
void Assembler::fsubp(int i) {
EnsureSpace ensure_space(this);
emit_farith(0xDE, 0xE8, i);
}
void Assembler::fsubrp(int i) {
EnsureSpace ensure_space(this);
emit_farith(0xDE, 0xE0, i);
}
void Assembler::fmulp(int i) {
EnsureSpace ensure_space(this);
emit_farith(0xDE, 0xC8, i);
}
void Assembler::fdivp(int i) {
EnsureSpace ensure_space(this);
emit_farith(0xDE, 0xF8, i);
}
void Assembler::fprem() {
EnsureSpace ensure_space(this);
EMIT(0xD9);
EMIT(0xF8);
}
void Assembler::fprem1() {
EnsureSpace ensure_space(this);
EMIT(0xD9);
EMIT(0xF5);
}
void Assembler::fxch(int i) {
EnsureSpace ensure_space(this);
emit_farith(0xD9, 0xC8, i);
}
void Assembler::fincstp() {
EnsureSpace ensure_space(this);
EMIT(0xD9);
EMIT(0xF7);
}
void Assembler::ffree(int i) {
EnsureSpace ensure_space(this);
emit_farith(0xDD, 0xC0, i);
}
void Assembler::ftst() {
EnsureSpace ensure_space(this);
EMIT(0xD9);
EMIT(0xE4);
}
void Assembler::fucomp(int i) {
EnsureSpace ensure_space(this);
emit_farith(0xDD, 0xE8, i);
}
void Assembler::fucompp() {
EnsureSpace ensure_space(this);
EMIT(0xDA);
EMIT(0xE9);
}
void Assembler::fucomi(int i) {
EnsureSpace ensure_space(this);
EMIT(0xDB);
EMIT(0xE8 + i);
}
void Assembler::fucomip() {
EnsureSpace ensure_space(this);
EMIT(0xDF);
EMIT(0xE9);
}
void Assembler::fcompp() {
EnsureSpace ensure_space(this);
EMIT(0xDE);
EMIT(0xD9);
}
void Assembler::fnstsw_ax() {
EnsureSpace ensure_space(this);
EMIT(0xDF);
EMIT(0xE0);
}
void Assembler::fwait() {
EnsureSpace ensure_space(this);
EMIT(0x9B);
}
void Assembler::frndint() {
EnsureSpace ensure_space(this);
EMIT(0xD9);
EMIT(0xFC);
}
void Assembler::fnclex() {
EnsureSpace ensure_space(this);
EMIT(0xDB);
EMIT(0xE2);
}
void Assembler::sahf() {
EnsureSpace ensure_space(this);
EMIT(0x9E);
}
void Assembler::setcc(Condition cc, Register reg) {
DCHECK(reg.is_byte_register());
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0x90 | cc);
EMIT(0xC0 | reg.code());
}
void Assembler::cvttss2si(Register dst, Operand src) {
EnsureSpace ensure_space(this);
// The [src] might contain ebx's register code, but in
// this case, it refers to xmm3, so it is OK to emit.
EMIT(0xF3);
EMIT(0x0F);
EMIT(0x2C);
emit_operand(dst, src);
}
void Assembler::cvttsd2si(Register dst, Operand src) {
EnsureSpace ensure_space(this);
// The [src] might contain ebx's register code, but in
// this case, it refers to xmm3, so it is OK to emit.
EMIT(0xF2);
EMIT(0x0F);
EMIT(0x2C);
emit_operand(dst, src);
}
void Assembler::cvtsd2si(Register dst, XMMRegister src) {
EnsureSpace ensure_space(this);
EMIT(0xF2);
EMIT(0x0F);
EMIT(0x2D);
emit_sse_operand(dst, src);
}
void Assembler::cvtsi2ss(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0xF3);
EMIT(0x0F);
EMIT(0x2A);
emit_sse_operand(dst, src);
}
void Assembler::cvtsi2sd(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0xF2);
EMIT(0x0F);
EMIT(0x2A);
emit_sse_operand(dst, src);
}
void Assembler::cvtss2sd(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0xF3);
EMIT(0x0F);
EMIT(0x5A);
emit_sse_operand(dst, src);
}
void Assembler::cvtsd2ss(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0xF2);
EMIT(0x0F);
EMIT(0x5A);
emit_sse_operand(dst, src);
}
void Assembler::cvtdq2ps(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0x5B);
emit_sse_operand(dst, src);
}
void Assembler::cvttps2dq(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0xF3);
EMIT(0x0F);
EMIT(0x5B);
emit_sse_operand(dst, src);
}
void Assembler::addsd(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0xF2);
EMIT(0x0F);
EMIT(0x58);
emit_sse_operand(dst, src);
}
void Assembler::mulsd(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0xF2);
EMIT(0x0F);
EMIT(0x59);
emit_sse_operand(dst, src);
}
void Assembler::subsd(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0xF2);
EMIT(0x0F);
EMIT(0x5C);
emit_sse_operand(dst, src);
}
void Assembler::divsd(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0xF2);
EMIT(0x0F);
EMIT(0x5E);
emit_sse_operand(dst, src);
}
void Assembler::xorpd(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0x0F);
EMIT(0x57);
emit_sse_operand(dst, src);
}
void Assembler::andps(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0x54);
emit_sse_operand(dst, src);
}
void Assembler::andnps(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0x55);
emit_sse_operand(dst, src);
}
void Assembler::orps(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0x56);
emit_sse_operand(dst, src);
}
void Assembler::xorps(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0x57);
emit_sse_operand(dst, src);
}
void Assembler::addps(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0x58);
emit_sse_operand(dst, src);
}
void Assembler::subps(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0x5C);
emit_sse_operand(dst, src);
}
void Assembler::mulps(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0x59);
emit_sse_operand(dst, src);
}
void Assembler::divps(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0x5E);
emit_sse_operand(dst, src);
}
void Assembler::rcpps(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0x53);
emit_sse_operand(dst, src);
}
void Assembler::rsqrtps(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0x52);
emit_sse_operand(dst, src);
}
void Assembler::minps(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0x5D);
emit_sse_operand(dst, src);
}
void Assembler::maxps(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0x5F);
emit_sse_operand(dst, src);
}
void Assembler::cmpps(XMMRegister dst, Operand src, uint8_t cmp) {
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0xC2);
emit_sse_operand(dst, src);
EMIT(cmp);
}
void Assembler::sqrtsd(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0xF2);
EMIT(0x0F);
EMIT(0x51);
emit_sse_operand(dst, src);
}
void Assembler::haddps(XMMRegister dst, Operand src) {
DCHECK(IsEnabled(SSE3));
EnsureSpace ensure_space(this);
EMIT(0xF2);
EMIT(0x0F);
EMIT(0x7C);
emit_sse_operand(dst, src);
}
void Assembler::andpd(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0x0F);
EMIT(0x54);
emit_sse_operand(dst, src);
}
void Assembler::orpd(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0x0F);
EMIT(0x56);
emit_sse_operand(dst, src);
}
void Assembler::ucomisd(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0x0F);
EMIT(0x2E);
emit_sse_operand(dst, src);
}
void Assembler::roundss(XMMRegister dst, XMMRegister src, RoundingMode mode) {
DCHECK(IsEnabled(SSE4_1));
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0x0F);
EMIT(0x3A);
EMIT(0x0A);
emit_sse_operand(dst, src);
// Mask precision exeption.
EMIT(static_cast<byte>(mode) | 0x8);
}
void Assembler::roundsd(XMMRegister dst, XMMRegister src, RoundingMode mode) {
DCHECK(IsEnabled(SSE4_1));
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0x0F);
EMIT(0x3A);
EMIT(0x0B);
emit_sse_operand(dst, src);
// Mask precision exeption.
EMIT(static_cast<byte>(mode) | 0x8);
}
void Assembler::movmskpd(Register dst, XMMRegister src) {
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0x0F);
EMIT(0x50);
emit_sse_operand(dst, src);
}
void Assembler::movmskps(Register dst, XMMRegister src) {
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0x50);
emit_sse_operand(dst, src);
}
void Assembler::maxsd(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0xF2);
EMIT(0x0F);
EMIT(0x5F);
emit_sse_operand(dst, src);
}
void Assembler::minsd(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0xF2);
EMIT(0x0F);
EMIT(0x5D);
emit_sse_operand(dst, src);
}
void Assembler::cmpltsd(XMMRegister dst, XMMRegister src) {
EnsureSpace ensure_space(this);
EMIT(0xF2);
EMIT(0x0F);
EMIT(0xC2);
emit_sse_operand(dst, src);
EMIT(1); // LT == 1
}
void Assembler::movaps(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0x28);
emit_sse_operand(dst, src);
}
void Assembler::movups(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0x10);
emit_sse_operand(dst, src);
}
void Assembler::movups(Operand dst, XMMRegister src) {
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0x11);
emit_sse_operand(src, dst);
}
void Assembler::shufps(XMMRegister dst, XMMRegister src, byte imm8) {
DCHECK(is_uint8(imm8));
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0xC6);
emit_sse_operand(dst, src);
EMIT(imm8);
}
void Assembler::movdqa(Operand dst, XMMRegister src) {
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0x0F);
EMIT(0x7F);
emit_sse_operand(src, dst);
}
void Assembler::movdqa(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0x0F);
EMIT(0x6F);
emit_sse_operand(dst, src);
}
void Assembler::movdqu(Operand dst, XMMRegister src) {
EnsureSpace ensure_space(this);
EMIT(0xF3);
EMIT(0x0F);
EMIT(0x7F);
emit_sse_operand(src, dst);
}
void Assembler::movdqu(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0xF3);
EMIT(0x0F);
EMIT(0x6F);
emit_sse_operand(dst, src);
}
void Assembler::prefetch(Operand src, int level) {
DCHECK(is_uint2(level));
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0x18);
// Emit hint number in Reg position of RegR/M.
XMMRegister code = XMMRegister::from_code(level);
emit_sse_operand(code, src);
}
void Assembler::movsd(Operand dst, XMMRegister src) {
EnsureSpace ensure_space(this);
EMIT(0xF2); // double
EMIT(0x0F);
EMIT(0x11); // store
emit_sse_operand(src, dst);
}
void Assembler::movsd(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0xF2); // double
EMIT(0x0F);
EMIT(0x10); // load
emit_sse_operand(dst, src);
}
void Assembler::movss(Operand dst, XMMRegister src) {
EnsureSpace ensure_space(this);
EMIT(0xF3); // float
EMIT(0x0F);
EMIT(0x11); // store
emit_sse_operand(src, dst);
}
void Assembler::movss(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0xF3); // float
EMIT(0x0F);
EMIT(0x10); // load
emit_sse_operand(dst, src);
}
void Assembler::movd(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0x0F);
EMIT(0x6E);
emit_sse_operand(dst, src);
}
void Assembler::movd(Operand dst, XMMRegister src) {
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0x0F);
EMIT(0x7E);
emit_sse_operand(src, dst);
}
void Assembler::extractps(Register dst, XMMRegister src, byte imm8) {
DCHECK(IsEnabled(SSE4_1));
DCHECK(is_uint8(imm8));
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0x0F);
EMIT(0x3A);
EMIT(0x17);
emit_sse_operand(src, dst);
EMIT(imm8);
}
void Assembler::psllw(XMMRegister reg, uint8_t shift) {
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0x0F);
EMIT(0x71);
emit_sse_operand(esi, reg); // esi == 6
EMIT(shift);
}
void Assembler::pslld(XMMRegister reg, uint8_t shift) {
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0x0F);
EMIT(0x72);
emit_sse_operand(esi, reg); // esi == 6
EMIT(shift);
}
void Assembler::psrlw(XMMRegister reg, uint8_t shift) {
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0x0F);
EMIT(0x71);
emit_sse_operand(edx, reg); // edx == 2
EMIT(shift);
}
void Assembler::psrld(XMMRegister reg, uint8_t shift) {
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0x0F);
EMIT(0x72);
emit_sse_operand(edx, reg); // edx == 2
EMIT(shift);
}
void Assembler::psraw(XMMRegister reg, uint8_t shift) {
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0x0F);
EMIT(0x71);
emit_sse_operand(esp, reg); // esp == 4
EMIT(shift);
}
void Assembler::psrad(XMMRegister reg, uint8_t shift) {
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0x0F);
EMIT(0x72);
emit_sse_operand(esp, reg); // esp == 4
EMIT(shift);
}
void Assembler::psllq(XMMRegister reg, uint8_t shift) {
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0x0F);
EMIT(0x73);
emit_sse_operand(esi, reg); // esi == 6
EMIT(shift);
}
void Assembler::psllq(XMMRegister dst, XMMRegister src) {
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0x0F);
EMIT(0xF3);
emit_sse_operand(dst, src);
}
void Assembler::psrlq(XMMRegister reg, uint8_t shift) {
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0x0F);
EMIT(0x73);
emit_sse_operand(edx, reg); // edx == 2
EMIT(shift);
}
void Assembler::psrlq(XMMRegister dst, XMMRegister src) {
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0x0F);
EMIT(0xD3);
emit_sse_operand(dst, src);
}
void Assembler::pshufhw(XMMRegister dst, Operand src, uint8_t shuffle) {
EnsureSpace ensure_space(this);
EMIT(0xF3);
EMIT(0x0F);
EMIT(0x70);
emit_sse_operand(dst, src);
EMIT(shuffle);
}
void Assembler::pshuflw(XMMRegister dst, Operand src, uint8_t shuffle) {
EnsureSpace ensure_space(this);
EMIT(0xF2);
EMIT(0x0F);
EMIT(0x70);
emit_sse_operand(dst, src);
EMIT(shuffle);
}
void Assembler::pshufd(XMMRegister dst, Operand src, uint8_t shuffle) {
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0x0F);
EMIT(0x70);
emit_sse_operand(dst, src);
EMIT(shuffle);
}
void Assembler::pblendw(XMMRegister dst, Operand src, uint8_t mask) {
DCHECK(IsEnabled(SSE4_1));
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0x0F);
EMIT(0x3A);
EMIT(0x0E);
emit_sse_operand(dst, src);
EMIT(mask);
}
void Assembler::palignr(XMMRegister dst, Operand src, uint8_t mask) {
DCHECK(IsEnabled(SSSE3));
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0x0F);
EMIT(0x3A);
EMIT(0x0F);
emit_sse_operand(dst, src);
EMIT(mask);
}
void Assembler::pextrb(Operand dst, XMMRegister src, uint8_t offset) {
DCHECK(IsEnabled(SSE4_1));
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0x0F);
EMIT(0x3A);
EMIT(0x14);
emit_sse_operand(src, dst);
EMIT(offset);
}
void Assembler::pextrw(Operand dst, XMMRegister src, uint8_t offset) {
DCHECK(IsEnabled(SSE4_1));
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0x0F);
EMIT(0x3A);
EMIT(0x15);
emit_sse_operand(src, dst);
EMIT(offset);
}
void Assembler::pextrd(Operand dst, XMMRegister src, uint8_t offset) {
DCHECK(IsEnabled(SSE4_1));
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0x0F);
EMIT(0x3A);
EMIT(0x16);
emit_sse_operand(src, dst);
EMIT(offset);
}
void Assembler::insertps(XMMRegister dst, Operand src, uint8_t offset) {
DCHECK(IsEnabled(SSE4_1));
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0x0F);
EMIT(0x3A);
EMIT(0x21);
emit_sse_operand(dst, src);
EMIT(offset);
}
void Assembler::pinsrb(XMMRegister dst, Operand src, uint8_t offset) {
DCHECK(IsEnabled(SSE4_1));
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0x0F);
EMIT(0x3A);
EMIT(0x20);
emit_sse_operand(dst, src);
EMIT(offset);
}
void Assembler::pinsrw(XMMRegister dst, Operand src, uint8_t offset) {
DCHECK(is_uint8(offset));
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0x0F);
EMIT(0xC4);
emit_sse_operand(dst, src);
EMIT(offset);
}
void Assembler::pinsrd(XMMRegister dst, Operand src, uint8_t offset) {
DCHECK(IsEnabled(SSE4_1));
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0x0F);
EMIT(0x3A);
EMIT(0x22);
emit_sse_operand(dst, src);
EMIT(offset);
}
void Assembler::addss(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0xF3);
EMIT(0x0F);
EMIT(0x58);
emit_sse_operand(dst, src);
}
void Assembler::subss(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0xF3);
EMIT(0x0F);
EMIT(0x5C);
emit_sse_operand(dst, src);
}
void Assembler::mulss(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0xF3);
EMIT(0x0F);
EMIT(0x59);
emit_sse_operand(dst, src);
}
void Assembler::divss(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0xF3);
EMIT(0x0F);
EMIT(0x5E);
emit_sse_operand(dst, src);
}
void Assembler::sqrtss(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0xF3);
EMIT(0x0F);
EMIT(0x51);
emit_sse_operand(dst, src);
}
void Assembler::ucomiss(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0x0F);
EMIT(0x2E);
emit_sse_operand(dst, src);
}
void Assembler::maxss(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0xF3);
EMIT(0x0F);
EMIT(0x5F);
emit_sse_operand(dst, src);
}
void Assembler::minss(XMMRegister dst, Operand src) {
EnsureSpace ensure_space(this);
EMIT(0xF3);
EMIT(0x0F);
EMIT(0x5D);
emit_sse_operand(dst, src);
}
// AVX instructions
void Assembler::vfmasd(byte op, XMMRegister dst, XMMRegister src1,
Operand src2) {
DCHECK(IsEnabled(FMA3));
EnsureSpace ensure_space(this);
emit_vex_prefix(src1, kLIG, k66, k0F38, kW1);
EMIT(op);
emit_sse_operand(dst, src2);
}
void Assembler::vfmass(byte op, XMMRegister dst, XMMRegister src1,
Operand src2) {
DCHECK(IsEnabled(FMA3));
EnsureSpace ensure_space(this);
emit_vex_prefix(src1, kLIG, k66, k0F38, kW0);
EMIT(op);
emit_sse_operand(dst, src2);
}
void Assembler::vsd(byte op, XMMRegister dst, XMMRegister src1, Operand src2) {
vinstr(op, dst, src1, src2, kF2, k0F, kWIG);
}
void Assembler::vss(byte op, XMMRegister dst, XMMRegister src1, Operand src2) {
vinstr(op, dst, src1, src2, kF3, k0F, kWIG);
}
void Assembler::vps(byte op, XMMRegister dst, XMMRegister src1, Operand src2) {
vinstr(op, dst, src1, src2, kNone, k0F, kWIG);
}
void Assembler::vpd(byte op, XMMRegister dst, XMMRegister src1, Operand src2) {
vinstr(op, dst, src1, src2, k66, k0F, kWIG);
}
void Assembler::vcmpps(XMMRegister dst, XMMRegister src1, Operand src2,
uint8_t cmp) {
vps(0xC2, dst, src1, src2);
EMIT(cmp);
}
void Assembler::vshufps(XMMRegister dst, XMMRegister src1, Operand src2,
byte imm8) {
DCHECK(is_uint8(imm8));
vps(0xC6, dst, src1, src2);
EMIT(imm8);
}
void Assembler::vpsllw(XMMRegister dst, XMMRegister src, uint8_t imm8) {
XMMRegister iop = XMMRegister::from_code(6);
vinstr(0x71, iop, dst, Operand(src), k66, k0F, kWIG);
EMIT(imm8);
}
void Assembler::vpslld(XMMRegister dst, XMMRegister src, uint8_t imm8) {
XMMRegister iop = XMMRegister::from_code(6);
vinstr(0x72, iop, dst, Operand(src), k66, k0F, kWIG);
EMIT(imm8);
}
void Assembler::vpsrlw(XMMRegister dst, XMMRegister src, uint8_t imm8) {
XMMRegister iop = XMMRegister::from_code(2);
vinstr(0x71, iop, dst, Operand(src), k66, k0F, kWIG);
EMIT(imm8);
}
void Assembler::vpsrld(XMMRegister dst, XMMRegister src, uint8_t imm8) {
XMMRegister iop = XMMRegister::from_code(2);
vinstr(0x72, iop, dst, Operand(src), k66, k0F, kWIG);
EMIT(imm8);
}
void Assembler::vpsraw(XMMRegister dst, XMMRegister src, uint8_t imm8) {
XMMRegister iop = XMMRegister::from_code(4);
vinstr(0x71, iop, dst, Operand(src), k66, k0F, kWIG);
EMIT(imm8);
}
void Assembler::vpsrad(XMMRegister dst, XMMRegister src, uint8_t imm8) {
XMMRegister iop = XMMRegister::from_code(4);
vinstr(0x72, iop, dst, Operand(src), k66, k0F, kWIG);
EMIT(imm8);
}
void Assembler::vpshufhw(XMMRegister dst, Operand src, uint8_t shuffle) {
vinstr(0x70, dst, xmm0, src, kF3, k0F, kWIG);
EMIT(shuffle);
}
void Assembler::vpshuflw(XMMRegister dst, Operand src, uint8_t shuffle) {
vinstr(0x70, dst, xmm0, src, kF2, k0F, kWIG);
EMIT(shuffle);
}
void Assembler::vpshufd(XMMRegister dst, Operand src, uint8_t shuffle) {
vinstr(0x70, dst, xmm0, src, k66, k0F, kWIG);
EMIT(shuffle);
}
void Assembler::vpblendw(XMMRegister dst, XMMRegister src1, Operand src2,
uint8_t mask) {
vinstr(0x0E, dst, src1, src2, k66, k0F3A, kWIG);
EMIT(mask);
}
void Assembler::vpalignr(XMMRegister dst, XMMRegister src1, Operand src2,
uint8_t mask) {
vinstr(0x0F, dst, src1, src2, k66, k0F3A, kWIG);
EMIT(mask);
}
void Assembler::vpextrb(Operand dst, XMMRegister src, uint8_t offset) {
vinstr(0x14, src, xmm0, dst, k66, k0F3A, kWIG);
EMIT(offset);
}
void Assembler::vpextrw(Operand dst, XMMRegister src, uint8_t offset) {
vinstr(0x15, src, xmm0, dst, k66, k0F3A, kWIG);
EMIT(offset);
}
void Assembler::vpextrd(Operand dst, XMMRegister src, uint8_t offset) {
vinstr(0x16, src, xmm0, dst, k66, k0F3A, kWIG);
EMIT(offset);
}
void Assembler::vinsertps(XMMRegister dst, XMMRegister src1, Operand src2,
uint8_t offset) {
vinstr(0x21, dst, src1, src2, k66, k0F3A, kWIG);
EMIT(offset);
}
void Assembler::vpinsrb(XMMRegister dst, XMMRegister src1, Operand src2,
uint8_t offset) {
vinstr(0x20, dst, src1, src2, k66, k0F3A, kWIG);
EMIT(offset);
}
void Assembler::vpinsrw(XMMRegister dst, XMMRegister src1, Operand src2,
uint8_t offset) {
vinstr(0xC4, dst, src1, src2, k66, k0F, kWIG);
EMIT(offset);
}
void Assembler::vpinsrd(XMMRegister dst, XMMRegister src1, Operand src2,
uint8_t offset) {
vinstr(0x22, dst, src1, src2, k66, k0F3A, kWIG);
EMIT(offset);
}
void Assembler::bmi1(byte op, Register reg, Register vreg, Operand rm) {
DCHECK(IsEnabled(BMI1));
EnsureSpace ensure_space(this);
emit_vex_prefix(vreg, kLZ, kNone, k0F38, kW0);
EMIT(op);
emit_operand(reg, rm);
}
void Assembler::tzcnt(Register dst, Operand src) {
DCHECK(IsEnabled(BMI1));
EnsureSpace ensure_space(this);
EMIT(0xF3);
EMIT(0x0F);
EMIT(0xBC);
emit_operand(dst, src);
}
void Assembler::lzcnt(Register dst, Operand src) {
DCHECK(IsEnabled(LZCNT));
EnsureSpace ensure_space(this);
EMIT(0xF3);
EMIT(0x0F);
EMIT(0xBD);
emit_operand(dst, src);
}
void Assembler::popcnt(Register dst, Operand src) {
DCHECK(IsEnabled(POPCNT));
EnsureSpace ensure_space(this);
EMIT(0xF3);
EMIT(0x0F);
EMIT(0xB8);
emit_operand(dst, src);
}
void Assembler::bmi2(SIMDPrefix pp, byte op, Register reg, Register vreg,
Operand rm) {
DCHECK(IsEnabled(BMI2));
EnsureSpace ensure_space(this);
emit_vex_prefix(vreg, kLZ, pp, k0F38, kW0);
EMIT(op);
emit_operand(reg, rm);
}
void Assembler::rorx(Register dst, Operand src, byte imm8) {
DCHECK(IsEnabled(BMI2));
DCHECK(is_uint8(imm8));
Register vreg = Register::from_code<0>(); // VEX.vvvv unused
EnsureSpace ensure_space(this);
emit_vex_prefix(vreg, kLZ, kF2, k0F3A, kW0);
EMIT(0xF0);
emit_operand(dst, src);
EMIT(imm8);
}
void Assembler::sse2_instr(XMMRegister dst, Operand src, byte prefix,
byte escape, byte opcode) {
EnsureSpace ensure_space(this);
EMIT(prefix);
EMIT(escape);
EMIT(opcode);
emit_sse_operand(dst, src);
}
void Assembler::ssse3_instr(XMMRegister dst, Operand src, byte prefix,
byte escape1, byte escape2, byte opcode) {
DCHECK(IsEnabled(SSSE3));
EnsureSpace ensure_space(this);
EMIT(prefix);
EMIT(escape1);
EMIT(escape2);
EMIT(opcode);
emit_sse_operand(dst, src);
}
void Assembler::sse4_instr(XMMRegister dst, Operand src, byte prefix,
byte escape1, byte escape2, byte opcode) {
DCHECK(IsEnabled(SSE4_1));
EnsureSpace ensure_space(this);
EMIT(prefix);
EMIT(escape1);
EMIT(escape2);
EMIT(opcode);
emit_sse_operand(dst, src);
}
void Assembler::vinstr(byte op, XMMRegister dst, XMMRegister src1, Operand src2,
SIMDPrefix pp, LeadingOpcode m, VexW w) {
DCHECK(IsEnabled(AVX));
EnsureSpace ensure_space(this);
emit_vex_prefix(src1, kL128, pp, m, w);
EMIT(op);
emit_sse_operand(dst, src2);
}
void Assembler::emit_sse_operand(XMMRegister reg, Operand adr) {
Register ireg = Register::from_code(reg.code());
emit_operand(ireg, adr);
}
void Assembler::emit_sse_operand(XMMRegister dst, XMMRegister src) {
EMIT(0xC0 | dst.code() << 3 | src.code());
}
void Assembler::emit_sse_operand(Register dst, XMMRegister src) {
EMIT(0xC0 | dst.code() << 3 | src.code());
}
void Assembler::emit_sse_operand(XMMRegister dst, Register src) {
EMIT(0xC0 | (dst.code() << 3) | src.code());
}
void Assembler::emit_vex_prefix(XMMRegister vreg, VectorLength l, SIMDPrefix pp,
LeadingOpcode mm, VexW w) {
if (mm != k0F || w != kW0) {
EMIT(0xC4);
// Change RXB from "110" to "111" to align with gdb disassembler.
EMIT(0xE0 | mm);
EMIT(w | ((~vreg.code() & 0xF) << 3) | l | pp);
} else {
EMIT(0xC5);
EMIT(((~vreg.code()) << 3) | l | pp);
}
}
void Assembler::emit_vex_prefix(Register vreg, VectorLength l, SIMDPrefix pp,
LeadingOpcode mm, VexW w) {
XMMRegister ivreg = XMMRegister::from_code(vreg.code());
emit_vex_prefix(ivreg, l, pp, mm, w);
}
void Assembler::GrowBuffer() {
DCHECK(buffer_overflow());
DCHECK_EQ(buffer_start_, buffer_->start());
// Compute new buffer size.
int old_size = buffer_->size();
int new_size = 2 * old_size;
// Some internal data structures overflow for very large buffers,
// they must ensure that kMaximalBufferSize is not too large.
if (new_size > kMaximalBufferSize) {
V8::FatalProcessOutOfMemory(nullptr, "Assembler::GrowBuffer");
}
// Set up new buffer.
std::unique_ptr<AssemblerBuffer> new_buffer = buffer_->Grow(new_size);
DCHECK_EQ(new_size, new_buffer->size());
byte* new_start = new_buffer->start();
// Copy the data.
intptr_t pc_delta = new_start - buffer_start_;
intptr_t rc_delta = (new_start + new_size) - (buffer_start_ + old_size);
size_t reloc_size = (buffer_start_ + old_size) - reloc_info_writer.pos();
MemMove(new_start, buffer_start_, pc_offset());
MemMove(rc_delta + reloc_info_writer.pos(), reloc_info_writer.pos(),
reloc_size);
// Switch buffers.
buffer_ = std::move(new_buffer);
buffer_start_ = new_start;
pc_ += pc_delta;
reloc_info_writer.Reposition(reloc_info_writer.pos() + rc_delta,
reloc_info_writer.last_pc() + pc_delta);
// Relocate internal references.
for (auto pos : internal_reference_positions_) {
Address p = reinterpret_cast<Address>(buffer_start_ + pos);
WriteUnalignedValue(p, ReadUnalignedValue<int>(p) + pc_delta);
}
// Relocate pc-relative references.
int mode_mask = RelocInfo::ModeMask(RelocInfo::OFF_HEAP_TARGET);
DCHECK_EQ(mode_mask, RelocInfo::kApplyMask & mode_mask);
Vector<byte> instructions{buffer_start_, static_cast<size_t>(pc_offset())};
Vector<const byte> reloc_info{reloc_info_writer.pos(), reloc_size};
for (RelocIterator it(instructions, reloc_info, 0, mode_mask); !it.done();
it.next()) {
it.rinfo()->apply(pc_delta);
}
DCHECK(!buffer_overflow());
}
void Assembler::emit_arith_b(int op1, int op2, Register dst, int imm8) {
DCHECK(is_uint8(op1) && is_uint8(op2)); // wrong opcode
DCHECK(is_uint8(imm8));
DCHECK_EQ(op1 & 0x01, 0); // should be 8bit operation
EMIT(op1);
EMIT(op2 | dst.code());
EMIT(imm8);
}
void Assembler::emit_arith(int sel, Operand dst, const Immediate& x) {
DCHECK((0 <= sel) && (sel <= 7));
Register ireg = Register::from_code(sel);
if (x.is_int8()) {
EMIT(0x83); // using a sign-extended 8-bit immediate.
emit_operand(ireg, dst);
EMIT(x.immediate() & 0xFF);
} else if (dst.is_reg(eax)) {
EMIT((sel << 3) | 0x05); // short form if the destination is eax.
emit(x);
} else {
EMIT(0x81); // using a literal 32-bit immediate.
emit_operand(ireg, dst);
emit(x);
}
}
void Assembler::emit_operand(Register reg, Operand adr) {
emit_operand(reg.code(), adr);
}
void Assembler::emit_operand(XMMRegister reg, Operand adr) {
Register ireg = Register::from_code(reg.code());
emit_operand(ireg, adr);
}
void Assembler::emit_operand(int code, Operand adr) {
// Isolate-independent code may not embed relocatable addresses.
DCHECK(!options().isolate_independent_code ||
adr.rmode_ != RelocInfo::CODE_TARGET);
DCHECK(!options().isolate_independent_code ||
adr.rmode_ != RelocInfo::FULL_EMBEDDED_OBJECT);
DCHECK(!options().isolate_independent_code ||
adr.rmode_ != RelocInfo::EXTERNAL_REFERENCE);
const unsigned length = adr.len_;
DCHECK_GT(length, 0);
// Emit updated ModRM byte containing the given register.
pc_[0] = (adr.buf_[0] & ~0x38) | (code << 3);
// Emit the rest of the encoded operand.
for (unsigned i = 1; i < length; i++) pc_[i] = adr.buf_[i];
pc_ += length;
// Emit relocation information if necessary.
if (length >= sizeof(int32_t) && !RelocInfo::IsNone(adr.rmode_)) {
pc_ -= sizeof(int32_t); // pc_ must be *at* disp32
RecordRelocInfo(adr.rmode_);
if (adr.rmode_ == RelocInfo::INTERNAL_REFERENCE) { // Fixup for labels
emit_label(ReadUnalignedValue<Label*>(reinterpret_cast<Address>(pc_)));
} else {
pc_ += sizeof(int32_t);
}
}
}
void Assembler::emit_label(Label* label) {
if (label->is_bound()) {
internal_reference_positions_.push_back(pc_offset());
emit(reinterpret_cast<uint32_t>(buffer_start_ + label->pos()));
} else {
emit_disp(label, Displacement::CODE_ABSOLUTE);
}
}
void Assembler::emit_farith(int b1, int b2, int i) {
DCHECK(is_uint8(b1) && is_uint8(b2)); // wrong opcode
DCHECK(0 <= i && i < 8); // illegal stack offset
EMIT(b1);
EMIT(b2 + i);
}
void Assembler::db(uint8_t data) {
EnsureSpace ensure_space(this);
EMIT(data);
}
void Assembler::dd(uint32_t data) {
EnsureSpace ensure_space(this);
emit(data);
}
void Assembler::dq(uint64_t data) {
EnsureSpace ensure_space(this);
emit_q(data);
}
void Assembler::dd(Label* label) {
EnsureSpace ensure_space(this);
RecordRelocInfo(RelocInfo::INTERNAL_REFERENCE);
emit_label(label);
}
void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) {
if (!ShouldRecordRelocInfo(rmode)) return;
RelocInfo rinfo(reinterpret_cast<Address>(pc_), rmode, data, Code());
reloc_info_writer.Write(&rinfo);
}
#undef EMIT
} // namespace internal
} // namespace v8
#endif // V8_TARGET_ARCH_IA32
```
|
Carter Milliken Reum (born February 5, 1981) is an American author, entrepreneur and venture capitalist. He is most notable for his marriage to Paris Hilton, and for founding M13 Ventures, an angel investment firm.
Career
Alongside his brother Courtney, Reum co-founded the alcohol brand VEEV Spirits, a company listed in Inc. Magazine's 5000 fastest-growing private companies in the United States in 2018.
Reum has been featured in episodes of the television series Hatched and has appeared as a guest and a commentator on a variety of networks including CBS and Fox. He is also a contributing writer for Huffington Post and Inc. Additionally he is the co-founder of the investment firm M13.
Publications
In 2018, Random House and Penguin Books released Shortcut Your Startup: Ten Ways to Speed Up Entrepreneurial Success. Reum co-authored the book with his brother Courtney. The book uses the Reums' experiences to teach entrepreneurs on how to reach their goals. They pull from their experiences creating Veev and from the lessons learned through the years investing in companies like SpaceX, Lyft, Pinterest and Warby Parker.
In 2016, Reum started the venture capital firm M13 Investments.
Personal life
His father, Robert Reum, was chairman, president and chief executive officer of Chicago-based Amsted Industries, which was ranked as one of the United States's largest private companies by Forbes.
Reum graduated from Columbia College of Columbia University in 2003. His siblings include his brother, Courtney, and his sister, Halle, who is married to Oliver Hammond, a scion of the Annenberg family. Reum is an alumnus of Zeta Beta Tau fraternity, initiated into its Delta Chapter at Columbia University.
On February 17, 2021, Reum and Paris Hilton announced their engagement. They married in Los Angeles on November 11, 2021. In January 2023, the couple announced the birth of their son, Phoenix Barron Hilton Reum, born via surrogacy. Reum also has a daughter with former actress Laura Bellizzi, whom he supports financially, but has no relationship with.
References
1981 births
Living people
American company founders
Columbia College (New York) alumni
Place of birth missing (living people)
American businesspeople
American venture capitalists
Conrad Hilton family
Richards family
|
Illinois Route 394 (IL 394), also known as the Calumet Expressway, is a four-lane state highway that travels north from a junction with IL 1 south of Crete to an interchange in South Holland with Interstate 294/Interstate 94/Interstate 80 (I-294/I-94/I-80, Tri-State Tollway/Bishop Ford Freeway; this route is an extension of, but not part of the latter freeway). Although not an Interstate Highway, Illinois 394 is an Interstate-standard highway from its junction with Sauk Trail at Sauk Village to its northern terminus at the I-294/I-94/I-80 interchange in South Holland. IL 394 functions as a bypass of IL 1 to the west, of which it was formerly part, and provides access to southern suburbs of Chicago.
Route description
IL 394 begins as a four-lane arterial at a junction with IL 1 south of Crete, continuing as through traffic from IL 1 north. The highway curves to the east before assuming a north–south alignment, running parallel to IL 1 to the east, heading north as a surface street arterial, before becoming an Interstate-standard freeway at an intersection with Sauk Trail in Sauk Village. Shortly thereafter, the freeway meets U.S. Highway 30 (US 30, Lincoln Highway) in Ford Heights. Continuing northward, IL 394 ends at an interchange with I-294/I-94/I-80 (Tri-State Tollway/Bishop Ford Freeway) interchange in South Holland.
History
Before taking the IL 394 designation, the route was a former alignment of IL 1. In the 1950s, a freeway, then known as the Calumet Expressway, was constructed south of Chicago as an extension of Doty Avenue. There were traffic lights at the intersections of Doty with 111th, 115th, and 130th, but interchanges were built in the early 1960s. The expressway was originally designated as IL 1, Alternate US 30, and certain portions as US 6 and IL 83. By 1964, IL 1 was restored to its old alignment along Halsted Street, and US 6 and IL 83 were routed onto Torrence Avenue, while the IL 394 designation was applied to the expressway south of the portion designated as I-94. At this time, IL 1 was discontinued north of I-57. In 1962, the connection between the Calumet Expressway and Dan Ryan Expressway opened and is now signed as part of the Bishop Ford. In 1996, the Calumet Expressway was renamed in honor of Bishop Louis Henry Ford, the leader of the Church of God in Christ who had died the previous year.
In 2006 and 2007, IL 394 was reconstructed north of Glenwood–Dyer Road as part of the massive Kingery Expressway reconstruction effort. The intersection with I-80, I-94 and I-294 was improved. In the southbound direction, the ramps were rebuilt, with a gentler left-exit curve for I-94 to travel from the Bishop Ford to the Kingery Expressway. The cloverleaf-style ramps to southbound IL 394 were replaced with a flyover and the distributor leg of a collector–distributor ramp from eastbound I-80/I-294. In the northbound direction, a dangerous ramp to eastbound I-80/I-94 was replaced with a ramp to a set of collector–distributor lanes, intended for US 6 and IL 83 (Torrence Avenue). A cloverleaf ramp from eastbound I-80/I-294 was replaced with a flyover, and the merge area where IL 394 terminates was improved. (The I-94 ramp itself has been moved nearly a mile [1.6 km] east to before Torrence Avenue). These improvements were completed in June 2007.
Future
In the late 1990s, and in July 2010, plans were rumored to upgrade IL 394 into a full Interstate. I-394 would begin at its current northern terminus and continue south towards Beecher, where the Interstate would then turn west to a southern terminus at I-57 just south of Monee. However, both proposals were never seriously taken into consideration, and the proposed upgrade is currently not a priority and no funding has been provided.
Exit list
References
External links
Illinois Highway Ends: Illinois Route 394
State highways in Illinois
Interstate 94
Expressways in the Chicago area
Transportation in Cook County, Illinois
Transportation in Will County, Illinois
U.S. Route 6
U.S. Route 30
|
Margaret O'Donnell may refer to:
Margaret O'Donnell (poet), see 1963 in poetry
Margaret H. O'Donnell (born 1935), Australian tennis player active from 1949 to 1956
Margaret R. O'Donnell (born 1938), British tennis player active from 1956 to 1965
Margaret O'Donnell, character in 17 Again (film)
|
```smalltalk
using SixLabors.ImageSharp.Formats.Tiff.Constants;
using SixLabors.ImageSharp.Memory;
namespace SixLabors.ImageSharp.Formats.Tiff.Compression.Compressors;
internal sealed class NoCompressor : TiffBaseCompressor
{
public NoCompressor(Stream output, MemoryAllocator memoryAllocator, int width, int bitsPerPixel)
: base(output, memoryAllocator, width, bitsPerPixel)
{
}
/// <inheritdoc/>
public override TiffCompression Method => TiffCompression.None;
/// <inheritdoc/>
public override void Initialize(int rowsPerStrip)
{
}
/// <inheritdoc/>
public override void CompressStrip(Span<byte> rows, int height) => this.Output.Write(rows);
/// <inheritdoc/>
protected override void Dispose(bool disposing)
{
}
}
```
|
```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.
"""Configs for different model heads."""
import dataclasses
from typing import Optional
from official.modeling import hyperparams
@dataclasses.dataclass
class MLP(hyperparams.Config):
"""Config for the MLP head."""
normalize_inputs: bool = True
num_hidden_channels: int = 2048
num_hidden_layers: int = 3
num_output_channels: int = 128
use_sync_bn: bool = False
norm_momentum: float = 0.997
norm_epsilon: float = 1e-5
activation: Optional[str] = 'relu'
@dataclasses.dataclass
class ActionTransformer(hyperparams.Config):
"""Config for the action transformer head."""
# parameters for classifier
num_hidden_layers: int = 0
num_hidden_channels: int = 0
use_sync_bn: bool = True
activation: str = 'relu'
dropout_rate: float = 0.0
# parameters for RoiAligner
crop_size: int = 4
sample_offset: float = 0.5
# parameters for TxDecoder
num_tx_channels: int = 128
num_tx_layers: int = 3
num_tx_heads: int = 3
use_bias: bool = True
tx_activation: Optional[str] = 'gelu'
attention_dropout_rate: float = 0.0
layer_norm_epsilon: float = 1e-12
use_positional_embedding: bool = True
```
|
Gérard James is an American set decorator. He won an Academy Award in the category Best Art Direction for the film Dangerous Liaisons.
Selected filmography
Dangerous Liaisons (1988)
References
External links
Year of birth missing (living people)
Living people
American set decorators
Best Art Direction Academy Award winners
|
```python
# mypy: allow-untyped-defs
import functools
from typing import Dict, Set, Tuple
import torch
from torch._dynamo.utils import counters
from torch._ops import OpOverload, OpOverloadPacket
from ..pattern_matcher import fwd_only, register_replacement
aten = torch.ops.aten
@functools.lru_cache(None)
def _misc_patterns_init():
from .joint_graph import patterns as joint_graph_patterns
from .post_grad import pass_patterns as post_grad_patterns_all
post_grad_patterns = post_grad_patterns_all[1] # medium priority
if torch.cuda.is_available():
# workaround path_to_url
device = "cuda"
else:
device = "cpu"
# These patterns do 2 things
# 1. Since we know that index is completely unique, we can codegen it using
# stores instead of atomic adds, which is quite a bit faster.
# 2. Also, since we are guaranteed that they are completely within bounds,
# we can use unsafe indexing and skip debug asserts
def randperm_index_add_pattern(x, y):
index = torch.randperm(x.shape[0], device=x.device)[: y.shape[0]]
return torch.index_add(x, dim=0, source=y, index=index), index
def randperm_index_add_replacement(x, y):
index = torch.randperm(x.shape[0], device=x.device)[: y.shape[0]]
return (
torch.ops.aten._unsafe_index_put(
x, (index,), aten._unsafe_index(x, (index,)) + y, accumulate=False
),
index,
)
register_replacement(
randperm_index_add_pattern,
randperm_index_add_replacement,
[torch.empty(4, 8, device=device), torch.empty(2, 8, device=device)],
fwd_only,
[post_grad_patterns, joint_graph_patterns],
)
def randperm_index_pattern(x, slice_shape):
index = torch.randperm(x.shape[0], device=x.device)[:slice_shape]
return torch.ops.aten.index(x, (index,)), index
def randperm_index_replacement(x, slice_shape):
index = torch.randperm(x.shape[0], device=x.device)[:slice_shape]
return torch.ops.aten._unsafe_index(x, (index,)), index
register_replacement(
randperm_index_pattern,
randperm_index_replacement,
[torch.empty(4, 8, device=device)],
fwd_only,
[post_grad_patterns, joint_graph_patterns],
scalar_workaround={"slice_shape": 42},
)
class NumpyCompatNormalization:
numpy_compat: Dict[str, Tuple[str, ...]] = {
"dim": ("axis",),
"keepdim": ("keepdims",),
"input": ("x", "a", "x1"),
"other": ("x2",),
}
inverse_mapping: Dict[str, str]
cache: Dict["torch.fx.graph.Target", Set[str]]
def __init__(self) -> None:
self.cache = {} # callable -> tuple of replaceable args e.g. ["axis"]
self.inverse_mapping = {}
for actual_kwarg, numpy_kwargs in self.numpy_compat.items():
for numpy_kwarg in numpy_kwargs:
assert numpy_kwarg not in self.inverse_mapping
self.inverse_mapping[numpy_kwarg] = actual_kwarg
def __call__(self, graph: torch.fx.Graph):
for node in graph.nodes:
if node.op != "call_function":
continue
if isinstance(node.target, (OpOverload, OpOverloadPacket)):
# only applies to torch ops; e.g. torch.stack(axis=1) works, torch.ops.aten.stack(axis=1) doesn't.
continue
kwargs = node.kwargs
if node.target in self.cache:
replaceable_kwargs = self.cache[node.target]
else:
signatures = torch.fx.operator_schemas.get_signature_for_torch_op(
node.target
)
signatures = () if signatures is None else signatures
replaceable_kwargs = set()
for sig in signatures:
for param_name in sig.parameters.keys():
if param_name in self.numpy_compat:
replaceable_kwargs.update(self.numpy_compat[param_name])
self.cache[node.target] = replaceable_kwargs
if not replaceable_kwargs:
continue
new_kwargs = {}
kwargs_changed = False
for k, v in kwargs.items():
if k in replaceable_kwargs:
kwargs_changed = True
new_kwargs[self.inverse_mapping[k]] = v
else:
new_kwargs[k] = v
if kwargs_changed:
node.kwargs = torch.fx.immutable_collections.immutable_dict(new_kwargs)
counters["inductor"]["numpy_compat_normalization"] += 1
numpy_compat_normalization = NumpyCompatNormalization()
```
|
```python
import statsmodels.api as sm
from sklearn.neighbors import KNeighborsRegressor
import scattertext as st
df = st.SampleCorpora.ConventionData2012.get_data().assign(
parse=lambda df: df.text.apply(st.whitespace_nlp_with_sentences)
)
corpus = st.CorpusWithoutCategoriesFromParsedDocuments(
df, parsed_col='parse'
).build().get_unigram_corpus().remove_infrequent_words(
minimum_term_count=6
)
dispersion = st.Dispersion(corpus)
dispersion_df = dispersion.get_df().assign(
X=lambda df: df.Frequency,
Xpos=lambda df: st.Scalers.log_scale(df.X),
Y=lambda df: dispersion.rosengrens(),
Ypos=lambda df: st.Scalers.scale(df.Y),
)
html = st.dataframe_scattertext(
corpus,
plot_df=dispersion_df,
metadata=corpus.get_df()['speaker'] + ' (' + corpus.get_df()['party'].str.upper() + ')',
ignore_categories=True,
x_label='Log Frequency',
y_label="Rosengren's S",
y_axis_labels=['More Dispersion', 'Medium', 'Less Dispersion'],
)
fn = 'demo_dispersion_basic.html'
open(fn, 'w').write(html)
print('open ./%s in Chrome' % fn)
```
|
Ivana Isailović (; born January 1, 1986, in Šabac, Yugoslavia) is a professional volleyball player from Serbia, who was a member of the Serbia women's national volleyball team that won the silver medal at the 2007 European Championship in Belgium and Luxembourg. She currently plays for Schweriner SC.
External links
at world of volley
1986 births
Living people
Sportspeople from Šabac
Serbian women's volleyball players
Serbian expatriate sportspeople in Germany
Serbian expatriate sportspeople in Poland
Expatriate volleyball players in Germany
Expatriate volleyball players in Poland
Serbia and Montenegro women's volleyball players
Serbian expatriate volleyball players
Serbian expatriate sportspeople in Slovenia
Expatriate volleyball players in Slovenia
|
```java
/*
Need to be compiled with java7
javac TestAgentLoaded.java
jar cvmf META-INF/MANIFEST.MF TestAgentLoaded.jar TestAgentLoaded.class
*/
import java.lang.instrument.Instrumentation;
import java.io.FileOutputStream;
public class TestAgentLoaded {
public static void agentmain(String agentArgs, Instrumentation inst) {
try {
// parsing the argument like agent-usm.jar
if (agentArgs != ""){
//split arguments by comma character
String[] args = agentArgs.split(",");
for (String arg : args){
//we only parse the arguments of the form "arg=value" (e.g: dd.debug.enabled=true)
String[] keyValTuple = arg.split("=");
if ((keyValTuple.length == 2) && (keyValTuple[0].equals("testfile"))) {
System.out.println("touch file "+keyValTuple[1]);
new FileOutputStream(keyValTuple[1]).close();
}
}
}
} catch (Exception ex) {
System.out.println(ex);
} finally {
System.out.println("loading TestAgentLoaded.agentmain("+agentArgs+")");
}
}
}
```
|
Serhiy Turyanskyi (; born 25 May 1962 in Kolomyia Raion, Ivano-Frankivsk Oblast) is the Soviet and Ukrainian professional footballer, later the Ukrainian coach. He also played in the neighboring countries of Poland and Hungary.
Playing career
His primary football development obtained in the Kolomyia sport school. He made his professional debut in the Soviet Second League B in the beginning of the 1980s for couple of Moldavian clubs. Around mid-80s he played for the Lviv army-men, subsequently transferring to the fourth-runner of the Ivano-Frankivsk football, Prykarpattia. In 1988 Turyanskyi managed to play for Tavria as well as the amateur club from Nadvirna (Ivano-Frankivsk Oblast), eventually ending up back at Prykarpattia. Before playing abroad he also played in Vinnytsia. In 1993 Turyanskyi returned to native Prykarpattia for which played 70+ games and earning the honors of the Ukrainian First League. For short time he played in Tysmenytsia, a city next to Ivano-Frankivsk and later for Nyva Ternopil where he finished his career.
Honours
Ukrainian First League champion.
National team
Turyanskyi played only a single game for the national team on 15 March 1994. In the game against Israel he substituted Serhiy Konovalov on the 68th minute and later received a yellow card. Ukraine has lost the game at home 0:1.
References
External links
List of the official matches at FFU website
Statistics of the player at KLISF
National team participation
1962 births
Living people
Soviet men's footballers
Ukrainian men's footballers
Ukraine men's international footballers
Ukrainian expatriate men's footballers
Ukrainian Premier League players
FC Spartak Ivano-Frankivsk players
SC Tavriya Simferopol players
FC Nyva Ternopil players
FC Zimbru Chișinău players
Nyíregyháza Spartacus FC players
Expatriate men's footballers in Hungary
Ukrainian football managers
FC Nyva Vinnytsia players
FC SKA-Karpaty Lviv players
FC Beskyd Nadvirna players
FC Khutrovyk Tysmenytsia players
Men's association football forwards
FC Spartak Ivano-Frankivsk managers
FC Prykarpattia Ivano-Frankivsk (1998) managers
FC Karpaty Yaremche managers
Footballers from Ivano-Frankivsk Oblast
|
```xml
/*
* @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.
*/
// TypeScript Version: 4.1
/**
* Tests if a double-precision floating-point numeric value is a nonpositive finite number.
*
* @param x - value to test
* @returns boolean indicating whether the value is a nonpositive finite number
*
* @example
* var bool = isNonPositiveFinite( -3.14 );
* // returns true
*
* @example
* var bool = isNonPositiveFinite( 0.0 );
* // returns true
*
* @example
* var bool = isNonPositiveFinite( -Infinity );
* // returns false
*
* @example
* var bool = isNonPositiveFinite( 3.14 );
* // returns false
*
* @example
* var bool = isNonPositiveFinite( NaN );
* // returns false
*/
declare function isNonPositiveFinite( x: number ): boolean;
// EXPORTS //
export = isNonPositiveFinite;
```
|
Buchanan Lake Village is an unincorporated community and census-designated place in Llano County, Texas, United States. Its population was 692 as of the 2010 census.
Geography
According to the U.S. Census Bureau, the community has an area of ; of its area is land, and is water.
The community is situated on the shores of Lake Buchanan.
References
Unincorporated communities in Llano County, Texas
Unincorporated communities in Texas
Census-designated places in Llano County, Texas
Census-designated places in Texas
|
```rust
use crate::exceptions::{IOError, RunnerError};
use chrono::prelude::*;
use serde::{Deserialize, Serialize};
use serde_with::{DeserializeFromStr, SerializeDisplay};
use std::fmt::Display;
use std::path::PathBuf;
use std::str::FromStr;
use std::{cmp, fmt};
// `HyperfineCmd` defines a command that we want to measure with hyperfine
#[derive(Debug, Clone)]
pub struct HyperfineCmd<'a> {
pub name: &'a str,
pub prepare: &'a str,
pub cmd: &'a str,
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Hash)]
pub struct Metric {
pub name: String,
pub project_name: String,
}
impl FromStr for Metric {
type Err = RunnerError;
fn from_str(s: &str) -> Result<Self, Self::Err> {
let split: Vec<&str> = s.split(Metric::sep()).collect();
match &split[..] {
[name, project] => Ok(Metric {
name: name.to_string(),
project_name: project.to_string(),
}),
_ => Err(RunnerError::MetricParseFail(s.to_owned())),
}
}
}
impl Metric {
pub fn sep() -> &'static str {
"___"
}
// encodes the metric name and project in the filename for the hyperfine output.
pub fn filename(&self) -> String {
format!("{}{}{}.json", self.name, Metric::sep(), self.project_name)
}
}
// This type exactly matches the type of array elements
// from hyperfine's output. Deriving `Serialize` and `Deserialize`
// gives us read and write capabilities via json_serde.
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct Measurement {
pub command: String,
pub mean: f64,
pub stddev: f64,
pub median: f64,
pub user: f64,
pub system: f64,
pub min: f64,
pub max: f64,
pub times: Vec<f64>,
}
// This type exactly matches the type of hyperfine's output.
// Deriving `Serialize` and `Deserialize` gives us read and
// write capabilities via json_serde.
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct Measurements {
pub results: Vec<Measurement>,
}
// struct representation for "major.minor.patch" version.
// useful for ordering versions to get the latest
#[derive(
Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, DeserializeFromStr, SerializeDisplay,
)]
pub struct Version {
pub major: i32,
pub minor: i32,
pub patch: i32,
}
impl FromStr for Version {
type Err = RunnerError;
// TODO: right now this only parses versions in the form "1.1.1"
// but it could also easily also parse the form "v1.1.1" so dropping the v
// doesn't have to be done in the action.
fn from_str(s: &str) -> Result<Self, Self::Err> {
let ints: Vec<i32> = s
.split(".")
.map(|x| x.parse::<i32>())
.collect::<Result<Vec<i32>, <i32 as FromStr>::Err>>()
.or_else(|_| Err(RunnerError::VersionParseFail(s.to_owned())))?;
match ints[..] {
[major, minor, patch] => Ok(Version {
major: major,
minor: minor,
patch: patch,
}),
_ => Err(RunnerError::VersionParseFail(s.to_owned())),
}
}
}
impl Version {
#[cfg(test)]
pub fn new(major: i32, minor: i32, patch: i32) -> Version {
Version {
major: major,
minor: minor,
patch: patch,
}
}
}
// A model for a single project-command pair
// modeling a version at release time will populate a directory with many of these
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct Baseline {
pub version: Version,
pub metric: Metric,
pub ts: DateTime<Utc>,
pub measurement: Measurement,
}
impl PartialOrd for Baseline {
fn partial_cmp(&self, other: &Self) -> Option<cmp::Ordering> {
Some(self.version.cmp(&other.version))
}
}
// A JSON structure outputted by the release process that contains
// a history of all previous version baseline measurements.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Sample {
pub metric: Metric,
pub value: f64,
pub ts: DateTime<Utc>,
}
impl Sample {
pub fn from_measurement(
path: &PathBuf,
measurement: &Measurement,
ts: DateTime<Utc>,
) -> Result<Sample, RunnerError> {
// `file_name` is boop___proj.json. `file_stem` is boop___proj.
let filestem = path.file_stem().map_or_else(
|| Err(IOError::BadFilestemError(path.clone())),
|stem| Ok(stem.to_string_lossy().to_string()),
)?;
let metric = Metric::from_str(&filestem)?;
// TODO use result values not panics
match &measurement.times[..] {
[] => panic!("found a sample with no measurement"),
[x] => Ok(Sample {
metric: metric,
value: *x,
ts: ts,
}),
// TODO this is only while we're taking two runs at a time. should be one.
[x, _] => Ok(Sample {
metric: metric,
value: *x,
ts: ts,
}),
_ => panic!("found a sample with too many measurements!"),
}
}
}
// The full output from a comparison between runs on the baseline
// and dev branches.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Calculation {
pub version: Version,
pub metric: Metric,
pub regression: bool,
pub ts: DateTime<Utc>,
pub sigma: f64,
pub mean: f64,
pub stddev: f64,
pub threshold: f64,
pub sample: f64,
}
// This display instance is used to derive Serialize as well via `SerializeDisplay`
impl Display for Version {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "{}.{}.{}", self.major, self.minor, self.patch)
}
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn assert_version_order() {
// for each pair, assert that the left one is bigger than the right one
let pairs = [
((1, 0, 0), (0, 20, 0)),
((1, 0, 1), (1, 0, 0)),
((1, 0, 9), (0, 20, 0)),
((1, 0, 9), (0, 0, 4)),
((1, 1, 0), (1, 0, 99)),
];
for (big, small) in pairs {
let bigv = Version::new(big.0, big.1, big.2);
let smallv = Version::new(small.0, small.1, small.2);
assert!(cmp::max(bigv, smallv) == bigv)
}
}
}
```
|
```javascript
import Icon from '../components/Icon.vue'
Icon.register({
'thermometer-full': {
width: 256,
height: 512,
paths: [
{
d: 'M224 96v203.3c19.9 22.6 32 52.2 32 84.7 0 70.7-57.3 128-128 128-0.3 0-0.6 0-0.9 0-70.3-0.5-127.4-58.4-127.1-128.7 0.2-32.2 12.2-61.6 32-84v-203.3c0-53 43-96 96-96s96 43 96 96zM128 464c44.1 0 80-35.9 80-80 0-34.3-19.4-52.2-32-66.5v-221.5c0-26.5-21.5-48-48-48s-48 21.5-48 48v221.5c-12.7 14.4-31.8 32.1-32 66.1-0.2 43.9 35.6 80.1 79.4 80.4zM192 384c0 35.3-28.7 64-64 64s-64-28.7-64-64c0-23.7 12.9-44.3 32-55.4v-232.6c0-17.7 14.3-32 32-32s32 14.3 32 32v232.6c19.1 11.1 32 31.7 32 55.4z'
}
]
}
})
```
|
Paul Fennell is a male retired British cyclist.
Cycling career
He represented England in the 10 miles scratch race, the 1 Km time trial and the 4,000 metres team pursuit, at the 1978 Commonwealth Games in Edmonton, Alberta, Canada and was part of the bronze medal pursuit winning team that consisted of Tony James, Tony Doyle and Glen Mitchell.
He won one National Championship in 1974.
References
Living people
British male cyclists
Commonwealth Games medallists in cycling
Commonwealth Games bronze medallists for England
Cyclists at the 1978 Commonwealth Games
Year of birth missing (living people)
20th-century British people
Medallists at the 1978 Commonwealth Games
|
The was the youngest of the four shinnōke, branches of the Imperial Family of Japan which were eligible to succeed to the Chrysanthemum Throne in the event that the main line should die out. It was founded by Prince Naohito, the son of Emperor Higashiyama.
Fearing extinction of the Imperial Line, Arai Hakuseki proposed that a new branch of the Imperial Family be created. In 1718, retired emperor Reigen bestowed upon his grandson the title of Kan'in-no-miya and land worth 1000 koku. This was the first new shinnōke formed since the Arisugawa-no-miya lineage in 1625.
The name Kan'in-no-miya is thought to have come from the title of Prince Sadamoto, a son of the Heian-era Emperor Seiwa.
Arai Hakusei's wisdom was soon proved with the second Kan'in-no-miya, Sukehito shinnō. When Emperor Go-Momozono died, he had only a single daughter. Sukehito's son was chosen to become Emperor Kōkaku.
The Kan'in House became extinct upon the death of its 5th head, Prince Kan'in Naruhito, in 1842, but was revived by Emperor Meiji, who assigned the name to Prince Kotohito, 16th son of Prince Fushimi Kuniie (one of the other shinnoke houses).
The line became extinct again with the death of his son, Kan'in Sumihito (formerly Kan'in-no-miya Haruhito shinnō) in 1988.
References
Keane, Donald. Emperor Of Japan: Meiji And His World, 1852-1912. Columbia University Press (2005).
Lebra, Sugiyama Takie. Above the Clouds: Status Culture of the Modern Japanese Nobility. University of California Press (1995).
Japanese nobility
|
Loïc Abenzoar (born 14 February 1989) is a retired French footballer who played as a right-back. He is a France youth international having earned caps with all of the youth teams beginning with the under-16 team.
Career
Abenzoar joined Lyon, his hometown club, in 2000. On 12 June 2009, he signed his first professional contract agreeing to a three-year deal.
He made his professional debut on 14 August 2010 in a league match against Lens, while playing on loan with Arles-Avignon. He went from Hønefoss, Norway in 2014 to Fredrikstad, Norway on 17 March 2015 In November 2016 he joined Villefranche.
Later career
In August 2019, Abenzoar was hired as a fitness coach for Lyon's B team.
Career statistics
References
External links
Loïc Abenzoar profile at olweb.fr
1989 births
Living people
French men's footballers
Footballers from Lyon
Olympique Lyonnais players
AC Arlésien players
Vannes OC players
Ligue 1 players
Championnat National players
Championnat National 2 players
Hønefoss BK players
Fredrikstad FK players
FC Villefranche Beaujolais players
Norwegian First Division players
France men's youth international footballers
Competitors at the 2009 Mediterranean Games
Men's association football fullbacks
Mediterranean Games competitors for France
|
```javascript
var express = require('express'),
webpack = require('webpack'),
// favicon = require('express-favicon'),
config = require('./webpack.dev.conf'),
app = express();
var compiler = webpack(config);
// for highly stable resources
app.use('/static', express.static(config.commonPath.staticDir));
// app.use(favicon(path.join(__dirname, '../favicon.ico')));
// handle fallback for HTML5 history API
app.use(require('connect-history-api-fallback')());
// serve webpack bundle output
app.use(require('webpack-dev-middleware')(compiler, {
noInfo: true,
publicPath: config.output.publicPath
}));
// enable hot-reload and state-preserving
// compilation error display
app.use(require('webpack-hot-middleware')(compiler));
app.listen(9000, '127.0.0.1', function(err) {
err && console.log(err);
});
```
|
Mattawoman Creek is a coastal-plain tributary to the tidal Potomac River with a mouth at Indian Head, Maryland, downstream of Washington, D.C. It comprises a river flowing through Prince George's and Charles counties and a tidal-freshwater estuary in Charles County. About three-fourths of its watershed lies in Charles County, with the remainder in Prince George's County immediately to the north.
History
Mattawoman appears on Capt. John Smith's circa-1608 map as Mataughquamend, an Algonquian compound translated as “where one goes pleasantly.” Today, Mattawoman Creek is listed by the Environmental Protection Agency (EPA) as impaired under Section 303(d) of the Clean Water Act for excess nutrients, sediment, and loss of living resources. At the same time, because it is the southernmost Potomac River freshwater estuary in Maryland, Mattawoman has escaped much of the degradation associated with urbanization spreading from Washington, D.C. It retains noteworthy biodiversity.
Fish
Assessments of fish communities throughout the Chesapeake Bay system by the Maryland Department of Natural Resources find the Mattawoman estuary to be the most productive of sampled tributaries for migratory fish. Especially abundant are anadromous alewife, blueback herring and American shad and semi-anadromous white and yellow perch. The largemouth bass, a resident gamefish that supports an active recreational fishery in the tidal freshwater Potomac River and its tributaries, also achieves high concentrations in the estuary. On the basis of fish assessments, Maryland fisheries biologists have concluded that Mattawoman represents as near to ideal conditions as can be found in the northern Chesapeake Bay, perhaps unattainable in other systems, and should be protected from overdevelopment.
Marshes
The estuary supports extensive freshwater tidal marshes that are partially protected as Maryland Wildlands and as Natural Environment Areas. Palustrine wetlands are concentrated in the broad stream valley of the fluvial reaches, where a site with the greatest species richness of amphibians and reptiles in Maryland has been identified by the Department of Natural Resources.
Watershed
Mattawoman drains the town of Indian Head, the town of Bryans Road, and most of Waldorf, the largest community in Charles County. Its watershed remains over 50% forested, but it is approaching a 10% impervious cover, often cited as a threshold for significant degradation as measured by water quality and species diversity. Continued loss of forest and increases in impervious cover are anticipated, as most of the watershed in Charles County falls within a designated development district, which at about (214 km2) is larger than Washington D.C. (61 square miles; 158 km2). With respect to projected growth, the Mattawoman Creek Watershed Management Plan authored by the U.S. Army Corps of Engineers notes that [t]hese intense development practices would have severe repercussions on the biological community and would decrease the habitat quality within the estuary.
Natural resources
The quality of Mattawoman’s living resources are acknowledged by Charles County government, while the juxtaposition of high quality and high vulnerability to development are recognized by state and federal agencies. For example, the Mattawoman Creek Watershed Management Plan states: The Mattawoman Creek represents an important natural resource, with a diverse network of forests, tributaries, and wetlands, providing tremendous fish and wildlife habitat. The ecological integrity of the Mattawoman is at risk from current and future development pressures within the watershed. The juxtaposition of value and vulnerability has caused the creek and its watershed to become a focal point for regional and local conservation organizations that work to restore the Chesapeake Bay in the face of growing urbanization, which studies find contribute to the decline of the Bay.
Highway crossing proposals
Proposals for two four-lane highways that would cross the fluvial stream, and the expected attendant development, generated debate. The first, the Western Waldorf Bypass, is one of three alternatives being considered by state and federal agencies for the U.S. 301 Waldorf-Area Transportation Improvements Project. This highway would have divided lengthwise about one-half of the Mattawoman watershed. The second, for which controversial wetlands permit applications were submitted, was a proposed extension of Charles County’s Cross County Connector, which would have crossed the width of the watershed. In 2012 the Army Corps of Engineers denied the wetlands permit application, ending the proposal.
Variant names
According to the Geographic Names Information System, Mattawoman Creek has also been known by the following names.
Mataughquamend
Matawoman Creeke
Matawomen Creeke
Mattawomans Creek
Mattawomen Creek
Pangayo
Saint Thomas Creeke
Zachia Swamp
See also
List of Maryland rivers
References
External links
Mattawoman Creek Watershed
Stream data
USGS 01658000 Mattawoman Creek Near Pomonkey, MD
Rivers of Maryland
Rivers of Charles County, Maryland
Rivers of Prince George's County, Maryland
Tributaries of the Potomac River
|
AAR CORP. is a private provider of aviation services.
AAR is headquartered in Wood Dale, Illinois, a Chicago suburb near O'Hare International Airport. The company employs 4,700 people worldwide.
History
AAR Corp was founded in 1951.
I.A. Allen Industrial was incorporated in 1955, renamed Allen Aircraft Radio in 1962, and became AAR CORP. in 1970. The company was founded by Ira A. Eichner. Also, in 1969, AAR began its aircraft maintenance business in Oklahoma City. In 1965, AAR expanded to Europe and opened a Singapore office in 1982.
AAR organized its Aircraft Turbine Center, Inc. in 1979 after future CEO David P. Storch, Eichner's son-in-law, joined the company.
David P. Storch was CEO from 1996 to 2018. In 2018, John M. Holmes became CEO.
In 2017, AAR was chosen as the prime contractor for a 15-year, $909 million landing gear award to provide total supply-chain management to support all U.S. Air Force and contractor requisitions received for all C-130, KC-135 & E-3 landing gear parts.
In September 2019, the U.S. Naval Air Systems Command awarded AAR a $118M contract for procuring, modifying, and delivering two C-40 aircraft to the U.S. Marine Corps.
During the Trump administration, AAR quadrupled its lobbying expenditures. The company spent large sums at Trump-owned properties with the intent to get Trump to view the company more favorably. From the time Trump took office until October 2020, AAR obtained 10 new federal contracts worth a total of $1.35 billion.
In response to the COVID-19 pandemic, AAR began using augmented reality in their warehouses to facilitate socially-distanced communications and conduct FAA site visits and audits. They are also piloting the use of drones to assist in inspections.
In March 2021, AAR publicly announced the first all-female class of technicians in training at Miami International Airport.
In April 2021, AAR signed a multi-year agreement with United Airlines to provide heavy maintenance services in Rockford, Illinois. AAR plans to add up to 250 more aviation maintenance technician (AMT) jobs at the facility to meet increased demand from United.
AAR is working with Embry-Riddle Aeronautical University in developing the first maintenance SkillBridge program. AAR has partnered with VIPER (Veteran Internships Providing Employment Readiness) to train veterans for careers in the aviation industry.
Financial Trends
Annual financial highlights (U.S. Dollars in millions except per share data):
See also
List of S&P 600 companies
References
External links
Companies listed on the New York Stock Exchange
Aircraft engineering companies
Aerospace companies of the United States
American companies established in 1951
Transport companies established in 1951
Companies based in DuPage County, Illinois
Defense companies of the United States
1951 establishments in Illinois
|
```rust
//! A horizontal bar on the screen.
use std::cmp::min;
use std::sync::Arc;
use termwiz::cell::CellAttributes;
use termwiz::color::AnsiColor;
use termwiz::surface::change::Change;
use termwiz::surface::Position;
use unicode_width::UnicodeWidthStr;
use crate::util;
/// A horizontal bar on the screen, e.g. the ruler or search bar.
pub(crate) struct Bar {
left_items: Vec<Arc<dyn BarItem>>,
right_items: Vec<Arc<dyn BarItem>>,
style: BarStyle,
}
/// An item in a bar.
pub(crate) trait BarItem {
fn width(&self) -> usize;
fn render(&self, changes: &mut Vec<Change>, width: usize);
}
/// The style of the bar. This mostly affects the default background color.
#[allow(unused)]
#[derive(Clone, Copy, Debug)]
pub(crate) enum BarStyle {
// A normal bar with a silver background.
Normal,
// An informational bar with a teal background.
Information,
// A warning bar with a yellow background.
Warning,
// An error bar with a red background.
Error,
}
impl BarStyle {
fn background_color(self) -> AnsiColor {
match self {
BarStyle::Normal => AnsiColor::Silver,
BarStyle::Information => AnsiColor::Teal,
BarStyle::Warning => AnsiColor::Olive,
BarStyle::Error => AnsiColor::Maroon,
}
}
}
impl Bar {
pub(crate) fn new(style: BarStyle) -> Self {
let left_items = Vec::new();
let right_items = Vec::new();
Bar {
left_items,
right_items,
style,
}
}
pub(crate) fn add_left_item(&mut self, item: Arc<dyn BarItem>) {
self.left_items.push(item);
}
pub(crate) fn add_right_item(&mut self, item: Arc<dyn BarItem>) {
self.right_items.push(item);
}
/// Render the bar to the given row on screen.
pub(crate) fn render(&self, changes: &mut Vec<Change>, row: usize, width: usize) {
changes.push(Change::CursorPosition {
x: Position::Absolute(0),
y: Position::Absolute(row),
});
let bar_attribs = CellAttributes::default()
.set_foreground(AnsiColor::Black)
.set_background(self.style.background_color())
.clone();
if width < 8 {
// The area is too small to write anything useful, just write a blank bar.
changes.push(Change::AllAttributes(bar_attribs));
changes.push(Change::ClearToEndOfLine(
self.style.background_color().into(),
));
return;
}
let padded_item_width = |item: &Arc<dyn BarItem>| match item.width() {
0 => 0,
w => w + 2,
};
let mut left_items_width = self.left_items.iter().map(padded_item_width).sum();
let mut right_items_width = self.right_items.iter().map(padded_item_width).sum();
// The right-hand side is shown only if it can fit.
if right_items_width + 2 > width {
// Show only left items.
right_items_width = 0;
left_items_width = min(left_items_width, width.saturating_sub(2));
} else {
// Show both items, truncating or padding the left items to the remaining width.
left_items_width = width.saturating_sub(right_items_width + 2);
}
changes.push(Change::AllAttributes(bar_attribs.clone()));
changes.push(Change::Text(String::from(" ")));
let rendered_left_width = self.render_items(
changes,
self.left_items.as_slice(),
left_items_width.saturating_sub(2),
);
if right_items_width > 0 {
changes.push(Change::AllAttributes(bar_attribs));
let gap = left_items_width.saturating_sub(rendered_left_width);
changes.push(Change::Text(" ".repeat(gap)));
self.render_items(changes, self.right_items.as_slice(), right_items_width);
}
changes.push(Change::ClearToEndOfLine(
self.style.background_color().into(),
));
}
fn render_items(
&self,
changes: &mut Vec<Change>,
items: &[Arc<dyn BarItem>],
width: usize,
) -> usize {
let mut rendered_width = 0;
for item in items.iter() {
let item_width = item.width().min(width.saturating_sub(rendered_width));
if item_width > 0 {
item.render(changes, item_width);
rendered_width += item_width;
let pad = min(width - rendered_width, 2);
changes.push(Change::Text(" ".repeat(pad)));
rendered_width += pad;
if rendered_width >= width {
break;
}
}
}
rendered_width
}
}
pub(crate) struct BarString(String);
impl BarString {
pub(crate) fn new(s: impl Into<String>) -> Self {
BarString(s.into())
}
}
impl BarItem for BarString {
fn width(&self) -> usize {
self.0.as_str().width()
}
fn render(&self, changes: &mut Vec<Change>, width: usize) {
changes.push(Change::Text(util::truncate_string(
self.0.as_str(),
0,
width,
)));
}
}
```
|
```xml
import {NodePath} from "../lib/node-path";
import {Context} from "../lib/path-visitor";
import {namedTypes} from "./namedTypes";
export interface Visitor<M = {}> {
visitPrintable?(this: Context & M, path: NodePath<namedTypes.Printable>): any;
visitSourceLocation?(this: Context & M, path: NodePath<namedTypes.SourceLocation>): any;
visitNode?(this: Context & M, path: NodePath<namedTypes.Node>): any;
visitComment?(this: Context & M, path: NodePath<namedTypes.Comment>): any;
visitPosition?(this: Context & M, path: NodePath<namedTypes.Position>): any;
visitFile?(this: Context & M, path: NodePath<namedTypes.File>): any;
visitProgram?(this: Context & M, path: NodePath<namedTypes.Program>): any;
visitStatement?(this: Context & M, path: NodePath<namedTypes.Statement>): any;
visitFunction?(this: Context & M, path: NodePath<namedTypes.Function>): any;
visitExpression?(this: Context & M, path: NodePath<namedTypes.Expression>): any;
visitPattern?(this: Context & M, path: NodePath<namedTypes.Pattern>): any;
visitIdentifier?(this: Context & M, path: NodePath<namedTypes.Identifier>): any;
visitBlockStatement?(this: Context & M, path: NodePath<namedTypes.BlockStatement>): any;
visitEmptyStatement?(this: Context & M, path: NodePath<namedTypes.EmptyStatement>): any;
visitExpressionStatement?(this: Context & M, path: NodePath<namedTypes.ExpressionStatement>): any;
visitIfStatement?(this: Context & M, path: NodePath<namedTypes.IfStatement>): any;
visitLabeledStatement?(this: Context & M, path: NodePath<namedTypes.LabeledStatement>): any;
visitBreakStatement?(this: Context & M, path: NodePath<namedTypes.BreakStatement>): any;
visitContinueStatement?(this: Context & M, path: NodePath<namedTypes.ContinueStatement>): any;
visitWithStatement?(this: Context & M, path: NodePath<namedTypes.WithStatement>): any;
visitSwitchStatement?(this: Context & M, path: NodePath<namedTypes.SwitchStatement>): any;
visitSwitchCase?(this: Context & M, path: NodePath<namedTypes.SwitchCase>): any;
visitReturnStatement?(this: Context & M, path: NodePath<namedTypes.ReturnStatement>): any;
visitThrowStatement?(this: Context & M, path: NodePath<namedTypes.ThrowStatement>): any;
visitTryStatement?(this: Context & M, path: NodePath<namedTypes.TryStatement>): any;
visitCatchClause?(this: Context & M, path: NodePath<namedTypes.CatchClause>): any;
visitWhileStatement?(this: Context & M, path: NodePath<namedTypes.WhileStatement>): any;
visitDoWhileStatement?(this: Context & M, path: NodePath<namedTypes.DoWhileStatement>): any;
visitForStatement?(this: Context & M, path: NodePath<namedTypes.ForStatement>): any;
visitDeclaration?(this: Context & M, path: NodePath<namedTypes.Declaration>): any;
visitVariableDeclaration?(this: Context & M, path: NodePath<namedTypes.VariableDeclaration>): any;
visitForInStatement?(this: Context & M, path: NodePath<namedTypes.ForInStatement>): any;
visitDebuggerStatement?(this: Context & M, path: NodePath<namedTypes.DebuggerStatement>): any;
visitFunctionDeclaration?(this: Context & M, path: NodePath<namedTypes.FunctionDeclaration>): any;
visitFunctionExpression?(this: Context & M, path: NodePath<namedTypes.FunctionExpression>): any;
visitVariableDeclarator?(this: Context & M, path: NodePath<namedTypes.VariableDeclarator>): any;
visitThisExpression?(this: Context & M, path: NodePath<namedTypes.ThisExpression>): any;
visitArrayExpression?(this: Context & M, path: NodePath<namedTypes.ArrayExpression>): any;
visitObjectExpression?(this: Context & M, path: NodePath<namedTypes.ObjectExpression>): any;
visitProperty?(this: Context & M, path: NodePath<namedTypes.Property>): any;
visitLiteral?(this: Context & M, path: NodePath<namedTypes.Literal>): any;
visitSequenceExpression?(this: Context & M, path: NodePath<namedTypes.SequenceExpression>): any;
visitUnaryExpression?(this: Context & M, path: NodePath<namedTypes.UnaryExpression>): any;
visitBinaryExpression?(this: Context & M, path: NodePath<namedTypes.BinaryExpression>): any;
visitAssignmentExpression?(this: Context & M, path: NodePath<namedTypes.AssignmentExpression>): any;
visitMemberExpression?(this: Context & M, path: NodePath<namedTypes.MemberExpression>): any;
visitUpdateExpression?(this: Context & M, path: NodePath<namedTypes.UpdateExpression>): any;
visitLogicalExpression?(this: Context & M, path: NodePath<namedTypes.LogicalExpression>): any;
visitConditionalExpression?(this: Context & M, path: NodePath<namedTypes.ConditionalExpression>): any;
visitNewExpression?(this: Context & M, path: NodePath<namedTypes.NewExpression>): any;
visitCallExpression?(this: Context & M, path: NodePath<namedTypes.CallExpression>): any;
visitRestElement?(this: Context & M, path: NodePath<namedTypes.RestElement>): any;
visitTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.TypeAnnotation>): any;
visitTSTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.TSTypeAnnotation>): any;
visitSpreadElementPattern?(this: Context & M, path: NodePath<namedTypes.SpreadElementPattern>): any;
visitArrowFunctionExpression?(this: Context & M, path: NodePath<namedTypes.ArrowFunctionExpression>): any;
visitForOfStatement?(this: Context & M, path: NodePath<namedTypes.ForOfStatement>): any;
visitYieldExpression?(this: Context & M, path: NodePath<namedTypes.YieldExpression>): any;
visitGeneratorExpression?(this: Context & M, path: NodePath<namedTypes.GeneratorExpression>): any;
visitComprehensionBlock?(this: Context & M, path: NodePath<namedTypes.ComprehensionBlock>): any;
visitComprehensionExpression?(this: Context & M, path: NodePath<namedTypes.ComprehensionExpression>): any;
visitObjectProperty?(this: Context & M, path: NodePath<namedTypes.ObjectProperty>): any;
visitPropertyPattern?(this: Context & M, path: NodePath<namedTypes.PropertyPattern>): any;
visitObjectPattern?(this: Context & M, path: NodePath<namedTypes.ObjectPattern>): any;
visitArrayPattern?(this: Context & M, path: NodePath<namedTypes.ArrayPattern>): any;
visitMethodDefinition?(this: Context & M, path: NodePath<namedTypes.MethodDefinition>): any;
visitSpreadElement?(this: Context & M, path: NodePath<namedTypes.SpreadElement>): any;
visitAssignmentPattern?(this: Context & M, path: NodePath<namedTypes.AssignmentPattern>): any;
visitClassPropertyDefinition?(this: Context & M, path: NodePath<namedTypes.ClassPropertyDefinition>): any;
visitClassProperty?(this: Context & M, path: NodePath<namedTypes.ClassProperty>): any;
visitClassBody?(this: Context & M, path: NodePath<namedTypes.ClassBody>): any;
visitClassDeclaration?(this: Context & M, path: NodePath<namedTypes.ClassDeclaration>): any;
visitClassExpression?(this: Context & M, path: NodePath<namedTypes.ClassExpression>): any;
visitSpecifier?(this: Context & M, path: NodePath<namedTypes.Specifier>): any;
visitModuleSpecifier?(this: Context & M, path: NodePath<namedTypes.ModuleSpecifier>): any;
visitImportSpecifier?(this: Context & M, path: NodePath<namedTypes.ImportSpecifier>): any;
visitImportNamespaceSpecifier?(this: Context & M, path: NodePath<namedTypes.ImportNamespaceSpecifier>): any;
visitImportDefaultSpecifier?(this: Context & M, path: NodePath<namedTypes.ImportDefaultSpecifier>): any;
visitImportDeclaration?(this: Context & M, path: NodePath<namedTypes.ImportDeclaration>): any;
visitTaggedTemplateExpression?(this: Context & M, path: NodePath<namedTypes.TaggedTemplateExpression>): any;
visitTemplateLiteral?(this: Context & M, path: NodePath<namedTypes.TemplateLiteral>): any;
visitTemplateElement?(this: Context & M, path: NodePath<namedTypes.TemplateElement>): any;
visitSpreadProperty?(this: Context & M, path: NodePath<namedTypes.SpreadProperty>): any;
visitSpreadPropertyPattern?(this: Context & M, path: NodePath<namedTypes.SpreadPropertyPattern>): any;
visitAwaitExpression?(this: Context & M, path: NodePath<namedTypes.AwaitExpression>): any;
visitJSXAttribute?(this: Context & M, path: NodePath<namedTypes.JSXAttribute>): any;
visitJSXIdentifier?(this: Context & M, path: NodePath<namedTypes.JSXIdentifier>): any;
visitJSXNamespacedName?(this: Context & M, path: NodePath<namedTypes.JSXNamespacedName>): any;
visitJSXExpressionContainer?(this: Context & M, path: NodePath<namedTypes.JSXExpressionContainer>): any;
visitJSXMemberExpression?(this: Context & M, path: NodePath<namedTypes.JSXMemberExpression>): any;
visitJSXSpreadAttribute?(this: Context & M, path: NodePath<namedTypes.JSXSpreadAttribute>): any;
visitJSXElement?(this: Context & M, path: NodePath<namedTypes.JSXElement>): any;
visitJSXOpeningElement?(this: Context & M, path: NodePath<namedTypes.JSXOpeningElement>): any;
visitJSXClosingElement?(this: Context & M, path: NodePath<namedTypes.JSXClosingElement>): any;
visitJSXFragment?(this: Context & M, path: NodePath<namedTypes.JSXFragment>): any;
visitJSXText?(this: Context & M, path: NodePath<namedTypes.JSXText>): any;
visitJSXOpeningFragment?(this: Context & M, path: NodePath<namedTypes.JSXOpeningFragment>): any;
visitJSXClosingFragment?(this: Context & M, path: NodePath<namedTypes.JSXClosingFragment>): any;
visitJSXEmptyExpression?(this: Context & M, path: NodePath<namedTypes.JSXEmptyExpression>): any;
visitJSXSpreadChild?(this: Context & M, path: NodePath<namedTypes.JSXSpreadChild>): any;
visitTypeParameterDeclaration?(this: Context & M, path: NodePath<namedTypes.TypeParameterDeclaration>): any;
visitTSTypeParameterDeclaration?(this: Context & M, path: NodePath<namedTypes.TSTypeParameterDeclaration>): any;
visitTypeParameterInstantiation?(this: Context & M, path: NodePath<namedTypes.TypeParameterInstantiation>): any;
visitTSTypeParameterInstantiation?(this: Context & M, path: NodePath<namedTypes.TSTypeParameterInstantiation>): any;
visitClassImplements?(this: Context & M, path: NodePath<namedTypes.ClassImplements>): any;
visitTSType?(this: Context & M, path: NodePath<namedTypes.TSType>): any;
visitTSHasOptionalTypeParameterInstantiation?(this: Context & M, path: NodePath<namedTypes.TSHasOptionalTypeParameterInstantiation>): any;
visitTSExpressionWithTypeArguments?(this: Context & M, path: NodePath<namedTypes.TSExpressionWithTypeArguments>): any;
visitFlow?(this: Context & M, path: NodePath<namedTypes.Flow>): any;
visitFlowType?(this: Context & M, path: NodePath<namedTypes.FlowType>): any;
visitAnyTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.AnyTypeAnnotation>): any;
visitEmptyTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.EmptyTypeAnnotation>): any;
visitMixedTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.MixedTypeAnnotation>): any;
visitVoidTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.VoidTypeAnnotation>): any;
visitNumberTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.NumberTypeAnnotation>): any;
visitNumberLiteralTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.NumberLiteralTypeAnnotation>): any;
visitNumericLiteralTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.NumericLiteralTypeAnnotation>): any;
visitStringTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.StringTypeAnnotation>): any;
visitStringLiteralTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.StringLiteralTypeAnnotation>): any;
visitBooleanTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.BooleanTypeAnnotation>): any;
visitBooleanLiteralTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.BooleanLiteralTypeAnnotation>): any;
visitNullableTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.NullableTypeAnnotation>): any;
visitNullLiteralTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.NullLiteralTypeAnnotation>): any;
visitNullTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.NullTypeAnnotation>): any;
visitThisTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.ThisTypeAnnotation>): any;
visitExistsTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.ExistsTypeAnnotation>): any;
visitExistentialTypeParam?(this: Context & M, path: NodePath<namedTypes.ExistentialTypeParam>): any;
visitFunctionTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.FunctionTypeAnnotation>): any;
visitFunctionTypeParam?(this: Context & M, path: NodePath<namedTypes.FunctionTypeParam>): any;
visitArrayTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.ArrayTypeAnnotation>): any;
visitObjectTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.ObjectTypeAnnotation>): any;
visitObjectTypeProperty?(this: Context & M, path: NodePath<namedTypes.ObjectTypeProperty>): any;
visitObjectTypeSpreadProperty?(this: Context & M, path: NodePath<namedTypes.ObjectTypeSpreadProperty>): any;
visitObjectTypeIndexer?(this: Context & M, path: NodePath<namedTypes.ObjectTypeIndexer>): any;
visitObjectTypeCallProperty?(this: Context & M, path: NodePath<namedTypes.ObjectTypeCallProperty>): any;
visitObjectTypeInternalSlot?(this: Context & M, path: NodePath<namedTypes.ObjectTypeInternalSlot>): any;
visitVariance?(this: Context & M, path: NodePath<namedTypes.Variance>): any;
visitQualifiedTypeIdentifier?(this: Context & M, path: NodePath<namedTypes.QualifiedTypeIdentifier>): any;
visitGenericTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.GenericTypeAnnotation>): any;
visitMemberTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.MemberTypeAnnotation>): any;
visitUnionTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.UnionTypeAnnotation>): any;
visitIntersectionTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.IntersectionTypeAnnotation>): any;
visitTypeofTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.TypeofTypeAnnotation>): any;
visitTypeParameter?(this: Context & M, path: NodePath<namedTypes.TypeParameter>): any;
visitInterfaceTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.InterfaceTypeAnnotation>): any;
visitInterfaceExtends?(this: Context & M, path: NodePath<namedTypes.InterfaceExtends>): any;
visitInterfaceDeclaration?(this: Context & M, path: NodePath<namedTypes.InterfaceDeclaration>): any;
visitDeclareInterface?(this: Context & M, path: NodePath<namedTypes.DeclareInterface>): any;
visitTypeAlias?(this: Context & M, path: NodePath<namedTypes.TypeAlias>): any;
visitOpaqueType?(this: Context & M, path: NodePath<namedTypes.OpaqueType>): any;
visitDeclareTypeAlias?(this: Context & M, path: NodePath<namedTypes.DeclareTypeAlias>): any;
visitDeclareOpaqueType?(this: Context & M, path: NodePath<namedTypes.DeclareOpaqueType>): any;
visitTypeCastExpression?(this: Context & M, path: NodePath<namedTypes.TypeCastExpression>): any;
visitTupleTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.TupleTypeAnnotation>): any;
visitDeclareVariable?(this: Context & M, path: NodePath<namedTypes.DeclareVariable>): any;
visitDeclareFunction?(this: Context & M, path: NodePath<namedTypes.DeclareFunction>): any;
visitDeclareClass?(this: Context & M, path: NodePath<namedTypes.DeclareClass>): any;
visitDeclareModule?(this: Context & M, path: NodePath<namedTypes.DeclareModule>): any;
visitDeclareModuleExports?(this: Context & M, path: NodePath<namedTypes.DeclareModuleExports>): any;
visitDeclareExportDeclaration?(this: Context & M, path: NodePath<namedTypes.DeclareExportDeclaration>): any;
visitExportSpecifier?(this: Context & M, path: NodePath<namedTypes.ExportSpecifier>): any;
visitExportBatchSpecifier?(this: Context & M, path: NodePath<namedTypes.ExportBatchSpecifier>): any;
visitDeclareExportAllDeclaration?(this: Context & M, path: NodePath<namedTypes.DeclareExportAllDeclaration>): any;
visitFlowPredicate?(this: Context & M, path: NodePath<namedTypes.FlowPredicate>): any;
visitInferredPredicate?(this: Context & M, path: NodePath<namedTypes.InferredPredicate>): any;
visitDeclaredPredicate?(this: Context & M, path: NodePath<namedTypes.DeclaredPredicate>): any;
visitExportDeclaration?(this: Context & M, path: NodePath<namedTypes.ExportDeclaration>): any;
visitBlock?(this: Context & M, path: NodePath<namedTypes.Block>): any;
visitLine?(this: Context & M, path: NodePath<namedTypes.Line>): any;
visitNoop?(this: Context & M, path: NodePath<namedTypes.Noop>): any;
visitDoExpression?(this: Context & M, path: NodePath<namedTypes.DoExpression>): any;
visitSuper?(this: Context & M, path: NodePath<namedTypes.Super>): any;
visitBindExpression?(this: Context & M, path: NodePath<namedTypes.BindExpression>): any;
visitDecorator?(this: Context & M, path: NodePath<namedTypes.Decorator>): any;
visitMetaProperty?(this: Context & M, path: NodePath<namedTypes.MetaProperty>): any;
visitParenthesizedExpression?(this: Context & M, path: NodePath<namedTypes.ParenthesizedExpression>): any;
visitExportDefaultDeclaration?(this: Context & M, path: NodePath<namedTypes.ExportDefaultDeclaration>): any;
visitExportNamedDeclaration?(this: Context & M, path: NodePath<namedTypes.ExportNamedDeclaration>): any;
visitExportNamespaceSpecifier?(this: Context & M, path: NodePath<namedTypes.ExportNamespaceSpecifier>): any;
visitExportDefaultSpecifier?(this: Context & M, path: NodePath<namedTypes.ExportDefaultSpecifier>): any;
visitExportAllDeclaration?(this: Context & M, path: NodePath<namedTypes.ExportAllDeclaration>): any;
visitCommentBlock?(this: Context & M, path: NodePath<namedTypes.CommentBlock>): any;
visitCommentLine?(this: Context & M, path: NodePath<namedTypes.CommentLine>): any;
visitDirective?(this: Context & M, path: NodePath<namedTypes.Directive>): any;
visitDirectiveLiteral?(this: Context & M, path: NodePath<namedTypes.DirectiveLiteral>): any;
visitInterpreterDirective?(this: Context & M, path: NodePath<namedTypes.InterpreterDirective>): any;
visitStringLiteral?(this: Context & M, path: NodePath<namedTypes.StringLiteral>): any;
visitNumericLiteral?(this: Context & M, path: NodePath<namedTypes.NumericLiteral>): any;
visitBigIntLiteral?(this: Context & M, path: NodePath<namedTypes.BigIntLiteral>): any;
visitNullLiteral?(this: Context & M, path: NodePath<namedTypes.NullLiteral>): any;
visitBooleanLiteral?(this: Context & M, path: NodePath<namedTypes.BooleanLiteral>): any;
visitRegExpLiteral?(this: Context & M, path: NodePath<namedTypes.RegExpLiteral>): any;
visitObjectMethod?(this: Context & M, path: NodePath<namedTypes.ObjectMethod>): any;
visitClassPrivateProperty?(this: Context & M, path: NodePath<namedTypes.ClassPrivateProperty>): any;
visitClassMethod?(this: Context & M, path: NodePath<namedTypes.ClassMethod>): any;
visitClassPrivateMethod?(this: Context & M, path: NodePath<namedTypes.ClassPrivateMethod>): any;
visitPrivateName?(this: Context & M, path: NodePath<namedTypes.PrivateName>): any;
visitRestProperty?(this: Context & M, path: NodePath<namedTypes.RestProperty>): any;
visitForAwaitStatement?(this: Context & M, path: NodePath<namedTypes.ForAwaitStatement>): any;
visitImport?(this: Context & M, path: NodePath<namedTypes.Import>): any;
visitTSQualifiedName?(this: Context & M, path: NodePath<namedTypes.TSQualifiedName>): any;
visitTSTypeReference?(this: Context & M, path: NodePath<namedTypes.TSTypeReference>): any;
visitTSHasOptionalTypeParameters?(this: Context & M, path: NodePath<namedTypes.TSHasOptionalTypeParameters>): any;
visitTSHasOptionalTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.TSHasOptionalTypeAnnotation>): any;
visitTSAsExpression?(this: Context & M, path: NodePath<namedTypes.TSAsExpression>): any;
visitTSNonNullExpression?(this: Context & M, path: NodePath<namedTypes.TSNonNullExpression>): any;
visitTSAnyKeyword?(this: Context & M, path: NodePath<namedTypes.TSAnyKeyword>): any;
visitTSBigIntKeyword?(this: Context & M, path: NodePath<namedTypes.TSBigIntKeyword>): any;
visitTSBooleanKeyword?(this: Context & M, path: NodePath<namedTypes.TSBooleanKeyword>): any;
visitTSNeverKeyword?(this: Context & M, path: NodePath<namedTypes.TSNeverKeyword>): any;
visitTSNullKeyword?(this: Context & M, path: NodePath<namedTypes.TSNullKeyword>): any;
visitTSNumberKeyword?(this: Context & M, path: NodePath<namedTypes.TSNumberKeyword>): any;
visitTSObjectKeyword?(this: Context & M, path: NodePath<namedTypes.TSObjectKeyword>): any;
visitTSStringKeyword?(this: Context & M, path: NodePath<namedTypes.TSStringKeyword>): any;
visitTSSymbolKeyword?(this: Context & M, path: NodePath<namedTypes.TSSymbolKeyword>): any;
visitTSUndefinedKeyword?(this: Context & M, path: NodePath<namedTypes.TSUndefinedKeyword>): any;
visitTSUnknownKeyword?(this: Context & M, path: NodePath<namedTypes.TSUnknownKeyword>): any;
visitTSVoidKeyword?(this: Context & M, path: NodePath<namedTypes.TSVoidKeyword>): any;
visitTSThisType?(this: Context & M, path: NodePath<namedTypes.TSThisType>): any;
visitTSArrayType?(this: Context & M, path: NodePath<namedTypes.TSArrayType>): any;
visitTSLiteralType?(this: Context & M, path: NodePath<namedTypes.TSLiteralType>): any;
visitTSUnionType?(this: Context & M, path: NodePath<namedTypes.TSUnionType>): any;
visitTSIntersectionType?(this: Context & M, path: NodePath<namedTypes.TSIntersectionType>): any;
visitTSConditionalType?(this: Context & M, path: NodePath<namedTypes.TSConditionalType>): any;
visitTSInferType?(this: Context & M, path: NodePath<namedTypes.TSInferType>): any;
visitTSTypeParameter?(this: Context & M, path: NodePath<namedTypes.TSTypeParameter>): any;
visitTSParenthesizedType?(this: Context & M, path: NodePath<namedTypes.TSParenthesizedType>): any;
visitTSFunctionType?(this: Context & M, path: NodePath<namedTypes.TSFunctionType>): any;
visitTSConstructorType?(this: Context & M, path: NodePath<namedTypes.TSConstructorType>): any;
visitTSDeclareFunction?(this: Context & M, path: NodePath<namedTypes.TSDeclareFunction>): any;
visitTSDeclareMethod?(this: Context & M, path: NodePath<namedTypes.TSDeclareMethod>): any;
visitTSMappedType?(this: Context & M, path: NodePath<namedTypes.TSMappedType>): any;
visitTSTupleType?(this: Context & M, path: NodePath<namedTypes.TSTupleType>): any;
visitTSRestType?(this: Context & M, path: NodePath<namedTypes.TSRestType>): any;
visitTSOptionalType?(this: Context & M, path: NodePath<namedTypes.TSOptionalType>): any;
visitTSIndexedAccessType?(this: Context & M, path: NodePath<namedTypes.TSIndexedAccessType>): any;
visitTSTypeOperator?(this: Context & M, path: NodePath<namedTypes.TSTypeOperator>): any;
visitTSIndexSignature?(this: Context & M, path: NodePath<namedTypes.TSIndexSignature>): any;
visitTSPropertySignature?(this: Context & M, path: NodePath<namedTypes.TSPropertySignature>): any;
visitTSMethodSignature?(this: Context & M, path: NodePath<namedTypes.TSMethodSignature>): any;
visitTSTypePredicate?(this: Context & M, path: NodePath<namedTypes.TSTypePredicate>): any;
visitTSCallSignatureDeclaration?(this: Context & M, path: NodePath<namedTypes.TSCallSignatureDeclaration>): any;
visitTSConstructSignatureDeclaration?(this: Context & M, path: NodePath<namedTypes.TSConstructSignatureDeclaration>): any;
visitTSEnumMember?(this: Context & M, path: NodePath<namedTypes.TSEnumMember>): any;
visitTSTypeQuery?(this: Context & M, path: NodePath<namedTypes.TSTypeQuery>): any;
visitTSImportType?(this: Context & M, path: NodePath<namedTypes.TSImportType>): any;
visitTSTypeLiteral?(this: Context & M, path: NodePath<namedTypes.TSTypeLiteral>): any;
visitTSTypeAssertion?(this: Context & M, path: NodePath<namedTypes.TSTypeAssertion>): any;
visitTSEnumDeclaration?(this: Context & M, path: NodePath<namedTypes.TSEnumDeclaration>): any;
visitTSTypeAliasDeclaration?(this: Context & M, path: NodePath<namedTypes.TSTypeAliasDeclaration>): any;
visitTSModuleBlock?(this: Context & M, path: NodePath<namedTypes.TSModuleBlock>): any;
visitTSModuleDeclaration?(this: Context & M, path: NodePath<namedTypes.TSModuleDeclaration>): any;
visitTSImportEqualsDeclaration?(this: Context & M, path: NodePath<namedTypes.TSImportEqualsDeclaration>): any;
visitTSExternalModuleReference?(this: Context & M, path: NodePath<namedTypes.TSExternalModuleReference>): any;
visitTSExportAssignment?(this: Context & M, path: NodePath<namedTypes.TSExportAssignment>): any;
visitTSNamespaceExportDeclaration?(this: Context & M, path: NodePath<namedTypes.TSNamespaceExportDeclaration>): any;
visitTSInterfaceBody?(this: Context & M, path: NodePath<namedTypes.TSInterfaceBody>): any;
visitTSInterfaceDeclaration?(this: Context & M, path: NodePath<namedTypes.TSInterfaceDeclaration>): any;
visitTSParameterProperty?(this: Context & M, path: NodePath<namedTypes.TSParameterProperty>): any;
visitOptionalMemberExpression?(this: Context & M, path: NodePath<namedTypes.OptionalMemberExpression>): any;
visitOptionalCallExpression?(this: Context & M, path: NodePath<namedTypes.OptionalCallExpression>): any;
}
```
|
Impervious surfaces are mainly artificial structures—such as pavements (roads, sidewalks, driveways and parking lots, as well as industrial areas such as airports, ports and logistics and distribution centres, all of which use considerable paved areas) that are covered by water-resistant materials such as asphalt, concrete, brick, stone—and rooftops. Soils compacted by urban development are also highly impervious.
Environmental effects
Impervious surfaces are an environmental concern because their construction initiates a chain of events that modifies urban air and water resources:
The pavement materials seal the soil surface, eliminating rainwater infiltration and natural groundwater recharge. An article in the Seattle Times states that "while urban areas cover only 3 percent of the U.S., it is estimated that their runoff is the primary source of pollution in 13 percent of rivers, 18 percent of lakes and 32 percent of estuaries."
Some of these pollutants include excess nutrients from fertilizers; pathogens; pet waste; gasoline, motor oil and heavy metals from vehicles; high sediment loads from stream bed erosion and construction sites; and waste such as cigarette butts, 6-pack holders and plastic bags carried by surges of stormwater. In some cities, the flood waters get into combined sewers, causing them to overflow, flushing their raw sewage into streams. Polluted runoff can have many negative effects on fish, animals, plants and people.
Impervious surfaces collect solar heat in their dense mass. When the heat is released, it raises air temperatures, producing urban "heat islands", and increasing energy consumption in buildings. The warm runoff from impervious surfaces reduces dissolved oxygen in stream water, making life difficult in aquatic ecosystems.
Impervious pavements deprive tree roots of aeration, eliminating the "urban forest" and the canopy shade that would otherwise moderate urban climate. Because impervious surfaces displace living vegetation, they reduce ecological productivity, and interrupt atmospheric carbon cycling.
The total coverage by impervious surfaces in an area, such as a municipality or a watershed, is usually expressed as a percentage of the total land area. The coverage increases with rising urbanization. In rural areas, impervious cover may only be one or two percent. In residential areas, coverage increases from about 10 percent in low-density subdivisions to over 50 percent in multifamily communities. In industrial and commercial areas, coverage rises above 70 percent. In regional shopping centers and dense urban areas, it is over 90 percent. In the contiguous 48 states of the US, urban impervious cover adds up to . Development adds annually. Typically, two-thirds of the cover is pavements and one-third is building roofs.
Mitigation of environmental impacts
Impervious surface coverage can be limited by restricting land use density (such as a number of homes per acre in a subdivision), but this approach causes land elsewhere (outside the subdivision) to be developed, to accommodate the growing population. (See urban sprawl.) Alternatively, urban structures can be built differently to make them function more like naturally pervious soils; examples of such alternative structures are porous pavements, green roofs and infiltration basins.
Rainwater from impervious surfaces can be collected in rainwater tanks and used in place of main water. The island of Catalina located West of the Port of Long Beach has put extensive effort into capturing rainfall to minimize the cost of transportation from the mainland.
Partly in response to recent criticism by municipalities, a number of concrete manufacturers such as CEMEX and Quikrete have begun producing permeable materials which partly mitigate the environmental impact of conventional impervious concrete. These new materials are composed of various combinations of naturally derived solids including fine to coarse-grained rocks and minerals, organic matter (including living organisms), ice, weathered rock and precipitates, liquids (primarily water solutions), and gases. The COVID-19 pandemic gave birth to proposals for radical change in the organisation of the city, being the drastic reduction of the presence of impermeable surfaces and the recovery of the permeability of the soil one of the elements.
Percentage imperviousness
The percentage imperviousness, commonly referred to as PIMP in calculations, is an important factor when considering drainage of water. It is calculated by measuring the percentage of a catchment area which is made up of impervious surfaces such as roads, roofs and other paved surfaces. An estimation of PIMP is given by PIMP = 6.4J^0.5 where J is the number of dwellings per hectare (Butler and Davies 2000). For example, woodland has a PIMP value of 10%, whereas dense commercial areas have a PIMP value of 100%. This variable is used in the Flood Estimation Handbook.
Homer and others (2007) indicate that about 76 percent of the conterminous United States is classified as having less than 1 percent impervious cover, 11 percent with impervious cover of 1 to 10 percent, 4 percent with an estimated impervious cover of 11 to 20 percent, 4.4 percent with an estimated impervious cover of 21 to 40 percent, and about 4.4 percent with an estimated impervious cover greater than 40 percent.
Total impervious area
The total impervious area (TIA), commonly referred to as impervious cover (IC) in calculations, can be expressed as a fraction (from zero to one) or a percentage. There are many methods for estimating TIA, including the use of the National Land Cover Data Set (NLCD) with a Geographic information system (GIS), land-use categories with categorical TIA estimates, a generalized percent developed area, and relations between population density and TIA.
The U.S. NLCD impervious surface data set may provide a high-quality nationally consistent land cover data set in a GIS-ready format that can be used to estimate TIA value. The NLCD consistently quantifies the percent anthropogenic TIA for the NLCD at a 30-meter (a 900 m2) pixel resolution throughout the Nation. Within the data set, each pixel is quantified as having a TIA value that ranges from 0 to 100 percent. TIA estimates made with the NLCD impervious surface data set represent an aggregated TIA value for each pixel rather than a TIA value for an individual impervious feature. For example, a two lane road in a grassy field has a TIA value of 100 percent, but the pixel containing the road would have a TIA value of 26 percent. If the road (equally) straddles the boundary of two pixels, each pixel would have a TIA value of 13 percent. The Data-quality analysis of the NLCD 2001 data set with manually delimited TIA sample areas indicates that the average error of predicted versus actual TIA may range from 8.8 to 11.4 percent.
TIA estimates from land use are made by identifying land use categories for large blocks of land, summing the total area of each category, and multiplying each area by a characteristic TIA coefficient. Land use categories commonly are used to estimate TIA because areas with a common land use can be identified from field studies, from maps, from planning and zoning information, and from remote imagery. Land use coefficient methods commonly are used because planning and zoning maps that identify similar areas are, increasingly, available in GIS formats. Also, land use methods are selected to estimate potential effects of future development on TIA with planning maps that quantify projected changes in land use. There are substantial differences in actual and estimated TIA estimates from different studies in the literature. Terms like low density and high density may differ in different areas. A residential density of one-half acre per house may be classified as high density in a rural area, medium density in a suburban area, and low density in an urban area. Granato (2010) provides a table with TIA values for different land-use categories from 30 studies in the literature.
The percent developed area (PDA) is commonly used to estimate TIA manually by using maps. The Multi-Resolution Land Characteristics Consortium (MRLCC) defines a developed area as being covered by at least 30 percent of constructed materials). Southard (1986) defined non-developed areas as natural, agricultural, or scattered residential development. He developed a regression equation to predict TIA using percent developed area (table 6-1). He developed his equation using logarithmic power function with data from 23 basins in Missouri. He noted that this method was advantageous because large basins could quickly be delineated and TIA estimated manually from available maps. Granato (2010) developed a regression equation by using data from 262 stream basins in 10 metropolitan areas of the conterminous United States with drainage areas ranging from 0.35 to 216 square miles and PDA values ranging from 0.16 to 99.06 percent.
TIA also is estimated from population density data by estimating the population in an area of interest and using regression equations to calculate the associated TIA. Population-density data are used because nationally consistent census-block data are available in GIS formats for the entire United States. Population-density methods also can be used for predicting potential effects of future development. Although there may be substantial variation in relations between population density and TIA the accuracy of such estimates tend to improve with increasing drainage area as local variations are averaged out. Granato (2010) provides a table with 8 population-density relations from the literature and a new equation developed by using data from 6,255 stream basins in the USGS GAGESII dataset. Granato (2010) also provides four equations to estimate TIA from housing density, which is related to population density.
TIA is also estimated from impervious maps extracted through remote sensing. Remote sensing has been extensively utilized to detect impervious surfaces. Detection of impervious areas using deep learning in conjunction with satellite images has emerged as a transformative method in remote sensing and environmental monitoring. Deep learning algorithms, particularly convolutional neural networks (CNNs), have revolutionized our capacity to identify and quantify impervious surfaces from high-resolution satellite imagery. These models can automatically extract intricate spatial and spectral features, enabling them to discriminate between impervious and non-impervious surfaces with exceptional accuracy.
Natural impervious area
Natural impervious areas are defined herein as land covers that can contribute a substantial amount of stormflow during small and large storms, but commonly are classified as pervious areas. These areas are not commonly considered as an important source of stormflow in most highway and urban runoff-quality studies, but may produce a substantial amount of stormflow. These natural impervious areas may include open water, wetlands, rock outcrops, barren ground (natural soils with low imperviousness), and areas of compacted soils. Natural impervious areas, depending on their nature and antecedent conditions, may produce stormflow from infiltration excess overland flow, saturation overland flow, or direct precipitation. The effects of natural impervious areas on runoff generation are expected to be more important in areas with low TIA than highly developed areas.
The NLCD provides land-cover statistics that can be used as a qualitative measure of the prevalence of different land covers that may act as natural impervious areas. Open water may act as a natural impervious area if direct precipitation is routed through the channel network and arrives as stormflow at the site of interest. Wetlands may act as a natural impervious area during storms when groundwater discharge and saturation overland flow are a substantial proportion of stormflow. Barren ground in riparian areas may act as a natural impervious area during storms because these areas are a source of infiltration excess overland flows. Seemingly pervious areas that have been affected by development activities may act as
impervious areas and generate infiltration excess overland flows. These stormflows may occur even during storms that do not meet precipitation volume or intensity criteria to produce runoff based on nominal infiltration rates.
Developed pervious areas may behave like impervious areas because development and subsequent use tends to compact soils and reduce infiltration rates. For example, Felton and Lull (1963) measured infiltration rates for forest soils and lawns to indicate a potential 80 percent reduction in infiltration as a result of development activities. Similarly, Taylor (1982) did infiltrometer tests in areas before and after suburban development and noted that topsoil alteration and compaction by construction activities reduced infiltration rates by more than 77 percent.
See also
Bioswale
Hardscape
Hydraulic conductivity
Hydrophobic soil
Permeability (fluid)
Soil crust
Soil sealing
Sustainable urban drainage systems
References
Bibliography
Butler, D. and Davies, J.W., 2000, Urban Drainage, London: Spon.
Ferguson, Bruce K., 2005, Porous Pavements, Boca Raton: CRC Press.
Frazer, Lance, 2005, Paving Paradise: The Peril of Impervious Surfaces, Environmental Health Perspectives, Vol. 113, No. 7, pg. A457-A462.
U.S. Environmental Protection Agency. Washington, DC. "After the Storm." Document No. EPA 833-B-03-002. January 2003.
This article incorporates public domain material from websites or documents of the United States Geological Survey and the Federal Highway Administration.
External links
YouTube presentation: The total impervious area (TIA) affects the volume and timing of runoff
Environmental soil science
Hydrology
Hydrology and urban planning
Urban studies and planning terminology
Water pollution
Soil degradation
|
Dabusun or Dabuxun railway station is a station on the Qingzang Railway near Dabusun Lake in Golmud County, Haixi Prefecture, Qinghai Province, China.
See also
Qingzang Railway
List of stations on Qingzang railway
Railway stations in Qinghai
Stations on the Qinghai–Tibet Railway
|
```ruby
# frozen_string_literal: true
require "spec_helper"
require "decidim/api/test/component_context"
require "decidim/accountability/test/factories"
describe "Decidim::Api::QueryType" do
include_context "with a graphql decidim component"
let(:component_type) { "Accountability" }
let!(:current_component) { create(:accountability_component, participatory_space: participatory_process) }
let!(:result) { create(:result, component: current_component, category:) }
let!(:timeline_entry) { create(:timeline_entry, result:) }
let(:accountability_single_result) do
{
"acceptsNewComments" => result.accepts_new_comments?,
"category" => {
"id" => result.category.id.to_s,
"name" => { "translation" => result.category.name[locale] },
"parent" => nil,
"subcategories" => []
},
"children" => [],
"childrenCount" => result.children.size,
"comments" => [],
"commentsHaveAlignment" => result.comments_have_alignment?,
"commentsHaveVotes" => result.comments_have_votes?,
"createdAt" => result.created_at.iso8601.to_s.gsub("Z", "+00:00"),
"description" => { "translation" => result.description[locale] },
"endDate" => result.end_date.to_s,
"externalId" => result.external_id,
"hasComments" => result.comment_threads.size.positive?,
"id" => result.id.to_s,
"parent" => result.parent,
"progress" => result.progress.to_f,
"reference" => result.reference,
"scope" => result.scope,
"startDate" => result.start_date.to_s,
"status" => {
"createdAt" => result.status.created_at.to_date.to_s,
"description" => { "translation" => result.status.description[locale] },
"id" => result.status.id.to_s,
"key" => result.status.key,
"name" => { "translation" => result.status.name[locale] },
"progress" => result.status.progress,
"results" => [{ "id" => result.id.to_s }],
"updatedAt" => result.status.updated_at.to_date.to_s
},
"timelineEntries" => [
{
"createdAt" => result.timeline_entries.first.created_at.iso8601.to_s.gsub("Z", "+00:00"),
"title" => { "translation" => result.timeline_entries.first.title[locale] },
"description" => { "translation" => result.timeline_entries.first.description[locale] },
"entryDate" => result.timeline_entries.first.entry_date.to_s,
"id" => result.timeline_entries.first.id.to_s,
"result" => { "id" => result.id.to_s },
"updatedAt" => result.timeline_entries.first.updated_at.iso8601.to_s.gsub("Z", "+00:00")
}
],
"title" => { "translation" => result.title[locale] },
"totalCommentsCount" => result.comments_count,
"type" => "Decidim::Accountability::Result",
"updatedAt" => result.updated_at.iso8601.to_s.gsub("Z", "+00:00"),
"userAllowedToComment" => result.user_allowed_to_comment?(current_user),
"weight" => result.weight.to_i
}
end
let(:accountability_data) do
{
"__typename" => "Accountability",
"id" => current_component.id.to_s,
"name" => { "translation" => translated(current_component.name) },
"results" => {
"edges" => [
{
"node" => accountability_single_result
}
]
},
"weight" => 0
}
end
describe "valid connection query" do
let(:component_fragment) do
%(
fragment fooComponent on Accountability {
results {
edges{
node{
acceptsNewComments
category {
id
name {
translation(locale: "#{locale}")
}
parent {
id
}
subcategories {
id
}
}
children {
id
}
childrenCount
comments {
id
}
commentsHaveAlignment
commentsHaveVotes
createdAt
description {
translation(locale:"#{locale}")
}
endDate
externalId
hasComments
id
parent {
id
}
progress
reference
scope {
id
children {
id
}
name {
translation(locale:"#{locale}")
}
parent {
id
}
}
startDate
status {
id
createdAt
description {
translation(locale:"#{locale}")
}
key
name {
translation(locale:"#{locale}")
}
progress
results {
id
}
updatedAt
}
timelineEntries {
id
createdAt
title {
translation(locale:"#{locale}")
}
description {
translation(locale:"#{locale}")
}
entryDate
result {
id
}
updatedAt
}
title {
translation(locale:"#{locale}")
}
totalCommentsCount
type
updatedAt
userAllowedToComment
weight
}
}
}
}
)
end
it "executes successfully" do
expect { response }.not_to raise_error
end
it { expect(response["participatoryProcess"]["components"].first).to eq(accountability_data) }
end
describe "valid query" do
let(:component_fragment) do
%(
fragment fooComponent on Accountability {
result(id: #{result.id}) {
acceptsNewComments
category {
id
name {
translation(locale: "#{locale}")
}
parent {
id
}
subcategories {
id
}
}
children {
id
}
childrenCount
comments {
id
}
commentsHaveAlignment
commentsHaveVotes
createdAt
description {
translation(locale:"#{locale}")
}
endDate
externalId
hasComments
id
parent {
id
}
progress
reference
scope {
id
children {
id
}
name {
translation(locale:"#{locale}")
}
parent {
id
}
}
startDate
status {
id
createdAt
description {
translation(locale:"#{locale}")
}
key
name {
translation(locale:"#{locale}")
}
progress
results {
id
}
updatedAt
}
timelineEntries {
id
createdAt
title {
translation(locale:"#{locale}")
}
description {
translation(locale:"#{locale}")
}
entryDate
result {
id
}
updatedAt
}
title {
translation(locale:"#{locale}")
}
totalCommentsCount
type
updatedAt
userAllowedToComment
weight
}
}
)
end
it "executes successfully" do
expect { response }.not_to raise_error
end
it { expect(response["participatoryProcess"]["components"].first["result"]).to eq(accountability_single_result) }
end
end
```
|
José Galvez District is one of twelve districts of the province Celendín in Peru.
References
|
```c++
#include "datastream_zcm.h"
#include <QTextStream>
#include <QFile>
#include <QMessageBox>
#include <QDebug>
#include <iomanip>
#include <iostream>
#include <mutex>
#include <QSettings>
#include <QFileDialog>
#include <QMessageBox>
using namespace std;
using namespace PJ;
template <typename T>
double toDouble(const void* data)
{
return static_cast<double>(*reinterpret_cast<const T*>(data));
}
DataStreamZcm::DataStreamZcm() : _subs(nullptr), _running(false)
{
_dialog = new QDialog;
_ui = new Ui::DialogZcm;
_ui->setupUi(_dialog);
_config_widget = new ConfigZCM("DataStreamZcm", _dialog);
_ui->mainLayout->insertWidget(5, _config_widget, 1);
}
DataStreamZcm::~DataStreamZcm()
{
shutdown();
delete _dialog;
}
const char* DataStreamZcm::name() const
{
return "Zcm Streamer";
}
bool DataStreamZcm::start(QStringList*)
{
if (_running)
{
return false;
}
// We create a Dialog to request the folder to populate zcm::TypeDb
// and the string to pass to the subscriber.
// Initialize the lineEdits in the ui with the previous value;
QSettings settings;
auto const subscribe_text = settings.value("DataStreamZcm::subscribe", ".*").toString();
_ui->lineEditSubscribe->setText(subscribe_text);
{
auto transport = QString(getenv("ZCM_DEFAULT_URL"));
transport = settings.value("DataStreamZcm::transport", transport).toString();
_ui->lineEditTransport->setText(transport);
}
// start the dialog and check that OK was pressed
_dialog->restoreGeometry(settings.value("DataStreamZcm::geometry").toByteArray());
int res = _dialog->exec();
settings.setValue("DataStreamZcm::geometry", _dialog->saveGeometry());
if (res == QDialog::Rejected)
{
return false;
}
// save the current configuration for the next execution
settings.setValue("DataStreamZcm::subscribe", _ui->lineEditSubscribe->text());
settings.setValue("DataStreamZcm::transport", _ui->lineEditTransport->text());
_transport = _ui->lineEditTransport->text();
if (!_zcm)
{
try
{
_zcm.reset(new zcm::ZCM(_transport.toStdString()));
}
catch (std::exception& ex)
{
QMessageBox::warning(nullptr, "Error",
tr("Exception from zcm::ZCM() :\n%1").arg(ex.what()));
return false;
}
if (!_zcm->good())
{
QMessageBox::warning(nullptr, "Error", "Failed to create zcm::ZCM()");
_zcm.reset();
return false;
}
}
auto libraries = _config_widget->getLibraries();
// reset the types if it is the first time or folder changed
if (_types_library != libraries || !_types)
{
_types_library = libraries;
_types.reset(new zcm::TypeDb(_types_library.toStdString()));
if (!_types->good())
{
QMessageBox::warning(nullptr, "Error", "Failed to create zcm::TypeDb()");
_types.reset();
return false;
}
}
if (_subscribe_string != _ui->lineEditSubscribe->text() || !_subs)
{
_subscribe_string = _ui->lineEditSubscribe->text();
if (_subs)
{
_zcm->unsubscribe(_subs);
}
_subs =
_zcm->subscribe(_subscribe_string.toStdString(), &DataStreamZcm::handler, this);
if (!_subs)
{
QMessageBox::warning(nullptr, "Error", "Failed to subscribe");
return false;
}
}
_zcm->start();
_running = true;
return true;
}
void DataStreamZcm::shutdown()
{
if (!_running)
{
return;
}
if (_subs)
{
_zcm->unsubscribe(_subs);
_subs = nullptr;
}
_zcm->stop();
_zcm.reset(nullptr);
_running = false;
}
bool DataStreamZcm::isRunning() const
{
return _running;
}
bool DataStreamZcm::xmlSaveState(QDomDocument& doc, QDomElement& parent_element) const
{
// RRR (Bendes): Probably also transport string here
QDomElement elem = doc.createElement("config");
elem.setAttribute("folder", _types_library);
elem.setAttribute("subscribe", _subscribe_string);
elem.setAttribute("transport", _transport);
parent_element.appendChild(elem);
return true;
}
bool DataStreamZcm::xmlLoadState(const QDomElement& parent_element)
{
QDomElement elem = parent_element.firstChildElement("config");
if (!elem.isNull())
{
// RRR (Bendes): Probably also transport string here
_types_library = elem.attribute("folder");
_subscribe_string = elem.attribute("subscribe");
_transport = elem.attribute("transport");
QSettings settings;
settings.setValue("DataStreamZcm::folder", _types_library);
settings.setValue("DataStreamZcm::subscribe", _subscribe_string);
settings.setValue("DataStreamZcm::transport", _transport);
}
return true;
}
void DataStreamZcm::processData(const string& name, zcm_field_type_t type,
const void* data, void* usr)
{
DataStreamZcm* me = (DataStreamZcm*)usr;
switch (type)
{
case ZCM_FIELD_INT8_T:
me->_numerics.emplace_back(name, toDouble<int8_t>(data));
break;
case ZCM_FIELD_INT16_T:
me->_numerics.emplace_back(name, toDouble<int16_t>(data));
break;
case ZCM_FIELD_INT32_T:
me->_numerics.emplace_back(name, toDouble<int32_t>(data));
break;
case ZCM_FIELD_INT64_T:
me->_numerics.emplace_back(name, toDouble<int64_t>(data));
break;
case ZCM_FIELD_BYTE:
me->_numerics.emplace_back(name, toDouble<uint8_t>(data));
break;
case ZCM_FIELD_FLOAT:
me->_numerics.emplace_back(name, toDouble<float>(data));
break;
case ZCM_FIELD_DOUBLE:
me->_numerics.emplace_back(name, toDouble<double>(data));
break;
case ZCM_FIELD_BOOLEAN:
me->_numerics.emplace_back(name, toDouble<bool>(data));
break;
case ZCM_FIELD_STRING:
me->_strings.emplace_back(name, string((const char*)data));
break;
case ZCM_FIELD_USER_TYPE:
assert(false && "Should not be possble");
}
};
void DataStreamZcm::handler(const zcm::ReceiveBuffer* rbuf, const string& channel)
{
zcm::Introspection::processEncodedType(channel, rbuf->data, rbuf->data_size, "/",
*_types.get(), processData, this);
{
std::lock_guard<std::mutex> lock(mutex());
for (auto& n : _numerics)
{
auto itr = dataMap().numeric.find(n.first);
if (itr == dataMap().numeric.end())
{
itr = dataMap().addNumeric(n.first);
}
itr->second.pushBack({ double(rbuf->recv_utime) / 1e6, n.second });
}
for (auto& s : _strings)
{
auto itr = dataMap().strings.find(s.first);
if (itr == dataMap().strings.end())
{
itr = dataMap().addStringSeries(s.first);
}
itr->second.pushBack({ double(rbuf->recv_utime) / 1e6, s.second });
}
}
emit dataReceived();
_numerics.clear();
_strings.clear();
}
void DataStreamZcm::on_pushButtonUrl_clicked()
{
QString url = getenv("ZCM_DEFAULT_URL");
if (url.isEmpty())
{
QMessageBox::warning(nullptr, "Error",
"Environment variable ZCM_DEFAULT_URL not set");
}
else
{
_ui->lineEditTransport->setText(url);
}
}
```
|
```sass
/* Bulma Grid */
@charset "utf-8"
@import "columns"
@import "tiles"
```
|
Lakshmi Sundaram is an American screenwriter, director, and producer.
Born in Brooklyn, Sundaram studied writing at Columbia University. She also received an MFA in Film from Columbia University's School of the Arts.
Sundaram's first writing credit was for the NBC musical drama television series Smash, co-writing the episode "Tech" with Jason Grote. She would join the writing staff for Brooklyn Nine-Nine, writing for them from 2013 to 2016, and in 2018, as part of the crew for Master of None, she would receive a nomination for the Writers Guild of America Award for Television: Comedy Series. Several of the television shows she has worked on have won Emmy Awards, Golden Globe Awards, Writers Guild of America Awards, and garnered great critical acclaim. Sundaram wrote the episode "Protect Ya Neck" in season 2 of the Hulu series Wu-Tang: An American Saga. The episode received critical and commercial praise, and remains the show's highest rated episode.
Lakshmi Sundaram is the namesake and great-granddaughter of Muthulakshmi Reddy, an Indian pioneer of civil rights, the first woman to sit as Vice President on any legislature in the world, and peer of Mahatma Gandhi and Annie Besant. Sundaram's other relatives include the Indian actors Gemini Ganesan and Rekha.
In 2021, Sundaram's accomplishments were profiled by Vogue India, receiving the cover of the magazine's culture section.
References
External links
Lakshmi Sundaram at the Internet Movie Database
Year of birth missing (living people)
American people of Indian descent
American television writers
Columbia University School of the Arts alumni
Writers from Brooklyn
Living people
|
```javascript
var searchData=
[
['uint',['uint',['../structboost_1_1hana_1_1integral__constant.html#a5071dd223185718f85da1db48fb95d80',1,'boost::hana::integral_constant']]],
['ullong',['ullong',['../structboost_1_1hana_1_1integral__constant.html#a112e62e2d698846ca9e3940eb15333d3',1,'boost::hana::integral_constant']]],
['ulong',['ulong',['../structboost_1_1hana_1_1integral__constant.html#aedb2b03831973b4b54c5d0abce1af63c',1,'boost::hana::integral_constant']]],
['ushort_5f',['ushort_',['../structboost_1_1hana_1_1integral__constant.html#a69a1bcadc259af364eb87d634c76c12e',1,'boost::hana::integral_constant']]]
];
```
|
```shell
#!/bin/bash
# Stop at any error, show all commands
set -exuo pipefail
# Get script directory
MY_DIR=$(dirname "${BASH_SOURCE[0]}")
if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ]; then
PACKAGE_MANAGER=yum
elif [ "${AUDITWHEEL_POLICY:0:10}" == "musllinux_" ]; then
PACKAGE_MANAGER=apk
elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_28" ]; then
PACKAGE_MANAGER=dnf
else
echo "Unsupported policy: '${AUDITWHEEL_POLICY}'"
exit 1
fi
if [ "${AUDITWHEEL_POLICY:0:10}" == "musllinux_" ]; then
EXPECTED_PYTHON_COUNT=9
EXPECTED_PYTHON_COUNT_ALL=9
else
if [ "${AUDITWHEEL_ARCH}" == "x86_64" ] || [ "${AUDITWHEEL_ARCH}" == "aarch64" ]; then
EXPECTED_PYTHON_COUNT=11
EXPECTED_PYTHON_COUNT_ALL=14
elif [ "${AUDITWHEEL_ARCH}" == "i686" ]; then
EXPECTED_PYTHON_COUNT=11
EXPECTED_PYTHON_COUNT_ALL=13
else
EXPECTED_PYTHON_COUNT=9
EXPECTED_PYTHON_COUNT_ALL=9
fi
fi
PYTHON_COUNT=$(manylinux-interpreters list --installed | wc -l)
if [ ${EXPECTED_PYTHON_COUNT} -ne ${PYTHON_COUNT} ]; then
echo "unexpected number of default python installations: ${PYTHON_COUNT}, expecting ${EXPECTED_PYTHON_COUNT}"
manylinux-interpreters list --installed
exit 1
fi
PYTHON_COUNT_ALL=$(manylinux-interpreters list | wc -l)
if [ ${EXPECTED_PYTHON_COUNT_ALL} -ne ${PYTHON_COUNT_ALL} ]; then
echo "unexpected number of overall python installations: ${PYTHON_COUNT_ALL}, expecting ${EXPECTED_PYTHON_COUNT_ALL}"
manylinux-interpreters list
exit 1
fi
manylinux-interpreters ensure-all
PYTHON_COUNT=$(manylinux-interpreters list --installed | wc -l)
if [ ${EXPECTED_PYTHON_COUNT_ALL} -ne ${PYTHON_COUNT} ]; then
echo "unexpected number of python installations after 'manylinux-python ensure-all': ${PYTHON_COUNT}, expecting ${EXPECTED_PYTHON_COUNT_ALL}"
manylinux-interpreters list --installed
exit 1
fi
PYTHON_COUNT=0
for PYTHON in /opt/python/*/bin/python; do
# Smoke test to make sure that our Pythons work, and do indeed detect as
# being manylinux compatible:
$PYTHON $MY_DIR/manylinux-check.py ${AUDITWHEEL_POLICY} ${AUDITWHEEL_ARCH}
# Make sure that SSL cert checking works
$PYTHON $MY_DIR/ssl-check.py
IMPLEMENTATION=$(${PYTHON} -c "import sys; print(sys.implementation.name)")
PYVERS=$(${PYTHON} -c "import sys; print('.'.join(map(str, sys.version_info[:2])))")
PY_GIL=$(${PYTHON} -c "import sysconfig; print('t' if sysconfig.get_config_vars().get('Py_GIL_DISABLED', 0) else '')")
if [ "${IMPLEMENTATION}" == "cpython" ]; then
# Make sure sqlite3 module can be loaded properly and is the manylinux version one
# c.f. path_to_url
$PYTHON -c 'import sqlite3; print(sqlite3.sqlite_version); assert sqlite3.sqlite_version_info[0:2] >= (3, 34)'
# Make sure tkinter module can be loaded properly
$PYTHON -c 'import tkinter; print(tkinter.TkVersion); assert tkinter.TkVersion >= 8.6'
# cpython shall be available as python
LINK_VERSION=$(python${PYVERS}${PY_GIL} -VV)
REAL_VERSION=$(${PYTHON} -VV)
test "${LINK_VERSION}" = "${REAL_VERSION}"
fi
# cpythonX.Y / pypyX.Y shall be available directly in PATH
LINK_VERSION=$(${IMPLEMENTATION}${PYVERS}${PY_GIL} -VV)
REAL_VERSION=$(${PYTHON} -VV)
test "${LINK_VERSION}" = "${REAL_VERSION}"
# check a simple project can be built
PY_ABI_TAGS=$(basename $(dirname $(dirname $PYTHON)))
SRC_DIR=/tmp/forty-two-${PY_ABI_TAGS}
DIST_DIR=/tmp/dist-${PY_ABI_TAGS}
cp -rf ${MY_DIR}/forty-two ${SRC_DIR}
EXPECTED_WHEEL_NAME=forty_two-0.1.0-${PY_ABI_TAGS}-linux_${AUDITWHEEL_ARCH}.whl
${PYTHON} -m build -w -o ${DIST_DIR} ${SRC_DIR}
if [ ! -f ${DIST_DIR}/${EXPECTED_WHEEL_NAME} ]; then
echo "unexcpected wheel built: '$(basename $(find ${DIST_DIR} -name '*.whl'))' instead of '${EXPECTED_WHEEL_NAME}'"
exit 1
fi
auditwheel repair --only-plat -w ${DIST_DIR} ${DIST_DIR}/${EXPECTED_WHEEL_NAME}
REPAIRED_WHEEL=$(find ${DIST_DIR} -name "forty_two-0.1.0-${PY_ABI_TAGS}-*${AUDITWHEEL_POLICY}_${AUDITWHEEL_ARCH}*.whl")
if [ ! -f "${REPAIRED_WHEEL}" ]; then
echo "invalid repaired wheel name"
exit 1
fi
${PYTHON} -m pip install ${REPAIRED_WHEEL}
if [ "$(${PYTHON} -c 'import forty_two; print(forty_two.answer())')" != "42" ]; then
echo "invalid answer, expecting 42"
exit 1
fi
if [ "${PYVERS}" != "3.6" ] && [ "${PYVERS}" != "3.7" ] && [ "${IMPLEMENTATION}" != "graalpy" ] && [ "${AUDITWHEEL_POLICY:0:9}_${AUDITWHEEL_ARCH}" != "musllinux_s390x" ] && [ "${AUDITWHEEL_ARCH}" != "ppc64le" ]; then
# no uv on musllinux s390x
# FIXME, ppc64le test fails on Travis CI but works with qemu
UV_PYTHON=/tmp/uv-test-${IMPLEMENTATION}${PYVERS}/bin/python
uv venv --python ${PYTHON} /tmp/uv-test-${IMPLEMENTATION}${PYVERS}
uv pip install --python ${UV_PYTHON} ${REPAIRED_WHEEL}
if [ "$(${UV_PYTHON} -c 'import forty_two; print(forty_two.answer())')" != "42" ]; then
echo "invalid answer, expecting 42"
exit 1
fi
fi
PYTHON_COUNT=$(( $PYTHON_COUNT + 1 ))
done
if [ ${EXPECTED_PYTHON_COUNT_ALL} -ne ${PYTHON_COUNT} ]; then
echo "all python installations were not tested: ${PYTHON_COUNT}, expecting ${EXPECTED_PYTHON_COUNT_ALL}"
ls /opt/python
exit 1
fi
# minimal tests for tools that should be present
auditwheel --version
autoconf --version
automake --version
libtoolize --version
patchelf --version
git --version
cmake --version
swig -version
sqlite3 --version
pipx run nox --version
pipx install --pip-args='--no-python-version-warning --no-input' nox
nox --version
tar --version | grep "GNU tar"
# check libcrypt.so.1 can be loaded by some system packages,
# as LD_LIBRARY_PATH might not be enough.
# c.f. path_to_url
if [ "${PACKAGE_MANAGER}" == "yum" ]; then
yum -y install openssh-clients
elif [ "${PACKAGE_MANAGER}" == "apk" ]; then
apk add --no-cache openssh-client
elif [ "${PACKAGE_MANAGER}" == "dnf" ]; then
dnf -y install --allowerasing openssh-clients
else
echo "Unsupported package manager: '${PACKAGE_MANAGER}'"
exit 1
fi
eval "$(ssh-agent)"
eval "$(ssh-agent -k)"
# compilation tests, intended to ensure appropriate headers, pkg_config, etc.
# are available for downstream compile against installed tools
source_dir="${MY_DIR}/ctest"
build_dir="$(mktemp -d)"
cmake -S "${source_dir}" -B "${build_dir}"
cmake --build "${build_dir}"
(cd "${build_dir}"; ctest --output-on-failure)
# path_to_url
# wrong /usr/local/man symlink
if [ -L /usr/local/man ]; then
test -d /usr/local/man
fi
# final report
echo "run_tests successful!"
```
|
```objective-c
/*
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef API_VIDEO_VIDEO_STREAM_ENCODER_SETTINGS_H_
#define API_VIDEO_VIDEO_STREAM_ENCODER_SETTINGS_H_
#include <string>
#include "api/video/video_bitrate_allocator_factory.h"
#include "api/video_codecs/video_encoder.h"
#include "api/video_codecs/video_encoder_factory.h"
namespace webrtc {
class EncoderSwitchRequestCallback {
public:
virtual ~EncoderSwitchRequestCallback() {}
struct Config {
std::string codec_name;
absl::optional<std::string> param;
absl::optional<std::string> value;
};
// Requests that encoder fallback is performed.
virtual void RequestEncoderFallback() = 0;
// Requests that a switch to a specific encoder is performed.
virtual void RequestEncoderSwitch(const Config& conf) = 0;
virtual void RequestEncoderSwitch(const SdpVideoFormat& format) = 0;
};
struct VideoStreamEncoderSettings {
explicit VideoStreamEncoderSettings(
const VideoEncoder::Capabilities& capabilities)
: capabilities(capabilities) {}
// Enables the new method to estimate the cpu load from encoding, used for
// cpu adaptation.
bool experiment_cpu_load_estimator = false;
// Ownership stays with WebrtcVideoEngine (delegated from PeerConnection).
VideoEncoderFactory* encoder_factory = nullptr;
// Requests the WebRtcVideoChannel to perform a codec switch.
EncoderSwitchRequestCallback* encoder_switch_request_callback = nullptr;
// Ownership stays with WebrtcVideoEngine (delegated from PeerConnection).
VideoBitrateAllocatorFactory* bitrate_allocator_factory = nullptr;
// Negotiated capabilities which the VideoEncoder may expect the other
// side to use.
VideoEncoder::Capabilities capabilities;
};
} // namespace webrtc
#endif // API_VIDEO_VIDEO_STREAM_ENCODER_SETTINGS_H_
```
|
```php
<?php
/*
*
* File ini bagian dari:
*
* OpenSID
*
* Sistem informasi desa sumber terbuka untuk memajukan desa
*
* Aplikasi dan source code ini dirilis berdasarkan lisensi GPL V3
*
* Hak Cipta 2009 - 2015 Combine Resource Institution (path_to_url
* Hak Cipta 2016 - 2024 Perkumpulan Desa Digital Terbuka (path_to_url
*
* Dengan ini diberikan izin, secara gratis, kepada siapa pun yang mendapatkan salinan
* dari perangkat lunak ini dan file dokumentasi terkait ("Aplikasi Ini"), untuk diperlakukan
* tanpa batasan, termasuk hak untuk menggunakan, menyalin, mengubah dan/atau mendistribusikan,
* asal tunduk pada syarat berikut:
*
* Pemberitahuan hak cipta di atas dan pemberitahuan izin ini harus disertakan dalam
* setiap salinan atau bagian penting Aplikasi Ini. Barang siapa yang menghapus atau menghilangkan
* pemberitahuan ini melanggar ketentuan lisensi Aplikasi Ini.
*
* PERANGKAT LUNAK INI DISEDIAKAN "SEBAGAIMANA ADANYA", TANPA JAMINAN APA PUN, BAIK TERSURAT MAUPUN
* TERSIRAT. PENULIS ATAU PEMEGANG HAK CIPTA SAMA SEKALI TIDAK BERTANGGUNG JAWAB ATAS KLAIM, KERUSAKAN ATAU
* KEWAJIBAN APAPUN ATAS PENGGUNAAN ATAU LAINNYA TERKAIT APLIKASI INI.
*
* @package OpenSID
* @author Tim Pengembang OpenDesa
* @copyright Hak Cipta 2009 - 2015 Combine Resource Institution (path_to_url
* @copyright Hak Cipta 2016 - 2024 Perkumpulan Desa Digital Terbuka (path_to_url
* @license path_to_url GPL V3
* @link path_to_url
*
*/
define('FOTO_DEFAULT_PRIA', base_url('assets/images/pengguna/kuser.png'));
define('FOTO_DEFAULT_WANITA', base_url('assets/images/pengguna/wuser.png'));
define('MIME_TYPE_SIMBOL', serialize([
'image/png', 'image/x-png',
]));
define('EXT_SIMBOL', serialize([
'.png',
]));
define('MIME_TYPE_DOKUMEN', serialize([
'application/x-download',
'application/pdf',
'application/ppt',
'application/pptx',
'application/excel',
'application/msword',
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
'text/rtf',
'application/powerpoint',
'application/vnd.ms-powerpoint',
'application/vnd.ms-excel',
'application/msexcel',
]));
define('EXT_DOKUMEN', serialize([
'.pdf', '.ppt', '.pptx', '.pps', '.ppsx',
'.doc', '.docx', '.rtf', '.xls', '.xlsx',
]));
define('MIME_TYPE_GAMBAR', serialize([
'image/jpeg', 'image/pjpeg',
'image/png', 'image/x-png',
]));
define('EXT_GAMBAR', serialize([
'.jpg', '.jpeg', '.png',
]));
define('MIME_TYPE_ARSIP', serialize([
'application/rar', 'application/x-rar', 'application/x-rar-compressed', 'application/octet-stream',
'application/zip', 'application/x-zip', 'application/x-zip-compressed',
]));
define('EXT_ARSIP', serialize([
'.zip', '.rar',
]));
/**
* Tambahkan suffix unik ke nama file
*
* @param string $namaFile Nama file asli (beserta ekstensinya)
* @param bool $urlEncode Saring nama file dengan urlencode() ?
* @param string|null $delimiter String pemisah nama asli dengan unique id
*/
function tambahSuffixUniqueKeNamaFile($namaFile, $urlEncode = true, $delimiter = null): string
{
$namaFile = preg_replace('/[^A-Za-z0-9\- .]/', '', $namaFile);
// Delimiter untuk tambahSuffixUniqueKeNamaFile()
$delimiterUniqueKey = null;
// Type check
$namaFile = is_string($namaFile) ? $namaFile : (string) $namaFile;
$delimiterUniqueKey = (! is_string($delimiter) || $delimiter === '')
? '__sid__' : $delimiter;
// Pastikan nama file tidak mengandung string milik $this->delimiterUniqueKey
$namaFile = str_replace($delimiterUniqueKey, '__', $namaFile);
// Tambahkan suffix nama unik menggunakan uniqid()
$namaFileUnik = explode('.', $namaFile);
$ekstensiFile = end($namaFileUnik);
unset($namaFileUnik[count($namaFileUnik) - 1]);
$namaFileUnik = implode('.', $namaFileUnik);
return urlencode($namaFileUnik) . $delimiterUniqueKey . generator() . '.' . $ekstensiFile;
// Contoh return:
// - nama asli = 'kitten.jpg'
// - nama unik = 'kitten__sid__xUCc8KO.jpg'
}
/**
* Ambil foto profil berdasarkan parameter
*/
function AmbilFoto(?string $foto, string $ukuran = 'kecil_', ?string $sex = '1'): string
{
$sex = $sex ?: '1';
$file_foto = Foto_Default($foto, $sex);
if ($foto == $file_foto) {
$ukuran = ($ukuran == 'kecil_') ? 'kecil_' : '';
$file_foto = base_url(LOKASI_USER_PICT . $ukuran . $foto);
if (! file_exists(FCPATH . LOKASI_USER_PICT . $ukuran . $foto)) {
$file_foto = Foto_Default(null, $sex);
}
}
return $file_foto;
}
/**
* Ambil foto default berdasarkan parameter
*/
function Foto_Default(?string $foto, ?string $sex = '1'): string
{
if (! in_array($foto, ['kuser.png', 'wuser.png']) && ! empty($foto)) {
return $foto;
}
if (($foto == 'kuser.png') || $sex == 1) {
return FOTO_DEFAULT_PRIA;
}
if (($foto == 'wuser.png') || $sex == 2) {
return FOTO_DEFAULT_WANITA;
}
}
/**
* Unggah gambar widget
*/
function UploadGambarWidget(string $nama_file, string $lokasi_file, ?string $old_gambar): void
{
$dir_upload = LOKASI_GAMBAR_WIDGET;
if ($old_gambar) {
unlink($dir_upload . $old_gambar);
}
$file_upload = $dir_upload . $nama_file;
move_uploaded_file($lokasi_file, $file_upload);
}
/**
* Unggah foto
*/
function UploadFoto(?string $fupload_name, ?string $old_foto, string $dimensi = '200x200'): bool
{
$ci = &get_instance();
$config['upload_path'] = LOKASI_USER_PICT;
$config['allowed_types'] = 'jpg|png|jpeg';
$ci->load->library('MY_Upload', null, 'upload');
$ci->upload->initialize($config);
if (! $ci->upload->do_upload('foto')) {
session_error($ci->upload->display_errors());
redirect($_SERVER['HTTP_REFERER']);
}
$uploadedImage = $ci->upload->data();
if ($old_foto != '') {
// Hapus old_foto
unlink(LOKASI_USER_PICT . $old_foto);
}
$dimensi = generateDimensi($dimensi);
ResizeGambar($uploadedImage['full_path'], LOKASI_USER_PICT . $fupload_name, ['width' => $dimensi['width'], 'height' => $dimensi['height']]);
unlink($uploadedImage['full_path']);
return true;
}
function UploadGambar(string $fupload_name, string $old_gambar): bool
{
$vdir_upload = 'assets/front/slide/';
if ($old_gambar != '') {
unlink($vdir_upload . 'kecil_' . $old_gambar);
}
$vfile_upload = $vdir_upload . $fupload_name;
move_uploaded_file($_FILES['gambar']['tmp_name'], $vfile_upload);
$im_src = imagecreatefromjpeg($vfile_upload);
$src_width = imagesx($im_src);
$src_height = imagesy($im_src);
if (($src_width * 25) < ($src_height * 44)) {
$dst_width = 440;
$dst_height = ($dst_width / $src_width) * $src_height;
$cut_height = $dst_height - 250;
$im = imagecreatetruecolor(440, 250);
imagecopyresampled($im, $im_src, 0, 0, 0, $cut_height, $dst_width, $dst_height, $src_width, $src_height);
} else {
$dst_height = 250;
$dst_width = ($dst_height / $src_height) * $src_width;
$cut_width = $dst_width - 440;
$im = imagecreatetruecolor(440, 250);
imagecopyresampled($im, $im_src, 0, 0, $cut_width, 0, $dst_width, $dst_height, $src_width, $src_height);
}
imagejpeg($im, $vdir_upload . 'kecil_' . $fupload_name);
imagedestroy($im_src);
imagedestroy($im);
unlink($vfile_upload);
return true;
}
function AmbilGaleri(string $foto, string $ukuran)
{
return base_url(LOKASI_GALERI . $ukuran . '_' . $foto);
}
// $file_upload = $_FILES['<lokasi>']
function TipeFile(array $file_upload)
{
$lokasi_file = $file_upload['tmp_name'];
if (empty($lokasi_file)) {
return '';
}
if (isPHP($file_upload['tmp_name'], $file_upload['name'])) {
return 'application/x-php';
}
if (function_exists('finfo_open')) {
$finfo = finfo_open(FILEINFO_MIME_TYPE);
$tipe_file = finfo_file($finfo, $lokasi_file);
finfo_close($finfo);
} else {
$tipe_file = $file_upload['type'];
}
return $tipe_file;
}
// $file_upload = $_FILES['<lokasi>']
function UploadError(array $file_upload): bool
{
// error 1 = UPLOAD_ERR_INI_SIZE; lihat Upload.php
// TODO: pakai cara upload yg disediakan Codeigniter
if ($file_upload['error'] == 1) {
$upload_mb = max_upload();
$_SESSION['error_msg'] .= ' -> Ukuran file melebihi batas ' . $upload_mb . ' MB';
return true;
}
return false;
}
// $file_upload = $_FILES['<lokasi>']
function CekGambar(array $file_upload, string $tipe_file): bool
{
$lokasi_file = $file_upload['tmp_name'];
if (empty($lokasi_file)) {
return false;
}
$nama_file = $file_upload['name'];
$ext = get_extension($nama_file);
if (! in_array($tipe_file, unserialize(MIME_TYPE_GAMBAR)) || ! in_array($ext, unserialize(EXT_GAMBAR))) {
$_SESSION['error_msg'] .= ' -> Jenis file salah: ' . $tipe_file . ' ' . $ext;
return false;
}
return true;
}
function UploadGallery(string $fupload_name, $old_foto = '', $tipe_file = ''): bool
{
$ci = &get_instance();
$config['upload_path'] = LOKASI_GALERI;
$config['allowed_types'] = 'gif|jpg|png|jpeg';
$ci->load->library('upload');
$ci->upload->initialize($config);
if (! $ci->upload->do_upload('gambar')) {
session_error($ci->upload->display_errors());
} else {
$uploadedImage = $ci->upload->data();
ResizeGambar($uploadedImage['full_path'], LOKASI_GALERI . 'kecil_' . $fupload_name, ['width' => 440, 'height' => 440]);
ResizeGambar($uploadedImage['full_path'], LOKASI_GALERI . 'sedang_' . $fupload_name, ['width' => 880, 'height' => 880]);
}
unlink($uploadedImage['full_path']);
return true;
}
function UploadSimbolx(string $fupload_name, string $old_gambar): bool
{
$vdir_upload = 'assets/gis/simbol';
if ($old_gambar != '') {
unlink($vdir_upload . 'kecil_' . $old_gambar);
unlink($vdir_upload . $old_gambar);
}
$vfile_upload = $vdir_upload . $fupload_name;
move_uploaded_file($_FILES['gambar']['tmp_name'], $vfile_upload);
$im_src = imagecreatefromjpeg($vfile_upload);
$src_width = imagesx($im_src);
$src_height = imagesy($im_src);
if (($src_width * 20) < ($src_height * 44)) {
$dst_width = 440;
$dst_height = ($dst_width / $src_width) * $src_height;
$cut_height = $dst_height - 300;
$im = imagecreatetruecolor(440, 300);
imagecopyresampled($im, $im_src, 0, 0, 0, $cut_height, $dst_width, $dst_height, $src_width, $src_height);
} else {
$dst_height = 300;
$dst_width = ($dst_height / $src_height) * $src_width;
$cut_width = $dst_width - 440;
$im = imagecreatetruecolor(440, 300);
imagecopyresampled($im, $im_src, 0, 0, $cut_width, 0, $dst_width, $dst_height, $src_width, $src_height);
}
imagejpeg($im, $vdir_upload . 'kecil_' . $fupload_name);
imagedestroy($im_src);
imagedestroy($im);
//unlink($vfile_upload);
return true;
}
function AmbilFotoArtikel(string $foto, string $ukuran)
{
return base_url(LOKASI_FOTO_ARTIKEL . $ukuran . '_' . $foto);
}
function UploadArtikel(string $fupload_name, $gambar): bool
{
$ci = &get_instance();
$config['upload_path'] = LOKASI_FOTO_ARTIKEL;
$config['allowed_types'] = 'gif|jpg|png|jpeg';
$ci->load->library('upload');
$ci->upload->initialize($config);
if (! $ci->upload->do_upload($gambar)) {
session_error($ci->upload->display_errors());
return false;
}
$uploadedImage = $ci->upload->data();
ResizeGambar($uploadedImage['full_path'], LOKASI_FOTO_ARTIKEL . 'kecil_' . $fupload_name, ['width' => 440, 'height' => 440]);
ResizeGambar($uploadedImage['full_path'], LOKASI_FOTO_ARTIKEL . 'sedang_' . $fupload_name, ['width' => 880, 'height' => 880]);
unlink($uploadedImage['full_path']);
return true;
}
function HapusArtikel(?string $gambar): bool
{
$vdir_upload = LOKASI_FOTO_ARTIKEL;
$vfile_upload = $vdir_upload . 'sedang_' . $gambar;
unlink($vfile_upload);
$vfile_upload = $vdir_upload . 'kecil_' . $gambar;
unlink($vfile_upload);
return true;
}
function UploadPeta(string $fupload_name, string $lokasi, $old_foto = null)
{
$ci = &get_instance();
$ci->load->library('MY_Upload', null, 'upload');
$ci->upload->initialize([
'upload_path' => $lokasi,
'allowed_types' => 'gif|jpg|png|jpeg',
]);
if (! $ci->upload->do_upload('foto')) {
session_error($ci->upload->display_errors(null, null));
redirect($_SERVER['HTTP_REFERER']);
} else {
$uploadedImage = $ci->upload->data();
ResizeGambar($uploadedImage['full_path'], $lokasi . 'kecil_' . $fupload_name, ['width' => 120, 'height' => 100]);
ResizeGambar($uploadedImage['full_path'], $lokasi . 'sedang_' . $fupload_name, ['width' => 880, 'height' => 660]);
unlink($uploadedImage['full_path']);
// Hapus gambar lama
if ($old_foto) {
unlink($lokasi . 'kecil_' . $old_foto);
unlink($lokasi . 'sedang_' . $old_foto);
}
return $fupload_name;
}
}
function ResizeGambar($filename, $path, array $dimensi)
{
$source_path = $filename;
$target_path = $path;
$imgdata = exif_read_data($target_path, 'IFD0');
$config_manip = [
'image_library' => 'gd2',
'source_image' => $source_path,
'new_image' => $target_path,
'maintain_ratio' => true,
'create_thumb' => false,
'thumb_marker' => '_thumb',
'width' => $dimensi['width'],
'height' => $dimensi['height'],
];
$ci = &get_instance();
$ci->load->library('image_lib');
$ci->image_lib->initialize($config_manip);
if (! $ci->image_lib->resize()) {
session_error($ci->image_lib->display_errors());
return false;
}
$ci->image_lib->clear();
//putar gambar
$config['image_library'] = 'gd2';
$config['source_image'] = $path;
switch ($imgdata['Orientation']) {
case 3:
$config['rotation_angle'] = '180';
break;
case 6:
$config['rotation_angle'] = '270';
break;
case 8:
$config['rotation_angle'] = '90';
break;
}
$ci->image_lib->initialize($config);
$ci->image_lib->rotate();
}
// $dimensi = array("width"=>lebar, "height"=>tinggi)
function resizeImage($filepath_in, string $tipe_file, array $dimensi, $filepath_out = ''): bool
{
// Hanya bisa resize jpeg atau png
$mime_type_image = ['image/jpeg', 'image/pjpeg', 'image/png', 'image/x-png'];
if (! in_array($tipe_file, $mime_type_image)) {
$_SESSION['error_msg'] .= ' -> Jenis file tidak bisa di-resize: ' . $tipe_file;
$_SESSION['success'] = -1;
return false;
}
if (empty($filepath_out)) {
$filepath_out = $filepath_in;
}
$is_png = ($tipe_file == 'image/png' || $tipe_file == 'image/x-png');
$image = ($is_png) ? imagecreatefrompng($filepath_in) : imagecreatefromjpeg($filepath_in);
$width = imagesx($image);
$height = imagesy($image);
$new_width = $dimensi['width'];
$new_height = $dimensi['height'];
if ($width > $new_width && $height > $new_height) {
if ($width < $height) {
$dst_width = $new_width;
$dst_height = ($dst_width / $width) * $height;
$cut_height = $dst_height - $new_height;
$cut_width = 0;
} else {
$dst_height = $new_height;
$dst_width = ($dst_height / $height) * $width;
$cut_width = $dst_width - $new_width;
$cut_height = 0;
}
$image_p = imagecreatetruecolor($new_width, $new_height);
if ($is_png) {
// path_to_url
imagealphablending($image_p, false);
imagesavealpha($image_p, true);
}
imagecopyresampled($image_p, $image, 0, 0, $cut_width, $cut_height, $dst_width, $dst_height, $width, $height);
if ($is_png) {
imagepng($image_p, $filepath_out, 5);
} else {
imagejpeg($image_p, $filepath_out);
}
imagedestroy($image_p);
imagedestroy($image);
} else {
// Ukuran file tidak perlu di-resize
copy($filepath_in, $filepath_out);
imagedestroy($image);
}
return true;
}
/** TODO: tulis ulang semua penggunaan supaya menggunakan resizeImage()
* $jenis_upload contoh "logo", "foto"
* $dimensi = array("width"=>lebar, "height"=>tinggi)
* $lokasi contoh LOKASI_LOGO_DESA
* $nama_simpan contoh "kecil_".$fupload_name
*
* @param mixed $lokasi
* @param mixed $dimensi
* @param mixed $jenis_upload
* @param mixed $fupload_name
* @param mixed $nama_simpan
* @param mixed $old_foto
* @param mixed $tipe_file
*/
function UploadResizeImage($lokasi, array $dimensi, $jenis_upload, string $fupload_name, string $nama_simpan, ?string $old_foto, string $tipe_file): bool
{
// Hanya bisa upload jpeg atau png
$mime_type_image = ['image/jpeg', 'image/pjpeg', 'image/png', 'image/x-png'];
$ext_type_image = ['.jpg', '.jpeg', '.png'];
$ext = get_extension($fupload_name);
if (! in_array($tipe_file, $mime_type_image) || ! in_array($ext, $ext_type_image)) {
$_SESSION['error_msg'] .= ' -> Jenis file salah: ' . $tipe_file;
$_SESSION['success'] = -1;
return false;
}
$vdir_upload = $lokasi;
if ($old_foto !== null && $old_foto !== '') {
unlink($vdir_upload . $old_foto);
}
$filepath_in = $vdir_upload . $fupload_name;
$filepath_out = $vdir_upload . $nama_simpan;
move_uploaded_file($_FILES[$jenis_upload]['tmp_name'], $filepath_in);
$is_png = ($tipe_file == 'image/png' || $tipe_file == 'image/x-png');
$image = ($is_png) ? imagecreatefrompng($filepath_in) : imagecreatefromjpeg($filepath_in);
$width = imagesx($image);
$height = imagesy($image);
$new_width = $dimensi['width'];
$new_height = $dimensi['height'];
if ($width > $new_width && $height > $new_height) {
$ratio_orig = $width / $height;
$dst_width = $new_width;
$dst_height = $new_height;
if ($new_width / $new_height > $ratio_orig) {
$dst_width = $new_height * $ratio_orig;
} else {
$dst_height = $new_width / $ratio_orig;
}
$image_p = imagecreatetruecolor($new_width, $new_height);
if ($is_png) {
// path_to_url
imagealphablending($image_p, false);
imagesavealpha($image_p, true);
}
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $dst_width, $dst_height, $width, $height);
if ($is_png) {
imagepng($image_p, $filepath_out, 5);
} else {
imagejpeg($image_p, $filepath_out);
}
imagedestroy($image_p);
imagedestroy($image);
} else {
// Ukuran file tidak perlu di-resize
copy($filepath_in, $filepath_out);
imagedestroy($image);
}
return true;
}
function UploadSimbol(string $fupload_name): void
{
$vdir_upload = 'assets/images/gis/point/';
$vfile_upload = $vdir_upload . $fupload_name;
move_uploaded_file($_FILES['simbol']['tmp_name'], $vfile_upload);
}
// Upload umum. Parameter lokasi dan file di $_FILES
function UploadKeLokasi(string $lokasi, $file, string $fupload_name, string $old_dokumen = ''): void
{
$vfile_upload = $lokasi . $fupload_name;
move_uploaded_file($file, $vfile_upload);
unlink($lokasi . $old_dokumen);
}
function UploadDocument(string $fupload_name, string $old_dokumen = ''): void
{
$vfile_upload = LOKASI_DOKUMEN . $fupload_name;
move_uploaded_file($_FILES['satuan']['tmp_name'], $vfile_upload);
unlink(LOKASI_DOKUMEN . $old_dokumen);
}
function UploadDocument2(string $fupload_name): bool
{
$vdir_upload = LOKASI_DOKUMEN;
$vfile_upload = $vdir_upload . $fupload_name;
move_uploaded_file($_FILES['dokumen']['tmp_name'], $vfile_upload);
//unlink($vfile_upload);
return true;
}
function UploadPengesahan(string $fupload_name): void
{
$vdir_upload = LOKASI_PENGESAHAN;
$vfile_upload = $vdir_upload . $fupload_name;
move_uploaded_file($_FILES['pengesahan']['tmp_name'], $vfile_upload);
$im_src = imagecreatefromjpeg($vfile_upload);
$src_width = imagesx($im_src);
$src_height = imagesy($im_src);
if (($src_width / $src_height) < (12 / 10)) {
$dst_width = 120;
$dst_height = ($dst_width / $src_width) * $src_height;
$cut_height = $dst_height - 100;
$im = imagecreatetruecolor(120, 100);
imagecopyresampled($im, $im_src, 0, 0, 0, $cut_height, $dst_width, $dst_height, $src_width, $src_height);
} else {
$dst_height = 100;
$dst_width = ($dst_height / $src_height) * $src_width;
$cut_width = $dst_width - 120;
$im = imagecreatetruecolor(120, 100);
imagecopyresampled($im, $im_src, 0, 0, $cut_width, 0, $dst_width, $dst_height, $src_width, $src_height);
}
}
/*
Hasilkan nama file yg aman untuk digunakan di url
source = path_to_url
*/
function bersihkan_namafile($nama): string
{
// Simpan extension
$ext = get_extension($nama);
// replace non letter or digits by -
$nama = preg_replace('~[^\pL\d]+~u', '-', $nama);
// transliterate
$nama = iconv('utf-8', 'us-ascii//TRANSLIT', $nama);
// remove unwanted characters
$nama = preg_replace('~[^\-\w]+~', '', $nama);
// trim
$nama = trim($nama, '-');
// remove duplicate -
$nama = preg_replace('~-+~', '-', $nama);
// lowercase
return strtolower($nama . $ext);
}
function periksa_file($upload, $mime_types, $exts): string
{
if (empty($_FILES[$upload]['tmp_name']) || (int) $_FILES[$upload]['size'] > convertToBytes(max_upload() . 'MB')) {
return ' -> Error upload file. Periksa apakah melebihi ukuran maksimum';
}
$lokasi_file = $_FILES[$upload]['tmp_name'];
if (empty($lokasi_file)) {
return ' -> File tidak berhasil diunggah';
}
if (function_exists('finfo_open')) {
$finfo = finfo_open(FILEINFO_MIME_TYPE);
$tipe_file = finfo_file($finfo, $lokasi_file);
} else {
$tipe_file = $_FILES[$upload]['type'];
}
$nama_file = $_FILES[$upload]['name'];
$nama_file = str_replace(' ', '-', $nama_file); // normalkan nama file
$ext = get_extension($nama_file);
if (! in_array($tipe_file, $mime_types) || ! in_array($ext, $exts)) {
return ' -> Jenis file salah: ' . $tipe_file . ' ' . $ext;
}
if (isPHP($lokasi_file, $nama_file)) {
return ' -> File berisi script ';
}
return '';
}
function qrcode_generate(array $qrcode = [], $base64 = false): string
{
$sizeqr = $qrcode['sizeqr'];
$foreqr = $qrcode['foreqr'];
$barcodeobj = new TCPDF2DBarcode($qrcode['isiqr'], 'QRCODE,H');
if (! empty($foreqr)) {
if ($foreqr[0] == '#') {
$foreqr = substr($foreqr, 1);
}
$split = str_split($foreqr, 2);
$r = hexdec($split[0]);
$g = hexdec($split[1]);
$b = hexdec($split[2]);
}
//Hasilkan QRCode
$imgData = $barcodeobj->getBarcodePngData($sizeqr, $sizeqr, [$r, $g, $b]);
$filename = sys_get_temp_dir() . '/qrcode_' . date('Y_m_d_H_i_s') . '_temp.png';
file_put_contents($filename, $imgData);
//Ubah backround transparan ke warna putih supaya terbaca qrcode scanner
$src_qr = imagecreatefrompng($filename);
$sizeqrx = imagesx($src_qr);
$sizeqry = imagesy($src_qr);
$backcol = imagecreatetruecolor($sizeqrx, $sizeqry);
$newwidth = $sizeqrx;
$newheight = ($sizeqry / $sizeqrx) * $newwidth;
$color = imagecolorallocatealpha($backcol, 255, 255, 255, 1);
imagefill($backcol, 0, 0, $color);
imagecopyresampled($backcol, $src_qr, 0, 0, 0, 0, $newwidth, $newheight, $sizeqrx, $sizeqry);
imagepng($backcol, $filename);
imagedestroy($src_qr);
imagedestroy($backcol);
//Tambah Logo
$logopath = $qrcode['logoqr']; // Logo yg tampil di tengah QRCode
$QR = imagecreatefrompng($filename);
$logo = imagecreatefromstring(file_get_contents($logopath));
imagecolortransparent($logo, imagecolorallocatealpha($logo, 0, 0, 0, 127));
imagealphablending($logo, false);
imagesavealpha($logo, true);
$QR_width = imagesx($QR);
$logo_width = imagesx($logo);
$logo_height = imagesy($logo);
$logo_qr_width = $QR_width / 4;
$scale = $logo_width / $logo_qr_width;
$logo_qr_height = $logo_height / $scale;
$from_width = ($QR_width - $logo_qr_width) / 2;
imagecopyresampled($QR, $logo, $from_width, $from_width, 0, 0, $logo_qr_width, $logo_qr_height, $logo_width, $logo_height);
imagepng($QR, $filename);
imagedestroy($QR);
if ($base64) {
return 'data:image/png;base64,' . base64_encode(file_get_contents($filename));
}
return $filename;
}
function upload_foto_penduduk(?string $nama_file = '', ?string $dimensi = '')
{
$foto = $_POST['foto'];
$old_foto = $_POST['old_foto'];
if ($nama_file) {
$nama_file = time() . random_int(10000, 999999);
}
if ($_FILES['foto']['tmp_name']) {
$nama_file .= get_extension($_FILES['foto']['name']);
UploadFoto($nama_file, $old_foto, $dimensi);
} elseif ($foto) {
$nama_file .= '.png';
$foto = str_replace('data:image/png;base64,', '', $foto);
$foto = base64_decode($foto, true);
if (isset($old_foto)) {
// Hapus old_foto
unlink(LOKASI_USER_PICT . $old_foto);
unlink(LOKASI_USER_PICT . 'kecil_' . $old_foto);
}
file_put_contents(LOKASI_USER_PICT . $nama_file, $foto);
file_put_contents(LOKASI_USER_PICT . 'kecil_' . $nama_file, $foto);
} else {
$nama_file = null;
}
return $nama_file;
}
function to_base64($file): string
{
$type = pathinfo($file, PATHINFO_EXTENSION);
$data = file_get_contents($file);
return 'data:image/' . $type . ';base64,' . base64_encode($data);
}
function home_noimage(): string
{
return to_base64(LOKASI_FILES_LOGO . 'home.png');
}
function unggah_file(array $config = [], $old_file = null)
{
$ci = &get_instance();
$ci->load->library('MY_Upload', null, 'upload');
$ci->upload->initialize($config);
if (! $ci->upload->do_upload('file')) {
session_error($ci->upload->display_errors(null, null));
redirect($_SERVER['HTTP_REFERER']);
}
$data = $ci->upload->data();
if ($old_file) {
unlink($config['upload_path'] . $old_file);
}
return $data['file_name'];
}
function generateDimensi($dimensi)
{
[$width, $height] = explode('x', $dimensi);
$width = bilangan($width) ? (int) (bilangan($width)) : 200;
$height = bilangan($height) ? (int) (bilangan($height)) : 200;
return ['width' => $width, 'height' => $height];
}
```
|
```java
/*
* 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, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
package org.apache.beam.sdk.extensions.sbe;
import static java.util.stream.Collectors.collectingAndThen;
import static java.util.stream.Collectors.toList;
import static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Preconditions.checkArgument;
import java.util.Iterator;
import java.util.List;
import org.apache.beam.sdk.extensions.sbe.SbeSchema.IrOptions;
import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableList;
import uk.co.real_logic.sbe.ir.Encoding.Presence;
import uk.co.real_logic.sbe.ir.Ir;
import uk.co.real_logic.sbe.ir.Token;
/** Utility for generating {@link SbeField}s from an {@link Ir}. */
final class IrFieldGenerator {
private IrFieldGenerator() {}
/**
* Generates the {@link SbeField}s for a given {@link Ir}.
*
* @param ir the intermediate representation to use for generating the fields
* @param irOptions options for handling ambiguous situations
* @return all the fields in the IR
*/
public static ImmutableList<SbeField> generateFields(Ir ir, IrOptions irOptions) {
ImmutableList.Builder<SbeField> fields = ImmutableList.builder();
TokenIterator iterator = getIteratorForMessage(ir, irOptions);
while (iterator.hasNext()) {
Token token = iterator.next();
switch (token.signal()) {
case BEGIN_FIELD:
fields.add(processPrimitive(iterator));
break;
default:
// TODO(path_to_url Support remaining field types
break;
}
}
return fields.build();
}
/** Helper for getting the tokens for the target message. */
@SuppressWarnings("nullness") // False positive on already-checked messageId
private static TokenIterator getIteratorForMessage(Ir ir, IrOptions irOptions) {
List<Token> messages;
if (irOptions.messageId() == null && irOptions.messageName() == null) {
messages =
ir.messages().stream()
.collect(
collectingAndThen(
toList(),
lists -> {
checkArgument(!lists.isEmpty(), "No messages in IR");
checkArgument(
lists.size() == 1,
"More than one message in IR but no identifier provided.");
return lists.get(0);
}));
} else if (irOptions.messageName() != null) {
String name = irOptions.messageName();
messages =
ir.messages().stream()
.filter(li -> !li.isEmpty() && li.get(0).name().equals(name))
.collect(
collectingAndThen(
toList(),
lists -> {
checkArgument(!lists.isEmpty(), "No messages found with name %s", name);
checkArgument(
lists.size() == 1, "More than one message found with name %s", name);
return lists.get(0);
}));
} else {
messages = ir.getMessage(irOptions.messageId());
checkArgument(messages != null, "No message found with id %s", irOptions.messageId());
}
return new TokenIterator(messages);
}
/** Handles creating a field from the iterator. */
private static SbeField processPrimitive(TokenIterator iterator) {
checkArgument(iterator.hasNext());
PrimitiveSbeField.Builder primitiveField = PrimitiveSbeField.builder();
Token beginMessageToken = iterator.current();
primitiveField.setName(beginMessageToken.name());
// At least for primitive fields, the presence is either REQUIRED or OPTIONAL, never CONSTANT.
primitiveField.setIsRequired(beginMessageToken.encoding().presence() == Presence.REQUIRED);
Token encodingToken = iterator.next();
primitiveField.setType(encodingToken.encoding().primitiveType());
return primitiveField.build();
}
/** {@link Iterator} over {@link Token}s with support for getting current one. */
private static final class TokenIterator implements Iterator<Token> {
private final List<Token> tokens;
private int idx;
private TokenIterator(List<Token> tokens) {
this.tokens = tokens;
this.idx = -1;
}
@Override
public boolean hasNext() {
return idx < tokens.size() - 1;
}
@Override
public Token next() {
++idx;
return tokens.get(idx);
}
public Token current() {
return tokens.get(idx);
}
}
}
```
|
Alessandro Cordaro (born 2 May 1986) is a Belgian winger, who currently plays for Swift Hesperange in the Luxembourg Division of Honour.
Career
Cordaro began his career 1992 with R.A.A. Louviéroise and joined than in 2002 to Mons, here climbed 2006 with the team in the Jupiler League.
On 1 April 2009 R. Charleroi S.C. engaged the midfielder, who arrives from Mons and signed a three-year contract between 30 June 2012.
On 16 May 2011 he signed a 3-year contract with K.V. Mechelen
Statistics
International
Cordaro is of Italian descent. He has also played for Belgium U21 and holds nine games.
Honours
Zulte Waregem
Belgian Cup: 2016–17
References
External links
1986 births
Living people
Belgian men's footballers
Belgium men's youth international footballers
Belgian people of Italian descent
R.A.A. Louviéroise players
R.A.E.C. Mons (1910) players
R. Charleroi S.C. players
K.V. Mechelen players
S.V. Zulte Waregem players
R.E. Virton players
Belgian Pro League players
Challenger Pro League players
People from La Louvière
Men's association football midfielders
Footballers from Hainaut (province)
|
Jane Elizabeth Healy (born May 9, 1949) is an American journalist. She was the recipient of the Orlando Sentinel first Pulitzer Prize.
Early life and education
Healy was born on May 9, 1949, in Washington, D.C., to parents Paul and Connie. She graduated from Bethesda-Chevy Chase High School in 1967 and attended the University of Maryland where she earned a Bachelor of Science degree in 1971.
Career
After earning her bachelor's degree, Healy accepted a position as a copy aide at the New York Daily News, before moving to Florida to work for the Orlando Sentinel. In 1988, Healy became the first Sentinel writer to receive the Pulitzer Prize for Editorial Writing, for her series on the protesting against overdevelopment in Florida's Orange County. She was later awarded The Paul Hansell Award for Distinguished Achievement in Florida Journalism.
Healy eventually became the Sentinel's vice president and editorial page editor.
References
Living people
1949 births
Journalists from Washington, D.C.
University of Maryland, College Park alumni
20th-century American women journalists
Pulitzer Prize for Editorial Writing winners
20th-century American journalists
Orlando Sentinel people
21st-century American women
|
```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 view contains support for collecting and exposing aggregates over stats.
//
// In order to collect measurements, views need to be defined and registered.
// A view allows recorded measurements to be filtered and aggregated.
//
// All recorded measurements can be grouped by a list of tags.
//
// OpenCensus provides several aggregation methods: Count, Distribution and Sum.
//
// Count only counts the number of measurement points recorded.
// Distribution provides statistical summary of the aggregated data by counting
// how many recorded measurements fall into each bucket.
// Sum adds up the measurement values.
// LastValue just keeps track of the most recently recorded measurement value.
// All aggregations are cumulative.
//
// Views can be registered and unregistered at any time during program execution.
//
// Libraries can define views but it is recommended that in most cases registering
// views be left up to applications.
//
// # Exporting
//
// Collected and aggregated data can be exported to a metric collection
// backend by registering its exporter.
//
// Multiple exporters can be registered to upload the data to various
// different back ends.
package view // import "go.opencensus.io/stats/view"
// TODO(acetechnologist): Add a link to the language independent OpenCensus
// spec when it is available.
```
|
Leo Lee may refer to:
Leo Lee Tung-hai (1921–2010), Hong Kong businessman
Leo Ou-fan Lee (born 1942), Chinese academic
|
Charles Harper (15 July 1842 – 20 April 1912) was a pastoralist, newspaper proprietor and politician in colonial Western Australia.
Biography
Early life
Charles Harper was born on 15 July 1842 at Nardi, near Toodyay in Western Australia. His father was Reverend Charles Harper, a Church of England minister, and his mother, Julia Gretchem Harper née Lukin. He was educated privately.
Pastoral career
He took up farming in Beverley, Western Australia. In 1861 and again in 1864, he explored with other pioneers in the Yilgarn district.
From 1866, he was heavily involved in the pastoral industry. He was a pastoralist in the north-west of the state until 1868, overlanding to Geraldton in 1867 to secure provisions for Roebourne. From 1868 to 1870, he was involved in the pearling industry. He then briefly farmed at Beverley, before returning to the north west in 1871. He went into partnership with McKenzie Grant and Edgar in a de Grey sheep station, and was involved in the pearling industry until 1879.
Political career
On 28 March 1878, he was elected to the Western Australian Legislative Council for the North District, in a by-election occasioned by the resignation of Thomas Burges. He held the seat until the election of 12 March 1880, which he did not contest. On 1 March 1879, he married Fanny de Burgh, thereby becoming brother-in-law to Henry Brockman and James Morrison. They would have six sons and four daughters.
In 1880, he partnered with Alexander McRae in a pastoral venture on the Ashburton. That year, he also became a newspaper proprietor for the first time, becoming part owner of The Western Australian Times with John Winthrop Hackett. On 18 November 1879, the newspaper was renamed The West Australian. On 19 December 1885, they launched publication of the Western Mail.
On 27 October 1884, he entered parliament for the second time, having won the seat of York. In 1885, he built a home in Guildford, which he named Woodbridge House; the house still stands and is now part of the National Trust. In 1887, he was a member of the Agricultural Commission.
He held his Legislative Council seat until 21 October 1890, at which time the Legislative Council became fully nominative. He then contested and won the seat of Beverley in the Legislative Assembly. From June 1894, he was Father of the House in the Legislative Assembly. In 1895 he opened a school at Guildford, which would later be taken over by the Church of England as Guildford Grammar School. He was appointed Chairman of Committees of the Legislative Assembly on 24 August 1897, holding the appointment until 2 December 1903, when he took up an appointment as Speaker. He stepped down as Speaker on 28 July 1904, and from his seat on 27 October 1905. In 1905, he was chairman of the Immigration Commission.
Death
He died at Woodbridge on 20 April 1912, and was buried in Karrakatta Cemetery.
Notes
References
Further reading
1842 births
1912 deaths
Burials at Karrakatta Cemetery
Members of the Western Australian Legislative Assembly
Members of the Western Australian Legislative Council
Chairmen of Committees of the Western Australian Legislative Assembly
Speakers of the Western Australian Legislative Assembly
People from Toodyay, Western Australia
Guildford Grammar School
Australian newspaper proprietors
19th-century Australian businesspeople
|
MusicMight (formerly RockDetector) was a rock music website that provides artist and product information through a global website and an ongoing book series. Based in New Zealand, the site was founded by British writer Garry Sharpe-Young, and was backed by a small team of international writers who contribute to the site.
Database contents
The database covered many styles and ages of rock music, such as thrash metal, black metal, death metal, radio rock and nu metal. As of December 2007, the database had over 59,400+ bands listed. The site included over 92,000 releases in the database and almost 659,000 songs. The site also had an international concert guide of over 300,000 concerts, archiving from 1965. The site also featured extensive and unique band biographies, many of which were the result of direct, first-hand interviews with band members conducted by Sharpe-Young during his many years as a heavy metal journalist.
Additional features included extensive discographies, pictures of the bands, their logos and their albums covers, upcoming concerts and album reviews.
The site went without updates for some time, bearing a message that a new expanded version of Rockdetector is on its way. On 1 September 2008 the site started after more than one year of re-programming and testing with an improved concept, layout and a re-designed database under the new name Musicmight.com with 60,000 artists and 144,000 persons included in the database.
Sharpe-Young died in March 2010. Site development, expansion and data additions have since halted, and the site was later taken down.
Growth
Books
Black Metal – September 2001
Death Metal – September 2001
Ozzy Osbourne – February 2002
Thrash Metal – October 2002
Power Metal – February 2003
Doom, Gothic & Stoner Metal – February 2003
80s Rock – July 2003
Black Sabbath – Never Say Die – 2004
New Wave of American Heavy Metal – November 2005
Sabbath Bloody Sabbath – The Battle For Black Sabbath – August 2006
Thrash Metal – Amended – October 2007
Death Metal – Amended – April 2008
References
External links
Official website
Heavy metal publications
New Zealand music websites
|
Karuna was a municipality in Southwest Finland region of Western Finland Province, Finland, until 1969 when it merged into the municipality of Sauvo. Part of the former municipality, the village of Sandö, was merged into the municipality of Kimito. In 1963, Karuna had 1,213 inhabitants. About 700 people inhabit the area currently. A peculiarity regarding the church of Karuna is that the older wooden church from 1685 was transported into the open-air museum of Seurasaari, Helsinki, and replaced by a stone church in 1910 designed by Josef Stenbäck.
See also
Karuna homepage, in Finnish
Sauvo
Populated places disestablished in 1969
Former municipalities of Finland
|
A tomb ( tumbos) is a repository for the remains of the dead. It is generally any structurally enclosed interment space or burial chamber, of varying sizes. Placing a corpse into a tomb can be called immurement, although this word mainly means entombing people alive, and is a method of final disposition, as an alternative to cremation or burial.
Overview
The word is used in a broad sense to encompass a number of such types of places of interment or, occasionally, burial, including:
Architectural shrines – in Christianity, an architectural shrine above a saint's first place of burial, as opposed to a similar shrine on which stands a reliquary or feretory into which the saint's remains have been transferred
Burial vault – a stone or brick-lined underground space for multiple burials, originally vaulted, often privately owned for specific family groups; usually beneath a religious building such as a
Church
Cemetery
Churchyard
Catacombs
Chamber tomb
Charnel house
Church monument – within a church (or a tomb-style chest in a churchyard) may be a place of interment, but this is unusual; it may more commonly stand over the grave or burial vault rather than containing the actual body and therefore is not a tomb.
Coemeterium
Crypts – often, though not always, for interment; similar to burial vaults but usually for more general public interment
Funeral home
Hypogeum tomb – stone-built underground structure for interment, such as the tombs of ancient Egypt
Kokh (tomb) – a rectangular rock-cut sloping space, running inward, like tunnels into rock, sufficiently high and wide to permit the admission of a corpse
Martyrium – Mausoleum for the remains of martyrs, such as San Pietro in Montorio
Mausoleum (including ancient pyramid in some countries) – external free-standing structure, above ground, acting as both monument and place of interment, usually for individuals or a family group
Mazar, Marqad or (Islamic terminology for tombs of notable religious figures or saints, or mausolea):
Maqam (or Mashhad)
Dargah
Türbe
Zawiya (or Darih)
Rauza
Qubba
Gongbei
Megalithic tomb (including Chamber tomb) – prehistoric place of interment, often for large communities, constructed of large stones and originally covered with an earthen mound
Necropolis
Ohel, a structure built around the grave or graves of Hasidic Rebbes, prominent rabbis, Jewish community leaders, and biblical figures in Israel and the diaspora
Pillar tomb – a monumental grave. Its central feature is a single, prominent pillar or column, often made of stone.
Rock-cut tomb – a form widespread in the ancient world, in which the tomb is not built but carved out of the rock and can be a free-standing building but is more commonly a cave, which may be extensive and may or may not have an elaborate facade.
Sarcophagus – a stone container for a body or coffin, often decorated and perhaps part of a monument; it may stand within a religious building or greater tomb or mausoleum.
Sepulchre – a cavernous rock-cut space for interment, generally in the Jewish or Christian faiths (cf. Holy Sepulchre).
Samadhi – in India a tomb for a deceased saint that often has a larger building over it as a shrine
Other forms of archaeological "tombs", such as ship burials
Tumulus – (plural: tumuli) A mound of earth and stones raised over a grave or graves. Tumuli are also known as barrows, burial mounds, Hügelgräber or kurgans', and can be found throughout much of the world. A cairn (a mound of stones built for various purposes), might also be originally a tumulus. A long barrow is a long tumulus, usually for numbers of burials.
As indicated, tombs are generally located in or under religious buildings, such as churches, or in cemeteries or churchyards. However, they may also be found in catacombs, on private land or, in the case of early or pre-historic tombs, in what is today open landscape.
The Daisen Kofun, the tomb of Emperor Nintoku (the 16th Emperor of Japan), is the largest in the world by area. However, the Pyramid of Khufu in Egypt is the largest by volume.
Composition
Cadaver monument
Coffin
Columbarium
Epitaph
Grave
Grave goods
Headstone
Lychgate
Morgue
Ossuary
Reliquary
Styles
Beehive tomb
English church monuments
Notable examples:
Dartmoor kistvaens
Mausoleum at Halicarnassus
Great Pyramids
Taj Mahal
Tomb of Alexander the Great
Tomb of Genghis Khan
Mausoleum of the First Qin Emperor
Green Dome, which contains the tombs of Muhammad and two of his elite companions, housed within the Prophet's Mosque in Medina
Catacombs of Paris
Catacombs of Rome
The Panthéon
Church of the Holy Sepulchre, which contains the empty tomb of Jesus, where according to early Christian tradition he was buried and resurrected.
Thracian Tomb of Kazanlak, Bulgaria
Thracian Tomb of Sveshtari, Bulgaria
Tomb of Seuthes III, Bulgaria
Tomb of the Unknown Soldier
United Kingdom: The Unknown Warrior
France: Tomb of the Unknown Soldier beneath the Arc de Triomphe de l'Étoile
United States: Tomb of the Unknown Soldier in Arlington National Cemetery
Iraq: Monument to the Unknown Soldier
Russia: Tomb of the Unknown Soldier in Alexander Garden, Moscow
See also
Death in Norse paganism
List of burial places of presidents and vice presidents of the United States
List of extant papal tombs
List of mausolea
List of necropoleis
List of non-extant papal tombs
List of tombs and mausoleums
References
External links
Burial monuments and structures
Subterranea (geography)
|
```python
from office365.onedrive.lists.list import List
from office365.runtime.client_object import ClientObject
from office365.runtime.paths.resource_path import ResourcePath
from office365.runtime.queries.service_operation import ServiceOperationQuery
from office365.sharepoint.webs.web import Web
class RemoteWeb(ClientObject):
"""Specifies a remote web that might be on a different domain."""
def get_list_by_server_relative_url(self, server_relative_url):
"""
Returns the list that is associated with the specified server-relative URL.
:param str server_relative_url: A string that contains the site-relative URL for a list.
"""
target_list = List(self.context)
qry = ServiceOperationQuery(
self,
"GetListByServerRelativeUrl",
[server_relative_url],
None,
None,
target_list,
)
self.context.add_query(qry)
return target_list
@staticmethod
def create(context, request_url):
"""
:type context: ClientContext
:type request_url: str
"""
remote_web = RemoteWeb(context)
qry = ServiceOperationQuery(
context, None, [request_url], None, None, remote_web
)
qry.static = True
context.add_query(qry)
return remote_web
@property
def web(self):
"""Gets the SPWeb."""
return self.properties.get(
"Web", Web(self.context, ResourcePath("Web", self.resource_path))
)
```
|
```python
import demistomock as demisto
import pytest
import ExportAuditLogsToFile
from freezegun import freeze_time
from CommonServerPython import *
def execute_command_side_effect(command: str, args: Dict):
if command == "splunk-submit-event-hec":
return [{'Contents': {'response': ["result1"]}}]
if command == "core-api-post":
if args["uri"] == '/settings/audits':
return [{'Contents': {'response': {'total': 2, "audits": ["audit1", "audit2"]}}, "Type": entryTypes["note"]}]
return [{'Contents': {'response': {'total': 2, "reply": {"data": ["audit1", "audit2"]}}}, "Type": entryTypes["note"]}]
return None
@freeze_time('2020-04-20')
def test_main_no_logs_xsoar6(mocker):
mocker.patch.object(demisto, 'args', return_value={'output': 'html', 'days_back': '5'})
execute_command_mock = mocker.patch.object(
demisto, 'executeCommand', return_value=[{'Contents': {'response': {'total': 0}}, "Type": entryTypes["note"]}]
)
mocker.patch.object(ExportAuditLogsToFile, "get_demisto_version", return_value={"version": "6.10"})
ExportAuditLogsToFile.main()
assert execute_command_mock.call_args.args[1]['body']['fromDate'] == '2020-04-15T00:00:00Z'
@freeze_time('2020-04-20')
@pytest.mark.parametrize(
'xsoar_version, expected_uri',
[
({"version": "6.10"}, "/settings/audits"),
({"version": "8.1"}, '/public_api/v1/audits/management_logs')
]
)
def test_main_with_logs(mocker, xsoar_version, expected_uri):
"""
Given:
- xsoar version
When:
- Calling main flow
Then:
- make sure the correct uri is called for each xsoar version
- make sure audit logs are fetched when its xsoar 6/8
"""
mocker.patch.object(demisto, 'args', return_value={'output': 'json', 'days_back': '5'})
execute_command_mocker = mocker.patch.object(
demisto,
'executeCommand',
side_effect=execute_command_side_effect
)
mocker.patch.object(ExportAuditLogsToFile, "fileResult", return_value=["audit1", "audit2"])
mocker.patch.object(ExportAuditLogsToFile, "get_demisto_version", return_value=xsoar_version)
demisto_results_mocker = mocker.patch.object(demisto, "results", return_value=[])
ExportAuditLogsToFile.main()
assert demisto_results_mocker.called
assert "Fetched 2 audit log events" in demisto_results_mocker.call_args_list[1][0][0]
assert execute_command_mocker.call_args_list[0][0][1]["uri"] == expected_uri
```
|
Dark Quetzal is a fantasy novel by British writer Katherine Roberts, first published in 2003 by The Chicken House. It is the final book in The Echorium Sequence and is the sequel to Crystal Mask, set 11 years after the events of that book. The main characters are Kyarra, Frazhin and Yashra's daughter who was raised as a singer, and Night Plume, a quetzal (half-man, half-bird) who has grown up under Frazhin's control.
Plot introduction
Dark Quetzal is set in the world of the Isle of Echoes where the Singers live in The Echorium. The Singers have many special abilities, the most important of which is knowledge of the Songs of Power: Challa for sleep, Kashe for laughter, Shi for sadness, Aushan for fear and Yehn for death. All Singer children, called novices, learn these Songs, but if their voices do not last into adulthood they receive a mild form of Yehn which makes them forget the Songs. The Singers can also farlisten to hear over great distances, an ability enhanced by the bluestone which the Isle is made up of, and hear truth. The Singers help to keep peace on the mainland, and produce treaties to protect Half Creatures - the half-human beings with knowledge of the Songs, which include merlee (fish people), naga (water snake people), quetzal (bird people) and centaurs (horse people).
During the novel Song Quest, set thirty one years before Dark Quetzal, the Singers encountered a powerful enemy in Khizpriest Frazhin, who harnessed the powers of a strange black crystal called the khiz to manipulate people's thoughts and memories. He attempted to destroy the Echorium by kidnapping a novice, Rialle, and was only stopped by the efforts of another novice, Kherron, who had originally been taken in by Frazhin. Although thought dead for many years, he returned eleven years before Dark Quetzal, joining with Lady Yashra of the Harai to kidnap street children and enslave centaurs in an attempt to build a Khizalace school of song to rival the Echorium. They were stopped by Rialle's novice son Renn and Shaiala, a girl raised by centaurs, and it appeared that Frazhin was drowned by naga while trying to escape. Lady Yashra was captured and sung Yehn, and her unborn child by Frazhin was raised as a normal novice of the Echorium. However, suspicions are raised when first Rialle, then Frazhin's daughter Kyarra, go missing.
Plot summary
Promising final year novice Kyarra is disappointed when she alone in her class is forbidden from going to the beach to try to contact the merlee about the disappearance of Rialle. Although she has moved up a year because of her promising voice, she fears that she will be rejected and turned into an orderly. Her sense of disappointment is only worsened when her best friend Caell hears the merlee, and receives a message from them that Kyarra's parents were not Singers. The merlee claim her mother is living in Windy Corner, waiting to hear from Kyarra, and together, Kyarra and Caell sneak out to find her. They arrive just in time to find Kyarra's mother being kidnapped - Kyarra is also taken, apparently expected to have come, and Caell tries to follow them with the merlee and is nearly drowned.
Meanwhile, in the Quetzal Forest, Night Plume, the black-feathered leader of a flock of quetzal, is annoyed to be sent for by the Starmaker - Frazhin, who is using the khiz to brainwash and control groups of half-creatures raised by his priests, including the merlee who sent the message to Caell. Night Plume is asked to listen to Rialle as she is fed a memory drug made from yellow flowers, and store what he hears about the Starmaker's daughter - Kyarra - in the Memoryplace, the quetzal's collective ancestral memory. He does as he is asked, but Rialle's songs begin to break the Starmaker's hold on him, and when he is released he attempts to make contact with wild quetzal, getting himself and his friend Sky Swooper in trouble. Although Frazhin still believes Night Plume is under his control, he holds Sky Swooper captive to ensure loyalty. Summoning Night Plume to the temple, Frazhin orders him and his flock to accompany Kyarra on her journey through Quetzal Forest - although Night Plume is distracted by a message in Wild Speech from Rialle imploring him to fly to the Echorium for help.
Kyarra is transported to the edge of Quetzal Forest by Asil, a famous pirate. On the journey she is watched over by Asil's daughter Jilian who, along with the rest of the pirates, wears khiz stars to protect themselves from Kyarra's singing. She also bonds with her mother, who was left helpless by the Yehn she was given and is completely incapable of caring for herself. Nevertheless, Kyarra feels very protective of her, and sings one of the pirates Shi for attempting to harm her. The group just reach the edge of the forest when they are suddenly attacked by wild quetzal. Kyarra's song helps herself, her mother and Jilian escape, but they are unexpectedly captured by Shaiala and some centaurs with herstones. Recognising Yashra, Shaiala takes the group and other captured pirates to the Kaleri.
Night Plume's flock arrives just in time to see Kyarra vanish into green light, and Night Plume realises he, unlike the enchanted quetzal, is free to travel past the edge of the Forest. He orders the flock to delay their return, and flies over the sea, but cannot find the island. Instead he lands on a ship, where he meets Caell, Renn and Kherron journeying to the mainland to search for Kyarra. When he reveals his ability to speak human speech, Kherron becomes suspicious, particularly as Night Plume admits to being raised by Frazhin. Night Plume faithfully passes on Rialle's message, including a warning that Frazhin is trying to poison the Echorium, and that he saw Kyarra vanish into green light - a sign Renn recognises as being Shaiala's work. They reach Silvertown and learn it has been poisoned - although for most residents this is not fatal - and the group encounters Lord Azri. Telling him about Frazhin, Azri agrees they must seek him out and attack, but the Singers must first fulfill their obligation to Kyarra and head to the Purple Plains to look for her.
In the Horselord's camp, Kyarra is horrified to learn of her mother's crimes, and maintains that her punishment was undeserved. WHile she is glad to hear that Yashra will be cared for by the Harai, she is horrified to learn that Jilian is to be used as bait for her father, putting her in great danger. At a meeting, the Horselords hear a prophecy from Speaks Many Tongues, an inhabitant of Quetzal Forest, warning of doom when the dark quetzal flies. As the prophecy is spoken, Frazhin's quetzal attack the camp and, in the confusion, Kyarra frees Jilian and escapes with Speaks Many Tongues into the forest. Night Plume, scouting ahead for the Singers, learns from his flock that Frazhin has punished Sky Swooper for Night Plume's disappearance. The flock attack Night Plume, and he is badly injured, although the arrival of the Singers protects him from the angry Horselords.
Kyarra, Jilian and Speaks Many Tongues journey into the forest, where Speaks Many Tongues insists on them meeting Xiancotl, the forest people's holy man, and travelling with him into the quetzal Memoryplace using yellow flowers. Before their arrival, they meet Shaiala, who has followed them with some centaurs, and she is invited to join them in the memory trance. Each girl asks a question: Shaiala successfully learns that the centaurs are uncorruptible because they do not hatch from eggs, but when Kyarra attempts to discover how to heal her mother, the memory trance is interrupted and instead she receives a summons from Frazhin. The disruption causes Xiancotl and Kyarra to pass out, and in the panic this causes Jilian, Shaiala and Kyarra escape to the centaurs. However, on Kyarra's insistence, they allow Frahin's naga to take her to him, where she hopes she will be able to subdue him with her Songs.
The Singers and the Horselords regroup and prepare to head into the Forest and attack Frazhin. Although initially concerned for Kyarra, they are appeased when Speaks Many Tongues informs them that she disappeared with Shaiala. Speaks Many Tongues warns that Frazhin is planning to use the yellow flowers gathered by Night Plume's flock to travel into the quetzal Memoryplace and replace it with one of his own making, in which Singers will no longer exist. Although most of the Singers are horrified by this, Kherron is distracted by the promise of a miracle healing potion which Speaks Many Tongues suggests might heal his voice. The next day, the army travels into the Forest and surrounds the volcano where Frazhin has made his Temple, which is beginning to erupt as he prepares to enter the Memoryplace.
With the help of the centaurs, who arrive with Shaiala and Jilian, the army breaches the crater and begins searching for Frazhin. Although Caell and Night Plume are told to wait outside, they grow restless, and make their way into the crater. Night Plume is horrified to see the bodies of the eldest and youngest quetzal, who were useless for the memory trance, along with Sky Swooper, punished for his disappearance by having her wings cut off before she was killed. Using wild speech, Night Plume breaks the memory trance on the other quetzal, and reasserts his leadership of the flock.
Kyarra is taken by Frazhin to a ball made of crystal, called the Fane. Frazhin plans to seal the pair of them inside it, and then be rolled into the volcano to protect them from the approaching Singers. Within the Fane, they will use the Memoryplace - its power heightened by the captive quetzal and the yellow flower drug sent to the Isle of the Echoes and Silvertown - to change history so that Yashra is healed and the Singers do not exist. Although reluctant, Kyarra feels she has no choice but to get into the Fane. Just as it is sealed, Caell arrives, making Kyarra believe that the memory trance has brought him back from being drowned by merlee.
Although the Singers rescue the Fane from the priests and end the volcano's eruption, they are unable to open the Fane, within which Kyarra is rapidly running out of air. Feeling they have no choice, Renn, Rialle, Caell, Night Plume and a newly healed Kherron sing Yehn, hoping that it will break Frazhin's power. Although the Fane opens, the Yehn does not affect Frazhin, and he takes Kyarra hostage before being brought down by Night Plume and Jilian. Five years later, Kyarra wakes from the Yehn with the help of the forest people's potions, and is greeted by a reformed Lady Yashra, also healed, along with Night Plume, Caell, Jilian and Rialle. Although she is initially confused, she learns that Frazhin is dead and the Half Creatures are free again. Frazhin has been revealed to be a half-Singer child who was born on the Isle, but rejected from the Echorium because of his resistance to the Songs. Kyarra resolves to learn how to become both a Singer and a Harai princess, and plans to become the Echorium's first female Second Singer.
Characters
Kyarra - A gifted novice at the Echorium who is shocked to learn that she is the daughter of Frazhin and Lady Yashra.
Caell - Kyarra's close friend in the Echorium who can talk to Half Creatures, and later forms a close friendship with Night Plume.
Singer Kherron - A Songless ex-Second Singer who is resentful and desperate to sing again.
Singer Renn - The newly appointed Second Singer sent to recover Kyarra.
Singer Graia - The First Singer of the Echorium.
Singer Rialle - A claustrophobic Singer with a close bond to merlee who is kidnapped by Frazhin.
Night Plume - A dark-coloured quetzal, leader of a flock under Frazhin's control, who is freed by Rialle's songs.
Yashra - Kyarra's mother, who received Yehn for her crimes in Crystal Mask and is now helpless.
Frazhin - A disfigured man who controls Half Creatures using khiz crystal.
Shaiala - A Kaleri woman with a close bond to the centaurs.
Erihan - A Kaleri prince, and later leader of the tribe.
Lord Nahar - Erihan's father, the initial leader of the tribe.
Xiancotl - Holy man of the forest people.
Speaks Many Tongues - Translator for the forest people.
Lord Zorahan - Leader of the Harai tribe.
Lord Azri - Karchlord.
Lianne - A novice at the Echorium who bullies Kyarra.
Jilian - Daughter of a famous pirate, Asil, she helps to kidnap Kyarra but then befriends her.
See also
The Echorium
References
External links
Katherine Roberts' homepage
Direct link to Dark Quetzal page
2003 British novels
British fantasy novels
Novels by Katherine Roberts
|
Donald E. Burkhart Jr. (born September 4, 1948) is an American politician and a Republican member of the Wyoming House of Representatives representing District 15 since January 11, 2011.
Education
Burkhart earned his BS in physics from John Carroll University.
Elections
2012 Burkhart and former Representative George Bagby were both unopposed for their August 21, 2012 primaries, setting up a rematch; Burkhart won the November 6, 2012 general election with 1,717 votes (51.1%) against Representative Bagby.
2010 To challenge incumbent Democratic Representative George Bagby for the District 15 seat, Burkhart won the August 17, 2010 Republican Primary with 497 votes (47.7%), and won the November 2, 2010 general election by 11 votes with 1,153 votes (49.4%) against Representative Bagby, who had held the seat since 2003.
References
External links
Official page at the Wyoming Legislature
Campaign site
21st-century American politicians
1948 births
John Carroll University alumni
Living people
Republican Party members of the Wyoming House of Representatives
People from Rawlins, Wyoming
Place of birth missing (living people)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.