text
stringlengths 1
22.8M
|
|---|
```go
package kingpin
import (
"os"
"regexp"
)
var (
envVarValuesSeparator = "\r?\n"
envVarValuesTrimmer = regexp.MustCompile(envVarValuesSeparator + "$")
envVarValuesSplitter = regexp.MustCompile(envVarValuesSeparator)
)
type envarMixin struct {
envar string
noEnvar bool
}
func (e *envarMixin) HasEnvarValue() bool {
return e.GetEnvarValue() != ""
}
func (e *envarMixin) GetEnvarValue() string {
if e.noEnvar || e.envar == "" {
return ""
}
return os.Getenv(e.envar)
}
func (e *envarMixin) GetSplitEnvarValue() []string {
envarValue := e.GetEnvarValue()
if envarValue == "" {
return []string{}
}
// Split by new line to extract multiple values, if any.
trimmed := envVarValuesTrimmer.ReplaceAllString(envarValue, "")
return envVarValuesSplitter.Split(trimmed, -1)
}
```
|
Electrical storm may refer to:
A thunderstorm
A medical condition of chaotic electrical activity of the heart, usually manifested by ventricular tachycardia
"Electrical Storm" (song), song by U2
Electrical Storm (album), the debut solo album by Ed Kuepper
An Electric Storm, the debut album by White Noise
|
Jean Mana Mamuwené (born 10 October 1947) is a Congolese football midfielder who played for Zaire in the 1974 FIFA World Cup. He also played for SC Imana.
References
External links
FIFA profile
1947 births
Africa Cup of Nations-winning players
Democratic Republic of the Congo men's footballers
Democratic Republic of the Congo men's international footballers
Men's association football midfielders
SM Sanga Balende players
Daring Club Motema Pembe players
1974 FIFA World Cup players
1974 African Cup of Nations players
Living people
21st-century Democratic Republic of the Congo people
|
```objective-c
#ifndef UTILS_H
#define UTILS_H
class Utils {
public:
static const std::size_t CalculatePadding(const std::size_t baseAddress, const std::size_t alignment) {
const std::size_t multiplier = (baseAddress / alignment) + 1;
const std::size_t alignedAddress = multiplier * alignment;
const std::size_t padding = alignedAddress - baseAddress;
return padding;
}
static const std::size_t CalculatePaddingWithHeader(const std::size_t baseAddress, const std::size_t alignment, const std::size_t headerSize) {
std::size_t padding = CalculatePadding(baseAddress, alignment);
std::size_t neededSpace = headerSize;
if (padding < neededSpace){
// Header does not fit - Calculate next aligned address that header fits
neededSpace -= padding;
// How many alignments I need to fit the header
if(neededSpace % alignment > 0){
padding += alignment * (1+(neededSpace / alignment));
}else {
padding += alignment * (neededSpace / alignment);
}
}
return padding;
}
};
#endif /* UTILS_H */
```
|
```c++
path_to_url
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#include "paddle/fluid/operators/batch_norm_op.h"
#include <memory>
#include <string>
#include <unordered_map>
#include "paddle/fluid/framework/data_layout.h"
#ifdef PADDLE_WITH_DNNL
#include "paddle/fluid/platform/onednn_helper.h"
#endif
#include "paddle/fluid/prim/api/composite_backward/composite_backward_api.h"
#include "paddle/fluid/prim/utils/static/composite_grad_desc_maker.h"
#include "paddle/fluid/prim/utils/static/desc_tensor.h"
#include "paddle/fluid/framework/infershape_utils.h"
#include "paddle/phi/infermeta/multiary.h"
namespace paddle {
namespace operators {
void BatchNormOp::InferShape(framework::InferShapeContext *ctx) const {
OP_INOUT_CHECK(ctx->HasInput("X"), "Input", "X", "BatchNorm");
OP_INOUT_CHECK(ctx->HasInput("Mean"), "Input", "Mean", "BatchNorm");
OP_INOUT_CHECK(ctx->HasInput("Variance"), "Input", "Variance", "BatchNorm");
OP_INOUT_CHECK(ctx->HasOutput("Y"), "Output", "Y", "BatchNorm");
bool is_test = ctx->Attrs().Get<bool>("is_test");
bool trainable_stats = ctx->Attrs().Get<bool>("trainable_statistics");
bool test_mode = is_test && (!trainable_stats);
if (!test_mode) {
OP_INOUT_CHECK(ctx->HasOutput("MeanOut"), "Output", "MeanOut", "BatchNorm");
OP_INOUT_CHECK(
ctx->HasOutput("VarianceOut"), "Output", "VarianceOut", "BatchNorm");
OP_INOUT_CHECK(
ctx->HasOutput("SavedMean"), "Output", "SavedMean", "BatchNorm");
OP_INOUT_CHECK(ctx->HasOutput("SavedVariance"),
"Output",
"SavedVariance",
"BatchNorm");
}
// make sure Mean/MeanOut and Variance/VarianceOut share memory in Python
PADDLE_ENFORCE_EQ(ctx->Inputs("Mean")[0],
ctx->Outputs("MeanOut")[0],
common::errors::InvalidArgument(
"Mean and MeanOut should share the same memory"));
PADDLE_ENFORCE_EQ(
ctx->Inputs("Variance")[0],
ctx->Outputs("VarianceOut")[0],
common::errors::InvalidArgument(
"Variance and VarianceOut should share the same memory"));
const auto x_dims = ctx->GetInputDim("X");
for (int i = 0; i < x_dims.size(); i++) {
PADDLE_ENFORCE_EQ(
(x_dims[i] == -1) || (x_dims[i] > 0),
true,
common::errors::InvalidArgument(
"Each dimension of input tensor is expected to be -1 or a "
"positive number, but received %d. Input's shape is [%s].",
x_dims[i],
x_dims));
}
const DataLayout data_layout =
common::StringToDataLayout(ctx->Attrs().Get<std::string>("data_layout"));
if (ctx->IsRuntime() && ctx->HasInput("MomentumTensor")) {
auto mom = ctx->Inputs("MomentumTensor");
PADDLE_ENFORCE_EQ(mom.size(),
1,
common::errors::InvalidArgument(
"The input tensor MomentumTensor's size must be 1"
"But received: MomentumTensor's size is [%d]",
mom.size()));
}
PADDLE_ENFORCE_GE(
x_dims.size(),
2,
common::errors::InvalidArgument(
"ShapeError: the dimension of input "
"X must greater than or equal to 2. But received: the shape of input "
"X = [%s], the dimension of input X =[%d]",
x_dims,
x_dims.size()));
PADDLE_ENFORCE_LE(
x_dims.size(),
5,
common::errors::InvalidArgument(
"ShapeError: the dimension of input X "
"must smaller than or equal to 5. But received: the shape of input X "
"= [%s], the dimension of input X = [%d]",
x_dims,
x_dims.size()));
VLOG(4) << ctx->IsRunMKLDNNKernel();
VLOG(4) << data_layout;
const int64_t C =
((ctx->IsRunMKLDNNKernel() == true) || (data_layout == DataLayout::kNCHW)
? x_dims[1]
: x_dims[x_dims.size() - 1]);
if (ctx->HasInput("Scale")) {
auto scale_dim = ctx->GetInputDim("Scale");
PADDLE_ENFORCE_EQ(
scale_dim.size(),
1UL,
common::errors::InvalidArgument(
"ShapeError: the dimension of scale must equal to 1."
"But received: the shape of scale is [%s], the dimension "
"of scale is [%d]",
scale_dim,
scale_dim.size()));
}
if (ctx->HasInput("Bias")) {
auto bias_dim = ctx->GetInputDim("Bias");
PADDLE_ENFORCE_EQ(
bias_dim.size(),
1UL,
common::errors::InvalidArgument(
"ShapeError: the dimension of bias must equal to 1."
"But received: the shape of bias is [%s],the dimension "
"of bias is [%d]",
bias_dim,
bias_dim.size()));
}
bool check = true;
if (!ctx->HasInput("Scale") || !ctx->HasInput("Bias") ||
((!ctx->IsRuntime()) &&
(common::product(ctx->GetInputDim("Scale")) <= 0 ||
common::product(ctx->GetInputDim("Bias")) <= 0))) {
check = false;
}
if (check) {
PADDLE_ENFORCE_EQ(ctx->GetInputDim("Scale")[0],
C,
common::errors::InvalidArgument(
"ShapeError: the shape of scale must equal to [%d]"
"But received: the shape of scale is [%d]",
C,
ctx->GetInputDim("Scale")[0]));
PADDLE_ENFORCE_EQ(ctx->GetInputDim("Bias")[0],
C,
common::errors::InvalidArgument(
"ShapeError: the shape of bias must equal to [%d]"
"But received: the shape of bias is [%d]",
C,
ctx->GetInputDim("Bias")[0]));
}
ctx->SetOutputDim("Y", x_dims);
ctx->ShareLoD("X", "Y");
VLOG(4) << x_dims;
ctx->SetOutputDim("MeanOut", {C});
ctx->SetOutputDim("VarianceOut", {C});
if (!test_mode) {
ctx->SetOutputDim("SavedMean", {C});
ctx->SetOutputDim("SavedVariance", {C});
}
if (ctx->HasOutput("ReserveSpace")) {
ctx->SetOutputDim("ReserveSpace", {-1});
}
}
phi::KernelKey BatchNormOp::GetExpectedKernelType(
const framework::ExecutionContext &ctx) const {
auto input_data_type = OperatorWithKernel::IndicateVarDataType(ctx, "X");
// By default, the type of the scale, bias, mean,
// and var tensors should both be float. (For float or float16 input tensor)
// or double (For double input tensor).
auto bn_param_type = framework::proto::VarType::FP32;
if (input_data_type == framework::proto::VarType::FP64) {
bn_param_type = framework::proto::VarType::FP64;
}
if (ctx.HasInput("Scale")) {
PADDLE_ENFORCE_EQ(
bn_param_type,
framework::TransToProtoVarType(
ctx.Input<phi::DenseTensor>("Scale")->dtype()),
common::errors::InvalidArgument("Scale input should be of float type"));
}
if (ctx.HasInput("Bias")) {
PADDLE_ENFORCE_EQ(
bn_param_type,
framework::TransToProtoVarType(
ctx.Input<phi::DenseTensor>("Bias")->dtype()),
common::errors::InvalidArgument("Bias input should be of float type"));
}
PADDLE_ENFORCE_EQ(
bn_param_type,
framework::TransToProtoVarType(
ctx.Input<phi::DenseTensor>("Mean")->dtype()),
common::errors::InvalidArgument("Mean input should be of float type"));
PADDLE_ENFORCE_EQ(bn_param_type,
framework::TransToProtoVarType(
ctx.Input<phi::DenseTensor>("Variance")->dtype()),
common::errors::InvalidArgument(
"Variance input should be of float type"));
return phi::KernelKey(input_data_type, ctx.GetPlace());
}
phi::KernelKey BatchNormOp::GetKernelTypeForVar(
const std::string &var_name,
const phi::DenseTensor &tensor,
const phi::KernelKey &expected_kernel_type) const {
#ifdef PADDLE_WITH_DNNL
// Only input require reshaping, weights and
// bias are having shape in NCHW order
if ((var_name == "X") &&
(expected_kernel_type.layout() == phi::DataLayout::ONEDNN) &&
(tensor.layout() != phi::DataLayout::ONEDNN)) {
auto attrs = Attrs();
auto ar = paddle::framework::AttrReader(attrs);
const std::string data_layout = ar.Get<std::string>("data_layout");
auto dl = common::StringToDataLayout(data_layout);
// Some models may have intentionally set "AnyLayout" for pool
// op. Treat this as NCHW (default data_format value)
if (dl != phi::DataLayout::kAnyLayout) {
return phi::KernelKey(tensor.place(), dl, expected_kernel_type.dtype());
}
}
#endif
return phi::KernelKey(
tensor.place(), tensor.layout(), expected_kernel_type.dtype());
}
void BatchNormOpMaker::Make() {
AddAttr<bool>("is_test",
"(bool, default false) Set to true for inference only, false "
"for training. Some layers may run faster when this is true.")
.SetDefault(false);
AddAttr<float>("momentum", "").SetDefault(0.9);
AddAttr<float>("epsilon", "")
.SetDefault(1e-5)
.AddCustomChecker([](const float &epsilon) {
PADDLE_ENFORCE_GE(
epsilon,
0.0f,
common::errors::InvalidArgument(
"'epsilon' should be greater or equal than 0.0."));
PADDLE_ENFORCE_LE(epsilon,
0.001f,
common::errors::InvalidArgument(
"'epsilon' should be less or equal than 0.001."));
});
AddAttr<std::string>("data_layout", "").SetDefault("NCHW");
AddInput("X", "The input tensor");
AddInput("Scale",
"Scale is a 1-dimensional tensor of size C "
"that is applied to the output")
.AsDispensable();
AddInput("Bias",
"Bias is a 1-dimensional tensor of size C "
"that is applied to the output")
.AsDispensable();
AddInput("Mean",
"The global mean (for training) or "
"estimated mean (for testing)");
AddInput("Variance",
"The global variance (for training) "
"or estimated Variance (for testing)");
AddInput("MomentumTensor",
"(phi::DenseTensor<float32>, optional) If provided, batch_norm will "
"use this as momentum, this has a higher priority than "
"attr(momentum), the shape of this tensor MUST BE [1].")
.AsDispensable();
AddOutput("Y", "result after normalization");
AddOutput("MeanOut",
"Share memory with Mean. "
"Store the global mean when training");
AddOutput("VarianceOut",
"Share memory with Variance. "
"Store the global Variance when training");
AddOutput("SavedMean",
"Mean of the current mini batch, "
"will apply to output when training")
.AsIntermediate();
AddOutput("SavedVariance",
"Variance of the current mini batch, "
"will apply to output when training")
.AsIntermediate();
AddOutput("ReserveSpace",
"Reserve GPU space for triggering the new semi-persistent "
"NHWC kernel")
.AsDispensable()
.AsExtra();
AddAttr<bool>("use_global_stats",
"(bool, default false) Whether to use global mean and "
"variance. In inference or test mode, set use_global_stats "
"to true or is_test true. the behavior is equivalent. "
"In train mode, when setting use_global_stats True, the "
"global mean and variance are also used during train time, "
"the BN acts as scaling and shifting.")
.SetDefault(false);
AddAttr<bool>("trainable_statistics",
"(bool, default false) Whether to calculate mean and variance "
"in test mode. If setting true in test mode, mean and variance "
"will be calculated by current batch statistics.")
.SetDefault(false);
AddComment(R"DOC(
Batch Normalization.
Batch Norm has been implemented as discussed in the paper:
path_to_url
Can be used as a normalizer function for conv2d and fully_connected operations.
The required data format for this layer is one of the following:
1. NHWC `[batch, in_height, in_width, in_channels]`
2. NCHW `[batch, in_channels, in_height, in_width]`
)DOC");
}
void BatchNormGradOp::InferShape(framework::InferShapeContext *ctx) const {
// check input
OP_INOUT_CHECK(ctx->HasInput("Scale"), "Input", "Scale", "BatchNormGrad");
OP_INOUT_CHECK(ctx->HasInput(framework::GradVarName("Y")),
"Input",
framework::GradVarName("Y"),
"BatchNormGrad");
OP_INOUT_CHECK(
ctx->HasInput("SavedMean"), "Input", "SavedMean", "BatchNormGrad");
OP_INOUT_CHECK(ctx->HasInput("SavedVariance"),
"Input",
"SavedVariance",
"BatchNormGrad");
// check output
const bool has_scale_grad = ctx->HasOutput(framework::GradVarName("Scale"));
const bool has_bias_grad = ctx->HasOutput(framework::GradVarName("Bias"));
const bool has_x_grad = ctx->HasOutput(framework::GradVarName("X"));
PADDLE_ENFORCE_EQ((has_scale_grad == has_bias_grad),
true,
common::errors::NotFound(
"Output(Scale@GRAD) and Output(Bias@GRAD) must be null "
"or not be null at same time. But now, "
"has Scale@Grad=[%d], has Bias@GRAD=[%d]",
has_scale_grad,
has_bias_grad));
const bool use_global_stats = ctx->Attrs().Get<bool>("use_global_stats");
if (use_global_stats) {
PADDLE_ENFORCE_EQ(
!ctx->Attrs().Get<bool>("use_mkldnn"),
true,
common::errors::InvalidArgument(
"Using global stats during training is not supported "
"in oneDNN version of batch_norm_gradient kernel now."));
}
OP_INOUT_CHECK(ctx->HasInput("X"), "Input", "X", "BatchNormGrad");
const auto x_dims = ctx->GetInputDim("X");
const DataLayout data_layout =
common::StringToDataLayout(ctx->Attrs().Get<std::string>("data_layout"));
const int C = static_cast<int>(
((ctx->IsRunMKLDNNKernel() == true) || (data_layout == DataLayout::kNCHW)
? x_dims[1]
: x_dims[x_dims.size() - 1]));
// has_scale_grad == has_bias_grad, judge has_scale_grad is enough
if (has_scale_grad) {
ctx->SetOutputDim(framework::GradVarName("Scale"), {C});
ctx->SetOutputDim(framework::GradVarName("Bias"), {C});
}
if (has_x_grad) {
ctx->SetOutputDim(framework::GradVarName("X"), x_dims);
}
}
phi::KernelKey BatchNormGradOp::GetExpectedKernelType(
const framework::ExecutionContext &ctx) const {
const auto *var = ctx.InputVar(framework::GradVarName("Y"));
if (var == nullptr) {
PADDLE_THROW(
common::errors::InvalidArgument("can't find gradient variable of Y"));
}
const phi::DenseTensor *t = nullptr;
if (var->IsType<phi::DenseTensor>()) {
t = &var->Get<phi::DenseTensor>();
}
if (t == nullptr) {
PADDLE_THROW(
common::errors::InvalidArgument("gradient variable of Y is empty"));
}
auto data_type = OperatorWithKernel::IndicateVarDataType(ctx, "X");
return phi::KernelKey(data_type, ctx.GetPlace());
}
phi::KernelKey BatchNormGradOp::GetKernelTypeForVar(
const std::string &var_name,
const phi::DenseTensor &tensor,
const phi::KernelKey &expected_kernel_type) const {
#ifdef PADDLE_WITH_DNNL
// Only input require reshaping, weights and
// bias are having shape in NCHW order
if (((var_name == "X") || (var_name == framework::GradVarName("Y"))) &&
(expected_kernel_type.layout() == phi::DataLayout::ONEDNN) &&
(tensor.layout() != phi::DataLayout::ONEDNN)) {
auto attrs = Attrs();
auto ar = paddle::framework::AttrReader(attrs);
const std::string data_layout = ar.Get<std::string>("data_layout");
auto dl = common::StringToDataLayout(data_layout);
// Some models may have intentionally set "AnyLayout" for pool
// op. Treat this as NCHW (default data_format value)
if (dl != phi::DataLayout::kAnyLayout) {
return phi::KernelKey(tensor.place(), dl, expected_kernel_type.dtype());
}
}
#endif
return phi::KernelKey(
tensor.place(), tensor.layout(), expected_kernel_type.dtype());
}
template <typename T>
void BatchNormGradMaker<T>::Apply(GradOpPtr<T> op) const {
op->SetType(this->ForwardOpType() + "_grad");
op->SetInput("X", this->Input("X"));
op->SetInput(framework::GradVarName("Y"), this->OutputGrad("Y"));
op->SetInput("Scale", this->Input("Scale"));
op->SetInput("Bias", this->Input("Bias"));
op->SetInput("SavedMean", this->Output("SavedMean"));
op->SetInput("SavedVariance", this->Output("SavedVariance"));
if (this->HasOutput("ReserveSpace")) {
op->SetInput("ReserveSpace", this->Output("ReserveSpace"));
}
// used when setting use_global_stats True during training
if (PADDLE_GET_CONST(bool, this->GetAttr("use_global_stats")) ||
PADDLE_GET_CONST(bool, this->GetAttr("is_test"))) {
op->SetInput("Mean", this->Output("MeanOut"));
op->SetInput("Variance", this->Output("VarianceOut"));
}
op->SetInput("MeanOut", this->Output("MeanOut"));
op->SetInput("VarianceOut", this->Output("VarianceOut"));
op->SetAttrMap(this->Attrs());
op->SetOutput(framework::GradVarName("X"), this->InputGrad("X"));
op->SetOutput(framework::GradVarName("Scale"), this->InputGrad("Scale"));
op->SetOutput(framework::GradVarName("Bias"), this->InputGrad("Bias"));
}
template <typename T>
void BatchNormDoubleGradMaker<T>::Apply(GradOpPtr<T> op) const {
op->SetType("batch_norm_grad_grad");
op->SetInput("X", this->Input("X"));
op->SetInput("Scale", this->Input("Scale"));
op->SetInput("SavedMean", this->Input("SavedMean"));
op->SetInput("SavedVariance", this->Input("SavedVariance"));
if (PADDLE_GET_CONST(bool, this->GetAttr("use_global_stats"))) {
op->SetInput("Mean", this->Input("Mean"));
op->SetInput("Variance", this->Input("Variance"));
}
op->SetInput("DDX", this->OutputGrad(framework::GradVarName("X")));
op->SetInput("DDScale", this->OutputGrad(framework::GradVarName("Scale")));
op->SetInput("DDBias", this->OutputGrad(framework::GradVarName("Bias")));
op->SetInput("DY", this->Input(framework::GradVarName("Y")));
op->SetAttrMap(this->Attrs());
op->SetOutput("DX", this->InputGrad("X"));
op->SetOutput("DScale", this->InputGrad("Scale"));
op->SetOutput("DDY", this->InputGrad(framework::GradVarName("Y")));
}
void BatchNormDoubleGradOp::InferShape(
framework::InferShapeContext *ctx) const {
OP_INOUT_CHECK(ctx->HasInput("X"), "Input", "X", "BatchNormDoubleGrad");
OP_INOUT_CHECK(
ctx->HasInput("Scale"), "Input", "Scale", "BatchNormDoubleGrad");
OP_INOUT_CHECK(
ctx->HasInput("SavedMean"), "Input", "SavedMean", "BatchNormDoubleGrad");
OP_INOUT_CHECK(ctx->HasInput("SavedVariance"),
"Input",
"SavedVariance",
"BatchNormDoubleGrad");
const bool use_global_stats = ctx->Attrs().Get<bool>("use_global_stats");
if (use_global_stats) {
OP_INOUT_CHECK(ctx->HasInput("Variance"),
"Input",
"VarianceOut",
"BatchNormDoubleGrad");
}
OP_INOUT_CHECK(ctx->HasInput("DY"), "Input", "DY", "BatchNormDoubleGrad");
// check output
OP_INOUT_CHECK(ctx->HasOutput("DX"), "Output", "DX", "BatchNormDoubleGrad");
const auto x_dims = ctx->GetInputDim("X");
const DataLayout data_layout =
common::StringToDataLayout(ctx->Attrs().Get<std::string>("data_layout"));
const int C = static_cast<int>(
((ctx->IsRunMKLDNNKernel() == true) || (data_layout == DataLayout::kNCHW)
? x_dims[1]
: x_dims[x_dims.size() - 1]));
if (ctx->HasOutput("DX")) {
ctx->SetOutputDim("DX", x_dims);
}
if (ctx->HasOutput("DScale")) {
ctx->SetOutputDim("DScale", {C});
}
if (ctx->HasOutput("DDY")) {
ctx->ShareDim("X", "DDY");
}
}
phi::KernelKey BatchNormDoubleGradOp::GetExpectedKernelType(
const framework::ExecutionContext &ctx) const {
const auto *var = ctx.InputVar("DY");
if (var == nullptr) {
PADDLE_THROW(
common::errors::NotFound("cannot find gradient variable of Y"));
}
const phi::DenseTensor *t = nullptr;
if (var->IsType<phi::DenseTensor>()) {
t = &var->Get<phi::DenseTensor>();
}
if (t == nullptr) {
PADDLE_THROW(
common::errors::InvalidArgument("gradient variable of Y is empty"));
}
return phi::KernelKey(OperatorWithKernel::IndicateVarDataType(ctx, "X"),
ctx.GetPlace());
}
class BatchNormCompositeGradOpMaker : public prim::CompositeGradOpMakerBase {
using prim::CompositeGradOpMakerBase::CompositeGradOpMakerBase;
public:
void Apply() override {
// inputs and outputs of batch_norm
paddle::Tensor x = this->GetSingleForwardInput("X");
paddle::Tensor scale = this->GetSingleForwardInput("Scale");
paddle::Tensor bias = this->GetSingleForwardInput("Bias");
paddle::Tensor mean = this->GetSingleForwardInput("Mean");
paddle::Tensor variance = this->GetSingleForwardInput("Variance");
paddle::Tensor y = this->GetSingleForwardOutput("Y");
paddle::Tensor mean_out = this->GetSingleForwardOutput("MeanOut");
paddle::Tensor variance_out = this->GetSingleForwardOutput("VarianceOut");
paddle::Tensor saved_mean = this->GetSingleForwardOutput("SavedMean");
paddle::Tensor saved_variance =
this->GetSingleForwardOutput("SavedVariance");
paddle::optional<paddle::Tensor> reserve_space;
paddle::Tensor y_grad = this->GetSingleOutputGrad("Y");
paddle::Tensor x_grad = this->GetSingleInputGrad("X");
paddle::Tensor scale_grad = this->GetSingleInputGrad("Scale");
paddle::Tensor bias_grad = this->GetSingleInputGrad("Bias");
auto dx_ptr = this->GetOutputPtr(&x_grad);
std::string dx_name = this->GetOutputName(x_grad);
auto dscale_ptr = this->GetOutputPtr(&scale_grad);
std::string dscale_name = this->GetOutputName(scale_grad);
auto dbias_ptr = this->GetOutputPtr(&bias_grad);
std::string dbias_name = this->GetOutputName(bias_grad);
// attrs of batch_norm
auto momentum = this->Attr<float>("momentum");
auto epsilon = this->Attr<float>("epsilon");
auto data_layout = this->Attr<std::string>("data_layout");
auto is_test = this->Attr<bool>("is_test");
auto use_global_stats = this->Attr<bool>("use_global_stats");
auto trainable_statistics = this->Attr<bool>("trainable_statistics");
VLOG(3) << "Running batch_norm composite func";
prim::batch_norm_grad<prim::DescTensor>(x,
scale,
bias,
mean_out,
variance_out,
saved_mean,
saved_variance,
reserve_space,
y_grad,
momentum,
epsilon,
data_layout,
is_test,
use_global_stats,
trainable_statistics,
dx_ptr,
dscale_ptr,
dbias_ptr);
this->RecoverOutputName(x_grad, dx_name);
this->RecoverOutputName(scale_grad, dscale_name);
this->RecoverOutputName(bias_grad, dbias_name);
}
};
DECLARE_INPLACE_OP_INFERER(BatchNormDoubleGradOpInplaceInferer, {"DY", "DDY"});
} // namespace operators
} // namespace paddle
namespace ops = paddle::operators;
DECLARE_INFER_SHAPE_FUNCTOR(batch_norm,
BatchNormInferShapeFunctor,
PD_INFER_META(phi::BatchNormInferMeta));
REGISTER_OPERATOR(batch_norm,
ops::BatchNormOp,
ops::BatchNormOpMaker,
ops::BatchNormOpInferVarType,
ops::BatchNormGradMaker<paddle::framework::OpDesc>,
ops::BatchNormGradMaker<paddle::imperative::OpBase>,
ops::BatchNormCompositeGradOpMaker);
REGISTER_OPERATOR(batch_norm_grad,
ops::BatchNormGradOp,
ops::BatchNormDoubleGradMaker<paddle::framework::OpDesc>,
ops::BatchNormDoubleGradMaker<paddle::imperative::OpBase>);
REGISTER_OPERATOR(batch_norm_grad_grad,
ops::BatchNormDoubleGradOp,
ops::BatchNormDoubleGradOpInplaceInferer);
```
|
```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\CloudSecurityToken;
class GoogleIdentityStsV1IntrospectTokenRequest extends \Google\Model
{
/**
* @var string
*/
public $token;
/**
* @var string
*/
public $tokenTypeHint;
/**
* @param string
*/
public function setToken($token)
{
$this->token = $token;
}
/**
* @return string
*/
public function getToken()
{
return $this->token;
}
/**
* @param string
*/
public function setTokenTypeHint($tokenTypeHint)
{
$this->tokenTypeHint = $tokenTypeHint;
}
/**
* @return string
*/
public function getTokenTypeHint()
{
return $this->tokenTypeHint;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleIdentityStsV1IntrospectTokenRequest::class, your_sha256_hashokenRequest');
```
|
```yaml
id: SecureWorks
name: SecureWorks
version: -1
fromversion: 5.0.0
starttaskid: '0'
tasks:
'0':
id: '0'
taskid: 'eb5ae06d-a140-4710-91f3-5f3669d85f8b'
type: start
task:
id: 'eb5ae06d-a140-4710-91f3-5f3669d85f8b'
version: -1
name: ''
iscommand: false
brand: ''
description: ''
nexttasks:
'#none#':
- '1'
separatecontext: false
view: '{"position": {"x": 50, "y": 50}}'
note: false
timertriggers: []
ignoreworker: false
'1':
id: 1
taskid: '7b9228d5-5a42-4bb1-b25b-3d6f69036635'
type: regular
task:
id: '7b9228d5-5a42-4bb1-b25b-3d6f69036635'
version: -1
name: DeleteContext
description: ''
script: DeleteContext
type: regular
iscommand: true
brand: ''
nexttasks:
'#none#':
- '2'
scriptarguments:
all:
simple: yes
separatecontext: false
view: '{"position": {"x": 50, "y": 200}}'
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
'2':
id: 2
taskid: '6cd93025-87b8-4dd1-826b-9bfd34578f6e'
type: regular
task:
id: '6cd93025-87b8-4dd1-826b-9bfd34578f6e'
version: -1
name: secure-works-create-ticket
description: ''
script: Dell Secureworks|||secure-works-create-ticket
type: regular
iscommand: true
brand: ''
nexttasks:
'#none#':
- '3'
scriptarguments: {}
separatecontext: false
view: '{"position": {"x": 50, "y": 400}}'
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
'3':
id: '3'
taskid: '616eda51-2a27-49f2-a640-2b5f070ff12b'
type: condition
task:
id: '616eda51-2a27-49f2-a640-2b5f070ff12b'
version: -1
name: Verify Outputs
type: condition
iscommand: false
description: ''
brand: ''
nexttasks:
yes:
- '4'
separatecontext: false
conditions:
- label: yes
condition:
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.ticketId
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.CreationStatusCode
iscontext: true
view: '{"position": {"x": 50, "y": 600}}'
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
'4':
id: 4
taskid: '26b13554-efd0-400c-9500-7ae994dc05dc'
type: regular
task:
id: '26b13554-efd0-400c-9500-7ae994dc05dc'
version: -1
name: secure-works-update-ticket
description: ''
script: Dell Secureworks|||secure-works-update-ticket
type: regular
iscommand: true
brand: ''
nexttasks:
'#none#':
- '5'
scriptarguments: {}
separatecontext: false
view: '{"position": {"x": 50, "y": 800}}'
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
'5':
id: '5'
taskid: '952fb562-f615-4426-bd8f-8fb8dbbd5f53'
type: condition
task:
id: '952fb562-f615-4426-bd8f-8fb8dbbd5f53'
version: -1
name: Verify Outputs
type: condition
iscommand: false
description: ''
brand: ''
nexttasks:
yes:
- '6'
separatecontext: false
conditions:
- label: yes
condition:
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.ticketId
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.UpdateStatusCode
iscontext: true
view: '{"position": {"x": 50, "y": 1000}}'
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
'6':
id: 6
taskid: '7525e17b-90ec-4422-b9f7-7970e76f43f0'
type: regular
task:
id: '7525e17b-90ec-4422-b9f7-7970e76f43f0'
version: -1
name: secure-works-close-ticket
description: ''
script: Dell Secureworks|||secure-works-close-ticket
type: regular
iscommand: true
brand: ''
nexttasks:
'#none#':
- '7'
scriptarguments: {}
separatecontext: false
view: '{"position": {"x": 50, "y": 1200}}'
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
'7':
id: '7'
taskid: 'af0003c2-1bc2-4612-ad09-24e101ceb8d3'
type: condition
task:
id: 'af0003c2-1bc2-4612-ad09-24e101ceb8d3'
version: -1
name: Verify Outputs
type: condition
iscommand: false
description: ''
brand: ''
nexttasks:
yes:
- '8'
separatecontext: false
conditions:
- label: yes
condition:
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.ticketId
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.ClosureStatusCode
iscontext: true
view: '{"position": {"x": 50, "y": 1400}}'
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
'8':
id: 8
taskid: '27f67155-4314-4ca0-9cb0-cfe2c1585e71'
type: regular
task:
id: '27f67155-4314-4ca0-9cb0-cfe2c1585e71'
version: -1
name: secure-works-add-worklogs-ticket
description: ''
script: Dell Secureworks|||secure-works-add-worklogs-ticket
type: regular
iscommand: true
brand: ''
nexttasks:
'#none#':
- '9'
scriptarguments: {}
separatecontext: false
view: '{"position": {"x": 50, "y": 1600}}'
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
'9':
id: '9'
taskid: '1d3859be-7396-45bf-b6fe-48fb54f97453'
type: condition
task:
id: '1d3859be-7396-45bf-b6fe-48fb54f97453'
version: -1
name: Verify Outputs
type: condition
iscommand: false
description: ''
brand: ''
nexttasks:
yes:
- '10'
separatecontext: false
conditions:
- label: yes
condition:
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.ticketId
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.WorklogAdditionStatusCode
iscontext: true
view: '{"position": {"x": 50, "y": 1800}}'
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
'10':
id: 10
taskid: '38dca0c5-8bfb-4733-b0d5-bf3b4c16d3a1'
type: regular
task:
id: '38dca0c5-8bfb-4733-b0d5-bf3b4c16d3a1'
version: -1
name: secure-works-get-ticket
description: ''
script: Dell Secureworks|||secure-works-get-ticket
type: regular
iscommand: true
brand: ''
nexttasks:
'#none#':
- '11'
scriptarguments: {}
separatecontext: false
view: '{"position": {"x": 50, "y": 2000}}'
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
'11':
id: '11'
taskid: 'bc687841-fd77-4c9d-97b4-b7d61fc1f23d'
type: condition
task:
id: 'bc687841-fd77-4c9d-97b4-b7d61fc1f23d'
version: -1
name: Verify Outputs
type: condition
iscommand: false
description: ''
brand: ''
nexttasks:
yes:
- '12'
separatecontext: false
conditions:
- label: yes
condition:
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.changeApproval
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.attachmentInfo.id
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.changeSlo
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.changeWindowStart
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.changeWindowEnd
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.client.id
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.client.name
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.contact.id
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.contact.name
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.dateCreated
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.dateClosed
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.dateModified
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.detailedDescription
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.devices.id
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.devices.name
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.impact
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.clientLocation.id
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.partner
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.priority
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.reason
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.requestType
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.riskAssessment
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.service
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.status
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.symptomDescription
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.ticketId
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.type
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.urgency
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.watchers
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.category
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.categoryClass
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.categoryType
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.categoryItem
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.attachmentInfo.name
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.clientLocation.name
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.worklogs.createdBy
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.worklogs.dateCreated
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.worklogs.description
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.worklogs.type
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.closeCodes
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: File.Info
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: File.Name
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: File.Size
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: File.SHA1
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: File.SHA256
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: File.EntryID
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: File.Type
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: File.MD5
iscontext: true
view: '{"position": {"x": 50, "y": 2200}}'
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
'12':
id: 12
taskid: '1db70a11-f998-47cb-b719-36aae2608c0f'
type: regular
task:
id: '1db70a11-f998-47cb-b719-36aae2608c0f'
version: -1
name: secure-works-assign-ticket
description: ''
script: Dell Secureworks|||secure-works-assign-ticket
type: regular
iscommand: true
brand: ''
nexttasks:
'#none#':
- '13'
scriptarguments: {}
separatecontext: false
view: '{"position": {"x": 50, "y": 2400}}'
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
'13':
id: '13'
taskid: '9f7dde52-5761-4dc0-a65c-aa10b296b09f'
type: condition
task:
id: '9f7dde52-5761-4dc0-a65c-aa10b296b09f'
version: -1
name: Verify Outputs
type: condition
iscommand: false
description: ''
brand: ''
nexttasks:
yes:
- '14'
separatecontext: false
conditions:
- label: yes
condition:
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.ticketId
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.AssignStatusCode
iscontext: true
view: '{"position": {"x": 50, "y": 2600}}'
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
'14':
id: 14
taskid: '92801cc9-9012-44cf-bfa0-64520de40b32'
type: regular
task:
id: '92801cc9-9012-44cf-bfa0-64520de40b32'
version: -1
name: secure-works-get-tickets-updates
description: ''
script: Dell Secureworks|||secure-works-get-tickets-updates
type: regular
iscommand: true
brand: ''
nexttasks:
'#none#':
- '15'
scriptarguments: {}
separatecontext: false
view: '{"position": {"x": 50, "y": 2800}}'
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
'15':
id: '15'
taskid: '6ee1b359-0dd7-44f3-9f87-229bb7d3b974'
type: condition
task:
id: '6ee1b359-0dd7-44f3-9f87-229bb7d3b974'
version: -1
name: Verify Outputs
type: condition
iscommand: false
description: ''
brand: ''
nexttasks:
yes:
- '16'
separatecontext: false
conditions:
- label: yes
condition:
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.changeApproval
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.attachmentInfo.id
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.changeSlo
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.changeWindowStart
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.changeWindowEnd
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.client.id
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.client.name
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.contact.id
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.contact.name
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.dateCreated
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.dateClosed
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.dateModified
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.detailedDescription
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.devices.id
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.devices.name
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.impact
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.clientLocation.id
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.partner
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.priority
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.reason
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.requestType
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.riskAssessment
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.service
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.status
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.symptomDescription
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.ticketId
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.type
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.urgency
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.watchers
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.category
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.categoryClass
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.categoryType
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.categoryItem
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.attachmentInfo.name
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.clientLocation.name
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.worklogs.createdBy
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.worklogs.dateCreated
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.worklogs.description
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.worklogs.type
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.closeCodes
iscontext: true
view: '{"position": {"x": 50, "y": 3000}}'
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
'16':
id: 16
taskid: '4c96b60e-a63d-490e-bebf-17f793d03fdb'
type: regular
task:
id: '4c96b60e-a63d-490e-bebf-17f793d03fdb'
version: -1
name: secure-works-get-close-codes
description: ''
script: Dell Secureworks|||secure-works-get-close-codes
type: regular
iscommand: true
brand: ''
nexttasks:
'#none#':
- '17'
scriptarguments: {}
separatecontext: false
view: '{"position": {"x": 50, "y": 3200}}'
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
'17':
id: '17'
taskid: '7340eb8e-966f-4e26-8fec-b8293e8885e5'
type: condition
task:
id: '7340eb8e-966f-4e26-8fec-b8293e8885e5'
version: -1
name: Verify Outputs
type: condition
iscommand: false
description: ''
brand: ''
nexttasks:
yes:
- '18'
separatecontext: false
conditions:
- label: yes
condition:
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.ticketID
iscontext: true
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.Ticket.closeCodes
iscontext: true
view: '{"position": {"x": 50, "y": 3400}}'
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
'18':
id: 18
taskid: 'b26bf180-09c9-470e-9a87-728410b8dfe1'
type: regular
task:
id: 'b26bf180-09c9-470e-9a87-728410b8dfe1'
version: -1
name: secure-works-get-tickets-ids
description: ''
script: Dell Secureworks|||secure-works-get-tickets-ids
type: regular
iscommand: true
brand: ''
nexttasks:
'#none#':
- '19'
scriptarguments: {}
separatecontext: false
view: '{"position": {"x": 50, "y": 3600}}'
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
'19':
id: '19'
taskid: '5fdcd244-a84e-4a29-810c-4ce9f11263ac'
type: condition
task:
id: '5fdcd244-a84e-4a29-810c-4ce9f11263ac'
version: -1
name: Verify Outputs
type: condition
iscommand: false
description: ''
brand: ''
nexttasks:
yes:
- '20'
separatecontext: false
conditions:
- label: yes
condition:
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.IDs
iscontext: true
view: '{"position": {"x": 50, "y": 3800}}'
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
'20':
id: 20
taskid: '45182c0f-099e-4ba5-a8fd-f7636ec4569d'
type: regular
task:
id: '45182c0f-099e-4ba5-a8fd-f7636ec4569d'
version: -1
name: secure-works-get-ticket-count
description: ''
script: Dell Secureworks|||secure-works-get-ticket-count
type: regular
iscommand: true
brand: ''
nexttasks:
'#none#':
- '21'
scriptarguments: {}
separatecontext: false
view: '{"position": {"x": 50, "y": 4000}}'
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
'21':
id: '21'
taskid: '53b9f149-13bc-464d-ac9f-327e0515eae8'
type: condition
task:
id: '53b9f149-13bc-464d-ac9f-327e0515eae8'
version: -1
name: Verify Outputs
type: condition
iscommand: false
description: ''
brand: ''
nexttasks:
yes:
- '22'
separatecontext: false
conditions:
- label: yes
condition:
- - operator: isNotEmpty
left:
value:
simple: SecureWorks.TicketCount
iscontext: true
view: '{"position": {"x": 50, "y": 4200}}'
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
'22':
id: '22'
taskid: '6fbef5b8-b290-4513-81bd-97635bbb2202'
type: title
task:
id: '6fbef5b8-b290-4513-81bd-97635bbb2202'
version: -1
name: Test Done
type: title
iscommand: false
brand: ''
description: ''
separatecontext: false
view: '{"position": {"x": 50, "y": 4400}}'
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
view: '{"linkLabelsPosition": {}, "paper": {"dimensions": {"height": 200, "width":
380, "x": 50, "y": 50}}}'
inputs: []
outputs: []
```
|
```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 Intel Corporation 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.
*
*/
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include "sgx_eid.h"
#include "error_codes.h"
#include "datatypes.h"
#include "sgx_urts.h"
#include "UntrustedEnclaveMessageExchange.h"
#include "sgx_dh.h"
#include "fifo_def.h"
#include <map>
/* Function Description: This is OCALL interface for initiator enclave to get ECDH message 1 and session id from responder enclave
* Parameter Description:
* [input, output] dh_msg1: pointer to ecdh msg1 buffer, this buffer is allocated in initiator enclave and filled by responder enclave
* [output] session_id: pointer to session id which is allocated by responder enclave
* */
extern "C" ATTESTATION_STATUS session_request_ocall(sgx_dh_msg1_t* dh_msg1, uint32_t* session_id)
{
FIFO_MSG msg1_request;
FIFO_MSG *msg1_response;
SESSION_MSG1_RESP * msg1_respbody = NULL;
size_t msg1_resp_size;
msg1_request.header.type = FIFO_DH_REQ_MSG1;
msg1_request.header.size = 0;
if ((client_send_receive(&msg1_request, sizeof(FIFO_MSG), &msg1_response, &msg1_resp_size) != 0)
|| (msg1_response == NULL))
{
printf("fail to send and receive message.\n");
return INVALID_SESSION;
}
msg1_respbody = (SESSION_MSG1_RESP *)msg1_response->msgbuf;
memcpy(dh_msg1, &msg1_respbody->dh_msg1, sizeof(sgx_dh_msg1_t));
*session_id = msg1_respbody->sessionid;
free(msg1_response);
return (ATTESTATION_STATUS)0;
}
/* Function Description: This is OCALL interface for initiator enclave to send ECDH message 2 to responder enclave, and receive ECDH message 3 from responder enclave
* Parameter Description:
* [input] dh_msg2: this is pointer to ECDH message 2 generated by initiator enclave
* [input, output]dh_msg3: this is pointer to ECDH message 3, this buffer is allocated in initiator enclave and filled by responder enclave
* [input] session_id: this is session id allocated by responder enclave
* */
ATTESTATION_STATUS exchange_report_ocall(sgx_dh_msg2_t *dh_msg2, sgx_dh_msg3_t *dh_msg3, uint32_t session_id)
{
FIFO_MSG * msg2 = NULL, * msg3 = NULL;
FIFO_MSG_HEADER * msg2_header = NULL;
SESSION_MSG2 *msg2_body = NULL;
SESSION_MSG3 *msg3_body = NULL;
size_t msg2size, msg3size;
msg2size = sizeof(FIFO_MSG_HEADER) + sizeof(SESSION_MSG2);
msg2 = (FIFO_MSG *)malloc(msg2size);
if (!msg2)
{
return ERROR_OUT_OF_MEMORY;
}
memset(msg2, 0, msg2size);
msg2_header = (FIFO_MSG_HEADER *)msg2;
msg2_header->type = FIFO_DH_MSG2;
msg2_header->size = sizeof(SESSION_MSG2);
msg2_body = (SESSION_MSG2 *)msg2->msgbuf;
memcpy(&msg2_body->dh_msg2, dh_msg2, sizeof(sgx_dh_msg2_t));
msg2_body->sessionid = session_id;
if (client_send_receive(msg2, msg2size, &msg3, &msg3size) != 0)
{
free(msg2);
printf("failed to send and receive message.\n");
return INVALID_SESSION;
}
msg3_body = (SESSION_MSG3 *)msg3->msgbuf;
memcpy(dh_msg3, &msg3_body->dh_msg3, sizeof(sgx_dh_msg3_t));
free(msg3);
free(msg2);
return (ATTESTATION_STATUS)0;
}
/* Function Description: This is OCALL interface for initiator enclave to send request message(encrypted) to responder enclave, and receive response message from responder enclave
* Parameter Description:
* [input] session_id: this is session id allocated by responder enclave
* [input] req_message: this is pointer to request message
* [input] req_message_size: this is request message size
* [input] max_payload_size: this is maximum payload size in response message
* [input, output] this is pointer to response message, the buffer is allocated by initiator enclave and filled by responder enclave
* [input] response message size
* */
ATTESTATION_STATUS send_request_ocall(uint32_t session_id, secure_message_t* req_message, size_t req_message_size, size_t max_payload_size, secure_message_t* resp_message, size_t resp_message_size)
{
FIFO_MSG *msgreq = NULL, * msgresp= NULL;
FIFO_MSGBODY_REQ * msgbody;
size_t reqsize, respsize;
reqsize = sizeof(FIFO_MSG_HEADER) + sizeof(FIFO_MSGBODY_REQ) + req_message_size;
msgreq = (FIFO_MSG *)malloc(reqsize);
if (!msgreq)
{
return ERROR_OUT_OF_MEMORY;
}
memset(msgreq, 0, reqsize);
msgreq->header.type = FIFO_DH_MSG_REQ;
msgreq->header.size = sizeof(FIFO_MSGBODY_REQ) + req_message_size;
msgbody = (FIFO_MSGBODY_REQ *)msgreq->msgbuf;
msgbody->max_payload_size = max_payload_size;
msgbody->size = req_message_size;
msgbody->session_id = session_id;
memcpy(msgbody->buf, req_message, req_message_size);
if (client_send_receive(msgreq, reqsize, &msgresp, &respsize) != 0)
{
free(msgreq);
printf("fail to send and receive message.\n");
return INVALID_SESSION;
}
//TODO copy to output message pointer
memcpy(resp_message, msgresp->msgbuf, msgresp->header.size < resp_message_size ? msgresp->header.size : resp_message_size);
free(msgresp);
free(msgreq);
return (ATTESTATION_STATUS)0;
}
/* Function Description: this is OCALL interface for initiator enclave to close secure session
* Parameter Description:
* [input] session_id: this is session id allocated by responder enclave
* */
ATTESTATION_STATUS end_session_ocall(uint32_t session_id)
{
FIFO_MSG *msgresp = NULL;
FIFO_MSG *closemsg;
SESSION_CLOSE_REQ * body;
size_t reqsize, respsize;
reqsize = sizeof(FIFO_MSG) + sizeof(SESSION_CLOSE_REQ);
closemsg = (FIFO_MSG *)malloc(reqsize);
if (!closemsg)
{
return ERROR_OUT_OF_MEMORY;
}
memset(closemsg, 0,reqsize);
closemsg->header.type = FIFO_DH_CLOSE_REQ;
closemsg->header.size = sizeof(SESSION_CLOSE_REQ);
body = (SESSION_CLOSE_REQ *)closemsg->msgbuf;
body->session_id = session_id;
if (client_send_receive(closemsg, reqsize, &msgresp, &respsize) != 0)
{
free(closemsg);
printf("fail to send and receive message.\n");
return INVALID_SESSION;
}
free(closemsg);
free(msgresp);
return (ATTESTATION_STATUS)0;
}
```
|
```html
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Debugging the assertions</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="Boost.Test">
<link rel="up" href="../testing_tools.html" title="Writing unit tests">
<link rel="prev" href="internal_details.html" title="BOOST_TEST: details on expressions">
<link rel="next" href="summary.html" title="Summary of the API for writing tests">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="path_to_url">People</a></td>
<td align="center"><a href="path_to_url">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="internal_details.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../testing_tools.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="summary.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_test.testing_tools.debugging"></a><a class="link" href="debugging.html" title="Debugging the assertions">Debugging the assertions</a>
</h3></div></div></div>
<p>
In case you observe a failure in unit tests and you are using a debugger
to determine the cause, it may get really difficult to step into the expression
inside an assertion. Because <a class="link" href="../utf_reference/testing_tool_ref/assertion_boost_test_universal_macro.html" title="BOOST_TEST"><code class="computeroutput"><span class="identifier">BOOST_TEST</span></code></a> builds an expression
tree before evaluating it, the "Step Into" function of the debugger
will have to step into every step of building the expression tree before,
you can go into the evaluation of the expression.
</p>
<p>
In order to mitigate the problem, the test module can be build in the mode
which disables the building of expression trees inside assertions. In this
mode, the first thing the assertion does is to eagerly evaluate the tested
expression. You enable this mode by defining symbol <a class="link" href="../utf_reference/testing_tool_ref/assertion_control_under_debugger.html" title="BOOST_TEST_TOOLS_UNDER_DEBUGGER"><code class="computeroutput"><span class="identifier">BOOST_TEST_TOOLS_UNDER_DEBUGGER</span></code></a>
(either with <code class="computeroutput"><span class="preprocessor">#define</span></code> or
with compiler option <code class="computeroutput"><span class="special">-</span><span class="identifier">D</span></code>)
prior to including any of the <span class="emphasis"><em>Unit Test Framework</em></span> headers.
</p>
<div class="caution"><table border="0" summary="Caution">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../../../../../../doc/src/images/caution.png"></td>
<th align="left">Caution</th>
</tr>
<tr><td align="left" valign="top"><p>
When the eager evaluation of expressions is turned on, the expressions
are evaluated <span class="emphasis"><em>literally</em></span>: this automatically disables
any special semantics, like tolerance for floating-point types or <code class="computeroutput"><a class="link" href="../../boost/test_tools/per_element.html" title="Struct per_element">boost::test_tools::per_element</a></code>
versions of sequence comparisons. This may turn passing assertions into
failing assertions and vice-versa. In the case of <code class="computeroutput"><a class="link" href="../../boost/test_tools/per_element.html" title="Struct per_element">boost::test_tools::per_element</a></code>
comparisons of sequences, it may render an ill-formed program, if the sequences
of different types are being compared.
</p></td></tr>
</table></div>
<p>
The inconvenience with <a class="link" href="../utf_reference/testing_tool_ref/assertion_control_under_debugger.html" title="BOOST_TEST_TOOLS_UNDER_DEBUGGER"><code class="computeroutput"><span class="identifier">BOOST_TEST_TOOLS_UNDER_DEBUGGER</span></code></a>
is that you have to recompile the test module. The <span class="emphasis"><em>Unit Test Framework</em></span>
gives you another option to compile two versions of the assertions and select
the one to be used dynamically depending on whether the test module is run
under debugger or not. This mode is enabled by defining symbol <a class="link" href="../utf_reference/testing_tool_ref/assertion_control_under_debuggable.html" title="BOOST_TEST_TOOLS_DEBUGGABLE"><code class="computeroutput"><span class="identifier">BOOST_TEST_TOOLS_DEBUGGABLE</span></code></a> (either
with <code class="computeroutput"><span class="preprocessor">#define</span></code> or with compiler
option <code class="computeroutput"><span class="special">-</span><span class="identifier">D</span></code>)
prior to the inclusion of any of the <span class="emphasis"><em>Unit Test Framework</em></span>
headers.
</p>
<p>
In order to determine if the test module is run under debugger or not, function
<a class="link" href="../../boost/debug/under_debugger.html" title="Function under_debugger"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">debug</span><span class="special">::</span><span class="identifier">under_debugger</span></code></a>
is used.
</p>
<div class="caution"><table border="0" summary="Caution">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../../../../../../doc/src/images/caution.png"></td>
<th align="left">Caution</th>
</tr>
<tr><td align="left" valign="top"><p>
At present, function <a class="link" href="../../boost/debug/under_debugger.html" title="Function under_debugger"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">debug</span><span class="special">::</span><span class="identifier">under_debugger</span></code></a> can correctly detect
the debugger only on MSVC and a few Linux variants.
</p></td></tr>
</table></div>
</div>
<table xmlns:rev="path_to_url~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
file LICENSE_1_0.txt or copy at <a href="path_to_url" target="_top">path_to_url
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="internal_details.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../testing_tools.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="summary.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
```
|
A suicide bombing occurred on 12 April 2002 at a bus stop located at the entrance to the Mahane Yehuda Market, Jerusalem's main fruit and vegetable market. The site of the attack was chosen in order to cause maximum number of casualties. 6 civilians were killed in the attack and 104 were injured. The al-Aqsa Martyrs' Brigades claimed responsibility for the attack.
The attack
On Friday, 12 April 2002, Andalib Suleiman, a Palestinian 17-year-old female suicide bomber, detonated an explosive device hidden on her body shortly after 4:00 pm at a bus stop located at the entrance to the popular outdoor market, killing six civilians and injuring 104 people, many of them teenagers and tourists. She was initially misidentified as Nidal Daraghmeh from Jenin.
The assailant first attempted to enter the market, but found security too tight. She then went to Jaffa Road and attempted to board a bus, but was prevented from boarding and set off her bomb, which was packed with nails to inflict maximum damage on victims. The bus was torn to pieces by the impact.
Muataz Muhammed Abdallah Himouni (21), of Hebron, arrested on 6 May 2002 claimed credit for planning the attack, supplying the bomber with explosives, and directing her to blow herself in a crowd at the Mahane Yehuda market or nearby Jaffa Road.
Impact
A scheduled meeting between American Secretary of State Colin Powell and Palestinian Authority President Yasser Arafat was cancelled as a result of the bombing.
See also
1997 Mahane Yehuda Market Bombings
References
External links
"Terrorist responsible for planning April 12 suicide bombing in Jerusalem arrested during Operation Defensive Shield", Israeli Ministry of Foreign Affairs; accessed 6 May 2002.
Suicide bomber strikes bus stop in downtown J'lem; injuries reported, Haaretz, 12 April 2002.
Young Women in Suicide Terrorism
The involvement of women in suicide bombing attacks
Terrorist responsible for planning 12 April suicide bombing in Jerusalem arrested during Operation Defensive Shield
2002 deaths
2002 in Jerusalem
April 2002 events in Asia
Female suicide bombers
Marketplace attacks in Asia
Mass murder in 2002
Israeli casualties in the Second Intifada
Palestinian female murderers
Palestinian mass murderers
Suicide bombing in the Israeli–Palestinian conflict
Al-Aqsa Martyrs' Brigades attacks
Terrorist incidents in Jerusalem
Terrorist incidents in Jerusalem in the 2000s
|
The Piano Sonata in B minor (), S.178, is a piano sonata by Franz Liszt. It was completed in 1853 and published in 1854 with a dedication to Robert Schumann.
History
Liszt noted on the sonata's manuscript that it was completed on 2 February 1853, but he had composed an earlier version by 1849. At this point in his life, Liszt's career as a traveling virtuoso had almost entirely subsided, as he had been influenced towards leading the life of a composer rather than a performer by Carolyne zu Sayn-Wittgenstein almost five years earlier. Liszt's life was established in Weimar and he was living a comfortable lifestyle, composing, and occasionally performing, entirely by choice rather than necessity.
The Sonata was dedicated to Robert Schumann, in return for Schumann's dedication of his Fantasie in C major, Op.17 (published 1839) to Liszt. A copy of the work arrived at Schumann's house in May 1854, after he had entered Endenich sanatorium. Pianist and composer Clara Schumann did not perform the Sonata despite her marriage to Robert Schumann; according to scholar Alan Walker she found it "merely a blind noise".
Reception
The Sonata was published by Breitkopf & Härtel in 1854 and first performed on 27 January 1857 in Berlin by Hans von Bülow. It was attacked by Eduard Hanslick who said "anyone who has heard it and finds it beautiful is beyond help". Johannes Brahms reputedly fell asleep when Liszt performed the work in 1853, and it was also criticized by the pianist and composer Anton Rubinstein. However, the Sonata drew enthusiasm from Richard Wagner following a private performance of the piece by Karl Klindworth on April 5, 1855. Otto Gumprecht of the German newspaper Nationalzeitung referred to it as "an invitation to hissing and stomping". It took a long time for the Sonata to become commonplace in concert repertoire, because of its technical difficulty and negative initial reception due to its status as "new" music. However by the early stages of the twentieth century, the piece had become established as a pinnacle of Liszt's repertoire and has been a popularly performed and extensively analyzed piece ever since.
Music
No other work of Liszt's has attracted anywhere near the amount of scholarly attention paid to the Sonata in B minor. It has provoked a wide range of divergent theories from those of its admirers who feel compelled to search for hidden meanings. Possibilities include:
The Sonata is a musical portrait of the Faust legend, with "Faust," "Gretchen," and "Mephistopheles" themes symbolizing the main characters.
The Sonata is autobiographical; its musical contrasts spring from the conflicts within Liszt's own personality.
The Sonata is about the divine and the diabolical; it is based on the Bible and on John Milton's Paradise Lost.
The Sonata is an allegory set in the Garden of Eden; it deals with the Fall of Man and contains "God," "Lucifer," "Serpent," "Adam," and "Eve" themes.
The Sonata has no programmatic allusions; it is a piece of "expressive form" with no meaning beyond itself.
Walker claims the quiet ending of the Sonata was an afterthought; the original manuscript contains a crossed-out ending section which would have ended the work in a loud flourish instead.
Analysis
The Sonata unfolds in approximately 30 minutes of unbroken music. While its distinct movements are rolled into one, the entire work is encompassed within an overarching sonata form — exposition, development, and recapitulation. Liszt effectively composed a sonata within a sonata, which is part of the work's uniqueness, and he was economical with his thematic material. The first page contains three motive ideas that provide the basis for nearly all that follows, with the ideas being transformed throughout.
Some analyses suggest that the Sonata has four movements although there is no gap between them. Superimposed upon the four movements is a large sonata form structure, although the precise beginnings and endings of the traditional development and recapitulation sections have long been a topic of debate. Others claim a three-movement form, a one-movement structure, and a rotational three-movement work with a double exposition and recapitulation.
The first theme is a descending scale marked sotto voce; full of ominous undertow. It reappears at crucial points in the work's structure. This leads immediately to a jagged, forceful motif in octaves. This is quickly followed by a hammering marcato motif in the left hand. A dialogue ensues, with mounting energy, until reaching the noble Grandioso material in D major. Liszt transforms the "marcato" motif into a lyrical melody later. The slow movement, an Andante sostenuto, is the centerpiece of the Sonata. This fully-fledged movement, in compound ternary form, features, in quick succession, a number of themes heard earlier in the Sonata in a tour de force of thematic economy. The final recapitulatory section is launched by a driving fugato of contrapuntal skill which leads to the compressed return of the opening material. Calling upon every intellectual resource and fully exploiting the pianist's technical arsenal, it is at this point where a performer's concentration might wane. Each of the sections are examples of Classical forms, which means that this piece is one of the first instances of Double-function form, a musical piece which has two classical forms happening at the same time; one containing others. Already in 1851 Liszt experimented with a non-programmatic "four-movements-in-one" form in an extended work for piano solo called Grosses Concert-Solo. This piece, which in 1865 was published as a two-piano version under the title Concerto pathétique, shows a thematic relationship to both the Sonata and the later Faust Symphony.
Notable Performances
The Sonata is a standard of the piano repertoire. Recordings include performances by Nicholas Angelich, Martha Argerich, Claudio Arrau, Emanuel Ax, Jorge Bolet, Khatia Buniatishvili, Leon Fleisher, Emil Gilels, Hélène Grimaud, Vladimir Horowitz, Paul Lewis, Maurizio Pollini, Sviatoslav Richter, Arthur Rubinstein, Van Cliburn, Yuja Wang, André Watts, Krystian Zimerman, Benjamin Grosvenor, Seong-Jin Cho and Igor Levit.
Arrangements
Camille Saint-Saëns, a close friend of Liszt, made a two-piano arrangement of the Sonata in 1914, but it was never published in his lifetime because of rights issues. It was first published in 2004 by Édition Durand in Paris, edited by Sabrina Teller Ratner. According to a letter from Saint-Saëns to Jacques Durand, dated 23 August 1914, the two-piano arrangement was something that Liszt had announced but never realized.
Leó Weiner made an orchestral arrangement of the Sonata in 1955. The arrangement has not been published and exists only in manuscript form. It was recorded in 2006 by the orchestra of Hochschule für Musik Franz Liszt, Weimar with Nicolás Pasquet conducting, and in 2009 by the North Hungarian Symphony Orchestra under for the label Hungaroton (HCD 32634).
Heinz Roemheld orchestrated the Sonata which is heard on some 1930s movies, including The Black Cat (1934), starring Boris Karloff and Bela Lugosi, The Raven (1935), as well as the Flash Gordon serials (1936) (Chapters 6–13), Werewolf of London (1936), and Mars Attacks the World (1938).
An orchestrated version of the lyrical parts of the Sonata appears in the 1960 Hollywood film of Liszt's life called Song Without End.
There is an orchestrated excerpt version of the Sonata in the 1952 film Hans Christian Andersen starring Danny Kaye where the ballet scene for "The Little Mermaid" is danced near the end of the film.
Frederick Ashton used the Sonata for his 1963 ballet Marguerite and Armand, created for Margot Fonteyn and Rudolf Nureyev, based on "The Lady of the Camellias" by Alexandre Dumas, fils. The original performances used an orchestral transcription of the Sonata by Humphrey Searle. In 1968 the Royal Ballet commissioned a new arrangement, by Gordon Jacob.
An organ transcription of the Sonata was made in 1984 by Bernhard Haas. Other transcriptions for organ exist also, including one by Nathan Laube.
There is also a transcription of the Sonata for solo cello made by cellist Johann Sebastian Paetsch in 2013. This has been published by the Hofmeister Musikverlag in Leipzig.
An arrangement for string quartet was made in 2021 by Louis Sauter. It is available on the page .
References
Sources
Longyear, R.M. “Liszt's B minor Sonata: Precedents for a structural analysis.” The Music Review, 34, no. 3–4 (Aug–Nov 1973): 198–209.
Longyear, R.M. “The Text of Liszt’s B Minor Piano Sonata.” The Musical Quarterly, Vol. 60, No. 3 (Jul., 1974), pp. 435–50.
Ott, Bertrand. “An interpretation of Liszt's Sonata in B minor.” JALS: The journal of the American Liszt Society, 10 (Dec 1981): 30–38.
Saffle, Michael. “Liszt's Sonata in B minor: another look at the 'double function' question.” JALS: The journal of the American Liszt Society, 11 (June 1982): 28–39.
Szasz, Tibor. “Liszt’s Symbols for the Divine and Diabolical: Their Revelation of a Program in the B Minor Sonata.” Journal of the American Liszt Society, 15 (1984): 39–95.
Arnold, Ben. “Recitative in Liszt's solo piano music.” JALS: The journal of the American Liszt Society, 24 (July–Dec 1988): 3–22.
Hamilton, Kenneth. "Liszt: Sonata in B minor". Cambridge University Press 1996.
Whitelaw, Bryan A. "Franz Liszt's Piano Sonata in B Minor: Context, Analysis and Hermeneutics." Belfast: Queen's University Belfast, 2017.
Whitelaw, Bryan A. "Franz Liszt's Sonata Narratives: Large-Scale Forms at the Weimar Court." Belfast: Queen's University Belfast, 2021.
Tanner, Mark. “The power of performance as an alternative analytical discourse: The Liszt sonata in B minor.” 19th-century music, 24, no. 2 (fall 2000): 173–192.
Brown, David. “The B Minor Sonata Revisited: Deciphering Liszt.” The Musical Times, Vol. 144, No. 1882 (Spring, 2003), pp. 6–15.
Walker, Alan. "Franz Liszt: The Weimar Years, 1848–1861." Ithaca: Cornell University Press, 1989.
External links
Recording of this Sonata by Alberto Cobo
Attempts to decipher the symbolic content
Compositions by Franz Liszt
Liszt
1853 compositions
Compositions in B minor
Music with dedications
|
```cuda
//
//
// 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.
#include "paddle/phi/kernels/pad3d_kernel.h"
#include <algorithm>
#include "paddle/phi/backends/gpu/gpu_context.h"
#include "paddle/phi/backends/gpu/gpu_primitives.h"
#include "paddle/phi/common/complex.h"
#include "paddle/phi/core/kernel_registry.h"
namespace phi {
using phi::PADDLE_CUDA_NUM_THREADS;
template <typename T>
__global__ void Pad3DConstNCDHW(const int nthreads,
const T* in_data,
const int num,
const int channels,
const int in_depth,
const int in_height,
const int in_width,
const int out_depth,
const int out_height,
const int out_width,
const int pad_front,
const int pad_top,
const int pad_left,
T value,
T* out_data) {
CUDA_KERNEL_LOOP(index, nthreads) {
int nc = index / out_width;
const int out_w = index % out_width;
const int out_h = nc % out_height;
nc /= out_height;
const int out_d = nc % out_depth;
nc /= out_depth;
int in_d = out_d - pad_front;
int in_h = out_h - pad_top;
int in_w = out_w - pad_left;
out_data[index] =
(in_d < 0 || in_h < 0 || in_w < 0 || in_d >= in_depth ||
in_h >= in_height || in_w >= in_width)
? value
: in_data[nc * in_depth * in_height * in_width +
in_d * in_height * in_width + in_h * in_width + in_w];
}
}
template <typename T>
__global__ void Pad3DConstNDHWC(const int nthreads,
const T* in_data,
const int num,
const int channels,
const int in_depth,
const int in_height,
const int in_width,
const int out_depth,
const int out_height,
const int out_width,
const int pad_front,
const int pad_top,
const int pad_left,
T value,
T* out_data) {
CUDA_KERNEL_LOOP(index, nthreads) {
int n = index / channels;
const int c = index % channels;
const int out_w = n % out_width;
n /= out_width;
const int out_h = n % out_height;
n /= out_height;
const int out_d = n % out_depth;
n /= out_depth;
const int in_d = out_d - pad_front;
const int in_h = out_h - pad_top;
const int in_w = out_w - pad_left;
out_data[index] =
(in_d < 0 || in_h < 0 || in_w < 0 || in_d >= in_depth ||
in_h >= in_height || in_w >= in_width)
? value
: in_data[n * in_depth * in_height * in_width * channels +
in_d * in_height * in_width * channels +
in_h * in_width * channels + in_w * channels + c];
}
}
template <typename T>
__global__ void Pad3DReflectNCDHW(const int nthreads,
const T* in_data,
const int num,
const int channels,
const int in_depth,
const int in_height,
const int in_width,
const int out_depth,
const int out_height,
const int out_width,
const int pad_front,
const int pad_top,
const int pad_left,
T* out_data) {
CUDA_KERNEL_LOOP(index, nthreads) {
int nc = index / out_width;
const int out_w = index % out_width;
const int out_h = nc % out_height;
nc /= out_height;
const int out_d = nc % out_depth;
nc /= out_depth;
int in_d = out_d - pad_front;
int in_h = out_h - pad_top;
int in_w = out_w - pad_left;
in_d = max(in_d, -in_d); // reflect by 0
in_d = min(in_d, 2 * in_depth - in_d - 2); // reflect by in_depth
in_h = max(in_h, -in_h); // reflect by 0
in_h = min(in_h, 2 * in_height - in_h - 2); // reflect by in_height
in_w = max(in_w, -in_w); // reflect by 0
in_w = min(in_w, 2 * in_width - in_w - 2); // reflect by in_width
out_data[index] =
in_data[(nc * in_depth * in_height + in_d * in_height + in_h) *
in_width +
in_w];
}
}
template <typename T>
__global__ void Pad3DReflectNDHWC(const int nthreads,
const T* in_data,
const int num,
const int channels,
const int in_depth,
const int in_height,
const int in_width,
const int out_depth,
const int out_height,
const int out_width,
const int pad_front,
const int pad_top,
const int pad_left,
T* out_data) {
CUDA_KERNEL_LOOP(index, nthreads) {
int n = index / channels;
const int c = index % channels;
const int out_w = n % out_width;
n /= out_width;
const int out_h = n % out_height;
n /= out_height;
const int out_d = n % out_depth;
n /= out_depth;
int in_d = out_d - pad_front;
int in_h = out_h - pad_top;
int in_w = out_w - pad_left;
in_d = max(in_d, -in_d);
in_d = min(in_d, 2 * in_depth - in_d - 2);
in_h = max(in_h, -in_h);
in_h = min(in_h, 2 * in_height - in_h - 2);
in_w = max(in_w, -in_w);
in_w = min(in_w, 2 * in_width - in_w - 2);
out_data[index] = in_data[n * in_depth * in_height * in_width * channels +
in_d * in_height * in_width * channels +
in_h * in_width * channels + in_w * channels + c];
}
}
template <typename T>
__global__ void Pad3DReplicateNCDHW(const int nthreads,
const T* in_data,
const int num,
const int channels,
const int in_depth,
const int in_height,
const int in_width,
const int out_depth,
const int out_height,
const int out_width,
const int pad_front,
const int pad_top,
const int pad_left,
T* out_data) {
CUDA_KERNEL_LOOP(index, nthreads) {
int nc = index / out_width;
const int out_w = index % out_width;
const int out_h = nc % out_height;
nc /= out_height;
const int out_d = nc % out_depth;
nc /= out_depth;
int in_d = min(in_depth - 1, max(out_d - pad_front, 0));
int in_h = min(in_height - 1, max(out_h - pad_top, 0));
int in_w = min(in_width - 1, max(out_w - pad_left, 0));
out_data[index] =
in_data[(nc * in_depth * in_height + in_d * in_height + in_h) *
in_width +
in_w];
}
}
template <typename T>
__global__ void Pad3DReplicateNDHWC(const int nthreads,
const T* in_data,
const int num,
const int channels,
const int in_depth,
const int in_height,
const int in_width,
const int out_depth,
const int out_height,
const int out_width,
const int pad_front,
const int pad_top,
const int pad_left,
T* out_data) {
CUDA_KERNEL_LOOP(index, nthreads) {
int n = index / channels;
const int c = index % channels;
const int out_w = n % out_width;
n /= out_width;
const int out_h = n % out_height;
n /= out_height;
const int out_d = n % out_depth;
n /= out_depth;
int in_d = min(in_depth - 1, max(out_d - pad_front, 0));
int in_h = min(in_height - 1, max(out_h - pad_top, 0));
int in_w = min(in_width - 1, max(out_w - pad_left, 0));
out_data[index] = in_data[n * in_depth * in_height * in_width * channels +
in_d * in_height * in_width * channels +
in_h * in_width * channels + in_w * channels + c];
}
}
template <typename T>
__global__ void Pad3DCircularNCDHW(const int nthreads,
const T* in_data,
const int num,
const int channels,
const int in_depth,
const int in_height,
const int in_width,
const int out_depth,
const int out_height,
const int out_width,
const int pad_front,
const int pad_top,
const int pad_left,
T* out_data) {
CUDA_KERNEL_LOOP(index, nthreads) {
int nc = index / out_width;
const int out_w = index % out_width;
const int out_h = nc % out_height;
nc /= out_height;
const int out_d = nc % out_depth;
nc /= out_depth;
int in_d = ((out_d - pad_front) % in_depth + in_depth) % in_depth;
int in_h = ((out_h - pad_top) % in_height + in_height) % in_height;
int in_w = ((out_w - pad_left) % in_width + in_width) % in_width;
out_data[index] =
in_data[(nc * in_depth * in_height + in_d * in_height + in_h) *
in_width +
in_w];
}
}
template <typename T>
__global__ void Pad3DCircularNDHWC(const int nthreads,
const T* in_data,
const int num,
const int channels,
const int in_depth,
const int in_height,
const int in_width,
const int out_depth,
const int out_height,
const int out_width,
const int pad_front,
const int pad_top,
const int pad_left,
T* out_data) {
CUDA_KERNEL_LOOP(index, nthreads) {
int n = index / channels;
const int c = index % channels;
const int out_w = n % out_width;
n /= out_width;
const int out_h = n % out_height;
n /= out_height;
const int out_d = n % out_depth;
n /= out_depth;
int in_d = ((out_d - pad_front) % in_depth + in_depth) % in_depth;
int in_h = ((out_h - pad_top) % in_height + in_height) % in_height;
int in_w = ((out_w - pad_left) % in_width + in_width) % in_width;
out_data[index] = in_data[n * in_depth * in_height * in_width * channels +
in_d * in_height * in_width * channels +
in_h * in_width * channels + in_w * channels + c];
}
}
template <typename T, typename Context>
void Pad3dKernel(const Context& dev_ctx,
const DenseTensor& x,
const IntArray& paddings,
const std::string& mode,
float pad_value,
const std::string& data_format,
DenseTensor* out) {
std::vector<int64_t> pads = paddings.GetData();
auto in_dims = x.dims();
const T* in_data = x.data<T>();
auto out_dims = out->dims();
T value = static_cast<T>(pad_value);
if (data_format == "NCDHW") {
out_dims[0] = in_dims[0];
out_dims[1] = in_dims[1];
out_dims[2] = in_dims[2] + pads[4] + pads[5];
out_dims[3] = in_dims[3] + pads[2] + pads[3];
out_dims[4] = in_dims[4] + pads[0] + pads[1];
} else {
out_dims[0] = in_dims[0];
out_dims[1] = in_dims[1] + pads[4] + pads[5];
out_dims[2] = in_dims[2] + pads[2] + pads[3];
out_dims[3] = in_dims[3] + pads[0] + pads[1];
out_dims[4] = in_dims[4];
}
out->Resize(out_dims);
T* out_data = dev_ctx.template Alloc<T>(out);
int channels = in_dims[1];
int in_depth = in_dims[2];
int in_height = in_dims[3];
int in_width = in_dims[4];
int out_depth = out_dims[2];
int out_height = out_dims[3];
int out_width = out_dims[4];
if (data_format == "NDHWC") {
channels = in_dims[4];
in_depth = in_dims[1];
in_height = in_dims[2];
in_width = in_dims[3];
out_depth = out_dims[1];
out_height = out_dims[2];
out_width = out_dims[3];
}
if (mode == "reflect") {
PADDLE_ENFORCE_GT(
in_depth,
pads[4],
errors::InvalidArgument("The depth of Input(X)'s dimension should be "
"greater than pad_front"
" in reflect mode"
", but received depth(%d) and pad_front(%d).",
in_depth,
pads[4]));
PADDLE_ENFORCE_GT(
in_depth,
pads[5],
errors::InvalidArgument("The depth of Input(X)'s dimension should be "
"greater than pad_back"
" in reflect mode"
", but received depth(%d) and pad_back(%d).",
in_depth,
pads[5]));
PADDLE_ENFORCE_GT(
in_height,
pads[2],
errors::InvalidArgument("The height of Input(X)'s dimension should be "
"greater than pad_top"
" in reflect mode"
", but received depth(%d) and pad_top(%d).",
in_height,
pads[2]));
PADDLE_ENFORCE_GT(
in_height,
pads[3],
errors::InvalidArgument("The height of Input(X)'s dimension should be "
"greater than pad_bottom"
" in reflect mode"
", but received depth(%d) and pad_bottom(%d).",
in_height,
pads[3]));
PADDLE_ENFORCE_GT(
in_width,
pads[0],
errors::InvalidArgument("The width of Input(X)'s dimension should be "
"greater than pad_left"
" in reflect mode"
", but received depth(%d) and pad_left(%d).",
in_width,
pads[0]));
PADDLE_ENFORCE_GT(
in_width,
pads[1],
errors::InvalidArgument("The width of Input(X)'s dimension should be "
"greater than pad_right"
" in reflect mode"
", but received depth(%d) and pad_right(%d).",
in_width,
pads[1]));
} else if (mode == "circular" || mode == "replicate") {
PADDLE_ENFORCE_NE(in_depth * in_height * in_width,
0,
errors::InvalidArgument(
"The input tensor size can not be 0 for circular "
"or replicate padding mode."));
}
const int pad_left = pads[0];
const int pad_top = pads[2];
const int pad_front = pads[4];
const int num = in_dims[0];
auto stream = dev_ctx.stream();
int block = PADDLE_CUDA_NUM_THREADS;
const int out_size = out->numel();
int grid = (out_size + block - 1) / block;
if (data_format == "NCDHW") {
if (mode == "reflect") {
Pad3DReflectNCDHW<T><<<grid, block, 0, stream>>>(out_size,
in_data,
num,
channels,
in_depth,
in_height,
in_width,
out_depth,
out_height,
out_width,
pad_front,
pad_top,
pad_left,
out_data);
} else if (mode == "replicate") {
Pad3DReplicateNCDHW<T><<<grid, block, 0, stream>>>(out_size,
in_data,
num,
channels,
in_depth,
in_height,
in_width,
out_depth,
out_height,
out_width,
pad_front,
pad_top,
pad_left,
out_data);
} else if (mode == "circular") {
Pad3DCircularNCDHW<T><<<grid, block, 0, stream>>>(out_size,
in_data,
num,
channels,
in_depth,
in_height,
in_width,
out_depth,
out_height,
out_width,
pad_front,
pad_top,
pad_left,
out_data);
} else {
Pad3DConstNCDHW<T><<<grid, block, 0, stream>>>(out_size,
in_data,
num,
channels,
in_depth,
in_height,
in_width,
out_depth,
out_height,
out_width,
pad_front,
pad_top,
pad_left,
value,
out_data);
}
} else {
if (mode == "reflect") {
Pad3DReflectNDHWC<T><<<grid, block, 0, stream>>>(out_size,
in_data,
num,
channels,
in_depth,
in_height,
in_width,
out_depth,
out_height,
out_width,
pad_front,
pad_top,
pad_left,
out_data);
} else if (mode == "replicate") {
Pad3DReplicateNDHWC<T><<<grid, block, 0, stream>>>(out_size,
in_data,
num,
channels,
in_depth,
in_height,
in_width,
out_depth,
out_height,
out_width,
pad_front,
pad_top,
pad_left,
out_data);
} else if (mode == "circular") {
Pad3DCircularNDHWC<T><<<grid, block, 0, stream>>>(out_size,
in_data,
num,
channels,
in_depth,
in_height,
in_width,
out_depth,
out_height,
out_width,
pad_front,
pad_top,
pad_left,
out_data);
} else {
Pad3DConstNDHWC<T><<<grid, block, 0, stream>>>(out_size,
in_data,
num,
channels,
in_depth,
in_height,
in_width,
out_depth,
out_height,
out_width,
pad_front,
pad_top,
pad_left,
value,
out_data);
}
}
}
} // namespace phi
PD_REGISTER_KERNEL(pad3d,
GPU,
ALL_LAYOUT,
phi::Pad3dKernel,
phi::dtype::float16,
phi::dtype::bfloat16,
float,
double,
int,
int64_t,
phi::dtype::complex<float>,
phi::dtype::complex<double>) {}
```
|
Callidula waterstradti is a moth of the family Callidulidae. It is found in Borneo, Sumatra and Peninsular Malaysia. It is predominantly a montane species, recorded at heights ranging from 1,200 to 1,930 meters.
The wingspan is 12–14 mm.
References
Callidulidae
Moths described in 1998
|
```smarty
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{{config "String" "globaltitle" ""}}</title>
{{template "inc/meta.tpl" .}}
<link href="/static/css/table-responsive.css" rel="stylesheet">
<link href="/static/js/advanced-datatable/css/demo_table.css" rel="stylesheet" />
<link href="/static/js/data-tables/DT_bootstrap.css" rel="stylesheet" />
</head><body class="sticky-header">
<section> {{template "inc/left.tpl" .}}
<!-- main content start-->
<div class="main-content" >
<!-- header section start-->
<div class="header-section">
<!--toggle button start-->
<a class="toggle-btn"><i class="fa fa-bars"></i></a>
<!--toggle button end-->
<!--search start-->
<form class="searchform" action="/project/task/{{.project.Id}}" method="get">
<select name="status" class="form-control">
<option value=""></option>
<option value="1" {{if eq "1" .condArr.status}}selected{{end}}></option>
<option value="2" {{if eq "2" .condArr.status}}selected{{end}}></option>
<option value="3" {{if eq "3" .condArr.status}}selected{{end}}></option>
<option value="4" {{if eq "4" .condArr.status}}selected{{end}}></option>
<option value="5" {{if eq "5" .condArr.status}}selected{{end}}></option>
<option value="6" {{if eq "6" .condArr.status}}selected{{end}}></option>
</select>
<select name="type" class="form-control">
<option value=""></option>
<option value="1" {{if eq "1" .condArr.type}}selected{{end}}></option>
<option value="2" {{if eq "2" .condArr.type}}selected{{end}}></option>
<option value="3" {{if eq "3" .condArr.type}}selected{{end}}></option>
<option value="4" {{if eq "4" .condArr.type}}selected{{end}}></option>
<option value="5" {{if eq "5" .condArr.type}}selected{{end}}></option>
<option value="6" {{if eq "6" .condArr.type}}selected{{end}}></option>
<option value="7" {{if eq "7" .condArr.type}}selected{{end}}></option>
<option value="8" {{if eq "8" .condArr.type}}selected{{end}}></option>
</select>
<select name="acceptid" class="form-control">
<option value=""></option>
{{range .teams}}
<option value="{{.Userid}}" {{if eq .Userid $.acceptid}}selected{{end}}>{{getRealname .Userid}}</option>
{{end}}
</select>
<input type="text" class="form-control" name="keywords" placeholder="" value="{{.condArr.keywords}}"/>
<button type="submit" class="btn btn-primary"></button>
</form>
<!--search end-->
{{template "inc/user-info.tpl" .}} </div>
<!-- header section end-->
<!-- page heading start-->
<div class="page-heading">
<h3> </h3>
<ul class="breadcrumb pull-left">
<li> <a href="/user/show/{{.LoginUserid}}">OPMS</a> </li>
<li> <a href="/project/{{.project.Id}}">{{substr .project.Name 0 8}}</a> </li>
<li class="active"> </li>
</ul>
<div class="pull-right">
<a href="/project/task/{{.project.Id}}" class="btn btn-default {{if eq .condArr.filter ""}}active{{end}}"></a>
<a href="/project/task/{{.project.Id}}?filter=accept" class="hidden-xs btn btn-default {{if eq .condArr.filter "accept"}}active{{end}}" style="padding:6px;"></a>
<a href="/project/task/{{.project.Id}}?filter=create" class="hidden-xs btn btn-default {{if eq .condArr.filter "create"}}active{{end}}" style="padding:6px;"></a>
<a href="/project/task/{{.project.Id}}?filter=complete" class="hidden-xs btn btn-default {{if eq .condArr.filter "complete"}}active{{end}}" style="padding:6px;"></a>
<a href="/project/task/{{.project.Id}}?filter=close" class="hidden-xs btn btn-default {{if eq .condArr.filter "close"}}active{{end}}" style="padding:6px;"></a>
<a href="/project/task/{{.project.Id}}?filter=cancel" class="hidden-xs btn btn-default {{if eq .condArr.filter "cancel"}}active{{end}}" style="padding:6px;"></a>
<a href="/task/add/{{.project.Id}}" class="btn btn-success">+</a>
<a href="/project/taskbatch/{{.project.Id}}" class="btn btn-warning">+</a>
</div>
</div>
<!-- page heading end-->
<!--body wrapper start-->
<div class="wrapper">
<div class="row">
<div class="col-sm-12">
<section class="panel">
<header class="panel-heading"> / {{.countTask}}<span class="tools pull-right"><a href="javascript:;" class="fa fa-chevron-down"></a>
<!--a href="javascript:;" class="fa fa-times"></a-->
</span> </header>
<div class="panel-body">
<section id="unseen">
<form id="project-form-list">
<table class="table table-bordered table-striped table-condensed" id="dynamic-table">
<thead>
<tr>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th class="hidden-xs"></th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
{{range $k,$v := .tasks}}
<tr>
<td><span class="label {{if eq 1 $v.Level}}label-danger{{else if eq 2 $v.Level}}label-warning{{else if eq 3 $v.Level}}label-primary{{else if eq 4 $v.Level}}label-default{{end}}">{{$v.Level}}</span></td>
<td><a href="/task/show/{{$v.Id}}">{{$v.Name}}</a></td>
<td>{{getTaskStatus $v.Status}}</td>
<td>{{getDate $v.Ended}}</td>
<td><a href="/user/show/{{$v.Acceptid}}">{{getRealname $v.Acceptid}}</a></td>
<td class="hidden-xs"><a href="/user/show/{{$v.Completeid}}">{{getRealname $v.Completeid}}</a></td>
<td>{{$v.Tasktime}}</td>
<td><a href="/need/show/{{$v.Needsid}}">{{getNeedsname $v.Needsid}}</a></td>
<td><a href="#acceptModal" data-toggle="modal" data-id="{{$v.Id}}" title="" class="btn btn-warning btn-xs"><i class="fa fa-hand-o-right"></i></a> <a href="javascript:;" data-id="{{$v.Id}}" class="js-task-status btn btn-success btn-xs" data-status="2" title=""><i class="fa fa-chevron-circle-right"></i></a> <a href="javascript:;" data-id="{{$v.Id}}" class="js-task-status btn btn-info btn-xs" data-status="3" title=""><i class="fa fa-check-square"></i></a> <a href="/task/edit/{{$v.Id}}" title="" class="btn btn-danger btn-xs"><i class="fa fa-pencil-square-o"></i></a> </td>
</tr>
{{end}}
</tbody>
</table>
</form>
{{template "inc/page.tpl" .}}
</section>
</div>
</section>
</div>
</div>
</div>
<!--body wrapper end-->
<div aria-hidden="true" aria-labelledby="acceptModalLabel" role="dialog" tabindex="-1" id="acceptModal" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">?</h4>
</div>
<div class="modal-body">
<select id="acceptid" class="form-control">
<option value=""></option>
{{range .teams}}
<option value="{{.Userid}}">{{getRealname .Userid}}</option>
{{end}}
</select>
<p></p>
<textarea id="note" placeholder="" style="height:90px;" class="form-control"></textarea>
</div>
<div class="modal-footer">
<input type="hidden" id="taskid" />
<button data-dismiss="modal" class="btn btn-default" type="button"></button>
<button class="btn btn-primary js-dialog-taskaccept" type="button"></button>
</div>
</div>
</div>
</div>
<!--footer section start-->
{{template "inc/foot-info.tpl" .}}
<!--footer section end-->
</div>
<!-- main content end-->
</section>
{{template "inc/foot.tpl" .}}
<script type="text/javascript" src="/static/js/advanced-datatable/js/jquery.dataTables.js"></script>
<script type="text/javascript" src="/static/js/data-tables/DT_bootstrap.js"></script>
<script src="/static/js/dynamic_table_init.js"></script>
<script>
$(function(){
$('#acceptModal').on('show.bs.modal', function (e) {
$('#taskid').val($(e.relatedTarget).attr('data-id'))
})
})
</script>
</body>
</html>
```
|
```groff
.\" $OpenBSD: strxfrm.3,v 1.12 2019/01/18 07:43:36 schwarze Exp $
.\"
.\" All rights reserved.
.\"
.\" This code is derived from software contributed to Berkeley by
.\" Chris Torek and the American National Standards Committee X3,
.\" on Information Processing Systems.
.\"
.\" 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 University 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 REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd $Mdocdate: January 18 2019 $
.Dt STRXFRM 3
.Os
.Sh NAME
.Nm strxfrm ,
.Nm strxfrm_l
.Nd transform a string under locale
.Sh SYNOPSIS
.In string.h
.Ft size_t
.Fn strxfrm "char *dst" "const char *src" "size_t n"
.Ft size_t
.Fn strxfrm_l "char *dst" "const char *src" "size_t n" "locale_t locale"
.Sh DESCRIPTION
The idea of
.Fn strxfrm
and
.Fn strxfrm_l
is to
.Dq un-localize
a string: the functions transform
.Ar src ,
storing the result in
.Ar dst ,
such that
.Xr strcmp 3
on transformed strings returns what
.Xr strcoll 3
on the original untransformed strings would return.
.Pp
On
.Ox ,
both have the same effect as
.Xr strlcpy 3 ,
and the global locale, the thread-specific locale, and the
.Fa locale
argument are ignored.
On other operating systems, the behaviour may depend on the
.Dv LC_CTYPE
and
.Dv LC_COLLATE
locale categories set with
.Xr setlocale 3 ,
.Xr uselocale 3 ,
or
.Xr newlocale 3 .
.Sh SEE ALSO
.Xr newlocale 3 ,
.Xr setlocale 3 ,
.Xr strcmp 3 ,
.Xr strcoll 3 ,
.Xr strlcpy 3 ,
.Xr wcsxfrm 3
.Sh STANDARDS
The
.Fn strxfrm
function conforms to
.St -ansiC ,
and
.Fn strxfrm_l
to
.St -p1003.1-2008 .
.Sh HISTORY
The
.Fn strxfrm
function has been available since
.Bx 4.3 Reno ,
and
.Fn strxfrm_l
since
.Ox 6.2 .
```
|
```go
package badger
import (
"bytes"
"errors"
"os"
"sync/atomic"
"time"
"github.com/kataras/iris/v12/context"
"github.com/kataras/iris/v12/core/memstore"
"github.com/kataras/iris/v12/sessions"
"github.com/dgraph-io/badger/v2"
"github.com/kataras/golog"
)
// DefaultFileMode used as the default database's "fileMode"
// for creating the sessions directory path, opening and write the session file.
var (
DefaultFileMode = 0755
)
// Database the badger(key-value file-based) session storage.
type Database struct {
// Service is the underline badger database connection,
// it's initialized at `New` or `NewFromDB`.
// Can be used to get stats.
Service *badger.DB
logger *golog.Logger
closed uint32 // if 1 is closed.
}
var _ sessions.Database = (*Database)(nil)
// New creates and returns a new badger(key-value file-based) storage
// instance based on the "directoryPath".
// DirectoryPath should is the directory which the badger database will store the sessions,
// i.e ./sessions
//
// It will remove any old session files.
func New(directoryPath string) (*Database, error) {
if directoryPath == "" {
return nil, errors.New("directoryPath is empty")
}
lindex := directoryPath[len(directoryPath)-1]
if lindex != os.PathSeparator && lindex != '/' {
directoryPath += string(os.PathSeparator)
}
// create directories if necessary
if err := os.MkdirAll(directoryPath, os.FileMode(DefaultFileMode)); err != nil {
return nil, err
}
opts := badger.DefaultOptions(directoryPath)
badgerLogger := context.DefaultLogger("sessionsdb.badger").DisableNewLine()
opts.Logger = badgerLogger
service, err := badger.Open(opts)
if err != nil {
badgerLogger.Errorf("unable to initialize the badger-based session database: %v\n", err)
return nil, err
}
return NewFromDB(service), nil
}
// NewFromDB same as `New` but accepts an already-created custom badger connection instead.
func NewFromDB(service *badger.DB) *Database {
db := &Database{Service: service}
// runtime.SetFinalizer(db, closeDB)
return db
}
// SetLogger sets the logger once before server ran.
// By default the Iris one is injected.
func (db *Database) SetLogger(logger *golog.Logger) {
db.logger = logger
}
// Acquire receives a session's lifetime from the database,
// if the return value is LifeTime{} then the session manager sets the life time based on the expiration duration lives in configuration.
func (db *Database) Acquire(sid string, expires time.Duration) memstore.LifeTime {
txn := db.Service.NewTransaction(true)
defer txn.Commit()
bsid := makePrefix(sid)
item, err := txn.Get(bsid)
if err == nil {
// found, return the expiration.
return memstore.LifeTime{Time: time.Unix(int64(item.ExpiresAt()), 0)}
}
// not found, create an entry with ttl and return an empty lifetime, session manager will do its job.
if err != nil {
if err == badger.ErrKeyNotFound {
// create it and set the expiration, we don't care about the value there.
err = txn.SetEntry(badger.NewEntry(bsid, bsid).WithTTL(expires))
}
}
if err != nil {
db.logger.Error(err)
}
return memstore.LifeTime{} // session manager will handle the rest.
}
// OnUpdateExpiration not implemented here, yet.
// Note that this error will not be logged, callers should catch it manually.
func (db *Database) OnUpdateExpiration(sid string, newExpires time.Duration) error {
return sessions.ErrNotImplemented
}
var delim = byte('_')
func makePrefix(sid string) []byte {
return append([]byte(sid), delim)
}
func makeKey(sid, key string) []byte {
return append(makePrefix(sid), []byte(key)...)
}
// Set sets a key value of a specific session.
// Ignore the "immutable".
func (db *Database) Set(sid string, key string, value interface{}, ttl time.Duration, immutable bool) error {
valueBytes, err := sessions.DefaultTranscoder.Marshal(value)
if err != nil {
db.logger.Error(err)
return err
}
err = db.Service.Update(func(txn *badger.Txn) error {
return txn.SetEntry(badger.NewEntry(makeKey(sid, key), valueBytes).WithTTL(ttl))
})
if err != nil {
db.logger.Error(err)
}
return err
}
// Get retrieves a session value based on the key.
func (db *Database) Get(sid string, key string) (value interface{}) {
if err := db.Decode(sid, key, &value); err == nil {
return value
}
return nil
}
// Decode binds the "outPtr" to the value associated to the provided "key".
func (db *Database) Decode(sid, key string, outPtr interface{}) error {
err := db.Service.View(func(txn *badger.Txn) error {
item, err := txn.Get(makeKey(sid, key))
if err != nil {
return err
}
return item.Value(func(valueBytes []byte) error {
return sessions.DefaultTranscoder.Unmarshal(valueBytes, outPtr)
})
})
if err != nil && err != badger.ErrKeyNotFound {
db.logger.Error(err)
}
return err
}
// validSessionItem reports whether the current iterator's item key
// is a value of the session id "prefix".
func validSessionItem(key, prefix []byte) bool {
return len(key) > len(prefix) && bytes.Equal(key[0:len(prefix)], prefix)
}
// Visit loops through all session keys and values.
func (db *Database) Visit(sid string, cb func(key string, value interface{})) error {
prefix := makePrefix(sid)
txn := db.Service.NewTransaction(false)
defer txn.Discard()
iter := txn.NewIterator(badger.DefaultIteratorOptions)
defer iter.Close()
for iter.Rewind(); ; iter.Next() {
if !iter.Valid() {
break
}
item := iter.Item()
key := item.Key()
if !validSessionItem(key, prefix) {
continue
}
var value interface{}
err := item.Value(func(valueBytes []byte) error {
return sessions.DefaultTranscoder.Unmarshal(valueBytes, &value)
})
if err != nil {
db.logger.Errorf("[sessionsdb.badger.Visit] %v", err)
return err
}
cb(string(bytes.TrimPrefix(key, prefix)), value)
}
return nil
}
var iterOptionsNoValues = badger.IteratorOptions{
PrefetchValues: false,
PrefetchSize: 100,
Reverse: false,
AllVersions: false,
}
// Len returns the length of the session's entries (keys).
func (db *Database) Len(sid string) (n int) {
prefix := makePrefix(sid)
txn := db.Service.NewTransaction(false)
iter := txn.NewIterator(iterOptionsNoValues)
for iter.Rewind(); ; iter.Next() {
if !iter.Valid() {
break
}
if validSessionItem(iter.Item().Key(), prefix) {
n++
}
}
iter.Close()
txn.Discard()
return
}
// Delete removes a session key value based on its key.
func (db *Database) Delete(sid string, key string) (deleted bool) {
txn := db.Service.NewTransaction(true)
err := txn.Delete(makeKey(sid, key))
if err != nil {
db.logger.Error(err)
return false
}
return txn.Commit() == nil
}
// Clear removes all session key values but it keeps the session entry.
func (db *Database) Clear(sid string) error {
prefix := makePrefix(sid)
txn := db.Service.NewTransaction(true)
defer txn.Commit()
iter := txn.NewIterator(iterOptionsNoValues)
defer iter.Close()
for iter.Rewind(); iter.ValidForPrefix(prefix); iter.Next() {
key := iter.Item().Key()
if err := txn.Delete(key); err != nil {
db.logger.Warnf("Database.Clear: %s: %v", key, err)
return err
}
}
return nil
}
// Release destroys the session, it clears and removes the session entry,
// session manager will create a new session ID on the next request after this call.
func (db *Database) Release(sid string) error {
// clear all $sid-$key.
err := db.Clear(sid)
if err != nil {
return err
}
// and remove the $sid.
txn := db.Service.NewTransaction(true)
if err = txn.Delete([]byte(sid)); err != nil {
db.logger.Warnf("Database.Release.Delete: %s: %v", sid, err)
return err
}
if err = txn.Commit(); err != nil {
db.logger.Debugf("Database.Release.Commit: %s: %v", sid, err)
return err
}
return nil
}
// Close shutdowns the badger connection.
func (db *Database) Close() error {
return closeDB(db)
}
func closeDB(db *Database) error {
if atomic.LoadUint32(&db.closed) > 0 {
return nil
}
err := db.Service.Close()
if err != nil {
db.logger.Warnf("closing the badger connection: %v", err)
} else {
atomic.StoreUint32(&db.closed, 1)
}
return err
}
```
|
```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.guacamole.auth.jdbc.sharing.permission;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
import org.apache.guacamole.net.auth.permission.ObjectPermission;
import org.apache.guacamole.net.auth.simple.SimpleObjectPermissionSet;
/**
* An immutable ObjectPermissionSet which defines only READ permissions for a
* fixed set of identifiers.
*/
public class SharedObjectPermissionSet extends SimpleObjectPermissionSet {
/**
* Returns a new Set of ObjectPermissions defining READ access for each of
* the given identifiers.
*
* @param identifiers
* The identifiers of the objects for which READ permission should be
* granted.
*
* @return
* A new Set of ObjectPermissions granting READ access for each of the
* given identifiers.
*/
private static Set<ObjectPermission> getPermissions(Collection<String> identifiers) {
// Include one READ permission for each of the given identifiers
Set<ObjectPermission> permissions = new HashSet<ObjectPermission>();
for (String identifier : identifiers)
permissions.add(new ObjectPermission(ObjectPermission.Type.READ, identifier));
return permissions;
}
/**
* Creates a new SharedObjectPermissionSet which grants read-only access to
* the objects having the given identifiers. No other permissions are
* granted.
*
* @param identifiers
* The identifiers of the objects for which READ access should be
* granted.
*/
public SharedObjectPermissionSet(Collection<String> identifiers) {
super(getPermissions(identifiers));
}
}
```
|
Naypyitaw State Academy (NSA) is a state-run university in Myanmar's national capital of Naypyidaw. Located in Zabuthiri Township, the university includes the faculties of arts, science, laws, economics, medicine, social studies and sports. NSA opened on 9 November 2022, to enable students from Naypyidaw Union Territory, including the children of civil servants, to pursue higher education without moving to urban centres like Yangon and Mandalay.
References
Universities and colleges in Myanmar
2022 establishments in Myanmar
Educational institutions established in 2022
|
```javascript
'use strict';
module.exports = object => {
if (typeof object !== 'object') {
throw new TypeError('Expected an object');
}
const ret = {};
for (const key of Object.keys(object)) {
const value = object[key];
ret[value] = key;
}
return ret;
};
```
|
Aranuka Airport is an airport, located approximately one kilometre north of the centre of Buariki village on the island of Buariki, Aranuka, Kiribati.
The airport is served twice a week by Air Kiribati from Kuria Airport on Kuria. From there, the aircraft continues twenty minutes after having landed to Bonriki International Airport, Tarawa.
Airlines and destinations
Notes
Airports in Kiribati
Aranuka
|
The Patent Leather Pug is a 1925 American silent sports drama film directed by Albert S. Rogell and starring Billy Sullivan, Ruth Dwyer, and J.P. McGowan. Completed in 1925, it first premiered in London under the alternative title A Desperate Finish before going on general release in the United States in January 1926.
Cast
Billy Sullivan as Billy Griffin
Ruth Dwyer as Catherine Curtis
J.P. McGowan as James Curtis
Gloria Grey
Vivian Vance
John Sinclair
Melbourne MacDowell
Kit Guard
Hayden Stevenson
Eddie Diggins
References
Bibliography
Munden, Kenneth White. The American Film Institute Catalog of Motion Pictures Produced in the United States, Part 1. University of California Press, 1997.
External links
1925 films
1920s sports drama films
1920s English-language films
American silent feature films
American sports drama films
American black-and-white films
Rayart Pictures films
Films directed by Albert S. Rogell
1920s American films
Silent American drama films
Silent sports drama films
|
```makefile
################################################################################
#
# axel
#
################################################################################
AXEL_VERSION = 2.17.11
AXEL_SITE = path_to_url
AXEL_SOURCE = axel-$(AXEL_VERSION).tar.xz
AXEL_LICENSE = GPL-2.0+
AXEL_LICENSE_FILES = COPYING
AXEL_CPE_ID_VENDOR = axel_project
AXEL_DEPENDENCIES = host-pkgconf $(TARGET_NLS_DEPENDENCIES)
# ac_cv_prog_cc_c99 is required for BR2_USE_WCHAR=n because the C99 test
# provided by autoconf relies on wchar_t.
AXEL_CONF_OPTS = \
ac_cv_prog_cc_c99=-std=c99 \
CFLAGS="$(TARGET_CFLAGS)"
ifeq ($(BR2_PACKAGE_OPENSSL),y)
AXEL_CONF_OPTS += --with-ssl
AXEL_DEPENDENCIES += openssl
else
AXEL_CONF_OPTS += --without-ssl
endif
$(eval $(autotools-package))
```
|
The Inferior Five (or I5) are a parody superhero team appearing in books by the American publisher DC Comics. Created by writer E. Nelson Bridwell and artist Joe Orlando, the team premiered in the DC Comics title Showcase #62 (May-June 1966).
The premise is that the characters are the children of members of a superhero team called the Freedom Brigade, a parody of the Justice League of America. In their early appearances, the team went up against spoofs of the Marvel Comics heroes. Showcase #63 featured "Brute Brainard", who was exposed to Phi Beta Kappa radiation and became the giant green hulk known as "Man-Mountain", and in #65, the team visited Dean Egghead's superhero academy to meet the five young "Egg's Men". When the team got their own series, early issues also mocked the Fantastic Four and Thor.
Publication history
First series
After appearing in Showcase #62, 63, and 65 (1966), they got their own title which lasted 12 issues. The first 10 had new material and were published from 1967 to 1968.
Issues #11 and 12 were published in 1972, and titled Inferior 5 (using the number 5 rather than spelling out the word) and were all reprints, except for the covers. Nothing changed with the alteration of the title.
Pre-Crisis
The team has appeared only sporadically after their series was canceled, with Showcase #100 being their only new appearance during the Bronze Age of Comic Books. Other appearances include one or two panels (there is disagreement over whether the characters in one panel are the Inferior Five) in Crisis on Infinite Earths, Captain Carrot and His Amazing Zoo Crew! in The Oz–Wonderland War #3 (March 1986), and the Grant Morrison-written Animal Man series. They appear in one panel in JLA: Another Nail as Flash and the Atom take a trip through many dimensions.
Although the Inferior Five's original stories made frequent references to other prominent DC heroes, Captain Carrot and His Amazing Zoo Crew! in The Oz–Wonderland War #3 revealed their adventures to have occurred on "Earth-Twelve", which had its own doppelgangers of the JLA, the Teen Titans, etc., meaning that any such references were out of continuity in relation to the heroes of DC's primary Earth-One.
Post-Crisis
Following Crisis on Infinite Earths, where the Five were seen in background cameos, the team's sole "continuity" appearance as a team was in the 1991 Angel and the Ape miniseries, where it was revealed that Angel and the Dumb Bunny are half-sisters. Members of the Justice League of America had cameos in the series, indicating that the Inferior Five now existed on the Post-Crisis Earth.
The Inferior Five appear in issue #17 of the Batman: The Brave and the Bold comics. The Inferior Five team up with the Legion of Substitute Heroes in The Brave and The Bold #35 and with Bat-Mite in Bat-Mite #5 (Dec. 2015).
Steve Gerber proposed a Vertigo version of the Inferior Five as a send-up of the "dark 'n' gritty" comics of the period, but this was rejected. Gerber later claimed that DC refused to publish anything with the title on the grounds that it would make them look "inferior" for publishing it.
2019 mini-series
In September 2019, a 12-issue maxi-series by Keith Giffen was initiated. It was a reinvention of the team, as the protagonists are now five children in the small town of Dangerfield, Arizona. It revolves around a mystery regarding their parents, and they are the only ones that notice something strange is going on. It takes place in 1988, where the invasion was successful on the town of Dangerfield. The aliens are in hiding, still experimenting with the metagene, and keeping a focus on the five kids. The book later reveals that the Invasion is metafictional. The series also contains a backup feature starring Peacemaker. The number of issues was soon reduced from 12 to 6. There was a fifteen month publishing hiatus between issues #4 (December 2019) and #5 (March 2021) with the last two issues released digitally.
Members
Merryman (Myron Victor, occupation: comic strip artist), a "98 Pound Weakling", he is the son of the Patriot and Lady Liberty (parodying Uncle Sam and Quality Comics' Miss America) and a descendant of Yellowjacket and the Crimson Chrysanthemum (obvious takeoffs on the Green Hornet and the Scarlet Pimpernel). The team's leader, he wears a jester outfit, having decided in the team's first appearance that if he was going to make a fool of himself, he might as well look the part. He is highly intelligent, making him the only team member who is thoroughly aware of the team's disadvantages. Although trained in the martial arts, he is physically a weakling with little practical ability to use such skills. He returned in Final Crisis as coordinator of the residents of Limbo, leading them in assisting the Supermen of the multiverse to fend off an attack from Mandrakk the Dark Monitor, causing Superman to reflect that anyone could be a hero.
Awkwardman (Leander Brent, occupation: beachcomber), son of Mr. Might (parodying Superman) and the Mermaid (parodying Aquaman). He is super-strong and able to live underwater, having inherited powers from both parents, but is also very clumsy. In keeping with his half-undersea heritage, he requires periodic contact with water, which can consist of simply pouring it over himself with a watering can. His codename is a pun on Aquaman; his surname "Brent" rhymes with Superman's surname of "Kent".
The Blimp (Herman Cramer, occupation: diner owner), the obese son of Captain Swift (parodying the Flash) who could fly but, as he lacked his father's speed powers, could only fly at super slow speeds — with a tail wind. He was one of the few superheroes to attend the funeral of Booster Gold.
White Feather (William King, occupation: photographer), son of The Bowman (parodying Green Arrow) and an unidentified woman. He was a superb archer when he did not think anyone was watching; people made him nervous (as did just about everything else). His surname "King" parallels Green Arrow's surname "Queen", and his codename is a reference to the traditional symbol of cowardice.
The Dumb Bunny (Athena Tremor, occupation: model), the stupid but super-strong daughter of Princess Power (parodying Wonder Woman) and Steve Tremor (parodying Steve Trevor). In later continuity (revealed in Angel and the Ape (vol. 2) #1), she is still the daughter of Princess Power; it is later revealed that her father is actually Professor Theo O'Day. Shortly after Athena's birth, Professor O'Day left Princess Power and fell in love with a non-powered woman. Together, they had a daughter, Angel Beatrix O'Day (who is Athena's half-sister). After Angel's mother died, Professor O'Day reconciled with Princess Power and raised Athena and Angel together. As the Dumb Bunny, Athena is described as "strong as an ox and almost as intelligent". She is named after the Greek goddess of wisdom, Athena. Although her surname "Tremor" is still given in current continuity, she is the daughter of Professor O'Day instead of Steve Tremor. According to the end of The Brave and The Bold #35, Dumb Bunny actually appears to be extremely intelligent, as she clearly understands a scientist and explains it to the other people. Since her father is a professor, the "Dumb" role play may be her "trick" and also not wanting to overshadow "Merryman".
Superior Five
In the miniseries Villains United, the Inferior Five were paid homage as a group of supervillains who are tentatively known as the Superior Five. Each member has the abilities of an I5 member but, aside from being evil, are serious and modern-styled characters. They consist of:
Tremor (Awkwardman)
Hindenburg (the Blimp)
Splitshot (White Feather)
Lagomorph (the Dumb Bunny)
Jongleur (Merryman)
Little has been seen of these characters except for one panel in Villains United #4 and a few shots of them in the background in the same issue. They are among the imprisoned supervillains in Salvation Run. Jongleur is one of the villains sent to retrieve the Get Out of Hell Free card from the Secret Six.
In other media
The Inferior Five make a cameo appearance in the Batman: The Brave and the Bold episode "Mayhem of the Music Meister!".
The Inferior Five appear as assist characters in Scribblenauts Unmasked: A DC Comics Adventure.
Awards
The series and characters have been recognized in the field, being awarded a 1966 Alley Award for Best Humor Title: Costumed.
References
External links
DC page: IF2019
Inferior Five at Don Markstein's Toonopedia. Archived from the original on July 12, 2015.
Inferior Five story summaries
Comic Book Awards Almanac
Characters created by Joe Orlando
Comics characters introduced in 1966
DC Comics superhero teams
Parody superheroes
|
The siege of Dieppe (2 November 1442 – 14 August 1443) took place during the Hundred Years War. English forces led by John Talbot, Earl of Shrewsbury besieged and failed to capture the French-held port of Dieppe in Normandy.
Prelude
The English commander John Talbot, Earl of Shrewsbury marched out with a core troop of 600 men from his headquarters in Jumièges, Normandy at the end of October 1442 to besiege the French-held port of Dieppe. The French garrison of the castle of Charlemesnil surrendered to Talbot's army.
Siege
Talbot built a wooden fort on the heights of Le Pollet east of Dieppe and installed a garrison of 500 men under Sir William Peyto along with 200 artillery pieces of various make and began to bombard Dieppe's fortifications and houses with them.
On 12 August 1443 a French relief army of 1,600 men under the dauphin Louis arrived at Dieppe, which was garrisoned by several hundred men-at-arms led by Charles Desmarets. Two more French armies had reinforced the town previously. At 8 am on 14 August, the French attacked the English fort to the sound of trumpets. The French had five or six wooden bridges on wheels and cranes that hoisted the bridges into position over the English walls. The attacking French troops were repulsed by English missile and arrow fire and lost 100 killed and hundreds wounded.
The citizens of Dieppe reinforced the French army with between 60 and 80 large crossbows and the dauphin ordered the attack renewed. The English were defeated, with 300 killed and 14 French-speaking survivors hanged as traitors on the dauphin's orders. Sir William Peyto, Sir John Ripley and Henry Talbot were captured, among others. The fort was dismantled on the dauphin's orders and the artillery carried off to Dieppe's arsenal.
Citations
References
1440s in France
Dieppe
Dieppe
Dieppe
Military history of Normandy
Dieppe
Dieppe
Hundred Years' War, 1415–1453
Dieppe
|
Antithyra is a genus of moth in the family Gelechiidae. It contains the species Antithyra vineata, which is found in Sri Lanka.
The wingspan is . The forewings are light ochreous-yellow, irregularly chequered throughout with undefined grey spots irrorated (speckled) with black. The hindwings are dark grey.
The larvae feed on minute lichens and algae on the stems of various trees. At first in an hourglass-shaped case, but later constructing a supplementary tube extending in a straight line in both directions, with lateral triangular pointed projections disposed alternately at equal distances, all concealing valves through which the larva can protrude its head for feeding or observation. If disturbed at one point, it re-appears at another. The entire case is temporarily anchored at either end to the bark. When food is exhausted at one spot, the strands are severed and the case shifted to another situation. Pupation takes place in the centre, beneath the median pad.
References
Gelechiidae
Taxa named by Edward Meyrick
Monotypic moth genera
Moths of Sri Lanka
Gelechiidae genera
|
```javascript
// @flow
("": number);
```
|
```yaml
apiVersion: release-notes/v2
kind: feature
area: traffic-management
issue:
- path_to_url
releaseNotes:
- |
**Promoted** CNI to beta.
```
|
```smalltalk
using System;
using System.Collections;
using System.Linq;
namespace Microsoft.MixedReality.Toolkit.Input
{
/// <summary>
/// Base class for input sources whose pointers are all active pointers in the scene.
/// </summary>
/// <remarks>
/// <para>This base class is intended to represent input sources which raise events to all active pointers found by the FocusProvider in a scene.</para>
/// </remarks>
public class BaseGlobalInputSource : IMixedRealityInputSource, IDisposable
{
/// <summary>
/// Constructor.
/// </summary>
public BaseGlobalInputSource(string name, IMixedRealityFocusProvider focusProvider, InputSourceType sourceType = InputSourceType.Other)
{
SourceId = (CoreServices.InputSystem != null) ? CoreServices.InputSystem.GenerateNewSourceId() : 0;
SourceName = name;
FocusProvider = focusProvider;
SourceType = sourceType;
UpdateActivePointers();
}
/// <inheritdoc />
public uint SourceId { get; }
/// <inheritdoc />
public string SourceName { get; }
/// <inheritdoc />
public virtual IMixedRealityPointer[] Pointers { get; set; }
/// <inheritdoc />
public InputSourceType SourceType { get; set; }
private IMixedRealityFocusProvider FocusProvider;
public void UpdateActivePointers()
{
Pointers = FocusProvider.GetPointers<IMixedRealityPointer>().Where(x => x.IsActive).ToArray();
}
#region IEquality Implementation
public static bool Equals(IMixedRealityInputSource left, IMixedRealityInputSource right)
{
return left.Equals(right);
}
/// <inheritdoc />
bool IEqualityComparer.Equals(object left, object right)
{
return left.Equals(right);
}
public override bool Equals(object obj)
{
if (ReferenceEquals(null, obj)) { return false; }
if (ReferenceEquals(this, obj)) { return true; }
if (obj.GetType() != GetType()) { return false; }
return Equals((IMixedRealityInputSource)obj);
}
private bool Equals(IMixedRealityInputSource other)
{
return other != null && SourceId == other.SourceId && string.Equals(SourceName, other.SourceName);
}
/// <inheritdoc />
int IEqualityComparer.GetHashCode(object obj)
{
return obj.GetHashCode();
}
public override int GetHashCode()
{
unchecked
{
int hashCode = 0;
hashCode = (hashCode * 397) ^ (int)SourceId;
hashCode = (hashCode * 397) ^ (SourceName != null ? SourceName.GetHashCode() : 0);
return hashCode;
}
}
/// <summary>
/// Dispose.
/// </summary>
public virtual void Dispose() { }
#endregion IEquality Implementation
}
}
```
|
```sqlpl
SELECT
se.stream_version as event_number,
e.event_id,
s.stream_uuid,
se.original_stream_version as stream_version,
e.event_type,
e.correlation_id,
e.causation_id,
convert_from(e.data, current_setting('server_encoding')) as data,
convert_from(e.metadata, current_setting('server_encoding')) as metadata,
e.created_at
FROM stream_events se
INNER JOIN streams s ON s.stream_id = se.original_stream_id
INNER JOIN events e ON se.event_id = e.event_id
WHERE se.stream_id = 0
ORDER BY se.stream_version ASC
LIMIT 10;
```
|
```shell
Quick port test with `netcat`
Disable `IPv6`
Get real network statistics with `slurm`
Limit the `wget` download rate
Bandwidth monitoring tools
```
|
```xml
import { assert } from 'chai';
import * as fs from 'fs';
import * as path from 'path';
import * as ts from 'typescript';
import {
getDefaultExportForFile,
parse,
PropFilter,
withCustomConfig,
withDefaultConfig
} from '../parser';
import { check, checkComponent, fixturePath } from './testUtils';
describe('parser', () => {
it('should parse simple react class component', () => {
check('Column', {
Column: {
prop1: { type: 'string', required: false },
prop2: { type: 'number' },
prop3: { type: '() => void' },
prop4: { type: '"option1" | "option2" | "option3"' }
}
});
});
it('should parse simple react class component with console.log inside', () => {
check('ColumnWithLog', {
Column: {
prop1: { type: 'string', required: false },
prop2: { type: 'number' },
prop3: { type: '() => void' },
prop4: { type: '"option1" | "option2" | "option3"' }
}
});
});
it('should parse simple react class component as default export', () => {
check('ColumnWithDefaultExport', {
Column: {
prop1: { type: 'string', required: false },
prop2: { type: 'number' },
prop3: { type: '() => void' },
prop4: { type: '"option1" | "option2" | "option3"' }
}
});
});
it('should parse simple typescript definition file with default export', () => {
check(
'StatelessDisplayNameFolder/Stateless.d.ts',
{
Stateless: {
foo: { description: '', type: 'string', required: false }
}
},
true,
''
);
});
describe('file path', () => {
it('should return the correct filepath for a parsed component', () => {
const results = parse([fixturePath('FilePathCheck')]);
results.forEach(result => {
assert.equal(
result.filePath,
path.resolve('src/__tests__/data/FilePathCheck.tsx')
);
});
});
it('should return the correct filepath for multiple parsed components', () => {
const results = parse([
fixturePath('FilePathCheck'),
fixturePath('Column'),
fixturePath('ColumnWithDefaultExportOnly')
]);
const paths = [
path.resolve('src/__tests__/data/FilePathCheck.tsx'),
path.resolve('src/__tests__/data/Column.tsx'),
path.resolve('src/__tests__/data/ColumnWithDefaultExportOnly.tsx')
];
results.forEach((result, index) => {
assert.equal(result.filePath, paths[index]);
});
});
});
it('should parse mulitple files', () => {
const result = parse([
fixturePath('Column'),
fixturePath('ColumnWithDefaultExportOnly')
]);
checkComponent(
result,
{
Column: {},
ColumnWithDefaultExportOnly: {}
},
false
);
});
it('should parse simple react class component as default export only', () => {
check('ColumnWithDefaultExportOnly', {
ColumnWithDefaultExportOnly: {
prop1: { type: 'string', required: false },
prop2: { type: 'number' },
prop3: { type: '() => void' },
prop4: { type: '"option1" | "option2" | "option3"' }
}
});
});
it('should parse simple react class component as default anonymous export', () => {
check('ColumnWithDefaultAnonymousExportOnly', {
ColumnWithDefaultAnonymousExportOnly: {
prop1: { type: 'string', required: false },
prop2: { type: 'number' },
prop3: { type: '() => void' },
prop4: { type: '"option1" | "option2" | "option3"' }
}
});
});
it('should parse simple react class component with state', () => {
check('AppMenu', {
AppMenu: {
menu: { type: 'any' }
}
});
});
it('should parse simple react class component with picked properties', () => {
check('ColumnWithPick', {
Column: {
prop1: { type: 'string', required: false },
prop2: { type: 'number' },
propx: { type: 'number' }
}
});
});
it('should parse component with props with external type', () => {
check('ColumnWithPropsWithExternalType', {
ColumnWithPropsWithExternalType: {
prop1: { type: 'string', required: false },
prop2: { type: 'number' },
prop3: { type: 'MyExternalType' }
}
});
});
it('should parse HOCs', () => {
check('ColumnHigherOrderComponent', {
ColumnExternalHigherOrderComponent: {
prop1: { type: 'string' }
},
ColumnHigherOrderComponent1: {
prop1: { type: 'string' }
},
ColumnHigherOrderComponent2: {
prop1: { type: 'string' }
},
RowExternalHigherOrderComponent: {
prop1: { type: 'string' }
},
RowHigherOrderComponent1: {
prop1: { type: 'string' }
},
RowHigherOrderComponent2: {
prop1: { type: 'string' }
}
});
});
it('should parse component with inherited properties HtmlAttributes<any>', () => {
check(
'ColumnWithHtmlAttributes',
{
Column: {
// tslint:disable:object-literal-sort-keys
prop1: { type: 'string', required: false },
prop2: { type: 'number' },
// HtmlAttributes
defaultChecked: {
type: 'boolean',
required: false,
description: ''
}
// ...
// tslint:enable:object-literal-sort-keys
}
},
false
);
});
it('should parse component without exported props interface', () => {
check('ColumnWithoutExportedProps', {
Column: {
prop1: { type: 'string', required: false },
prop2: { type: 'number' }
}
});
});
it('should parse functional component exported as const', () => {
check(
'ConstExport',
{
Row: {
prop1: { type: 'string', required: false },
prop2: { type: 'number' }
},
// TODO: this wasn't there before, i would guess that that's correct
test: {}
},
false
);
});
it('should parse react component with properties defined in external file', () => {
check('ExternalPropsComponent', {
ExternalPropsComponent: {
prop1: { type: 'string' }
}
});
});
it('should parse static sub components', () => {
check('StatelessStaticComponents', {
StatelessStaticComponents: {
myProp: { type: 'string' }
},
'StatelessStaticComponents.Label': {
title: { type: 'string' }
}
});
});
it('should parse static sub components on class components', () => {
check('ColumnWithStaticComponents', {
Column: {
prop1: { type: 'string' }
},
'Column.Label': {
title: { type: 'string' }
},
'Column.SubLabel': {}
});
});
it('should parse react component with properties extended from an external .tsx file', () => {
check('ExtendsExternalPropsComponent', {
ExtendsExternalPropsComponent: {
prop1: { type: 'number', required: false, description: 'prop1' },
prop2: { type: 'string', required: false, description: 'prop2' }
}
});
});
it('should parse react component with properties defined as type', () => {
check(
'FlippableImage',
{
FlippableImage: {
isFlippedX: { type: 'boolean', required: false },
isFlippedY: { type: 'boolean', required: false }
}
},
false
);
});
it('should parse react component with const definitions', () => {
check('InlineConst', {
MyComponent: {
foo: { type: 'any' }
}
});
});
it('should parse default interface export', () => {
check('ExportsDefaultInterface', {
Component: {
foo: { type: 'any' }
}
});
});
it('should parse react component that exports a prop type const', () => {
check('ExportsPropTypeShape', {
ExportsPropTypes: {
foo: { type: 'any' }
}
});
});
it('should parse react component that exports a prop type thats imported', () => {
check('ExportsPropTypeImport', {
ExportsPropTypes: {
foo: { type: 'any' }
}
});
});
// see issue #132 (path_to_url
it('should determine the parent fileName relative to the project directory', () => {
check(
'ExportsPropTypeImport',
{
ExportsPropTypes: {
foo: {
parent: {
fileName:
'react-docgen-typescript/src/__tests__/data/ExportsPropTypeImport.tsx',
name: 'ExportsPropTypesProps'
},
type: 'any'
} as any
}
},
true
);
});
describe('component with default props', () => {
const expectation = {
ComponentWithDefaultProps: {
sampleDefaultFromJSDoc: {
defaultValue: 'hello',
description: 'sample with default value',
required: true,
type: '"hello" | "goodbye"'
},
sampleFalse: {
defaultValue: false,
required: false,
type: 'boolean'
},
sampleNull: { type: 'null', required: false, defaultValue: null },
sampleNumber: { type: 'number', required: false, defaultValue: -1 },
sampleObject: {
defaultValue: `{ a: '1', b: 2, c: true, d: false, e: undefined, f: null, g: { a: '1' } }`,
required: false,
type: '{ [key: string]: any; }'
},
sampleString: {
defaultValue: 'hello',
required: false,
type: 'string'
},
sampleTrue: { type: 'boolean', required: false, defaultValue: true },
sampleUndefined: {
defaultValue: 'undefined',
required: false,
type: 'any'
}
}
};
it('should parse defined props', () => {
check('ComponentWithDefaultProps', expectation);
});
it('should parse referenced props', () => {
check('ComponentWithReferencedDefaultProps', expectation);
});
});
describe('component with @type jsdoc tag', () => {
const expectation = {
ComponentWithTypeJsDocTag: {
sampleTypeFromJSDoc: {
description: 'sample with custom type',
required: true,
type: 'string'
}
}
};
it('should parse defined props', () => {
check('ComponentWithTypeJsDocTag', expectation);
});
});
it('should parse react PureComponent', () => {
check('PureRow', {
Row: {
prop1: { type: 'string', required: false },
prop2: { type: 'number' }
}
});
});
it('should parse react PureComponent - regression test', () => {
check(
'Regression_v0_0_12',
{
Zoomable: {
originX: { type: 'number' },
originY: { type: 'number' },
scaleFactor: { type: 'number' }
}
},
false
);
});
it('should parse react functional component', () => {
check('Row', {
Row: {
prop1: { type: 'string', required: false },
prop2: { type: 'number' }
}
});
});
it('should parse react stateless component', () => {
check('Stateless', {
Stateless: {
myProp: { type: 'string' }
}
});
});
it('should get name for default export', () => {
check(
'ForwardRefDefaultExport',
{
ForwardRefDefaultExport: {
myProp: { type: 'string' }
}
},
false
);
});
it('should get name for default export 2', () => {
check(
'ForwardRefDefaultExportAtExport',
{
ForwardRefDefaultExport: {
myProp: { type: 'string' }
}
},
false
);
});
it('should component where last line is a comment', () => {
check('ExportObject', {
Baz: {
baz: { description: '', type: 'string' }
},
Bar: {
foo: { description: '', type: 'string' }
},
FooBar: {
foobar: { description: '', type: 'string' }
}
});
});
it('should parse react stateless component with intersection props', () => {
check('StatelessIntersectionProps', {
StatelessIntersectionProps: {
moreProp: { type: 'number' },
myProp: { type: 'string' }
}
});
});
it('should parse react stateless component default props when declared as a normal function', () => {
check('FunctionDeclarationDefaultProps', {
FunctionDeclarationDefaultProps: {
id: {
defaultValue: 1,
description: '',
required: false,
type: 'number'
}
}
});
});
it('should parse react stateless component default props when declared as a normal function inside forwardRef', () => {
check(
'ForwardRefDefaultValues',
{
ForwardRefDefaultValues: {
myProp: {
defaultValue: "I'm default",
description: 'myProp description',
type: 'string',
required: false
}
}
},
false,
'ForwardRefDefaultValues description'
);
});
it('should parse react stateless component with external intersection props', () => {
check('StatelessIntersectionExternalProps', {
StatelessIntersectionExternalProps: {
myProp: { type: 'string' },
prop1: { type: 'string', required: false }
}
});
});
it('should parse react stateless component with generic intersection props', () => {
check('StatelessIntersectionGenericProps', {
StatelessIntersectionGenericProps: {
myProp: { type: 'string' }
}
});
});
it('should parse react stateless component with intersection + union props', () => {
check('SimpleUnionIntersection', {
SimpleUnionIntersection: {
bar: { type: 'string', description: '' },
baz: { type: 'string', description: '' },
foo: { type: 'string', description: '' }
}
});
});
it('should parse react stateless component with intersection + union overlap props', () => {
check('SimpleDiscriminatedUnionIntersection', {
SimpleDiscriminatedUnionIntersection: {
bar: { type: '"one" | "other"', description: '' },
baz: { type: 'number', description: '' },
foo: { type: 'string', description: '' },
test: { type: 'number', description: '' }
}
});
});
it('should parse react stateless component with generic intersection + union overlap props - simple', () => {
check('SimpleGenericUnionIntersection', {
SimpleGenericUnionIntersection: {
as: { type: 'unknown', description: '' },
foo: {
description: 'The foo prop should not repeat the description',
required: false,
type: '"red" | "blue"'
},
gap: {
description:
'The space between children\nYou cannot use gap when using a "space" justify property',
required: false,
type: 'number'
},
hasWrap: { type: 'boolean', description: '', required: false }
}
});
});
it('should parse react stateless component with generic intersection + union overlap props', () => {
check('ComplexGenericUnionIntersection', {
ComplexGenericUnionIntersection: {
as: {
type: 'ElementType<any>',
required: false,
description: 'Render the component as another component'
},
align: {
description: 'The flex "align" property',
required: false,
type: '"stretch" | "center" | "flex-start" | "flex-end"'
},
justify: {
description:
"Use flex 'center' | 'flex-start' | 'flex-end' | 'stretch' with\na gap between each child.\nUse flex 'space-between' | 'space-around' | 'space-evenly' and\nflex will space the children.",
required: false,
type:
'"stretch" | "center" | "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly"'
},
gap: {
description:
'The space between children\nYou cannot use gap when using a "space" justify property',
required: false,
type: 'string | number'
}
}
});
});
it('should parse react stateless component with generic intersection + union + omit overlap props', () => {
check('ComplexGenericUnionIntersectionWithOmit', {
ComplexGenericUnionIntersectionWithOmit: {
as: {
type: 'ElementType<any>',
required: false,
description: 'Render the component as another component'
},
align: {
description: 'The flex "align" property',
required: false,
type: '"center" | "flex-start" | "flex-end" | "stretch"'
},
justify: {
description:
"Use flex 'center' | 'flex-start' | 'flex-end' | 'stretch' with\na gap between each child.\nUse flex 'space-between' | 'space-around' | 'space-evenly' and\nflex will space the children.",
required: false,
type:
'"center" | "flex-start" | "flex-end" | "stretch" | "space-between" | "space-around" | "space-evenly"'
},
gap: {
description:
'The space between children\nYou cannot use gap when using a "space" justify property',
required: false,
type: 'string | number'
}
}
});
});
it('should parse react stateful component with intersection props', () => {
check('StatefulIntersectionProps', {
StatefulIntersectionProps: {
moreProp: { type: 'number' },
myProp: { type: 'string' }
}
});
});
it('should parse react stateful component with external intersection props', () => {
check('StatefulIntersectionExternalProps', {
StatefulIntersectionExternalProps: {
myProp: { type: 'string' },
prop1: { type: 'string', required: false }
}
});
});
it('should parse react stateful component (wrapped in HOC) with intersection props', () => {
check('HOCIntersectionProps', {
HOCIntersectionProps: {
injected: { type: 'boolean' },
myProp: { type: 'string' }
}
});
});
describe('stateless component with default props', () => {
const expectation = {
StatelessWithDefaultProps: {
sampleDefaultFromJSDoc: {
defaultValue: 'hello',
description: 'sample with default value',
required: true,
type: '"hello" | "goodbye"'
},
sampleEnum: {
defaultValue: 'enumSample.HELLO',
required: false,
type: 'enumSample'
},
sampleFalse: {
defaultValue: false,
required: false,
type: 'boolean'
},
sampleNull: { type: 'null', required: false, defaultValue: null },
sampleNumber: { type: 'number', required: false, defaultValue: -1 },
sampleObject: {
defaultValue: `{ a: '1', b: 2, c: true, d: false, e: undefined, f: null, g: { a: '1' } }`,
required: false,
type: '{ [key: string]: any; }'
},
sampleString: {
defaultValue: 'hello',
required: false,
type: 'string'
},
sampleTrue: { type: 'boolean', required: false, defaultValue: true },
sampleUndefined: {
defaultValue: undefined,
required: false,
type: 'any'
}
}
};
it('should parse defined props', () => {
check('StatelessWithDefaultProps', expectation);
});
it('should parse props with shorthands', () => {
check('StatelessShorthandDefaultProps', {
StatelessShorthandDefaultProps: {
onCallback: {
defaultValue: null,
description: 'onCallback description',
required: false,
type: '() => void'
},
regularProp: {
defaultValue: 'foo',
description: 'regularProp description',
required: false,
type: 'string'
},
shorthandProp: {
defaultValue: 123,
description: 'shorthandProp description',
required: false,
type: 'number'
}
}
});
});
it('supports destructuring', () => {
check('StatelessWithDestructuredProps', expectation);
});
it('supports destructuring for arrow functions', () => {
check('StatelessWithDestructuredPropsArrow', expectation);
});
it('supports typescript 3.0 style defaulted props', () => {
check('StatelessWithDefaultPropsTypescript3', expectation);
});
});
it('should parse components with unioned types', () => {
check('OnlyDefaultExportUnion', {
OnlyDefaultExportUnion: {
content: { description: 'The content', type: 'string' }
}
});
});
it('should parse components with unioned types when re-exported as named export', () => {
check(
'OnlyDefaultExportUnionAsExport',
{
OnlyDefaultExportUnion: {
content: { description: 'The content', type: 'string' }
}
},
true,
'OnlyDefaultExportUnion description'
);
});
it('should parse jsdocs with the @default tag and no description', () => {
check('StatelessWithDefaultOnlyJsDoc', {
StatelessWithDefaultOnlyJsDoc: {
myProp: { defaultValue: 'hello', description: '', type: 'string' }
}
});
});
it('should parse functional component component defined as function', () => {
check('FunctionDeclaration', {
Jumbotron: {
prop1: { type: 'string', required: true }
}
});
});
it('should parse functional component component defined as const', () => {
check('FunctionalComponentAsConst', {
Jumbotron: {
prop1: { type: 'string', required: true }
}
});
});
it('should parse functional component defined as const with default value assignments in immediately destructured props', () => {
check('FunctionalComponentWithDesctructuredProps', {
FunctionalComponentWithDesctructuredProps: {
prop1: {
type: 'Property1Type',
required: false,
defaultValue: 'hello'
},
prop2: {
type: '"goodbye" | "farewell"',
required: false,
defaultValue: 'goodbye'
},
prop3: {
type: 'number',
required: false,
defaultValue: 10
},
prop4: {
type: 'string',
required: false,
defaultValue: 'this is a string'
},
prop5: {
type: 'boolean',
required: false,
defaultValue: true
}
}
});
});
it('should parse functional component defined as const with default value (imported from a separate file) assignments in immediately destructured props', () => {
check('FunctionalComponentWithDesctructuredPropsAndImportedConstants', {
FunctionalComponentWithDesctructuredPropsAndImportedConstants: {
prop1: {
type: 'Property1Type',
required: false,
defaultValue: 'hello'
},
prop2: {
type: '"goodbye" | "farewell"',
required: false,
defaultValue: 'goodbye'
},
prop3: {
type: 'number',
required: false,
defaultValue: 10
},
prop4: {
type: 'string',
required: false,
defaultValue: 'this is a string'
},
prop5: {
type: 'boolean',
required: false,
defaultValue: true
}
}
});
});
it('should parse functional component component defined as const', () => {
check('FunctionDeclarationVisibleName', {
'Awesome Jumbotron': {
prop1: { type: 'string', required: true }
}
});
});
it('should parse React.SFC component defined as const', () => {
check('ReactSFCAsConst', {
Jumbotron: {
prop1: { type: 'string', required: true }
}
});
});
it('should parse functional component component defined as function as default export', () => {
check('FunctionDeclarationAsDefaultExport', {
Jumbotron: {
prop1: { type: 'string', required: true }
}
});
});
it('should parse functional component component thats been wrapped in React.memo', () => {
check('FunctionDeclarationAsDefaultExportWithMemo', {
Jumbotron: {
prop1: { type: 'string', required: true }
}
});
});
it('should parse functional component component defined as const thats been wrapped in React.memo', () => {
check(
'FunctionDeclarationAsConstAsDefaultExportWithMemo',
{
// in this case the component name is taken from the file name
FunctionDeclarationAsConstAsDefaultExportWithMemo: {
prop1: { type: 'string', required: true }
}
},
true,
'Jumbotron description'
);
});
it('should parse JSDoc correctly', () => {
check(
'JSDocWithParam',
{
JSDocWithParam: {
prop1: { type: 'string', required: true }
}
},
true,
'JSDocWithParamProps description\n\nNOTE: If a parent element of this control is `overflow: hidden` then the\nballoon may not show up.'
);
});
it('should parse functional component component defined as const as default export', () => {
check(
'FunctionalComponentAsConstAsDefaultExport',
{
// in this case the component name is taken from the file name
FunctionalComponentAsConstAsDefaultExport: {
prop1: { type: 'string', required: true }
}
},
true,
'Jumbotron description'
);
});
it('should parse React.SFC component defined as const as default export', () => {
check(
'ReactSFCAsConstAsDefaultExport',
{
// in this case the component name is taken from the file name
ReactSFCAsConstAsDefaultExport: {
prop1: { type: 'string', required: true }
}
},
true,
'Jumbotron description'
);
});
it('should parse functional component component defined as const as named export', () => {
check(
'FunctionalComponentAsConstAsNamedExport',
{
// in this case the component name is taken from the file name
Jumbotron: {
prop1: { type: 'string', required: true }
}
},
true,
'Jumbotron description'
);
});
it('should parse React.SFC component defined as const as named export', () => {
check(
'ReactSFCAsConstAsNamedExport',
{
// in this case the component name is taken from the file name
Jumbotron: {
prop1: { type: 'string', required: true }
}
},
true,
'Jumbotron description'
);
});
describe('displayName', () => {
it('should be taken from stateless component `displayName` property (using named export)', () => {
const [parsed] = parse(fixturePath('StatelessDisplayName'));
assert.equal(parsed.displayName, 'StatelessDisplayName');
});
it('should be taken from stateful component `displayName` property (using named export)', () => {
const [parsed] = parse(fixturePath('StatefulDisplayName'));
assert.equal(parsed.displayName, 'StatefulDisplayName');
});
it('should be taken from stateless component `displayName` property (using default export)', () => {
const [parsed] = parse(fixturePath('StatelessDisplayNameDefaultExport'));
assert.equal(parsed.displayName, 'StatelessDisplayNameDefaultExport');
});
it("should be taken from stateless component `displayName` property (using default export) even if file name doesn't match", () => {
const [parsed] = parse(
fixturePath('StatelessDisplayNameDefaultExportDifferentFilename')
);
assert.equal(parsed.displayName, 'ThisNameIsNotTheSameAsThisFilename');
});
it('should be taken from stateful component `displayName` property (using default export)', () => {
const [parsed] = parse(fixturePath('StatefulDisplayNameDefaultExport'));
assert.equal(parsed.displayName, 'StatefulDisplayNameDefaultExport');
});
it('should be taken from named export when default export is an HOC', () => {
const [parsed] = parse(fixturePath('StatelessDisplayNameHOC'));
assert.equal(parsed.displayName, 'StatelessDisplayName');
});
it('should be taken from named export when default export is an HOC', () => {
const [parsed] = parse(fixturePath('StatefulDisplayNameHOC'));
assert.equal(parsed.displayName, 'StatefulDisplayName');
});
it('should be taken from stateless component folder name if file name is "index"', () => {
const [parsed] = parse(fixturePath('StatelessDisplayNameFolder/index'));
assert.equal(parsed.displayName, 'StatelessDisplayNameFolder');
});
it('should be taken from stateful component folder name if file name is "index"', () => {
const [parsed] = parse(fixturePath('StatefulDisplayNameFolder/index'));
assert.equal(parsed.displayName, 'StatefulDisplayNameFolder');
});
});
describe('Parser options', () => {
describe('Property filtering', () => {
describe('children', () => {
it('should ignore property "children" if not explicitly documented', () => {
check(
'Column',
{
Column: {
prop1: { type: 'string', required: false },
prop2: { type: 'number' },
prop3: { type: '() => void' },
prop4: { type: '"option1" | "option2" | "option3"' }
}
},
true
);
});
it('should not ignore any property that is documented explicitly', () => {
check(
'ColumnWithAnnotatedChildren',
{
Column: {
children: {
description: 'children description',
required: false,
type: 'ReactNode'
},
prop1: { type: 'string', required: false },
prop2: { type: 'number' },
prop3: { type: '() => void' },
prop4: { type: '"option1" | "option2" | "option3"' }
}
},
true
);
});
});
describe('propsFilter method', () => {
it('should apply filter function and filter components accordingly', () => {
const propFilter: PropFilter = (prop, component) =>
prop.name !== 'prop1';
check(
'Column',
{
Column: {
prop2: { type: 'number' },
prop3: { type: '() => void' },
prop4: { type: '"option1" | "option2" | "option3"' }
}
},
true,
undefined,
{ propFilter }
);
});
it('should apply filter function and filter components accordingly', () => {
const propFilter: PropFilter = (prop, component) => {
if (component.name === 'Column') {
return prop.name !== 'prop1';
}
return true;
};
check(
'Column',
{
Column: {
prop2: { type: 'number' },
prop3: { type: '() => void' },
prop4: { type: '"option1" | "option2" | "option3"' }
}
},
true,
undefined,
{ propFilter }
);
check(
'AppMenu',
{
AppMenu: {
menu: { type: 'any' }
}
},
true,
undefined,
{ propFilter }
);
});
it('should allow filtering by parent interface', () => {
const propFilter: PropFilter = (prop, component) => {
if (prop.parent == null) {
return true;
}
return (
prop.parent.fileName.indexOf('@types/react') < 0 &&
prop.parent.name !== 'HTMLAttributes'
);
};
check(
'ColumnWithHtmlAttributes',
{
Column: {
prop1: { type: 'string', required: false },
prop2: { type: 'number' }
}
},
true,
undefined,
{ propFilter }
);
});
});
it('should collect all `onClick prop` parent declarations', done => {
assert.doesNotThrow(() => {
withDefaultConfig({
propFilter: prop => {
if (prop.name === 'onClick') {
assert.deepEqual(prop.declarations, [
{
fileName:
'react-docgen-typescript/node_modules/@types/react/index.d.ts',
name: 'DOMAttributes'
},
{
fileName:
'react-docgen-typescript/src/__tests__/data/ButtonWithOnClickComponent.tsx',
name: 'TypeLiteral'
}
]);
done();
}
return true;
}
}).parse(fixturePath('ButtonWithOnClickComponent'));
});
});
it('should allow filtering by parent declarations', () => {
const propFilter: PropFilter = prop => {
if (prop.declarations !== undefined && prop.declarations.length > 0) {
const hasPropAdditionalDescription = prop.declarations.find(
declaration => {
return !declaration.fileName.includes('@types/react');
}
);
return Boolean(hasPropAdditionalDescription);
}
return true;
};
check(
'ButtonWithOnClickComponent',
{
ButtonWithOnClickComponent: {
onClick: {
type: 'MouseEventHandler<HTMLButtonElement>',
required: false,
description: 'onClick event handler'
}
}
},
true,
'',
{
propFilter
}
);
});
describe('skipPropsWithName', () => {
it('should skip a single property in skipPropsWithName', () => {
const propFilter = { skipPropsWithName: 'prop1' };
check(
'Column',
{
Column: {
prop2: { type: 'number' },
prop3: { type: '() => void' },
prop4: { type: '"option1" | "option2" | "option3"' }
}
},
true,
undefined,
{ propFilter }
);
});
it('should skip multiple properties in skipPropsWithName', () => {
const propFilter = { skipPropsWithName: ['prop1', 'prop2'] };
check(
'Column',
{
Column: {
prop3: { type: '() => void' },
prop4: { type: '"option1" | "option2" | "option3"' }
}
},
true,
undefined,
{ propFilter }
);
});
});
describe('skipPropsWithoutDoc', () => {
it('should skip a properties without documentation', () => {
const propFilter = { skipPropsWithoutDoc: false };
check(
'ColumnWithUndocumentedProps',
{
Column: {
prop1: { type: 'string', required: false },
prop2: { type: 'number' }
}
},
true,
undefined,
{ propFilter }
);
});
});
});
it('should defaultProps in variable', () => {
check('SeparateDefaultProps', {
SeparateDefaultProps: {
disabled: {
description: '',
required: false,
defaultValue: false,
type: 'boolean'
},
id: {
description: '',
required: false,
defaultValue: 123,
type: 'number'
}
}
});
});
it('should defaultProps accessed variable', () => {
check('SeparateDefaultPropsIndividual', {
SeparateDefaultPropsIndividual: {
disabled: {
description: '',
required: false,
defaultValue: false,
type: 'boolean'
},
id: {
description: '',
required: false,
defaultValue: 123,
type: 'number'
}
}
});
});
describe('Extracting literal values from enums', () => {
it('extracts literal values from enum', () => {
check(
'ExtractLiteralValuesFromEnum',
{
ExtractLiteralValuesFromEnum: {
sampleBoolean: { type: 'boolean' },
sampleEnum: {
raw: 'sampleEnum',
type: 'enum',
value: [
{
value: '"one"',
description: '',
fullComment: '',
tags: {}
},
{
value: '"two"',
description: '',
fullComment: '',
tags: {}
},
{
value: '"three"',
description: '',
fullComment: '',
tags: {}
}
]
},
sampleString: { type: 'string' }
}
},
true,
null,
{
shouldExtractLiteralValuesFromEnum: true
}
);
});
it('Should infer types from constraint type (generic with extends)', () => {
check(
'GenericWithExtends',
{
GenericWithExtends: {
sampleUnionProp: {
raw: 'SampleUnion',
type: 'enum',
value: [
{
value: '"value 1"'
},
{
value: '"value 2"'
},
{
value: '"value 3"'
},
{
value: '"value 4"'
},
{
value: '"value n"'
}
]
},
sampleEnumProp: {
raw: 'SampleEnum',
type: 'enum',
value: [
{ value: '0', description: '', fullComment: '', tags: {} },
{ value: '1', description: '', fullComment: '', tags: {} },
{ value: '"c"', description: '', fullComment: '', tags: {} }
]
},
sampleUnionNonGeneric: {
type: 'SampleUnionNonGeneric'
},
sampleObjectProp: {
type: 'SampleObject'
},
sampleNumberProp: {
type: 'number'
},
sampleGenericArray: {
type: 'number[]'
},
sampleGenericObject: {
type: '{ prop1: number; }'
},
sampleInlineObject: {
type: '{ propA: string; }'
}
}
},
true,
null,
{ shouldExtractLiteralValuesFromEnum: true }
);
});
});
describe('Extracting values from unions', () => {
it('extracts all values from union', () => {
check(
'ExtractLiteralValuesFromUnion',
{
ExtractLiteralValuesFromUnion: {
sampleComplexUnion: {
raw: 'number | "string1" | "string2"',
type: 'enum',
value: [
{ value: 'number' },
{ value: '"string1"' },
{ value: '"string2"' }
]
}
}
},
false,
null,
{
shouldExtractValuesFromUnion: true
}
);
});
it('extracts numbers from a union', () => {
check(
'ExtractLiteralValuesFromUnion',
{
ExtractLiteralValuesFromUnion: {
sampleNumberUnion: {
raw: '1 | 2 | 3',
type: 'enum',
value: [{ value: '1' }, { value: '2' }, { value: '3' }]
}
}
},
false,
null,
{
shouldExtractValuesFromUnion: true
}
);
});
it('extracts numbers and strings from a mixed union', () => {
check(
'ExtractLiteralValuesFromUnion',
{
ExtractLiteralValuesFromUnion: {
sampleMixedUnion: {
raw: '"string1" | "string2" | 1 | 2',
type: 'enum',
value: [
{ value: '"string1"' },
{ value: '"string2"' },
{ value: '1' },
{ value: '2' }
]
}
}
},
false,
null,
{
shouldExtractValuesFromUnion: true
}
);
});
});
describe('Sorting unions', () => {
it('does not sort union members by default', () => {
check(
'SimpleUnions',
{
SimpleUnions: {
sampleUnionProp: {
raw: 'SampleUnion',
type: 'enum',
value: [
{ value: '"h1"' },
{ value: '"h6"' },
{ value: '"h2"' },
{ value: '"h4"' },
{ value: '"h5"' },
{ value: '"h3"' }
]
}
}
},
false,
null,
{
shouldExtractLiteralValuesFromEnum: true
}
);
});
it('sorts union members when shouldSortUnions is true', () => {
check(
'SimpleUnions',
{
SimpleUnions: {
sampleUnionProp: {
raw: 'SampleUnion',
type: 'enum',
value: [
{ value: '"h1"' },
{ value: '"h2"' },
{ value: '"h3"' },
{ value: '"h4"' },
{ value: '"h5"' },
{ value: '"h6"' }
]
}
}
},
false,
null,
{
shouldExtractLiteralValuesFromEnum: true,
shouldSortUnions: true
}
);
});
});
describe('Returning not string default props ', () => {
it('returns not string defaultProps', () => {
check(
'StatelessWithDefaultPropsAsString',
{
StatelessWithDefaultPropsAsString: {
sampleFalse: {
defaultValue: 'false',
required: false,
type: 'boolean'
},
sampleNull: {
defaultValue: 'null',
required: false,
type: 'null'
},
sampleNumber: {
defaultValue: '1',
required: false,
type: 'number'
},
sampleNumberWithPrefix: {
defaultValue: '-1',
required: false,
type: 'number'
},
sampleTrue: {
defaultValue: 'true',
required: false,
type: 'boolean'
},
sampleUndefined: {
defaultValue: 'undefined',
required: false,
type: 'undefined'
}
}
},
true,
null,
{
savePropValueAsString: true
}
);
});
});
describe("Extract prop's JSDoc/TSDoc tags", () => {
it('should extract all prop JSDoc/TSDoc tags', () => {
check(
'ExtractPropTags',
{
ExtractPropTags: {
prop1: {
type: 'Pick<Todo, "title" | "completed">',
required: false,
tags: {
ignore: 'ignoreMe',
kind: 'category 2',
custom123: 'something'
}
},
prop2: {
type: 'string',
tags: { internal: 'some internal prop', kind: 'category 1' }
}
}
},
true,
null,
{ shouldIncludePropTagMap: true }
);
});
});
describe('shouldIncludeExpression', () => {
it('should be disabled by default', () => {
const [parsed] = parse(fixturePath('StatelessDisplayName'));
assert.equal(parsed.expression, undefined);
assert.equal(parsed.expression, parsed.rootExpression);
});
it('should cause the parser to return the component expression when set to true', () => {
const [parsed] = parse(fixturePath('StatelessDisplayName'), {
shouldIncludeExpression: true
});
assert.equal(parsed.expression!.name, 'Stateless');
assert.equal(parsed.expression, parsed.rootExpression);
});
it('should cause the parser to return the root expression when set to true', () => {
const [parsed] = parse(
fixturePath('FunctionDeclarationAsDefaultExportWithMemo'),
{
shouldIncludeExpression: true
}
);
assert.equal(parsed.expression!.name, 'Jumbotron');
assert.equal(parsed.rootExpression!.name, 'default');
});
});
});
describe('withCustomConfig', () => {
it('should accept tsconfigs that typescript accepts', () => {
assert.ok(
withCustomConfig(
// need to navigate to root because tests run on compiled tests
// and tsc does not include json files
path.join(__dirname, '../../src/__tests__/data/tsconfig.json'),
{}
)
);
});
});
describe('typescript strict mode', () => {
// typescript strict mode adds an extra `undefined` to enums
// may have other funky behavior
describe('remove undefined from optional', () => {
const options = {
shouldExtractLiteralValuesFromEnum: true,
shouldRemoveUndefinedFromOptional: true,
savePropValueAsString: true
};
const parser = withCustomConfig(
// tsconfig with strict: true
path.join(__dirname, '../../src/__tests__/data/tsconfig.json'),
options
);
it('removes undefined from enums', () => {
const result = parser.parse(
fixturePath('RemoveOptionalValuesFromEnum')
);
const expected = {
RemoveOptionalValuesFromEnum: {
sampleBoolean: { type: 'boolean', required: false },
sampleEnum: {
raw: 'sampleEnum',
required: false,
type: 'enum',
value: [
{
value: '"one"',
description: 'test comment',
fullComment: 'test comment',
tags: {}
},
{ value: '"two"', description: '', fullComment: '', tags: {} },
{ value: '"three"', description: '', fullComment: '', tags: {} }
]
},
sampleString: { type: 'string', required: false }
}
};
checkComponent(result, expected, false);
});
it('removes undefined from unions', () => {
const result = parser.parse(
fixturePath('RemoveOptionalValuesFromUnion')
);
const expected = {
RemoveOptionalValuesFromUnion: {
sampleStringUnion: {
required: false,
raw: '"string1" | "string2"',
type: 'enum',
value: [{ value: '"string1"' }, { value: '"string2"' }]
},
sampleNumberUnion: {
required: false,
raw: '1 | 2 | 3',
type: 'enum',
value: [{ value: '1' }, { value: '2' }, { value: '3' }]
},
sampleMixedUnion: {
required: false,
raw: '"string1" | "string2" | 1 | 2',
type: 'enum',
value: [
{ value: '"string1"' },
{ value: '"string2"' },
{ value: '1' },
{ value: '2' }
]
}
}
};
check('RemoveOptionalValuesFromUnion', expected, false, null, options);
});
});
});
describe('parseWithProgramProvider', () => {
it('should accept existing ts.Program instance', () => {
let programProviderInvoked = false;
// mimic a third party library providing a ts.Program instance.
const programProvider = () => {
// need to navigate to root because tests run on compiled tests
// and tsc does not include json files
const tsconfigPath = path.join(
__dirname,
'../../src/__tests__/data/tsconfig.json'
);
const basePath = path.dirname(tsconfigPath);
const { config, error } = ts.readConfigFile(tsconfigPath, filename =>
fs.readFileSync(filename, 'utf8')
);
assert.isUndefined(error);
const { options, errors } = ts.parseJsonConfigFileContent(
config,
ts.sys,
basePath,
{},
tsconfigPath
);
assert.lengthOf(errors, 0);
programProviderInvoked = true;
return ts.createProgram([fixturePath('Column')], options);
};
const result = withDefaultConfig().parseWithProgramProvider(
[fixturePath('Column')],
programProvider
);
checkComponent(
result,
{
Column: {}
},
false
);
assert.isTrue(programProviderInvoked);
});
});
describe('componentNameResolver', () => {
it('should override default behavior', () => {
const [parsed] = parse(
fixturePath('StatelessDisplayNameStyledComponent'),
{
componentNameResolver: (exp, source) =>
exp.getName() === 'StyledComponentClass' &&
getDefaultExportForFile(source)
}
);
assert.equal(parsed.displayName, 'StatelessDisplayNameStyledComponent');
});
it('should fallback to default behavior without a match', () => {
const [parsed] = parse(
fixturePath('StatelessDisplayNameStyledComponent'),
{
componentNameResolver: () => false
}
);
assert.equal(parsed.displayName, 'StatelessDisplayNameStyledComponent');
});
});
describe('methods', () => {
it('should properly parse methods', () => {
const [parsed] = parse(fixturePath('ColumnWithMethods'));
const methods = parsed.methods;
const myCoolMethod = methods[0];
assert.equal(myCoolMethod.description, 'My super cool method');
assert.equal(
myCoolMethod.docblock,
'My super cool method\n@param myParam Documentation for parameter 1\n@public\n@returns The answer to the universe' // tslint:disable-line max-line-length
);
assert.deepEqual(myCoolMethod.modifiers, []);
assert.equal(myCoolMethod.name, 'myCoolMethod');
assert.deepEqual(myCoolMethod.params, [
{
description: 'Documentation for parameter 1',
name: 'myParam',
type: { name: 'number' }
},
{
description: null,
name: 'mySecondParam?',
type: { name: 'string' }
}
]);
assert.deepEqual(myCoolMethod.returns, {
description: 'The answer to the universe',
type: 'number'
});
});
it('should properly parse static methods', () => {
const [parsed] = parse(fixturePath('ColumnWithStaticMethods'));
const methods = parsed.methods;
assert.equal(methods[0].name, 'myStaticMethod');
assert.deepEqual(methods[0].modifiers, ['static']);
});
it('should handle method with no information', () => {
const [parsed] = parse(fixturePath('ColumnWithMethods'));
const methods = parsed.methods;
assert.equal(methods[1].name, 'myBasicMethod');
});
it('should handle arrow function', () => {
const [parsed] = parse(fixturePath('ColumnWithMethods'));
const methods = parsed.methods;
assert.equal(methods[2].name, 'myArrowFunction');
});
it('should not parse functions not marked with @public', () => {
const [parsed] = parse(fixturePath('ColumnWithMethods'));
const methods = parsed.methods;
assert.equal(
Boolean(methods.find(method => method.name === 'myPrivateFunction')),
false
);
});
});
describe('getDefaultExportForFile', () => {
it('should filter out forbidden symbols', () => {
const result = getDefaultExportForFile({
fileName: 'a-b'
} as ts.SourceFile);
assert.equal(result, 'ab');
});
it('should remove leading non-letters', () => {
const result = getDefaultExportForFile({
fileName: '---123aba'
} as ts.SourceFile);
assert.equal(result, 'aba');
});
it('should preserve numbers in the middle', () => {
const result = getDefaultExportForFile({
fileName: '1Body2Text3'
} as ts.SourceFile);
assert.equal(result, 'Body2Text3');
});
it('should not return empty string', () => {
const result = getDefaultExportForFile({
fileName: '---123'
} as ts.SourceFile);
assert.equal(result.length > 0, true);
});
});
describe('issues tests', () => {
it('188', () => {
check(
'Issue188',
{
Header: {
content: { type: 'string', required: true, description: '' }
}
},
true,
''
);
});
it('should return prop types for custom component type', () => {
check(
'Issue320',
{
Issue320: {
color: {
type: 'string',
required: false,
description: ''
},
text: { type: 'string', required: true, description: '' }
}
},
true,
null,
{
customComponentTypes: ['OverridableComponent'],
savePropValueAsString: true
}
);
});
it('should parse imported default props for class component', () => {
check(
'ComponentWithImportedDefaultProps',
{
ComponentWithImportedDefaultProps: {
name: {
type: 'string',
defaultValue: 'Node',
required: false,
description: ''
}
}
},
false,
''
);
});
it('should handle when parameters are assigned to default exports (subcomponents)', () => {
check(
'SubComponent',
{
Root: {
name: {
type: 'string',
defaultValue: undefined,
required: true,
description: ''
}
},
Sub: {
name: {
type: 'string',
defaultValue: undefined,
required: true,
description: ''
}
}
},
false,
''
);
});
});
});
```
|
Dagsboro Hundred is a hundred in Sussex County, Delaware, United States. Dagsboro Hundred was formed in 1773 from Worcester County, Maryland. Its primary community is Millsboro.
References
Hundreds in Sussex County, Delaware
|
This list is of the Cultural Properties of Japan designated in the category of for the Circuit of Hokkaidō.
National Cultural Properties
As of 1 July 2019, thirty Important Cultural Properties with sixty-nine component structures have been designated, being of national significance.
Prefectural Cultural Properties
As of 1 May 2019, twenty-five properties with the same number of component structures have been designated at a prefectural level.
Municipal Cultural Properties
As of 1 May 2019, one hundred and eleven properties with one hundred and eighteen component structures have been designated at a municipal level.
Registered Cultural Properties
As of 1 September 2016, one hundred and forty-three properties have been registered (as opposed to designated) at a national level.
See also
Cultural Properties of Japan
National Treasures of Japan
List of Historic Sites of Japan (Hokkaidō)
List of Cultural Properties of Japan - paintings (Hokkaidō)
Hokkaido Museum
Historical Village of Hokkaido
References
External links
Cultural Properties in Hokkaido
Cultural Properties,Hokkaidō
Buildings and structures in Hokkaido
Hokkaidō
Structures,Hokkaidō
Culture of the Tōhoku region
|
```smalltalk
"
This is a primary baseline to load Pharo base libraries, the IDE as well as projects that are managed in own repository (so called ""external projects"") and other
"
Class {
#name : 'BaselineOfPharo',
#superclass : 'BaselineOf',
#classVars : [
'ExternalProjects'
],
#category : 'BaselineOfPharo-Baseline',
#package : 'BaselineOfPharo',
#tag : 'Baseline'
}
{ #category : 'private' }
BaselineOfPharo class >> declareExternalProjects [
^ (Pragma allNamed: #externalProject in: self class)
collect: [ :each | each method valueWithReceiver: self ]
as: Array
]
{ #category : 'accessing - external projects' }
BaselineOfPharo class >> documentBrowser [
<externalProject>
^ PharoExternalProject
newName: 'DocumentBrowser'
owner: 'pharo-spec'
project: 'NewTools-DocumentBrowser'
version: 'Pharo13'
]
{ #category : 'repository urls' }
BaselineOfPharo class >> documentBrowserRepository [
^ (self externalProjectNamed: 'DocumentBrowser') repository
]
{ #category : 'accessing - external projects' }
BaselineOfPharo class >> externalProjectNamed: aName [
^ self externalProjects
detect: [ :each | each name = aName ]
]
{ #category : 'accessing' }
BaselineOfPharo class >> externalProjects [
<script: 'self externalProjects inspect'>
^ ExternalProjects ifNil: [
ExternalProjects := self declareExternalProjects ]
]
{ #category : 'accessing - external projects' }
BaselineOfPharo class >> iceberg [
<externalProject>
^ PharoExternalProject
newName: 'Iceberg'
owner: 'pharo-vcs'
project: 'iceberg'
version: 'Pharo13'
sourceDir: nil
]
{ #category : 'repository urls' }
BaselineOfPharo class >> icebergRepository [
^ (self externalProjectNamed: 'Iceberg') repository
]
{ #category : 'accessing - external projects' }
BaselineOfPharo class >> microdown [
<externalProject>
^ PharoExternalProject
newName: 'Microdown'
owner: 'pillar-markup'
project: 'Microdown'
version: 'Pharo13'
]
{ #category : 'repository urls' }
BaselineOfPharo class >> microdownRepository [
^ (self externalProjectNamed: 'Microdown') repository
]
{ #category : 'accessing - external projects' }
BaselineOfPharo class >> newTools [
<externalProject>
^ PharoExternalProject
newName: 'NewTools'
owner: 'pharo-spec'
project: 'NewTools'
version: 'Pharo13'
]
{ #category : 'repository urls' }
BaselineOfPharo class >> newToolsRepository [
^ (self externalProjectNamed: 'NewTools') repository
]
{ #category : 'class initialization' }
BaselineOfPharo class >> reset [
<script>
ExternalProjects := nil
]
{ #category : 'accessing - external projects' }
BaselineOfPharo class >> roassal [
<externalProject>
^ PharoExternalProject
newName: 'Roassal'
owner: 'pharo-graphics'
project: 'Roassal'
version: 'v1.06f'
]
{ #category : 'repository urls' }
BaselineOfPharo class >> roassalRepository [
^ (self externalProjectNamed: 'Roassal') repository
]
{ #category : 'accessing - external projects' }
BaselineOfPharo class >> scriptableDebugger [
<externalProject>
^ PharoExternalProject
newName: 'ScriptableDebugger'
owner: 'pharo-spec'
project: 'ScriptableDebugger'
version: 'Pharo13'
]
{ #category : 'repository urls' }
BaselineOfPharo class >> scriptableDebuggerRepository [
^ (self externalProjectNamed: 'ScriptableDebugger') repository
]
{ #category : 'accessing - external projects' }
BaselineOfPharo class >> spec [
<externalProject>
^ PharoExternalProject
newName: 'Spec2'
owner: 'pharo-spec'
project:'Spec'
version: 'Pharo13'
]
{ #category : 'repository urls' }
BaselineOfPharo class >> specRepository [
^ (self externalProjectNamed: 'Spec2') repository
]
{ #category : 'accessing - external projects' }
BaselineOfPharo class >> toplo [
<externalProject>
^ PharoExternalProject
newName: 'Toplo'
owner: 'pharo-graphics'
project: 'Toplo'
version: 'Pharo12'
]
{ #category : 'repository urls' }
BaselineOfPharo class >> toploRepository [
^ (self externalProjectNamed: 'Toplo') repository
]
{ #category : 'accessing - external projects' }
BaselineOfPharo class >> welcomeBrowser [
<externalProject>
^ PharoExternalProject
newName: 'WelcomeBrowser'
owner: 'pharo-spec'
project: 'NewTools-WelcomeBrowser'
version: 'Pharo13'
]
{ #category : 'repository urls' }
BaselineOfPharo class >> welcomeBrowserRepository [
^ (self externalProjectNamed: 'WelcomeBrowser') repository
]
{ #category : 'baselines' }
BaselineOfPharo >> baseline: spec [
<baseline>
| repository |
repository := self packageRepositoryURLForSpec: spec.
spec for: #common do: [
spec postLoadDoIt: #postload:package:.
spec baseline: 'BaseLibraries' with: [ spec repository: repository ].
spec baseline: 'IDE' with: [ spec repository: repository ].
spec baseline: 'Calypso' with: [
spec
repository: repository;
loads: #( 'IcebergSupport' ) ].
spec package: 'Deprecated13' ]
]
{ #category : 'actions' }
BaselineOfPharo >> postload: loader package: packageSpec [
"If we added a github token for the build, we remove it."
Smalltalk os environment at: #GITHUB_TOKEN ifPresent: [ :token |
| credential |
credential := (Smalltalk classNamed: #IceCredentialStore) current plaintextCredentialForHostname: 'github.com'.
credential password = token ifTrue: [ (Smalltalk classNamed: #IceCredentialStore) current removePlainTextCredential: credential ].
'Removing credential.' traceCr ].
"Open the WelcomeBrowser as last step"
(self class environment classNamed: #StWelcomeBrowser)
ifNotNil: [ :aClass | aClass openForRelease ]
]
```
|
Satish Vasant Alekar (born 30 January 1949) is a Marathi playwright, actor, and theatre director. A founder member of the Theatre Academy of Pune, and most known for his plays Mahanirvan (1974), Mahapoor (1975), Atirekee (1990), Pidhijat (2003), Mickey ani Memsahib (1973), and Begum Barve (1979), all of which he also directed for the Academy. Along with Mahesh Elkunchwar and Vijay Tendulkar he is considered among the most influential and progressive playwrights in modern Marathi and Indian theatre.
He has also remained the head of Centre for Performing Arts, University of Pune (1996–2009), which he founded, after forgoing the Directorship of NSD and previously remained an adjunct professor at various universities in US, at the Duke University, Durhum, NC (1994), Performance Studies, Tisch School of the Arts, New York University as a Fulbright Scholar (2003). and Dept. Theatre and Film Studies, University of Georgia, Athens, GA (2005)
He was awarded the Sangeet Natak Akademi Award in Playwriting (Marathi) in 1994, by Sangeet Natak Akademi, India's National Academy of Music, Dance and Drama. He received the Padma Shri award in January 2012.
After his retirement Satish Alekar was nominated by Savitribai Phule Pune University as Distinguished Professor on the campus from 2013 till September 2022. He is still on the visiting faculty of the SPPune University and the National School of Drama in Delhi.
Recently he is also known for his screen acting in Marathi and Hindi feature films. He is seen in the character roles of films like Ventilator (2016).
Early life and education
Alekar was born in Delhi, India. He but grew up in Pune, Maharashtra in a Marathi Brahmin family. He attended the Marathi medium school New English School, Ramanbag which was established by Lokmanya Bal Gangadhar Tilak. After high school, he attended Fergusson College for his undergraduate Bsc degree in sciences. He received his master's degree in biochemistry from University of Pune in 1972.
Career
Theatre
Alekar gained his first stage experience as an actor in a college play. Impressed by his performance, director Bhalba Kelkar, who had set up the Progressive Dramatic Association, invited him to join it. Alekar wrote and directed his first one-act play Jhulta Pool in 1969. He became a part of a young circle that Jabbar Patel had started within the Progressive Dramatic Association.
This group split with the parent body in 1973 and set up Theater Academy in Pune. The split was over Vijay Tendulkar's play Ghashiram Kotwal. The senior members decided against its premiere in 1972, and Patel's group decided to produce it under the auspices of its own Theater Academy. Alekar assisted Patel in the direction of Ghashiram Kotwal, and the group has since mounted over 35 plays by him and manage to establish its foothold in experimental Marathi theatre.
Alekar conceived of and implemented Playwrights Development Scheme and Regional Theater Group Development. The Ford Foundation for Theater Academy, Pune supported these programs during 1985–1994.
Alekar has collaborated in several international play translation projects. The Tisch School of Arts at New York University invited him in 2003 to teach a course on Indian Theatre. The Department of Theater and Films Studies, University of Georgia invited him in 2005 to direct an English production of his play Begum Barve.
The Holy Cow Performing Arts Group in Edinburgh, Scotland performed an English version of Alekar's Micky And Memsahib on 27 and 28 August 2009 at Riddle's Court in Edinburgh Fringe Festival '09.
Other employment
After obtaining his master's degree, Alekar worked as a research officer in biochemistry at the government-run B. J. Medical College, Pune.
During July 1996 – January 2009, Ahe worked as a professor and the head of the Center for Performing Arts(Lalit Kala Kendra) at University of Pune. He was working as the honorary director for a program supported by Ratan Tata Trust at the University of Pune during 2009–2011. During the period of September 2013 – September 2022 he was nominated by University of Pune as distinguished professor on the campus.
Plays
List of original Marathi मराठी plays written since 1973
Micki Aani Memsaheb मिकी आणि मेमसाहेब (1973)*
Mahanirvan महानिर्वाण (1974)*
Mahapoor महापूर (1975)
Begum Barve बेगम बर्वे (1979)*
Shanwar Raviwar शनवार रविवार (1982)*
Dusra Samana दुसरा सामना (1987)
Atireki अतिरेकी (1990)*
Pidhijat पिढीजात (2003)*
Ek Divas Mathakade एक दिवस मठाकडे (2012)
Thakishi Sanvad' ठकीशी संवाद (2020) New Play written during COVID-19 lockdown (March–July 2020) to be produced in 2022-23
* Plays directed by Satish Alekar for Theatre Academy, Pune.
Mahapoor (1975) Directed by Mohan Gokhale for Theatre Academy, Pune
Dusra Samna (1987) Directed by Waman Kendre for Kala Vaibhav, Mumbai
Ek Divas Mathakade (2012) Directed by Nipun Dharmadhikari for Natak Company, Pune
List of original Marathi मराठी one-act plays
Memory मेमरी (1969)
Bhajan भजन (1969)
Ek Zulta Pool एक झुलता पूल (1971)*
Dar Koni Ughadat Naahi दर कोणी उघडत नाही (1979)
Bus Stop बस स्टॅाप (1980)
List of adapted/translated one-act plays and Plays
Judge जज्ज (1968)
Yamuche Rahasya यमुचे रहस्य (1976)
Bhint भिंत (1980)*
Valan वळण (1980)*
Pralay प्रलय (1985)* Marathi version of Gunther Grass's German Play The Flood
Alshi Uttarvalyachi Gosht आळशी अत्तरवाल्याची गोष्ट (1999)**
Nashibvan Baiche Don नशीबवान बाईचे दोन (1999)**
Supari सुपारी (2002)
Karmaachari कर्मचारी (2009)
** Directed by Satish Alekar for Lalit Kala Kendra ललित कला केंद्र (Centre For Performing Arts, University of Pune)
* Directed for Theatre Academy, Pune
Alekar started writing at the age of 19 as a chemistry graduation, though most of his early work were short plays. Many of his plays are set around Pune Brahmin society, highlighting their narrow mindedness and subsequently he ventured into small-town politics with Doosra Samna (1989). Mahanirvan (1973) (The Dread Departure) finds black humour through Hindu death rites in Brahmins and its overt seriousness is today Alekar's best-known early work and has since been performed in Bengali, Hindi, Dongri, Konkani and Gujarati. It was originally a one-act play and he had later expanded it at Patel's insistence. It was first staged on 22 November 1974 at the Bharat Natya Mandir, by the Theatre Academy, Pune and was revived in 1999 for its 25th anniversary, and was performed at the same venue, with most of the original cast intact.
Mickey Ani Memsaheb (1974) was his first full-length script. With the exception of his Mahapoor (1975), he directed all of his own plays. Alekar's Begum Barve (1979) is regarded as a classic of contemporary Marathi theatre. It deals with the eponymous female impersonator's memories and fantasies. After his musical company closed down, a minor singer-actor starts selling incense sticks on the street and gets exploited by his employer. One day his fantasies get enmeshed with those of a pair of clerks who were his regular customers, and those fantasies get almost fulfilled. The play staged in Rajasthani, Punjabi, Gujarati, Bengali, Konkani, Tamil and Kannada. In 2009, 30 years after its first production, the play returned to Mumbai with its original cast of Chandrakant Kale, and Mohan Aghashe.
Alekar's other plays are Bhajan, Bhinta, Walan, Shanivar-Ravivar (1982), Dusra Samna (1987), and Atireki (1990). The first three are one-act plays. Atireki is marked by irony, wit, and tangential take-offs from absurd premises. In January 2011 a book of short plays translated/adapted into Marathi by Satish Alekar published by M/s Neelkanth Prakashan, Pune under the title "Adharit Ekankika".
In 2022 all the plays of Satish Alekar including short plays in Marathi were published as a new edition by the Popular Prakashan, Mumbai and these nine books are now available online for sale.
https://www.amazon.in/Satish-Yanchya-Natkancha-%E0%A4%AF%E0%A4%BE%E0%A4%82%E0%A4%9A%E0%A5%8D%E0%A4%AF%E0%A4%BE-%E0%A4%A8%E0%A4%BE%E0%A4%9F%E0%A4%95%E0%A4%BE%E0%A4%82%E0%A4%9A%E0%A4%BE/dp/8195832407/ref=sr_1_4?crid=1A4Y8QRNBRYKJ&keywords=satish+alekar+books&qid=1679052866&sprefix=Satish+Alekar%2Caps%2C205&sr=8-4
Two Crtique published on plays Mahanirvan (Dread Departure) and Begum Barve in Marathi:
1) "Mahanirvan: Sameeksha aani Sansmarne" (महानिर्वाण समिक्षा आणि संस्मरणे) (A volume of critique in Marathi on the play ' Mahanirvan'-Dread Departure Edited by Dr. Rekha Inmadar-Sane published by M/s Rajhans Prakashan, Pune, I Edition Dec 1999, II Edition March 2008, , Pages: 254, Price Rs.250/-) The volume first published in 1999 to mark the 25th year run of the production of the play produced by Theatre Academy, Pune directed by Satish Alekar. Volume included 90 pages of the extensive interview of the playwright Satish Alekar.
2) "Begum Barve Vishayee" (बेगम बर्वे विषयी) (About the play Begum Barve) Edited by Dr. Rekha Inamdar-Sane published in June 2010 by M/s Rajhans Prakashan, Pune,
Pages 169, Price: Rs. 200/- The books has nine articles analysing the text and the performance written by well-known theatre scholars.
Acting reading performance
Aparichit Pu La (अपरिचित पु.लं.), (2018) a 90 mints acting reading programme on the lesser-known writings of the legendary writer, performer P. L. Deshpande पु.ल.देशपांडे (1919–2000) produced by Shabda Vedh, Pune (शब्द वेध,पुणे) to mark the birth centenary of the writer, conceived by Chandrakant Kale, cast: Satish Alekar, Chandrakant Kale and Girish Kulkarni. First show was performed in Pulotsav on 22 November 2018 at Balgamdharva Ranga Mandir, Pune. Since opening of the show in November 2018, performances were staged in Pune, Solapur, Ratnagiri and Mumbai.
Film scripts
Alekar scripted the National Film Award winning Marathi feature film Jait Re Jait in 1977, directed by Jabbar Patel, and later he directed a 13-part Hindi TV serial Dekho Magar Pyarse for Doordarshan in 1985. He scripted the dialogues for the Marathi feature film Katha Don Ganpatravanchi in 1995–96.
Writing for Marathi newspaper
Written a fortnightly column in Marathi for Sunday edition of Loksatta 'Gaganika' January–December 2015. Column is based on Satish Alekar's journey in to Performing Arts since 1965. The column became popular and now the book "Gaganika" (pages 260+12+ 8 P photos, Hb Rs. 375/- Pb Rs. 300/-based on the column is published on 30 April 2017 by M/s Rajahans Prakashan, Pune 411030.
Awards and recognition
Some of Alekar's plays have been translated and produced in Hindi, Bengali, Tamil, Dogri, Gujarati, Rajasthani, Punjabi, and Konkani. His plays have been included in the National Anthologies published in 2000–01 by the National School of Drama and Sahitya Akademi, Delhi.
Alekar is the recipient of several national and state awards for his contribution to the field of Theater and Literature.
In 1974 his collection of short plays "Zulta Pool (झुलता पूल" received best collection of short plays award from Ministry of Culture, Govt. of Maharashtra.
In 1975 he received Late Ram Ganesh Gadkari award from the State of Maharashtra for his play Mahanirvan (महानिर्वाण).
He received Nandikar Sanman at Calcutta in 1992.
He received fellowships from the Asian Cultural Council, New York in 1983 to study theatre in the US, and from the Ford Foundation to study Theatre of South Asia in 1988.
He received in 1994 a Sangeet Natak Akademi Award for playwriting from Sangeet Natak Akademi, Delhi (संगीत नाटक अकादमी, दिल्ली).
Received State Award Best Actor in Comedy Role played in Marathi film Katha Don Ganpatravanchi (कथा दोन गणपतरावांची ), Directed by Arun Khopkar (1997)
Received Vi Va Shirwadkar award (Poet Kusumagraj) for playwriting by Natya Parishad, Nasik in 2007
Received Life Time Achievement felicitation (जीवन गौरव) by Akhil Bharatiya Marathi Natya Parishad, Mumbai in Feb 2012
He received the award "Padamshree" (पद्मश्री) conferred by the President of India in January 2012.
In December 2013 Satish Alekar received Balaraj Sahani Memorial Award (बलराज सहानी स्मृती पुरस्कार) in Pune for his contribution over last 40 years as a playwright, director and actor.
In 2014 he was awarded Poet and Playwright "Aarati Prabhu Award (कवि आरती प्रभू )" by Baba Vardam Theatres, Kudal, Dist. Sindhudurg.
2017 Tanveer Sanman (तन्वीर सन्मान) Prestigious national award for the lifetime contribution to the field of Theatre constituted by veteran actor Dr. Shriram Lagoo through Rupavedh Pratisthan, Pune. Award function was held in Pune on 9 December 2017.
2018 Book GAGANIKA (गगनिका) received Advt Tryambakrao Shirole award for best non fiction (उत्कृष्ट ललित गद्य) by Maharashtra Sahitya Parishad, Pune 2022 "Natavarya Prabhakar Panshikar Jeevan Gaurav Puraskar" for the year 2021-22 by the State Government of Maharashtra highest Cultural Life Achievement Award.
2022 “ Vishnudas Bhave Medal prestigious award by Natyavidyamandir Samitee, SangliNatakkar Satish Alekar(Playwright Satish Alekar), a 90-minute film by Atul Pethe about Alekar's life and work was released in 2008.
Works
The dread departure (Mahanirvan), tr. by Gauri Deshpande. Seagull Books, 1989. .
"Collected Plays of Satish Alekar. OUP, Delhi 2010, "
"Collected Plays of Satish Alekar"
https://www.amazon.in/Collected-Plays-Satish-Alekar-Departure/dp/019806988X/ref=sr_1_1?crid=4INA191XY0PG&keywords=satish+alekar+books&qid=1676993517&sprefix=satish+alekar%2Caps%2C3298&sr=8-1
Satish Alekar all plays in Martathi. A set of nine books in Marathi published by Popular Prakashan Mumbai in 2022. Here is the link
https://www.amazon.in/Satish-Yanchya-Natkancha-%E0%A4%AF%E0%A4%BE%E0%A4%82%E0%A4%9A%E0%A5%8D%E0%A4%AF%E0%A4%BE-%E0%A4%A8%E0%A4%BE%E0%A4%9F%E0%A4%95%E0%A4%BE%E0%A4%82%E0%A4%9A%E0%A4%BE/dp/8195832407/ref=sr_1_2?crid=4INA191XY0PG&keywords=satish+alekar+books&qid=1676993517&sprefix=satish+alekar%2Caps%2C3298&sr=8-2
Personal life
Satish Alekar belongs to City of Pune. His parents Late Usha and Vasant Alekar were freedom fighters, both involved in India's 1942 movement. Satish Alekar married Anita (Abhyankar) in 1976. They have a son MIKIN. Anita died in 2007. He has one younger brother Sudhir and one sister Bharati. Presently he is living in Pune with his son Mikin.
Academic Honour
Following Scholars have completed their Ph.D. research on the creative contribution of Satish Alekar as a playwright.
Sarjerao Rankhamb, Deglur, awarded Ph.D. by SPPU for the research “नाटककार सतीश आळेकर: एक आकलन”, under the guidance of Dr. Manohar Jadhav, Marathi Department, SPPU in July 2019.
Smita Rambhau Shinde, Sinnar was awarded her Ph.D. on February 25, 2020, by SPPU for her research on the topic: Reality and Fantasy in the selected plays of Satish Alekar under the guidance of Dr. Rohit Kavle, Sangamner College, Sagamner.
Sapanprit: Semiotic Universe of Selected Plays of Satish Alekar and Swarajbir, Central University of Punjab, Bhatinda under the guidance of Dr. Ramanpreet Kaur.
Neeraj Balasaheb Borse, Dr. Babasaheb Ambedkar Marathwada University, Aurangabad submitted his Ph.D. thesis on the subject “सतीश आळेकर यांच्या नाटकांचा संहितालक्षी आणि प्रयोलक्षी अभ्यास “under the guidance of Dr. Chandrasekhar Kanse, Sirsala, Beed
Acting in plays
1971: As young Man in a short play "Ek Zulta Pool" directed by himself for Intercollegiate Short Play Competition
1974: As the son "Nana" in play "Mahanirvan" directed by himself for Theatre Academy, Pune in more than 100 shows
1979: As Javadekar in play "Begum Barve" directed by himselh for Theatre Academy, Pune
1982: Short play "Boat Futli" Directed by Samar Nakhate for Theatre Academy, Pune.
1980: As husband in "Shanwar Raviwar" directed by himself for Theatre Academy, Pune
Acting in Hindi films (character roles)
Ye Kahani Nahi (1984) Dir. Biplav Rai ChowdharyDevi Ahilya (2002) Dir. Nachiket Patwardhan
Dumkata (2007) Dir. Amol Palekar
Aiyaa (2012) Dir. Sachin Kundalkar
Dekh Tamasha Desk (2014) Dir. Feroz Abbas Khan
Thackeray- A biopic on Shiv Sena Founder Balasaheb Thackeray (2018) as Jayprakash Narayan Dir by Abhijit Panse (released on 23 Jan 2019)
83 (2019) a film on Indian Cricket Team's win in 1983 World Cup as Sheshrao Wankhede, Dir Kabir Khan, Produced by Vishnuvardhan Induri and Madhu Mantena Varma (released on December 24, 2021, all over)
The Suspect (2022) as Dayanand Bharadvaj, Police Commissioner, Dir Samir Karnik, Maverick Pictures, Mumbai (in Making)
Acting in Marathi films /Web Series (character roles)Aakrit (1981) Dir. Amol Palekar
Umbartha (1982) Dir. Jabbar Patel Dhyas Parva (2001)Dir Amol Palekar
Dr. Babasaheb Ambedkar (1991) Dir. Jabbar Patel
Ek Hota Vidushak (1992) Dir. Jabbar Patel
Katha Don Ganpatravaanchee (1996) Dir. Arun Khopkar (role of Judge which was awarded for the Best Actor (Comedy), Govt. of Maharashtra)
Kadachit (2007) as a Neurosurgeon Dir. Chandrakant Kulkarni
Chintoo (2012), as Colonel Kaka, Dir.Shrirang Godbole
Chintoo 2 (Khajinyachi Chittarkatha) as Colonel Kaka 2013 Dir.Shrirang Godbole
Hovoon Jaudyaa- We Are On! (2013) Dir. Amol Palekar
Mhais (2013) Dir. Shekhar Naik
Aajachaa Diwas Maazaa (2013) Dir. Chandrakant Kulkarni
Yeshwantrao Chavan – Katha Eka Vadalachi (2014) Dir. Jabbar Patel
Deul Band (2015) Dir. Praveen Tarade
Welcome Zindagi (2015) Dir. Umesh Ghadge
High Way-Ek Selfie Aar Paar (2015) Dir: Umesh Kulkarni
Rajwade and Sons as Rajwade (2015) Dir. Sachin Kundalkar
audyana Balasaheb! (2015) Dir. Girish Kulkarni (Released in October 2016 through Zee Cinema)
Ventilator (2016) Movie as Bhau, Dir. Rajesh Mapuskar, Produced by Priyanka Chopra, World Premier on 23 Oct 2016 during MAMI Festival in Mumbai (National Awardee Film)
Chi. Va. Chi. Sou. Ka (2017) as Bhudargadkar, Dir. Paresh Mokashi, Produced by Zee Cinema (released on 19 May 2017) Mala Kahich Problem Naahi as Father (2017) Dir. Sameer Vidhwans, Produced by Filmy Keeda Entertainment, Mumbai (released on 11 August 2017)Mee Shivaji Park (2017) as Satish Joshi, Dir. Mahesh Waman Manjrekar, Produced by Gouri Films, Pune (Released on 18 October 2018)
Thackeray (2018) Biopic film on Balasaheb Thackeray (Hindi/Marathi) as Jayprakash Narayan, Dir Abhijit Panse, Produced by Raut'Ters Entertainment (released on 23 Jan 2019)
Bhai: Vyakti ki Valli Part I (2018) a Biopic (made in two parts) on Pu La Deshpande as Ramakant Deshpande Dir Mahesh Manjrekar Produced by The Great Maratha Entertainment (released on 4 Jan 2019)
Bhai: Vyakti ki Valli Part II (2018) a Biopic on Pu La Deshpande as Ramakant Deshpande Dir Mahesh Manjrekar Produced by The Great Maratha Entertainment (Released on 8 Feb 2019)
Smile Please (2019) as Appa Joshi (father), Directed by Vikrum Phadnis Produced by Nisha Shah and Sanika Gandhi.( released on 19 July 2019) streaming on Prime Video
" Panchak " 2019) as Bal Kaka. Directed by Jayant Jathar, Produced by RnM Films (by Shriram Nene and Madhuri Dixit) ( selected in the competition for Marathi feature in 21st Pune International Film Festival. To be released around April 2023).
Pet-Puran (2021) as Lt. Col. Jarasandh Wagh(Retd) Web Series for Sony Liv Directed by Dyanesh Zoting (Season I, released on SonyLIV - May 6, 2022)season II is scheduled in 2023
Ek Don Teen Char - एक दोन तीन चार (2022) as Dr. Vivek Joshi Marathi film by Varun Narvekar, Produced by Jio Studios (to be released in 2023)
Kalsutra- कालसूत्र' (2022)Web Series as Shriram Bidari, Kanha Production, Directed by Bhimrao Mude(in making)Produbced by Manjiri Subodh Bhave for Jio Studio.
Acting in TV commercials and Short Films
Products:
TV Cable Co.: Tata Sky (2010)
Car: Honda Ameze (2013)for Appostophe, Mumbai
Cell Phone Company:Idea -Telephone Exchange (2013) for Chrome Pictures, Mumbai
New York Life Insurance (2012)
Online Purchase : SNAPDEAL (2016) for Chrome Pictures,Mumbai
Fiama Di Willis Body Wash (2018) for Apostrophe Films, Mumbai Dir Kaushik Sarkar Link: https://www.youtube.com/watch?v=-WZyvU0n68k
Reunion Episode 3 Language: Marathi (2018) Pickle Brand Presented by Ravetkar Group, Pune Dir Varun Narvekar (short Film) Link: https://www.youtube.com/watch?v=d5uzHiMeMAc
maateech swapna मातीचं स्वप्न (2018) a short film in Marathi for Chitale Bandhu Mithaiwale (चितळे बंधू), Produced by Multimedia Tools,Pune Directed by Varun Narvekar
Reunion for Ravetkar Group (2018) : A three minutes short film made about the awareness for early treatment in Brain Stroke made by Ruby Hall Clinic, Pune Link: https://www.youtube.com/watch?v=d5uzHiMeMAc&t=25s
रुची पालट/Fusion Food/ Chitale Bandhoo (2019): for Chitale Bandhoo, Pune Link: https://www.youtube.com/watch?v=9vnnp5zq0zY
Cotten King Brand- Just Strech Your Limits (2020) Directed by Varun Narvekar Link: https://www.youtube.com/watch?v=iqJirxo_0MQ
Red Label Tea (2021) Ad film for Hindustan Unilever directed by Gajraj Rao for Code Red Films, Mumbai Link in Telugu :https://www.youtube.com/watch?v=_HM_kaGhAW0
Short Film ‘Fala (फळा - तिमिरातून तेजाकडे 2021), Produced by Kc Productions, Dir. Mangesh Jagtap
References
Collected Plays of Satish Alekar. OUP, Delhi 2009, \
"Mahanirvan: Sameeksha aani Sansmarne" (A volume of critique in Marathi on the play, Edited by Dr. Rekha Inmadar-Sane published by M/s Rajhans Prakashan, Pune,I Edition Dec 1999, II Edition March 2008, , Pages: 254, Price Rs.250/-)
"Begum Barve Vishayee" (About the play Begum Barve) Edited by Dr. Rekha Inamdar-Sane published in June 2010 by M/s Rajhans Prakashan, Pune, Pages 169, Price: Rs. 200/- The book has nine articles analysing the text and the performance written by well-known theatre scholars.
Link to the Short Film Reunion Episode 3 (2018) https://www.youtube.com/watch?v=d5uzHiMeMAc
External links
Satish Alekar website
Memory by Satish Alekar at Little magazine''
Documentary film on Satish Alekar directed by Atul Pethe (2008,90 mints)
Book Review of Gaganika by Shanta Gokhale for Pune Mirror 1 June 2017
Look back in humour
Indian theatre directors
Indian male dramatists and playwrights
Marathi-language writers
1949 births
Living people
Indian male stage actors
Academic staff of Savitribai Phule Pune University
Asian Cultural Council grantees
Recipients of the Sangeet Natak Akademi Award
Male actors in Marathi theatre
Dramatists and playwrights from Delhi
Tisch School of the Arts faculty
Recipients of the Padma Shri in arts
20th-century Indian male actors
Male actors from Delhi
20th-century Indian dramatists and playwrights
|
```javascript
ace.define("ace/mode/aql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var AqlHighlightRules = function () {
var keywords = ("for|return|filter|search|sort|limit|let|collect|asc|desc|in|into|insert|update|remove|replace|upsert|options|with|and|or|not|distinct|graph|shortest_path|outbound|inbound|any|all|none|at least|aggregate|like|k_shortest_paths|k_paths|all_shortest_paths|prune|window");
var builtinConstants = ("true|false");
var builtinFunctions = ("to_bool|to_number|to_string|to_array|to_list|is_null|is_bool|is_number|is_string|is_array|is_list|is_object|is_document|is_datestring|" +
"typename|json_stringify|json_parse|concat|concat_separator|char_length|lower|upper|substring|left|right|trim|reverse|contains|" +
"log|log2|log10|exp|exp2|sin|cos|tan|asin|acos|atan|atan2|radians|degrees|pi|regex_test|regex_replace|" +
"like|floor|ceil|round|abs|rand|sqrt|pow|length|count|min|max|average|avg|sum|product|median|variance_population|variance_sample|variance|percentile|" +
"bit_and|bit_or|bit_xor|bit_negate|bit_test|bit_popcount|bit_shift_left|bit_shift_right|bit_construct|bit_deconstruct|bit_to_string|bit_from_string|" +
"first|last|unique|outersection|interleave|in_range|jaccard|matches|merge|merge_recursive|has|attributes|keys|values|unset|unset_recursive|keep|keep_recursive|" +
"near|within|within_rectangle|is_in_polygon|distance|fulltext|stddev_sample|stddev_population|stddev|" +
"slice|nth|position|contains_array|translate|zip|call|apply|push|append|pop|shift|unshift|remove_value|remove_values|" +
"remove_nth|replace_nth|date_now|date_timestamp|date_iso8601|date_dayofweek|date_year|date_month|date_day|date_hour|" +
"date_minute|date_second|date_millisecond|date_dayofyear|date_isoweek|date_isoweekyear|date_leapyear|date_quarter|date_days_in_month|date_trunc|date_round|" +
"date_add|date_subtract|date_diff|date_compare|date_format|date_utctolocal|date_localtoutc|date_timezone|date_timezones|" +
"fail|passthru|v8|sleep|schema_get|schema_validate|shard_id|call_greenspun|version|noopt|noeval|not_null|" +
"first_list|first_document|parse_identifier|current_user|current_database|collection_count|pregel_result|" +
"collections|document|decode_rev|range|union|union_distinct|minus|intersection|flatten|is_same_collection|check_document|" +
"ltrim|rtrim|find_first|find_last|split|substitute|ipv4_to_number|ipv4_from_number|is_ipv4|md5|sha1|sha512|crc32|fnv64|hash|random_token|to_base64|" +
"to_hex|encode_uri_component|soundex|assert|warn|is_key|sorted|sorted_unique|count_distinct|count_unique|" +
"levenshtein_distance|levenshtein_match|regex_matches|regex_split|ngram_match|ngram_similarity|ngram_positional_similarity|uuid|" +
"tokens|exists|starts_with|phrase|min_match|bm25|tfidf|boost|analyzer|" +
"cosine_similarity|decay_exp|decay_gauss|decay_linear|l1_distance|l2_distance|minhash|minhash_count|minhash_error|minhash_match|" +
"geo_point|geo_multipoint|geo_polygon|geo_multipolygon|geo_linestring|geo_multilinestring|geo_contains|geo_intersects|" +
"geo_equals|geo_distance|geo_area|geo_in_range");
var keywordMapper = this.createKeywordMapper({
"support.function": builtinFunctions,
"keyword": keywords,
"constant.language": builtinConstants
}, "identifier", true);
this.$rules = {
"start": [{
token: "comment",
regex: "//.*$"
}, {
token: "string",
regex: '".*?"'
}, {
token: "string",
regex: "'.*?'"
}, {
token: "constant.numeric",
regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
}, {
token: keywordMapper,
regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
}, {
token: "keyword.operator",
regex: "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="
}, {
token: "paren.lparen",
regex: "[\\(]"
}, {
token: "paren.rparen",
regex: "[\\)]"
}, {
token: "text",
regex: "\\s+"
}]
};
this.normalizeRules();
};
oop.inherits(AqlHighlightRules, TextHighlightRules);
exports.AqlHighlightRules = AqlHighlightRules;
});
ace.define("ace/mode/aql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/aql_highlight_rules"], function(require, exports, module){"use strict";
var oop = require("../lib/oop");
var TextMode = require("./text").Mode;
var AqlHighlightRules = require("./aql_highlight_rules").AqlHighlightRules;
var Mode = function () {
this.HighlightRules = AqlHighlightRules;
this.$behaviour = this.$defaultBehaviour;
};
oop.inherits(Mode, TextMode);
(function () {
this.lineCommentStart = "//";
this.$id = "ace/mode/aql";
}).call(Mode.prototype);
exports.Mode = Mode;
}); (function() {
ace.require(["ace/mode/aql"], function(m) {
if (typeof module == "object" && typeof exports == "object" && module) {
module.exports = m;
}
});
})();
```
|
```c
#include <string.h>
#include "strnlen.h"
size_t strnlen(const char *s, size_t n) {
const char *p = (const char *)memchr(s, 0, n);
return(p ? p-s : n);
}
```
|
The 16th Asian Table Tennis Championships 2003 were held in Bangkok, Thailand, from 22 to 28 February 2003. It was organised by the Table Tennis Association of Thailand under the authority of Asian Table Tennis Union (ATTU) and International Table Tennis Federation (ITTF).
Medal summary
Medal table
Events
See also
2003 World Table Tennis Championships
Asian Cup
References
Asian Table Tennis Championships
Asian Table Tennis Championships
Table Tennis Championships
Table tennis competitions in Thailand
Asian Table Tennis Championships
Asian Table Tennis Championships
|
The Le Piaf was a French automobile manufactured from 1951 to 1952. Only a few cars, powered by a 175 cc two-stroke engine, were built at the factory in Livry-Gargan.
References
David Burgess Wise, The New Illustrated Encyclopedia of Automobiles.
External links
Allcarindex
Autopasion18 (Spanish)
Piaf, Le
|
```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\YouTube;
class ActivityContentDetailsPlaylistItem extends \Google\Model
{
/**
* @var string
*/
public $playlistId;
/**
* @var string
*/
public $playlistItemId;
protected $resourceIdType = ResourceId::class;
protected $resourceIdDataType = '';
/**
* @param string
*/
public function setPlaylistId($playlistId)
{
$this->playlistId = $playlistId;
}
/**
* @return string
*/
public function getPlaylistId()
{
return $this->playlistId;
}
/**
* @param string
*/
public function setPlaylistItemId($playlistItemId)
{
$this->playlistItemId = $playlistItemId;
}
/**
* @return string
*/
public function getPlaylistItemId()
{
return $this->playlistItemId;
}
/**
* @param ResourceId
*/
public function setResourceId(ResourceId $resourceId)
{
$this->resourceId = $resourceId;
}
/**
* @return ResourceId
*/
public function getResourceId()
{
return $this->resourceId;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ActivityContentDetailsPlaylistItem::class, 'Google_Service_YouTube_ActivityContentDetailsPlaylistItem');
```
|
Qidu District or Cidu District () is a district of the city of Keelung, Taiwan. It borders New Taipei to the west.
History
During the period of Japanese rule, included modern day Qidu and Nuannuan districts and was governed under of Taihoku Prefecture.
In March 1988, the Keelung city government reassigned administration of several urban villages between districts. Ying-geh, Chi-sien, She-wei, San-min, Wu-fu and Liu-ho, originally part of Qidu District (Chi-du) became part of Anle District.
Administrative divisions
The district administers 20 urban villages:
Changxing/Changsing/Zhangxing (), Zhengguang/Jhengguang (), Fumin (), Yongping (), Yongan/Yong-an/Yong'an (), Bade (), Ziqiang/Zihciang/Zijiang (), Liudu/Lioudu (), Taian/Tai-an/Tai'an (), Dubei (), Dunan (), Manan (), Madong/Matung (), Maxi/Masi (), Youyi (), Youer/You-er (), Zhengming/Jhengming (), Baifu/Bofu (), Shijian/Shihjian () and Changan/Zhangan Village ().
Tourist attractions
Tai-an Falls
Yo-Ruai Stream
Transportation
TRA Baifu Station
TRA Qidu Station
Notable natives
Hsu Tsai-li, Mayor of Keelung City (2001–2007)
Kao Chia-yu, member of Legislative Yuan
See also
Keelung
References
External links
Districts of Keelung
|
Barbara Brylska (born 5 June 1941) is a Polish actress who gained critical acclaim in 1960s and was featured in numerous films throughout the countries of the Warsaw Pact including the Soviet Union. She is noted especially for her role as Nadya in the 1976 Soviet comedy film Irony of Fate.
Biography
Barbara Brylska was born on June 5, 1941, in Skotniki, near Łódź, Poland. At the age of 15, she was cast in the film Kalosze szczęścia. After this role, she took acting lessons in a theater school and became a student at the National Film School in Łódź, where in 1967 she completed her acting education at the Faculty of Acting.
Brylska's first major role was in the film Ich dzień powszedni (1963). In 1966 she played the Phoenician priestess Kama in the feature film Pharaoh (), based on the novel by Bolesław Prus.
Apart from Polish-directed movies, she has also played in films directed by Soviet, Czechoslovak and Bulgarian directors.
For her role as Nadya in the 1975 film Irony of Fate, directed by Eldar Ryazanov, she received a Soviet state award. Her acceptance of this award created controversy in her home country. Nonetheless she became a popular actress in the Soviet Union. She would later claim that her success caused jealousy in the Polish film community and led it to ignore her work.
In 1977 she was a member of the jury at the 10th Moscow International Film Festival.
Since 2000 Brylska has been acting in stage plays, primarily in Russia. She reprised the role of the aged Nadya in the 2007 Irony of Fate: The Sequel.
Awards
State award of the Soviet Union — 1977: Irony of Fate
References
Inline:
External links
External image: Barbara Brylska in a dancing scene in Polish film Pharaoh (1966).
Article about Barbara Brylska in the Bulvar Newspaper
1941 births
Living people
People from Zgierz County
Łódź Film School alumni
Polish film actresses
20th-century Polish actresses
Knights of the Order of Polonia Restituta
Recipients of the Gold Cross of Merit (Poland)
Recipients of the USSR State Prize
|
The TIM/TOM complex is a protein complex in cellular biochemistry which translocates proteins produced from nuclear DNA through the mitochondrial membrane for use in oxidative phosphorylation. In enzymology, the complex is described as an mitochondrial protein-transporting ATPase (), or more systematically ATP phosphohydrolase (mitochondrial protein-importing), as the TIM part requires ATP hydrolysis to work.
Only 13 proteins necessary for a mitochondrion are actually coded in mitochondrial DNA. The vast majority of proteins destined for the mitochondria are encoded in the nucleus and synthesised in the cytoplasm. These are tagged by an N-terminal or/and a C-terminal signal sequence. Following transport through the cytosol from the nucleus, the signal sequence is recognized by a receptor protein in the translocase of the outer membrane (TOM) complex. The signal sequence and adjacent portions of the polypeptide chain are inserted in the TOM complex, then begin interaction with a translocase of the inner membrane (TIM) complex, which are hypothesized to be transiently linked at sites of close contact between the two membranes. The signal sequence is then translocated into the matrix in a process that requires an electrochemical hydrogen ion gradient across the inner membrane. Mitochondrial Hsp70 binds to regions of the polypeptide chain and maintains it in an unfolded state as it moves into the matrix.
The ATPase domain is essential during the interactions of the proteins Hsp70 and subunit Tim44. Without the presence of ATPase, carboxy-terminal segment is not able to bind to protein of Tim44. As mtHsp70 transmits the nucleotide state of the ATPase domain with alpha-helices A and B, Tim44 interacts with the peptide binding domain to coordinate the protein bind.
TIC/TOC Complex vs. TIM/TOM Complex
This protein complex is functionally analogous to the TIC/TOC complex located on the inner and outer membranes of the chloroplast, in the sense that it transports proteins into the membrane of the mitochondria. Although they both hydrolyze triphosphates, they are evolutionally unrelated.
References
External links
TCDB 3.A.8 - description of the entire complex
Overview of the various import ways into mitochondria (group of N. Pfanner)
Transport proteins
Mitochondria
Transmembrane proteins
EC 3.6.3
EC 7.4.2
Enzymes of unknown structure
|
Haris Alagic professionally known as Haris, is a Dutch singer-songwriter and guitarist of Bosnian descent. He started his career in 2013 by winning the fifth season of Dutch series of the X Factor.
Career
X Factor
Alagic won the Dutch X Factor with 64% from opponent contestant Adriaan Persons when he was eighteen years old. During the television show, Alagic was being coached by Dutch singer, presenter, actress Angela Groothuizen. As a result of this victory, Alagic won a signing with music label Sony Music. During this collaboration with Sony Music, Alagic released his first singles "Playing with Fire", and "Gold". In 2015, his first EP Bedroom Sessions was being released, which he recorded in his bedroom.
After the beginning of Alagic's career, he has been collaborating with various artists. Alagic has worked together as performing vocalist as well as a songwriter with artists such as Hardwell, Headhunterz, The Voyagers, Oliver Heldens, Ferry Corsten, and Dannic. During this time, Alagic was mostly releasing EDM tracks.
2018–present
Later, Alagic went on with songwriting and releasing his own music. In the meantime, the collaboration between the artist and Sony Music ended and begun publishing music with Houston Comma. In 2018, various singles led to his second EP Side Effects. While Alagic continued with releasing singles, it was the collaboration between him and DJ duo Lucas & Steve, starting with the release of "Perfect" in 2019, which brought him back to public attention. The song was adapted and sampled on the a-ha song "Take On Me". Shortly after, Alagic released the single "Shivers" in 2020. Also in 2020, Alagic worked on another release from Lucas & Steve. This time, he co-wrote and performed "Letters", Lucas & Steve's album Letters to Remember.
Discography
EPs
2015: Bedroom EP
2018: Side Effects EP
2021: Wilted Roses EP
2022: Beauty is a mess EP
Albums
2021: Obsession
Singles
2013: "Playing with Fire" - Peaked at #27 on Dutch Top 40, #9 on Dutch Single Top 100
2013: "Gold"
2020: "Shivers"
Featured in
2019: "Perfect" (Lucas & Steve feat. Haris) - Peaked at #10 on Dutch Top 40 and #28 on Dutch Single Top 100
References
1995 births
Living people
Dutch male singers
The X Factor winners
People from Eindhoven
Dutch people of Bosnia and Herzegovina descent
Dutch guitarists
|
The City of South Melbourne was a local government area about south of Melbourne, the state capital of Victoria, Australia, on the south bank of the Yarra River. The city covered an area of , and existed from 1855 until 1994.
The council area was bounded by the Yarra River to the north, Fraser and Lorne Streets to the south, the Port Phillip foreshore and Pickles Street to the west, and St Kilda Road to the east.
History
South Melbourne was first incorporated as the Emerald Hill Borough on 26 May 1855, and became a town on 1 March 1872. It was proclaimed a city, and was renamed South Melbourne, on 21 September 1883.
On 18 November 1993, a small portion around Southbank and the Victorian Arts Centre was annexed to the City of Melbourne.
On 22 June 1994, the City of South Melbourne was abolished, and along with the Cities of Port Melbourne and St Kilda, was merged into the newly created City of Port Phillip.
The Council met at the South Melbourne Town Hall on Bank Street, between Fishley and Layfield Streets, South Melbourne. The hall still exists and is now used by the Australian National Academy of Music.
Wards
The City of South Melbourne was divided into four wards, each electing three councillors:
Canterbury Ward
Fawkner Ward
Hobson Ward
Queens Ward
Suburbs
Albert Park
Melbourne (between Queens Road and St Kilda Road)
Middle Park
Southbank
South Melbourne*
* Council seat.
Population
* Estimate in the 1958 Victorian Year Book.
Gallery
References
External links
Victorian Places - South Melbourne
South Melbourne
1855 establishments in Australia
1994 disestablishments in Australia
City of Port Phillip
|
The Municipal Affairs Bureau (; ) of Macau is an administrative body without political powers responsible for providing certain civic services for the special administrative region and is the successor to the Civic and Municipal Affairs Bureau () which was abolished in 2019. The latter was formed to handle the functions of the former municipalities of Macau and their councils and assemblies that were abolished on 1 January 2002, slightly more than two years after Macau became a special administrative region (SAR) of the People's Republic of China. The body is under the Secretariat for Administration and Justice of the Macau government.
History
Following the transfer of sovereignty over Macau from Portugal to China in 1999, the Portuguese administrative divisions of municipalities (concelhos) and parishes (freguesias) in Macau were kept provisionally in place: the provisional municipal council of Macau, the provisional municipal council of Ilhas, and the provisional municipal assemblies of each municipality.
On 31 December 2001, all the provisional organs were dissolved and the new Civic and Municipal Affairs Bureau ( [IACM], ) took on the roles of the provisional municipal councils, starting from 1 January 2002, under the Secretariat for Administration and Justice of the Macau government.
The IACM was given a logo based on the Chinese Han character , for "civilian".
In 2018, the Macau legislative assembly passed Law No. 9/2018 which abolished the IACM and created the Municipal Affairs Bureau in its place. All the functions of the former were transferred to the new bureau and a new 25-member municipal affairs advisory council was established. This came into effect on 1 January 2019.
See also
Parishes of Macau
Leal Senado Building
References
External links
Municipal Affairs Bureau
Civic Bureau
Civic Bureau
Macau, Civic Bureau
Civic Bureau
Government departments and agencies of Macau
|
```javascript
(window.webpackJsonp=window.webpackJsonp||[]).push([[16],{793:function(e,t){e.exports=function(e){var t={variants:[e.COMMENT(";","$",{relevance:0}),e.COMMENT("#cs","#ce"),e.COMMENT("#comments-start","#comments-end")]},r={begin:"\\$[A-z0-9_]+"},i={className:"string",variants:[{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]},n={variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]};return{case_insensitive:!0,illegal:/\/\*/,keywords:{keyword:"ByRef Case Const ContinueCase ContinueLoop Default Dim Do Else ElseIf EndFunc EndIf EndSelect EndSwitch EndWith Enum Exit ExitLoop For Func Global If In Local Next ReDim Return Select Static Step Switch Then To Until Volatile WEnd While With",built_in:"Abs ACos AdlibRegister AdlibUnRegister Asc AscW ASin Assign ATan AutoItSetOption AutoItWinGetTitle AutoItWinSetTitle Beep Binary BinaryLen BinaryMid BinaryToString BitAND BitNOT BitOR BitRotate BitShift BitXOR BlockInput Break Call CDTray Ceiling Chr ChrW ClipGet ClipPut ConsoleRead ConsoleWrite ConsoleWriteError ControlClick ControlCommand ControlDisable ControlEnable ControlFocus ControlGetFocus ControlGetHandle ControlGetPos ControlGetText ControlHide ControlListView ControlMove ControlSend ControlSetText ControlShow ControlTreeView Cos Dec DirCopy DirCreate DirGetSize DirMove DirRemove DllCall DllCallAddress DllCallbackFree DllCallbackGetPtr DllCallbackRegister DllClose DllOpen DllStructCreate DllStructGetData DllStructGetPtr DllStructGetSize DllStructSetData DriveGetDrive DriveGetFileSystem DriveGetLabel DriveGetSerial DriveGetType DriveMapAdd DriveMapDel DriveMapGet DriveSetLabel DriveSpaceFree DriveSpaceTotal DriveStatus EnvGet EnvSet EnvUpdate Eval Execute Exp FileChangeDir FileClose FileCopy FileCreateNTFSLink FileCreateShortcut FileDelete FileExists FileFindFirstFile FileFindNextFile FileFlush FileGetAttrib FileGetEncoding FileGetLongName FileGetPos FileGetShortcut FileGetShortName FileGetSize FileGetTime FileGetVersion FileInstall FileMove FileOpen FileOpenDialog FileRead FileReadLine FileReadToArray FileRecycle FileRecycleEmpty FileSaveDialog FileSelectFolder FileSetAttrib FileSetEnd FileSetPos FileSetTime FileWrite FileWriteLine Floor FtpSetProxy FuncName GUICreate GUICtrlCreateAvi GUICtrlCreateButton GUICtrlCreateCheckbox GUICtrlCreateCombo GUICtrlCreateContextMenu GUICtrlCreateDate GUICtrlCreateDummy GUICtrlCreateEdit GUICtrlCreateGraphic GUICtrlCreateGroup GUICtrlCreateIcon GUICtrlCreateInput GUICtrlCreateLabel GUICtrlCreateList GUICtrlCreateListView GUICtrlCreateListViewItem GUICtrlCreateMenu GUICtrlCreateMenuItem GUICtrlCreateMonthCal GUICtrlCreateObj GUICtrlCreatePic GUICtrlCreateProgress GUICtrlCreateRadio GUICtrlCreateSlider GUICtrlCreateTab GUICtrlCreateTabItem GUICtrlCreateTreeView GUICtrlCreateTreeViewItem GUICtrlCreateUpdown GUICtrlDelete GUICtrlGetHandle GUICtrlGetState GUICtrlRead GUICtrlRecvMsg GUICtrlRegisterListViewSort GUICtrlSendMsg GUICtrlSendToDummy GUICtrlSetBkColor GUICtrlSetColor GUICtrlSetCursor GUICtrlSetData GUICtrlSetDefBkColor GUICtrlSetDefColor GUICtrlSetFont GUICtrlSetGraphic GUICtrlSetImage GUICtrlSetLimit GUICtrlSetOnEvent GUICtrlSetPos GUICtrlSetResizing GUICtrlSetState GUICtrlSetStyle GUICtrlSetTip GUIDelete GUIGetCursorInfo GUIGetMsg GUIGetStyle GUIRegisterMsg GUISetAccelerators GUISetBkColor GUISetCoord GUISetCursor GUISetFont GUISetHelp GUISetIcon GUISetOnEvent GUISetState GUISetStyle GUIStartGroup GUISwitch Hex HotKeySet HttpSetProxy HttpSetUserAgent HWnd InetClose InetGet InetGetInfo InetGetSize InetRead IniDelete IniRead IniReadSection IniReadSectionNames IniRenameSection IniWrite IniWriteSection InputBox Int IsAdmin IsArray IsBinary IsBool IsDeclared IsDllStruct IsFloat IsFunc IsHWnd IsInt IsKeyword IsNumber IsObj IsPtr IsString Log MemGetStats Mod MouseClick MouseClickDrag MouseDown MouseGetCursor MouseGetPos MouseMove MouseUp MouseWheel MsgBox Number ObjCreate ObjCreateInterface ObjEvent ObjGet ObjName OnAutoItExitRegister OnAutoItExitUnRegister Ping PixelChecksum PixelGetColor PixelSearch ProcessClose ProcessExists ProcessGetStats ProcessList ProcessSetPriority ProcessWait ProcessWaitClose ProgressOff ProgressOn ProgressSet Ptr Random RegDelete RegEnumKey RegEnumVal RegRead RegWrite Round Run RunAs RunAsWait RunWait Send SendKeepActive SetError SetExtended ShellExecute ShellExecuteWait Shutdown Sin Sleep SoundPlay SoundSetWaveVolume SplashImageOn SplashOff SplashTextOn Sqrt SRandom StatusbarGetText StderrRead StdinWrite StdioClose StdoutRead String StringAddCR StringCompare StringFormat StringFromASCIIArray StringInStr StringIsAlNum StringIsAlpha StringIsASCII StringIsDigit StringIsFloat StringIsInt StringIsLower StringIsSpace StringIsUpper StringIsXDigit StringLeft StringLen StringLower StringMid StringRegExp StringRegExpReplace StringReplace StringReverse StringRight StringSplit StringStripCR StringStripWS StringToASCIIArray StringToBinary StringTrimLeft StringTrimRight StringUpper Tan TCPAccept TCPCloseSocket TCPConnect TCPListen TCPNameToIP TCPRecv TCPSend TCPShutdown, UDPShutdown TCPStartup, UDPStartup TimerDiff TimerInit ToolTip TrayCreateItem TrayCreateMenu TrayGetMsg TrayItemDelete TrayItemGetHandle TrayItemGetState TrayItemGetText TrayItemSetOnEvent TrayItemSetState TrayItemSetText TraySetClick TraySetIcon TraySetOnEvent TraySetPauseIcon TraySetState TraySetToolTip TrayTip UBound UDPBind UDPCloseSocket UDPOpen UDPRecv UDPSend VarGetType WinActivate WinActive WinClose WinExists WinFlash WinGetCaretPos WinGetClassList WinGetClientSize WinGetHandle WinGetPos WinGetProcess WinGetState WinGetText WinGetTitle WinKill WinList WinMenuSelectItem WinMinimizeAll WinMinimizeAllUndo WinMove WinSetOnTop WinSetState WinSetTitle WinSetTrans WinWait",literal:"True False And Null Not Or"},contains:[t,r,i,n,{className:"meta",begin:"#",end:"$",keywords:{"meta-keyword":"comments include include-once NoTrayIcon OnAutoItStartRegister pragma compile RequireAdmin"},contains:[{begin:/\\\n/,relevance:0},{beginKeywords:"include",keywords:{"meta-keyword":"include"},end:"$",contains:[i,{className:"meta-string",variants:[{begin:"<",end:">"},{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]}]},i,t]},{className:"symbol",begin:"@[A-z0-9_]+"},{className:"function",beginKeywords:"Func",end:"$",illegal:"\\$|\\[|%",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:[r,i,n]}]}]}}}}]);
```
|
Anan Mirgaf Lestaluhu (born 22 September 1999) is an Indonesian professional footballer who plays as a left-back for Liga 2 club Persipa Pati.
Career
Persija
Anan got his official professional debut when he played as a starter against PSIS to replace Rezaldi Hehanusa. He played 65 minutes before being substituted with Michael Orah.
Bali United
On 21 May 2019, Anan officially signed a two-year contract with Bali United, as a part of swap transfer with Feby Eka Putra went to Persija. Bali United registered him for 2019 Liga 1 to completes the quota of U-23 players.
He resigned from Bali United on 4 August 2020 because he will take the test to become a police.
RANS Cilegon
In 2021, Anan signed a contract with Indonesian Liga 2 club RANS Cilegon. He made his league debut on 28 September against Dewa United at the Gelora Bung Karno Madya Stadium, Jakarta.
Honours
Club
Persija Jakarta
Liga 1: 2018
Bali United
Liga 1: 2019
RANS Cilegon
Liga 2 runner-up: 2021
References
External links
Anan Lestaluhu at Liga Indonesia Official Website
1999 births
Living people
Indonesian men's footballers
People from Tulehu
Persija Jakarta players
Bali United F.C. players
RANS Nusantara F.C. players
F.C. Bekasi City players
Persipa Pati players
Liga 1 (Indonesia) players
Liga 2 (Indonesia) players
Men's association football defenders
Footballers from Maluku (province)
21st-century Indonesian people
|
The capped seedeater has been split into two distinct species, and may refer to:
Copper seedeater, Sporophila bouvreuil
Pearly-bellied seedeater, Sporophila pileata
|
was a feudal domain under the Tokugawa shogunate of Edo period Japan, in what is now southeastern Yamaguchi Prefecture. A subsidiary domain of Chōshū Domain, it was centered around Tokuyama jin'ya in what is now part of the city of Shūnan, Yamaguchi, and was ruled throughout its history by a cadet branch of the Mōri clan. Tokuyama Domain was dissolved in the abolition of the han system in 1871.
History
As Kudamatsu Domain
Mōri Narikata, a son of Mōri Terumoto and brother of Mōri Hidenari was granted estates with a kokudaka of 31,000 koku and was authorized to establish a cadet branch of the Mōri clan. As his seat was initially located in Kudamatsu, Suō Province, the domain was initially referred to as "Kudamatsu Domain". In a land survey of 1625, it was estimated that his actual kokudaka was more than 40,000 koku. The domain received official recognition by the Tokugawa shogunate only in 1634. Mōri Narikata spent most of his time in Edo, visiting his estates only in 1634. For the most part, his holdings were administered by officials from the parent domain dispatched from Hagi; however, many of the domain's samurai were originally ronin made masterless by the Battle of Sekigahara, or else third sons of retainers of the parent domain who had poor prospects for employment closer to home.
As Tokuyama Domain
In June 1650, Mōri Narikata moved his seat to a place called Nogami, which he renamed "Tokuyama". The new location was more convenient for trade and commerce, and the domain was renamed "Tokuyama Domain". In 1716, under the third daimyō, Mōri Mototsugu, there was a heated dispute between Tokuyama Domain and the parent domain over the felling of trees (the Manyakuyama incident), which resulted in intervention of the shogunate and attainder of Tokuyama Domain for "disrespect". However, through the efforts of Mototsugu's son Mōri Mototaka and senior retainers, the domain was revived in 1719, albeit with a reduction in kokudaka to 30,000 koku. In 1836, the eighth daimyō, Mōri Hiroshige, was raised in status to "castle-holding daimyō", and Tokuyama jin'ya was renamed "Tokuyama Castle" and the domain's kokudaka reverted to 40,000 koku. His successor, Mōri Motomitsu, ruled to the Meiji restoration. At the time of the abolition of the han system in 1871, it was estimated that the domain's actual kokudaka was more than 69,000 koku.
On July 26th, 1945, Tokuyama Castle was destroyed by the Tokuyama Air Raid.
Holdings at the end of the Edo period
As with most domains in the han system, Tokuyama Domain consisted of several discontinuous territories calculated to provide the assigned kokudaka, based on periodic cadastral surveys and projected agricultural yields, g.
Suō Province
1 village in Kumage District
26 villages in Tsuno District
2 villages in Saba District
Nagato Province
2 villages in Abu District
List of daimyō
{| class=wikitable
! #||Name || Tenure || Courtesy title || Court Rank || kokudaka
|-
|colspan=6| Mōri clan, 1617-1871 (Tozama)
|-
||1||Mōri Naritaka (毛利就隆)||1617 - 1679||Hyuga-no-kami (日向守)|| Junior 5th Rank, Lower Grade (従五位下)||45,000 koku
|-
||2|| Mōri Motokata (毛利元賢)||1679 - 1690||Hyuga-no-kami (日向守)|| Junior 5th Rank, Lower Grade (従五位下)||45,000 koku
|-
||3|| Mōri Mototsugu (毛利元次)||1690 - 1715||Hida-no-kami (飛騨守)|| Junior 5th Rank, Lower Grade (従五位下)||45,000 koku
|-
||4|| Mōri Mototaka (毛利元尭) ||1715 - 1721||Hyuga-no-kami (日向守)|| Junior 5th Rank, Lower Grade (従五位下)||45,000 -> 30,000 koku
|-
||5|| Mōri Hirotoyo (毛利広豊)||1721 - 1758||Yamashiro-no-kami (山城守)|| Junior 5th Rank, Lower Grade (従五位下)||30,000 koku
|-
||6|| Mōri Hironori (毛利広寛)||1758 - 1764||Shima-no-kami (志摩守)|| Junior 5th Rank, Lower Grade (従五位下)||30,000 koku
|-
||7|| Mōri Nariyoshi (毛利就馴)||1764 - 1796||Iwami-no-kami (石見守)|| Junior 5th Rank, Lower Grade (従五位下)||30,000 koku
|-
||8|| Mōri Hiroshige (毛利広鎮)||1796 - 1837||Hyuga-no-kami (日向守)|| Junior 5th Rank, Lower Grade (従五位下)||30,000 -> 40,000 koku
|-
||9|| Mōri Motomitsu (吉川経賢)||1837 - 1871||Awaji-no-kami (淡路守)|| Junior 5th Rank, Lower Grade (従五位下)||40,000 koku
|-
|-
|}
See also
List of Han
Abolition of the han system
References
Domains of Japan
History of Yamaguchi Prefecture
Suō Province
Chūgoku region
1871 disestablishments in Japan
States and territories disestablished in 1871
Shūnan, Yamaguchi
|
Lindbergtinden is a mountain in Lom Municipality in Innlandet county, Norway. The tall mountain is located in the Jotunheimen mountains within Jotunheimen National Park. The mountain sits about southwest of the village of Fossbergom and about northeast of the village of Øvre Årdal. The mountain is surrounded by several other notable mountains including Storjuvtinden and Store Tverråtinden to the north; Svellnosbreahesten and Midtre Tverråtinden to the northeast; Store Styggehøe and Bukkeholshøe to the southeast;Bukkeholstindene and Tverrbottindene to the south; and Sauhøi to the west.
See also
List of mountains of Norway by height
References
Jotunheimen
Lom, Norway
Mountains of Innlandet
|
Melford is a historic plantation house located on the grounds of the Maryland Science and Technology Center, near the intersection of U.S. Route 301 and U.S. Route 50, at Bowie, Prince George's County, Maryland. The house is multi-part, gable-roofed, brick and stone dwelling house constructed probably in the mid-late 1840s, with elements of the Greek Revival style.
History
The land that made up the Melford plantation was part of a tract, originally called Howerton's Range which was a 400-acre parcel that John Howerton obtained in 1670. It is part of Prince George's County and had historically been inhabited by the Piscataway people, an Algonquin language speaking tribe, as well as the Patuxent people and other Native American groups.
Melford was built by Dr. Richard Duckett in 1810, replacing a previous structure. Dr. Richard Duckett was the brother of Allen Bowie Duckett, and the son of Thomas Duckett, who in 1796 was judge of the Prince George's County Court, and one of the principal slaveholders in the area.
Melford was listed on the National Register of Historic Places in 1988.
Grounds
The grounds include three outbuildings: a three-bay gable-roofed slave quarter probably dating from the 18th century; a pyramidal-roofed meat house also dating from the late 18th century; and a 20th-century pyramidal-roofed pump house. The landscape consists of terraced gardens, falling away from the house on three levels. Melford was home for 140 years to two prominent local families, the Ducketts and the Hardestys.
References
External links
, including photo in 1974, at Maryland Historical Trust website
Melford, Crain Highway (U.S. Route 301), Mitchellville, Prince George's County, MD: 25 photos and 13 data pages, at Historic American Buildings Survey
Melford, Slave House, Mitchellville, Prince George's County, MD: 1 photo and 1 data page, at Historic American Buildings Survey
Melford, Smokehouse, Mitchellville, Prince George's County, MD: 1 photo and 1 data page, at Historic American Buildings Survey
Historic American Buildings Survey in Maryland
Houses in Prince George's County, Maryland
Buildings and structures in Bowie, Maryland
Greek Revival houses in Maryland
Houses on the National Register of Historic Places in Maryland
Plantation houses in Maryland
National Register of Historic Places in Prince George's County, Maryland
Plantations in Maryland
|
Thomas Neill (18 September 1867 – 1949) was a New Zealand cricketer. He played two first-class matches for Auckland between 1892 and 1898.
See also
List of Auckland representative cricketers
References
External links
1867 births
1949 deaths
Auckland cricketers
Cricketers from Greenock
New Zealand cricketers
British emigrants to New Zealand
|
The men's cross country competition at the 2022 Asian Games was held on 25 September 2023 at the Chun'an Jieshou Sports Centre.
Schedule
All times are China Standard Time (UTC+08:00)
Results
References
External links
Mountain Men
|
```go
package stacks
import (
"net/http"
"time"
portainer "github.com/portainer/portainer/api"
"github.com/portainer/portainer/api/git"
httperrors "github.com/portainer/portainer/api/http/errors"
"github.com/portainer/portainer/api/http/security"
k "github.com/portainer/portainer/api/kubernetes"
"github.com/portainer/portainer/api/stacks/deployments"
"github.com/portainer/portainer/api/stacks/stackutils"
httperror "github.com/portainer/portainer/pkg/libhttp/error"
"github.com/portainer/portainer/pkg/libhttp/request"
"github.com/portainer/portainer/pkg/libhttp/response"
"github.com/pkg/errors"
)
type stackGitRedployPayload struct {
RepositoryReferenceName string
RepositoryAuthentication bool
RepositoryUsername string
RepositoryPassword string
Env []portainer.Pair
Prune bool
// Force a pulling to current image with the original tag though the image is already the latest
PullImage bool `example:"false"`
StackName string
}
func (payload *stackGitRedployPayload) Validate(r *http.Request) error {
return nil
}
// @id StackGitRedeploy
// @summary Redeploy a stack
// @description Pull and redeploy a stack via Git
// @description **Access policy**: authenticated
// @tags stacks
// @security ApiKeyAuth
// @security jwt
// @accept json
// @produce json
// @param id path int true "Stack identifier"
// @param endpointId query int false "Stacks created before version 1.18.0 might not have an associated environment(endpoint) identifier. Use this optional parameter to set the environment(endpoint) identifier used by the stack."
// @param body body stackGitRedployPayload true "Git configs for pull and redeploy of a stack. **StackName** may only be populated for Kuberenetes stacks, and if specified with a blank string, it will be set to blank"
// @success 200 {object} portainer.Stack "Success"
// @failure 400 "Invalid request"
// @failure 403 "Permission denied"
// @failure 404 "Not found"
// @failure 500 "Server error"
// @router /stacks/{id}/git/redeploy [put]
func (handler *Handler) stackGitRedeploy(w http.ResponseWriter, r *http.Request) *httperror.HandlerError {
stackID, err := request.RetrieveNumericRouteVariableValue(r, "id")
if err != nil {
return httperror.BadRequest("Invalid stack identifier route variable", err)
}
stack, err := handler.DataStore.Stack().Read(portainer.StackID(stackID))
if handler.DataStore.IsErrObjectNotFound(err) {
return httperror.NotFound("Unable to find a stack with the specified identifier inside the database", err)
} else if err != nil {
return httperror.InternalServerError("Unable to find a stack with the specified identifier inside the database", err)
}
if stack.GitConfig == nil {
return httperror.BadRequest("Stack is not created from git", err)
}
// TODO: this is a work-around for stacks created with Portainer version >= 1.17.1
// The EndpointID property is not available for these stacks, this API environment(endpoint)
// can use the optional EndpointID query parameter to associate a valid environment(endpoint) identifier to the stack.
endpointID, err := request.RetrieveNumericQueryParameter(r, "endpointId", true)
if err != nil {
return httperror.BadRequest("Invalid query parameter: endpointId", err)
}
if endpointID != int(stack.EndpointID) {
stack.EndpointID = portainer.EndpointID(endpointID)
}
endpoint, err := handler.DataStore.Endpoint().Endpoint(stack.EndpointID)
if handler.DataStore.IsErrObjectNotFound(err) {
return httperror.NotFound("Unable to find the environment associated to the stack inside the database", err)
} else if err != nil {
return httperror.InternalServerError("Unable to find the environment associated to the stack inside the database", err)
}
if err := handler.requestBouncer.AuthorizedEndpointOperation(r, endpoint); err != nil {
return httperror.Forbidden("Permission denied to access environment", err)
}
securityContext, err := security.RetrieveRestrictedRequestContext(r)
if err != nil {
return httperror.InternalServerError("Unable to retrieve info from request context", err)
}
// Only check resource control when it is a DockerSwarmStack or a DockerComposeStack
if stack.Type == portainer.DockerSwarmStack || stack.Type == portainer.DockerComposeStack {
resourceControl, err := handler.DataStore.ResourceControl().ResourceControlByResourceIDAndType(stackutils.ResourceControlID(stack.EndpointID, stack.Name), portainer.StackResourceControl)
if err != nil {
return httperror.InternalServerError("Unable to retrieve a resource control associated to the stack", err)
}
if access, err := handler.userCanAccessStack(securityContext, endpoint.ID, resourceControl); err != nil {
return httperror.InternalServerError("Unable to verify user authorizations to validate stack access", err)
} else if !access {
return httperror.Forbidden("Access denied to resource", httperrors.ErrResourceAccessDenied)
}
}
if canManage, err := handler.userCanManageStacks(securityContext, endpoint); err != nil {
return httperror.InternalServerError("Unable to verify user authorizations to validate stack deletion", err)
} else if !canManage {
errMsg := "Stack management is disabled for non-admin users"
return httperror.Forbidden(errMsg, errors.New(errMsg))
}
var payload stackGitRedployPayload
if err := request.DecodeAndValidateJSONPayload(r, &payload); err != nil {
return httperror.BadRequest("Invalid request payload", err)
}
stack.GitConfig.ReferenceName = payload.RepositoryReferenceName
stack.Env = payload.Env
if stack.Type == portainer.DockerSwarmStack {
stack.Option = &portainer.StackOption{Prune: payload.Prune}
}
if stack.Type == portainer.KubernetesStack {
stack.Name = payload.StackName
}
repositoryUsername := ""
repositoryPassword := ""
if payload.RepositoryAuthentication {
repositoryPassword = payload.RepositoryPassword
// When the existing stack is using the custom username/password and the password is not updated,
// the stack should keep using the saved username/password
if repositoryPassword == "" && stack.GitConfig != nil && stack.GitConfig.Authentication != nil {
repositoryPassword = stack.GitConfig.Authentication.Password
}
repositoryUsername = payload.RepositoryUsername
}
cloneOptions := git.CloneOptions{
ProjectPath: stack.ProjectPath,
URL: stack.GitConfig.URL,
ReferenceName: stack.GitConfig.ReferenceName,
Username: repositoryUsername,
Password: repositoryPassword,
TLSSkipVerify: stack.GitConfig.TLSSkipVerify,
}
clean, err := git.CloneWithBackup(handler.GitService, handler.FileService, cloneOptions)
if err != nil {
return httperror.InternalServerError("Unable to clone git repository directory", err)
}
defer clean()
if err := handler.deployStack(r, stack, payload.PullImage, endpoint); err != nil {
return err
}
newHash, err := handler.GitService.LatestCommitID(stack.GitConfig.URL, stack.GitConfig.ReferenceName, repositoryUsername, repositoryPassword, stack.GitConfig.TLSSkipVerify)
if err != nil {
return httperror.InternalServerError("Unable get latest commit id", errors.WithMessagef(err, "failed to fetch latest commit id of the stack %v", stack.ID))
}
stack.GitConfig.ConfigHash = newHash
user, err := handler.DataStore.User().Read(securityContext.UserID)
if err != nil {
return httperror.BadRequest("Cannot find context user", errors.Wrap(err, "failed to fetch the user"))
}
stack.UpdatedBy = user.Username
stack.UpdateDate = time.Now().Unix()
stack.Status = portainer.StackStatusActive
if err := handler.DataStore.Stack().Update(stack.ID, stack); err != nil {
return httperror.InternalServerError("Unable to persist the stack changes inside the database", errors.Wrap(err, "failed to update the stack"))
}
if stack.GitConfig != nil && stack.GitConfig.Authentication != nil && stack.GitConfig.Authentication.Password != "" {
// Sanitize password in the http response to minimise possible security leaks
stack.GitConfig.Authentication.Password = ""
}
return response.JSON(w, stack)
}
func (handler *Handler) deployStack(r *http.Request, stack *portainer.Stack, pullImage bool, endpoint *portainer.Endpoint) *httperror.HandlerError {
var deploymentConfiger deployments.StackDeploymentConfiger
switch stack.Type {
case portainer.DockerSwarmStack:
prune := false
if stack.Option != nil {
prune = stack.Option.Prune
}
// Create swarm deployment config
securityContext, err := security.RetrieveRestrictedRequestContext(r)
if err != nil {
return httperror.InternalServerError("Unable to retrieve info from request context", err)
}
deploymentConfiger, err = deployments.CreateSwarmStackDeploymentConfig(securityContext, stack, endpoint, handler.DataStore, handler.FileService, handler.StackDeployer, prune, pullImage)
if err != nil {
return httperror.InternalServerError(err.Error(), err)
}
case portainer.DockerComposeStack:
// Create compose deployment config
securityContext, err := security.RetrieveRestrictedRequestContext(r)
if err != nil {
return httperror.InternalServerError("Unable to retrieve info from request context", err)
}
deploymentConfiger, err = deployments.CreateComposeStackDeploymentConfig(securityContext, stack, endpoint, handler.DataStore, handler.FileService, handler.StackDeployer, pullImage, true)
if err != nil {
return httperror.InternalServerError(err.Error(), err)
}
case portainer.KubernetesStack:
handler.stackCreationMutex.Lock()
defer handler.stackCreationMutex.Unlock()
tokenData, err := security.RetrieveTokenData(r)
if err != nil {
return httperror.BadRequest("Failed to retrieve user token data", err)
}
user := &portainer.User{
ID: tokenData.ID,
Username: tokenData.Username,
}
appLabel := k.KubeAppLabels{
StackID: int(stack.ID),
StackName: stack.Name,
Owner: tokenData.Username,
Kind: "git",
}
deploymentConfiger, err = deployments.CreateKubernetesStackDeploymentConfig(stack, handler.KubernetesDeployer, appLabel, user, endpoint)
if err != nil {
return httperror.InternalServerError(err.Error(), err)
}
default:
return httperror.InternalServerError("Unsupported stack", errors.Errorf("unsupported stack type: %v", stack.Type))
}
if err := deploymentConfiger.Deploy(); err != nil {
return httperror.InternalServerError(err.Error(), err)
}
return nil
}
```
|
South Holston Lake is located near the town of Abingdon, Virginia and the city of Bristol, Virginia / Bristol, Tennessee, and is a impoundment operated by the Tennessee Valley Authority (TVA). Much of the reservoir is in Tennessee, but the Virginia portion of the reservoir offers anglers more than of water. At this time there is a South Holston Reservoir Fishing License that will allow anglers from the two states to fish the entire lake with the purchase of this license.
Fishing and area information
South Holston offers good fishing for a variety of species. Black bass, bluegill, crappie, walleye, sunfish, and catfish are a few of the most sought after species. Predatory fish have diverse and abundant forage in the form of alewives, gizzard shad, threadfin shad and shiners. The lake's shoreline habitats offer anglers a good diversity of structure including rock bluffs, shale banks and flat clay points. Anglers who prefer trolling will also find a good selection of open water structure ranging from mud flats to river channel drop-offs to submerged islands.
Events
Every year on the 4th of July, the area has a fireworks display in which the fireworks can be seen everywhere over the lake. There are also many fishing and boat racing events in the summer.
References
External links
South Holston Lake
Holston River
Reservoirs in Virginia
Reservoirs in Tennessee
Protected areas of Sullivan County, Tennessee
Protected areas of Washington County, Virginia
Bodies of water of Sullivan County, Tennessee
Bodies of water of Washington County, Virginia
|
```python
import numpy as np
def point_in_hull(point, hull, tolerance=1e-12):
return all((np.dot(eq[:-1], point) + eq[-1] <= tolerance) for eq in hull.equations)
def n_points_in_hull(points, hull):
n_points = 0
for i in range(points.shape[0]):
if point_in_hull(points[i, :], hull):
n_points = n_points + 1
return n_points
def are_in_hull(points, hull):
ins = []
outs = []
for i in range(points.shape[0]):
if point_in_hull(points[i, :], hull):
ins.append(i)
else:
outs.append(i)
return ins, outs
```
|
```yaml
models:
- columns:
- name: id
tests:
- unique
- not_null
- relationships:
field: id
to: ref('node_0')
name: node_837
version: 2
```
|
```xml
/* eslint-disable no-underscore-dangle */
import {
Component,
EventEmitter,
HostBinding,
HostListener,
Input,
Output,
ViewChild,
ElementRef,
} from '@angular/core';
export const exportedConstant = 'An exported constant';
export type ButtonSize = 'small' | 'medium' | 'large' | 'xlarge';
export interface ISomeInterface {
one: string;
two: boolean;
three: any[];
}
export enum ButtonAccent {
'Normal' = 'Normal',
'High' = 'High',
}
/**
* This is a simple button that demonstrates various JSDoc handling in Storybook Docs for Angular.
*
* It supports [markdown](path_to_url so you can embed formatted text,
* like **bold**, _italic_, and `inline code`.> How you like dem apples?! It's never been easier to
* document all your components.
*
* @string Hello world
* @link [Example](path_to_url
* @code `ThingThing`
* @html <span class="badge">aaa</span>
*/
@Component({
selector: 'my-button',
templateUrl: './doc-button.component.html',
styleUrls: ['./doc-button.component.scss'],
})
export class DocButtonComponent<T> {
@ViewChild('buttonRef', { static: false }) buttonRef!: ElementRef;
/** Test default value. */
@Input()
public theDefaultValue = 'Default value in component';
/**
* Setting default value here because compodoc won't get the default value for accessors
*
* @default Another default value
*/
@Input()
get anotherDefaultValue() {
return this._anotherDefaultValue;
}
set anotherDefaultValue(v: string) {
this._anotherDefaultValue = v;
}
_anotherDefaultValue = 'Another default value';
/** Test null default value. */
@Input()
public aNullValue: string | null = null;
/** Test null default value. */
@Input()
public anUndefinedValue: undefined;
/** Test numeric default value. */
@Input()
public aNumericValue = 123;
/** Appearance style of the button. */
@Input()
public appearance: 'primary' | 'secondary' = 'secondary';
/** Sets the button to a disabled state. */
@Input()
public isDisabled = false;
/** Specify the accent-type of the button */
@Input()
public accent: ButtonAccent = ButtonAccent.Normal;
/**
* Specifies some arbitrary object. This comment is to test certain chars like apostrophes - it's
* working
*/
@Input() public someDataObject!: ISomeInterface;
/**
* The inner text of the button.
*
* @required
*/
@Input()
public label!: string;
/** Size of the button. */
@Input()
public size?: ButtonSize = 'medium';
/**
* Some input you shouldn't use.
*
* @deprecated
*/
@Input()
public somethingYouShouldNotUse = false;
/**
* Handler to be called when the button is clicked by a user.
*
* Will also block the emission of the event if `isDisabled` is true.
*/
@Output()
public onClick = new EventEmitter<Event>();
/**
* This is an internal method that we don't want to document and have added the `ignore`
* annotation to.
*
* @ignore
*/
public handleClick(event: Event) {
event.stopPropagation();
if (!this.isDisabled) {
this.onClick.emit(event);
}
}
private _inputValue = 'some value';
/** Setter for `inputValue` that is also an `@Input`. */
@Input()
public set inputValue(value: string) {
this._inputValue = value;
}
/** Getter for `inputValue`. */
public get inputValue() {
return this._inputValue;
}
@HostListener('click', ['$event'])
onClickListener(event: Event) {
console.log('button', event.target);
this.handleClick(event);
}
@HostBinding('class.focused') focus = false;
/**
* Returns all the CSS classes for the button.
*
* @ignore
*/
public get classes(): string[] {
return [this.appearance, this.size]
.filter((_class) => !!_class)
.map((_class) => `btn-${_class}`);
}
/** @ignore */
public ignoredProperty = 'Ignore me';
/** Public value. */
public internalProperty = 'Public hello';
/** Private value. */
private _value = 'Private hello';
/** Set the private value. */
public set value(value: string | number) {
this._value = `${value}`;
}
/** Get the private value. */
public get value(): string | number {
return this._value;
}
/**
* An internal calculation method which adds `x` and `y` together.
*
* @param x Some number you'd like to use.
* @param y Some other number or string you'd like to use, will have `parseInt()` applied before
* calculation.
*/
public calc(x: number, y: string | number): number {
return x + parseInt(`${y}`, 10);
}
/** A public method using an interface. */
public publicMethod(things: ISomeInterface) {
console.log(things);
}
/**
* A protected method.
*
* @param id Some `id`.
*/
protected protectedMethod(id?: number) {
console.log(id);
}
/**
* A private method.
*
* @param password Some `password`.
*/
private privateMethod(password: string) {
console.log(password);
}
@Input('showKeyAlias')
public showKey!: keyof T;
@Input()
public set item(item: T[]) {
this.processedItem = item;
}
public processedItem!: T[];
}
```
|
"Monsters" is a song recorded by Macedonian singer and songwriter Tamara Todevska for her upcoming third studio album. It was written by Kosta Petrov and produced by Darko Dimitrov, Lazar Cvetkovski and Robert Bilbilov. The song was released as a single through Dimitrov on 24 November 2019.
Tamara performed the song for the first time at the 21st edition of Kënga Magjike on 24 November 2019. She performed the song for the second time in the second semi-final on 5 December 2019 and finished fifth overall in the grand final on 7 December 2019. She additionally won the award for the Best Big International Artist.
See also
Kënga Magjike 2019
References
2019 singles
2019 songs
Kënga Magjike songs
Song recordings produced by Darko Dimitrov
|
Shay Shelnutt (born September 21, 1967) is an American politician and current member of the Alabama State Senate, representing the 17th District.
Alabama Senate
2014 election
On February 3, 2014, Shelnutt announced that he would be running for the District 17 seat in the Alabama State Senate, which would be vacated by Scott Beason.
Shelnutt would go on to win the run-off election for the Republican primary on July 16.
In May 2019, he voted to make abortion a crime at any stage in a pregnancy, with no exemptions for cases of rape or incest.
Committee assignments
Banking and Insurance
Confirmations
Education & Youth Affairs
Governmental Affairs
Local Legislation Jefferson County
Personal
Shelnutt competed on an episode of Family Feud that originally aired October 12, 2015.
References
External links
1967 births
Living people
Republican Party Alabama state senators
Politicians from Birmingham, Alabama
21st-century American politicians
|
```c
/*
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Guido van Rossum.
*
* 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 University 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 REGENTS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)glob.c 8.3 (Berkeley) 10/13/93";
/* most changes between the version above and the one below have been ported:
static char sscsid[]= "$OpenBSD: glob.c,v 1.8.10.1 2001/04/10 jason Exp $";
*/
#endif /* LIBC_SCCS and not lint */
/*
* glob(3) -- a superset of the one defined in POSIX 1003.2.
*
* The [!...] convention to negate a range is supported (SysV, Posix, ksh).
*
* Optional extra services, controlled by flags not defined by POSIX:
*
* GLOB_QUOTE:
* Escaping convention: \ inhibits any special meaning the following
* character might have (except \ at end of string is retained).
* GLOB_MAGCHAR:
* Set in gl_flags if pattern contained a globbing character.
* GLOB_NOMAGIC:
* Same as GLOB_NOCHECK, but it will only append pattern if it did
* not contain any magic characters. [Used in csh style globbing]
* GLOB_ALTDIRFUNC:
* Use alternately specified directory access functions.
* GLOB_TILDE:
* expand ~user/foo to the /home/dir/of/user/foo
* GLOB_BRACE:
* expand {1,2}{a,b} to 1a 1b 2a 2b
* gl_matchc:
* Number of matches in the current invocation of glob.
* GLOB_ALPHASORT:
* sort alphabetically like csh (case doesn't matter) instead of in ASCII
* order
*/
#include <EXTERN.h>
#include <perl.h>
#include <XSUB.h>
#include "bsd_glob.h"
#ifdef I_PWD
# include <pwd.h>
#else
#if defined(HAS_PASSWD) && !defined(VMS)
struct passwd *getpwnam(char *);
struct passwd *getpwuid(Uid_t);
#endif
#endif
#ifndef MAXPATHLEN
# ifdef PATH_MAX
# define MAXPATHLEN PATH_MAX
# else
# define MAXPATHLEN 1024
# endif
#endif
#include <limits.h>
#ifndef ARG_MAX
# ifdef _SC_ARG_MAX
# define ARG_MAX (sysconf(_SC_ARG_MAX))
# else
# ifdef _POSIX_ARG_MAX
# define ARG_MAX _POSIX_ARG_MAX
# else
# ifdef WIN32
# define ARG_MAX 14500 /* from VC's limits.h */
# else
# define ARG_MAX 4096 /* from POSIX, be conservative */
# endif
# endif
# endif
#endif
#define BG_DOLLAR '$'
#define BG_DOT '.'
#define BG_EOS '\0'
#define BG_LBRACKET '['
#define BG_NOT '!'
#define BG_QUESTION '?'
#define BG_QUOTE '\\'
#define BG_RANGE '-'
#define BG_RBRACKET ']'
#define BG_SEP '/'
#ifdef DOSISH
#define BG_SEP2 '\\'
#endif
#define BG_STAR '*'
#define BG_TILDE '~'
#define BG_UNDERSCORE '_'
#define BG_LBRACE '{'
#define BG_RBRACE '}'
#define BG_SLASH '/'
#define BG_COMMA ','
#ifndef GLOB_DEBUG
#define M_QUOTE 0x8000
#define M_PROTECT 0x4000
#define M_MASK 0xffff
#define M_ASCII 0x00ff
typedef U16 Char;
#else
#define M_QUOTE 0x80
#define M_PROTECT 0x40
#define M_MASK 0xff
#define M_ASCII 0x7f
typedef U8 Char;
#endif /* !GLOB_DEBUG */
#define CHAR(c) ((Char)((c)&M_ASCII))
#define META(c) ((Char)((c)|M_QUOTE))
#define M_ALL META('*')
#define M_END META(']')
#define M_NOT META('!')
#define M_ONE META('?')
#define M_RNG META('-')
#define M_SET META('[')
#define ismeta(c) (((c)&M_QUOTE) != 0)
static int compare(const void *, const void *);
static int ci_compare(const void *, const void *);
static int g_Ctoc(const Char *, char *, STRLEN);
static int g_lstat(Char *, Stat_t *, glob_t *);
static DIR *g_opendir(Char *, glob_t *);
static Char *g_strchr(Char *, int);
static int g_stat(Char *, Stat_t *, glob_t *);
static int glob0(const Char *, glob_t *);
static int glob1(Char *, Char *, glob_t *, size_t *);
static int glob2(Char *, Char *, Char *, Char *, Char *, Char *,
glob_t *, size_t *);
static int glob3(Char *, Char *, Char *, Char *, Char *,
Char *, Char *, glob_t *, size_t *);
static int globextend(const Char *, glob_t *, size_t *);
static const Char *
globtilde(const Char *, Char *, size_t, glob_t *);
static int globexp1(const Char *, glob_t *);
static int globexp2(const Char *, const Char *, glob_t *, int *);
static int match(Char *, Char *, Char *, int);
#ifdef GLOB_DEBUG
static void qprintf(const char *, Char *);
#endif /* GLOB_DEBUG */
#ifdef MULTIPLICITY
static Direntry_t * my_readdir(DIR*);
static Direntry_t *
my_readdir(DIR *d)
{
return PerlDir_read(d);
}
#else
/* ReliantUNIX (OS formerly known as SINIX) defines readdir
* in LFS-mode to be a 64-bit version of readdir. */
# ifdef sinix
static Direntry_t * my_readdir(DIR*);
static Direntry_t *
my_readdir(DIR *d)
{
return readdir(d);
}
# else
# define my_readdir readdir
# endif
#endif
int
bsd_glob(const char *pattern, int flags,
int (*errfunc)(const char *, int), glob_t *pglob)
{
const U8 *patnext;
int c;
Char *bufnext, *bufend, patbuf[MAXPATHLEN];
patnext = (U8 *) pattern;
/* TODO: GLOB_APPEND / GLOB_DOOFFS aren't supported yet */
#if 0
if (!(flags & GLOB_APPEND)) {
pglob->gl_pathc = 0;
pglob->gl_pathv = NULL;
if (!(flags & GLOB_DOOFFS))
pglob->gl_offs = 0;
}
#else
pglob->gl_pathc = 0;
pglob->gl_pathv = NULL;
pglob->gl_offs = 0;
#endif
pglob->gl_flags = flags & ~GLOB_MAGCHAR;
pglob->gl_errfunc = errfunc;
pglob->gl_matchc = 0;
bufnext = patbuf;
bufend = bufnext + MAXPATHLEN - 1;
#ifdef DOSISH
/* Nasty hack to treat patterns like "C:*" correctly. In this
* case, the * should match any file in the current directory
* on the C: drive. However, the glob code does not treat the
* colon specially, so it looks for files beginning "C:" in
* the current directory. To fix this, change the pattern to
* add an explicit "./" at the start (just after the drive
* letter and colon - ie change to "C:./").
*/
if (isalpha(pattern[0]) && pattern[1] == ':' &&
pattern[2] != BG_SEP && pattern[2] != BG_SEP2 &&
bufend - bufnext > 4) {
*bufnext++ = pattern[0];
*bufnext++ = ':';
*bufnext++ = '.';
*bufnext++ = BG_SEP;
patnext += 2;
}
#endif
if (flags & GLOB_QUOTE) {
/* Protect the quoted characters. */
while (bufnext < bufend && (c = *patnext++) != BG_EOS)
if (c == BG_QUOTE) {
#ifdef DOSISH
/* To avoid backslashitis on Win32,
* we only treat \ as a quoting character
* if it precedes one of the
* metacharacters []-{}~\
*/
if ((c = *patnext++) != '[' && c != ']' &&
c != '-' && c != '{' && c != '}' &&
c != '~' && c != '\\') {
#else
if ((c = *patnext++) == BG_EOS) {
#endif
c = BG_QUOTE;
--patnext;
}
*bufnext++ = c | M_PROTECT;
} else
*bufnext++ = c;
} else
while (bufnext < bufend && (c = *patnext++) != BG_EOS)
*bufnext++ = c;
*bufnext = BG_EOS;
if (flags & GLOB_BRACE)
return globexp1(patbuf, pglob);
else
return glob0(patbuf, pglob);
}
/*
* Expand recursively a glob {} pattern. When there is no more expansion
* invoke the standard globbing routine to glob the rest of the magic
* characters
*/
static int
globexp1(const Char *pattern, glob_t *pglob)
{
const Char* ptr = pattern;
int rv;
/* Protect a single {}, for find(1), like csh */
if (pattern[0] == BG_LBRACE && pattern[1] == BG_RBRACE && pattern[2] == BG_EOS)
return glob0(pattern, pglob);
while ((ptr = (const Char *) g_strchr((Char *) ptr, BG_LBRACE)) != NULL)
if (!globexp2(ptr, pattern, pglob, &rv))
return rv;
return glob0(pattern, pglob);
}
/*
* Recursive brace globbing helper. Tries to expand a single brace.
* If it succeeds then it invokes globexp1 with the new pattern.
* If it fails then it tries to glob the rest of the pattern and returns.
*/
static int
globexp2(const Char *ptr, const Char *pattern,
glob_t *pglob, int *rv)
{
int i;
Char *lm, *ls;
const Char *pe, *pm, *pm1, *pl;
Char patbuf[MAXPATHLEN];
/* copy part up to the brace */
for (lm = patbuf, pm = pattern; pm != ptr; *lm++ = *pm++)
;
*lm = BG_EOS;
ls = lm;
/* Find the balanced brace */
for (i = 0, pe = ++ptr; *pe; pe++)
if (*pe == BG_LBRACKET) {
/* Ignore everything between [] */
for (pm = pe++; *pe != BG_RBRACKET && *pe != BG_EOS; pe++)
;
if (*pe == BG_EOS) {
/*
* We could not find a matching BG_RBRACKET.
* Ignore and just look for BG_RBRACE
*/
pe = pm;
}
} else if (*pe == BG_LBRACE)
i++;
else if (*pe == BG_RBRACE) {
if (i == 0)
break;
i--;
}
/* Non matching braces; just glob the pattern */
if (i != 0 || *pe == BG_EOS) {
*rv = glob0(patbuf, pglob);
return 0;
}
for (i = 0, pl = pm = ptr; pm <= pe; pm++) {
switch (*pm) {
case BG_LBRACKET:
/* Ignore everything between [] */
for (pm1 = pm++; *pm != BG_RBRACKET && *pm != BG_EOS; pm++)
;
if (*pm == BG_EOS) {
/*
* We could not find a matching BG_RBRACKET.
* Ignore and just look for BG_RBRACE
*/
pm = pm1;
}
break;
case BG_LBRACE:
i++;
break;
case BG_RBRACE:
if (i) {
i--;
break;
}
/* FALLTHROUGH */
case BG_COMMA:
if (i && *pm == BG_COMMA)
break;
else {
/* Append the current string */
for (lm = ls; (pl < pm); *lm++ = *pl++)
;
/*
* Append the rest of the pattern after the
* closing brace
*/
for (pl = pe + 1; (*lm++ = *pl++) != BG_EOS; )
;
/* Expand the current pattern */
#ifdef GLOB_DEBUG
qprintf("globexp2:", patbuf);
#endif /* GLOB_DEBUG */
*rv = globexp1(patbuf, pglob);
/* move after the comma, to the next string */
pl = pm + 1;
}
break;
default:
break;
}
}
*rv = 0;
return 0;
}
/*
* expand tilde from the passwd file.
*/
static const Char *
globtilde(const Char *pattern, Char *patbuf, size_t patbuf_len, glob_t *pglob)
{
char *h;
const Char *p;
Char *b, *eb;
if (*pattern != BG_TILDE || !(pglob->gl_flags & GLOB_TILDE))
return pattern;
/* Copy up to the end of the string or / */
eb = &patbuf[patbuf_len - 1];
for (p = pattern + 1, h = (char *) patbuf;
h < (char*)eb && *p && *p != BG_SLASH; *h++ = (char)*p++)
;
*h = BG_EOS;
#if 0
if (h == (char *)eb)
return what;
#endif
if (((char *) patbuf)[0] == BG_EOS) {
/*
* handle a plain ~ or ~/ by expanding $HOME
* first and then trying the password file
* or $USERPROFILE on DOSISH systems
*/
if ((h = PerlEnv_getenv("HOME")) == NULL) {
#ifdef HAS_PASSWD
struct passwd *pwd;
if ((pwd = getpwuid(getuid())) == NULL)
return pattern;
else
h = pwd->pw_dir;
#elif DOSISH
/*
* When no passwd file, fallback to the USERPROFILE
* environment variable on DOSish systems.
*/
if ((h = PerlEnv_getenv("USERPROFILE")) == NULL) {
return pattern;
}
#else
return pattern;
#endif
}
} else {
/*
* Expand a ~user
*/
#ifdef HAS_PASSWD
struct passwd *pwd;
if ((pwd = getpwnam((char*) patbuf)) == NULL)
return pattern;
else
h = pwd->pw_dir;
#else
return pattern;
#endif
}
/* Copy the home directory */
for (b = patbuf; b < eb && *h; *b++ = *h++)
;
/* Append the rest of the pattern */
while (b < eb && (*b++ = *p++) != BG_EOS)
;
*b = BG_EOS;
return patbuf;
}
/*
* The main glob() routine: compiles the pattern (optionally processing
* quotes), calls glob1() to do the real pattern matching, and finally
* sorts the list (unless unsorted operation is requested). Returns 0
* if things went well, nonzero if errors occurred. It is not an error
* to find no matches.
*/
static int
glob0(const Char *pattern, glob_t *pglob)
{
const Char *qpat, *qpatnext;
int c, err, oldflags, oldpathc;
Char *bufnext, patbuf[MAXPATHLEN];
size_t limit = 0;
qpat = globtilde(pattern, patbuf, MAXPATHLEN, pglob);
qpatnext = qpat;
oldflags = pglob->gl_flags;
oldpathc = pglob->gl_pathc;
bufnext = patbuf;
/* We don't need to check for buffer overflow any more. */
while ((c = *qpatnext++) != BG_EOS) {
switch (c) {
case BG_LBRACKET:
c = *qpatnext;
if (c == BG_NOT)
++qpatnext;
if (*qpatnext == BG_EOS ||
g_strchr((Char *) qpatnext+1, BG_RBRACKET) == NULL) {
*bufnext++ = BG_LBRACKET;
if (c == BG_NOT)
--qpatnext;
break;
}
*bufnext++ = M_SET;
if (c == BG_NOT)
*bufnext++ = M_NOT;
c = *qpatnext++;
do {
*bufnext++ = CHAR(c);
if (*qpatnext == BG_RANGE &&
(c = qpatnext[1]) != BG_RBRACKET) {
*bufnext++ = M_RNG;
*bufnext++ = CHAR(c);
qpatnext += 2;
}
} while ((c = *qpatnext++) != BG_RBRACKET);
pglob->gl_flags |= GLOB_MAGCHAR;
*bufnext++ = M_END;
break;
case BG_QUESTION:
pglob->gl_flags |= GLOB_MAGCHAR;
*bufnext++ = M_ONE;
break;
case BG_STAR:
pglob->gl_flags |= GLOB_MAGCHAR;
/* Collapse adjacent stars to one.
* This is required to ensure that a pattern like
* "a**" matches a name like "a", as without this
* check when the first star matched everything it would
* cause the second star to return a match fail.
* As long ** is folded here this does not happen.
*/
if (bufnext == patbuf || bufnext[-1] != M_ALL)
*bufnext++ = M_ALL;
break;
default:
*bufnext++ = CHAR(c);
break;
}
}
*bufnext = BG_EOS;
#ifdef GLOB_DEBUG
qprintf("glob0:", patbuf);
#endif /* GLOB_DEBUG */
if ((err = glob1(patbuf, patbuf+MAXPATHLEN-1, pglob, &limit)) != 0) {
pglob->gl_flags = oldflags;
return(err);
}
/*
* If there was no match we are going to append the pattern
* if GLOB_NOCHECK was specified or if GLOB_NOMAGIC was specified
* and the pattern did not contain any magic characters
* GLOB_NOMAGIC is there just for compatibility with csh.
*/
if (pglob->gl_pathc == oldpathc &&
((pglob->gl_flags & GLOB_NOCHECK) ||
((pglob->gl_flags & GLOB_NOMAGIC) &&
!(pglob->gl_flags & GLOB_MAGCHAR))))
{
#ifdef GLOB_DEBUG
printf("calling globextend from glob0\n");
#endif /* GLOB_DEBUG */
pglob->gl_flags = oldflags;
return(globextend(qpat, pglob, &limit));
}
else if (!(pglob->gl_flags & GLOB_NOSORT))
if (pglob->gl_pathv)
qsort(pglob->gl_pathv + pglob->gl_offs + oldpathc,
pglob->gl_pathc - oldpathc, sizeof(char *),
(pglob->gl_flags & (GLOB_ALPHASORT|GLOB_NOCASE))
? ci_compare : compare);
pglob->gl_flags = oldflags;
return(0);
}
static int
ci_compare(const void *p, const void *q)
{
const char *pp = *(const char **)p;
const char *qq = *(const char **)q;
int ci;
while (*pp && *qq) {
if (toFOLD(*pp) != toFOLD(*qq))
break;
++pp;
++qq;
}
ci = toFOLD(*pp) - toFOLD(*qq);
if (ci == 0)
return compare(p, q);
return ci;
}
static int
compare(const void *p, const void *q)
{
return(strcmp(*(char **)p, *(char **)q));
}
static int
glob1(Char *pattern, Char *pattern_last, glob_t *pglob, size_t *limitp)
{
Char pathbuf[MAXPATHLEN];
assert(pattern < pattern_last);
/* A null pathname is invalid -- POSIX 1003.1 sect. 2.4. */
if (*pattern == BG_EOS)
return(0);
return(glob2(pathbuf, pathbuf+MAXPATHLEN-1,
pathbuf, pathbuf+MAXPATHLEN-1,
pattern, pattern_last, pglob, limitp));
}
/*
* The functions glob2 and glob3 are mutually recursive; there is one level
* of recursion for each segment in the pattern that contains one or more
* meta characters.
*/
static int
glob2(Char *pathbuf, Char *pathbuf_last, Char *pathend, Char *pathend_last,
Char *pattern, Char *pattern_last, glob_t *pglob, size_t *limitp)
{
Stat_t sb;
Char *p, *q;
int anymeta;
assert(pattern < pattern_last);
/*
* Loop over pattern segments until end of pattern or until
* segment with meta character found.
*/
for (anymeta = 0;;) {
if (*pattern == BG_EOS) { /* End of pattern? */
*pathend = BG_EOS;
if (g_lstat(pathbuf, &sb, pglob))
return(0);
if (((pglob->gl_flags & GLOB_MARK) &&
pathend[-1] != BG_SEP
#ifdef DOSISH
&& pathend[-1] != BG_SEP2
#endif
) && (S_ISDIR(sb.st_mode) ||
(S_ISLNK(sb.st_mode) &&
(g_stat(pathbuf, &sb, pglob) == 0) &&
S_ISDIR(sb.st_mode)))) {
if (pathend+1 > pathend_last)
return (1);
*pathend++ = BG_SEP;
*pathend = BG_EOS;
}
++pglob->gl_matchc;
#ifdef GLOB_DEBUG
printf("calling globextend from glob2\n");
#endif /* GLOB_DEBUG */
return(globextend(pathbuf, pglob, limitp));
}
/* Find end of next segment, copy tentatively to pathend. */
q = pathend;
p = pattern;
while (*p != BG_EOS && *p != BG_SEP
#ifdef DOSISH
&& *p != BG_SEP2
#endif
) {
assert(p < pattern_last);
if (ismeta(*p))
anymeta = 1;
if (q+1 > pathend_last)
return (1);
*q++ = *p++;
}
if (!anymeta) { /* No expansion, do next segment. */
pathend = q;
pattern = p;
while (*pattern == BG_SEP
#ifdef DOSISH
|| *pattern == BG_SEP2
#endif
) {
assert(p < pattern_last);
if (pathend+1 > pathend_last)
return (1);
*pathend++ = *pattern++;
}
} else
/* Need expansion, recurse. */
return(glob3(pathbuf, pathbuf_last, pathend,
pathend_last, pattern,
p, pattern_last, pglob, limitp));
}
/* NOTREACHED */
}
static int
glob3(Char *pathbuf, Char *pathbuf_last, Char *pathend, Char *pathend_last,
Char *pattern,
Char *restpattern, Char *restpattern_last, glob_t *pglob, size_t *limitp)
{
Direntry_t *dp;
DIR *dirp;
int err;
int nocase;
char buf[MAXPATHLEN];
/*
* The readdirfunc declaration can't be prototyped, because it is
* assigned, below, to two functions which are prototyped in glob.h
* and dirent.h as taking pointers to differently typed opaque
* structures.
*/
Direntry_t *(*readdirfunc)(DIR*);
assert(pattern < restpattern_last);
assert(restpattern < restpattern_last);
if (pathend > pathend_last)
return (1);
*pathend = BG_EOS;
errno = 0;
#ifdef VMS
{
Char *q = pathend;
if (q - pathbuf > 5) {
q -= 5;
if (q[0] == '.' &&
tolower(q[1]) == 'd' && tolower(q[2]) == 'i' &&
tolower(q[3]) == 'r' && q[4] == '/')
{
q[0] = '/';
q[1] = BG_EOS;
pathend = q+1;
}
}
}
#endif
if ((dirp = g_opendir(pathbuf, pglob)) == NULL) {
/* TODO: don't call for ENOENT or ENOTDIR? */
if (pglob->gl_errfunc) {
if (g_Ctoc(pathbuf, buf, sizeof(buf)))
return (GLOB_ABEND);
if (pglob->gl_errfunc(buf, errno) ||
(pglob->gl_flags & GLOB_ERR))
return (GLOB_ABEND);
}
return(0);
}
err = 0;
nocase = ((pglob->gl_flags & GLOB_NOCASE) != 0);
/* Search directory for matching names. */
if (pglob->gl_flags & GLOB_ALTDIRFUNC)
readdirfunc = (Direntry_t *(*)(DIR *))pglob->gl_readdir;
else
readdirfunc = (Direntry_t *(*)(DIR *))my_readdir;
while ((dp = (*readdirfunc)(dirp))) {
U8 *sc;
Char *dc;
/* Initial BG_DOT must be matched literally. */
if (dp->d_name[0] == BG_DOT && *pattern != BG_DOT)
continue;
dc = pathend;
sc = (U8 *) dp->d_name;
while (dc < pathend_last && (*dc++ = *sc++) != BG_EOS)
;
if (dc >= pathend_last) {
*dc = BG_EOS;
err = 1;
break;
}
if (!match(pathend, pattern, restpattern, nocase)) {
*pathend = BG_EOS;
continue;
}
err = glob2(pathbuf, pathbuf_last, --dc, pathend_last,
restpattern, restpattern_last, pglob, limitp);
if (err)
break;
}
if (pglob->gl_flags & GLOB_ALTDIRFUNC)
(*pglob->gl_closedir)(dirp);
else
PerlDir_close(dirp);
return(err);
}
/*
* Extend the gl_pathv member of a glob_t structure to accommodate a new item,
* add the new item, and update gl_pathc.
*
* This assumes the BSD realloc, which only copies the block when its size
* crosses a power-of-two boundary; for v7 realloc, this would cause quadratic
* behavior.
*
* Return 0 if new item added, error code if memory couldn't be allocated.
*
* Invariant of the glob_t structure:
* Either gl_pathc is zero and gl_pathv is NULL; or gl_pathc > 0 and
* gl_pathv points to (gl_offs + gl_pathc + 1) items.
*/
static int
globextend(const Char *path, glob_t *pglob, size_t *limitp)
{
char **pathv;
int i;
STRLEN newsize, len;
char *copy;
const Char *p;
#ifdef GLOB_DEBUG
printf("Adding ");
for (p = path; *p; p++)
(void)printf("%c", CHAR(*p));
printf("\n");
#endif /* GLOB_DEBUG */
newsize = sizeof(*pathv) * (2 + pglob->gl_pathc + pglob->gl_offs);
if (pglob->gl_pathv)
pathv = Renew(pglob->gl_pathv,newsize,char*);
else
Newx(pathv,newsize,char*);
if (pathv == NULL) {
if (pglob->gl_pathv) {
Safefree(pglob->gl_pathv);
pglob->gl_pathv = NULL;
}
return(GLOB_NOSPACE);
}
if (pglob->gl_pathv == NULL && pglob->gl_offs > 0) {
/* first time around -- clear initial gl_offs items */
pathv += pglob->gl_offs;
for (i = pglob->gl_offs; --i >= 0; )
*--pathv = NULL;
}
pglob->gl_pathv = pathv;
for (p = path; *p++;)
;
len = (STRLEN)(p - path);
*limitp += len;
Newx(copy, p-path, char);
if (copy != NULL) {
if (g_Ctoc(path, copy, len)) {
Safefree(copy);
return(GLOB_NOSPACE);
}
pathv[pglob->gl_offs + pglob->gl_pathc++] = copy;
}
pathv[pglob->gl_offs + pglob->gl_pathc] = NULL;
if ((pglob->gl_flags & GLOB_LIMIT) &&
newsize + *limitp >= (unsigned long)ARG_MAX) {
errno = 0;
return(GLOB_NOSPACE);
}
return(copy == NULL ? GLOB_NOSPACE : 0);
}
/*
* pattern matching function for filenames using state machine to avoid
* recursion. We maintain a "nextp" and "nextn" to allow us to backtrack
* without additional callframes, and to do cleanly prune the backtracking
* state when multiple '*' (start) matches are included in the pattern.
*
* Thanks to Russ Cox for the improved state machine logic to avoid quadratic
* matching on failure.
*
* path_to_url
*
* An example would be a pattern
* ("a*" x 100) . "y"
* against a file name like
* ("a" x 100) . "x"
*
*/
static int
match(Char *name, Char *pat, Char *patend, int nocase)
{
int ok, negate_range;
Char c, k;
Char *nextp = NULL;
Char *nextn = NULL;
redo:
while (pat < patend) {
c = *pat++;
switch (c & M_MASK) {
case M_ALL:
if (pat == patend)
return(1);
if (*name == BG_EOS)
return 0;
nextn = name + 1;
nextp = pat - 1;
break;
case M_ONE:
/* since * matches leftmost-shortest first *
* if we encounter the EOS then backtracking *
* will not help, so we can exit early here. */
if (*name++ == BG_EOS)
return 0;
break;
case M_SET:
ok = 0;
/* since * matches leftmost-shortest first *
* if we encounter the EOS then backtracking *
* will not help, so we can exit early here. */
if ((k = *name++) == BG_EOS)
return 0;
if ((negate_range = ((*pat & M_MASK) == M_NOT)) != BG_EOS)
++pat;
while (((c = *pat++) & M_MASK) != M_END)
if ((*pat & M_MASK) == M_RNG) {
if (nocase) {
if (tolower(c) <= tolower(k) && tolower(k) <= tolower(pat[1]))
ok = 1;
} else {
if (c <= k && k <= pat[1])
ok = 1;
}
pat += 2;
} else if (nocase ? (tolower(c) == tolower(k)) : (c == k))
ok = 1;
if (ok == negate_range)
goto fail;
break;
default:
k = *name++;
if (nocase ? (tolower(k) != tolower(c)) : (k != c))
goto fail;
break;
}
}
if (*name == BG_EOS)
return 1;
fail:
if (nextn) {
pat = nextp;
name = nextn;
goto redo;
}
return 0;
}
/* Free allocated data belonging to a glob_t structure. */
void
bsd_globfree(glob_t *pglob)
{
int i;
char **pp;
if (pglob->gl_pathv != NULL) {
pp = pglob->gl_pathv + pglob->gl_offs;
for (i = pglob->gl_pathc; i--; ++pp)
if (*pp)
Safefree(*pp);
Safefree(pglob->gl_pathv);
pglob->gl_pathv = NULL;
}
}
static DIR *
g_opendir(Char *str, glob_t *pglob)
{
char buf[MAXPATHLEN];
if (!*str) {
my_strlcpy(buf, ".", sizeof(buf));
} else {
if (g_Ctoc(str, buf, sizeof(buf)))
return(NULL);
}
if (pglob->gl_flags & GLOB_ALTDIRFUNC)
return((DIR*)(*pglob->gl_opendir)(buf));
return(PerlDir_open(buf));
}
static int
g_lstat(Char *fn, Stat_t *sb, glob_t *pglob)
{
char buf[MAXPATHLEN];
if (g_Ctoc(fn, buf, sizeof(buf)))
return(-1);
if (pglob->gl_flags & GLOB_ALTDIRFUNC)
return((*pglob->gl_lstat)(buf, sb));
#ifdef HAS_LSTAT
return(PerlLIO_lstat(buf, sb));
#else
return(PerlLIO_stat(buf, sb));
#endif /* HAS_LSTAT */
}
static int
g_stat(Char *fn, Stat_t *sb, glob_t *pglob)
{
char buf[MAXPATHLEN];
if (g_Ctoc(fn, buf, sizeof(buf)))
return(-1);
if (pglob->gl_flags & GLOB_ALTDIRFUNC)
return((*pglob->gl_stat)(buf, sb));
return(PerlLIO_stat(buf, sb));
}
static Char *
g_strchr(Char *str, int ch)
{
do {
if (*str == ch)
return (str);
} while (*str++);
return (NULL);
}
static int
g_Ctoc(const Char *str, char *buf, STRLEN len)
{
while (len--) {
if ((*buf++ = (char)*str++) == BG_EOS)
return (0);
}
return (1);
}
#ifdef GLOB_DEBUG
static void
qprintf(const char *str, Char *s)
{
Char *p;
(void)printf("%s:\n", str);
for (p = s; *p; p++)
(void)printf("%c", CHAR(*p));
(void)printf("\n");
for (p = s; *p; p++)
(void)printf("%c", *p & M_PROTECT ? '"' : ' ');
(void)printf("\n");
for (p = s; *p; p++)
(void)printf("%c", ismeta(*p) ? '_' : ' ');
(void)printf("\n");
}
#endif /* GLOB_DEBUG */
```
|
Joan Ferrini-Mundy (born 1954) is a mathematics educator. Her research interests include calculus teaching and learning, mathematics teacher learning, and STEM education policy. She is currently the president of the University of Maine.
Career and research
Ferrini-Mundy earned a Ph.D. in mathematics education from the University of New Hampshire (UNH) in 1980 and spent two years there as a postdoctoral associate. After one year at Mount Holyoke College, she returned to UNH as a faculty member in mathematics until joining the faculty of Michigan State University in 1999. One year later, she chaired the writing group for Standards 2000, a publication from the National Council of Teachers of Mathematics.
In 2007, Ferrini-Mundy joined the National Science Foundation (NSF) as the director of the new Division of Research on Learning in Formal and Informal Settings in the Directorate for Education and Human Resources; she remained a faculty member at Michigan State until 2010. From 2007 to 2009, she served on the education subcommittee of the National Science and Technology Council.
In February 2011, Ferrini-Mundy became the assistant director of the National Science Foundation's Directorate for Education and Human Resources. In this strategic role, she set the NSF's direction for scientific education. In 2014 she was elected to the executive committee of the Association for Women in Mathematics for a 2-year term.
In June 2017, she was appointed the chief operating officer of the NSF. One year later, she left the NSF to become the 21st president of the University of Maine.
Awards and recognition
In 2000, Ferrini-Mundy was the recipient of the Association for Women in Mathematics' Louise Hay Award.
In 2011, Ferrini-Mundy was elected as a Fellow at the American Association for the Advancement of Science
She was elected to the 2018 class of fellows of the American Mathematical Society.
References
External links
American educators
American women mathematicians
Living people
1954 births
Fellows of the American Mathematical Society
University of New Hampshire alumni
Mount Holyoke College faculty
University of New Hampshire faculty
Michigan State University faculty
Presidents of the University of Maine
21st-century American women
Women heads of universities and colleges
|
The Church of Santo Domingo de Silos () is a church located in Millana, Spain. It was declared Bien de Interés Cultural in 1992.
References
Further reading
Bien de Interés Cultural landmarks in the Province of Guadalajara
Churches in the Province of Guadalajara
|
The Book of Air and Shadows is a thriller novel by Michael Gruber published in 2007.
Plot summary
Set concurrently in the 17th century and the current century, the novel is an intriguing and complex thriller based on the mystery of William Shakespeare. Jake Mishkin, a lonely and troubled lapsed Catholic intellectual property lawyer (though he is generally assumed to be Jewish-American despite his Waffen SS Officer grandfather) teams up with a young man, Albert Crosetti, who has taken a job at an antiquarian bookstore in the hope of saving enough to fund his studies at NYU film school. Together they hunt for Shakespeare's elusive lost manuscript.
References
2007 American novels
American thriller novels
Fiction set in the 1600s
|
```c
/**
* @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.
*/
#include "stdlib/blas/ext/base/dsortsh.h"
#include "stdlib/napi/export.h"
#include "stdlib/napi/argv.h"
#include "stdlib/napi/argv_int64.h"
#include "stdlib/napi/argv_double.h"
#include "stdlib/napi/argv_strided_float64array.h"
#include <node_api.h>
/**
* Receives JavaScript callback invocation data.
*
* @param env environment under which the function is invoked
* @param info callback data
* @return Node-API value
*/
static napi_value addon( napi_env env, napi_callback_info info ) {
STDLIB_NAPI_ARGV( env, info, argv, argc, 4 );
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
STDLIB_NAPI_ARGV_DOUBLE( env, order, argv, 1 );
STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 3 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, N, order, argv, 2 );
c_dsortsh( N, order, X, strideX );
return NULL;
}
STDLIB_NAPI_MODULE_EXPORT_FCN( addon )
```
|
```css
input[type="text"],
input[type="password"],
textarea,
textarea.form-control {
height: 50px;
margin: 0;
padding: 0 20px;
vertical-align: middle;
text-align: center;
background: #f8f8f8;
border: 1px solid #99bff785;
font-family: 'Roboto', sans-serif;
font-size: 16px;
font-weight: 300;
line-height: 50px;
color: #888;
-moz-border-radius: 25px; -webkit-border-radius: 25px; border-radius: 25px;
-moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none;
-o-transition: all .3s; -moz-transition: all .3s; -webkit-transition: all .3s; -ms-transition: all .3s; transition: all .3s;
}
textarea,
textarea.form-control {
padding-top: 10px;
padding-bottom: 10px;
line-height: 30px;
}
input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus,
textarea.form-control:focus {
outline: 0;
background: #fff;
border: 3px solid #ccc;
-moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none;
}
input[type="text"]:-moz-placeholder, input[type="password"]:-moz-placeholder,
textarea:-moz-placeholder, textarea.form-control:-moz-placeholder { color: #888; }
input[type="text"]:-ms-input-placeholder, input[type="password"]:-ms-input-placeholder,
textarea:-ms-input-placeholder, textarea.form-control:-ms-input-placeholder { color: #888; }
input[type="text"]::-webkit-input-placeholder, input[type="password"]::-webkit-input-placeholder,
textarea::-webkit-input-placeholder, textarea.form-control::-webkit-input-placeholder { color: #888; }
button.btn {
height: 50px;
margin: 0;
padding: 0 20px;
vertical-align: middle;
background: #248a48;
border: 0;
font-family: 'Roboto', sans-serif;
font-size: 16px;
font-weight: 300;
line-height: 50px;
color: #fff;
-moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px;
text-shadow: none;
-moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none;
-o-transition: all .3s; -moz-transition: all .3s; -webkit-transition: all .3s; -ms-transition: all .3s; transition: all .3s;
}
button.btn:hover { opacity: 0.6; color: #fff; }
button.btn:active { outline: 0; opacity: 0.6; color: #fff; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; }
button.btn:focus { outline: 0; opacity: 0.6; background: #0667d6; color: #fff; }
button.btn:active:focus, button.btn.active:focus { outline: 0; opacity: 0.6; background: #0667d6; color: #fff; }
```
|
```javascript
/**
* @license Apache-2.0
*
*
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
'use strict';
// MODULES //
var resolve = require( 'path' ).resolve;
var tape = require( 'tape' );
var isnan = require( '@stdlib/math/base/assert/is-nan' );
var PINF = require( '@stdlib/constants/float64/pinf' );
var NINF = require( '@stdlib/constants/float64/ninf' );
var EPS = require( '@stdlib/constants/float64/eps' );
var abs = require( '@stdlib/math/base/special/abs' );
var isPositiveZero = require( '@stdlib/math/base/assert/is-positive-zero' );
var tryRequire = require( '@stdlib/utils/try-require' );
// FIXTURES //
var veryLargePositive = require( './fixtures/julia/very_large_positive.json' );
var largePositive = require( './fixtures/julia/large_positive.json' );
var mediumPositive = require( './fixtures/julia/medium_positive.json' );
var smallPositive = require( './fixtures/julia/small_positive.json' );
var smaller = require( './fixtures/julia/smaller.json' );
var tinyPositive = require( './fixtures/julia/tiny_positive.json' );
var subnormal = require( './fixtures/julia/subnormal.json' );
// VARIABLES //
var log2 = tryRequire( resolve( __dirname, './../lib/native.js' ) );
var opts = {
'skip': ( log2 instanceof Error )
};
// TESTS //
tape( 'main export is a function', opts, function test( t ) {
t.ok( true, __filename );
t.strictEqual( typeof log2, 'function', 'main export is a function' );
t.end();
});
tape( 'the function evaluates the binary logarithm of `x` (very large positive values)', opts, function test( t ) {
var expected;
var delta;
var tol;
var x;
var y;
var i;
expected = veryLargePositive.expected;
x = veryLargePositive.x;
for ( i = 0; i < x.length; i++ ) {
y = log2( x[i] );
if ( y === expected[i] ) {
t.equal( y, expected[i], 'x: '+x[i]+', y: '+y+', expected: '+expected[i] );
} else {
delta = abs( y - expected[i] );
tol = EPS * abs( expected[i] );
t.equal( delta <= tol, true, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+expected[i]+'. : '+delta+'. Tolerance: '+tol+'.' );
}
}
t.end();
});
tape( 'the function evaluates the binary logarithm of `x` (large positive values)', opts, function test( t ) {
var expected;
var delta;
var tol;
var x;
var y;
var i;
expected = largePositive.expected;
x = largePositive.x;
for ( i = 0; i < x.length; i++ ) {
y = log2( x[i] );
if ( y === expected[i] ) {
t.equal( y, expected[i], 'x: '+x[i]+', y: '+y+', expected: '+expected[i] );
} else {
delta = abs( y - expected[i] );
tol = EPS * abs( expected[i] );
t.equal( delta <= tol, true, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+expected[i]+'. : '+delta+'. Tolerance: '+tol+'.' );
}
}
t.end();
});
tape( 'the function evaluates the binary logarithm of `x` (medium positive values)', opts, function test( t ) {
var expected;
var delta;
var tol;
var x;
var y;
var i;
expected = mediumPositive.expected;
x = mediumPositive.x;
for ( i = 0; i < x.length; i++ ) {
y = log2( x[i] );
if ( y === expected[i] ) {
t.equal( y, expected[i], 'x: '+x[i]+', y: '+y+', expected: '+expected[i] );
} else {
delta = abs( y - expected[i] );
tol = EPS * abs( expected[i] );
t.equal( delta <= tol, true, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+expected[i]+'. : '+delta+'. Tolerance: '+tol+'.' );
}
}
t.end();
});
tape( 'the function evaluates the binary logarithm of `x` (small positive values)', opts, function test( t ) {
var expected;
var delta;
var tol;
var x;
var y;
var i;
expected = smallPositive.expected;
x = smallPositive.x;
for ( i = 0; i < x.length; i++ ) {
y = log2( x[i] );
if ( y === expected[i] ) {
t.equal( y, expected[i], 'x: '+x[i]+', y: '+y+', expected: '+expected[i] );
} else {
delta = abs( y - expected[i] );
tol = EPS * abs( expected[i] );
t.equal( delta <= tol, true, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+expected[i]+'. : '+delta+'. Tolerance: '+tol+'.' );
}
}
t.end();
});
tape( 'the function evaluates the binary logarithm of `x` (smaller positive values)', opts, function test( t ) {
var expected;
var delta;
var tol;
var x;
var y;
var i;
expected = smaller.expected;
x = smaller.x;
for ( i = 0; i < x.length; i++ ) {
y = log2( x[i] );
if ( y === expected[i] ) {
t.equal( y, expected[i], 'x: '+x[i]+', y: '+y+', expected: '+expected[i] );
} else {
delta = abs( y - expected[i] );
tol = EPS * abs( expected[i] );
t.equal( delta <= tol, true, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+expected[i]+'. : '+delta+'. Tolerance: '+tol+'.' );
}
}
t.end();
});
tape( 'the function evaluates the binary logarithm of `x` (tiny positive values)', opts, function test( t ) {
var expected;
var delta;
var tol;
var x;
var y;
var i;
expected = tinyPositive.expected;
x = tinyPositive.x;
for ( i = 0; i < x.length; i++ ) {
y = log2( x[i] );
if ( y === expected[i] ) {
t.equal( y, expected[i], 'x: '+x[i]+', y: '+y+', expected: '+expected[i] );
} else {
delta = abs( y - expected[i] );
tol = EPS * abs( expected[i] );
t.equal( delta <= tol, true, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+expected[i]+'. : '+delta+'. Tolerance: '+tol+'.' );
}
}
t.end();
});
tape( 'the function evaluates the binary logarithm of `x` (subnormal values)', opts, function test( t ) {
var expected;
var delta;
var tol;
var x;
var y;
var i;
expected = subnormal.expected;
x = subnormal.x;
for ( i = 0; i < x.length; i++ ) {
y = log2( x[i] );
if ( y === expected[i] ) {
t.equal( y, expected[i], 'x: '+x[i]+', y: '+y+', expected: '+expected[i] );
} else {
delta = abs( y - expected[i] );
tol = EPS * abs( expected[i] );
t.equal( delta <= tol, true, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+expected[i]+'. : '+delta+'. Tolerance: '+tol+'.' );
}
}
t.end();
});
tape( 'the function returns `-infinity` if provided `0`', opts, function test( t ) {
t.equal( log2( 0.0 ), NINF, 'equals -infinity' );
t.end();
});
tape( 'the function returns `+infinity` if provided `+infinity`', opts, function test( t ) {
t.equal( log2( PINF ), PINF, 'equals +infinity' );
t.end();
});
tape( 'the function returns `NaN` if provided a negative number', opts, function test( t ) {
var v = log2( -1.0 );
t.equal( isnan( v ), true, 'returns NaN' );
t.end();
});
tape( 'the function returns positive zero if provided `1.0`', opts, function test( t ) {
var v = log2( 1.0 );
t.equal( isPositiveZero( v ), true, 'returns +0' );
t.end();
});
```
|
The Cuatro Vientos was a specially built Br.19 TF Super Bidon, which Mariano Barberán y Tros de Ilarduya, Lieutenant Joaquín Collar Serra and Sergeant Modesto Madariaga flew from Spain to Cuba in 1933. The flight, which took 39 hours and 55 minutes, departed Seville at 4:40 on 10 June 1933, and arrived in Camagüey at 20:45 (local time) on 11 June 1933, after a flight of .
On 20 June 1933, the aircraft departed for Mexico City, without Madariaga on board. It disappeared in flight, and was last sighted in the vicinity of Villahermosa, Mexico. No trace of the plane or of its occupants was subsequently found.
A replica of the Cuatro Vientos is housed at the Museo del Aire.
References
1933 in Cuba
1933 in Mexico
1933 in Spain
Missing aircraft
|
```css
.ui-widget{font-family:Lucida Grande,Lucida Sans,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget button,.ui-widget input,.ui-widget select,.ui-widget textarea{font-family:Lucida Grande,Lucida Sans,Arial,sans-serif;font-size:1em}.ui-widget.ui-widget-content{border:1px solid #aed0ea}.ui-widget-content{border:1px solid #ddd;background:url(images/ui-bg_highlight-hard_100_f2f5f7_1x100.png) 50% top repeat-x #f2f5f7;color:#362b36}.ui-widget-content a{color:#362b36}.ui-widget-header{border:1px solid #aed0ea;background:url(images/ui-bg_highlight-soft_100_deedf7_1x100.png) 50% 50% repeat-x #deedf7;color:#222;font-weight:700}.ui-widget-header a{color:#222}.ui-button,.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default,html .ui-button.ui-state-disabled:active,html .ui-button.ui-state-disabled:hover{border:1px solid #aed0ea;background:url(images/ui-bg_glass_80_d7ebf9_1x400.png) 50% 50% repeat-x #d7ebf9;font-weight:700;color:#2779aa}.ui-button,.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited,a.ui-button,a:link.ui-button,a:visited.ui-button{color:#2779aa;text-decoration:none}.ui-button:focus,.ui-button:hover,.ui-state-focus,.ui-state-hover,.ui-widget-content .ui-state-focus,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-focus,.ui-widget-header .ui-state-hover{border:1px solid #74b2e2;background:url(images/ui-bg_glass_100_e4f1fb_1x400.png) 50% 50% repeat-x #e4f1fb;font-weight:700;color:#0070a3}.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited,.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,a.ui-button:focus,a.ui-button:hover{color:#0070a3;text-decoration:none}.ui-visual-focus{box-shadow:0 0 3px 1px #5e9ed6}.ui-button.ui-state-active:hover,.ui-button:active,.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active,a.ui-button:active{border:1px solid #2694e8;background:url(images/ui-bg_glass_50_3baae3_1x400.png) 50% 50% repeat-x #3baae3;font-weight:700;color:#fff}.ui-icon-background,.ui-state-active .ui-icon-background{border:#2694e8;background-color:#fff}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#fff;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #f9dd34;background:url(images/ui-bg_highlight-soft_25_ffef8f_1x100.png) 50% top repeat-x #ffef8f;color:#363636}.ui-state-checked{border:1px solid #f9dd34;background:#ffef8f}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#cd0a0a;color:#fff}.ui-state-error a,.ui-state-error-text,.ui-widget-content .ui-state-error a,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error a,.ui-widget-header .ui-state-error-text{color:#fff}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:700}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:400}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon,.ui-widget-header .ui-icon{background-image:url(images/ui-icons_72a7cf_256x240.png)}.ui-button:focus .ui-icon,.ui-button:hover .ui-icon,.ui-state-focus .ui-icon,.ui-state-hover .ui-icon{background-image:url(images/ui-icons_2694e8_256x240.png)}.ui-button:active .ui-icon,.ui-state-active .ui-icon{background-image:url(images/ui-icons_ffffff_256x240.png)}.ui-button .ui-state-highlight.ui-icon,.ui-state-highlight .ui-icon{background-image:url(images/ui-icons_2e83ff_256x240.png)}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url(images/ui-icons_ffffff_256x240.png)}.ui-button .ui-icon{background-image:url(images/ui-icons_3d80b3_256x240.png)}.ui-icon-blank{background-position:16px 16px}.ui-icon-caret-1-n{background-position:0 0}.ui-icon-caret-1-ne{background-position:-16px 0}.ui-icon-caret-1-e{background-position:-32px 0}.ui-icon-caret-1-se{background-position:-48px 0}.ui-icon-caret-1-s{background-position:-65px 0}.ui-icon-caret-1-sw{background-position:-80px 0}.ui-icon-caret-1-w{background-position:-96px 0}.ui-icon-caret-1-nw{background-position:-112px 0}.ui-icon-caret-2-n-s{background-position:-128px 0}.ui-icon-caret-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-65px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-65px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:1px -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-first,.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-left,.ui-corner-tl,.ui-corner-top{border-top-left-radius:6px}.ui-corner-all,.ui-corner-right,.ui-corner-top,.ui-corner-tr{border-top-right-radius:6px}.ui-corner-all,.ui-corner-bl,.ui-corner-bottom,.ui-corner-left{border-bottom-left-radius:6px}.ui-corner-all,.ui-corner-bottom,.ui-corner-br,.ui-corner-right{border-bottom-right-radius:6px}.ui-widget-overlay{background:url(images/ui-bg_diagonals-thick_90_eeeeee_40x40.png) 50% 50% #eee;opacity:.8;filter:Alpha(Opacity=80)}.ui-widget-shadow{-webkit-box-shadow:-7px -7px 7px #000;box-shadow:-7px -7px 7px #000}
```
|
```python
from pydantic import BaseModel
from prowler.lib.logger import logger
from prowler.providers.aws.lib.service.service import AWSService
################## Macie
class Macie(AWSService):
def __init__(self, provider):
# Call AWSService's __init__
super().__init__("macie2", provider)
self.sessions = []
self.__threading_call__(self.__get_macie_session__)
def __get_session_arn_template__(self, region):
return f"arn:{self.audited_partition}:macie:{region}:{self.audited_account}:session"
def __get_macie_session__(self, regional_client):
logger.info("Macie - Get Macie Session...")
try:
self.sessions.append(
Session(
status=regional_client.get_macie_session()["status"],
region=regional_client.region,
)
)
except Exception as error:
if "Macie is not enabled" in str(error):
self.sessions.append(
Session(
status="DISABLED",
region=regional_client.region,
)
)
else:
logger.error(
f"{regional_client.region} -- {error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}"
)
class Session(BaseModel):
status: str
region: str
```
|
```javascript
import {
conditionalGroup,
cursor,
fill,
group,
hardline,
ifBreak,
indent,
join,
line,
lineSuffixBoundary,
softline,
} from "../../document/builders.js";
import { replaceEndOfLine, willBreak } from "../../document/utils.js";
import {
printComments,
printDanglingComments,
} from "../../main/comments/print.js";
import getPreferredQuote from "../../utils/get-preferred-quote.js";
import UnexpectedNodeError from "../../utils/unexpected-node-error.js";
import WhitespaceUtils from "../../utils/whitespace-utils.js";
import { willPrintOwnComments } from "../comments/printer-methods.js";
import pathNeedsParens from "../needs-parens.js";
import {
CommentCheckFlags,
hasComment,
hasNodeIgnoreComment,
isArrayOrTupleExpression,
isBinaryish,
isCallExpression,
isJsxElement,
isObjectOrRecordExpression,
isStringLiteral,
rawText,
} from "../utils/index.js";
/*
Only the following are treated as whitespace inside JSX.
- U+0020 SPACE
- U+000A LF
- U+000D CR
- U+0009 TAB
*/
const jsxWhitespaceUtils = new WhitespaceUtils(" \n\r\t");
const isEmptyStringOrAnyLine = (doc) =>
doc === "" || doc === line || doc === hardline || doc === softline;
/**
* @typedef {import("../../common/ast-path.js").default} AstPath
* @typedef {import("../types/estree.js").Node} Node
* @typedef {import("../types/estree.js").JSXElement} JSXElement
* @typedef {import("../../document/builders.js").Doc} Doc
*/
// JSX expands children from the inside-out, instead of the outside-in.
// This is both to break children before attributes,
// and to ensure that when children break, their parents do as well.
//
// Any element that is written without any newlines and fits on a single line
// is left that way.
// Not only that, any user-written-line containing multiple JSX siblings
// should also be kept on one line if possible,
// so each user-written-line is wrapped in its own group.
//
// Elements that contain newlines or don't fit on a single line (recursively)
// are fully-split, using hardline and shouldBreak: true.
//
// To support that case properly, all leading and trailing spaces
// are stripped from the list of children, and replaced with a single hardline.
function printJsxElementInternal(path, options, print) {
const { node } = path;
if (node.type === "JSXElement" && isEmptyJsxElement(node)) {
return [print("openingElement"), print("closingElement")];
}
const openingLines =
node.type === "JSXElement"
? print("openingElement")
: print("openingFragment");
const closingLines =
node.type === "JSXElement"
? print("closingElement")
: print("closingFragment");
if (
node.children.length === 1 &&
node.children[0].type === "JSXExpressionContainer" &&
(node.children[0].expression.type === "TemplateLiteral" ||
node.children[0].expression.type === "TaggedTemplateExpression")
) {
return [openingLines, ...path.map(print, "children"), closingLines];
}
// Convert `{" "}` to text nodes containing a space.
// This makes it easy to turn them into `jsxWhitespace` which
// can then print as either a space or `{" "}` when breaking.
node.children = node.children.map((child) => {
if (isJsxWhitespaceExpression(child)) {
return {
type: "JSXText",
value: " ",
raw: " ",
};
}
return child;
});
const containsTag = node.children.some(isJsxElement);
const containsMultipleExpressions =
node.children.filter((child) => child.type === "JSXExpressionContainer")
.length > 1;
const containsMultipleAttributes =
node.type === "JSXElement" && node.openingElement.attributes.length > 1;
// Record any breaks. Should never go from true to false, only false to true.
let forcedBreak =
willBreak(openingLines) ||
containsTag ||
containsMultipleAttributes ||
containsMultipleExpressions;
const isMdxBlock = path.parent.rootMarker === "mdx";
const rawJsxWhitespace = options.singleQuote ? "{' '}" : '{" "}';
const jsxWhitespace = isMdxBlock
? " "
: ifBreak([rawJsxWhitespace, softline], " ");
const isFacebookTranslationTag = node.openingElement?.name?.name === "fbt";
const children = printJsxChildren(
path,
options,
print,
jsxWhitespace,
isFacebookTranslationTag,
);
const containsText = node.children.some((child) =>
isMeaningfulJsxText(child),
);
// We can end up we multiple whitespace elements with empty string
// content between them.
// We need to remove empty whitespace and softlines before JSX whitespace
// to get the correct output.
for (let i = children.length - 2; i >= 0; i--) {
const isPairOfEmptyStrings = children[i] === "" && children[i + 1] === "";
const isPairOfHardlines =
children[i] === hardline &&
children[i + 1] === "" &&
children[i + 2] === hardline;
const isLineFollowedByJsxWhitespace =
(children[i] === softline || children[i] === hardline) &&
children[i + 1] === "" &&
children[i + 2] === jsxWhitespace;
const isJsxWhitespaceFollowedByLine =
children[i] === jsxWhitespace &&
children[i + 1] === "" &&
(children[i + 2] === softline || children[i + 2] === hardline);
const isDoubleJsxWhitespace =
children[i] === jsxWhitespace &&
children[i + 1] === "" &&
children[i + 2] === jsxWhitespace;
const isPairOfHardOrSoftLines =
(children[i] === softline &&
children[i + 1] === "" &&
children[i + 2] === hardline) ||
(children[i] === hardline &&
children[i + 1] === "" &&
children[i + 2] === softline);
if (
(isPairOfHardlines && containsText) ||
isPairOfEmptyStrings ||
isLineFollowedByJsxWhitespace ||
isDoubleJsxWhitespace ||
isPairOfHardOrSoftLines
) {
children.splice(i, 2);
} else if (isJsxWhitespaceFollowedByLine) {
children.splice(i + 1, 2);
}
}
// Trim trailing lines (or empty strings)
while (children.length > 0 && isEmptyStringOrAnyLine(children.at(-1))) {
children.pop();
}
// Trim leading lines (or empty strings)
while (
children.length > 1 &&
isEmptyStringOrAnyLine(children[0]) &&
isEmptyStringOrAnyLine(children[1])
) {
children.shift();
children.shift();
}
// Tweak how we format children if outputting this element over multiple lines.
// Also detect whether we will force this element to output over multiple lines.
const multilineChildren = [];
for (const [i, child] of children.entries()) {
// There are a number of situations where we need to ensure we display
// whitespace as `{" "}` when outputting this element over multiple lines.
if (child === jsxWhitespace) {
if (i === 1 && children[i - 1] === "") {
if (children.length === 2) {
// Solitary whitespace
multilineChildren.push(rawJsxWhitespace);
continue;
}
// Leading whitespace
multilineChildren.push([rawJsxWhitespace, hardline]);
continue;
} else if (i === children.length - 1) {
// Trailing whitespace
multilineChildren.push(rawJsxWhitespace);
continue;
} else if (children[i - 1] === "" && children[i - 2] === hardline) {
// Whitespace after line break
multilineChildren.push(rawJsxWhitespace);
continue;
}
}
multilineChildren.push(child);
if (willBreak(child)) {
forcedBreak = true;
}
}
// If there is text we use `fill` to fit as much onto each line as possible.
// When there is no text (just tags and expressions) we use `group`
// to output each on a separate line.
/** @type {Doc} */
let content = containsText
? fill(multilineChildren)
: group(multilineChildren, { shouldBreak: true });
/*
`printJsxChildren` won't call `print` on `JSXText`
When the cursorNode is inside `cursor` won't get print.
*/
if (
options.cursorNode?.type === "JSXText" &&
node.children.includes(options.cursorNode)
) {
content = [cursor, content, cursor];
}
if (isMdxBlock) {
return content;
}
const multiLineElem = group([
openingLines,
indent([hardline, content]),
hardline,
closingLines,
]);
if (forcedBreak) {
return multiLineElem;
}
return conditionalGroup([
group([openingLines, ...children, closingLines]),
multiLineElem,
]);
}
// JSX Children are strange, mostly for two reasons:
// 1. JSX reads newlines into string values, instead of skipping them like JS
// 2. up to one whitespace between elements within a line is significant,
// but not between lines.
//
// Leading, trailing, and lone whitespace all need to
// turn themselves into the rather ugly `{' '}` when breaking.
//
// We print JSX using the `fill` doc primitive.
// This requires that we give it an array of alternating
// content and whitespace elements.
// To ensure this we add dummy `""` content elements as needed.
function printJsxChildren(
path,
options,
print,
jsxWhitespace,
isFacebookTranslationTag,
) {
const parts = [];
path.each(({ node, next }) => {
if (node.type === "JSXText") {
const text = rawText(node);
// Contains a non-whitespace character
if (isMeaningfulJsxText(node)) {
const words = jsxWhitespaceUtils.split(
text,
/* captureWhitespace */ true,
);
// Starts with whitespace
if (words[0] === "") {
parts.push("");
words.shift();
if (/\n/u.test(words[0])) {
parts.push(
separatorWithWhitespace(
isFacebookTranslationTag,
words[1],
node,
next,
),
);
} else {
parts.push(jsxWhitespace);
}
words.shift();
}
let endWhitespace;
// Ends with whitespace
if (words.at(-1) === "") {
words.pop();
endWhitespace = words.pop();
}
// This was whitespace only without a new line.
if (words.length === 0) {
return;
}
for (const [i, word] of words.entries()) {
if (i % 2 === 1) {
parts.push(line);
} else {
parts.push(word);
}
}
if (endWhitespace !== undefined) {
if (/\n/u.test(endWhitespace)) {
parts.push(
separatorWithWhitespace(
isFacebookTranslationTag,
parts.at(-1),
node,
next,
),
);
} else {
parts.push(jsxWhitespace);
}
} else {
parts.push(
separatorNoWhitespace(
isFacebookTranslationTag,
parts.at(-1),
node,
next,
),
);
}
} else if (/\n/u.test(text)) {
// Keep (up to one) blank line between tags/expressions/text.
// Note: We don't keep blank lines between text elements.
if (text.match(/\n/gu).length > 1) {
parts.push("", hardline);
}
} else {
parts.push("", jsxWhitespace);
}
} else {
const printedChild = print();
parts.push(printedChild);
const directlyFollowedByMeaningfulText =
next && isMeaningfulJsxText(next);
if (directlyFollowedByMeaningfulText) {
const trimmed = jsxWhitespaceUtils.trim(rawText(next));
const [firstWord] = jsxWhitespaceUtils.split(trimmed);
parts.push(
separatorNoWhitespace(
isFacebookTranslationTag,
firstWord,
node,
next,
),
);
} else {
parts.push(hardline);
}
}
}, "children");
return parts;
}
function separatorNoWhitespace(
isFacebookTranslationTag,
child,
childNode,
nextNode,
) {
if (isFacebookTranslationTag) {
return "";
}
if (
(childNode.type === "JSXElement" && !childNode.closingElement) ||
(nextNode?.type === "JSXElement" && !nextNode.closingElement)
) {
return child.length === 1 ? softline : hardline;
}
return softline;
}
function separatorWithWhitespace(
isFacebookTranslationTag,
child,
childNode,
nextNode,
) {
if (isFacebookTranslationTag) {
return hardline;
}
if (child.length === 1) {
return (childNode.type === "JSXElement" && !childNode.closingElement) ||
(nextNode?.type === "JSXElement" && !nextNode.closingElement)
? hardline
: softline;
}
return hardline;
}
const NO_WRAP_PARENTS = new Set([
"ArrayExpression",
"TupleExpression",
"JSXAttribute",
"JSXElement",
"JSXExpressionContainer",
"JSXFragment",
"ExpressionStatement",
"CallExpression",
"OptionalCallExpression",
"ConditionalExpression",
"JsExpressionRoot",
]);
function maybeWrapJsxElementInParens(path, elem, options) {
const { parent } = path;
if (NO_WRAP_PARENTS.has(parent.type)) {
return elem;
}
const shouldBreak = path.match(
undefined,
(node) => node.type === "ArrowFunctionExpression",
isCallExpression,
(node) => node.type === "JSXExpressionContainer",
);
const needsParens = pathNeedsParens(path, options);
return group(
[
needsParens ? "" : ifBreak("("),
indent([softline, elem]),
softline,
needsParens ? "" : ifBreak(")"),
],
{ shouldBreak },
);
}
function printJsxAttribute(path, options, print) {
const { node } = path;
const parts = [];
parts.push(print("name"));
if (node.value) {
let res;
if (isStringLiteral(node.value)) {
const raw = rawText(node.value);
// Remove enclosing quotes and unescape
// all quotes so we get an accurate preferred quote
let final = raw
.slice(1, -1)
.replaceAll("'", "'")
.replaceAll(""", '"');
const quote = getPreferredQuote(final, options.jsxSingleQuote);
final =
quote === '"'
? final.replaceAll('"', """)
: final.replaceAll("'", "'");
res = path.call(
() =>
printComments(path, replaceEndOfLine(quote + final + quote), options),
"value",
);
} else {
res = print("value");
}
parts.push("=", res);
}
return parts;
}
function printJsxExpressionContainer(path, options, print) {
const { node } = path;
const shouldInline = (node, parent) =>
node.type === "JSXEmptyExpression" ||
(!hasComment(node) &&
(isArrayOrTupleExpression(node) ||
isObjectOrRecordExpression(node) ||
node.type === "ArrowFunctionExpression" ||
(node.type === "AwaitExpression" &&
(shouldInline(node.argument, node) ||
node.argument.type === "JSXElement")) ||
isCallExpression(node) ||
(node.type === "ChainExpression" &&
isCallExpression(node.expression)) ||
node.type === "FunctionExpression" ||
node.type === "TemplateLiteral" ||
node.type === "TaggedTemplateExpression" ||
node.type === "DoExpression" ||
(isJsxElement(parent) &&
(node.type === "ConditionalExpression" || isBinaryish(node)))));
if (shouldInline(node.expression, path.parent)) {
return group(["{", print("expression"), lineSuffixBoundary, "}"]);
}
return group([
"{",
indent([softline, print("expression")]),
softline,
lineSuffixBoundary,
"}",
]);
}
function printJsxOpeningElement(path, options, print) {
const { node } = path;
const nameHasComments =
hasComment(node.name) ||
hasComment(node.typeParameters) ||
hasComment(node.typeArguments);
// Don't break self-closing elements with no attributes and no comments
if (node.selfClosing && node.attributes.length === 0 && !nameHasComments) {
return [
"<",
print("name"),
node.typeArguments ? print("typeArguments") : print("typeParameters"),
" />",
];
}
// don't break up opening elements with a single long text attribute
if (
node.attributes?.length === 1 &&
isStringLiteral(node.attributes[0].value) &&
!node.attributes[0].value.value.includes("\n") &&
// We should break for the following cases:
// <div
// // comment
// attr="value"
// >
// <div
// attr="value"
// // comment
// >
!nameHasComments &&
!hasComment(node.attributes[0])
) {
return group([
"<",
print("name"),
node.typeArguments ? print("typeArguments") : print("typeParameters"),
" ",
...path.map(print, "attributes"),
node.selfClosing ? " />" : ">",
]);
}
// We should print the opening element expanded if any prop value is a
// string literal with newlines
const shouldBreak = node.attributes?.some(
(attr) => isStringLiteral(attr.value) && attr.value.value.includes("\n"),
);
const attributeLine =
options.singleAttributePerLine && node.attributes.length > 1
? hardline
: line;
return group(
[
"<",
print("name"),
node.typeArguments ? print("typeArguments") : print("typeParameters"),
indent(path.map(() => [attributeLine, print()], "attributes")),
...printEndOfOpeningTag(node, options, nameHasComments),
],
{ shouldBreak },
);
}
function printEndOfOpeningTag(node, options, nameHasComments) {
if (node.selfClosing) {
return [line, "/>"];
}
const bracketSameLine = shouldPrintBracketSameLine(
node,
options,
nameHasComments,
);
if (bracketSameLine) {
return [">"];
}
return [softline, ">"];
}
function shouldPrintBracketSameLine(node, options, nameHasComments) {
const lastAttrHasTrailingComments =
node.attributes.length > 0 &&
hasComment(node.attributes.at(-1), CommentCheckFlags.Trailing);
return (
// Simple tags (no attributes and no comment in tag name) should be
// kept unbroken regardless of `bracketSameLine`.
// jsxBracketSameLine is deprecated in favour of bracketSameLine,
// but is still needed for backwards compatibility.
(node.attributes.length === 0 && !nameHasComments) ||
((options.bracketSameLine || options.jsxBracketSameLine) &&
// We should print the bracket in a new line for the following cases:
// <div
// // comment
// >
// <div
// attr // comment
// >
(!nameHasComments || node.attributes.length > 0) &&
!lastAttrHasTrailingComments)
);
}
function printJsxClosingElement(path, options, print) {
const { node } = path;
const parts = [];
parts.push("</");
const printed = print("name");
if (
hasComment(node.name, CommentCheckFlags.Leading | CommentCheckFlags.Line)
) {
parts.push(indent([hardline, printed]), hardline);
} else if (
hasComment(node.name, CommentCheckFlags.Leading | CommentCheckFlags.Block)
) {
parts.push(" ", printed);
} else {
parts.push(printed);
}
parts.push(">");
return parts;
}
function printJsxOpeningClosingFragment(path, options /*, print*/) {
const { node } = path;
const nodeHasComment = hasComment(node);
const hasOwnLineComment = hasComment(node, CommentCheckFlags.Line);
const isOpeningFragment = node.type === "JSXOpeningFragment";
return [
isOpeningFragment ? "<" : "</",
indent([
hasOwnLineComment
? hardline
: nodeHasComment && !isOpeningFragment
? " "
: "",
printDanglingComments(path, options),
]),
hasOwnLineComment ? hardline : "",
">",
];
}
function printJsxElement(path, options, print) {
const elem = printComments(
path,
printJsxElementInternal(path, options, print),
options,
);
return maybeWrapJsxElementInParens(path, elem, options);
}
function printJsxEmptyExpression(path, options /*, print*/) {
const { node } = path;
const requiresHardline = hasComment(node, CommentCheckFlags.Line);
return [
printDanglingComments(path, options, { indent: requiresHardline }),
requiresHardline ? hardline : "",
];
}
// `JSXSpreadAttribute` and `JSXSpreadChild`
function printJsxSpreadAttributeOrChild(path, options, print) {
const { node } = path;
return [
"{",
path.call(
({ node }) => {
const printed = ["...", print()];
if (!hasComment(node) || !willPrintOwnComments(path)) {
return printed;
}
return [
indent([softline, printComments(path, printed, options)]),
softline,
];
},
node.type === "JSXSpreadAttribute" ? "argument" : "expression",
),
"}",
];
}
function printJsx(path, options, print) {
const { node } = path;
// JSX nodes always starts with `JSX`
if (!node.type.startsWith("JSX")) {
return;
}
switch (node.type) {
case "JSXAttribute":
return printJsxAttribute(path, options, print);
case "JSXIdentifier":
return node.name;
case "JSXNamespacedName":
return join(":", [print("namespace"), print("name")]);
case "JSXMemberExpression":
return join(".", [print("object"), print("property")]);
case "JSXSpreadAttribute":
case "JSXSpreadChild":
return printJsxSpreadAttributeOrChild(path, options, print);
case "JSXExpressionContainer":
return printJsxExpressionContainer(path, options, print);
case "JSXFragment":
case "JSXElement":
return printJsxElement(path, options, print);
case "JSXOpeningElement":
return printJsxOpeningElement(path, options, print);
case "JSXClosingElement":
return printJsxClosingElement(path, options, print);
case "JSXOpeningFragment":
case "JSXClosingFragment":
return printJsxOpeningClosingFragment(path, options /*, print*/);
case "JSXEmptyExpression":
return printJsxEmptyExpression(path, options /*, print*/);
case "JSXText":
/* c8 ignore next */
throw new Error("JSXText should be handled by JSXElement");
default:
/* c8 ignore next */
throw new UnexpectedNodeError(node, "JSX");
}
}
/**
* @param {JSXElement} node
* @returns {boolean}
*/
function isEmptyJsxElement(node) {
if (node.children.length === 0) {
return true;
}
if (node.children.length > 1) {
return false;
}
// if there is one text child and does not contain any meaningful text
// we can treat the element as empty.
const child = node.children[0];
return child.type === "JSXText" && !isMeaningfulJsxText(child);
}
// Meaningful if it contains non-whitespace characters,
// or it contains whitespace without a new line.
/**
* @param {Node} node
* @returns {boolean}
*/
function isMeaningfulJsxText(node) {
return (
node.type === "JSXText" &&
(jsxWhitespaceUtils.hasNonWhitespaceCharacter(rawText(node)) ||
!/\n/u.test(rawText(node)))
);
}
// Detect an expression node representing `{" "}`
function isJsxWhitespaceExpression(node) {
return (
node.type === "JSXExpressionContainer" &&
isStringLiteral(node.expression) &&
node.expression.value === " " &&
!hasComment(node.expression)
);
}
/**
* @param {AstPath} path
* @returns {boolean}
*/
function hasJsxIgnoreComment(path) {
const { node, parent } = path;
if (!isJsxElement(node) || !isJsxElement(parent)) {
return false;
}
// Lookup the previous sibling, ignoring any empty JSXText elements
const { index, siblings } = path;
let prevSibling;
for (let i = index; i > 0; i--) {
const candidate = siblings[i - 1];
if (candidate.type === "JSXText" && !isMeaningfulJsxText(candidate)) {
continue;
}
prevSibling = candidate;
break;
}
return (
prevSibling?.type === "JSXExpressionContainer" &&
prevSibling.expression.type === "JSXEmptyExpression" &&
hasNodeIgnoreComment(prevSibling.expression)
);
}
export { hasJsxIgnoreComment, printJsx };
```
|
The Rayeen are a Muslim community found in Pakistan and India and Trai region of Nepal. They are also known Al-Raiee.
References
Social groups of Pakistan
Muslim communities of India
|
Virola surinamensis, known commonly as baboonwood, ucuuba, ucuhuba and chalviande, is a species of flowering plant in the family Myristicaceae. It is found in Brazil, Costa Rica, Ecuador, French Guiana, Guyana, Panama, Peru, Suriname, and Venezuela. It has also been naturalized in the Caribbean. Its natural habitats are subtropical or tropical moist lowland forests, subtropical or tropical swamps, and heavily degraded former forest. Although the species is listed as threatened due to habitat loss by the IUCN, it is a common tree species found throughout Central and South America.
Virola surinamensis grows tall. The leaves are long and wide. The fruits are ellipsoidal to subglobular, measuring about long and in diameter.
Uses
The tree is harvested for its wood. It is also a source of traditional medicinal remedies for intestinal worms. The Amazon Indians Waiãpi living in the West of Amapá State of Brazil, treat malaria with an inhalation of vapor obtained from leaves of Viola surinamensis.
Ucuhuba seed oil
Ucuhuba seed oil is the oil extracted from the seed. It contains 13% lauric acid, 69% myristic acid, 7% palmitic acid, and traces of oleic acid and linoleic acid. Myristic and lauric acids comprised 91.3 mole % of the total fatty acids. Additional saturated fatty acids such as decanoic acid and stearic acid are minor components.
Ucuhuba butter
References
surinamensis
Endangered plants
Trees of Brazil
Trees of Costa Rica
Trees of Ecuador
Trees of northern South America
Trees of Panama
Trees of Peru
Taxonomy articles created by Polbot
|
```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
'use strict'
function test(f, {input, check}) {
let result;
try {
result = { value: f(input), exception: false }
} catch(e) {
result = { value: e, exception: true }
}
check(result);
}
function Test(f, ...cases) {
for (let i = 0; i < cases.length; ++i) {
test(f, cases[i]);
%OptimizeFunctionOnNextCall(f);
for (let j = 0; j < cases.length; ++j) {
test(f, cases[j]);
}
%DeoptimizeFunction(f);
}
}
function V(input, expected_value) {
function check(result) {
assertFalse(result.exception, `unexpected exception ${result.value} on input ${input}`);
assertEquals(expected_value, result.value);
}
return {input, check};
}
function E(input, expected_exception) {
function check(result) {
assertTrue(result.exception, `expected exception ${expected_exception.name} on input ${input}`);
assertInstanceof(result.value, expected_exception);
}
return {input, check};
}
const six = {[Symbol.toPrimitive]() {return 6n}};
////////////////////////////////////////////////////////////////////////////////
// The first argument to {Test} is the function to test. The other arguments are
// the test cases, basically pairs of input and expected output. {Test} runs the
// function first unoptimized on one of the inputs, and then optimized on all
// inputs.
////////////////////////////////////////////////////////////////////////////////
Test(x => Number(x),
V(1n, 1), V(1, 1), V("", 0), V(1.4, 1.4), V(null, 0), V(six, 6));
Test(x => Math.trunc(+x),
E(1n, TypeError), V(1, 1), V("", 0), V(1.4, 1), V(null, 0), E(six, TypeError));
Test(x => Math.trunc(Number(x)),
V(1n, 1), V(1, 1), V("", 0), V(1.4, 1), V(null, 0), V(six, 6));
Test(x => String(x),
V(1n, "1"), V(1, "1"), V(1.4, "1.4"), V(null, "null"), V(six, "6"));
Test(x => BigInt(x),
V(true, 1n), V(false, 0n), V(42n, 42n), E(NaN, RangeError), V(six, 6n));
Test(x => typeof x,
V(1n, "bigint"), V(1, "number"), V(six, "object"));
Test(x => typeof x == "bigint",
V(1n, true), V(1, false), V(six, false));
Test(x => !x,
V(0n, true), V(42n, false), V(0x10000000000000000n, false), V(1, false),
V(undefined, true), V(six, false));
Test(x => !!x,
V(0n, false), V(42n, true), V(0x10000000000000000n, true), V(1, true),
V(undefined, false), V(six, true));
Test(x => +x,
E(-3n, TypeError), V(-4, -4), V(1.4, 1.4), V(null, 0), V("5", 5),
E(six, TypeError));
Test(x => -x,
V(-3n, 3n), V(-4, 4), V(1.4, -1.4), V(null, -0), V("5", -5), V(six, -6n));
Test(x => ~x,
V(-3n, 2n), V(-4, 3), V(1.5, -2), V(null, -1), V("5", -6), V(six, -7n));
Test(x => ++x,
V(-3n, -2n), V(-4, -3), V(1.5, 2.5), V(null, 1), V("5", 6), V(six, 7n));
Test(x => --x,
V(-3n, -4n), V(-4, -5), V(1.5, 0.5), V(null, -1), V("5", 4), V(six, 5n));
Test(x => x++,
V(-3n, -3n), V(-4, -4), V(1.5, 1.5), V(null, 0), V("5", 5), V(six, 6n));
Test(x => x--,
V(-3n, -3n), V(-4, -4), V(1.5, 1.5), V(null, 0), V("5", 5), V(six, 6n));
Test(x => x + 42,
E(1n, TypeError), V(2, 44), V(null, 42), V("a", "a42"), E(six, TypeError));
Test(x => x + 42n,
V(1n, 43n), E(2, TypeError), E(null, TypeError), V("a", "a42"), V(six,48n));
Test(x => x - 4,
E(1n, TypeError), V(3, -1), V(null, -4), V("a", NaN), E(six, TypeError));
Test(x => x - 4n,
V(1n, -3n), E(3, TypeError), E(null, TypeError), E("a", TypeError),
V(six, 2n));
Test(x => x * 42,
E(2n, TypeError), V(3, 126), V("a", NaN), V(null, 0), E(six, TypeError));
Test(x => x * 42n,
V(2n, 84n), E(3, TypeError), E("a", TypeError), E(null, TypeError),
V(six, 252n));
Test(x => x / 2,
E(2n, TypeError), V(6, 3), V("a", NaN), V(null, 0), E(six, TypeError));
Test(x => x / 2n,
V(2n, 1n), E(6, TypeError), E("a", TypeError), E(null, TypeError),
V(six, 3n));
Test(x => x % 2,
E(2n, TypeError), V(3, 1), V("a", NaN), V(null, 0), E(six, TypeError));
Test(x => x % 2n,
V(2n, 0n), E(3, TypeError), E("a", TypeError), E(null, TypeError),
V(six, 0n));
Test(x => x | 5,
E(2n, TypeError), V(3, 7), V("a", 5), V(null, 5), E(six, TypeError));
Test(x => x | 5n,
V(2n, 7n), E(3, TypeError), E("a", TypeError), E(null, TypeError),
V(six, 7n));
Test(x => x & 5,
E(2n, TypeError), V(3, 1), V("a", 0), V(null, 0), E(six, TypeError));
Test(x => x & 5n,
V(2n, 0n), E(3, TypeError), E("a", TypeError), E(null, TypeError),
V(six, 4n));
Test(x => x ^ 5,
E(2n, TypeError), V(3, 6), V("a", 5), V(null, 5), E(six, TypeError));
Test(x => x ^ 5n,
V(2n, 7n), E(3, TypeError), E("a", TypeError), E(null, TypeError),
V(six, 3n));
Test(x => x << 3,
E(2n, TypeError), V(3, 24), V("a", 0), V(null, 0), E(six, TypeError));
Test(x => x << 3n,
V(2n, 16n), E(3, TypeError), E("a", TypeError), E(null, TypeError),
V(six, 48n));
Test(x => x >> 1,
E(2n, TypeError), V(3, 1), V("a", 0), V(null, 0), E(six, TypeError));
Test(x => x >> 1n,
V(2n, 1n), E(3, TypeError), E("a", TypeError), E(null, TypeError),
V(six, 3n));
Test(x => x >>> 1,
E(2n, TypeError), V(3, 1), V("a", 0), V(null, 0), E(six, TypeError));
Test(x => x >>> 1n,
E(2n, TypeError), E(3, TypeError), E("a", TypeError), E(null, TypeError),
E(six, TypeError));
Test(x => x === 42,
V(1n, false), V(2, false), V(null, false), V("a", false), V(six, false));
Test(x => x === 42,
V(42n, false), V(42, true), V(null, false), V("42", false), V(six, false));
Test(x => x === 42n,
V(1n, false), V(2, false), V(null, false), V("a", false), V(six, false));
Test(x => x === 42n,
V(42n, true), V(42, false), V(null, false), V("42", false), V(six, false));
Test(x => x == 42,
V(1n, false), V(2, false), V(null, false), V("a", false), V(six, false));
Test(x => x == 42,
V(42n, true), V(42, true), V(null, false), V("42", true), V(six, false));
Test(x => x == 42n,
V(1n, false), V(2, false), V(null, false), V("a", false), V(six, false));
Test(x => x == 42n,
V(42n, true), V(42, true), V(null, false), V("42", true), V(six, false));
Test(x => x < 42,
V(1n, true), V(2, true), V(null, true), V("41", true), V(six, true));
Test(x => x < 42,
V(42n, false), V(42, false), V(null, true), V("42", false), V(six, true));
Test(x => x < 42n,
V(1n, true), V(2, true), V(null, true), V("41", true), V(six, true));
Test(x => x < 42n,
V(42n, false), V(42, false), V(null, true), V("42", false), V(six, true));
```
|
```shell
#!/bin/bash -eu
#
#
# 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.
#
################################################################################
cp $SRC/*.dict $OUT/
cd $SRC/lxml/
python3 ./setup.py install
cd $SRC/pyxdg
pip3 install .
# Build fuzzers in $OUT.
# Remove fuzzers in lxml
find $SRC/lxml -name fuzz*.py -exec rm {} \;
if [ "$SANITIZER" = "address" ]
then
# Enable pysecsan
export ENABLE_PYSECSAN="1"
fi
for fuzzer in $(find $SRC -name 'fuzz_*.py'); do
compile_python_fuzzer $fuzzer
done
corpus_name="fuzz_menu_seed_corpus.zip"
zip -r $OUT/$corpus_name $SRC/seeds/*
```
|
Le Donjon () is a commune in the Allier department in central France.
Population
See also
Communes of the Allier department
References
Communes of Allier
Allier communes articles needing translation from French Wikipedia
|
```javascript
/**
* @license Apache-2.0
*
*
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
'use strict';
// MODULES //
var bench = require( '@stdlib/bench' );
var randu = require( '@stdlib/random/base/randu' );
var isnanf = require( '@stdlib/math/base/assert/is-nanf' );
var pow = require( '@stdlib/math/base/special/pow' );
var floor = require( '@stdlib/math/base/special/floor' );
var Float32Array = require( '@stdlib/array/float32' );
var scopy = require( '@stdlib/blas/base/scopy' );
var pkg = require( './../package.json' ).name;
var ssortsh = require( './../lib/ndarray.js' );
// FUNCTIONS //
/**
* Create a benchmark function.
*
* @private
* @param {PositiveInteger} iter - number of iterations
* @param {PositiveInteger} len - array length
* @returns {Function} benchmark function
*/
function createBenchmark( iter, len ) {
var tmp;
var x;
var i;
var j;
x = [];
for ( i = 0; i < iter; i++ ) {
tmp = new Float32Array( len );
for ( j = 0; j < len; j++ ) {
tmp[ j ] = -1.0 * randu() * j;
}
x.push( tmp );
}
return benchmark;
function benchmark( b ) {
var xc;
var y;
var i;
xc = x.slice();
for ( i = 0; i < iter; i++ ) {
xc[ i ] = scopy( len, x[ i ], 1, new Float32Array( len ), 1 );
}
b.tic();
for ( i = 0; i < b.iterations; i++ ) {
y = ssortsh( len, 1, xc[ i ], 1, 0 );
if ( isnanf( y[ i%len ] ) ) {
b.fail( 'should not return NaN' );
}
}
b.toc();
if ( isnanf( y[ i%len ] ) ) {
b.fail( 'should not return NaN' );
}
b.pass( 'benchmark finished' );
b.end();
}
}
// MAIN //
function main() {
var opts;
var iter;
var len;
var min;
var max;
var f;
var i;
iter = 1e6;
min = 1; // 10^min
max = 4; // 10^max
for ( i = min; i <= max; i++ ) {
len = pow( 10, i );
f = createBenchmark( iter, len );
opts = {
'iterations': iter
};
bench( pkg+'::reverse_mostly_sorted,random:ndarray:len='+len, opts, f );
iter = floor( pow( iter, 3.0/4.0 ) );
}
}
main();
```
|
Bo Ya () was a Chinese qin player from the state of Chu (), which is roughly equivalent to modern-day Jingzhou, Hubei, who lived during the Spring and Autumn period or Warring States period. His complete name is often incorrectly given as Yu Boya () in Stories to Caution the World (), so he is sometimes referred to with the name of Yu Boya in modern literature. However, Bo Ya is the correct name, which is clarified in Lüshi Chunqiu ().
Life
Learning Guqin
Bo Ya is well known in the Spring and Autumn period and the Warring States period for his Guqin skill. According to Qincao (琴操)written by Cai Yong, He learned his Guqin skill from Chenglian, another famous Guqin player. When he was studying Guqin, his teacher brought him to Mount Penglai and left Bo Ya. Bo Ya was immersed in the natural sound of the waves and the mountain forest, and wrote down a piece of music called Shuixiancao (水仙操). After this experience, he becomes one of the best Guqin players in his times.
Story about Zhiyin
Bo Ya was good at playing the qin. Zhong Ziqi (锺子期) was good at listening to the qin. When Bo Ya's will was towards high mountains in his playing, Zhong Ziqi would say, "How towering like Mount Tai!" When Bo Ya's will was towards flowing water in his playing, Zhong Ziqi would say, "How vast are the rivers and oceans!" Whatever Bo Ya thought of Ziqi would never fail to understand. Bo Ya said, "Amazing! Your heart and mine are the same!" After Zhong Ziqi died, Bo Ya broke his guqin because he thought that no one else can understand his music.
Bo Ya's story with Zhong Ziqi generates the term Zhiyin (Chinese: 知音, original meaning: someone who knows music well), which means close friends that can completely understand each other.
Musical work
High Mountain and Flowing Stream
High Mountain (Chinese: Gao Shan, 高山) and Flowing Stream (Chinese: Liu Shui, 流水) were originally sections of the same piece of music, with the first four sections recognized as "High Mountain" and the last eight sections recognized as "Flowing Stream." It is also said to be the music that Bo Ya played to Zhong Ziqi as it contains both elements of "towering like Mount Tai" and "vast rivers and oceans."
Shuixiancao
Shuixiancao (水仙操) was composed by Bo Ya when he was brought to Mount Penglai and stayed alone, inspired by the sound in the nature. It is Bo Ya's first famous Guqin music piece.
Huailingcao
Huailingcao (怀陵操) was composed by Bo Ya, which contains intense and passionate sound.
Legacy
Music
The qin pieces composed by Bo Ya were widely spread and recognized in China and enjoyed a high reputation, especially the most famous piece called High Mountains and Flowing Water (Gao Shan Liu Shui). This qin piece is broadly accepted in China as one of the top ten famous traditional Chinese music pieces, as it describes the majesty, depth, solemnity and nobility of mountains, and the harmony between flowing water and mountains. It has a high aesthetic and musical value which reminds people of a spring of fresh water merrily flowing down a mountain, and the waves playfully rising. In 1977, Guan Pinghu's performance of "Flowing Water" was recommended by composer Chou Wen-chung to the National Aeronautics and Space Administration (NASA) and included in the Voyager Golden Record by NASA as a representative of Chinese music works.
The story of Bo Ya also reflects the meaning and significance of traditional qin music in ancient China. China's qin music is historically associated with the literati, and the general purpose of the literati playing qin pieces is not for the audience, but for themselves. They think music is an expressive art, and the priority is to serve themselves rather than the audience. Therefore, the criteria to judge and assess their music should meet the musician's personal aesthetic standards, and show obvious differences from the generally accepted ones, which thus indicates the unique personal taste of the musician. This is reflected by the story of Bo Ya finding his Zhiyin, who really understands his music and knows his mind. In this story, Bo Ya considers Ziqi his Zhiyin for he is the only one who understands his works of art and meets his criteria. This story of Bo Ya shows the general attitude of qin players toward playing in ancient China: the pursuit of aesthetic and the realization of personal musical standards.
Bo Ya's playing style is also unique and superb, which could provoke a connection with literature. As Francesca points out in his work, "Bo Ya's performance on the qin is not actually heard or imitated in the telling of the story, but is instead simulated synesthetically through the poetry of the narrative." He thinks that It provides a bridge between the natural world and the music.
Morality and philosophy
In Chinese culture, the word Zhiyin has become a special cultural mark. On the one hand, the word Zhiyin could be understood as a person who is proficient in music, on the other hand, it is regarded as the most intelligent critic and appreciator of all arts, including music. Zhiyin has now been extended to a broader meaning of a close friend who understands one's mind. When talking about Zhiyin, it would be generally accepted by people this word could be used to describe a soul mate or an intimate friend. This word is also frequently used by Chinese people to express their sadness for finding it hard to find a friend that knows about them. The story of Bo Ya and Ziqi has been considered as one important part the philosophy of inter-person relationship in Chinese culture, reflecting the Chinese ideal of friendship.
The story of Zhiyin also can show philosophical value through the lens of Confucian thoughts. In the story, Ziqi's understanding was not a matter of knowledge of melody. Obviously, he had a deep understanding of Boya's personality and was himself a man who pursues freedom and ideal, so he could arouse a "resonance" in Bo Ya's music. "Resonance" refers to the discovery of "oneself" in the object of appreciation. Ziqi knew that Boya was committed to high mountains and flowing water through his music, because he himself was committed to the mountains and water in the natural world as well. Ziqi found himself in Bo Ya's music, thus making himself empathize and sympathize with Bo Ya. Sympathy and empathy in the resonance could be heading to the realm of the integration of heart and object, subject and object, which is an important content in Confucianism.
Presence in literary and artistic works
Bo Ya Jue Xian (2021) – A stage play created by Hunan Grand Theatre and Changsha Song and Dance Theater. The play is an artistic re-creation of the well-known story of "High mountains and flowing water, meeting an intimate friend (Gao Shan Liu Shui Yu Zhi Yin)"
Bo Ya Qin (2016) – A song composed by songwriter Wu Xiaoping with lyrics written by lyricist Liu Pengchun, and sung by singer Wang Zhe.
Bo Ya Jue Xian (2010) – A song sung and composed by Wang Leehom with lyrics written by Chen Xinhong and A Pu.
References
Further reading
Guqin players
Zhou dynasty musicians
4th-century BC Chinese musicians
|
Bayat is a town of Afyonkarahisar Province in the Aegean region of Turkey. It is the seat of Bayat District. Its population is 4,182 (2021). The mayor is Kadir Üçer (CHP). Bayat was known in Byzantine times as Kedrea.
References
Populated places in Afyonkarahisar Province
Bayat District, Afyonkarahisar
Bayat tribe
District municipalities in Turkey
Populated places of the Byzantine Empire
|
Anthony Lavell Reed (born January 3, 1971) is an American former professional basketball player. After playing high school basketball in his native state of Louisiana, Reed played college basketball at Tulane, being named the Metro Conference Freshman of the Year and gaining all-conference selections in each of his 4 seasons. He ended his career at Tulane as the all-time leading scorer with 1,896 total points (a record since passed by Jerald Honeycutt) and as the 4th best rebounder in program history with 871 total rebounds. Reed was selected in the second round (41st overall) of the 1993 NBA draft by the Chicago Bulls but was waived before the start of the NBA season, and he moved to Europe where he played in Croatia, Italy, Spain, Slovenia and Cyprus. He also played in Venezuela and ended his career in 1999 after one season in Japan. In 2015 he was inducted in the Louisiana Basketball Hall of Fame.
High school career
Reed was born in Monroe, Louisiana and played varsity basketball at Wossman High School in his native town. He played the center and forward positions and in his junior year he averaged 17 points and 6 rebounds per game, being selected in the All-District 2-AAA First Team. At the end of his senior season he was a 1988–89 Triple-A All-State Boys Team Honorable Mention, and was named the MVP of the all-star game organized by the Louisiana High School Basketball Coaches Association (LHSBCA), having recorded 14 points and 10 rebounds playing for the East team.
College career
Reed signed for Tulane in mid-November 1988. Coach Perry Clark chose Reed to be part of the starting five since his freshman year: Reed started all 28 games, led the team in rebounding (8.4) and minutes per game (35.3), and was second in scoring (18.4 points per game) behind Michael Christian. He set records for most points scored for a freshman in Tulane history with 514, and highest scoring average for a freshman with 18.4; he scored 20 or more points on 12 occasions. At the end of the season he received the Metro Conference Freshman of the Year award, and was selected in the All-Metro Conference second team.
The following year Reed again started all games and led his team in scoring (16 points per game), minutes (34.3), rebounding (7.9) and blocks (0.8). On December 8, 1989 Reed scored a career-high 32 points in a game against Tennessee Tech. His performances during his sophomore year earned him a first-team All-Metro Conference selection. Reed's junior year saw him lead the team in rebounding (6.5) and minutes per game (28.1) for the third straight season; he also ranked second on his team in scoring with a 14.4 points per game average behind Kim Lewis (15.4). That year Tulane won the Metro Conference title, with Reed as one of the main contributors. At the end of the season he was named in the NABC All-District first team, in the All-Conference second team, and in the All-Metro Tournament team. Tulane also qualified for the 1992 NCAA tournament: Reed played both games (against St. John's and Oklahoma State), scoring 12 points in each of them.
Reed's final season at Tulane saw him leading the team again in scoring (15.7 points), rebounding (6.8), minutes (33.5) and blocks (0.9). On December 23, 1992 he recorded a career-high 6 blocks against Jackson State. He also led the team in 3-point percentage (despite only attempting a single three-pointer in the previous 3 seasons), with .324 (33 of 102). On March 6, 1993 (senior day) his jersey number, 55, was retired by Tulane: in that night's game against South Florida Reed scored his 1,853rd point, becoming the all-time leader for career points at Tulane. At the end of the year Reed was selected in the All-Metro Conference first team and participated in the 1993 NABC all-star game. In the 1993 NCAA tournament Reed played both games: he scored 12 points against Kansas State and 11 against Florida State.
Reed retired with 118 games played (all starts) and 1,896 total points (which at the time made him the leading scorer in program history: the record has since been passed by Jerald Honeycutt). He ranks 9th in scoring average, 1st in field goals scored (802) and 2nd in field goals attempted (1,642), 4th in total rebounds with 871, 8th in total blocks (95) and tallied 3,858 total minutes. He recorded 26 career double-doubles and 32 20-point games. Reed contributed to bring Tulane to be nationally ranked during his last two seasons, and was inducted in the Louisiana Basketball Hall of Fame in 2015.
College statistics
|-
| align="left" | 1989–90
| align="left" | Tulane
| 28 || 28 || 35.3 || .533 || .000 || .658 || 8.4 || 0.8 || 1.1 || 0.8 || 18.4
|-
| align="left" | 1990–91
| align="left" | Tulane
| 28 || 28 || 34.3 || .489 || .000 || .546 || 7.9 || 1.2 || 1.3 || 0.8 || 16.0
|-
| align="left" | 1991–92
| align="left" | Tulane
| 31 || 31 || 28.1 || .477 || .000 || .624 || 6.5 || 1.0 || 1.5 || 0.7 || 14.4
|-
| align="left" | 1992–93
| align="left" | Tulane
| 31 || 31 || 33.5 || .459 || .324 || .630 || 6.8 || 1.0 || 1.7 || 0.9 || 15.7
|-
| align="left" | Career
| align="left" |
| 118 || 118 || 32.7 || .488 || .320 || .617 || 7.4 || 1.0 || 1.4 || 0.8 || 16.1
|-
Professional career
After the end of his senior season, Reed was automatically eligible for the 1993 NBA draft, during which he was selected by the Chicago Bulls with the 14th pick in the second round (41st overall). Reed participated in the Bulls preseason camp in July 1993 and also participated in the Rocky Mountain Revue in Salt Lake City. He signed a contract with the Bulls on October 1, but the team waived him on October 26. Reed then moved to Europe and joined KK Split in Croatia: he then moved to Dinamo Sassari and played 1 game in the Italian Lega Basket Serie A, scoring 8 points and grabbing 4 rebounds in 30 minutes of play.
In 1994 Reed moved to Spain and signed for Liga ACB team Saski Baskonia: he played 6 games in the regular season and 4 in the playoffs, averaging 7.1 points and 6 rebounds per game. After his experience in Spain he moved to Slovenia, joining Olimpija Ljubljana: he spent two seasons there, winning two national titles and one national cup; in 1996 he was also named a Slovenian league All-Star. After two seasons in Slovenia he moved to Cyprus, joining APOEL B.C. in Nicosia. In September 1997 Reed signed with Estudiantes de Olavarría of the Liga Nacional de Básquet in Argentina, but only played in friendly games during preseason before being released on September 18, 1997. In 1998 he briefly played for Trotamundos de Carabobo in Venezuela, being released after 10 days in February 1998 replaced by Puerto Rican player Charlie Lanauze, and he retired in 1999 after playing for the Nagoya Diamond Dolphins in Japan.
Despite being listed at throughout his whole career in the United States, later on, during his period in Europe, he was measured at .
References
External links
Profile at RealGM.com
College stats at Sports-Reference.com
Italian league stats
1971 births
Living people
African-American basketball players
American expatriate basketball people in Cyprus
American expatriate basketball people in Croatia
American expatriate basketball people in Italy
American expatriate basketball people in Japan
American expatriate basketball people in Slovenia
American expatriate basketball people in Spain
American expatriate basketball people in Venezuela
American men's basketball players
APOEL B.C. players
Basketball players from Louisiana
Chicago Bulls draft picks
Forwards (basketball)
KK Olimpija players
KK Split players
Lega Basket Serie A players
Liga ACB players
Nagoya Diamond Dolphins players
Saski Baskonia players
Sportspeople from Monroe, Louisiana
Trotamundos B.B.C. players
Tulane Green Wave men's basketball players
21st-century African-American sportspeople
20th-century African-American sportspeople
|
```javascript
import SmartApollo from './smart-apollo'
import { VUE_APOLLO_QUERY_KEYWORDS } from '../lib/consts'
import { isServer } from './env'
export default class SmartQuery extends SmartApollo {
type = 'query'
vueApolloSpecialKeys = VUE_APOLLO_QUERY_KEYWORDS
_loading = false
_linkedSubscriptions = []
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
constructor (vm, key, options, autostart = true) {
// Add reactive data related to the query
if (vm.$data.$apolloData && !vm.$data.$apolloData.queries[key]) {
vm.$data.$apolloData.queries[key] = {
loading: false,
}
}
super(vm, key, options)
if (isServer) {
this.firstRun = new Promise((resolve, reject) => {
this._firstRunResolve = resolve
this._firstRunReject = reject
})
}
if (isServer) {
this.options.fetchPolicy = 'network-only'
}
if (!options.manual) {
this.hasDataField = Object.prototype.hasOwnProperty.call(this.vm.$data, key)
if (this.hasDataField) {
Object.defineProperty(this.vm.$data.$apolloData.data, key, {
get: () => this.vm.$data[key],
enumerable: true,
configurable: true,
})
} else {
Object.defineProperty(this.vm.$data, key, {
get: () => this.vm.$data.$apolloData.data[key],
enumerable: true,
configurable: true,
})
}
}
if (autostart) {
this.autostart()
}
}
get client () {
return this.vm.$apollo.getClient(this.options)
}
get loading () {
return this.vm.$data.$apolloData && this.vm.$data.$apolloData.queries[this.key] ? this.vm.$data.$apolloData.queries[this.key].loading : this._loading
}
set loading (value) {
if (this._loading !== value) {
this._loading = value
if (this.vm.$data.$apolloData && this.vm.$data.$apolloData.queries[this.key]) {
this.vm.$data.$apolloData.queries[this.key].loading = value
this.vm.$data.$apolloData.loading += value ? 1 : -1
}
}
}
stop () {
super.stop()
this.loadingDone()
if (this.observer) {
this.observer.stopPolling()
this.observer = null
}
}
generateApolloOptions (variables) {
const apolloOptions = super.generateApolloOptions(variables)
if (this.vm.$isServer) {
// Don't poll on the server, that would run indefinitely
delete apolloOptions.pollInterval
}
return apolloOptions
}
executeApollo (variables) {
if (this._destroyed) return
const variablesJson = JSON.stringify(variables)
if (this.sub) {
if (variablesJson === this.previousVariablesJson) {
return
}
this.sub.unsubscribe()
// Subscribe to more subs
for (const sub of this._linkedSubscriptions) {
sub.stop()
}
}
this.previousVariablesJson = variablesJson
// Create observer
this.observer = this.vm.$apollo.watchQuery(this.generateApolloOptions(variables))
this.startQuerySubscription()
if (this.options.fetchPolicy !== 'no-cache' || this.options.notifyOnNetworkStatusChange) {
const currentResult = this.retrieveCurrentResult()
if (this.options.notifyOnNetworkStatusChange ||
// Initial call of next result when it's not loading (for Apollo Client 3)
(this.observer.getCurrentResult && !currentResult.loading)) {
this.nextResult(currentResult)
}
}
super.executeApollo(variables)
// Subscribe to more subs
for (const sub of this._linkedSubscriptions) {
sub.start()
}
}
startQuerySubscription () {
if (this.sub && !this.sub.closed) return
// Create subscription
this.sub = this.observer.subscribe({
next: this.nextResult.bind(this),
error: this.catchError.bind(this),
})
}
/**
* May update loading state
*/
retrieveCurrentResult (force = false) {
const currentResult = this.observer.getCurrentResult ? this.observer.getCurrentResult() : this.observer.currentResult()
if (force || currentResult.loading) {
if (!this.loading) {
this.applyLoadingModifier(1)
}
this.loading = true
}
return currentResult
}
nextResult (result) {
super.nextResult(result)
const { data, loading, error, errors } = result
const anyErrors = errors && errors.length
if (error || anyErrors) {
this.firstRunReject(error)
}
if (!loading) {
this.loadingDone()
}
// If `errorPolicy` is set to `all`, an error won't be thrown
// Instead result will have an `errors` array of GraphQL Errors
// so we need to reconstruct an error object similar to the normal one
if (!error && anyErrors) {
const e = new Error(`GraphQL error: ${errors.map(e => e.message).join(' | ')}`)
Object.assign(e, {
graphQLErrors: errors,
networkError: null,
})
// We skip query catchError logic
// as we only want to dispatch the error
super.catchError(e)
}
if (this.observer.options.errorPolicy === 'none' && (error || anyErrors)) {
// Don't apply result
return
}
const hasResultCallback = typeof this.options.result === 'function'
if (data == null) {
// No result
} else if (!this.options.manual) {
if (typeof this.options.update === 'function') {
this.setData(this.options.update.call(this.vm, data))
} else if (typeof data[this.key] === 'undefined' && Object.keys(data).length) {
console.error(`Missing ${this.key} attribute on result`, data)
} else {
this.setData(data[this.key])
}
} else if (!hasResultCallback) {
console.error(`${this.key} query must have a 'result' hook in manual mode`)
}
if (hasResultCallback) {
this.options.result.call(this.vm, result, this.key)
}
}
setData (value) {
const target = this.hasDataField ? this.vm.$data : this.vm.$data.$apolloData.data
target[this.key] = value
}
catchError (error) {
super.catchError(error)
this.firstRunReject(error)
this.loadingDone(error)
this.nextResult(this.observer.getCurrentResult ? this.observer.getCurrentResult() : this.observer.currentResult())
// The observable closes the sub if an error occurs
this.resubscribeToQuery()
}
resubscribeToQuery () {
const lastError = this.observer.getLastError()
const lastResult = this.observer.getLastResult()
this.observer.resetLastResults()
this.startQuerySubscription()
Object.assign(this.observer, { lastError, lastResult })
}
get loadingKey () {
return this.options.loadingKey || this.vm.$apollo.loadingKey
}
watchLoading (...args) {
return this.callHandlers([
this.options.watchLoading,
this.vm.$apollo.watchLoading,
this.vm.$apollo.provider.watchLoading,
], ...args, this)
}
applyLoadingModifier (value) {
const loadingKey = this.loadingKey
if (loadingKey && typeof this.vm[loadingKey] === 'number') {
this.vm[loadingKey] += value
}
this.watchLoading(value === 1, value)
}
loadingDone (error = null) {
if (this.loading) {
this.applyLoadingModifier(-1)
}
this.loading = false
if (!error) {
this.firstRunResolve()
}
}
fetchMore (...args) {
if (this.observer) {
this.retrieveCurrentResult(true)
return this.observer.fetchMore(...args).then(result => {
if (!result.loading) {
this.loadingDone()
}
return result
})
}
}
subscribeToMore (...args) {
if (this.observer) {
return {
unsubscribe: this.observer.subscribeToMore(...args),
}
}
}
refetch (variables) {
variables && (this.options.variables = variables)
if (this.observer) {
const result = this.observer.refetch(variables).then((result) => {
if (!result.loading) {
this.loadingDone()
}
return result
})
this.retrieveCurrentResult()
return result
}
}
setVariables (variables, tryFetch) {
this.options.variables = variables
if (this.observer) {
const result = this.observer.setVariables(variables, tryFetch)
this.retrieveCurrentResult()
return result
}
}
setOptions (options) {
Object.assign(this.options, options)
if (this.observer) {
const result = this.observer.setOptions(options)
this.retrieveCurrentResult()
return result
}
}
startPolling (...args) {
if (this.observer) {
return this.observer.startPolling(...args)
}
}
stopPolling (...args) {
if (this.observer) {
return this.observer.stopPolling(...args)
}
}
firstRunResolve () {
if (this._firstRunResolve) {
this._firstRunResolve()
this._firstRunResolve = null
}
}
firstRunReject (error) {
if (this._firstRunReject) {
this._firstRunReject(error)
this._firstRunReject = null
}
}
destroy () {
super.destroy()
if (this.loading) {
this.watchLoading(false, -1)
}
this.loading = false
}
}
```
|
Lander Road, located northeast of Soda Springs, Idaho, was listed on the National Register of Historic Places in 1975.
It is a historic road used by wagons, designed by Frederick W. Lander.
References
Roads on the National Register of Historic Places in Idaho
Buildings and structures completed in 1858
Caribou County, Idaho
|
Peter Samuelson (born 16 October 1951) is an American and British TV and film producer known for films such as Revenge of the Nerds and Arlington Road.
Early life
Samuelson was born in London, England, and has a master's degree in English literature from the University of Cambridge. Marc Samuelson is his brother. G. B. Samuelson is his grandfather. Emma Samms is his cousin.
Career
Samuelson's career in the film industry started in the early 1970s.
From 1990 to 2006, Peter Samuelson and Marc Samuelson ran Samuelson Productions.
Samuelson served on the initial three-person advisory board for Jeff Skoll's Participant Productions.
Producer and executive producer
1660 Vine (2022) (Executive Producer)
Foster Boy (2019) (Producer)
Man in the Chair (2006) (Executive Producer)
The Last Time (2006) (Producer)
Stormbreaker (2006) (Producer)
aka Alex Rider: Operation Stormbreaker (USA)
Things To Do Before You're 30 (2006) (Producer)
Chromophobia (2005) (Executive Producer)
Need (2005) (Producer)
The Libertine (2004) (Executive Producer)
The Pact (2002) (TV) (Executive Producer)
The Gathering (2002) (Producer)
Gabriel & Me (2001) (Producer)
Guest House Paradiso (1999) (Executive Producer)
Arlington Road (1999) (Producer)
The Commissioner (1998) (co-producer)
aka Der Commissioner – Im Zentrum der Macht (Germany)
This Is The Sea (1997) (Executive Producer)
Wilde (1997) (Producer)
aka Oscar Wilde (Germany)
Dog's Best Friend (1997) (TV) (Executive Producer)
Tom & Viv (1994) (Producer)
Playmaker (1994) (Producer)
aka Private Teacher (Philippines)
Turk 182! (1985) (Executive Producer)
Revenge of the Nerds (1984) (Producer)
A Man, a Woman, and a Bank (1979) (Producer)
Production manager
Shoot the Sun Down (1981) (Associate Producer & Production Manager)
High Velocity (1976) (Production Manager)
The Return of the Pink Panther (1975) (Production Manager & uncredited acting part of the Clothing thief)
One by One (1975) (Production Manager)
aka Quick and the Dead (USA)
Le Mans (1971) (Assistant Production Manager)
Non-film projects
In 1982 Samuelson and his cousin, actress Emma Samms, were inspired by a boy battling an inoperable brain tumor, and started the Los Angeles based non-profit organization Starlight Children's Foundation which brings entertainment and technology to children in hospitals.
In 1990, Samuelson brought together leaders including Steven Spielberg and General Norman Schwarzkopf to create the STARBRIGHT Foundation, a charity dedicated to developing media and technology-based programs to educate and empower children to cope with the medical, emotional and social challenges of their illnesses. Five years later, they launched the interactive social network Starbright World that helps seriously ill children meet and develop relationships with peers through video, sound, text, and avatar based communication.
In 2004, Starlight and STARBRIGHT completed a formal merger and became the Starlight Starbright Children's Foundation, where Samuelson served for 7 years as the international chairman of the organization.
In 2014, Samuelson founded ASPIRE, the Academy for Social Purpose in Responsible Entertainment, a national 501(c)(3) charity that teaches media for social change to undergraduate and graduate students across the university, regardless of their major. ASPIRE’s new kind of digital literacy was first piloted at UCLA.
Samuelson was the first managing director of the Media Institute for Social Change (MISC) at the University of Southern California.
References
External links
Living people
1951 births
Film producers from London
British television producers
Peter
|
This is a list of public art in Kirkland, Washington.
This list applies only to works of public art accessible in an outdoor public space. For example, this does not include artwork visible inside a museum.
Most of the works mentioned are sculptures. When this is not the case (sound installation, for example) it is stated next to the title.
References
External links
Kirkland, Washington
Kirkland, Washington
|
China's first subway was constructed in Beijing in January 1970, nearly one hundred years after its initial development in London. By 1984, 66 major subway systems existed worldwide. Urban rail transit helped ease the immense pressure caused by urban traffic congestion, while allowing commuters to travel at great speed and convenience. Tianjin was the second city to have an urban rapid transit system and Shanghai was the third, the latter opening its Metro in 1995 that incorporated both subway and light railway lines.
Electric bike and motorcycle development in the 1990s
The two principal types of two-wheeled vehicles in China: two-wheel bicycles propelled by human pedaling supplemented by electrical power from a storage battery (bicycle-style), and low-speed scooters propelled almost solely by electricity (scooter-style). The technology of both types is similar. China's two-wheeled electric vehicle industry started under the planned economy of the Maoist 1960s. However, early efforts to develop and commercialize these electric vehicles failed. A group of entrepreneurs gathered during the 1980s to revive the fledgling industry but their ambitions were thwarted by poor technology and limited government support.
By the 1990s, China witnessed the world's most spectacular growth in two-wheeled electric vehicles and annual sales of bicycles and scooters grew from fifty six thousand in 1998 to over twenty one million in 2008. In 2008 only, Chinese bought 21 million electric-bikes, compared with 9.4 million autos.
This growth of electric-bicycles in China was less technology-driven and more policy-driven, facilitated by favorable local regulatory practices in the form of gasoline powered motorcycle bans and loose enforcement of electric bicycle standards. The alleged justifications for these bans included relieving traffic congestion, improving safety and reducing air pollution. Many Chinese cities started to ban or restrict motorcycles and scooters using a variety of measures: some cities suspended the issuance of new motorcycle licenses, others banned the entrance of motorcycles and scooters into certain downtown regions or major roads, and some capped the number of licenses and then auctioned the license plates that were available. These bans were imposed on all motorcycles, regardless of their power sources, and since electric-bikes are categorized as non-motor vehicles they were exempt from the bans. According to the motorcycle committee of the Society of Automotive Engineers of China, the use of motorcycles is now banned or restricted in over ninety major Chinese cities.
In fact, the government further supported the use of electric-bicycles by including them as one of 10 key scientific-development priority projects in the country's ninth Five-Year Plan. Some insiders claim that their development had the personal endorsement of former Premier Li Peng. In addition, improved technology, low barriers to entry, decreasing purchase price, and urban living were factors that furthered the popularity of electric-bicycles as a transportation mode. First, bicycle technology - specifically for motors and batteries - improved significantly during the late 1990s and this, coupled with a vast supplier base and weak intellectual property protection, increased competition. An increase in competition drove down the price of electric-bicycles and at the same time, a rise in gasoline prices made them more competitive economically with alternatives like gasoline-powered scooters or cars. An increased influx of workers to urban areas further increased demand for an affordable, motorized, and convenient form of private mobility since traveling by bicycle or bus in congested areas or across long distances was no longer viable.
Recently, restrictions on electric-bicycles in China have been gradually spreading and there is a growing concern amongst consumers that the government may impose an outright ban. Nevertheless, since they are an important mode of electric transportation, the experience found with electric-bicycles offers important lessons for the launch of other types of electric vehicles.
Electric car development after 2000
According to the China Association of Automobile Manufacturers, China surpassed the United States to become the world's largest automobile market in 2009 with a record 13.9 million vehicles sold in the country, compared to 10.43 million cars and light trucks sold in the United States.
There is a quickly growing demand for transport in China as more people can afford to buy cars.
To support its commitment to encourage electric-vehicle development the government planned to provide US$15 billion to the industry.
Their intention, in addition to creating a world-leading industry that will produce jobs and exports, was to reduce urban pollution and decrease its dependence on oil.
As such, government's goal was to have five million battery-electric and plug-in hybrid electric cars on the road by 2020, while also producing one million such vehicles annually by 2020.
The government established a policy framework to accelerate electric-vehicle technology development, while encouraging market transformation that will support research and development, regulate the industry and encourage consumption.
Early developments
In 2001 China started the "863 EV Project" (pure EV, hybrid EV, and fuel cell vehicles are included).
The National Development and Reform Commission published the Auto Industry Development Policy in 2004.
That year, sixteen Chinese state-owned companies formed an electric vehicle industry association in Beijing called CEVA. The goal of the association was to integrate technological standards and create a mechanism through which stakeholders share information in order to develop a top of the market e-vehicle. The companies were anticipated to invest a total of US$14.7 billion on the growing electric vehicles market by 2012.
In 2007 China invested over RMB2 billion (US$300 million) in new energy vehicle development.
2008
• Sales volume of Chinese new energy vehicles surges to 366 units in the first half of 2008, reaching a year-on-year increase of 107.9%. Chinese automakers provide around 500 independently developed new energy and fuel efficiency vehicles to serve Beijing Olympics.
• 13 cities (Beijing, Shanghai, Chongqing, Changchun, Dalian, Hangzhou, Jinan, Wuhan, Shenzhen, Hefei, Changsha, Kunming, and Nanchang) are chosen as pilot cities for new EV usage in 2009.
2009
• The State Council approves the Auto Industry Restructuring and Revitalization Plan to invest RMB10 billion (US$1.50 billion) for new e-vehicle industrialization.
• The State Council invests RMB20 billion (US$3 billion) in technique development.
• To improve air quality and reduce reliance on fossil fuels, the government announces a two-year pilot program of subsidizing buyers of alternative energy cars in five cities (Shanghai, Changchun, Shenzhen, Hangzhou and Hefei). The subsidy for EV customers is RMB60,000 for battery electric vehicles (BEV) and RMB50,000 for plug-in hybrid vehicles (PHEV).
2010
• An auto industry (including new energy) development plan for 2011 to 2020 was drafted to include a plan to transform the domestic auto industry. Approval has been delayed.
• China plans to expand a project of encouraging the use of energy-efficient and alternative-energy vehicles in public transport to 20 cities from 13. EV).
2011
• There are several major electric vehicle R&D and manufacturer company in Chinese market. The company including: Aiways, SAIC, FAW, Dongfeng, Chana, BAIC, GAC, Chery, BYD and Geely. Additionally, there are several R&D institutes has been built up such as Tsinghua University, Beijing Institute of Technology, and Tongji University. They all have their own centers focusing NEV research.
2015
In China, sales of plug-in electric vehicles (including live electric vehicles and plug-in hybrid vehicles) soared by 343%. In the field of electric vehicles, this is a huge success.
2018
China manufactured and sold about 1.2 million plug-in electric vehicles in 2018, which was more than three times the sales in the US. China has become the fastest and largest growing market for electric vehicles in the world. New electric cars (EV) had a market share of 4.2% of new cars sold in China for the entire year of 2018. Big cities like Shenzhen and Beijing are rapidly adopting electric vehicles—for example, all of Shenzhen's 16,000 public buses are now electric, and soon all of its 22,000 taxis will be electric cars as well.
References
Electric vehicles in China
Industrial history of China
|
Winifred Evans (born 4 July 1890, London) was a British actress. In 1921 she appeared as a Germany spy in the controversial film How Kitchener Was Betrayed which was ultimately banned.
Selected filmography
The Happy Warrior (1917)
The Splendid Coward (1918)
The Lady Clare (1919)
How Kitchener Was Betrayed (1921)
Greatheart (1921)
Cupid in Clover (1929)
Three Men in a Boat (1933)
References
Bibliography
Robertson, James Crighton. The hidden cinema: British film censorship in action, 1913-1975. Routledge, 1993.
External links
1890 births
English stage actresses
English film actresses
English silent film actresses
20th-century English actresses
Actresses from London
Year of death missing
|
Jacob (Yaakov) Birnbaum (10 December 1926 – 9 April 2014, aged 87) was the German-born founder of Student Struggle for Soviet Jewry (SSSJ) and other human rights organizations. Because the SSSJ, at the time of its founding, in 1964, was the first initiative to address the plight of Soviet Jewry, he is regarded as the father of the Movement to Free Soviet Jewry. His father was Solomon Birnbaum and grandfather Nathan Birnbaum.
Early life and education
Yaakov Birnbaum was born in Hamburg, Germany. His grandfather was Nathan Birnbaum, writer and Jewish nationalist who coined the word "Zionism." His father was Solomon Birnbaum, a Yiddish scholar. In 1938 and 1939 Yaakov went to school with refugee children who were brought out from Central Europe at the last moment in a Kindertransport organized by Rabbi Dr. Solomon Schonfeld. He later studied modern European history at the University of London.
Career
As the war ended in 1945, Birnbaum moved to France where from 1946 to 1951 he helped survivors of Nazi concentration camps and Soviet labor camps - Jews from Poland, USSR, Czechoslovakia, Hungary. He later worked to help North African Jews fleeing the Algerian Civil War.
With his experience of Nazism and Soviet communism, Birnbaum felt that an all-out effort should be made by American Jewry to combat the Kremlin's oppression of Soviet Jews. Inspired by the organization of the Student Nonviolent Coordinating Committee, Birnbaum decided to create a national student movement to act as a spearhead to mobilize the grassroots to transform Washington into the protector and rescuer of Soviet Jewry. In 1964 he moved to New York City. On 27 April 1964 he convened a New York metropolitan student meeting at Columbia University with the aim of creating a protest on 1 May, traditionally a holiday for the Soviet Union. About 200 students from Yeshiva University, Jewish Theological Seminary, Queens College and Columbia University attended. The meeting was an emotional one. The theme was that The Holocaust should be taken as a warning and the civil rights movement as a model for grassroots action. Within four days some 1,000 students rallied in front of the Soviet U.N. Mission. He called the new group Student Struggle for Soviet Jewry (SSSJ) (a play on the Marxist term "class struggle") and his first office operated out of his bedroom. In its recent timeline of 350 years of American Jewish history, the Center for Jewish History marked 1 May 1964 as the beginning of the public movement for Soviet Jewry.
The 1960s saw the rise of student protest movements. The Student Nonviolent Coordinating Committee, the inspiration for SSSJ, eventually shed its non-violent image, and other groups arose based on civil disobedience. Recognizing the potential hazard of courting donors who wanted to avoid student activism, Birnbaum together with Irving Greenberg and Mel Stein created the non-profit Center for Soviet Jewry in 1965 in the hope that it would have more appeal donors.
Birnbaum sacrificed much for SSSJ, leading an ascetic life, even going as far as washing his clothes in the bathtub to save money by avoiding the laundry.
Birnbaum's efforts to raise general awareness of the plight of Soviet Jewry beyond the Jewish community lasted for years. A major goal was accomplished when on 6 December 1987—a day before a summit meeting before Ronald Reagan and Mikhail Gorbachev—the National Coalition Supporting Soviet Jewry (NCSJ) held a gathering of 250,000 people, including statements from human rights leaders, American presidential candidates, Morris B. Abram (NCSJ president), and a message from President Ronald Reagan. Birnbaum was given negligible attention at the event, something that embittered him for the rest of his life.
Former Soviet refusenik and Israeli politician Natan Sharansky said "Jacob was the first to start the struggle. This brought hundreds of thousands of Jews out to join him in the great struggle for Soviet Jewry, which made modern Exodus real." The movement started by Birnbaum eventually led to liberalization of Soviet emigration policies, resulting in the eventual emigration of over 1.5 million Soviet Jews.
Personal life
Yaakov Birnbaum was married to the former Freda Beatrice Bluestone, who survived him.
Birnbaum donated his papers representing the Student Struggle for Soviet Jewry to Yeshiva University in 1993.
Legacy
A portion of Cabrini Boulevard, in Washington Heights, New York City was renamed in his memory on 18 October 2015. Birnbaum used to live in this section of town.
References
External links
Jacob Birnbaum and the Struggle for Soviet Jewry Part 1 & Part 2
Guide to the Student Struggle for Soviet Jewry Records, 1956-2010 at the Library of Yeshiva University.
1926 births
2014 deaths
American Zionists
20th-century German Jews
Jewish human rights activists
Jewish American community activists
German emigrants to the United States
21st-century American Jews
Soviet Jewry movement activists
|
```c++
//
//
// path_to_url
//
// Unless required by applicable law or agreed to in writing, software
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#include <string>
#include "glog/logging.h"
#include "paddle/fluid/framework/ir/fuse_pass_base.h"
#include "paddle/fluid/framework/ir/graph_pattern_detector.h"
#include "paddle/fluid/framework/ir/pass.h"
#include "paddle/fluid/framework/ir/quantize_helper.h"
#include "paddle/fluid/framework/ir/xpu/pass_utils.h"
#include "paddle/fluid/framework/ir/xpu/quant_utils.h"
#include "paddle/fluid/framework/op_version_registry.h"
#include "paddle/fluid/platform/enforce.h"
namespace phi {
class DenseTensor;
} // namespace phi
namespace paddle {
namespace framework {
class Scope;
} // namespace framework
} // namespace paddle
namespace paddle {
namespace framework {
namespace ir {
namespace patterns {
struct FcXPUPattern : public PatternBase {
FcXPUPattern(PDPattern* pattern,
const std::string& name_scope,
const std::string& mul_type,
bool with_bias,
bool with_bn,
const std::string& act_type);
// declare operator node's name
PATTERN_DECL_NODE(mul);
PATTERN_DECL_NODE(add);
PATTERN_DECL_NODE(bn);
PATTERN_DECL_NODE(act);
// declare variable node's name
PATTERN_DECL_NODE(mul_x);
PATTERN_DECL_NODE(mul_out);
PATTERN_DECL_NODE(bias);
PATTERN_DECL_NODE(add_out);
PATTERN_DECL_NODE(bn_bias);
PATTERN_DECL_NODE(bn_mean);
PATTERN_DECL_NODE(bn_scale);
PATTERN_DECL_NODE(bn_var);
PATTERN_DECL_NODE(bn_out);
PATTERN_DECL_NODE(bn_var_out);
PATTERN_DECL_NODE(bn_mean_out);
PATTERN_DECL_NODE(bn_saved_var);
PATTERN_DECL_NODE(bn_saved_mean);
PATTERN_DECL_NODE(act_out);
private:
std::string mul_type_;
bool with_bias_{false};
bool with_bn_{false};
std::string act_type_;
};
FcXPUPattern::FcXPUPattern(PDPattern* pattern,
const std::string& name_scope,
const std::string& mul_type,
bool with_bias,
bool with_bn,
const std::string& act_type)
: PatternBase(pattern, name_scope, name_scope),
mul_type_(mul_type),
with_bias_(with_bias),
with_bn_(with_bn),
act_type_(act_type) {
auto* mul_x = pattern->NewNode(mul_x_repr())
->assert_is_op_input(mul_type_, "X")
->assert_var_not_persistable();
auto* mul =
pattern->NewNode(mul_repr())
->assert_is_op(mul_type_)
->assert_more([](Node* node) {
auto op_type = node->Op()->Type();
if (op_type == "matmul") {
return !PADDLE_GET_CONST(bool,
node->Op()->GetAttr("transpose_X"));
} else if (op_type == "matmul_v2") {
return !PADDLE_GET_CONST(bool, node->Op()->GetAttr("trans_x"));
} else {
return true;
}
});
auto* mul_out = pattern->NewNode(mul_out_repr())
->assert_is_op_output(mul_type_, "Out")
->assert_var_not_persistable();
mul->LinksFrom({mul_x}).LinksTo({mul_out});
PDNode* bias = nullptr;
PDNode* add = nullptr;
PDNode* add_out = nullptr;
PDNode* act = nullptr;
PDNode* act_out = nullptr;
if (with_bias_) {
mul_out->assert_is_op_input("elementwise_add", "X");
bias = pattern->NewNode(bias_repr())
->assert_is_op_input("elementwise_add", "Y")
->assert_is_persistable_var();
add = pattern->NewNode(add_repr())->assert_is_op("elementwise_add");
add_out = pattern->NewNode(add_out_repr())
->assert_is_op_output("elementwise_add", "Out")
->assert_var_not_persistable();
if (with_bn_ || !act_type_.empty()) {
add_out->assert_has_n_outputs(1);
}
add->LinksFrom({mul_out, bias}).LinksTo({add_out});
} else {
add_out = mul_out;
}
PDNode* bn = nullptr;
PDNode* bn_bias = nullptr;
PDNode* bn_mean = nullptr;
PDNode* bn_scale = nullptr;
PDNode* bn_var = nullptr;
PDNode* bn_out = nullptr;
PDNode* bn_mean_out = nullptr;
PDNode* bn_saved_mean = nullptr;
PDNode* bn_var_out = nullptr;
PDNode* bn_saved_var = nullptr;
if (with_bn_) {
add_out->assert_is_op_input("batch_norm", "X");
bn_bias = pattern->NewNode(bn_bias_repr())
->assert_is_op_input("batch_norm", "Bias")
->assert_has_n_outputs(1);
bn_mean = pattern->NewNode(bn_mean_repr())
->assert_is_op_input("batch_norm", "Mean")
->assert_has_n_outputs(1);
bn_scale = pattern->NewNode(bn_scale_repr())
->assert_is_op_input("batch_norm", "Scale")
->assert_has_n_outputs(1);
bn_var = pattern->NewNode(bn_var_repr())
->assert_is_op_input("batch_norm", "Variance")
->assert_has_n_outputs(1);
bn = pattern->NewNode(bn_repr())->assert_is_op("batch_norm");
bn_out =
pattern->NewNode(bn_out_repr())->assert_is_op_output("batch_norm", "Y");
if (!act_type_.empty()) {
bn_out->assert_has_n_outputs(1);
}
bn_mean_out = pattern->NewNode(bn_mean_out_repr())
->assert_is_op_output("batch_norm", "MeanOut");
bn_saved_mean = pattern->NewNode(bn_saved_mean_repr())
->assert_is_op_output("batch_norm", "SavedMean");
bn_var_out = pattern->NewNode(bn_var_out_repr())
->assert_is_op_output("batch_norm", "VarianceOut");
bn_saved_var = pattern->NewNode(bn_saved_var_repr())
->assert_is_op_output("batch_norm", "SavedVariance");
bn->LinksFrom({add_out, bn_bias, bn_mean, bn_scale, bn_var})
.LinksTo(
{bn_out, bn_mean_out, bn_var_out, bn_saved_mean, bn_saved_var});
} else {
bn_out = add_out;
}
if (!act_type_.empty()) {
bn_out->assert_is_op_input(act_type_, "X");
act = pattern->NewNode(act_repr())->assert_is_op(act_type_);
act_out = pattern->NewNode(act_out_repr())
->assert_is_op_output(act_type_, "Out")
->assert_var_not_persistable();
act->LinksFrom({bn_out}).LinksTo({act_out});
}
}
} // namespace patterns
/*
1. fuse mul/matmul/matmul_v2 + add + act into fc_xpu
2. add is optional
3. act is optional
Origin subgraph:
mul_x mul_w
\ /
\ /
mul
|
|
mul_out bias
\ /
\ /
elementwise_add
|
|
elementwise_add_out
|
|
batch_norm
|
|
batch_norm_out
|
|
act
|
|
act_out
Fused subgraph:
mul_x mul_w bias mul_w_max
\ | / |
\ | / |
\ | / |
fc_xpu-----------
| \
| \
act_out out_max
*/
class FcXPUFusePass : public FusePassBase {
protected:
void ApplyImpl(ir::Graph* graph) const override;
private:
int ApplyImpl(ir::Graph* graph,
const std::string& mul_type,
bool with_bias,
bool with_bn,
const std::string& act_type) const;
void CreateFusionWeightsAndBias(
ir::Graph* graph,
Scope* scope,
BlockDesc* block,
std::string mul_type,
const std::map<std::string, std::map<std::string, Node*>>& nodes_map,
std::map<std::string, Node*>* fusion_nodes_map,
bool with_bias,
bool with_bn,
std::string op_weights_precision,
std::unordered_map<std::string, std::vector<float>>* var_quant_scales)
const;
void CreateFusionOutputs(
ir::Graph* graph,
Scope* scope,
BlockDesc* block,
const std::map<std::string, std::map<std::string, Node*>>& nodes_map,
std::map<std::string, Node*>* fusion_nodes_map,
std::string op_weights_precision,
std::unordered_map<std::string, std::vector<float>>* var_quant_scales)
const;
void CreateFusionInputs(
ir::Graph* graph,
Scope* scope,
BlockDesc* block,
const std::map<std::string, std::map<std::string, Node*>>& nodes_map,
std::map<std::string, Node*>* fusion_nodes_map,
std::string op_weights_precision,
std::unordered_map<std::string, std::vector<float>>* var_quant_scales)
const;
Node* GetNodeFromNodesMap(
const std::map<std::string, std::map<std::string, Node*>>& nodes_map,
std::string pattern_node_name,
std::string node_name) const;
void CreateTheReplicatedWeights(
ir::Graph* graph,
Scope* scope,
BlockDesc* block,
const std::map<std::string, std::map<std::string, Node*>>& nodes_map)
const;
const std::string name_scope_{"fc_xpu_fuse_pass"};
};
void FcXPUFusePass::CreateTheReplicatedWeights(
ir::Graph* graph,
Scope* scope,
BlockDesc* block,
const std::map<std::string, std::map<std::string, Node*>>& nodes_map)
const {
// Get Node
auto* mul = GetNodeFromNodesMap(nodes_map, "mul", "mul");
PADDLE_ENFORCE_EQ(
mul != nullptr,
true,
common::errors::InvalidArgument("mul node ptr can not be null"));
auto mul_w_name = mul->Op()->Input("Y")[0];
std::string replicated_w_name = mul_w_name + "_copy_" +
std::to_string(block->ID()) + "_" +
std::to_string(mul->id());
auto* replicated_w_var = scope->FindVar(replicated_w_name);
if (replicated_w_var == nullptr) {
auto* filter_tensor =
scope->FindVar(mul_w_name)->GetMutable<phi::DenseTensor>();
phi::DenseTensor replicated_filter_tensor;
Assign(*filter_tensor, &replicated_filter_tensor);
VarDesc replicated_filter_desc(replicated_w_name);
replicated_filter_desc.SetPersistable(true);
replicated_filter_desc.SetShape(
common::vectorize(replicated_filter_tensor.dims()));
replicated_filter_desc.SetDataType(
framework::TransToProtoVarType(replicated_filter_tensor.dtype()));
graph->CreateVarNode(&replicated_filter_desc);
auto* block_replicated_filter_desc = block->Var(replicated_w_name);
block_replicated_filter_desc->SetPersistable(
replicated_filter_desc.Persistable());
block_replicated_filter_desc->SetShape(replicated_filter_desc.GetShape());
block_replicated_filter_desc->SetDataType(
replicated_filter_desc.GetDataType());
Assign(replicated_filter_tensor,
scope->Var(replicated_w_name)->GetMutable<phi::DenseTensor>());
}
}
Node* FcXPUFusePass::GetNodeFromNodesMap(
const std::map<std::string, std::map<std::string, Node*>>& nodes_map,
std::string pattern_node_name,
std::string node_name) const {
auto iter = nodes_map.find(pattern_node_name);
PADDLE_ENFORCE_EQ(
iter != nodes_map.end(),
true,
common::errors::InvalidArgument("nodes_map[%s] not found in nodes_map",
pattern_node_name.c_str()));
auto node_map = iter->second;
auto node_iter = node_map.find(node_name);
PADDLE_ENFORCE_EQ(node_iter != node_map.end(),
true,
common::errors::InvalidArgument(
"nodes_map[%s][%s] not found in nodes_map",
pattern_node_name.c_str(),
node_name.c_str()));
return node_iter->second;
}
void FcXPUFusePass::ApplyImpl(ir::Graph* graph) const {
PADDLE_ENFORCE_NOT_NULL(
graph, common::errors::PreconditionNotMet("graph should not be null."));
Init(name_scope_, graph);
int found_subgraph_count = 0;
for (auto mul_type : {"mul", "matmul", "matmul_v2"}) {
for (auto with_bias : {true, false}) {
for (auto with_bn : {true, false}) {
for (auto act_type : {
"relu",
"gelu",
"tanh",
"sigmoid",
"swish",
"relu6",
"leaky_relu",
"",
}) {
found_subgraph_count +=
ApplyImpl(graph, mul_type, with_bias, with_bn, act_type);
}
}
}
}
AddStatis(found_subgraph_count);
}
void FcXPUFusePass::CreateFusionWeightsAndBias(
ir::Graph* graph,
Scope* scope,
BlockDesc* block,
std::string mul_type,
const std::map<std::string, std::map<std::string, Node*>>& nodes_map,
std::map<std::string, Node*>* fusion_nodes_map,
bool with_bias,
bool with_bn,
std::string op_weights_precision,
std::unordered_map<std::string, std::vector<float>>* var_quant_scales)
const {
// Get Node
auto* mul = GetNodeFromNodesMap(nodes_map, "mul", "mul");
PADDLE_ENFORCE_EQ(
mul != nullptr,
true,
common::errors::InvalidArgument("mul node ptr can not be null"));
auto mul_w_name = mul->Op()->Input("Y")[0];
Node* mul_w = FindNodeWithName(graph, mul_w_name);
CreateTheReplicatedWeights(graph, scope, block, nodes_map);
std::string replicated_w_name = mul_w_name + "_copy_" +
std::to_string(block->ID()) + "_" +
std::to_string(mul->id());
auto* mul_w_replicated_node = FindNodeWithName(graph, replicated_w_name);
// transfilter fp16 --> fp32
auto* filter_t = scope->FindVar(mul_w_replicated_node->Name())
->GetMutable<phi::DenseTensor>();
auto filter_dtype = filter_t->dtype();
if (filter_dtype == phi::DataType::FLOAT16) {
CastToFp32(filter_t, nullptr);
}
bool transpose_w = false;
if (mul_type == "matmul") {
transpose_w = PADDLE_GET_CONST(bool, mul->Op()->GetAttr("transpose_Y"));
} else if (mul_type == "matmul_v2") {
transpose_w = PADDLE_GET_CONST(bool, mul->Op()->GetAttr("trans_y"));
}
// Get Weight scale in int8 scene
std::vector<float> weight_scale{};
if (AreScalesPresentForNodes(var_quant_scales, {mul_w})) {
weight_scale = GetScaleVecValueForNode(var_quant_scales, mul_w);
}
// Create fusion_bias_node
Node* fusion_bias_node = nullptr;
if (with_bias) {
auto* ew_bias_add_bias =
GetNodeFromNodesMap(nodes_map, "ew_bias_add", "ew_bias_add_bias");
PADDLE_ENFORCE_EQ(ew_bias_add_bias != nullptr,
true,
common::errors::InvalidArgument(
"ew_bias_add_bias node ptr can not be null"));
PrepareBias(graph, scope, block, ew_bias_add_bias, &fusion_bias_node);
}
if (with_bn) {
auto* bn = GetNodeFromNodesMap(nodes_map, "bn", "bn");
PADDLE_ENFORCE_EQ(
bn != nullptr,
true,
common::errors::InvalidArgument("bn node ptr can not be null"));
auto* bn_bias = GetNodeFromNodesMap(nodes_map, "bn", "bn_bias");
PADDLE_ENFORCE_EQ(
bn_bias != nullptr,
true,
common::errors::InvalidArgument("bn_bias node ptr can not be null"));
auto* bn_scale = GetNodeFromNodesMap(nodes_map, "bn", "bn_scale");
PADDLE_ENFORCE_EQ(
bn_scale != nullptr,
true,
common::errors::InvalidArgument("bn_scale node ptr can not be null"));
auto* bn_var = GetNodeFromNodesMap(nodes_map, "bn", "bn_var");
PADDLE_ENFORCE_EQ(
bn_var != nullptr,
true,
common::errors::InvalidArgument("bn_var node ptr can not be null"));
auto* bn_mean = GetNodeFromNodesMap(nodes_map, "bn", "bn_mean");
PADDLE_ENFORCE_EQ(
bn_mean != nullptr,
true,
common::errors::InvalidArgument("bn_mean node ptr can not be null"));
auto bn_bias_t =
scope->Var(bn_bias->Name())->GetMutable<phi::DenseTensor>();
auto bn_scale_t =
scope->Var(bn_scale->Name())->GetMutable<phi::DenseTensor>();
auto bn_mean_t =
scope->Var(bn_mean->Name())->GetMutable<phi::DenseTensor>();
auto bn_var_t = scope->Var(bn_var->Name())->GetMutable<phi::DenseTensor>();
float* bn_scale_ptr = bn_scale_t->data<float>();
float* bn_bias_ptr = bn_bias_t->data<float>();
float* bn_mean_ptr = bn_mean_t->data<float>();
float* bn_var_ptr = bn_var_t->data<float>();
auto mean_len = bn_mean_t->numel();
auto filter_h = filter_t->dims()[0];
auto filter_w = filter_t->dims()[1];
float epsilon = PADDLE_GET_CONST(float, bn->Op()->GetAttr("epsilon"));
if (!with_bias) {
PrepareBias(graph, scope, block, bn_bias, &fusion_bias_node);
}
auto fusion_bias_t =
scope->Var(fusion_bias_node->Name())->GetMutable<phi::DenseTensor>();
float* fusion_bias_ptr = fusion_bias_t->data<float>();
// recompute bias and weights
for (int i = 0; i < mean_len; ++i) {
bn_scale_ptr[i] = bn_scale_ptr[i] / sqrtf(bn_var_ptr[i] + epsilon);
}
// recompute the weights
if (op_weights_precision != "int8") {
float* filter_ptr = filter_t->data<float>();
for (int i = 0; i < mean_len; ++i) {
for (int j = 0; j < filter_h; j++) {
filter_ptr[j * filter_w + i] *= bn_scale_ptr[i];
}
}
} else {
int8_t* filter_ptr = filter_t->data<int8_t>();
PADDLE_ENFORCE_EQ(
weight_scale.size(),
mean_len,
common::errors::InvalidArgument(
"Weight max_scale size must equal batch_norm scale/mean size."));
for (int i = 0; i < mean_len; i++) {
weight_scale[i] *= fabs(bn_scale_ptr[i]);
}
for (int i = 0; i < mean_len; i++) {
if (bn_scale_ptr[i] < 0) {
for (int j = 0; j < filter_h; ++j) {
filter_ptr[j * filter_w + i] *= -1;
}
}
}
}
// recompute bias
if (!with_bias) {
for (int i = 0; i < mean_len; ++i) {
fusion_bias_ptr[i] += (0.0f - bn_mean_ptr[i]) * bn_scale_ptr[i];
}
} else {
for (int i = 0; i < mean_len; ++i) {
fusion_bias_ptr[i] =
bn_bias_ptr[i] +
(fusion_bias_ptr[i] - bn_mean_ptr[i]) * bn_scale_ptr[i];
}
}
}
(*fusion_nodes_map)["bias"] = fusion_bias_node;
Node* filter_intx = nullptr;
Node* filter_max = nullptr;
Node* scale_max = nullptr;
std::map<std::string, int> default_type;
default_type.insert(std::make_pair("fc", -1));
auto quant_post_type =
Has("quant_post_dynamic_weight_methods")
? Get<std::map<std::string, int>>("quant_post_dynamic_weight_methods")
: default_type;
for (auto it = quant_post_type.begin(); it != quant_post_type.end(); ++it) {
VLOG(5) << "Key:" << it->first;
VLOG(5) << "Value:" << it->second;
}
if (op_weights_precision != "int8") {
if (quant_post_type.find("fc") != quant_post_type.end() &&
quant_post_type.find("fc")->second == 2 ||
quant_post_type.find("fc") != quant_post_type.end() &&
quant_post_type.find("fc")->second == -1) {
VLOG(5) << "Use int16 per-tensor weight";
PrepareWeight<float, int16_t>(graph,
scope,
block,
mul_w_replicated_node,
&filter_intx,
&filter_max,
&scale_max,
!transpose_w,
weight_scale,
false);
} else if (quant_post_type.find("fc") != quant_post_type.end() &&
quant_post_type.find("fc")->second == 3) {
VLOG(5) << "Use int16 per-channel weight";
PrepareWeight<float, int16_t>(graph,
scope,
block,
mul_w_replicated_node,
&filter_intx,
&filter_max,
&scale_max,
!transpose_w,
weight_scale,
true);
} else if (quant_post_type.find("fc") != quant_post_type.end() &&
quant_post_type.find("fc")->second == 4) {
VLOG(5) << "Use int31 per-tensor weight";
PrepareWeight<float, float>(graph,
scope,
block,
mul_w_replicated_node,
&filter_intx,
&filter_max,
&scale_max,
!transpose_w,
weight_scale,
false);
} else if (quant_post_type.find("fc") != quant_post_type.end() &&
quant_post_type.find("fc")->second == 0 ||
quant_post_type.find("fc") != quant_post_type.end() &&
quant_post_type.find("fc")->second == 1) {
VLOG(5) << "Unsupported int8 post quant!";
} else {
VLOG(5) << "Unsupported type weight by non-int8!";
}
} else {
VLOG(5) << "Use int8 quant weight";
PrepareWeight<int8_t, int8_t>(graph,
scope,
block,
mul_w_replicated_node,
&filter_intx,
&filter_max,
&scale_max,
!transpose_w,
weight_scale,
false);
}
(*fusion_nodes_map)["w"] = filter_intx;
(*fusion_nodes_map)["w_max"] = filter_max;
(*fusion_nodes_map)["scale_max"] = scale_max;
}
void FcXPUFusePass::CreateFusionOutputs(
ir::Graph* graph,
Scope* scope,
BlockDesc* block,
const std::map<std::string, std::map<std::string, Node*>>& nodes_map,
std::map<std::string, Node*>* fusion_nodes_map,
std::string op_weights_precision,
std::unordered_map<std::string, std::vector<float>>* var_quant_scales)
const {
auto* mul = GetNodeFromNodesMap(nodes_map, "mul", "mul");
PADDLE_ENFORCE_EQ(
mul != nullptr,
true,
common::errors::InvalidArgument("mul node ptr can not be null"));
// output && output max
std::string fc_xpu_out_name;
Node* fc_out_var_node = nullptr;
auto* bn = GetNodeFromNodesMap(nodes_map, "bn", "bn");
auto* ew_bias_add =
GetNodeFromNodesMap(nodes_map, "ew_bias_add", "ew_bias_add");
auto* act = GetNodeFromNodesMap(nodes_map, "act", "act");
if (act) {
auto* act_out = GetNodeFromNodesMap(nodes_map, "act", "act_out");
PADDLE_ENFORCE_EQ(
act_out != nullptr,
true,
common::errors::InvalidArgument("act_out node ptr can not be null"));
fc_xpu_out_name = act_out->Name();
fc_out_var_node = act_out;
} else if (bn) {
auto* bn_out = GetNodeFromNodesMap(nodes_map, "bn", "bn_out");
PADDLE_ENFORCE_EQ(
bn_out != nullptr,
true,
common::errors::InvalidArgument("bn_out node ptr can not be null"));
fc_xpu_out_name = bn_out->Name();
fc_out_var_node = bn_out;
} else if (ew_bias_add) {
auto* ew_bias_add_out =
GetNodeFromNodesMap(nodes_map, "ew_bias_add", "ew_bias_add_out");
PADDLE_ENFORCE_EQ(ew_bias_add_out != nullptr,
true,
common::errors::InvalidArgument(
"ew_bias_add_out node ptr can not be null"));
fc_xpu_out_name = ew_bias_add_out->Name();
fc_out_var_node = ew_bias_add_out;
} else {
auto* mul_out = GetNodeFromNodesMap(nodes_map, "mul", "mul_out");
PADDLE_ENFORCE_EQ(
mul_out != nullptr,
true,
common::errors::InvalidArgument("mul_out node ptr can not be null"));
fc_xpu_out_name = mul_out->Name();
fc_out_var_node = mul_out;
}
(*fusion_nodes_map)["out"] = fc_out_var_node;
// Create out max in
if (op_weights_precision == "int8" &&
AreScalesPresentForNodes(var_quant_scales, {fc_out_var_node})) {
std::string fc_out_max_in_name = fc_xpu_out_name + "_max_in";
int max_ptr_size = phi::backends::xpu::get_xpu_max_ptr_size(-1);
VarDesc fc_out_max_in_desc(fc_out_max_in_name);
fc_out_max_in_desc.SetPersistable(true);
fc_out_max_in_desc.SetShape({static_cast<int64_t>(max_ptr_size)});
fc_out_max_in_desc.SetDataType(proto::VarType::Type::VarType_Type_FP32);
Node* fc_xpu_out_max_in = graph->CreateVarNode(&fc_out_max_in_desc);
auto* block_out_max_in_desc = block->Var(fc_out_max_in_name);
block_out_max_in_desc->SetPersistable(fc_out_max_in_desc.Persistable());
block_out_max_in_desc->SetShape(fc_out_max_in_desc.GetShape());
block_out_max_in_desc->SetDataType(fc_out_max_in_desc.GetDataType());
float output_scale =
GetScaleValueForNode(var_quant_scales, fc_out_var_node);
phi::DenseTensor out_max_in_cpu_tensor;
auto* cpu_ctx = static_cast<phi::CPUContext*>(
phi::DeviceContextPool::Instance().Get(phi::CPUPlace()));
out_max_in_cpu_tensor.set_type(phi::DataType::FLOAT32);
out_max_in_cpu_tensor.Resize({max_ptr_size});
std::vector<float> output_scales(max_ptr_size, output_scale);
memcpy(cpu_ctx->Alloc<float>(&out_max_in_cpu_tensor),
output_scales.data(),
max_ptr_size * sizeof(float));
Assign(out_max_in_cpu_tensor,
scope->Var(fc_out_max_in_name)->GetMutable<phi::DenseTensor>());
(*fusion_nodes_map)["out_max_in"] = fc_xpu_out_max_in;
}
// Create out max
std::string fc_out_max_name = fc_xpu_out_name + "_max";
VarDesc fc_out_max_desc(fc_out_max_name);
Node* fc_xpu_out_max = graph->CreateVarNode(&fc_out_max_desc);
(*fusion_nodes_map)["out_max"] = fc_xpu_out_max;
}
void FcXPUFusePass::CreateFusionInputs(
ir::Graph* graph,
Scope* scope,
BlockDesc* block,
const std::map<std::string, std::map<std::string, Node*>>& nodes_map,
std::map<std::string, Node*>* fusion_nodes_map,
std::string op_weights_precision,
std::unordered_map<std::string, std::vector<float>>* var_quant_scales)
const {
// Get Node
auto* mul = GetNodeFromNodesMap(nodes_map, "mul", "mul");
PADDLE_ENFORCE_EQ(
mul != nullptr,
true,
common::errors::InvalidArgument("mul node ptr can not be null"));
auto* mul_x = GetNodeFromNodesMap(nodes_map, "mul", "mul_x");
PADDLE_ENFORCE_EQ(
mul_x != nullptr,
true,
common::errors::InvalidArgument("mul_x node ptr can not be null"));
// x max
std::string mul_x_max_name = mul_x->Name() + "_input_max";
Node* mul_x_max = nullptr;
if (op_weights_precision == "int8") {
PADDLE_ENFORCE_EQ(AreScalesPresentForNodes(var_quant_scales, {mul_x}),
true,
common::errors::InvalidArgument(
"When fc op is running in int8 precision, the scales "
"of input var should be present in!"));
float input_scale = GetScaleValueForNode(var_quant_scales, mul_x);
int max_ptr_size = phi::backends::xpu::get_xpu_max_ptr_size(-1);
VarDesc x_max_desc(mul_x_max_name);
x_max_desc.SetPersistable(
true); // Need depends on ir_params_sync_among_devices_pass copy to xpu
// device
x_max_desc.SetShape({static_cast<int64_t>(max_ptr_size)});
x_max_desc.SetDataType(proto::VarType::Type::VarType_Type_FP32);
mul_x_max = graph->CreateVarNode(&x_max_desc);
auto input_max_tensor =
scope->Var(mul_x_max_name)->GetMutable<phi::DenseTensor>();
input_max_tensor->set_type(phi::DataType::FLOAT32);
input_max_tensor->Resize({max_ptr_size});
auto* cpu_ctx = static_cast<phi::CPUContext*>(
phi::DeviceContextPool::Instance().Get(phi::CPUPlace()));
std::vector<float> input_scales(max_ptr_size, input_scale);
memcpy(cpu_ctx->Alloc<float>(input_max_tensor),
input_scales.data(),
max_ptr_size * sizeof(float));
}
(*fusion_nodes_map)["x"] = mul_x;
(*fusion_nodes_map)["x_max"] = mul_x_max;
}
int FcXPUFusePass::ApplyImpl(ir::Graph* graph,
const std::string& mul_type,
bool with_bias,
bool with_bn,
const std::string& act_type) const {
GraphPatternDetector gpd;
patterns::FcXPUPattern pattern(gpd.mutable_pattern(),
name_scope_,
mul_type,
with_bias,
with_bn,
act_type);
auto* scope = param_scope();
std::unordered_map<std::string, std::vector<float>> var_quant_scales =
GetQuantInfoFromTheGraph(graph, "has_quant_info", "var_quant_scales");
int found_subgraph_count = 0;
auto handler = [&](const GraphPatternDetector::subgraph_t& subgraph,
Graph* graph) {
VLOG(4) << "handle FcXPUFusePass fuse";
GET_IR_NODE(mul_x);
GET_IR_NODE(mul);
GET_IR_NODE(mul_out);
GET_IR_NODE(bias);
GET_IR_NODE(add);
GET_IR_NODE(add_out);
GET_IR_NODE(bn);
GET_IR_NODE(bn_bias);
GET_IR_NODE(bn_mean);
GET_IR_NODE(bn_scale);
GET_IR_NODE(bn_var);
GET_IR_NODE(bn_out);
GET_IR_NODE(bn_var_out);
GET_IR_NODE(bn_mean_out);
GET_IR_NODE(bn_saved_var);
GET_IR_NODE(bn_saved_mean);
GET_IR_NODE(act);
GET_IR_NODE(act_out);
std::map<std::string, std::map<std::string, Node*>> nodes_map;
nodes_map.insert(
{"mul", {{"mul", mul}, {"mul_x", mul_x}, {"mul_out", mul_out}}});
nodes_map.insert({"ew_bias_add",
{{"ew_bias_add", add},
{"ew_bias_add_bias", bias},
{"ew_bias_add_out", add_out}}});
nodes_map.insert({"bn",
{{"bn", bn},
{"bn_bias", bn_bias},
{"bn_mean", bn_mean},
{"bn_scale", bn_scale},
{"bn_var", bn_var},
{"bn_out", bn_out},
{"bn_var_out", bn_var_out},
{"bn_mean_out", bn_mean_out},
{"bn_saved_var", bn_saved_var},
{"bn_saved_mean", bn_saved_mean}}});
nodes_map.insert({"act", {{"act", act}, {"act_out", act_out}}});
std::map<std::string, Node*> fusion_nodes_map{{"x", nullptr},
{"x_max", nullptr},
{"w", nullptr},
{"w_max", nullptr},
{"bias", nullptr},
{"scale_max", nullptr},
{"out_max_in", nullptr},
{"out", nullptr},
{"out_max", nullptr}};
auto mul_w_name = mul->Op()->Input("Y")[0];
Node* mul_w = FindNodeWithName(graph, mul_w_name);
if (!mul_w->Var()->Persistable() || mul_w->Var()->GetShape().size() != 2) {
return;
}
auto filter_data_type = scope->FindVar(mul->Op()->Input("Y")[0])
->GetMutable<phi::DenseTensor>()
->dtype();
std::string op_weights_precision = "float32";
if (filter_data_type == phi::DataType::INT8) {
op_weights_precision = "int8";
} else if (filter_data_type == phi::DataType::FLOAT16) {
op_weights_precision = "float16";
}
if (op_weights_precision == "float32" &&
AreScalesPresentForNodes(&var_quant_scales, {mul_w})) {
// convert weight to int8
auto* var = scope->FindVar(mul_w_name);
PADDLE_ENFORCE_NOT_NULL(
var,
common::errors::NotFound(
"The input persistable [%s] var of [%s] op is not found.",
mul_w_name));
auto* weight_tensor = var->GetMutable<phi::DenseTensor>();
float* fp32_weight_data = weight_tensor->data<float>();
std::vector<int8_t> weight_data;
weight_data.resize(weight_tensor->numel());
for (int i = 0; i < weight_tensor->numel(); i++) {
weight_data[i] = static_cast<int8_t>(fp32_weight_data[i]);
}
const auto weight_dims = weight_tensor->dims();
weight_tensor->clear(); // clear int weight
weight_tensor->set_type(phi::DataType::INT8);
weight_tensor->Resize(common::make_ddim(common::vectorize(weight_dims)));
auto* cpu_ctx = static_cast<phi::CPUContext*>(
phi::DeviceContextPool::Instance().Get(phi::CPUPlace()));
auto* new_weight_data = cpu_ctx->Alloc<int8_t>(weight_tensor);
memcpy(new_weight_data,
weight_data.data(),
weight_tensor->numel() * sizeof(int8_t));
op_weights_precision = "int8";
}
VLOG(4) << "FC fusion fuse pass is running on " << op_weights_precision
<< " precision!";
auto* block = mul->Op()->Block();
CreateFusionWeightsAndBias(graph,
scope,
block,
mul_type,
nodes_map,
&fusion_nodes_map,
with_bias,
with_bn,
op_weights_precision,
&var_quant_scales);
CreateFusionInputs(graph,
scope,
block,
nodes_map,
&fusion_nodes_map,
op_weights_precision,
&var_quant_scales);
CreateFusionOutputs(graph,
scope,
block,
nodes_map,
&fusion_nodes_map,
op_weights_precision,
&var_quant_scales);
// Generate fc_xpu op
framework::OpDesc fc_xpu_op_desc(block);
fc_xpu_op_desc.SetType("fc_xpu");
fc_xpu_op_desc.SetInput("x", {fusion_nodes_map["x"]->Name()});
if (fusion_nodes_map["x_max"]) {
fc_xpu_op_desc.SetInput("x_max", {fusion_nodes_map["x_max"]->Name()});
}
fc_xpu_op_desc.SetInput("w", {fusion_nodes_map["w"]->Name()});
fc_xpu_op_desc.SetInput("w_max", {fusion_nodes_map["w_max"]->Name()});
if (fusion_nodes_map["bias"]) {
fc_xpu_op_desc.SetInput("bias", {fusion_nodes_map["bias"]->Name()});
}
if (fusion_nodes_map["scale_max"]) {
fc_xpu_op_desc.SetInput("scale_max",
{fusion_nodes_map["scale_max"]->Name()});
}
if (fusion_nodes_map["out_max_in"]) {
fc_xpu_op_desc.SetInput("out_max_in",
{fusion_nodes_map["out_max_in"]->Name()});
}
fc_xpu_op_desc.SetOutput("out", {fusion_nodes_map["out"]->Name()});
fc_xpu_op_desc.SetOutput("out_max", {fusion_nodes_map["out_max"]->Name()});
fc_xpu_op_desc.SetAttr(
"in_num_col_dims",
static_cast<int>(mul_x->Var()->GetShape().size() - 1));
if (mul_type == "mul") {
fc_xpu_op_desc.SetAttr(
"in_num_col_dims",
PADDLE_GET_CONST(int, mul->Op()->GetAttr("x_num_col_dims")));
}
fc_xpu_op_desc.SetAttr("transpose_x", false);
fc_xpu_op_desc.SetAttr("alpha", 1.f);
fc_xpu_op_desc.SetAttr("beta", 0.f);
if (mul_type == "matmul") {
fc_xpu_op_desc.SetAttr(
"alpha", PADDLE_GET_CONST(float, mul->Op()->GetAttr("alpha")));
}
fc_xpu_op_desc.SetAttr("act_type", 0);
fc_xpu_op_desc.SetAttr("act_alpha", 0.f);
if (act) {
fc_xpu_op_desc.SetAttr("act_type", ConvertActivationType(act_type));
if (act_type == "leaky_relu") {
fc_xpu_op_desc.SetAttr(
"act_alpha", PADDLE_GET_CONST(float, act->Op()->GetAttr("alpha")));
} else if (act_type == "hard_sigmoid") {
fc_xpu_op_desc.SetAttr(
"act_alpha", PADDLE_GET_CONST(float, act->Op()->GetAttr("slope")));
}
}
// out_dtype is same to input precision
fc_xpu_op_desc.SetAttr("out_dtype",
fusion_nodes_map["x"]->Var()->GetDataType());
auto* fc_xpu = graph->CreateOpNode(&fc_xpu_op_desc);
IR_NODE_LINK_TO(fusion_nodes_map["x"], fc_xpu);
if (fusion_nodes_map["x_max"]) {
IR_NODE_LINK_TO(fusion_nodes_map["x_max"], fc_xpu);
}
IR_NODE_LINK_TO(fusion_nodes_map["w"], fc_xpu);
IR_NODE_LINK_TO(fusion_nodes_map["w_max"], fc_xpu);
if (fusion_nodes_map["scale_max"]) {
IR_NODE_LINK_TO(fusion_nodes_map["scale_max"], fc_xpu);
}
if (fusion_nodes_map["bias"]) {
IR_NODE_LINK_TO(fusion_nodes_map["bias"], fc_xpu);
}
if (fusion_nodes_map["out_max_in"]) {
IR_NODE_LINK_TO(fusion_nodes_map["out_max_in"], fc_xpu);
}
IR_NODE_LINK_TO(fc_xpu, fusion_nodes_map["out"]);
IR_NODE_LINK_TO(fc_xpu, fusion_nodes_map["out_max"]);
// delete useless node
std::unordered_set<const Node*> delete_nodes;
if (mul != nullptr) {
delete_nodes.insert(mul);
}
if (bn != nullptr) {
delete_nodes.insert(bn);
}
if (add != nullptr) {
delete_nodes.insert(add);
}
if (act != nullptr) {
delete_nodes.insert(act);
}
GraphSafeRemoveNodes(graph, delete_nodes);
found_subgraph_count++;
};
gpd(graph, handler);
return found_subgraph_count;
}
} // namespace ir
} // namespace framework
} // namespace paddle
REGISTER_PASS(fc_xpu_fuse_pass, paddle::framework::ir::FcXPUFusePass);
REGISTER_PASS_CAPABILITY(fc_xpu_fuse_pass)
.AddCombination(
paddle::framework::compatible::OpVersionComparatorCombination().EQ(
"fc_xpu", 0));
```
|
```scss
/**
*
*
* 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.
*/
:host ::ng-deep {
.tb-scada-symbol-appearance-properties {
gap: 16px;
display: flex;
flex-direction: column;
}
}
```
|
The South African Fezela XI (often known simply as the Fezelas) was a team of young South African cricketers who toured England in 1961 under the captaincy of the Test player Roy McLean. Several of the team later went on to play leading parts in the revival of South Africa’s cricket fortunes in the 1960s.
Background
South Africa's tour of England in 1960 had been a failure. "From nearly every point of view the ninth South African tour of England proved disappointing," Wisden began its report. First, it was a wet summer, and many matches were disrupted by rain. Second, the young fast bowler Geoff Griffin was no-balled for throwing on several occasions, effectively ending his career. Third, anti-apartheid demonstrations were held outside most venues. Fourth, none of the young players showed signs of developing into good Test players. Fifth, South Africa lost the first three Tests and drew the other two. Sixth, the tour showed a financial loss. Seventh, apart from Roy McLean the South Africans "found themselves short of enterprising batsmen".
The effect in South Africa was immediate. "Interest in South African domestic cricket waned alarmingly during the 1960-61 season," reported Wisden. "It became increasingly obvious as the season progressed that the disappointment at the Springboks' Test performances in England added to lack of enterprise and an 'avoid-defeat-at-all-costs' attitude had left a deep-seated scar which only a complete volte face would heal."
A cricket lover, E. Stanley Murphy, stepped in with an offer to sponsor a team of young players on a tour of England. Murphy had made his fortune as a leading figure in the sugar industry at Umfolozi in Zululand. He provided all the money for the tour and asked McLean to select the side. Murphy named the team fezela, the Zulu word for the water scorpion, an aquatic insect that can deliver a wasp-like sting.
The tour
A tour of 21 matches in England, Scotland and Ireland was arranged, and McLean selected the following team (with their ages at the start of the tour):
Roy McLean (Natal) 30, right-hand batsman (captain)
Kim Elgie (Natal) 28, right-hand batsman, slow left-arm orthodox bowler (vice-captain)
Eddie Barlow (Transvaal) 20, right-hand batsman, right-arm medium-pace bowler
Colin Bland (Rhodesia) 23, right-hand batsman
Jackie Botten (North-Eastern Transvaal) 22, right-arm fast bowler
Graham Bunyard (Transvaal) 21, right-arm fast bowler
Christopher Burger (Natal) 25, right-hand batsman
Ian Fullerton (Transvaal) 25, right-hand opening batsman
Ray Gripper (Rhodesia) 22, right-hand opening batsman
Denis Lindsay (North-Eastern Transvaal) 21, right-hand batsman, wicketkeeper
Lynton Morby-Smith (Natal) 25, right-hand batsman
Peter Pollock (Eastern Province) 19, right-arm fast bowler
Colin Rushmere (Western Province) 24, right-hand batsman, right-arm medium-pace bowler
Peter van der Merwe (Western Province) 24, right-hand batsman, slow left-arm orthodox bowler
(David Pithey was originally selected, but had to withdraw just before the tour began, and was replaced by Barlow.)
The team was managed by C.O. Medworth, who at the time was sports editor of the Natal Mercury.
Of the 21 matches played in June and July 1961, the team won 12 and drew the rest. It won all three first-class matches (against Essex, Combined Services and Gloucestershire) easily.
"The fellows really learned to hit the ball. I gave them free rein ... There was none of this push and prod," McLean said. Wisden'''s brief report noted that "The batting was aggressive, bowling keen and fielding splendid", and that nearly two-thirds of the runs were scored in fours and sixes.
Influence of the tour
Barlow, Pollock, Bland and Elgie played their first Test matches in the series against New Zealand a few months later in 1961-62; Lindsay and van der Merwe against Australia in 1963-64; Botten against England in 1965.
When van der Merwe captained South Africa to victory in England in 1965 (South Africa’s first series victory since 1953-54, and first in England since 1935), Wisden'' praised the South Africans' new-found "willingness to hit the ball" and their "enterprising methods". It continued: "Much of the credit for the transformation must go to that exuberant character R. A. McLean, who ... moulded the new Springboks when he brought the Fezela side to England in 1961."
Of the 30 Tests South Africa played between the Fezela tour and isolation after the 1969-70 series against Australia, Barlow played all 30, Pollock 28, Bland 21, Lindsay 19 and van der Merwe 15 (eight as captain). Only Trevor Goddard, who was too experienced to be considered for the Fezela tour, and Graeme Pollock, who was too young, played as many Tests in that period.
References
External links
South Africa Fezelas at CricketArchive
Former senior cricket clubs in South Africa
South African first-class cricket teams
1961 in English cricket
1961 in South African cricket
|
HD 32820, also known as HR 1651, is a yellowish-white hued star located in the southern constellation Caelum, the chisel. It has an apparent magnitude of 6.3, placing it near the limit of naked eye visibility. The object is located relatively close at a distance of 103 light years based on parallax measurements from Gaia DR3, but is receding with a heliocentric radial velocity of .
HD 32820 has a stellar classification of F8 V, indicating that it is an ordinary F-type main-sequence star that is generating energy via hydrogen fusion at its core. It has 125% the mass of the Sun and 133% of its radius. It radiates double the luminosity of the Sun from its photosphere at an effective temperature of . HD 32820 is said to be 3.46 billion years old, slightly younger than the Sun , and has a near solar iron abundance. The star spins modestly with a projected rotational velocity of and is chromospherically inactive
References
F-type main-sequence stars
32820
23555
1651
CD-41 01690
Caeli, 27
Caelum
|
William Lionel Clause (7 May 1887 – 9 September 1946) was an English artist.
Early life
Born in Middleton, Lancashire, the son of William H. Clause and his wife Minna, Clause was educated at Gresham's School, Holt, and at the Slade School of Art, where he was taught by Professors Frederick Brown and Henry Tonks.
He married Lucy Sampson, the elder daughter of Professor R. A. Sampson, Astronomer Royal of Scotland, and they had one daughter.
Career
Primarily a landscape painter in oil and watercolour, Clause exhibited at the New English Art Club and the International Society of Sculptors, Painters and Gravers. He lived in London and found many of his subjects near home.
Clause is represented in many public collections. Seven of his drawings were acquired by the Contemporary Art Society and several by the War Artists' Advisory Committee for the National Gallery. He is represented by three works in Manchester, two in Bradford, one in Leamington, and one in Carlisle.
Beyond his work as a painter, Clause was Honorary Secretary of the New English Art Club and was also a member of the Chelsea Arts Club. At the time of his death in 1946, he was living at 16, New End Square, Hampstead, London.
References
External links
William Lionel Clause on artnet.com
20th-century English painters
English male painters
1887 births
1946 deaths
Alumni of the Slade School of Fine Art
People educated at Gresham's School
People from Heysham
English landscape painters
20th-century English male artists
|
Tawfeeq Ahmed Khalil Almansoor (; born 14 November 1957) is a Bahraini diplomat. He served as the permanent Ambassador to the United Nations for Bahrain from 2003 to 2011. He presented his credentials to the Secretary-General of the United Nations Kofi Annan on 21 May 2003. He also served as Vice-President of the General Assembly of the United Nations.
Biography
Tawfeel Almansoor was born in Bahrain on the 14th of November, 1957. He obtained a bachelor's degree in law at Cairo University in 1980 as well as a diploma in international law from The Hague Academy of International Law in 1988. He joined the country's Ministry of Foreign Affair's in 1981, working under the legal directorate until 1990.
Since 1990, he has worked as first secretary for the Bahraini embassy in Washington DC. From 1995 to 1999, he became the first secretary of Bahrain's mission to the United Nations wherein he represented Bahrain at the UN General Assembly three times (1997—1999) and the UN Security Council after the country was voted into the council in 1997. In 1999, he was awarded a master's degree in international relations from St John's University, New York. From August 1999 to 2001, he was reassigned as deputy chief of the Bahraini embassy in Cairo, Egypt. As part of his tenure, he represented Bahrain at various Arab League summits during this time.
In September 2001, he was appointed as ambassador of Bahrain to the Russian Federation, a position he held until May 2003 when he became the Bahraini ambassador to the United Nations. One of his duties include promoting Bahrain through Arab states. Almansoor was appointed as the permanent representative to the United Nations for the Kingdom of Bahrain in 2003 and remained at this post until 2011. He currently servies as Assistant Undersecretary for Western Countries & Afro-Asian Affairs at the Bahraini foreign ministry.
References
External links
Bahrain Mission to the United Nations
Living people
Bahraini diplomats
Permanent Representatives of Bahrain to the United Nations
1957 births
|
```smalltalk
using UnityEngine;
using SimpleNetManager;
using System.Collections.Generic;
using UnityEngine.SceneManagement;
using SimpleNetCore;
namespace UnityRemoteConsole
{
public class AppInfoService : CustomServiceBase
{
public override string FunctionName
{
get
{
return "AppInfo";
}
}
private static List<ShowInfoData> infoDatas = new List<ShowInfoData>();
public override void OnStart()
{
}
protected override void OnFunctionClose()
{
}
protected override void OnFunctionOpen()
{
}
protected override void OnPlayerLogin(SimpleNetManager.Player player)
{
foreach (var item in infoDatas)
{
Send2Client(player, item);
}
}
private static void Send2Client(SimpleNetManager.Player player, ShowInfoData data)
{
if (NetServer.NetManager != null)
{
AppInfoData2Client msg = new AppInfoData2Client();
msg.data = data;
NetServer.NetManager.Send(player.session, msg);
}
}
private static void Send2AllPlayer(ShowInfoData data)
{
SimpleNetManager.Player[] players = SimpleNetManager.PlayerManager.GetAllPlayers();
foreach (var p in players)
{
Send2Client(p, data);
}
}
private static ShowInfoData GetShowInfoData(string typeName, string label, string key)
{
foreach (var item in infoDatas)
{
if (item.typeName == typeName &&
item.label == label &&
item.key == key)
{
return item;
}
}
return null;
}
public static void AddInfoValue(string typeName, string label, string key, object value, string description = null)
{
try
{
if (string.IsNullOrEmpty(typeName) ||
string.IsNullOrEmpty(label) ||
string.IsNullOrEmpty(key))
{
Debug.LogError("typeName or label or key cant be null");
return;
}
if (value == null)
{
Debug.LogError("value cant be null!" + " typeName:" + typeName + " label:" + label + " key:" + key);
return;
}
ShowInfoData data = GetShowInfoData(typeName, label, key);
string valueStr = SimpleJsonUtils.ToJson(value);
string valueTypeStr = value.GetType().FullName;
bool isSend = false;
if (data == null)
{
data = new ShowInfoData();
data.typeName = typeName;
data.label = label;
data.key = key;
data.value = valueStr;
data.valueTypeStr = valueTypeStr;
data.discription = description;
infoDatas.Add(data);
isSend = true;
}
else
{
if (data.valueTypeStr != valueTypeStr)
{
Debug.LogError(" Path:" + data.GetPath() + " already have value Type:" + data.valueTypeStr + " can not set Value Type:" + valueStr);
return;
}
else
{
if (data.value != valueStr)
{
data.value = valueStr;
isSend = true;
}
if (!string.IsNullOrEmpty(description) && data.discription != description)
{
data.discription = description;
isSend = true;
}
}
}
if (isSend)
{
Send2AllPlayer(data);
}
}
catch (System.Exception e)
{
Debug.LogError(e);
}
}
}
public class ShowInfoData : INetSerializable
{
/// <summary>
/// Type Name
/// </summary>
public string typeName;
/// <summary>
/// like CPU in System Info
/// </summary>
public string label;
/// <summary>
/// value name like
/// </summary>
public string key;
public string valueTypeStr;
public string value;
public string discription;
public void Deserialize(NetDataReader reader)
{
typeName = reader.GetString();
label = reader.GetString();
key = reader.GetString();
valueTypeStr = reader.GetString();
value = reader.GetString();
discription = reader.GetString();
}
public void Serialize(NetDataWriter writer)
{
writer.Put(typeName);
writer.Put(label);
writer.Put(key);
writer.Put(valueTypeStr);
writer.Put(value);
writer.Put(discription);
}
public string GetPath()
{
return typeName + "/" + label + "/" + key;
}
public override string ToString()
{
return GetPath()+" :"+value;
}
}
}
```
|
```xml
import supertest from 'supertest';
import { describe, test } from 'vitest';
import { HEADERS, HEADER_TYPE, HTTP_STATUS, TOKEN_BEARER } from '@verdaccio/core';
import { buildToken } from '@verdaccio/utils';
import { createUser, initializeServer } from './_helper';
describe('profile ', () => {
describe('get profile ', () => {
test('should return Unauthorized if header token is missing', async () => {
const app = await initializeServer('profile.yaml');
return supertest(app)
.get('/-/npm/v1/user')
.expect(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON_CHARSET)
.expect(HTTP_STATUS.UNAUTHORIZED);
});
test('should return user details', async () => {
const app = await initializeServer('profile.yaml');
const credentials = { name: 'test', password: 'test' };
const response = await createUser(app, credentials.name, credentials.password);
return supertest(app)
.get('/-/npm/v1/user')
.set(HEADERS.AUTHORIZATION, buildToken(TOKEN_BEARER, response.body.token))
.expect(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON_CHARSET)
.expect(HTTP_STATUS.OK);
});
});
describe('post profile ', () => {
test('should return Unauthorized if header token is missing', async () => {
const app = await initializeServer('profile.yaml');
return supertest(app)
.post('/-/npm/v1/user')
.send({})
.expect(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON_CHARSET)
.expect(HTTP_STATUS.UNAUTHORIZED);
});
test('should return handle to short new password', async () => {
const app = await initializeServer('profile.yaml');
const credentials = { name: 'test', password: 'test' };
const response = await createUser(app, credentials.name, credentials.password);
return supertest(app)
.post('/-/npm/v1/user')
.send({ password: { new: '_' } })
.set(HEADERS.AUTHORIZATION, buildToken(TOKEN_BEARER, response.body.token))
.expect(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON_CHARSET)
.expect(HTTP_STATUS.UNAUTHORIZED);
});
test('should return handle to missing old password', async () => {
const app = await initializeServer('profile.yaml');
const credentials = { name: 'test', password: 'test' };
const response = await createUser(app, credentials.name, credentials.password);
return supertest(app)
.post('/-/npm/v1/user')
.send({ password: { new: 'fooooo', old: undefined } })
.set(HEADERS.AUTHORIZATION, buildToken(TOKEN_BEARER, response.body.token))
.expect(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON_CHARSET)
.expect(HTTP_STATUS.BAD_REQUEST);
});
test('should return handle to missing password', async () => {
const app = await initializeServer('profile.yaml');
const credentials = { name: 'test', password: 'test' };
const response = await createUser(app, credentials.name, credentials.password);
return supertest(app)
.post('/-/npm/v1/user')
.send({ another: '_' })
.set(HEADERS.AUTHORIZATION, buildToken(TOKEN_BEARER, response.body.token))
.expect(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON_CHARSET)
.expect(HTTP_STATUS.INTERNAL_ERROR);
});
test('should return handle change password', async () => {
const app = await initializeServer('profile.yaml');
const credentials = { name: 'test', password: 'test' };
const response = await createUser(app, credentials.name, credentials.password);
return supertest(app)
.post('/-/npm/v1/user')
.send({ password: { new: 'good password_.%#@$@#$@#', old: 'test' } })
.set(HEADERS.AUTHORIZATION, buildToken(TOKEN_BEARER, response.body.token))
.expect(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON_CHARSET)
.expect(HTTP_STATUS.OK);
});
test('should return handle change password failure', async () => {
const app = await initializeServer('profile.yaml');
const credentials = { name: 'test', password: 'test' };
const response = await createUser(app, credentials.name, credentials.password);
return supertest(app)
.post('/-/npm/v1/user')
.send({ password: { new: 'good password_.%#@$@#$@#', old: 'test_do_not_match' } })
.set(HEADERS.AUTHORIZATION, buildToken(TOKEN_BEARER, response.body.token))
.expect(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON_CHARSET)
.expect(HTTP_STATUS.FORBIDDEN);
});
test('should handle tfa ( two factor auth) disabled', async () => {
const app = await initializeServer('profile.yaml');
const credentials = { name: 'test', password: 'test' };
const response = await createUser(app, credentials.name, credentials.password);
return supertest(app)
.post('/-/npm/v1/user')
.send({ tfa: '_' })
.set(HEADERS.AUTHORIZATION, buildToken(TOKEN_BEARER, response.body.token))
.expect(HEADER_TYPE.CONTENT_TYPE, HEADERS.JSON_CHARSET)
.expect(HTTP_STATUS.SERVICE_UNAVAILABLE);
});
});
});
```
|
Don Jon is a 2013 American romantic comedy-drama film written and directed by Joseph Gordon-Levitt in his feature directorial debut. The film stars Gordon-Levitt, Scarlett Johansson, and Julianne Moore, with Rob Brown, Glenne Headly, Brie Larson, and Tony Danza in supporting roles. The film premiered under its original title Don Jon's Addiction at the Sundance Film Festival on January 18, 2013, and was released in the United States on September 27, 2013. The film grossed $41 million worldwide and received generally positive reviews from critics.
Plot
Jon Martello is a young Italian-American and modern-day Don Juan living in New Jersey. He enjoys his independent life, which consists of working out, caring for his apartment, driving his 1972 Chevrolet Chevelle SS, going to church with his family, and engaging in a casual sex life. Though he enjoys sex, he is more satisfied by masturbating to hardcore pornography.
While at a nightclub with his two best friends, Jon becomes enamored with Barbara Sugarman, a beautiful young woman from an affluent background. Despite heavy flirting, she declines his offer for a one-night stand. Finding her on Facebook, Jon invites Barbara to lunch. There is mutual attraction, but she insists on a long-term courtship and demands that he always be honest. Their relationship proceeds over a month and without sex. Barbara encourages Jon to take a nighttime community college class to obtain a career outside the service industry, and he indulges her love of romance films, which he usually dismisses as fantasy. They meet each other's friends and families, and Jon's parents are immediately smitten by Barbara.
Jon and Barbara finally have sex, but he is still dissatisfied. He considers her body perfect, but still finds porn more satisfying. Barbara catches Jon watching porn, but he manages to convince her that it was a joke email sent by a friend. Their relationship resumes, with Jon concealing his habit from Barbara as it becomes an addiction.
After class, Jon catches Esthera middle-aged classmateweeping by herself, and when she sits next to him just before the next class to explain herself, she catches him watching porn on his cell phone. She teases him about watching this type of video, but he brushes her off.
Before the next class Esther shocks Jon by handing him an erotic video which she believes has a healthier depiction of sex. Barbara finds Jon’s porn history on his laptop and breaks up with him.
Jon tries to go back to his old life but struggles to do so. His friend persuades him to return to community college where he sees Esther again - after class they wind up having sex in her parked car. She asks why he loves porn so much, and he reveals that he wants to get lost in sex, but cannot do that with a partner. Esther persuades Jon to try masturbating without porn, but he is unable to. They continue having casual sex and Esther expresses the belief that Jon enjoys sex alone because he has not found a real intimate connection with a romantic partner and focuses merely on his own satisfaction. After suggesting they take a bath together, Esther starts crying in the hall and doesn’t join him. He comes out to find her sad and smoking a cigarette in the living room, where she reveals that her husband and son died in a car crash just fourteen months prior. The intimacy of this moment deepens their emotional connection, and Jon experiences truly satisfying sex for the first time in his life.
Jon tells his family about the breakup with Barbara. While his parents are upset, his sister Monica bluntly tells him that Barbara's demands showed that she wanted to date someone who allowed her to control him. Jon meets with Barbara and apologizes for lying to her. They discuss her expectations, which he asserts were unattainable, and she tells him not to call her again.
Although, or because, she is considerably older and neither of them has any interest in marriage, Jon and Esther happily begin dating and “lose” themselves when being intimate.
Cast
Production
Development for Don Jon began in 2008, when Gordon-Levitt wrote early notes about the film. Rian Johnson gave feedback during the writing process and reviewed several cuts of the film. Christopher Nolan cautioned against both directing and starring in the film due to the extra challenges it would bring.
Gordon-Levitt has credited his experience directing short films for HitRecord for teaching him what he needed to know to make Don Jon and has said that he hopes to make films in a more collaborative way in the future.
Principal photography for Don Jon began in May 2012.
Rating
In the United States, the film was originally certified NC-17, due to some explicit pornography that Jon watches. Gordon-Levitt decided to remove some of the more graphic scenes to qualify for an R rating because he felt the original rating would cause people to think the movie was about pornography.
Reception
Box office
Don Jon grossed $24.5 million in North America and $16.5 million internationally, for a total worldwide gross of $41 million.
Critical response
Rotten Tomatoes reports an approval rating of 80% based on 202 reviews, with a rating average of 6.8/10. The website's critical consensus states: "Don Jon proves to be an amiable directing debut for Joseph Gordon-Levitt, and a vivacious showcase for his co-star, Scarlett Johansson." Metacritic gives a weighted average score of 66 out of 100 based on 41 critics, indicating "generally favorable reviews". Audiences surveyed by CinemaScore on its opening weekend gave Don Jon an average grade of "C+" on an A+ to F scale.
Don Jon received very positive reviews at the Sundance Film Festival. Entertainment Weekly managing editor Jess Cagle called the film "one of the best movies I saw at the fest" and wrote "Funny, touching, smart, and supremely confident, Don Jon is also Gordon-Levitt's feature directorial debut, and it establishes him as one of Hollywood's most exciting new directors." William Goss of Film.com praised Gordon-Levitt for his "assured style" as both director and screenwriter. Edward Douglas of ComingSoon.net gave high praise to the screenplay. Consensus of the film when it was played at the Sundance Film Festival, as noted by Odie Henderson, was that Don Jon was a "more fun version" of the 2011 film Shame.
The supporting actresses Scarlett Johansson and Julianne Moore received praise for their performances. Stephanie Zacharek of The Village Voice praised the film, writing: "There's no dancing in Gordon-Levitt's writing-directing debut, Don Jon, although the movie is so heavily reminiscent—in the good way—of Saturday Night Fever that an arm-swinging paint-can reverie wouldn't be out of place."
Accolades
Home media
Don Jon was released on DVD and Blu-ray on December 31, 2013 (New Year's Eve). By June 2014, over two million copies of the Blu-ray were sold.
References
External links
2013 films
2013 directorial debut films
2013 independent films
2013 romantic comedy-drama films
2010s English-language films
2010s sex comedy films
American independent films
American romantic comedy-drama films
American sex comedy films
Films about pornography
Films about sex addiction
Films based on the Don Juan legend
Films directed by Joseph Gordon-Levitt
Films produced by Ram Bergman
Films scored by Nathan Johnson (musician)
Films set in a movie theatre
Films set in New Jersey
Films shot in Los Angeles
Films shot in New Jersey
Relativity Media films
Voltage Pictures films
Films about grieving
2010s American films
English-language independent films
|
```python
import unittest
from types import SimpleNamespace
from snorkel.slicing import SlicingFunction, slicing_function
class TestSlicingFunction(unittest.TestCase):
def _run_sf(self, sf: SlicingFunction) -> None:
x_43 = SimpleNamespace(num=43)
x_19 = SimpleNamespace(num=19)
self.assertEqual(sf(x_43), True)
self.assertEqual(sf(x_19), False)
def _run_sf_raise(self, sf: SlicingFunction) -> None:
x_none = SimpleNamespace(num=None)
with self.assertRaises(TypeError):
sf(x_none)
def test_slicing_function_decorator(self) -> None:
@slicing_function()
def sf(x) -> int:
return x.num > 42
self.assertIsInstance(sf, SlicingFunction)
self.assertEqual(sf.name, "sf")
self._run_sf(sf)
self._run_sf_raise(sf)
def test_slicing_function_decorator_no_parens(self) -> None:
with self.assertRaisesRegex(ValueError, "missing parentheses"):
@slicing_function
def sf(x) -> int:
return 0 if x.num > 42 else -1
```
|
Andrew Scott Irving (13 October 1837 – 29 April 1904) was a Scottish-born Canadian bookseller and publisher.
Irving was born in Annan in Scotland. He moved with his parents to the United States while still young. He relocated to Hamilton in the around 1857 or 1858 and found employment with the Detroit-based W. E. Tunis, a book and periodical distributor with a monopoly on the Great Western Railway in Canada.
In autumn 1862 Irving set up a bookstore on King and Jordan streets in Toronto, and soon expanded into wholesale. By the 1870s he was issuing inexpensive reproductions of popular novels and sheet music of popular songs under the imprint Irving's Five Cent Music. The imprint published 750 sheet music issues; when is uncertain as they lack copyright notices, but evidence suggests they may have appeared as early as the late 1860s and had ceased at around the mid-1880s; the majority appear to have been published in the first half of the 1880s; few were explicitly Canadian in content, and only five are known to have been by Canadians.
Printing for Irving was handled at John Ross Robertson's Daily Telegraph, and Irving later owned stock on Robertson's Telegram Printing and Publishing Company, which printed the Toronto Evening Telegram. In 1873, Irving financed the printing of John Wilson Bengough's humorous weekly Grip. In partnership with Russel Wilkinson he ran another bookstore on Toronto Street called A. S. Irving and Company from 1874 to 1876.
Irving turned focus on the printing and distribution of inexpensive popular reading material, such as paperbound books, particularly to the lucrative train passenger market. With Copp, Clark and Company, in 1876 Irving co-founded the Canadian News Company Limited (later renamed the Toronto News Company Limited). He soon had a stock that was said to be second only to the New York-based American News Company. With Samuel Edward Dawson, W. V. Dawson, and Copp, Clark and Company, Irving was involved in the incorporation of the Montreal News Company in 1880. From 1881 Irving was a member of the Toronto Region Board of Trade, and was a director of the Great North Western Telegraph Company and other companies. The warehouse of the Toronto News Company in 1884 was a four-story building, selling stationery on the first floor, games and greeting cards on the second, mass-market books and sheet music on the third, and a distribution centre on the fourth, with a box for each customer of the company's in Canada, the US, and Britain.
The majority of the shares in the Toronto News Company Limited were owned by two of the co-founders of the American News Company by 1889, and Irving's company eventually became a subsidiary of the American company, of which Irving owned shares. The Toronto News Company name itself lasted until 1918. With his wife Eliza ( Morgan), he had two sons and a daughter; one son died in childhood, another, Andrew Maxwell, died in 1896, and his daughter Nellie died in 1900. Irving's two granddaughters inherited most of his estate on his death in Toronto on 29 April 1904. Irving was buried in St. James Cemetery in Toronto.
Irving is remembered as a pioneer in Canadian publishing, and had a reputation for discouraging the distribution of what was considered "trash" literature, promoting instead light literature with higher repute.
Notes
References
Works cited
1837 births
1904 deaths
Canadian publishers (people)
People from Annan, Dumfries and Galloway
Burials at St. James Cemetery, Toronto
|
```xml
<?xml version="1.0" encoding="utf-8"?>
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<shape xmlns:android="path_to_url"
android:shape="rectangle" >
<gradient
android:angle="270"
android:endColor="#00000000"
android:startColor="#30000000"
android:type="linear" />
</shape>
```
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.