text
stringlengths
1
22.8M
```objective-c /* * */ #if defined(CONFIG_SOC_COMPATIBLE_NRF) #define BT_HCI_VS_HW_PLAT BT_HCI_VS_HW_PLAT_NORDIC #if defined(CONFIG_SOC_SERIES_NRF51X) #define BT_HCI_VS_HW_VAR BT_HCI_VS_HW_VAR_NORDIC_NRF51X #elif defined(CONFIG_SOC_COMPATIBLE_NRF52X) #define BT_HCI_VS_HW_VAR BT_HCI_VS_HW_VAR_NORDIC_NRF52X #elif defined(CONFIG_SOC_COMPATIBLE_NRF53X) #define BT_HCI_VS_HW_VAR BT_HCI_VS_HW_VAR_NORDIC_NRF53X #elif defined(CONFIG_SOC_SERIES_NRF54HX) #define BT_HCI_VS_HW_VAR BT_HCI_VS_HW_VAR_NORDIC_NRF54HX #elif defined(CONFIG_SOC_COMPATIBLE_NRF54LX) #define BT_HCI_VS_HW_VAR BT_HCI_VS_HW_VAR_NORDIC_NRF54LX #endif #else #define BT_HCI_VS_HW_PLAT 0 #define BT_HCI_VS_HW_VAR 0 #endif /* CONFIG_SOC_COMPATIBLE_NRF */ /* Map vendor command handler directly to common implementation */ inline int hci_vendor_cmd_handle(uint16_t ocf, struct net_buf *cmd, struct net_buf **evt) { return hci_vendor_cmd_handle_common(ocf, cmd, evt); } ```
```html <!DOCTYPE html> <html xmlns="path_to_url"><head><title>Momentum (owl.Owl_optimise.D.Momentum)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.2"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../odoc.support/highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> <a href="../../../index.html">owl</a> &#x00BB; <a href="../../index.html">Owl_optimise</a> &#x00BB; <a href="../index.html">D</a> &#x00BB; Momentum</nav><header class="odoc-preamble"><h1>Module <code><span>D.Momentum</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-typ"><a href="#type-typ" class="anchor"></a><code><span><span class="keyword">type</span> typ</span><span> = <a href="../../../../owl-base/Owl_optimise_generic/Make/Momentum/index.html#type-typ">Owl_optimise_generic.Make(Owl_algodiff_generic.Make(Owl_algodiff_primal_ops.D)).Momentum.typ</a></span><span> = </span></code><ol><li id="type-typ.Standard" class="def variant constructor anchored"><a href="#type-typ.Standard" class="anchor"></a><code><span>| </span><span><span class="constructor">Standard</span> <span class="keyword">of</span> float</span></code></li><li id="type-typ.Nesterov" class="def variant constructor anchored"><a href="#type-typ.Nesterov" class="anchor"></a><code><span>| </span><span><span class="constructor">Nesterov</span> <span class="keyword">of</span> float</span></code></li><li id="type-typ.None" class="def variant constructor anchored"><a href="#type-typ.None" class="anchor"></a><code><span>| </span><span><span class="constructor">None</span></span></code></li></ol></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-run"><a href="#val-run" class="anchor"></a><code><span><span class="keyword">val</span> run : <span><a href="#type-typ">typ</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../Algodiff/index.html#type-t">Algodiff.t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../Algodiff/index.html#type-t">Algodiff.t</a> <span class="arrow">&#45;&gt;</span></span> <a href="../Algodiff/index.html#type-t">Algodiff.t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-default"><a href="#val-default" class="anchor"></a><code><span><span class="keyword">val</span> default : <span><a href="#type-typ">typ</a> <span class="arrow">&#45;&gt;</span></span> <a href="#type-typ">typ</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-to_string"><a href="#val-to_string" class="anchor"></a><code><span><span class="keyword">val</span> to_string : <span><a href="#type-typ">typ</a> <span class="arrow">&#45;&gt;</span></span> string</span></code></div></div></div></body></html> ```
No Redemption (Official DmC: Devil May Cry Soundtrack), sometimes simply referred to as "No Redemption", is a soundtrack album and the sixth studio album by American aggrotech band Combichrist, released on January 25, 2013. It presents a more metal-oriented direction than Combichrist is generally known for. Almost half the tracks were released on the DmC: Devil May Cry Soundtrack Selection. Track listing All songs written by Andy LaPlegua. 2, 5, 6, 7, 9, 12 and 13 were released on DmC: Devil May Cry Soundtrack Selection. 1, 4, 6 and 8 were released on Making Monsters. 7 and 10 were released on Today We Are All Demons 2, 3, 5 and 9 were released on What the Fuck Is Wrong with You People? References External links Combichrist website 2013 soundtrack albums Combichrist albums Devil May Cry
```smalltalk using System; using System.Collections.Generic; using Mono.Cecil; namespace Xamarin.Android.Tasks { static class MarshalMethodsHelpers { // From: path_to_url static readonly HashSet<string> blittableTypes = new HashSet<string> (StringComparer.Ordinal) { "System.Byte", "System.SByte", "System.Int16", "System.UInt16", "System.Int32", "System.UInt32", "System.Int64", "System.UInt64", "System.IntPtr", "System.UIntPtr", "System.Single", "System.Double", }; public static bool IsBlittable (this TypeReference type) { if (type == null) { throw new ArgumentNullException (nameof (type)); } return blittableTypes.Contains (type.FullName); } } } ```
```objective-c #import "GBPaletteEditorController.h" #import "GBHueSliderCell.h" #import <Core/gb.h> #define MAGIC 'SBPL' typedef struct __attribute__ ((packed)) { uint32_t magic; bool manual:1; bool disabled_lcd_color:1; unsigned padding:6; struct GB_color_s colors[5]; int32_t brightness_bias; uint32_t hue_bias; uint32_t hue_bias_strength; } theme_t; static double blend(double from, double to, double position) { return from * (1 - position) + to * position; } @implementation NSColor (GBColor) - (struct GB_color_s)gbColor { NSColor *sRGB = [self colorUsingColorSpace:[NSColorSpace deviceRGBColorSpace]]; return (struct GB_color_s){round(sRGB.redComponent * 255), round(sRGB.greenComponent * 255), round(sRGB.blueComponent * 255)}; } - (uint32_t)intValue { struct GB_color_s color = self.gbColor; return (color.r << 0) | (color.g << 8) | (color.b << 16) | 0xFF000000; } @end @implementation GBPaletteEditorController - (NSArray<NSColorWell *> *)colorWells { return @[_colorWell0, _colorWell1, _colorWell2, _colorWell3, _colorWell4]; } - (void)updateEnabledControls { if (self.manualModeCheckbox.state) { _brightnessSlider.enabled = false; _hueSlider.enabled = false; _hueStrengthSlider.enabled = false; _colorWell1.enabled = true; _colorWell2.enabled = true; _colorWell3.enabled = true; if (!(_colorWell4.enabled = self.disableLCDColorCheckbox.state)) { _colorWell4.color = _colorWell3.color; } } else { _colorWell1.enabled = false; _colorWell2.enabled = false; _colorWell3.enabled = false; _colorWell4.enabled = true; _brightnessSlider.enabled = true; _hueSlider.enabled = true; _hueStrengthSlider.enabled = true; [self updateAutoColors]; } } - (NSColor *)autoColorAtPositon:(double)position { NSColor *first = [_colorWell0.color colorUsingColorSpace:[NSColorSpace deviceRGBColorSpace]]; NSColor *second = [_colorWell4.color colorUsingColorSpace:[NSColorSpace deviceRGBColorSpace]]; double brightness = 1 / pow(4, (_brightnessSlider.doubleValue - 128) / 128.0); position = pow(position, brightness); NSColor *hue = _hueSlider.colorValue; double bias = _hueStrengthSlider.doubleValue / 256.0; double red = 1 / pow(4, (hue.redComponent * 2 - 1) * bias); double green = 1 / pow(4, (hue.greenComponent * 2 - 1) * bias); double blue = 1 / pow(4, (hue.blueComponent * 2 - 1) * bias); NSColor *ret = [NSColor colorWithRed:blend(first.redComponent, second.redComponent, pow(position, red)) green:blend(first.greenComponent, second.greenComponent, pow(position, green)) blue:blend(first.blueComponent, second.blueComponent, pow(position, blue)) alpha:1.0]; return ret; } - (IBAction)updateAutoColors:(id)sender { if (!self.manualModeCheckbox.state) { [self updateAutoColors]; } else { [self savePalette:sender]; } } - (void)updateAutoColors { if (_disableLCDColorCheckbox.state) { _colorWell1.color = [self autoColorAtPositon:8 / 25.0]; _colorWell2.color = [self autoColorAtPositon:16 / 25.0]; _colorWell3.color = [self autoColorAtPositon:24 / 25.0]; } else { _colorWell1.color = [self autoColorAtPositon:1 / 3.0]; _colorWell2.color = [self autoColorAtPositon:2 / 3.0]; _colorWell3.color = _colorWell4.color; } [self savePalette:nil]; } - (IBAction)disabledLCDColorCheckboxChanged:(id)sender { [self updateEnabledControls]; } - (IBAction)manualModeChanged:(id)sender { [self updateEnabledControls]; } - (IBAction)updateColor4:(id)sender { if (!self.disableLCDColorCheckbox.state) { self.colorWell4.color = self.colorWell3.color; } [self savePalette:self]; } - (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; NSDictionary *themes = [defaults dictionaryForKey:@"GBThemes"]; if (themes.count == 0) { [defaults setObject:@"Untitled Palette" forKey:@"GBCurrentTheme"]; [self savePalette:nil]; return 1; } return themes.count; } -(void)tableView:(NSTableView *)tableView setObjectValue:(id)object forTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row { NSString *oldName = [self tableView:tableView objectValueForTableColumn:tableColumn row:row]; if ([oldName isEqualToString:object]) { return; } NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; NSMutableDictionary *themes = [[defaults dictionaryForKey:@"GBThemes"] ?: @{} mutableCopy]; NSString *newName = object; unsigned i = 2; if (!newName.length) { newName = @"Untitled Palette"; } while (themes[newName]) { newName = [NSString stringWithFormat:@"%@ %d", object, i]; } themes[newName] = themes[oldName]; [themes removeObjectForKey:oldName]; if ([oldName isEqualToString:[defaults stringForKey:@"GBCurrentTheme"]]) { [defaults setObject:newName forKey:@"GBCurrentTheme"]; } [defaults setObject:themes forKey:@"GBThemes"]; [tableView reloadData]; [self awakeFromNib]; } - (IBAction)deleteTheme:(id)sender { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; NSString *name = [defaults stringForKey:@"GBCurrentTheme"]; NSMutableDictionary *themes = [[defaults dictionaryForKey:@"GBThemes"] ?: @{} mutableCopy]; [themes removeObjectForKey:name]; [defaults setObject:themes forKey:@"GBThemes"]; [_themesList reloadData]; [self awakeFromNib]; } - (void)tableViewSelectionDidChange:(NSNotification *)notification { NSString *name = [self tableView:nil objectValueForTableColumn:nil row:_themesList.selectedRow]; [[NSUserDefaults standardUserDefaults] setObject:name forKey:@"GBCurrentTheme"]; [self loadPalette]; [[NSNotificationCenter defaultCenter] postNotificationName:@"GBColorPaletteChanged" object:nil]; } - (void)tableViewSelectionIsChanging:(NSNotification *)notification { [self tableViewSelectionDidChange:notification]; } - (void)awakeFromNib { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; NSDictionary *themes = [defaults dictionaryForKey:@"GBThemes"]; NSString *theme = [defaults stringForKey:@"GBCurrentTheme"]; if (theme && themes[theme]) { unsigned index = [[themes.allKeys sortedArrayUsingSelector:@selector(localizedCaseInsensitiveCompare:)] indexOfObject:theme]; [_themesList selectRowIndexes:[NSIndexSet indexSetWithIndex:index] byExtendingSelection:false]; } else { [_themesList selectRowIndexes:[NSIndexSet indexSetWithIndex:0] byExtendingSelection:false]; } [self tableViewSelectionDidChange:nil]; } - (IBAction)addTheme:(id)sender { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; NSDictionary *themes = [defaults dictionaryForKey:@"GBThemes"]; NSString *newName = @"Untitled Palette"; unsigned i = 2; while (themes[newName]) { newName = [NSString stringWithFormat:@"Untitled Palette %d", i++]; } [defaults setObject:newName forKey:@"GBCurrentTheme"]; [self savePalette:sender]; [_themesList reloadData]; [self awakeFromNib]; } - (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; NSDictionary *themes = [defaults dictionaryForKey:@"GBThemes"]; return [themes.allKeys sortedArrayUsingSelector:@selector(localizedCaseInsensitiveCompare:)][row]; } - (void)loadPalette { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; NSDictionary *theme = [defaults dictionaryForKey:@"GBThemes"][[defaults stringForKey:@"GBCurrentTheme"]]; NSArray *colors = theme[@"Colors"]; if (colors.count == 5) { unsigned i = 0; for (NSNumber *color in colors) { uint32_t c = [color unsignedIntValue]; self.colorWells[i++].color = [NSColor colorWithRed:(c & 0xFF) / 255.0 green:((c >> 8) & 0xFF) / 255.0 blue:((c >> 16) & 0xFF) / 255.0 alpha:1.0]; } } _disableLCDColorCheckbox.state = [theme[@"DisabledLCDColor"] boolValue]; _manualModeCheckbox.state = [theme[@"Manual"] boolValue]; _brightnessSlider.doubleValue = [theme[@"BrightnessBias"] doubleValue] * 128 + 128; _hueSlider.doubleValue = [theme[@"HueBias"] doubleValue] * 360; _hueStrengthSlider.doubleValue = [theme[@"HueBiasStrength"] doubleValue] * 256; [self updateEnabledControls]; } - (IBAction)savePalette:(id)sender { NSDictionary *theme = @{ @"Colors": @[@(_colorWell0.color.intValue), @(_colorWell1.color.intValue), @(_colorWell2.color.intValue), @(_colorWell3.color.intValue), @(_colorWell4.color.intValue)], @"DisabledLCDColor": _disableLCDColorCheckbox.state? @YES : @NO, @"Manual": _manualModeCheckbox.state? @YES : @NO, @"BrightnessBias": @((_brightnessSlider.doubleValue - 128) / 128.0), @"HueBias": @(_hueSlider.doubleValue / 360.0), @"HueBiasStrength": @(_hueStrengthSlider.doubleValue / 256.0) }; NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; NSMutableDictionary *themes = [[defaults dictionaryForKey:@"GBThemes"] ?: @{} mutableCopy]; themes[[defaults stringForKey:@"GBCurrentTheme"]] = theme; [defaults setObject:themes forKey:@"GBThemes"]; [[NSNotificationCenter defaultCenter] postNotificationName:@"GBColorPaletteChanged" object:nil]; } + (const GB_palette_t *)userPalette { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; switch ([defaults integerForKey:@"GBColorPalette"]) { case 1: return &GB_PALETTE_DMG; case 2: return &GB_PALETTE_MGB; case 3: return &GB_PALETTE_GBL; default: return &GB_PALETTE_GREY; case -1: { static GB_palette_t customPalette; NSArray *colors = [defaults dictionaryForKey:@"GBThemes"][[defaults stringForKey:@"GBCurrentTheme"]][@"Colors"]; if (colors.count == 5) { unsigned i = 0; for (NSNumber *color in colors) { uint32_t c = [color unsignedIntValue]; customPalette.colors[i++] = (struct GB_color_s) {c, c >> 8, c >> 16}; } } return &customPalette; } } } - (IBAction)export:(id)sender { NSSavePanel *savePanel = [NSSavePanel savePanel]; [savePanel setAllowedFileTypes:@[@"sbp"]]; savePanel.nameFieldStringValue = [NSString stringWithFormat:@"%@.sbp", [[NSUserDefaults standardUserDefaults] stringForKey:@"GBCurrentTheme"]]; if ([savePanel runModal] == NSModalResponseOK) { theme_t theme = {0,}; theme.magic = MAGIC; theme.manual = _manualModeCheckbox.state; theme.disabled_lcd_color = _disableLCDColorCheckbox.state; unsigned i = 0; for (NSColorWell *well in self.colorWells) { theme.colors[i++] = well.color.gbColor; } theme.brightness_bias = (_brightnessSlider.doubleValue - 128) * (0x40000000 / 128); theme.hue_bias = round(_hueSlider.doubleValue * (0x80000000 / 360.0)); theme.hue_bias_strength = (_hueStrengthSlider.doubleValue) * (0x80000000 / 256); size_t size = sizeof(theme); if (theme.manual) { size = theme.disabled_lcd_color? 5 + 5 * sizeof(theme.colors[0]) : 5 + 4 * sizeof(theme.colors[0]); } [[NSData dataWithBytes:&theme length:size] writeToURL:savePanel.URL atomically:false]; } } - (IBAction)import:(id)sender { NSOpenPanel *openPanel = [NSOpenPanel openPanel]; [openPanel setAllowedFileTypes:@[@"sbp"]]; if ([openPanel runModal] == NSModalResponseOK) { NSData *data = [NSData dataWithContentsOfURL:openPanel.URL]; theme_t theme = {0,}; memcpy(&theme, data.bytes, MIN(sizeof(theme), data.length)); if (theme.magic != MAGIC) { NSBeep(); return; } _manualModeCheckbox.state = theme.manual; _disableLCDColorCheckbox.state = theme.disabled_lcd_color; unsigned i = 0; for (NSColorWell *well in self.colorWells) { well.color = [NSColor colorWithRed:theme.colors[i].r / 255.0 green:theme.colors[i].g / 255.0 blue:theme.colors[i].b / 255.0 alpha:1.0]; i++; } if (!theme.disabled_lcd_color) { _colorWell4.color = _colorWell3.color; } _brightnessSlider.doubleValue = theme.brightness_bias / (0x40000000 / 128.0) + 128; _hueSlider.doubleValue = theme.hue_bias / (0x80000000 / 360.0); _hueStrengthSlider.doubleValue = theme.hue_bias_strength / (0x80000000 / 256.0); NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; NSDictionary *themes = [defaults dictionaryForKey:@"GBThemes"]; NSString *baseName = openPanel.URL.lastPathComponent.stringByDeletingPathExtension; NSString *newName = baseName; i = 2; while (themes[newName]) { newName = [NSString stringWithFormat:@"%@ %d", baseName, i++]; } [defaults setObject:newName forKey:@"GBCurrentTheme"]; [self savePalette:sender]; [self awakeFromNib]; } } - (IBAction)done:(NSButton *)sender { [sender.window.sheetParent endSheet:sender.window]; } - (instancetype)init { static id singleton = nil; if (singleton) return singleton; return (singleton = [super init]); } @end ```
```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/framework/ir/preln_residual_bias_fuse_pass.h" #include <string> #include "paddle/fluid/framework/ir/graph_pattern_detector.h" #include "paddle/fluid/framework/op_version_registry.h" namespace paddle::framework::ir { class Node; } // namespace paddle::framework::ir namespace paddle::framework::ir::patterns { struct PrelnResidualBias : public PatternBase { PrelnResidualBias(PDPattern *pattern, const std::string &name_scope, bool with_bias) : PatternBase(pattern, name_scope, "preln_residual_bias") { with_bias_ = with_bias; } void operator()(PDNode *x, PDNode *y); bool with_bias_; // declare operator node's name PATTERN_DECL_NODE(elementwise_bias); PATTERN_DECL_NODE(elementwise0); PATTERN_DECL_NODE(elementwise1); PATTERN_DECL_NODE(layer_norm); // declare variable node's name PATTERN_DECL_NODE(elementwise0_out); PATTERN_DECL_NODE(elementwise1_out); PATTERN_DECL_NODE(layer_norm_bias); PATTERN_DECL_NODE(layer_norm_scale); PATTERN_DECL_NODE(layer_norm_out); PATTERN_DECL_NODE(layer_norm_mean); PATTERN_DECL_NODE(layer_norm_variance); }; void PrelnResidualBias::operator()(PDNode *x, PDNode *y) { PDNode *elementwise0 = nullptr; PDNode *elementwise_bias_var = nullptr; PDNode *elementwise0_out_var = nullptr; // Create nodes for elementwise add op. if (with_bias_) { elementwise0 = pattern->NewNode(elementwise0_repr())->assert_is_op("elementwise_add"); elementwise_bias_var = pattern->NewNode(elementwise_bias_repr()) ->assert_is_op_input("elementwise_add", "Y") ->assert_is_persistable_var(); elementwise0_out_var = pattern->NewNode(elementwise0_out_repr()) ->assert_is_op_output("elementwise_add") ->assert_is_op_input("elementwise_add") ->assert_more([](Node *x) { if (x->outputs.size() == 1) { return true; } else { return false; } }); } else { elementwise0_out_var = y; } auto *elementwise1 = pattern->NewNode(elementwise1_repr())->assert_is_op("elementwise_add"); auto *elementwise1_out_var = pattern->NewNode(elementwise1_out_repr()) ->assert_is_op_input("layer_norm", "X"); // Add links for elementwise_add op. if (with_bias_) { elementwise0->LinksFrom({y, elementwise_bias_var}) .LinksTo({elementwise0_out_var}); elementwise1_out_var->assert_is_op_output("elementwise_add"); } elementwise1->LinksFrom({x, elementwise0_out_var}) .LinksTo({elementwise1_out_var}); // Create nodes for layer_norm op. auto *layer_norm = pattern->NewNode(layer_norm_repr())->assert_is_op("layer_norm"); auto *layer_norm_bias_var = pattern->NewNode(layer_norm_bias_repr()) ->AsInput() ->assert_is_persistable_var() ->assert_is_op_input("layer_norm", "Bias"); auto *layer_norm_scale_var = pattern->NewNode(layer_norm_scale_repr()) ->AsInput() ->assert_is_persistable_var() ->assert_is_op_input("layer_norm", "Scale"); auto *layer_norm_out_var = pattern->NewNode(layer_norm_out_repr()) ->AsOutput() ->assert_is_op_output("layer_norm", "Y"); auto *layer_norm_mean_var = pattern->NewNode(layer_norm_mean_repr()) ->AsOutput() ->assert_is_op_output("layer_norm", "Mean"); auto *layer_norm_variance_var = pattern->NewNode(layer_norm_variance_repr()) ->AsOutput() ->assert_is_op_output("layer_norm", "Variance"); // Add links for layer_norm op. layer_norm ->LinksFrom( {elementwise1_out_var, layer_norm_bias_var, layer_norm_scale_var}) .LinksTo( {layer_norm_out_var, layer_norm_mean_var, layer_norm_variance_var}); } } // namespace paddle::framework::ir::patterns namespace paddle::framework::ir { void setIntermediateOut(OpDesc *desc, const std::string &out_name, const std::string &scope_name) { std::string new_name = scope_name + "/at." + out_name + ".new"; desc->SetOutput(out_name, {new_name}); } void addIntermediateOut(Node *op_node, const std::string &out_name, const std::string &scope_name, Graph *graph) { std::string new_name = scope_name + "/at." + out_name + ".new"; VarDesc out_var(new_name); out_var.SetPersistable(false); auto *node_var = graph->CreateVarNode(&out_var); IR_NODE_LINK_TO(op_node, node_var); } int PrelnResidualBiasFusePass::ApplyPattern(ir::Graph *graph, bool with_bias) const { PADDLE_ENFORCE_NOT_NULL( graph, common::errors::PreconditionNotMet("graph should not be null.")); FusePassBase::Init("preln_residual_bias_fuse", graph); int found_subgraph_count = 0; GraphPatternDetector gpd; PDNode *x = nullptr; PDNode *y = nullptr; if (with_bias) { x = gpd.mutable_pattern() ->NewNode("preln_residual_bias_fuse/x") ->AsInput() ->assert_is_op_input("elementwise_add") ->assert_var_not_persistable(); y = gpd.mutable_pattern() ->NewNode("preln_residual_bias_fuse/y") ->AsInput() ->assert_is_op_input("elementwise_add", "X") ->assert_var_not_persistable(); } else { x = gpd.mutable_pattern() ->NewNode("preln_residual_bias_fuse/x") ->AsInput() ->assert_is_op_input("elementwise_add", "X") ->assert_var_not_persistable(); y = gpd.mutable_pattern() ->NewNode("preln_residual_bias_fuse/y") ->AsInput() ->assert_is_op_input("elementwise_add", "Y") ->assert_var_not_persistable(); } patterns::PrelnResidualBias fused_pattern( gpd.mutable_pattern(), "preln_residual_bias_fuse", with_bias); fused_pattern(x, y); auto handler = [&](const GraphPatternDetector::subgraph_t &subgraph, Graph *graph) { if (subgraph.count(x) <= 0 || subgraph.count(y) <= 0) { LOG(WARNING) << "The subgraph is empty."; return; } VLOG(4) << "handle PrelnResidualBias fuse"; Node *elementwise_bias = nullptr; Node *elementwise0 = nullptr; Node *elementwise0_out = nullptr; if (with_bias) { GET_IR_NODE_FROM_SUBGRAPH( tmp_elementwise_bias, elementwise_bias, fused_pattern); GET_IR_NODE_FROM_SUBGRAPH(tmp_elementwise0, elementwise0, fused_pattern); GET_IR_NODE_FROM_SUBGRAPH( tmp_elementwise0_out, elementwise0_out, fused_pattern); elementwise_bias = tmp_elementwise_bias; elementwise0 = tmp_elementwise0; elementwise0_out = tmp_elementwise0_out; } GET_IR_NODE_FROM_SUBGRAPH(elementwise1, elementwise1, fused_pattern); GET_IR_NODE_FROM_SUBGRAPH( elementwise1_out, elementwise1_out, fused_pattern); GET_IR_NODE_FROM_SUBGRAPH(layer_norm, layer_norm, fused_pattern); GET_IR_NODE_FROM_SUBGRAPH(layer_norm_bias, layer_norm_bias, fused_pattern); GET_IR_NODE_FROM_SUBGRAPH( layer_norm_scale, layer_norm_scale, fused_pattern); GET_IR_NODE_FROM_SUBGRAPH(layer_norm_out, layer_norm_out, fused_pattern); GET_IR_NODE_FROM_SUBGRAPH(layer_norm_mean, layer_norm_mean, fused_pattern); GET_IR_NODE_FROM_SUBGRAPH( layer_norm_variance, layer_norm_variance, fused_pattern); // We can not accept that two or more layer_norm is connected to // elementwise1_out. This will lead to two or more PrelnResidualBias // patterns is found near elementwise1_out, and these patterns will interact // on each other, so we make below check to ensure only one // PrelnResidualBias pattern is delalted with. for (auto op : elementwise1_out->inputs) { if (op->Name() == "fused_bias_dropout_residual_layer_norm") return; } if (!IsCompat(subgraph, graph)) { LOG(WARNING) << "preln_residual_bias pass in op compat failed."; return; } std::unordered_set<const Node *> del_node_set; // Create an PrelnResidualBias op node OpDesc new_desc; new_desc.SetType("fused_bias_dropout_residual_layer_norm"); // inputs new_desc.SetInput("X", {subgraph.at(x)->Name()}); new_desc.SetInput("Residual", {subgraph.at(y)->Name()}); new_desc.SetInput("LnScale", {layer_norm_scale->Name()}); new_desc.SetInput("LnBias", {layer_norm_bias->Name()}); if (with_bias) { new_desc.SetInput("Bias", {elementwise_bias->Name()}); } // outputs new_desc.SetOutput("Y", {layer_norm_out->Name()}); new_desc.SetOutput("BiasDropoutResidualOut", {elementwise1_out->Name()}); new_desc.SetOutput("LnMean", {layer_norm_mean->Name()}); new_desc.SetOutput("LnVariance", {layer_norm_variance->Name()}); setIntermediateOut(&new_desc, "DropoutMaskOut", "preln_residual_bias_fuse"); // attrs new_desc.SetAttr("ln_epsilon", layer_norm->Op()->GetAttr("epsilon")); new_desc.SetAttr("dropout_rate", 0.0f); new_desc.SetAttr("is_test", true); new_desc.SetAttr("begin_norm_axis", layer_norm->Op()->GetAttr("begin_norm_axis")); auto fused_node = graph->CreateOpNode(&new_desc); // OpDesc will be copied. addIntermediateOut( fused_node, "DropoutMaskOut", "preln_residual_bias_fuse", graph); if (with_bias) { del_node_set.insert(elementwise0); del_node_set.insert(elementwise0_out); } del_node_set.insert(elementwise1); del_node_set.insert(layer_norm); GraphSafeRemoveNodes(graph, del_node_set); IR_NODE_LINK_TO(subgraph.at(x), fused_node); IR_NODE_LINK_TO(subgraph.at(y), fused_node); if (with_bias) { IR_NODE_LINK_TO(elementwise_bias, fused_node); } IR_NODE_LINK_TO(layer_norm_scale, fused_node); IR_NODE_LINK_TO(layer_norm_bias, fused_node); IR_NODE_LINK_TO(fused_node, layer_norm_out); IR_NODE_LINK_TO(fused_node, elementwise1_out); IR_NODE_LINK_TO(fused_node, layer_norm_mean); IR_NODE_LINK_TO(fused_node, layer_norm_variance); found_subgraph_count++; }; gpd(graph, handler); return found_subgraph_count; } void PrelnResidualBiasFusePass::ApplyImpl(ir::Graph *graph) const { VLOG(1) << "Fuse PrelnResidualBias into " "fused_bias_dropout_residual_layer_norm op with dropout rate = 0"; PADDLE_ENFORCE_NOT_NULL( graph, common::errors::PreconditionNotMet("graph should not be null.")); FusePassBase::Init("preln_residual_bias_fuse", graph); int found_subgraph_count = 0; found_subgraph_count = ApplyPattern(graph, true); found_subgraph_count += ApplyPattern(graph, false); AddStatis(found_subgraph_count); } } // namespace paddle::framework::ir REGISTER_PASS(preln_residual_bias_fuse_pass, paddle::framework::ir::PrelnResidualBiasFusePass); REGISTER_PASS_CAPABILITY(preln_residual_bias_fuse_pass) .AddCombination( paddle::framework::compatible::OpVersionComparatorCombination() .LE("elementwise_add", 1) .EQ("layer_norm", 0)); ```
```java /* * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ package com.google.android.material.transition; /** * A {@link androidx.transition.Visibility} transition that scales the size of a surface up or down * to emphasize elevation changes. * * <p>This can be useful as an exit transition and reenter transition in conjunction with the {@link * MaterialContainerTransform}. */ public final class MaterialElevationScale extends MaterialVisibility<ScaleProvider> { private static final float DEFAULT_SCALE = 0.85f; private final boolean growing; public MaterialElevationScale(boolean growing) { super(createPrimaryAnimatorProvider(growing), createSecondaryAnimatorProvider()); this.growing = growing; } public boolean isGrowing() { return growing; } private static ScaleProvider createPrimaryAnimatorProvider(boolean growing) { ScaleProvider scaleProvider = new ScaleProvider(growing); scaleProvider.setOutgoingEndScale(DEFAULT_SCALE); scaleProvider.setIncomingStartScale(DEFAULT_SCALE); return scaleProvider; } private static VisibilityAnimatorProvider createSecondaryAnimatorProvider() { return new FadeProvider(); } } ```
Murat Ersen (born 3 August 1984), known by the stage name Muhabbet, is a Turkish-German singer. Discography Albums Singles Featured in Filmography References External links Official website 1984 births Living people German people of Turkish descent 21st-century German male singers
Government Higher Secondary School may refer to: India Arunachal Pradesh Independent Golden Jubilee Government Higher Secondary School, Pasighat Assam Golaghat Government Bezbaruah Higher Secondary School Kerala Government Higher Secondary School Maloth Kasba Government Higher Secondary School Nedungome Government Higher Secondary School Omallur Government Higher Secondary School, Palayamkunnu Government Higher Secondary School Panamattom Government Higher Secondary School, Pandikkad Government Higher Secondary School Sreekandapuram Government Higher Secondary School for Girls Cottonhill Government Model Boys Higher Secondary School, Kollam Government Model Higher Secondary School Nadavaramba Government Model Higher Secondary School, Punnamoodu Government Model Boys Higher Secondary School, Thiruvananthapuram Government Model Higher Secondary School for Boys, Thrissur Government Model Higher Secondary School, Varkala Meenakshi Vilasam Government Vocational Higher Secondary School Meenangadi Government Higher Secondary School Pandit Mothilal Government Model Higher Secondary School Vailoppilli Sreedhara Menon Memorial Government Vocational Higher Secondary School Tamil Nadu Government Higher Secondary School, Eriyodu Government Higher Secondary School Kurunikulathupatti Government Higher Secondary School Palayajayankondam Bharathiar Government Higher Secondary School Thiruvalluvar Government Higher Secondary School Tripura West Bengal Bagmari-Manicktala Government Sponsored Higher Secondary School Pakistan Khyber Pakhtunkhwa Pakistan Punjab Government Boys Higher Secondary School, Ahmad Nagar Chattha Government Girls Higher Secondary School, Ahmad Nagar Chattha See also Government Higher Secondary Institute Botingoo, Jammu and Kashmir, India Government Senior Secondary School (disambiguation)
Lanark was a federal electoral district represented in the House of Commons of Canada from 1917 to 1968. It was located in the province of Ontario. This riding was first created in 1914 from Lanark North and Lanark South ridings. It consisted of the county of Lanark. The electoral district was abolished in 1966 when it was redistributed between Frontenac—Lennox and Addington and Lanark and Renfrew ridings. Members of Parliament This riding elected the following members of the House of Commons of Canada: Electoral history |} On Mr. Hanna's death, 27 February 1918: |} |} On Mr. Stewart's death, 7 October 1922: |} |} On Mr. Preston's death, 8 February 1929: |} |} |} |} |} |} |} |} On Mr. Blair's death, 16 June 1957: |} |} |} |} |} See also List of Canadian federal electoral districts Historical federal electoral districts of Canada External links Parliamentary website Former federal electoral districts of Ontario Constituencies established in 1914
```objective-c // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef WebBatteryStatusListener_h #define WebBatteryStatusListener_h #include "WebBatteryStatus.h" #include "WebPlatformEventListener.h" namespace blink { class WebBatteryStatus; class WebBatteryStatusListener : public WebPlatformEventListener { public: // This method is called when a new battery status is available. virtual void updateBatteryStatus(const WebBatteryStatus&) = 0; virtual ~WebBatteryStatusListener() { } }; } // namespace blink #endif // WebBatteryStatusListener_h ```
```groff install_darwin_64bit "Go Darwin 64bit 1.19.9" "go1.19.9.darwin-amd64.tar.gz#your_sha256_hash install_darwin_arm "Go Darwin arm 1.19.9" "go1.19.9.darwin-arm64.tar.gz#your_sha256_hash install_bsd_32bit "Go Freebsd 32bit 1.19.9" "go1.19.9.freebsd-386.tar.gz#your_sha256_hash install_bsd_64bit "Go Freebsd 64bit 1.19.9" "go1.19.9.freebsd-amd64.tar.gz#your_sha256_hash install_linux_32bit "Go Linux 32bit 1.19.9" "go1.19.9.linux-386.tar.gz#your_sha256_hash install_linux_64bit "Go Linux 64bit 1.19.9" "go1.19.9.linux-amd64.tar.gz#your_sha256_hash install_linux_arm_64bit "Go Linux arm 64bit 1.19.9" "go1.19.9.linux-arm64.tar.gz#your_sha256_hash install_linux_arm "Go Linux arm 1.19.9" "go1.19.9.linux-armv6l.tar.gz#your_sha256_hash ```
The Bentonville Mustangs (previously the Bentonville Officeholders), based in Bentonville, Arkansas, were a minor league baseball team that played in the Arkansas State League in 1934 and 1935 and the Arkansas–Missouri League in 1936. External links Baseball Reference Baseball teams established in 1934 Baseball teams disestablished in 1936 Professional baseball teams in Arkansas Defunct Arkansas State League teams Defunct Arkansas-Missouri League teams St. Louis Cardinals minor league affiliates Defunct minor league baseball teams Defunct baseball teams in Arkansas
```c #include <nds.h> #include <nds/disc_io.h> #include <malloc.h> #include <stdio.h> #include "crypto.h" #include "sector0.h" #include "tonccpy.h" #include "f_xy.h" //#define SECTOR_SIZE 512 #define CRYPT_BUF_LEN 64 extern bool nand_Startup(); static u8 crypt_buf[SECTOR_SIZE * CRYPT_BUF_LEN] ALIGN(32); static u32 fat_sig_fix_offset = 0; static u32 sector_buf32[SECTOR_SIZE/sizeof(u32)]; static u8 *sector_buf = (u8*)sector_buf32; void nandio_set_fat_sig_fix(u32 offset) { fat_sig_fix_offset = offset; } void getConsoleID(u8 *consoleID){ u8 *fifo=(u8*)0x02074000; //shared mem address that has our computed key3 stuff u8 key[16]; //key3 normalkey - keyslot 3 is used for DSi/twln NAND crypto u8 key_xy[16]; //key3_y ^ key3_x u8 key_x[16];////key3_x - contains a DSi console id (which just happens to be the LFCS on 3ds) u8 key_y[16] = {0x76, 0xDC, 0xB9, 0x0A, 0xD3, 0xC4, 0x4D, 0xBD, 0x1D, 0xDD, 0x2D, 0x20, 0x05, 0x00, 0xA0, 0xE1}; //key3_y NAND constant tonccpy(key, fifo, 16); //receive the goods from arm7 F_XY_reverse(key, key_xy); //work backwards from the normalkey to get key_x that has the consoleID for(int i=0;i<16;i++){ key_x[i] = key_xy[i] ^ key_y[i]; //'' } tonccpy(&consoleID[0], &key_x[0], 4); tonccpy(&consoleID[4], &key_x[0xC], 4); } bool nandio_startup() { if (!nand_Startup()) return false; nand_ReadSectors(0, 1, sector_buf); bool isDSi = parse_ncsd(sector_buf, 0) != 0; if (!isDSi) return false; if (*(u32*)(0x2FFD7BC) == 0) { // Get eMMC CID *(u32*)(0xCFFFD0C) = 0x454D4D43; while (*(u32*)(0xCFFFD0C) != 0) { swiDelay(100); } } u8 consoleID[8]; u8 consoleIDfixed[8]; // Get ConsoleID getConsoleID(consoleID); for (int i = 0; i < 8; i++) { consoleIDfixed[i] = consoleID[7-i]; } // iprintf("sector 0 is %s\n", is3DS ? "3DS" : "DSi"); dsi_crypt_init((const u8*)consoleIDfixed, (const u8*)0x2FFD7BC, !isDSi); dsi_nand_crypt(sector_buf, sector_buf, 0, SECTOR_SIZE / AES_BLOCK_SIZE); parse_mbr(sector_buf, !isDSi, 0); mbr_t *mbr = (mbr_t*)sector_buf; nandio_set_fat_sig_fix(isDSi ? mbr->partitions[0].offset : 0); return true; } bool nandio_is_inserted() { return true; } // len is guaranteed <= CRYPT_BUF_LEN static bool read_sectors(sec_t start, sec_t len, void *buffer) { if (nand_ReadSectors(start, len, crypt_buf)) { dsi_nand_crypt(buffer, crypt_buf, start * SECTOR_SIZE / AES_BLOCK_SIZE, len * SECTOR_SIZE / AES_BLOCK_SIZE); if (fat_sig_fix_offset && start == fat_sig_fix_offset && ((u8*)buffer)[0x36] == 0 && ((u8*)buffer)[0x37] == 0 && ((u8*)buffer)[0x38] == 0) { ((u8*)buffer)[0x36] = 'F'; ((u8*)buffer)[0x37] = 'A'; ((u8*)buffer)[0x38] = 'T'; } return true; } else { //printf("NANDIO: read error\n"); return false; } } bool nandio_read_sectors(sec_t offset, sec_t len, void *buffer) { // iprintf("R: %u(0x%08x), %u\n", (unsigned)offset, (unsigned)offset, (unsigned)len); while (len >= CRYPT_BUF_LEN) { if (!read_sectors(offset, CRYPT_BUF_LEN, buffer)) { return false; } offset += CRYPT_BUF_LEN; len -= CRYPT_BUF_LEN; buffer = ((u8*)buffer) + SECTOR_SIZE * CRYPT_BUF_LEN; } if (len > 0) { return read_sectors(offset, len, buffer); } else { return true; } } bool nandio_write_sectors(sec_t offset, sec_t len, const void *buffer) { // lol, nope return false; } bool nandio_clear_status() { return true; } bool nandio_shutdown() { return true; } const DISC_INTERFACE io_dsi_nand = { ('N' << 24) | ('A' << 16) | ('N' << 8) | 'D', FEATURE_MEDIUM_CANREAD, nandio_startup, nandio_is_inserted, nandio_read_sectors, nandio_write_sectors, nandio_clear_status, nandio_shutdown }; ```
Rosporden (; ) is a commune in the Finistère department of Brittany in north-western France. Rosporden station has rail connections to Quimper, Lorient and Vannes. The small city specializes in the manufacture of "chouchen", a version of mead native to Brittany, and is known as the Capital of Chouchen. Population Inhabitants of Rosporden are called in French Rospordinois. In 1974 Rosporden absorbed the former commune of Kernével. The population data given in the table below for 1968 and earlier refer to the former commune of Rosporden, without Kernével. See also Communes of the Finistère department References External links Official website Mayors of Finistère Association Communes of Finistère
```java package eta.runtime.thunk; import eta.runtime.stg.Closure; public abstract class SingleEntryThunk1 extends SingleEntryThunk { public Closure x1; public SingleEntryThunk1(Closure x1) { this.x1 = x1; } } ```
```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\CloudVideoIntelligence; class GoogleCloudVideointelligenceV1p1beta1AnnotateVideoProgress extends \Google\Collection { protected $collection_key = 'annotationProgress'; protected $annotationProgressType = GoogleCloudVideointelligenceV1p1beta1VideoAnnotationProgress::class; protected $annotationProgressDataType = 'array'; /** * @param GoogleCloudVideointelligenceV1p1beta1VideoAnnotationProgress[] */ public function setAnnotationProgress($annotationProgress) { $this->annotationProgress = $annotationProgress; } /** * @return GoogleCloudVideointelligenceV1p1beta1VideoAnnotationProgress[] */ public function getAnnotationProgress() { return $this->annotationProgress; } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(GoogleCloudVideointelligenceV1p1beta1AnnotateVideoProgress::class, your_sha256_hashceV1p1beta1AnnotateVideoProgress'); ```
Turnaround is a 1978 folk music album by Stan Rogers. Track listing All songs written by Stan Rogers unless otherwise indicated. "Dark Eyed Molly" (Archie Fisher) "Oh No, Not I" (traditional, arr. Stan Rogers) "Second Effort" "Bluenose" "The Jeannie C." "So Blue" "Front Runner" "Song of the Candle" "Try Like the Devil" "Turnaround" References 1978 albums Stan Rogers albums
Bouquet is a 1959 album by The Percy Faith Strings It was released in 1959 by Columbia Records (catalog no. CL1322). It debuted on Billboard magazine's pop album chart on January 11, 1960, peaked at the No. 7 spot, and remained on the chart for 17 weeks. Track listing Side A "Bouquet" (Percy Faiht) "Tenderly" "Laura" "The Song from Moulin Rouge" "Beyond the Sea" "Autumn Leaves" Side B "Speak Low" "Solitude" "Deep Purple" "Intermezzo" "Ebb Tide" "Fascination" References 1959 albums Columbia Records albums Percy Faith albums
```java /* * code is released under a tri EPL/GPL/LGPL license. You can use it, * redistribute it and/or modify it under the terms of the: * */ package org.truffleruby.builtins; import com.oracle.truffle.api.dsl.GenerateInline; import org.truffleruby.annotations.Primitive; import org.truffleruby.language.RubyNode; import com.oracle.truffle.api.dsl.NodeChild; @NodeChild(value = "argumentNodes", type = RubyNode[].class) @GenerateInline(value = false, inherit = true) public abstract class PrimitiveArrayArgumentsNode extends PrimitiveNode { public abstract RubyNode[] getArgumentNodes(); @Override public RubyNode cloneUninitialized() { String primitiveName = getClass().getSuperclass().getAnnotation(Primitive.class).name(); var factory = getLanguage().primitiveManager.getPrimitive(primitiveName).getFactory(); RubyNode[] copiedArguments = cloneUninitialized(getArgumentNodes()); var copy = (PrimitiveArrayArgumentsNode) CoreMethodNodeManager.createNodeFromFactory(factory, copiedArguments); return copy.copyFlags(this); } } ```
```objective-c // // NSDictionary+Block.h // iOS-Categories (path_to_url // // Created by Jakey on 15/5/22. // #import <Foundation/Foundation.h> @interface NSDictionary (Block) #pragma mark - Manipulation - (NSDictionary *)dictionaryByAddingEntriesFromDictionary:(NSDictionary *)dictionary; - (NSDictionary *)dictionaryByRemovingEntriesWithKeys:(NSSet *)keys; #pragma mark - RX - (void)each:(void (^)(id k, id v))block; - (void)eachKey:(void (^)(id k))block; - (void)eachValue:(void (^)(id v))block; - (NSArray *)map:(id (^)(id key, id value))block; - (BOOL)hasKey:(id)key; - (NSDictionary *)pick:(NSArray *)keys; - (NSDictionary *)omit:(NSArray *)key; @end ```
This is a list of Hit the Stage episodes. - Contestant with highest scores - Contestant with lowest scores Season 1 Episodes 1–2, Theme: Devils Contestants : Hyoyeon (Girls' Generation), Taemin (Shinee), Bora (Sistar), Hoya (Infinite), U-Kwon (Block B), Shownu (Monsta X), Momo (Twice), Ten (NCT) Results by Order of Performance *As stated in episode 2, Ten had the highest score with 6 votes, the other contestants received 5 votes or less from the judges. Episodes 3–4, Theme: This Love Contestants : Hyoyeon (Girls' Generation), Jang Hyunseung, Hoya (Infinite), U-Kwon (Block B), Feeldog (Big Star), Momo (Twice), Ten (NCT), Chungha (I.O.I) Results by Order of Performance Episodes 5–6, Theme: Uniform Contestants : Stephanie, Hyoyeon (Girls' Generation), Jang Hyunseung, Bora (Sistar), Feeldog (Big Star), Shownu (Monsta X), Rocky (Astro), Ten (NCT) Results by Order of Performance Episodes 7–8, Theme: Crazy Contestants : Nicole, Jang Hyunseung, Bora (Sistar), U-Kwon (Block B), Seyong (Myname), Feeldog (Big Star), Mijoo (Lovelyz), Shownu (Monsta X) Results by Order of Performance Episode 9, Theme: The Fight Contestants : Hyoyeon (Girls' Generation), Min (miss A), Changjo (Teen Top), Yugyeom (Got7), Bitto (UP10TION), Eunjin (DIA) & Chaeyeon (DIA & I.O.I), Ten (NCT) Results by Order of Performance Episode 10, Theme: Final Contestants : Hyoyeon (Girls' Generation), U-Kwon (Block B), Yugyeom (Got7), Shownu (Monsta X), Ten (NCT), Chungha (I.O.I) Results by Order of Performance Lists of South Korean television series episodes
Lorena Clare Facio (born June 30, 1943) is the former First Lady of Costa Rica and wife of former President Miguel Ángel Rodríguez Echeverría. Biography She was born in San José, Costa Rica on June 30, 1943, to her parents Manuel Emilio Clare and María Elena Facio. She is the only daughter and has three brothers. She concluded her secondary school education in Colegio Nuestra Señora de Sión and left for France for a few years. After returning to Costa Rica she began bilingual studies at Lincoln School. She is known to be a skilled sportswoman and represented Costa Rica in dressage at the 1983 Pan American Games. She married Miguel Ángel Rodríguez on December 14, 1962, although she had met him as a teenager at a party in Barrio Aranjuez. They had three children: Miguel Alberto, Andrés and Ana Elena. During her time as First Lady she supported projects in benefit of older people and cancer patients, and was president of the Martín House of the Youth. She was part of the Social Christian Unity Party Planning Office. She was Costa Rica's last First Lady of the 20th century. References 1943 births Living people First ladies and gentlemen of Costa Rica Equestrians at the 1983 Pan American Games Pan American Games competitors for Costa Rica Costa Rican dressage riders Social Christian Unity Party politicians Sportspeople from San José, Costa Rica Costa Rican female equestrians
Stade Charles de Gaulle is a multi-use stadium in Porto-Novo, Benin named after Charles de Gaulle. It is currently used mostly for football matches and is used as the home stadium of AS Dragons FC de l'Ouémé, Aiglons FC. The stadium has a capacity of 15,000 people. References Football venues in Benin Buildings and structures in Porto-Novo
Unaporanga lanceolata is a species of beetle in the family Cerambycidae. It was described by Martins and Galileo in 2007. It is known from Ecuador. References Hemilophini Beetles described in 2007
Chen Shaoxiong (born 1962 - 26 November 2016) was an artist living and working in Beijing, China. Chen Shaoxing worked across mediums including paint, photography, and collage, though he has become increasingly focused on the combination of ink, video, and installation. Early life Chen Shaoxiong was born in 1962 in Shantou, a city in the eastern part of Guangdong province. Chen Shaoxiong graduated from Guangzhou Fine Art Academy in 1984, trained in Chinese ink. In 1990, he was a founder of conceptual art group Big Tail Elephant Group with Lin Yilin, Liang Juhui, and Xu Tan. Artist profile Chen belongs to a generation of Chinese artists who grew up during a period of significant political, socio-economic and cultural change in China, when information and images were routinely suppressed and restricted, and when distinctions between fact and fiction were blurred. Perhaps because of this experience, Chen is acutely conscious and skeptical of the ways in which history is misread and misrepresented, stating that even today "in our education, history is deliberately misinterpreted, randomly deleted and repeatedly distorted". Although his works are politically engaged, Chen refrains from making bold political statements, preferring a more multi-layered and open-ended approach, which he is able to achieve through the moving image. Ink History Ink History (2010) visually chronicles China’s history, from the fall of the Qing dynasty in 1911 to the beginning of the twenty-first century with images of the last Emperor, Japanese military presence, the Long March, and Mao Zedong announcing the People’s Republic of China, among others. Carefully selected and sparingly released at a time when all media were under Party control, these pictures became iconic—saturated with political meanings as well as personal memories. Ink History explores the relationship between personal and collective memory within the context of China’s historical trajectory. The work is accompanied by a soundtrack of well known propaganda songs, historical speeches and the relentless ticking of a clock. Whether it represents a clock or a time bomb is for viewers to decide. Death Chen Shaoxiong died on 26 November 2016, at age 54. Exhibitions Chen Shaoxing's work is currently on at the Solomon R. Guggenheim Museum in New York as part of Tales of Our Time, an exhibition that features newly commissioned artworks from Greater China. Collections Chen Shaoxing's work is a number of major collections including the Solomon R. Guggenheim Museum, Museum of Modern Art, Seattle Art Museum, M+, Victoria and Albert Museum, and the Uli Sigg collection in Switzerland among others. References Artists from Guangdong 1962 births Living people
```c /* libunwind - a platform-independent unwind library This file is part of libunwind. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include <stdlib.h> #include "unwind_i.h" unw_addr_space_t unw_create_addr_space (unw_accessors_t *a, int byte_order) { #ifdef UNW_LOCAL_ONLY return NULL; #else unw_addr_space_t as = malloc (sizeof (*as)); if (!as) return NULL; memset (as, 0, sizeof (*as)); as->acc = *a; /* * Tilegx supports only big or little-endian, not weird stuff like * PDP_ENDIAN. */ if (byte_order != 0 && byte_order != __LITTLE_ENDIAN && byte_order != __BIG_ENDIAN) return NULL; if (byte_order == 0) /* use host default: */ as->big_endian = (__BYTE_ORDER == __BIG_ENDIAN); else as->big_endian = (byte_order == __BIG_ENDIAN); as->abi = UNW_TILEGX_ABI_N64; as->addr_size = 8; return as; #endif } ```
```javascript var cudaBayer_8h = [ [ "cudaBayerToRGB", "cudaBayer_8h.html#a6cf20486164158f6c9cb95a069151658", null ], [ "cudaBayerToRGBA", "cudaBayer_8h.html#afa2c41e38d1f04c70284142c9a69eeb2", null ] ]; ```
Palazzo Spinola is a 16th-century palazzo in Milan, heavily remodelled during the 19th century. Historically belonging to the sestiere di Porta Nuova, it is located at 10 Via San Paolo. Since 1808 it has been the seat of the Garden Society. History and description Commissioned in 1580 by the Genoese banker Leonardo Spinola, a trusted man of Tommaso Marino another Genoese banker, the palace was built in three separate campaigns between 1570 and 1615 by an unknown architect. Hypotheses have been put forward regarding Pellegrino Pellegrini and Martino Bassi, but only Bassi's participation would now seem undoubted; today, the building owes much of its interior appearance to 19th-century alterations: the simple façade, in which the ashlar-work portal stands out, allows little to be seen of the luxurious interiors. Famous is the Sala d'oro designed by Gerolamo Arganini and decorated by Giacomo Tazzini: the hall, remodelled on the occasion of the wedding of Emperor Ferdinand I, is spacious and monumental, surrounded by a colonnade decorated with fregi and surmounted by the entablature forming the tribune for the orchestra; the frescos and gilded stuccoes on an ivory background also stand out; similarly the Sala d'silver named after the silver-coloured stuccoes by Luigi Tatti. Badly hit by Anglo-American bombing in 1943, the building caught fire and although the architecture of the façade and courtyard remained intact, the fire destroyed almost all of the upper floors and parts of the ground floor, resulting in the collapse of the roofs and most of the vaults and the loss of the two rooms described above, of which only the walls were saved. Another noteworthy room is undoubtedly the Ballroom, whose name suggests it was the venue for balls: a room that caught the attention of Stendhal, who was a guest in the palace many times during balls and celebrations. In the garden courtyard, there is the sixteenth-century belvedere tower, a room often used in garden parties on summer occasions. Palazzo Spinola housed until his death the large studio of the painter Luigi Conconi (1852—1917), who shared it for a long time with Gaetano Previati (1852—1920). See also Casa Atellani Notes Sources Italian sources Baroni, Costantino, Il palazzo di Leonardo Spinola, in "Milano", 1935, pp. 352-357 (Trivulziana Arch Per B1) Bascapè, Giacomo C., I palazzi della vecchia Milano, Milano, Hoepli 1986, pp. 278-81 Bruschetti, Ampelio - Madini, Pietro - Magistretti, Marco, Il Palazzo Spinola e la Società del Giardino in Milano, Milano, Arti Grafiche *Bertarelli 1919 (Trivulziana Arch D 37) Bruschetti, Ampelio, La Società del Giardino in Milano. Memorie ed Appunti, Milano, Zanaboni e Gabuzzi 1899 (Trivulziana Arch I 33) Cassi Ramelli, Antonio, Vita e rinascita del palazzo Spinola in Milano, estratto da Aspetti problemi realizzazioni di Milano, scritti in onore di Cesare Chiodi, Milano, Giuffrè 1957 pp. 177-194 (Sormani Q CONS 500) Della Torre,S., L’inventario dei beni mobili trovati nella residenza del conte Giovanni Anguissola, Governatore di Como (1578), in "Periodico della Società Storica Comense", LVI, 1994 (ma 1995), pp. 139-158. Madini, Pietro, Stendhal a Milano e il Casino degli Andeghee, Milano, Società del Giardino 1933 (Sormani L CONS 89) Società del Giardino, Società del Giardino 1783-1983, Milano 1983 External links Palazzo Spinola e la Società del Giardino di Paolo Colussi Palazzo Spinola (Milano) Renaissance architecture in Milan
Gary Yates (born in Montreal, Quebec) is a Canadian film director, producer, and screenwriter. His films include Seven Times Lucky, High Life, Niagara Motel and Taken in Broad Daylight. Yates’ films have won eight international awards and been nominated for twelve Genie Awards and six Director's Guild Awards. His feature film Seven Times Lucky premiered at the Sundance Film Festival and won Best Film and Best Screenplay at the Method Fest Film Festival in Los Angeles. His heist-comedy High Life premiered at the Berlin Film Festival. Johanna Schneller named High Life one of the 10 Best Films of 2010. References External links Film directors from Montreal Living people Writers from Montreal Canadian male screenwriters Year of birth missing (living people)
Robert Thompson (11 February 1878 – ?) was an English footballer who played in the Football League for Blackburn Rovers. References 1878 births Date of death unknown English men's footballers Men's association football goalkeepers English Football League players Blackburn Rovers F.C. players People from Whalley, Lancashire Footballers from Lancashire
```rust use std::path::PathBuf; use itertools::Itertools; use crate::{ merge_columnar, Cardinality, Column, ColumnarReader, DynamicColumn, StackMergeOrder, CURRENT_VERSION, }; const NUM_DOCS: u32 = u16::MAX as u32; fn generate_columnar(num_docs: u32, value_offset: u64) -> Vec<u8> { use crate::ColumnarWriter; let mut columnar_writer = ColumnarWriter::default(); for i in 0..num_docs { if i % 100 == 0 { columnar_writer.record_numerical(i, "sparse", value_offset + i as u64); } if i % 5 == 0 { columnar_writer.record_numerical(i, "dense", value_offset + i as u64); } columnar_writer.record_numerical(i, "full", value_offset + i as u64); columnar_writer.record_numerical(i, "multi", value_offset + i as u64); columnar_writer.record_numerical(i, "multi", value_offset + i as u64); } let mut wrt: Vec<u8> = Vec::new(); columnar_writer.serialize(num_docs, &mut wrt).unwrap(); wrt } #[test] /// Writes a columnar for the CURRENT_VERSION to disk. fn create_format() { let version = CURRENT_VERSION.to_string(); let file_path = path_for_version(&version); if PathBuf::from(file_path.clone()).exists() { return; } let columnar = generate_columnar(NUM_DOCS, 0); std::fs::write(file_path, columnar).unwrap(); } fn path_for_version(version: &str) -> String { format!("./compat_tests_data/{}.columnar", version) } #[test] fn test_format_v1() { let path = path_for_version("v1"); test_format(&path); } #[test] fn test_format_v2() { let path = path_for_version("v2"); test_format(&path); } fn test_format(path: &str) { let file_content = std::fs::read(path).unwrap(); let reader = ColumnarReader::open(file_content).unwrap(); check_columns(&reader); // Test merge let reader2 = ColumnarReader::open(generate_columnar(NUM_DOCS, NUM_DOCS as u64)).unwrap(); let columnar_readers = vec![&reader, &reader2]; let merge_row_order = StackMergeOrder::stack(&columnar_readers[..]); let mut out = Vec::new(); merge_columnar(&columnar_readers, &[], merge_row_order.into(), &mut out).unwrap(); let reader = ColumnarReader::open(out).unwrap(); check_columns(&reader); } fn check_columns(reader: &ColumnarReader) { let column = open_column(reader, "full"); check_column(&column, |doc_id| vec![(doc_id, doc_id as u64).into()]); assert_eq!(column.get_cardinality(), Cardinality::Full); let column = open_column(reader, "multi"); check_column(&column, |doc_id| { vec![ (doc_id * 2, doc_id as u64).into(), (doc_id * 2 + 1, doc_id as u64).into(), ] }); assert_eq!(column.get_cardinality(), Cardinality::Multivalued); let column = open_column(reader, "sparse"); check_column(&column, |doc_id| { if doc_id % 100 == 0 { vec![(doc_id / 100, doc_id as u64).into()] } else { vec![] } }); assert_eq!(column.get_cardinality(), Cardinality::Optional); let column = open_column(reader, "dense"); check_column(&column, |doc_id| { if doc_id % 5 == 0 { vec![(doc_id / 5, doc_id as u64).into()] } else { vec![] } }); assert_eq!(column.get_cardinality(), Cardinality::Optional); } struct RowIdAndValue { row_id: u32, value: u64, } impl From<(u32, u64)> for RowIdAndValue { fn from((row_id, value): (u32, u64)) -> Self { Self { row_id, value } } } fn check_column<F: Fn(u32) -> Vec<RowIdAndValue>>(column: &Column<u64>, expected: F) { let num_docs = column.num_docs(); let test_doc = |doc: u32| { if expected(doc).is_empty() { assert_eq!(column.first(doc), None); } else { assert_eq!(column.first(doc), Some(expected(doc)[0].value)); } let values = column.values_for_doc(doc).collect_vec(); assert_eq!(values, expected(doc).iter().map(|x| x.value).collect_vec()); let mut row_ids = Vec::new(); column.row_ids_for_docs(&[doc], &mut vec![], &mut row_ids); assert_eq!( row_ids, expected(doc).iter().map(|x| x.row_id).collect_vec() ); let values = column.values_for_doc(doc).collect_vec(); assert_eq!(values, expected(doc).iter().map(|x| x.value).collect_vec()); // Docid rowid conversion let mut row_ids = Vec::new(); let safe_next_doc = |doc: u32| (doc + 1).min(num_docs - 1); column .index .docids_to_rowids(&[doc, safe_next_doc(doc)], &mut vec![], &mut row_ids); let expected_rowids = expected(doc) .iter() .map(|x| x.row_id) .chain(expected(safe_next_doc(doc)).iter().map(|x| x.row_id)) .collect_vec(); assert_eq!(row_ids, expected_rowids); let rowid_range = column .index .docid_range_to_rowids(doc..safe_next_doc(doc) + 1); if expected_rowids.is_empty() { assert!(rowid_range.is_empty()); } else { assert_eq!( rowid_range, expected_rowids[0]..expected_rowids.last().unwrap() + 1 ); } }; test_doc(0); test_doc(num_docs - 1); test_doc(num_docs - 2); test_doc(65000); } fn open_column(reader: &ColumnarReader, name: &str) -> Column<u64> { let column = reader.read_columns(name).unwrap()[0] .open() .unwrap() .coerce_numerical(crate::NumericalType::U64) .unwrap(); let DynamicColumn::U64(column) = column else { panic!(); }; column } ```
```xml import type { IEffects, IPalette, ISemanticColors } from '../types/index'; /** Generates all the semantic slot colors based on the theme so far * We'll use these as fallbacks for semantic slots that the passed in theme did not define. * The caller must still mix in the customized semantic slots at the end. */ export function makeSemanticColors( p: IPalette, e: IEffects, s: Partial<ISemanticColors> | undefined, isInverted: boolean, depComments: boolean = false, ): ISemanticColors { const semanticColors: Partial<ISemanticColors> = { primaryButtonBorder: 'transparent', errorText: !isInverted ? '#a4262c' : '#F1707B', messageText: !isInverted ? '#323130' : '#F3F2F1', messageLink: !isInverted ? '#005A9E' : '#6CB8F6', messageLinkHovered: !isInverted ? '#004578' : '#82C7FF', infoIcon: !isInverted ? '#605e5c' : '#C8C6C4', errorIcon: !isInverted ? '#A80000' : '#F1707B', blockingIcon: !isInverted ? '#FDE7E9' : '#442726', warningIcon: !isInverted ? '#797775' : '#C8C6C4', severeWarningIcon: !isInverted ? '#D83B01' : '#FCE100', successIcon: !isInverted ? '#107C10' : '#92C353', infoBackground: !isInverted ? '#f3f2f1' : '#323130', errorBackground: !isInverted ? '#FDE7E9' : '#442726', blockingBackground: !isInverted ? '#FDE7E9' : '#442726', warningBackground: !isInverted ? '#FFF4CE' : '#433519', severeWarningBackground: !isInverted ? '#FED9CC' : '#4F2A0F', successBackground: !isInverted ? '#DFF6DD' : '#393D1B', // deprecated warningHighlight: !isInverted ? '#ffb900' : '#fff100', successText: !isInverted ? '#107C10' : '#92c353', ...s, }; const fullSemanticColors = getSemanticColors<ISemanticColors>(p, e, semanticColors, isInverted); return _fixDeprecatedSlots(fullSemanticColors, depComments); } /** * Map partial platte and effects to partial semantic colors. */ export function getSemanticColors<TResult = Partial<ISemanticColors>>( p: Partial<IPalette> | undefined, e: Partial<IEffects> | undefined, s: Partial<ISemanticColors> | undefined, isInverted: boolean, depComments: boolean = false, ): TResult { let result: Partial<ISemanticColors> = {}; // map palette const { white, black, themePrimary, themeDark, themeDarker, themeDarkAlt, themeLighter, neutralLight, neutralLighter, neutralDark, neutralQuaternary, neutralQuaternaryAlt, neutralPrimary, neutralSecondary, neutralSecondaryAlt, neutralTertiary, neutralTertiaryAlt, neutralLighterAlt, accent, } = p || {}; if (white) { result.bodyBackground = white; result.bodyFrameBackground = white; result.accentButtonText = white; result.buttonBackground = white; result.primaryButtonText = white; result.primaryButtonTextHovered = white; result.primaryButtonTextPressed = white; result.inputBackground = white; result.inputForegroundChecked = white; result.listBackground = white; result.menuBackground = white; result.cardStandoutBackground = white; } if (black) { result.bodyTextChecked = black; result.buttonTextCheckedHovered = black; } if (themePrimary) { result.link = themePrimary; result.primaryButtonBackground = themePrimary; result.inputBackgroundChecked = themePrimary; result.inputIcon = themePrimary; result.inputFocusBorderAlt = themePrimary; result.menuIcon = themePrimary; result.menuHeader = themePrimary; result.accentButtonBackground = themePrimary; } if (themeDark) { result.primaryButtonBackgroundPressed = themeDark; result.inputBackgroundCheckedHovered = themeDark; result.inputIconHovered = themeDark; } if (themeDarker) { result.linkHovered = themeDarker; } if (themeDarkAlt) { result.primaryButtonBackgroundHovered = themeDarkAlt; } if (themeLighter) { result.inputPlaceholderBackgroundChecked = themeLighter; } if (neutralLight) { result.bodyBackgroundChecked = neutralLight; result.bodyFrameDivider = neutralLight; result.bodyDivider = neutralLight; result.variantBorder = neutralLight; result.buttonBackgroundCheckedHovered = neutralLight; result.buttonBackgroundPressed = neutralLight; result.listItemBackgroundChecked = neutralLight; result.listHeaderBackgroundPressed = neutralLight; result.menuItemBackgroundPressed = neutralLight; // eslint-disable-next-line deprecation/deprecation result.menuItemBackgroundChecked = neutralLight; } if (neutralLighter) { result.bodyBackgroundHovered = neutralLighter; result.buttonBackgroundHovered = neutralLighter; result.buttonBackgroundDisabled = neutralLighter; result.buttonBorderDisabled = neutralLighter; result.primaryButtonBackgroundDisabled = neutralLighter; result.disabledBackground = neutralLighter; result.listItemBackgroundHovered = neutralLighter; result.listHeaderBackgroundHovered = neutralLighter; result.menuItemBackgroundHovered = neutralLighter; } if (neutralQuaternary) { result.primaryButtonTextDisabled = neutralQuaternary; result.disabledSubtext = neutralQuaternary; } if (neutralQuaternaryAlt) { result.listItemBackgroundCheckedHovered = neutralQuaternaryAlt; } if (neutralTertiary) { result.disabledBodyText = neutralTertiary; result.variantBorderHovered = s?.variantBorderHovered || neutralTertiary; result.buttonTextDisabled = neutralTertiary; result.inputIconDisabled = neutralTertiary; result.disabledText = neutralTertiary; } if (neutralPrimary) { result.bodyText = neutralPrimary; result.actionLink = neutralPrimary; result.buttonText = neutralPrimary; result.inputBorderHovered = neutralPrimary; result.inputText = neutralPrimary; result.listText = neutralPrimary; result.menuItemText = neutralPrimary; } if (neutralLighterAlt) { result.bodyStandoutBackground = neutralLighterAlt; result.defaultStateBackground = neutralLighterAlt; } if (neutralDark) { result.actionLinkHovered = neutralDark; result.buttonTextHovered = neutralDark; result.buttonTextChecked = neutralDark; result.buttonTextPressed = neutralDark; result.inputTextHovered = neutralDark; result.menuItemTextHovered = neutralDark; } if (neutralSecondary) { result.bodySubtext = neutralSecondary; result.focusBorder = neutralSecondary; result.inputBorder = neutralSecondary; result.smallInputBorder = neutralSecondary; result.inputPlaceholderText = neutralSecondary; } if (neutralSecondaryAlt) { result.buttonBorder = neutralSecondaryAlt; } if (neutralTertiaryAlt) { result.disabledBodySubtext = neutralTertiaryAlt; result.disabledBorder = neutralTertiaryAlt; result.buttonBackgroundChecked = neutralTertiaryAlt; result.menuDivider = neutralTertiaryAlt; } if (accent) { result.accentButtonBackground = accent; } // map effects if (e?.elevation4) { result.cardShadow = e.elevation4; } if (!isInverted && e?.elevation8) { result.cardShadowHovered = e.elevation8; } else if (result.variantBorderHovered) { result.cardShadowHovered = '0 0 1px ' + result.variantBorderHovered; } result = { ...result, // mix in customized semantic slots ...s, }; return result as TResult; } function _fixDeprecatedSlots(s: ISemanticColors, depComments: boolean): ISemanticColors { // Add @deprecated tag as comment if enabled let dep = ''; if (depComments === true) { dep = ' /* @deprecated */'; } /* eslint-disable deprecation/deprecation */ s.listTextColor = s.listText + dep; s.menuItemBackgroundChecked += dep; s.warningHighlight += dep; s.warningText = s.messageText + dep; s.successText += dep; /* eslint-enable deprecation/deprecation */ return s; } ```
```python import sys import unittest import unreal_engine as ue import os.path # ue.sandbox_exec(ue.find_plugin('UnrealEnginePython').get_base_dir() + '/run_tests.py') # setup classic stdout/stderr class UnrealEngineOutput: def __init__(self, logger): self.logger = logger def write(self, buf): self.logger(buf) def flush(self): return sys.stdout = UnrealEngineOutput(ue.log) sys.stderr = UnrealEngineOutput(ue.log_error) uep_base = ue.find_plugin('UnrealEnginePython').get_base_dir() loader = unittest.TestLoader() tests = loader.discover(os.path.join(uep_base, 'tests')) runner = unittest.runner.TextTestRunner() runner.run(tests) ```
Sir Cecil Francis Joseph Dormer (14 February 1883 – 28 July 1979) was the British Minister to Norway between 1934 and 1941. Early life and background Dormer was the son of Hon. Hubert Francis Dormer (1837-1913) and Mary Jane Elizabeth Digby (d. 1938). His father was a younger son of Thaddeus Dormer, 11th Baron Dormer. Military career In April–May 1917 he was a member of the Balfour Mission, intended to promote cooperation between the US and UK during World War I. After the German invasion of Norway in April 1940 he joined Norway's government and King on their move northwards, and followed the government into exile in London in June 1940. He was appointed Ambassador to Poland's exile government from 1941 until 1943. Personal life On 25 February 1915, Dormer married Lady Mary Alice Clara Feilding (31 March 1888 – 7 March 1973), the daughter of Rudolph Feilding, 9th Earl of Denbigh. Awards and honours He was knighted KCMG in the 1937 Coronation Honours. References 1883 births 1979 deaths Ambassadors of the United Kingdom to Norway Ambassadors of the United Kingdom to Poland British people of World War II Knights Commander of the Order of St Michael and St George Members of the Royal Victorian Order
Doodletown was an isolated hamlet in the Town of Stony Point, Rockland County, New York, United States. Purchased by the Palisades Interstate Park Commission during the 1960s, it is now part of Bear Mountain State Park and a popular destination for hikers, birdwatchers, botanists, and local historians. It is located north of Jones Point, west of Iona Island, and southeast of Orange County. The former settlement is now a ghost town. Members of the first family to settle in Doodletown during the 18th century, Huguenots whose last name was anglicized to "June", were also the last to leave it in the 1960s. History The Munsee Indians were the first to inhabit the valley. In 1683, Stephanus Van Cortlandt, bought the land in the area from the Haverstraw Indians. In April 1762, Ithiel June purchased 72 acres, from the Tomkins family who were already living there. The name is said to derive from the Dutch Dooddel, or "dead valley", with the "town" suffix added later by English-speaking settlers. The settlement was a crossroads for soldiers during the Revolutionary War during battles at Bear Mountain's Fort Montgomery when many hundreds of British soldiers marched through the tiny settlement prior to a bloody and significant battle with colonists. The Doodletown Road was used by troops accompanying Mad Anthony Wayne on his successful attack on Stony Point. Early residents worked as loggers and miners, and the remains of the mines are still visible today. There were also small farms and businesses. Others worked at the Iona Island Picnic Grove, a resort built on Iona Island after the Civil War. Around 1900 the United States Navy purchased Iona for an ammunition depot. In 1903 there was a severe explosion at the site, and a worker from Doodletown was killed. Around 1854, the Mountville Presbyterian Church was built to serve the families of Doodletown. The building was also used for a school. In the 1890s, Thomas Edison bought a defunct iron mine in Doodletown to test his proposed technique for an improved method of refining ore. Nothing came of his project, although several iron mines had been successfully developed and abandoned in the neighborhood at a much earlier date. By the 1920s, the height of population for Doodletown, the settlement had a school, a church, several small businesses, two cemeteries and approximately 70 homes. At least several families had lived there for generations. Around this era, military and tourism-related enterprises on nearby Iona Island employed residents, as did the Palisades Interstate Park Commission. Other residences were maintained as second homes or were inhabited by retired people from the New York City area, and Doodletown's population thus reached its historic peak of about 350 residents. Bear Mountain began to be developed as a park in the early 20th century, and began to expand around 1920, in part by purchasing property from the landowners in Doodletown, as did the separate but contiguous Harriman State Park, where a story that is analogous but less widely noted than Doodletown, concerns the nearby hamlet of Jones Point. By the 1950s, most of the Doodletown residents had moved away, many to nearby Stony Point or into southern Orange County. Those who refused to sell lost their land through eminent domain by 1965, and most of the remaining structures were demolished or disassembled and moved out by the late 1960s. Debris was buried, the roads were closed, and the surrounding woods were allowed to grow over the properties. In the early 1970s, a dam was built on the Timp Brook, creating a sizable pond. The last remaining building, the stone school house, was kept as a shelter for hikers until vandalism caused the park commission to tear it down in 1980. Doodletown and nearby Iona Island were designated as New York State Important Bird Areas in 1997 and a New York State Bird Conservation Area. Hiking Today, many foundations, walls, and staircases are still visible. The area is accessible by various trails and former roadways. The town's cemeteries contain graves ranging from centuries old to much more recent years, as former residents and their relatives can still choose to be buried there. Steel signage has recently been installed by the park service, listing which families owned each property and often showing photographs of former buildings. Orientation signs are located at intervals throughout the area. The simplest and most direct access for hikers is from a small parking area on Route 9W near Iona Island. From here one follows the Cornell Mine Trail to the 1777 East Trail, which runs directly into the heart of the area. Doodletown may also be approached from the south end of the parking lot at Bear Mountain Inn via an underpass beneath Seven Lakes Drive. Other approaches include from the Palisades Parkway side, taking the Fawn Trail to the Bridle Path, or from Jones Point and over Dunderberg Mountain, taking the Ramapo-Dunderberg trail to the Cornell Mine trail. One may also enter the area from the Long Mountain Parkway side, which is a more direct route to the 1777 West Trail or the Bridle Path. Hikers are urged to be wary of rattlesnakes, copperheads, black snakes and garters still prevalent in the area. References External links Ghosttowns.com entry Landmarks in New York (state) Ghost towns in New York (state) Bear Mountain State Park Ramapos Geography of Rockland County, New York 1762 establishments in the Province of New York Former populated places in Rockland County, New York
```java * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ package org.flowable.engine.impl.cmd; import java.io.Serializable; import java.util.List; import org.flowable.common.engine.api.FlowableObjectNotFoundException; import org.flowable.common.engine.impl.interceptor.Command; import org.flowable.common.engine.impl.interceptor.CommandContext; import org.flowable.engine.impl.persistence.entity.ExecutionEntity; import org.flowable.engine.impl.util.CommandContextUtil; import org.flowable.identitylink.api.IdentityLink; /** * @author Marcus Klimstra */ public class GetIdentityLinksForProcessInstanceCmd implements Command<List<IdentityLink>>, Serializable { private static final long serialVersionUID = 1L; protected String processInstanceId; public GetIdentityLinksForProcessInstanceCmd(String processInstanceId) { this.processInstanceId = processInstanceId; } @SuppressWarnings({ "unchecked", "rawtypes" }) @Override public List<IdentityLink> execute(CommandContext commandContext) { ExecutionEntity processInstance = CommandContextUtil.getExecutionEntityManager(commandContext).findById(processInstanceId); if (processInstance == null) { throw new FlowableObjectNotFoundException("Cannot find process instance with id " + processInstanceId, ExecutionEntity.class); } return (List) processInstance.getIdentityLinks(); } } ```
Frederick May may refer to: Frederick May (academic) (1921–1976), Australian professor of Italian Frederick May (composer) (1911–1985), Irish composer and arranger Frederick May (engineer) (1840–1897), Australian engineer and manufacturer
```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 "pch_test_opt_loop.h" ```
```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\Dataflow; class JobMetadata extends \Google\Collection { protected $collection_key = 'spannerDetails'; protected $bigTableDetailsType = BigTableIODetails::class; protected $bigTableDetailsDataType = 'array'; protected $bigqueryDetailsType = BigQueryIODetails::class; protected $bigqueryDetailsDataType = 'array'; protected $datastoreDetailsType = DatastoreIODetails::class; protected $datastoreDetailsDataType = 'array'; protected $fileDetailsType = FileIODetails::class; protected $fileDetailsDataType = 'array'; protected $pubsubDetailsType = PubSubIODetails::class; protected $pubsubDetailsDataType = 'array'; protected $sdkVersionType = SdkVersion::class; protected $sdkVersionDataType = ''; protected $spannerDetailsType = SpannerIODetails::class; protected $spannerDetailsDataType = 'array'; /** * @var string[] */ public $userDisplayProperties; /** * @param BigTableIODetails[] */ public function setBigTableDetails($bigTableDetails) { $this->bigTableDetails = $bigTableDetails; } /** * @return BigTableIODetails[] */ public function getBigTableDetails() { return $this->bigTableDetails; } /** * @param BigQueryIODetails[] */ public function setBigqueryDetails($bigqueryDetails) { $this->bigqueryDetails = $bigqueryDetails; } /** * @return BigQueryIODetails[] */ public function getBigqueryDetails() { return $this->bigqueryDetails; } /** * @param DatastoreIODetails[] */ public function setDatastoreDetails($datastoreDetails) { $this->datastoreDetails = $datastoreDetails; } /** * @return DatastoreIODetails[] */ public function getDatastoreDetails() { return $this->datastoreDetails; } /** * @param FileIODetails[] */ public function setFileDetails($fileDetails) { $this->fileDetails = $fileDetails; } /** * @return FileIODetails[] */ public function getFileDetails() { return $this->fileDetails; } /** * @param PubSubIODetails[] */ public function setPubsubDetails($pubsubDetails) { $this->pubsubDetails = $pubsubDetails; } /** * @return PubSubIODetails[] */ public function getPubsubDetails() { return $this->pubsubDetails; } /** * @param SdkVersion */ public function setSdkVersion(SdkVersion $sdkVersion) { $this->sdkVersion = $sdkVersion; } /** * @return SdkVersion */ public function getSdkVersion() { return $this->sdkVersion; } /** * @param SpannerIODetails[] */ public function setSpannerDetails($spannerDetails) { $this->spannerDetails = $spannerDetails; } /** * @return SpannerIODetails[] */ public function getSpannerDetails() { return $this->spannerDetails; } /** * @param string[] */ public function setUserDisplayProperties($userDisplayProperties) { $this->userDisplayProperties = $userDisplayProperties; } /** * @return string[] */ public function getUserDisplayProperties() { return $this->userDisplayProperties; } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(JobMetadata::class, 'Google_Service_Dataflow_JobMetadata'); ```
Base amount or base value (also basic amount, or basic value, or base rate) (, ; commonly abbreviated as БВ or б. в.) is sort of notional amount used in Belarus to keep amount of pensions, scholarships, social welfare payments, duties, taxes, and fines in the text of laws stable and relevant regardless of the level of inflation. Base amount () is also used in Poland to keep pensions on a stable level, regardless of inflation. A similar measure, income base amount (), is used in Sweden. History Until 2002, fines, taxes, fees and other payments in Belarus were calculated in multiples up to the minimum wage. In accordance with the Presidential Decree № 3 of 15.02.2002, the minimum wage is used only in labor relations. According to the Resolution of the Council of Ministers of 22.02.2002 № 243 for the calculation of fines, taxes, fees and other payments, a base amount of (about €6.92 at that time) is applied. Usage examples Foreign citizens entering the Republic of Belarus for less than a month of stay should have funds equivalent to at least 2 base amounts per each day of stay. For stays extending a month, foreign citizens should have funds equivalent to at least 50 base amounts. The Belarusian Code of Administrative Offences contains no fines in rubles, base amount is used as unit instead. For individuals, fines have a size of from 0.1 to 500 base amounts. Victims of the terrorist attack in Minsk have received financial assistance in the amount of up to 1000 base amounts. The maximum monthly unemployment benefit in Belarus is twice the base amount. Amount and effective dates Simplified approximation As seen above, from 2005 year base amount is set in amount that can be approximated to €10. For example, if the amount of some fine is 35 base amounts, it can be easily assumed as €350. The United States Department of State in its travel information uses an approximation of 2 base amounts to €25, which covers the actual amount on the safe side. See also Average Indexed Monthly Earnings Notes References Inflation Economy of Belarus
```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 "sdkconfig.h" #if defined(CONFIG_BT_ENABLED) && defined(CONFIG_BLUEDROID_ENABLED) #include "SimpleBLE.h" #include "esp32-hal-log.h" #include "esp_bt.h" #include "esp_gap_ble_api.h" #include "esp_gatts_api.h" #include "esp_bt_defs.h" #include "esp_bt_main.h" static esp_ble_adv_data_t _adv_config = { .set_scan_rsp = false, .include_name = true, .include_txpower = true, .min_interval = 512, .max_interval = 1024, .appearance = 0, .manufacturer_len = 0, .p_manufacturer_data = NULL, .service_data_len = 0, .p_service_data = NULL, .service_uuid_len = 0, .p_service_uuid = NULL, .flag = (ESP_BLE_ADV_FLAG_GEN_DISC | ESP_BLE_ADV_FLAG_BREDR_NOT_SPT) }; static esp_ble_adv_params_t _adv_params = { .adv_int_min = 512, .adv_int_max = 1024, .adv_type = ADV_TYPE_NONCONN_IND, .own_addr_type = BLE_ADDR_TYPE_PUBLIC, .peer_addr = { 0x00, }, .peer_addr_type = BLE_ADDR_TYPE_PUBLIC, .channel_map = ADV_CHNL_ALL, .adv_filter_policy = ADV_FILTER_ALLOW_SCAN_ANY_CON_ANY, }; static void _on_gap(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param) { if (event == ESP_GAP_BLE_ADV_DATA_SET_COMPLETE_EVT) { esp_ble_gap_start_advertising(&_adv_params); } } static bool _init_gap(const char *name) { if (!btStarted() && !btStart()) { log_e("btStart failed"); return false; } esp_bluedroid_status_t bt_state = esp_bluedroid_get_status(); if (bt_state == ESP_BLUEDROID_STATUS_UNINITIALIZED) { if (esp_bluedroid_init()) { log_e("esp_bluedroid_init failed"); return false; } } if (bt_state != ESP_BLUEDROID_STATUS_ENABLED) { if (esp_bluedroid_enable()) { log_e("esp_bluedroid_enable failed"); return false; } } if (esp_ble_gap_set_device_name(name)) { log_e("gap_set_device_name failed"); return false; } if (esp_ble_gap_config_adv_data(&_adv_config)) { log_e("gap_config_adv_data failed"); return false; } if (esp_ble_gap_register_callback(_on_gap)) { log_e("gap_register_callback failed"); return false; } return true; } static bool _stop_gap() { if (btStarted()) { esp_bluedroid_disable(); esp_bluedroid_deinit(); btStop(); } return true; } /* * BLE Arduino * * */ SimpleBLE::SimpleBLE() { local_name = "esp32"; } SimpleBLE::~SimpleBLE(void) { _stop_gap(); } bool SimpleBLE::begin(String localName) { if (localName.length()) { local_name = localName; } return _init_gap(local_name.c_str()); } void SimpleBLE::end() { _stop_gap(); } #endif ```
```swift import Foundation import CoreBluetooth class RxCBPeripheral: RxPeripheralType { let peripheral: CBPeripheral private let internalDelegate: InternalPeripheralDelegate init(peripheral: CBPeripheral) { self.peripheral = peripheral internalDelegate = RxCBPeripheral.getInternalPeripheralDelegateRef(cbPeripheral: peripheral) } deinit { RxCBPeripheral.putInternalPeripheralDelegateRef(cbPeripheral: peripheral) } var identifier: UUID { return peripheral.value(forKey: "identifier") as! NSUUID as UUID } var objectId: UInt { return UInt(bitPattern: ObjectIdentifier(peripheral)) } var name: String? { return peripheral.name } var state: CBPeripheralState { return peripheral.state } var services: [RxServiceType]? { return peripheral.services?.compactMap(RxCBService.init) } var canSendWriteWithoutResponse: Bool { // Although available since iOS 11.0, on versions < iOS 11.2 canSendWriteWithoutResponse will always // return false (on first try). We work around this issue by always returning true for < iOS 11.2. // See: path_to_url if #available(iOS 11.2, *) { return peripheral.canSendWriteWithoutResponse } else { return true } } var rx_didUpdateName: Observable<String?> { return internalDelegate.peripheralDidUpdateNameSubject } var rx_didModifyServices: Observable<([RxServiceType])> { return internalDelegate.peripheralDidModifyServicesSubject } var rx_didReadRSSI: Observable<(Int, Error?)> { return internalDelegate.peripheralDidReadRSSISubject } var rx_didDiscoverServices: Observable<([RxServiceType]?, Error?)> { return internalDelegate.peripheralDidDiscoverServicesSubject } var rx_didDiscoverIncludedServicesForService: Observable<(RxServiceType, Error?)> { return internalDelegate.peripheralDidDiscoverIncludedServicesForServiceSubject } var rx_didDiscoverCharacteristicsForService: Observable<(RxServiceType, Error?)> { return internalDelegate.peripheralDidDiscoverCharacteristicsForServiceSubject } var rx_didUpdateValueForCharacteristic: Observable<(RxCharacteristicType, Error?)> { return internalDelegate.peripheralDidUpdateValueForCharacteristicSubject } var rx_didWriteValueForCharacteristic: Observable<(RxCharacteristicType, Error?)> { return internalDelegate.peripheralDidWriteValueForCharacteristicSubject } var rx_didUpdateNotificationStateForCharacteristic: Observable<(RxCharacteristicType, Error?)> { return internalDelegate.peripheralDidUpdateNotificationStateForCharacteristicSubject } var rx_didDiscoverDescriptorsForCharacteristic: Observable<(RxCharacteristicType, Error?)> { return internalDelegate.peripheralDidDiscoverDescriptorsForCharacteristicSubject } var rx_didUpdateValueForDescriptor: Observable<(RxDescriptorType, Error?)> { return internalDelegate.peripheralDidUpdateValueForDescriptorSubject } var rx_didWriteValueForDescriptor: Observable<(RxDescriptorType, Error?)> { return internalDelegate.peripheralDidWriteValueForDescriptorSubject } var rx_isReadyToSendWriteWithoutResponse: Observable<Bool> { return internalDelegate.peripheralIsReadyToSendWriteWithoutResponseSubject } func discoverServices(_ serviceUUIDs: [CBUUID]?) { RxBluetoothKitLog.d(""" \(peripheral.logDescription) discoverServices( serviceUUIDs: \(String(describing: serviceUUIDs?.logDescription))) """) peripheral.discoverServices(serviceUUIDs) } func discoverCharacteristics(_ characteristicUUIDs: [CBUUID]?, for service: RxServiceType) { let cbService = (service as! RxCBService).service RxBluetoothKitLog.d(""" \(peripheral.logDescription) discoverCharacteristics( characteristicUUIDs: \(String(describing: characteristicUUIDs?.logDescription)), for: \(cbService.logDescription)) """) peripheral.discoverCharacteristics(characteristicUUIDs, for: cbService) } func discoverIncludedServices(_ includedServiceUUIDs: [CBUUID]?, for service: RxServiceType) { let cbService = (service as! RxCBService).service RxBluetoothKitLog.d(""" \(peripheral.logDescription) discoverIncludedServices( includedServiceUUIDs: \(String(describing: includedServiceUUIDs?.logDescription)), for: \(cbService.logDescription)) """) peripheral.discoverIncludedServices(includedServiceUUIDs, for: cbService) } func readValue(for characteristic: RxCharacteristicType) { let cbcharacteristic = (characteristic as! RxCBCharacteristic).characteristic RxBluetoothKitLog.d(""" \(peripheral.logDescription) readValue( for: \(cbcharacteristic.logDescription)) """) peripheral.readValue(for: cbcharacteristic) } func writeValue(_ data: Data, for characteristic: RxCharacteristicType, type: CBCharacteristicWriteType) { let cbcharacteristic = (characteristic as! RxCBCharacteristic).characteristic RxBluetoothKitLog.d(""" \(peripheral.logDescription) writeValue( data: \(data.logDescription), for: \(cbcharacteristic.logDescription), type: \(type.logDescription)) """) peripheral.writeValue(data, for: cbcharacteristic, type: type) } func setNotifyValue(_ enabled: Bool, for characteristic: RxCharacteristicType) { let cbcharacteristic = (characteristic as! RxCBCharacteristic).characteristic RxBluetoothKitLog.d(""" \(peripheral.logDescription) setNotifyValue( enabled: \(enabled), for: \(cbcharacteristic.logDescription)) """) peripheral.setNotifyValue(enabled, for: cbcharacteristic) } func discoverDescriptors(for characteristic: RxCharacteristicType) { let cbcharacteristic = (characteristic as! RxCBCharacteristic).characteristic RxBluetoothKitLog.d(""" \(peripheral.logDescription) discoverDescriptors( for: \(cbcharacteristic.logDescription)) """) peripheral.discoverDescriptors(for: cbcharacteristic) } func readValue(for descriptor: RxDescriptorType) { let cbdescriptor = (descriptor as! RxCBDescriptor).descriptor RxBluetoothKitLog.d(""" \(peripheral.logDescription) readValue( for: \(cbdescriptor.logDescription)) """) peripheral.readValue(for: cbdescriptor) } @available(OSX 10.12, iOS 9.0, *) func maximumWriteValueLength(for type: CBCharacteristicWriteType) -> Int { return peripheral.maximumWriteValueLength(for: type) } func writeValue(_ data: Data, for descriptor: RxDescriptorType) { let cbdescriptor = (descriptor as! RxCBDescriptor).descriptor RxBluetoothKitLog.d(""" \(peripheral.logDescription) writeValue( data: \(data.logDescription), for: \(cbdescriptor.logDescription)) """) peripheral.writeValue(data, for: cbdescriptor) } func readRSSI() { RxBluetoothKitLog.d("\(peripheral.logDescription) readRSSI()") peripheral.readRSSI() } @objc fileprivate class InternalPeripheralDelegate: NSObject, CBPeripheralDelegate { let peripheralDidUpdateNameSubject = PublishSubject<String?>() let peripheralDidModifyServicesSubject = PublishSubject<([RxServiceType])>() let peripheralDidReadRSSISubject = PublishSubject<(Int, Error?)>() let peripheralDidDiscoverServicesSubject = PublishSubject<([RxServiceType]?, Error?)>() let peripheralDidDiscoverIncludedServicesForServiceSubject = PublishSubject<(RxServiceType, Error?)>() let peripheralDidDiscoverCharacteristicsForServiceSubject = PublishSubject<(RxServiceType, Error?)>() let peripheralDidUpdateValueForCharacteristicSubject = PublishSubject<(RxCharacteristicType, Error?)>() let peripheralDidWriteValueForCharacteristicSubject = PublishSubject<(RxCharacteristicType, Error?)>() let peripheralDidUpdateNotificationStateForCharacteristicSubject = PublishSubject<(RxCharacteristicType, Error?)>() let peripheralDidDiscoverDescriptorsForCharacteristicSubject = PublishSubject<(RxCharacteristicType, Error?)>() let peripheralDidUpdateValueForDescriptorSubject = PublishSubject<(RxDescriptorType, Error?)>() let peripheralDidWriteValueForDescriptorSubject = PublishSubject<(RxDescriptorType, Error?)>() let peripheralIsReadyToSendWriteWithoutResponseSubject = PublishSubject<Bool>() @objc func peripheralDidUpdateName(_ peripheral: CBPeripheral) { RxBluetoothKitLog.d(""" \(peripheral.logDescription) didUpdateName(name: \(String(describing: peripheral.name))) """) peripheralDidUpdateNameSubject.onNext(peripheral.name) } @objc func peripheral(_ peripheral: CBPeripheral, didModifyServices invalidatedServices: [CBService]) { RxBluetoothKitLog.d(""" \(peripheral.logDescription) didModifyServices(services: [\(invalidatedServices.logDescription))] """) peripheralDidModifyServicesSubject.onNext(invalidatedServices.compactMap(RxCBService.init)) } @objc func peripheral(_ peripheral: CBPeripheral, didReadRSSI rssi: NSNumber, error: Error?) { RxBluetoothKitLog.d(""" \(peripheral.logDescription) didReadRSSI(rssi: \(rssi), error: \(String(describing: error))) """) peripheralDidReadRSSISubject.onNext((rssi.intValue, error)) } @objc func peripheral(_ peripheral: CBPeripheral, didDiscoverServices error: Error?) { RxBluetoothKitLog.d(""" \(peripheral.logDescription) didDiscoverServices(services : \(String(describing: peripheral.services?.logDescription)), error: \(String(describing: error))) """) peripheralDidDiscoverServicesSubject.onNext((peripheral.services?.compactMap(RxCBService.init), error)) } @objc func peripheral(_ peripheral: CBPeripheral, didDiscoverIncludedServicesFor service: CBService, error: Error?) { RxBluetoothKitLog.d(""" \(peripheral.logDescription) didDiscoverIncludedServices(for: \(service.logDescription), includedServices: \(String(describing: service.includedServices?.logDescription)), error: \(String(describing: error))) """) peripheralDidDiscoverIncludedServicesForServiceSubject.onNext((RxCBService(service: service), error)) } @objc func peripheral(_ peripheral: CBPeripheral, didDiscoverCharacteristicsFor service: CBService, error: Error?) { RxBluetoothKitLog.d(""" \(peripheral.logDescription) didDiscoverCharacteristicsFor(for: \(service.logDescription), characteristics: \(String(describing: service.characteristics?.logDescription)), error: \(String(describing: error))) """) peripheralDidDiscoverCharacteristicsForServiceSubject.onNext((RxCBService(service: service), error)) } @objc func peripheral(_ peripheral: CBPeripheral, didUpdateValueFor characteristic: CBCharacteristic, error: Error?) { RxBluetoothKitLog.d(""" \(peripheral.logDescription) didUpdateValueFor(for:\(characteristic.logDescription), value: \(String(describing: characteristic.value?.logDescription)), error: \(String(describing: error))) """) peripheralDidUpdateValueForCharacteristicSubject .onNext((RxCBCharacteristic(characteristic: characteristic), error)) } @objc func peripheral(_ peripheral: CBPeripheral, didWriteValueFor characteristic: CBCharacteristic, error: Error?) { RxBluetoothKitLog.d(""" \(peripheral.logDescription) didWriteValueFor(for:\(characteristic.logDescription), value: \(String(describing: characteristic.value?.logDescription)), error: \(String(describing: error))) """) peripheralDidWriteValueForCharacteristicSubject .onNext((RxCBCharacteristic(characteristic: characteristic), error)) } @objc func peripheral(_ peripheral: CBPeripheral, didUpdateNotificationStateFor characteristic: CBCharacteristic, error: Error?) { RxBluetoothKitLog.d(""" \(peripheral.logDescription) didUpdateNotificationStateFor( for:\(characteristic.logDescription), isNotifying: \(characteristic.isNotifying), error: \(String(describing: error))) """) peripheralDidUpdateNotificationStateForCharacteristicSubject .onNext((RxCBCharacteristic(characteristic: characteristic), error)) } @objc func peripheral(_ peripheral: CBPeripheral, didDiscoverDescriptorsFor characteristic: CBCharacteristic, error: Error?) { RxBluetoothKitLog.d(""" \(peripheral.logDescription) didDiscoverDescriptorsFor (for:\(characteristic.logDescription), descriptors: \(String(describing: characteristic.descriptors?.logDescription)), error: \(String(describing: error))) """) peripheralDidDiscoverDescriptorsForCharacteristicSubject .onNext((RxCBCharacteristic(characteristic: characteristic), error)) } @objc func peripheral(_ peripheral: CBPeripheral, didUpdateValueFor descriptor: CBDescriptor, error: Error?) { RxBluetoothKitLog.d(""" \(peripheral.logDescription) didUpdateValueFor(for:\(descriptor.logDescription), value: \(String(describing: descriptor.value)), error: \(String(describing: error))) """) peripheralDidUpdateValueForDescriptorSubject.onNext((RxCBDescriptor(descriptor: descriptor), error)) } @objc func peripheral(_ peripheral: CBPeripheral, didWriteValueFor descriptor: CBDescriptor, error: Error?) { RxBluetoothKitLog.d(""" \(peripheral.logDescription) didWriteValueFor(for:\(descriptor.logDescription), error: \(String(describing: error))) """) peripheralDidWriteValueForDescriptorSubject.onNext((RxCBDescriptor(descriptor: descriptor), error)) } @objc func peripheralIsReady(toSendWriteWithoutResponse peripheral: CBPeripheral) { //resolve build errors with XCode 11 / iOS 13 let canSendWriteWithoutResponse: Bool if #available(iOS 11.2, *) { canSendWriteWithoutResponse = peripheral.canSendWriteWithoutResponse } else { canSendWriteWithoutResponse = true } RxBluetoothKitLog.d("\(peripheral.logDescription) peripheralIsReady(toSendWriteWithoutResponse:\(canSendWriteWithoutResponse)") peripheralIsReadyToSendWriteWithoutResponseSubject.onNext(canSendWriteWithoutResponse) } } fileprivate class InternalPeripheralDelegateWrapper { fileprivate let delegate: InternalPeripheralDelegate fileprivate var refCount: Int fileprivate init(delegate: InternalPeripheralDelegate) { self.delegate = delegate refCount = 1 } } private static let internalPeripheralDelegateWrappersLock = NSLock() private static var internalPeripheralDelegateWrappers = [CBPeripheral: InternalPeripheralDelegateWrapper]() private static func getInternalPeripheralDelegateRef(cbPeripheral: CBPeripheral) -> InternalPeripheralDelegate { internalPeripheralDelegateWrappersLock.lock(); defer { internalPeripheralDelegateWrappersLock.unlock() } if let wrapper = internalPeripheralDelegateWrappers[cbPeripheral] { wrapper.refCount += 1 return wrapper.delegate } else { let delegate = InternalPeripheralDelegate() cbPeripheral.delegate = delegate internalPeripheralDelegateWrappers[cbPeripheral] = InternalPeripheralDelegateWrapper(delegate: delegate) return delegate } } fileprivate static func putInternalPeripheralDelegateRef(cbPeripheral: CBPeripheral) { internalPeripheralDelegateWrappersLock.lock(); defer { internalPeripheralDelegateWrappersLock.unlock() } if let wrapper = internalPeripheralDelegateWrappers[cbPeripheral] { wrapper.refCount -= 1 if wrapper.refCount == 0 { cbPeripheral.delegate = nil internalPeripheralDelegateWrappers[cbPeripheral] = nil } } else { fatalError("Implementation error: internal delegate for CBPeripheral is cached in memory") } } } ```
Admiral John Harvey Rainier (29 April 1847 – 21 November 1915) was a Royal Navy officer. He had the unusual distinction of commanding troops from six different nations in action. Background Descended from the Huguenot family of Régnier, John Harvey Rainier was the son of the Rev. George Rainier, vicar of Ninfield, and of Sarah Rainier, née Harvey. His elder brother, George Harvey Rainier, was also a naval officer. Another brother, the Rev. W. V. Rainier, was a naval chaplain. Rainier was descended from two families with long naval connections. On his father's side, he was related to Admiral Peter Rainier, Rear-Admiral John Spratt Rainier, and Captain Peter Rainier. Through his mother, Rainier belonged to a family whose naval associations can be traced back to the 16th century. He was the grandson of Vice-Admiral Sir Thomas Harvey, and the great-grandson of Admiral Sir Henry Harvey and of Captain John Harvey, who fell at the Glorious First of June. At least two of his uncles were also admirals. Early life and career Rainier was educated at private schools before entering HMS Britannia in December 1860 as a cadet, scoring first of thirty-four successful candidates. From 1862 to 1866, he served on the Pacific Station in HMS Tribune, Topaze, Sutlej, Leander, and Alert. Becoming a sub-lieutenant in 1866 and a lieutenant in 1869, he served from 1867 to 1870 on the West African Station in HMS Vestal, Rattlesnake, and Plover, then on the Plover in the West Indies from 1870 to 1871. From 1872 to 1874, he served in HMS Northumberland in the Channel Squadron. Having specialised in gunnery in 1876, from 1876 to 1880 he was on the staff and senior lieutenant of HMS Excellent, being promoted to commander in 1880. He served on the War Office Committee on Machine Guns in 1880–1881, and was secretary to the Committee on Torpedo Instruction in 1884. Appointed to the command of the composite screw sloop HMS Kingfisher for service on the East Indies Station in 1884, Rainier landed at Zeyla in February 1885 with seamen and Royal Marines to assist in the arrest of mutinous Somali police. The same year, whilst in command of the Kingfisher, he was a member of the Defence Committee of Mauritius, and received the thanks of the Governor. Kingfisher was engaged in anti-slavery patrols off the east coast of Africa, during which he captured several slave dhows. Promoted to captain in 1887, Rainier was next appointed to the command of the corvette HMS Tourmaline in 1889 on the North America and West Indies Station. He received the appreciation of both the Admiralty and of the Governor of the Leeward Islands for his prompt action during disturbances at Tortola in 1890, the thanks of the French governor of Martinique for taking relief to the island after the fire at Fort de France the same year, and the thanks of the governors of the Leeward and Windward Islands and of Trinidad for various services in 1890–1892. He also received the approval of the Foreign Office for the actions he took at Tucacas during a revolution in Venezuela in 1892. Cretan service After a short stint in command of the second class protected cruiser HMS Iris in 1893, Rainier took command of the battleship HMS Rodney in 1894. In February 1897, Rodney joined the International Squadron off the coast of Crete during the island's revolt against Ottoman rule. In March, following reports of massacres of Muslims by Christian insurgents, Rainier led an international landing force consisting of 200 British Royal Marines and sailors, 100 men each from Austro-Hungarian and French warships, 75 Russians, and 50 Italian sailors on an expedition inland to Kandanos (also spelt Candanos), which rescued 1,570 Muslim civilians and 340 Ottoman soldiers from Kandanos and 112 Ottoman troops from a fort at Spaniakos (or 3,000 in total according to some contemporaneous sources) and evacuated them by sea. Of the rescued, only one civilian was wounded, while the Christian insurgents lost four killed and 16 wounded. For his part in the expedition, Rainier was mentioned in despatches and personally thanked by the senior foreign admiral. Later career In 1897, Rainier took command of the turret ship HMS Thunderer, and in 1898 he was appointed to command of the battleship HMS Nile, simultaneously appointed for command of the Fleet Reserve at Devonport. The same year, he was granted a captain's good service pension. In May 1898, he was superseded in command of the Nile, but continued in command of the Devonport Fleet Reserve until March 1901, when he was promoted to rear-admiral. Promoted to vice-admiral on 26 June 1905, he was placed on the retired list at his own request on 1 August that year. Promoted to admiral on the retired list on 5 November 1908, he died in 1915 at St. Margaret's, Southborough, Kent. Family Rainier married in 1880 Georgina Mary (Ina) O’Callaghan, daughter of I. Stoney O’Callaghan, barrister-at-law, of Dublin; they had two sons and a daughter. Both of his sons joined the Royal Navy: John Walter Rainier (born 1881) reached the rank of captain and Daniel Harvey Rainier (born 1888) reached the rank of lieutenant-commander. References 1847 births 1915 deaths Royal Navy admirals 19th-century Royal Navy personnel 20th-century Royal Navy personnel
```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 { .key-filter-list { overflow: auto; max-height: 300px; .no-data-found { height: 50px; } } .filters-operation { margin-top: -18px; color: #666; font-weight: 500; } .tb-filter-preview { padding: 8px; border: 1px groove rgba(0, 0, 0, .25); border-radius: 4px; } } :host ::ng-deep { .tb-filter-preview { .tb-filter-text { max-height: 200px; } } } ```
```c++ /*============================================================================= file LICENSE_1_0.txt or copy at path_to_url ==============================================================================*/ #if !defined(BOOST_FUSION_EMPTY_IMPL_31122005_1554) #define BOOST_FUSION_EMPTY_IMPL_31122005_1554 #include <boost/fusion/support/config.hpp> #include <boost/mpl/empty.hpp> namespace boost { namespace fusion { struct mpl_sequence_tag; namespace extension { template <typename Sequence> struct empty_impl; template <> struct empty_impl<mpl_sequence_tag> { template <typename Sequence> struct apply : mpl::empty<Sequence> {}; }; } }} #endif ```
```xml import { checkPermission } from '@erxes/api-utils/src/permissions'; import { IContext } from '../../../connectionResolver'; import { IAssignmentCampaign } from '../../../models/definitions/assignmentCampaigns'; import { putCreateLog, putDeleteLog, putUpdateLog, MODULE_NAMES } from '../../../logUtils'; const assignmentsMutations = { async assignmentCampaignsAdd( _root, doc: IAssignmentCampaign, { models, subdomain, user }: IContext ) { const create = await models.AssignmentCampaigns.createAssignmentCampaign( doc ); await putCreateLog( models, subdomain, { type: MODULE_NAMES.ASSINGNMENT, newData: create, object: create }, user ); return; }, async assignmentCampaignsEdit( _root, { _id, ...doc }: IAssignmentCampaign & { _id: string }, { models, subdomain, user }: IContext ) { const assignmentCampaign = await models.AssignmentCampaigns.findOne({ _id }); const update = await models.AssignmentCampaigns.updateAssignmentCampaign( _id, doc ); await putUpdateLog( models, subdomain, { type: MODULE_NAMES.ASSINGNMENT, object: assignmentCampaign, newData: doc, updatedDocument: update }, user ); return update; }, async assignmentCampaignsRemove( _root, { _ids }: { _ids: string[] }, { models, subdomain, user }: IContext ) { const assignmentCampaign: IAssignmentCampaign[] = await models.AssignmentCampaigns.find( { _id: { $in: _ids } } ).lean(); const removed = models.AssignmentCampaigns.removeAssignmentCampaigns(_ids); await putDeleteLog( models, subdomain, { type: MODULE_NAMES.ASSINGNMENT, object: assignmentCampaign }, user ); return removed; } }; checkPermission( assignmentsMutations, 'assignmentCampaignsAdd', 'manageLoyalties' ); checkPermission( assignmentsMutations, 'assignmentCampaignsEdit', 'manageLoyalties' ); checkPermission( assignmentsMutations, 'assignmentCampaignsRemove', 'manageLoyalties' ); export default assignmentsMutations; ```
Nemophora associatella is a moth of the Adelidae family. It is found from Germany and Poland to the Pyrenees, Italy and the Balkan Peninsula. It is also present in Russia. The wingspan is about 19 mm. The larvae feed on Abies alba. They mine the leaves of their host plant. The larva mines a single leaf and drops to the ground with this leaf. It then cuts it and uses it as a case to feed on detritus. Mining larvae can be found in June. The larvae are whitish with a brown head. Taxonomy This species was erroneously placed into the genus Adela by several authors. References External links lepiforum.de Moths described in 1839 Adelidae Moths of Europe
Wale Adebanwi (born 1969) is a Nigerian-born first Black Rhodes Professor at St Antony's College, Oxford where he was, until June 2021, a Professor of Race Relations, and the Director of the African Studies Centre, School of Interdisciplinary Area Studies, and a Governing Board Fellow. He is currently a Presidential Penn Compact Professor of Africana Studies at the University of Pennsylvania. Adebanwi's research focuses on a range of topics in the areas of social change, nationalism and ethnicity, race relations, identity politics, elites and cultural politics, democratic process, newspaper press and spatial politics in Africa. Education background Wale Adebanwi graduated with a first degree in Mass Communication from the University of Lagos, and later earned his M.Sc. and Ph.D. in Political Science from the University of Ibadan. He also has an MPhil. and a Ph.D. in Social Anthropology from the University of Cambridge. Career Adebanwi worked as a freelance reporter, writer, journalist and editor for many newspapers and magazines before he joined the University of Ibadan's Department of Political Science as a lecturer and researcher. He was later appointed as an assistant professor in the African American and African Studies Department of the University of California, Davis, USA. He became a full professor at UC Davis in 2016. Adebanwi is the co-editor of Africa: Journal of the International African Institute and the Journal of Contemporary African Studies. Works His published works include: Nation as Grand Narrative: The Nigerian Press and the Politics of Meaning (University of Rochester Press, 2016) Yoruba Elites and Ethnic Politics in Nigeria: Obafemi Awolowo and Corporate Agency (Cambridge University Press, 2014) Authority Stealing: Anti-corruption War and Democratic Politics in Post-Military Nigeria (Carolina Academic Press, 2012) In addition, he is the editor and co-editor of other books, including. The Political Economy of Everyday Life in Africa: Beyond the Margins (James Currey Publishers, 2017) Writers and Social Thought in Africa (Routledge, 2016) (co-edited with Ebenezer Obadare) Governance and the Crisis of Rule in Contemporary Africa (Palgrave Macmillan, 2016) (co-edited with Ebenezer Obadare) Democracy and Prebendalism in Nigeria: Critical Interpretations (Palgrave Macmillan, 2013). (co-edited with Ebenezer Obadare) Nigeria at Fifty: The Nation in Narration (Routledge, 2012) (co-edited with Ebenezer Obadare) Encountering the Nigerian State (Palgrave Macmillan, 2010). Awards Rhodes Professorship in Race Relations awarded by Oxford University to Faculty of African and Interdisciplinary Area Studies. References Living people 1969 births University of Ibadan alumni University of Lagos alumni Alumni of the University of Cambridge Fellows of St Antony's College, Oxford Yoruba academics Academic staff of the University of Ibadan Christ's School, Ado Ekiti alumni University of Pennsylvania faculty
The Museum of Wisconsin Art (formerly the West Bend Art Museum) is a museum that collects and exhibits contemporary and historical art from the state of Wisconsin. Its collections include rotating historical and contemporary exhibitions and educational programs. The museum's One Gallery features solo shows of contemporary Wisconsin artists and arts organizations several times each year. History Founded by the Pick family of West Bend, Wisconsin in 1961 to collect the works of Milwaukee-born artist Carl von Marr (1858-1936), the museum currently holds the most comprehensive collection of his work anywhere. In 1988, it broadened its focus to become a regional museum, rolling out a collection of Wisconsin artists spanning the years from 1820 to 1950. In 1998, its Early Wisconsin Art Collection was unveiled on the state’s sesquicentennial, reflecting its new mission to collect, conserve, document, and exhibit Wisconsin art through the ages. In January 2007, along with the name change, it began including both contemporary Wisconsin art, and work prior to 1820. The museum opened a new building on the banks of the Milwaukee River in West Bend in April, 2012. References External links Museums in Washington County, Wisconsin Art museums and galleries in Wisconsin Museums of American art Art museums established in 1961 Museum of Wisconsin Art
```smalltalk // The .NET Foundation licenses this file to you under the MIT license. using Microsoft.TemplateEngine.Abstractions.Mount; using Microsoft.TemplateEngine.Core; using Microsoft.TemplateEngine.Core.Contracts; using Microsoft.TemplateEngine.Core.Operations; using Microsoft.TemplateEngine.Orchestrator.RunnableProjects.Abstractions; using Newtonsoft.Json.Linq; namespace Microsoft.TemplateEngine.Orchestrator.RunnableProjects.OperationConfig { internal class BalancedNestingConfig : IOperationConfig { public string Key => BalancedNesting.OperationName; public Guid Id => new Guid("3147965A-08E5-4523-B869-02C8E9A8AAA1"); public IEnumerable<IOperationProvider> ConfigureFromJson(string configuration, IDirectory templateRoot) { JObject rawConfiguration = JObject.Parse(configuration); string? startToken = rawConfiguration.ToString("startToken"); string? realEndToken = rawConfiguration.ToString("realEndToken"); string? pseudoEndToken = rawConfiguration.ToString("pseudoEndToken"); string? id = rawConfiguration.ToString("id"); string? resetFlag = rawConfiguration.ToString("resetFlag"); bool onByDefault = rawConfiguration.ToBool("onByDefault"); yield return new BalancedNesting(startToken.TokenConfig(), realEndToken.TokenConfig(), pseudoEndToken.TokenConfig(), id, resetFlag, onByDefault); } internal static JObject CreateConfiguration(string startToken, string realEndToken, string pseudoEndToken, string id, string resetFlag) { JObject config = new JObject { ["startToken"] = startToken, ["realEndToken"] = realEndToken, ["pseudoEndToken"] = pseudoEndToken, ["id"] = id, ["resetFlag"] = resetFlag }; return config; } } } ```
Ragnar Berg (September 1, 1873 – March 31, 1956) was a Swedish-born biochemist and nutritionist who worked most of his adult life in Germany. He is best known for his theories on the importance of acid-base balance and inorganic minerals like calcium in the diet; later in life he endorsed vegetarianism and ways to prolong the human life span. He promoted an alkaline rich diet and also invented the alkaline dietary supplement Basica, which Volkmar Klopfer manufactured and marketed from 1925. Biography Ragnar Berg was the son of the respected Swedish historian and archaeologist Wilhelm Berg (1839-1915) and his first wife, Ulrika Charlotta Emerentia "Emy" Gumaelius (1846-1902). He married Ella Buscher in 1902, and they had two sons, Gunnar Wilhelm Emil (1907-1974) and Alf Ragnar Wilhelm (1912-1994). Berg was recruited by Karl Lingner to the Dresden Center for Dental Hygiene (Zentralstelle für Zahnhygiene) in 1902, where he met dentist Carl Röse (1864–1947), his long-time experimental partner. From 1909 to 1921 Berg headed the physiology lab at the homeopathic sanatorium founded by Heinrich Lahmann at Weisser Hirsch near Dresden, researching vitamins, trace elements and the metabolism of minerals. A fire damaged the laboratory at the end of December 1914. In 1921, he was dismissed from Lahmann's Sanatorium, since business had dried up during World War One, and its new directors wanted to focus on the more lucrative fields of psychoanalysis and gynecology. Historians have noted the dismissal occurred because the "directors did not value his scientific approach to nutrition." Berg continued conducting experiments on himself and analyzing foodstuffs from a home laboratory. From 1927 to 1932, he headed his own nutrition department at the Dresden-Friedrichstadt Hospital. In 1934, he became head of the nutrition department at the Rudolf Hess Hospital in Dresden. However, his funding ran out two years later. Only during the 1940s was he able to get federal funds for his "war-related" work. Berg belonged to the Nazi Party's Main Office for People's Health. In March 1945, Berg and his wife, Ella, fled bombed-out Dresden for Berlin and then to Stockholm, Sweden. (Neither their house nor his lab in the hospital had been damaged, however.) They lived in his native Sweden until her death from a heart attack at the end of 1954. Berg was very lonely, his health deteriorated, and he spent many months in the hospital before moving to his son's home north of Hamburg, where he died a few months later of old age and metastatic prostate cancer. He was nearly blind by this time. Vitamins: A Critical Survey Berg's most notable work was his book Vitamins: A Critical Survey of the Theory of Accessory Food Factors translated from the German by Cedar and Eden Paul, in 1923. The book has been cited as one of the earliest on vitamin research in Europe. It has a huge bibliography of 1500 entries. A 1923 review in The British Medical Journal praised Berg for documenting scientific knowledge of vitamins and summarizing data from a huge mass of original literature but noted that some of his ideas about inorganic metabolism "have not met with general acceptance". In contrast, nutritionist Katharine H. Coward negatively reviewed the book, stating that "Berg is blinded by his own ideas and work on the importance of the inorganic salt content of a diet... Altogether it is a confused, and, in many cases, an inaccurate, account of the subject." Although the term "vitamins" was included in the title of the book, Berg did not like this term. Instead, he used the term "complettins" which was criticized for confusing readers. Berg also coined the term "acomplettinoses" for vitamin deficiencies A, B and C. Theories Berg and Carl Röse developed a theory of acid-base balance in the body that is affected by diet. They relied on the work of Ernst Leopold Salkowski, who published results in the 1870s that suggested inorganic acids could only be excreted by the kidneys if neutralized by inorganic bases. If the acids remained in the body, they would accumulate in areas of low blood flow (like joints), thereby obstructing normal physiological function. The model disease was gout, but Berg traced many other "diseases of civilization" to acid-base imbalance, including obesity, arthritis, and diabetes. Because the body produces more acids than bases, concluded Berg, the best source of bases was the diet. If the diet was too acidic, then the body would break down proteins for the ammonia. This prevented the body from getting the full caloric and nitrogen value of the protein and produced abnormal intermediate metabolites. Moreover, a more basic diet reduced the need for protein. The following chart classifies foods according to Berg's theory and analyses. Berg promoted an alkaline rich diet. His recommended diet consisted of 80% alkaline foods and 20% acidic foods. After World War I he turned his attention to popularizing his theory directly. His theory was not accepted by the medical community but was popular in the field of naturopathy. In the early 1930s Berg met Gayelord Hauser. They authored the book Dictionary of Foods, in 1932. Vegetarianism In the 1930s and 1940s, Berg teamed up with Are Waerland to promote vegetarianism and ways to prolong life. In 1933, at the meeting of the International Vegetarian Union (IVU) in Switzerland, Nazism was criticized. Berg was invited to participate at the IVU 1935 meeting in Denmark but he refused due to its anti-Nazi stance. Selected publications (with Martin Vogel) Die Grundlagen einer richtigen Ernährung, Dresden, 1907 Der Einfluss des Abbrühens auf den Nährwert unserer Gemüsekost, Dresden, 1911 Die Nahrungs- und Genussmittel, ihre zusammensetzung und ihr Einfluss auf die Gesundheit, mit besonderer Berücksichtigung der Aschenbestandteile, Dresden: Holze & Pahl, 1913 Die Vitamine: kritische Übersicht der Lehre von den Ergänzungsstoffen, Leipzig: Hirzel, 1922. Translated by Cedar and Eden Paul as Vitamins: A Critical Survey of the Theory of Accessory Food Factors. New York: A.A. Knopf, 1923. Eiweissbedarf und Mineralstoffwechsel bei einfachster Ernährung, Leipzig: S. Hirzel, 1931 (with Gayelord Hauser) Dictionary of Foods, New York: Tempo Books, 1932 References 1873 births 1956 deaths 20th-century German non-fiction writers Alkaline diet advocates German biochemists German food writers German nutritionists German vegetarianism activists Pseudoscientific diet advocates Swedish biochemists Swedish Nazis Vitamin researchers
```c++ /* ============================================================================== CommandDefinitionManager.cpp Created: 19 Dec 2016 3:48:25pm Author: Ben ============================================================================== */ CommandDefinitionManager::CommandDefinitionManager() { } CommandDefinitionManager::~CommandDefinitionManager() { } void CommandDefinitionManager::add(CommandDefinition * def, int index) { if(index == -1) definitions.add(def); else definitions.insert(index, def); } void CommandDefinitionManager::remove(CommandDefinition * def) { definitions.removeObject(def); } void CommandDefinitionManager::clear() { definitions.clear(); } PopupMenu CommandDefinitionManager::getCommandMenu(int baseID, CommandContext context) { PopupMenu p; addCommandsToMenu(&p, baseID, context); return p; } void CommandDefinitionManager::addCommandsToMenu(PopupMenu * commandMenu, int baseID, CommandContext context) { OwnedArray<PopupMenu> subMenus; Array<String> subMenuNames; for (auto &d : definitions) { if (context != CommandContext::BOTH && d->context != CommandContext::BOTH && context != d->context) continue; int itemID = definitions.indexOf(d) + 1 + baseID; //start at baseID + 1 for menu if (d->menuPath.isEmpty()) { commandMenu->addItem(itemID, d->commandType); continue; } int subMenuIndex = -1; for (int i = 0; i < subMenus.size(); ++i) { if (subMenuNames[i] == d->menuPath) { subMenuIndex = i; break; } } if (subMenuIndex == -1) { subMenuNames.add(d->menuPath); subMenus.add(new PopupMenu()); subMenuIndex = subMenus.size() - 1; } subMenus[subMenuIndex]->addItem(itemID, d->commandType); } for (int i = 0; i < subMenus.size(); ++i) commandMenu->addSubMenu(subMenuNames[i], *subMenus[i]); } CommandDefinition * CommandDefinitionManager::getCommandDefinitionFor(const String & menuPath, const String & moduleType) { for (auto &d : definitions) if (d->menuPath == menuPath && d->commandType == moduleType) return d; return nullptr; } ```
```python """ Resources: - path_to_url - path_to_url """ from typing import Any import numpy as np def _is_matrix_spd(matrix: np.ndarray) -> bool: """ Returns True if input matrix is symmetric positive definite. Returns False otherwise. For a matrix to be SPD, all eigenvalues must be positive. >>> import numpy as np >>> matrix = np.array([ ... [4.12401784, -5.01453636, -0.63865857], ... [-5.01453636, 12.33347422, -3.40493586], ... [-0.63865857, -3.40493586, 5.78591885]]) >>> _is_matrix_spd(matrix) True >>> matrix = np.array([ ... [0.34634879, 1.96165514, 2.18277744], ... [0.74074469, -1.19648894, -1.34223498], ... [-0.7687067 , 0.06018373, -1.16315631]]) >>> _is_matrix_spd(matrix) False """ # Ensure matrix is square. assert np.shape(matrix)[0] == np.shape(matrix)[1] # If matrix not symmetric, exit right away. if np.allclose(matrix, matrix.T) is False: return False # Get eigenvalues and eignevectors for a symmetric matrix. eigen_values, _ = np.linalg.eigh(matrix) # Check sign of all eigenvalues. # np.all returns a value of type np.bool_ return bool(np.all(eigen_values > 0)) def _create_spd_matrix(dimension: int) -> Any: """ Returns a symmetric positive definite matrix given a dimension. Input: dimension gives the square matrix dimension. Output: spd_matrix is an diminesion x dimensions symmetric positive definite (SPD) matrix. >>> import numpy as np >>> dimension = 3 >>> spd_matrix = _create_spd_matrix(dimension) >>> _is_matrix_spd(spd_matrix) True """ rng = np.random.default_rng() random_matrix = rng.normal(size=(dimension, dimension)) spd_matrix = np.dot(random_matrix, random_matrix.T) assert _is_matrix_spd(spd_matrix) return spd_matrix def conjugate_gradient( spd_matrix: np.ndarray, load_vector: np.ndarray, max_iterations: int = 1000, tol: float = 1e-8, ) -> Any: """ Returns solution to the linear system np.dot(spd_matrix, x) = b. Input: spd_matrix is an NxN Symmetric Positive Definite (SPD) matrix. load_vector is an Nx1 vector. Output: x is an Nx1 vector that is the solution vector. >>> import numpy as np >>> spd_matrix = np.array([ ... [8.73256573, -5.02034289, -2.68709226], ... [-5.02034289, 3.78188322, 0.91980451], ... [-2.68709226, 0.91980451, 1.94746467]]) >>> b = np.array([ ... [-5.80872761], ... [ 3.23807431], ... [ 1.95381422]]) >>> conjugate_gradient(spd_matrix, b) array([[-0.63114139], [-0.01561498], [ 0.13979294]]) """ # Ensure proper dimensionality. assert np.shape(spd_matrix)[0] == np.shape(spd_matrix)[1] assert np.shape(load_vector)[0] == np.shape(spd_matrix)[0] assert _is_matrix_spd(spd_matrix) # Initialize solution guess, residual, search direction. x0 = np.zeros((np.shape(load_vector)[0], 1)) r0 = np.copy(load_vector) p0 = np.copy(r0) # Set initial errors in solution guess and residual. error_residual = 1e9 error_x_solution = 1e9 error = 1e9 # Set iteration counter to threshold number of iterations. iterations = 0 while error > tol: # Save this value so we only calculate the matrix-vector product once. w = np.dot(spd_matrix, p0) # The main algorithm. # Update search direction magnitude. alpha = np.dot(r0.T, r0) / np.dot(p0.T, w) # Update solution guess. x = x0 + alpha * p0 # Calculate new residual. r = r0 - alpha * w # Calculate new Krylov subspace scale. beta = np.dot(r.T, r) / np.dot(r0.T, r0) # Calculate new A conjuage search direction. p = r + beta * p0 # Calculate errors. error_residual = np.linalg.norm(r - r0) error_x_solution = np.linalg.norm(x - x0) error = np.maximum(error_residual, error_x_solution) # Update variables. x0 = np.copy(x) r0 = np.copy(r) p0 = np.copy(p) # Update number of iterations. iterations += 1 if iterations > max_iterations: break return x def test_conjugate_gradient() -> None: """ >>> test_conjugate_gradient() # self running tests """ # Create linear system with SPD matrix and known solution x_true. dimension = 3 spd_matrix = _create_spd_matrix(dimension) rng = np.random.default_rng() x_true = rng.normal(size=(dimension, 1)) b = np.dot(spd_matrix, x_true) # Numpy solution. x_numpy = np.linalg.solve(spd_matrix, b) # Our implementation. x_conjugate_gradient = conjugate_gradient(spd_matrix, b) # Ensure both solutions are close to x_true (and therefore one another). assert np.linalg.norm(x_numpy - x_true) <= 1e-6 assert np.linalg.norm(x_conjugate_gradient - x_true) <= 1e-6 if __name__ == "__main__": import doctest doctest.testmod() test_conjugate_gradient() ```
The James B. Palais Book Prize has been awarded annually since 2010 by the Association for Asian Studies (AAS). Pioneer Korean studies scholar James Palais is commemorated in the name of this prize. The Palais Prize acknowledges an outstanding English language book published on Korea; and the prize honors the author of the book. AAS prize AAS is a scholarly, non-political, non-profit professional association which includes all persons interested in Asia. The association was founded in 1941 as publisher of the Far Eastern Quarterly (now the Journal of Asian Studies). The organization has gone through a series of reorganizations since those early days; but its continuing mission is to foster the exchange of information among scholars and to increase understanding about East Asia, South Asia, and Southeast Asia. The Northeast Asia Council (NEAC) of the AAS oversees the James Palais Book Prize. Select list of honorees 2010 — Sem Vermeersch, The Power of the Buddhas: the Politics of Buddhism during the Koryo Dynasty, 918–1392 (Harvard University Asia Center, 2008) 2011 — Hwasook Nam, Building Ships, Building a Nation: Korea's Democratic Unionism under Park Chung Hee (University of Washington Press, 2009) 2012 — Eleana J. Kim, Adopted Territory: Transnational Korean Adoptees and the Politics of Belonging (Duke University Press, 2010) 2013 — Suk-Young Kim, Illusive Utopia: Theater, Film and Everyday Performance in North Korea (University of Michigan Press, 2011) 2014 — Theodore Hughes, Literature and Film in Cold War South Korea: Freedom’s Frontier (Columbia University Press, 2012) 2015 — Suzy Kim, Everyday Life in the North Korean Revolution: 1945-1950 (Cornell University Press, 2013) 2016 — Steven Chung, Split Screen Korea: Shin Sang-ok and Postwar Cinema (University of Minnesota Press, 2014) 2016 Honorable Mention — Janet Poole, When the Future Disappears: The Modernist Imagination in Late Colonial Korea (Columbia University Press, 2014) 2017 — Jisoo Kim, The Emotions of Justice: Gender, Status, and Legal Performance in Chosŏn Korea (University of Washington Press, 2015) 2017 Honorable Mention — Hyun Ok Park, The Capitalist Unconscious: From Korean Unification to Transnational Korea (Columbia University Press, 2015) 2018 — Youngju Ryu, Writers of the Winter Republic: Literature and Resistance in Park Chung Hee’s Korea (University of Hawaii Press , 2015) 2018 Honorable Mention — Jaeeun Kim, Contested Embrace: Transborder Membership Politics in Twentieth-Century Korea (Stanford University Press, 2016) 2019 — Eunjung Kim - Curative Violence: Rehabilitating Disability, Gender, and Sexuality in Modern Korea (Duke University Press, 2017) 2020 — Yoon Sun Yang, From Domestic Women to Sensitive Young Men: Translating the Individual in Early Colonial Korea (Harvard University Asia Center, 2017) 2020 Honorable Mention - Hwansoo Ilmee Kim, The Korean Buddhist Empire: A Transnational History, 1910-1945 (Harvard University Asia Center, 2018) 2021 — Monica Kim, The Interrogation Rooms of the Korea War: The Untold History (Princeton University Press, 2019) 2021 — Heonik Kwon, After the Korean War: An Intimate History (Cambridge University Press, 2020) 2022 Honorable Mention — Hwisang Cho, The Power of the Brush: Epistolary Practices in Chosŏn Korea (University of Washington Press, 2020) Notes Awards established in 2010 Asian awards Asian culture
```javascript 'use strict'; const fs = require('fs'); const path = require('path'); const tls = require('tls'); const common = require('../common.js'); const bench = common.createBenchmark(main, { concurrency: [1, 10], dur: [5] }); var clientConn = 0; var serverConn = 0; var dur; var concurrency; var running = true; function main(conf) { dur = conf.dur; concurrency = conf.concurrency; const cert_dir = path.resolve(__dirname, '../../test/fixtures'); const options = { key: fs.readFileSync(`${cert_dir}/test_key.pem`), cert: fs.readFileSync(`${cert_dir}/test_cert.pem`), ca: [ fs.readFileSync(`${cert_dir}/test_ca.pem`) ], ciphers: 'AES256-GCM-SHA384' }; const server = tls.createServer(options, onConnection); server.listen(common.PORT, onListening); } function onListening() { setTimeout(done, dur * 1000); bench.start(); for (var i = 0; i < concurrency; i++) makeConnection(); } function onConnection(conn) { serverConn++; } function makeConnection() { const options = { port: common.PORT, rejectUnauthorized: false }; var conn = tls.connect(options, function() { clientConn++; conn.on('error', function(er) { console.error('client error', er); throw er; }); conn.end(); if (running) makeConnection(); }); } function done() { running = false; // it's only an established connection if they both saw it. // because we destroy the server somewhat abruptly, these // don't always match. Generally, serverConn will be // the smaller number, but take the min just to be sure. bench.end(Math.min(serverConn, clientConn)); process.exit(0); } ```
John Hilton Edwards (26 March 1928 – 11 October 2007) was a British medical geneticist. Edwards reported the first description of a syndrome of multiple congenital malformations associated the presence of an extra chromosome. The extra chromosome belonged to the E group of chromosomes which consisted of chromosomes 16, 17 and 18. The condition is now known as Edwards syndrome or trisomy 18 syndrome. In 1979, Edwards was elected to fellowship of the Royal Society. He was a Fellow of Keble College, Oxford, and Professor of Genetics at Oxford from 1979 to 1995. He was the son of the surgeon Harold C. Edwards. His brother is the geneticist and statistician A.W.F. Edwards. Early in his career, he worked under Lancelot Hogben, and was sometimes distinguished from the brother as "Hogben's Edwards". References External links Further information John Hilton Edwards (a short biography). Obituaries Professor John Edwards obituary, The Independent BMJ obituary Nature Genetics obituary 1928 births 2007 deaths British geneticists Medical geneticists Fellows of the Royal Society People educated at Uppingham School Academics of the University of Birmingham Professors of Genetics (University of Oxford) Fellows of Keble College, Oxford
```java /** * This file is part of Skript. * * Skript is free software: you can redistribute it and/or modify * (at your option) any later version. * * Skript is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * along with Skript. If not, see <path_to_url * */ package ch.njol.skript.conditions; import ch.njol.skript.Skript; import ch.njol.skript.conditions.base.PropertyCondition; import ch.njol.skript.doc.Description; import ch.njol.skript.doc.Examples; import ch.njol.skript.doc.Name; import ch.njol.skript.doc.RequiredPlugins; import ch.njol.skript.doc.Since; import ch.njol.skript.lang.Expression; import ch.njol.skript.lang.SkriptParser.ParseResult; import ch.njol.util.Kleenean; import org.bukkit.entity.HumanEntity; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Mob; import org.bukkit.inventory.MainHand; @Name("Left Handed") @Description({ "Checks if living entities or players are left or right-handed. Armor stands are neither right nor left-handed.", "Paper 1.17.1+ is required for non-player entities." }) @Examples({ "on damage of player:", "\tif victim is left handed:", "\t\tcancel event" }) @Since("2.8.0") @RequiredPlugins("Paper 1.17.1+ (entities)") public class CondIsLeftHanded extends PropertyCondition<LivingEntity> { private static final boolean CAN_USE_ENTITIES = Skript.methodExists(Mob.class, "isLeftHanded"); static { if (CAN_USE_ENTITIES) { register(CondIsLeftHanded.class, PropertyType.BE, "(:left|right)( |-)handed", "livingentities"); } else { register(CondIsLeftHanded.class, PropertyType.BE, "(:left|right)( |-)handed", "players"); } } private MainHand hand; @Override public boolean init(Expression[] exprs, int matchedPattern, Kleenean isDelayed, ParseResult parseResult) { hand = parseResult.hasTag("left") ? MainHand.LEFT : MainHand.RIGHT; return super.init(exprs, matchedPattern, isDelayed, parseResult); } @Override public boolean check(LivingEntity livingEntity) { // check if entity is a mob and if the method exists if (CAN_USE_ENTITIES && livingEntity instanceof Mob) return ((Mob) livingEntity).isLeftHanded() == (hand == MainHand.LEFT); // check if entity is a player if (livingEntity instanceof HumanEntity) return ((HumanEntity) livingEntity).getMainHand() == hand; // invalid entity return false; } @Override protected String getPropertyName() { return (hand == MainHand.LEFT ? "left" : "right") + " handed"; } } ```
Shubino () is a rural locality (a village) in Denisovskoye Rural Settlement, Gorokhovetsky District, Vladimir Oblast, Russia. The population was 8 as of 2010. Geography Shubino is located 19 km southwest of Gorokhovets (the district's administrative centre) by road. Yakutino is the nearest rural locality. References Rural localities in Gorokhovetsky District
```ruby require_relative '../../spec_helper' require "ostruct" describe "OpenStruct#[]=" do before :each do @os = OpenStruct.new end it "sets the associated value" do @os[:foo] = 42 @os.foo.should == 42 end end ```
The Florida A&M Rattlers football team represents Florida A&M University in the sport of American football. The Rattlers compete in the Football Championship Subdivision (FCS) of Division I of the National Collegiate Athletic Association (NCAA). Starting with the fall 2021 season, the Rattlers will compete in the East Division of the Southwestern Athletic Conference (SWAC), after a long tenure in the Mid-Eastern Athletic Conference (MEAC). They play their home games at Bragg Memorial Stadium in Tallahassee. The Rattlers have won 15 black college football national championship, 29 Southern Intercollegiate Athletic Conference (SIAC) titles, eight MEAC titles, and one I-AA national title in the history of their football program. During the 2004 season, the Rattlers briefly attempted to move up to Division I-A (now known as the FBS) and become the only HBCU at college football's highest level, but the team was forced to abort its bid. History Classifications 1952–1972: NCAA College Division 1973–1977: NCAA Division II 1978–2003: NCAA Division I–AA 2004: NCAA Division I–A 2005–present: NCAA Division I–AA/FCS Conference memberships 1907–1925: Independent 1926–1978: Southern Intercollegiate Athletic Conference (SIAC) 1979–1983: Mid-Eastern Athletic Conference (MEAC) 1984–1985: Division I–AA Independent 1986–2003: Mid-Eastern Athletic Conference 2004: Division I–A Independent 2005–2020: Mid-Eastern Athletic Conference 2021–present: Southwestern Athletic Conference In 1978, FAMU was a member of SIAC, a Division II conference. FAMU had successfully petitioned the NCAA for Division I classification (Division I-AA in football), which took effect on September 1, 1978. The Rattlers have been part of a couple controversies in recent years. In 2022, FAMU almost had to forfeit a week 1 game against North Carolina because 20 players were academically ineligible to play. In July 2023, Florida A&M halted all football related activities after a rap video containing explicit lyrics was filmed in their locker room. Annual Classic Florida Classic Orange Blossom Classic Championships National, Black College The Rattlers claim 16 historically black colleges and universities (HBCUs) championships:. 15 come from official HBCU championship selectors, while the 2021 claim is the result of a NCAA power ranking of FCS HBCU teams. 1938 1942 1950 1952 1953 1954 1957 1959 1961 1962 1977 1978 1998 2001 2019 National, Division I–AA/FCS National, Division II/College Division One Florida A&M team has been awarded a national championship from NCAA-designated designated major selector, as they were declared Associated Press (AP) small college national champion for the 1962 season. While the school holds the distinction of being the first HBCU to win NCAA football title, the championship is not claimed by the university. Conference championships Florida A&M has won 37 conference championships, 30 outright and 7 shared. † Co-champions Division I-AA/FCS Playoffs results The Rattlers have appeared in the I-AA/FCS playoffs eight times with a record of 5–7. They were I-AA National Champions in 1978, the first year of Division I-AA. College Football Hall of Fame members Jake Gaither Willie Galimore Billy Joe Tyrone McGriff Alumni in the NFL Over 60 Florida A&M alumni have played in the NFL, including: Ray Alexander Gene Atkins Greg Coleman Al Denson Hewritt Dixon Glen Edwards Chad Fann Roger Finnie Derrick Gainer Willie Galimore Hubert Ginn Charles Goodrum Quinn Gray Bob Hayes Earl Holmes Henry Lawrence Herm Lee Frank Marion Willie McClung Terry Mickens Riley Morris Jamie Nails Nate Newton Carleton Oats Ken Riley Vernice Smith Wally Williams Robert Wilson Frances (Frank) Mays References External links American football teams established in 1907 1907 establishments in Florida
```java /* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * * Subject to the condition set forth below, permission is hereby granted to any * person obtaining a copy of this software, associated documentation and/or * data (collectively the "Software"), free of charge and under any and all * copyright rights in the Software, and any and all patent rights owned or * freely licensable by each licensor hereunder covering either (i) the * unmodified Software as contributed to or provided by such licensor, or (ii) * the Larger Works (as defined below), to deal in both * * (a) the Software, and * * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if * one is included with the Software each a "Larger Work" to which the Software * is contributed by such licensors), * * without restriction, including without limitation the rights to copy, create * derivative works of, display, perform, and distribute the Software and make, * use, sell, offer for sale, import, export, have made, and have sold the * Software and the Larger Work(s), and to sublicense the foregoing rights on * either these or other terms. * * This license is subject to the following condition: * * The above copyright notice and either this complete permission notice or at a * minimum a reference to the UPL must be included in all copies or substantial * portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package org.graalvm.nativeimage.c.function; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import java.util.function.BooleanSupplier; import org.graalvm.nativeimage.CurrentIsolate; import org.graalvm.nativeimage.Isolate; import org.graalvm.nativeimage.IsolateThread; import org.graalvm.nativeimage.LogHandler; import org.graalvm.nativeimage.c.constant.CEnum; import org.graalvm.nativeimage.c.constant.CEnumLookup; import org.graalvm.nativeimage.c.constant.CEnumValue; import org.graalvm.word.WordBase; import org.graalvm.word.WordFactory; /** * Annotates a method that is a VM entry point. Such a method must be declared <i>static</i>, and is * made accessible so that it can be called as a C function using the native ABI. * <p> * An execution context must be passed as an {@link IsolateThread} that is specific to the current * thread. This pointer can be obtained via {@link CurrentIsolate#getCurrentThread()}. When there is * more than one parameter of {@link IsolateThread}, exactly one of the parameters must be annotated * with {@link IsolateThreadContext}. * <p> * Exceptions cannot be thrown to the caller and must be explicitly caught in the entry point * method. Any uncaught exception causes the termination of the process after it is printed. * <p> * No object types are permitted for parameters or return types; only primitive Java values, * {@link WordBase word} values, and enum values are allowed. Enum values are automatically * converted from integer constants to Java enum object constants. The enum class must have a * {@link CEnum} annotation. When enum values are passed as parameters, the enum class must have a * method with a {@link CEnumLookup} annotation. For enum return types, the enum class must have a * method that is annotated with {@link CEnumValue}. * * @since 19.0 */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) public @interface CEntryPoint { /** * The symbol name to use for this entry point. * * @since 19.0 */ String name() default ""; /** * Method documentation to be included in the header file, as an array of lines. * * @since 19.0 */ String[] documentation() default ""; /** * Provides an exception handler for all exceptions that are not handled explicitly by the entry * point method. Java exceptions cannot be passed back to C code. If this property is not set, * any uncaught exception is treated as a {@link LogHandler#fatalError() fatal error}. * <p> * The provided class must have exactly one declared method (the exception handler method). The * method must be static, have one parameter of type {@link Throwable} or {@link Object}, and * must have a return type that is assignable to the return type of the annotated entry point * method. That exception handler method is invoked when an exception reaches the entry point, * and the exception is passed as the argument. The return value of the exception handler method * is then the return value of the entry point, i.e., passed back to the C code. * * @since 19.0 */ Class<? extends ExceptionHandler> exceptionHandler() default FatalExceptionHandler.class; /** * Special placeholder value for {@link #exceptionHandler()} to print the caught exception and * treat it as a {@link LogHandler#fatalError() fatal error}. * * @since 19.0 */ final class FatalExceptionHandler implements ExceptionHandler { private FatalExceptionHandler() { } } /** * Specifies that the annotated entry point method is an alias for a built-in function as * provided by the C API. Such aliases may have extra arguments which are ignored and can be * used to adhere to specific external conventions. The annotated method must be declared * {@code native} and as such, cannot have its own code body. Refer to the C API for * descriptions of the built-ins, and to the {@linkplain Builtin individual built-ins} for their * requirements to the annotated method's signature. * * @since 19.0 */ Builtin builtin() default Builtin.NO_BUILTIN; /** * If the supplier returns {@code true}, this entry point is added automatically when building a * shared library. This means the method is a root method for compilation, and everything * reachable from it is compiled too. * * The provided class must have a nullary constructor, which is used to instantiate the class. * Then the supplier function is called on the newly instantiated instance. * * @since 22.0 */ Class<? extends BooleanSupplier> include() default AlwaysIncluded.class; /** * A {@link BooleanSupplier} that always returns {@code true}. * * @since 22.0 */ final class AlwaysIncluded implements BooleanSupplier { private AlwaysIncluded() { } /** * Returns {@code true}. * * @since 22.0 */ @Override public boolean getAsBoolean() { return true; } } /** * A {@link BooleanSupplier} that always returns {@code false}. * * @since 22.0 */ final class NotIncludedAutomatically implements BooleanSupplier { private NotIncludedAutomatically() { } /** * Returns {@code false}. * * @since 22.0 */ @Override public boolean getAsBoolean() { return false; } } /** * @since 22.0 */ enum Publish { /** * Do not publish the entry point method. */ NotPublished, /** * Create a symbol for the entry point method in the native image. */ SymbolOnly, /** * Create a symbol for the entry point method in the native image, and if building a shared * library image, also include a C declaration in the generated C header file. */ SymbolAndHeader, } /** * Whether the entry point is part of the symbols and header files produced by Native Image. * * @since 22.0 */ Publish publishAs() default Publish.SymbolAndHeader; /** * The built-in methods which can be {@linkplain #builtin() aliased}. * * @since 19.0 */ enum Builtin { /** * The annotated method is not an alias for a built-in method. * * @since 19.0 */ NO_BUILTIN, /** * The annotated method creates an isolate. An alias for this built-in requires no * arguments, and must have a return type of {@link IsolateThread}. In case of an error, * {@link WordFactory#nullPointer() NULL} is returned. * * @since 19.0 */ CREATE_ISOLATE, /** * The annotated method attaches the current thread to an isolate. It requires a parameter * of type {@link Isolate} with the isolate to attach to, and a return type of * {@link IsolateThread}. In case of an error, {@link WordFactory#nullPointer() NULL} is * returned. * * @since 19.0 */ ATTACH_THREAD, /** * The annotated method returns the {@link IsolateThread} of the current thread in a * specified {@link Isolate}. It requires a parameter of type {@link Isolate} for the * isolate in question, and a return type of {@link IsolateThread}. In case of an error or * if the current thread is not attached to the specified isolate, * {@link WordFactory#nullPointer() NULL} is returned. * * @since 19.0 */ GET_CURRENT_THREAD, /** * The annotated method returns the {@link Isolate} for an {@link IsolateThread}. It * requires a parameter of type {@link IsolateThread}, and a return type of {@link Isolate}. * In case of an error, {@link WordFactory#nullPointer() NULL} is returned. * * @since 19.0 */ GET_ISOLATE, /** * The annotated method detaches the current thread, given as an {@link IsolateThread}, from * an isolate. It requires a parameter of type {@link IsolateThread}, and a return type of * {@code int} or {@code void}. With an {@code int} return type, zero is returned when * successful, or non-zero in case of an error. * * @since 19.0 */ DETACH_THREAD, /** * The annotated method tears down the specified isolate. It requires a parameter of type * {@link IsolateThread}, and a return type of {@code int} or {@code void}. With an * {@code int} return type, zero is returned when successful, or non-zero in case of an * error. * * @since 19.0 */ TEAR_DOWN_ISOLATE, } /** * Designates an {@link IsolateThread} parameter to use as the execution context. At most one * parameter can be annotated with this annotation or {@link IsolateContext}. * * @since 19.0 */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.PARAMETER) @interface IsolateThreadContext { } /** * Designates an {@link Isolate} parameter to use as the execution context. At most one * parameter can be annotated with this annotation or {@link IsolateThreadContext}. * * @since 19.0 */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.PARAMETER) @interface IsolateContext { } /** * Marker interface for all {@link CEntryPoint#exceptionHandler() exception handler} classes. * * @since 22.0 */ interface ExceptionHandler { } } ```
193 (one hundred [and] ninety-three) is the natural number following 192 and preceding 194. In mathematics 193 is the number of compositions of 14 into distinct parts. In decimal, it is the seventeenth full repetend prime, or long prime. It is the only odd prime known for which 2 is not a primitive root of . It is the thirteenth Pierpont prime, which implies that a regular 193-gon can be constructed using a compass, straightedge, and angle trisector. It is part of the fourteenth pair of twin primes , the seventh trio of prime triplets , and the fourth set of prime quadruplets . Aside from itself, the friendly giant (the largest sporadic group) holds a total of 193 conjugacy classes. It also holds at least 44 maximal subgroups aside from the double cover of (the forty-fourth prime number is 193). 193 is also the eighth numerator of convergents to Euler's number; correct to three decimal places: The denominator is 71, which is the largest supersingular prime that uniquely divides the order of the friendly giant. In other fields 193 is the telephonic number of the 27 Brazilian Military Firefighters Corpses. 193 is the number of internationally recognized nations by the United Nations Organization (UNO). See also 193 (disambiguation) References Integers
```c++ // LzhRegister.cpp #include "StdAfx.h" #include "../../Common/RegisterArc.h" #include "LzhHandler.h" static IInArchive *CreateArc() { return new NArchive::NLzh::CHandler; } static CArcInfo g_ArcInfo = { L"Lzh", L"lzh lha", 0, 6, { '-', 'l' }, 2, false, CreateArc, 0 }; REGISTER_ARC(Lzh) ```
```shell Shebang `#!` explained Find any Unix / Linux command Terminal based browser Useful aliasing in bash Breaking out of a terminal when `ssh` locks ```
```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.pulsar.broker.loadbalance.extensions.channel; import static org.apache.pulsar.broker.loadbalance.extensions.channel.ServiceUnitState.Assigning; import static org.apache.pulsar.broker.loadbalance.extensions.channel.ServiceUnitState.Deleted; import static org.apache.pulsar.broker.loadbalance.extensions.channel.ServiceUnitState.Free; import static org.apache.pulsar.broker.loadbalance.extensions.channel.ServiceUnitState.Init; import static org.apache.pulsar.broker.loadbalance.extensions.channel.ServiceUnitState.Owned; import static org.apache.pulsar.broker.loadbalance.extensions.channel.ServiceUnitState.Releasing; import static org.apache.pulsar.broker.loadbalance.extensions.channel.ServiceUnitState.Splitting; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; import org.testng.annotations.Test; @Test(groups = "broker") public class ServiceUnitStateCompactionStrategyTest { ServiceUnitStateCompactionStrategy strategy = new ServiceUnitStateCompactionStrategy(); String dst = "dst"; String src = "src"; ServiceUnitStateData data(ServiceUnitState state) { return new ServiceUnitStateData(state, "broker", 1); } ServiceUnitStateData data(ServiceUnitState state, String dst) { return new ServiceUnitStateData(state, dst, null, 1); } ServiceUnitStateData data(ServiceUnitState state, String src, String dst) { return new ServiceUnitStateData(state, dst, src, 1); } ServiceUnitStateData data2(ServiceUnitState state) { return new ServiceUnitStateData(state, "broker", 2); } ServiceUnitStateData data2(ServiceUnitState state, String dst) { return new ServiceUnitStateData(state, dst, null, 2); } ServiceUnitStateData data2(ServiceUnitState state, String src, String dst) { return new ServiceUnitStateData(state, dst, src, 2); } @Test public void testVersionId(){ assertTrue(strategy.shouldKeepLeft( new ServiceUnitStateData(Assigning, dst, 1), new ServiceUnitStateData(Assigning, dst, 1))); assertTrue(strategy.shouldKeepLeft( new ServiceUnitStateData(Assigning, dst, 1), new ServiceUnitStateData(Assigning, dst, 2))); assertFalse(strategy.shouldKeepLeft( new ServiceUnitStateData(Owned, dst, src, 10), new ServiceUnitStateData(Releasing, "broker2", dst, 11))); assertFalse(strategy.shouldKeepLeft( new ServiceUnitStateData(Owned, dst, src, Long.MAX_VALUE), new ServiceUnitStateData(Releasing, "broker2", dst, Long.MAX_VALUE + 1))); assertFalse(strategy.shouldKeepLeft( new ServiceUnitStateData(Owned, dst, src, Long.MAX_VALUE + 1), new ServiceUnitStateData(Releasing, "broker2", dst, Long.MAX_VALUE + 2))); assertTrue(strategy.shouldKeepLeft( new ServiceUnitStateData(Owned, dst, src, 10), new ServiceUnitStateData(Releasing, "broker2", dst, 5))); assertFalse(strategy.shouldKeepLeft( new ServiceUnitStateData(Owned, dst, src, 10), new ServiceUnitStateData(Owned, "broker2", dst, 12))); } @Test public void testForce(){ assertFalse(strategy.shouldKeepLeft( new ServiceUnitStateData(Init, dst, 1), new ServiceUnitStateData(Init, dst, true, 2))); assertTrue(strategy.shouldKeepLeft( new ServiceUnitStateData(Init, dst, 1), new ServiceUnitStateData(Init, dst, true, 1))); } @Test public void testTombstone() { assertFalse(strategy.shouldKeepLeft( data(Init), null)); assertFalse(strategy.shouldKeepLeft( data(Assigning), null)); assertFalse(strategy.shouldKeepLeft( data(Owned), null)); assertFalse(strategy.shouldKeepLeft( data(Releasing), null)); assertFalse(strategy.shouldKeepLeft( data(Splitting), null)); assertFalse(strategy.shouldKeepLeft( data(Free), null)); assertFalse(strategy.shouldKeepLeft( data(Deleted), null)); } @Test public void testTransitionsAndBrokers() { assertTrue(strategy.shouldKeepLeft(data(Init), data2(Init))); assertFalse(strategy.shouldKeepLeft(data(Init), data2(Free))); assertFalse(strategy.shouldKeepLeft(data(Init), data2(Assigning))); assertFalse(strategy.shouldKeepLeft(data(Init), data2(Owned))); assertFalse(strategy.shouldKeepLeft(data(Init), data2(Releasing))); assertFalse(strategy.shouldKeepLeft(data(Init), data2(Splitting))); assertFalse(strategy.shouldKeepLeft(data(Init), data2(Deleted))); assertTrue(strategy.shouldKeepLeft(data(Assigning), data2(Init))); assertTrue(strategy.shouldKeepLeft(data(Assigning), data2(Free))); assertTrue(strategy.shouldKeepLeft(data(Assigning), data2(Assigning))); assertTrue(strategy.shouldKeepLeft(data(Assigning, "dst1"), data2(Owned, "dst2"))); assertTrue(strategy.shouldKeepLeft(data(Assigning, dst), data2(Owned, src, dst))); assertFalse(strategy.shouldKeepLeft(data(Assigning, dst), data2(Owned, dst))); assertFalse(strategy.shouldKeepLeft(data(Assigning, src, dst), data2(Owned, src, dst))); assertTrue(strategy.shouldKeepLeft(data(Assigning, src, dst), data2(Releasing, dst))); assertTrue(strategy.shouldKeepLeft(data(Assigning, src, dst), data2(Releasing, src, dst))); assertTrue(strategy.shouldKeepLeft(data(Assigning), data2(Splitting, dst))); assertTrue(strategy.shouldKeepLeft(data(Assigning), data2(Deleted, dst))); assertTrue(strategy.shouldKeepLeft(data(Owned), data2(Init))); assertTrue(strategy.shouldKeepLeft(data(Owned), data2(Free))); assertTrue(strategy.shouldKeepLeft(data(Owned), data2(Assigning))); assertTrue(strategy.shouldKeepLeft(data(Owned), data2(Owned))); assertTrue(strategy.shouldKeepLeft(data(Owned), data2(Releasing, dst))); assertTrue(strategy.shouldKeepLeft(data(Owned, src, "dst1"), data2(Releasing, src, "dst2"))); assertTrue(strategy.shouldKeepLeft(data(Owned, "dst1"), data2(Releasing, "dst2"))); assertTrue(strategy.shouldKeepLeft(data(Owned, dst), data2(Releasing, dst))); assertTrue(strategy.shouldKeepLeft(data(Owned, src, dst), data2(Releasing, null, dst))); assertTrue(strategy.shouldKeepLeft(data(Owned, src, dst), data2(Releasing, src, null))); assertFalse(strategy.shouldKeepLeft(data(Owned, src, dst), data2(Releasing, dst, null))); assertTrue(strategy.shouldKeepLeft(data(Owned, src, "dst1"), data2(Releasing, src, "dst2"))); assertTrue(strategy.shouldKeepLeft(data(Owned, "src1", dst), data2(Releasing, "src2", dst))); assertTrue(strategy.shouldKeepLeft(data(Owned, src, dst), data2(Releasing, src, dst))); assertFalse(strategy.shouldKeepLeft(data(Owned, src, dst), data2(Releasing, dst, "dst2"))); assertTrue(strategy.shouldKeepLeft(data(Owned, src, "dst1"), data2(Splitting, src, "dst2"))); assertTrue(strategy.shouldKeepLeft(data(Owned, "dst1"), data2(Splitting, "dst2"))); assertFalse(strategy.shouldKeepLeft(data(Owned, dst), data2(Splitting, dst, null))); assertFalse(strategy.shouldKeepLeft(data(Owned, src, dst), data2(Splitting, dst, null))); assertTrue(strategy.shouldKeepLeft(data(Owned), data2(Deleted, dst))); assertTrue(strategy.shouldKeepLeft(data(Releasing), data2(Init))); assertFalse(strategy.shouldKeepLeft(data(Releasing), data2(Free))); assertTrue(strategy.shouldKeepLeft(data(Releasing, "dst1"), data2(Free, "dst2"))); assertTrue(strategy.shouldKeepLeft(data(Releasing, "src1", dst), data2(Free, "src2", dst))); assertTrue(strategy.shouldKeepLeft(data(Releasing, src, "dst1"), data2(Assigning, src, "dst2"))); assertTrue(strategy.shouldKeepLeft(data(Releasing, src, "dst1"), data2(Assigning, src, "dst2"))); assertTrue(strategy.shouldKeepLeft(data(Releasing, "src1", dst), data2(Assigning, "src2", dst))); assertFalse(strategy.shouldKeepLeft(data(Releasing, src, dst), data2(Assigning, src, dst))); assertTrue(strategy.shouldKeepLeft(data(Releasing), data2(Owned))); assertTrue(strategy.shouldKeepLeft(data(Releasing), data2(Releasing))); assertTrue(strategy.shouldKeepLeft(data(Releasing), data2(Splitting))); assertTrue(strategy.shouldKeepLeft(data(Releasing), data2(Deleted, dst))); assertTrue(strategy.shouldKeepLeft(data(Splitting), data2(Init))); assertTrue(strategy.shouldKeepLeft(data(Splitting), data2(Free))); assertTrue(strategy.shouldKeepLeft(data(Splitting), data2(Assigning))); assertTrue(strategy.shouldKeepLeft(data(Splitting), data2(Owned))); assertTrue(strategy.shouldKeepLeft(data(Splitting), data2(Releasing))); assertTrue(strategy.shouldKeepLeft(data(Splitting), data2(Splitting))); assertTrue(strategy.shouldKeepLeft(data(Splitting, src, "dst1"), data2(Deleted, src, "dst2"))); assertTrue(strategy.shouldKeepLeft(data(Splitting, "dst1"), data2(Deleted, "dst2"))); assertTrue(strategy.shouldKeepLeft(data(Splitting, "src1", dst), data2(Deleted, "src2", dst))); assertFalse(strategy.shouldKeepLeft(data(Splitting, dst), data2(Deleted, dst))); assertFalse(strategy.shouldKeepLeft(data(Splitting, src, dst), data2(Deleted, src, dst))); assertFalse(strategy.shouldKeepLeft(data(Deleted), data2(Init))); assertTrue(strategy.shouldKeepLeft(data(Deleted), data2(Free))); assertTrue(strategy.shouldKeepLeft(data(Deleted), data2(Assigning))); assertTrue(strategy.shouldKeepLeft(data(Deleted), data2(Owned))); assertTrue(strategy.shouldKeepLeft(data(Deleted), data2(Releasing))); assertTrue(strategy.shouldKeepLeft(data(Deleted), data2(Splitting))); assertTrue(strategy.shouldKeepLeft(data(Deleted), data2(Deleted))); assertFalse(strategy.shouldKeepLeft(data(Free), data2(Init))); assertTrue(strategy.shouldKeepLeft(data(Free), data2(Free))); assertFalse(strategy.shouldKeepLeft(data(Free), data2(Assigning))); assertTrue(strategy.shouldKeepLeft(data(Free), data2(Assigning, src, dst))); assertTrue(strategy.shouldKeepLeft(data(Free), data2(Owned))); assertTrue(strategy.shouldKeepLeft(data(Free), data2(Releasing))); assertTrue(strategy.shouldKeepLeft(data(Free), data2(Splitting))); assertTrue(strategy.shouldKeepLeft(data(Free), data2(Deleted))); } } ```
George Rufus Brown (May 12, 1898 – January 22, 1983) was a prominent Houston entrepreneur. With his brother Herman, Brown led Brown & Root Inc. to become one of the largest construction companies in the world and helped to foster the political career of Lyndon B. Johnson. The George R. Brown Convention Center and the George R. Brown School of Engineering of Rice University are both named in honor of him. Early life Brown was born on May 12, 1898, in Belton and moved in 1904 to Temple; both communities are in Bell County. His older brother, Herman, left Rice University after spending less than a year there and started work in road paving. Herman's brother-in-law, Dan Root, loaned Herman money in 1919 and founded Brown & Root in 1919. George R. Brown studied at Rice University and the University of Texas at Austin before he graduated from the Colorado School of Mines in 1922 and joined his brother in the business. The company paved roads and built bridges and other public works in Houston. Brown & Root, Inc. 1936–1947 In 1936, Brown & Root was awarded a contract to construct the Marshall Ford Dam (now known as the Mansfield Dam). The construction was almost stopped in 1937 but was allowed to continue when Lyndon B. Johnson (then a very junior congressman) helped push through special legislation. The project was part of the New Deal and was completed in 1942. During World War II, the company's work was expanded to military construction. Over 300 watercrafts were constructed. The company was investigated by the Internal Revenue Service in 1942 for giving bonuses to employees who had agreed to donate to Lyndon B. Johnson. Brown & Root was ultimately fined $372,000. 1947–1969 In 1947, Brown created an innovative oil platform design that was the first to be built out of sight of land. For this work, Brown was awarded the Gold Medal for Distinguished Achievement from the American Petroleum Institute in 1982. Other notable projects the company was involved with were Rice Stadium, the Lyndon B. Johnson Space Center, the Pontchartrain Bridge, and the Gulf Freeway from Houston to Galveston. After Herman Brown's death in 1962, Brown & Root was merged with Halliburton. NASA and Johnson Space Center Using the power and influence gained from his success at Brown & Root, Brown became a chairman on the Rice University Council of Regents. During his time there, Brown worked in conjunction with Texas Congressman Albert Thomas to bring Johnson Space Center (JSC) to Houston. To do this Brown secured a gift of 1,020 acres of land from Humble Oil to Rice University and proceeded to donate it to NASA on Rice’s behalf. NASA accepted the donation after inspecting the area and began construction of the JSC in 1961. Legacy In 1951, Brown, along with his brother Herman and their wives, began the Brown Foundation. The organization donates to notable institutions such as Rice University, Southwestern University, and the Museum of Fine Arts, Houston. As of 2018, the Brown Foundation had given away $1.6 Billion. He lived in the River Oaks area of Houston, in a house built for him. In 2017 the house was on the market for $10 million. References 1983 deaths 1898 births Colorado School of Mines alumni Rice University alumni People from Belton, Texas People from Temple, Texas Businesspeople from Texas American construction businesspeople 20th-century American businesspeople
Thongchai Sitsongpeenong (Thai: ธงชัย ศิษย์สองพี่น้อง, ; born January 22, 1996) is a Thai Muay Thai kickboxer. As of June 2016, he is ranked #9 at Rajadamnern Stadium at 160 lbs and #10 by World Boxing Council Muaythai at 160 lbs. Thongchai has also previously competed for Glory from 2016 to 2018, where he most notably participated in the 2018 Glory Welterweight Contender Tournament. In addition to Muay Thai, Thongchai has also competed in pencak silat, where he has won the silver medal at the 2021 Southeast Asian Games in the 90–95 kg event and the bronze medal at the 2022 World Championship in the 85–90 kg event. Biography and career Thongchai Sitsongpeenong was born as Saranon Glompan in Nakhon Ratchasima in the northerneastern (Isan) region of Thailand on January 22, 1996. He had his first fight at the age of 11 in 2007. On June 7, 2013, Thongchai won the vacant Lumpinee Stadium title in the welterweight division (147 lbs). His first fight outside of Thailand was on November 23, 2013, in Macau, China, against Eleha Nohi at 70 kg. Thongchai won after a three-round decision. His second fight outside of Thailand was on December 13, 2013, in Russia against Khayal Dzaniev. Dzaniev is one of the few fighters who have beaten Buakaw Banchamek, which happened in the TopKing World Series Semifinal Tournament. Thongchai defeated Dzaniev via technical knock out in the third round and won the WMC Intercontintental Super Welterweight Championship title at 154 lb. Thongchai lost in a highly controversial bout against Tobby Smith on January 3, 2014. It has been argued that he won rounds one and two, and it being a three-round fight, he should have won the bout. His next international fight was in France on February 8, 2014. He won against Fabio Pinca after five rounds. He broke Pinca's arm, causing Pinca to not be able to fight for 15 months. Thongchai went on to fight at the IFMA World Championships tournament in Malaysia from May 4–9, 2014. He won gold in the 71 kg division. Thongchai next fought Vong Noy in Cambodia, winning by second-round knock out on August 3, 2014. Thongchai then fought for Top King World Series. On November 15, 2014, he fought for in Paris, France, winning a three-round decision against Samy Sana. In 2015, he fought three more times in the Top King World Series. On July 28, he won via first round knock out against Collin Law. On September 4, he won via first round knock out against Aydin Tuncay. On October 17, he won via third round technical knock out against Adrien Rubis. Titles and achievements Kickboxing Glory 2018 Glory Welterweight Contender Tournament Runner-up (77 kg/170 lb) Muay Thai International Federation of Muaythai Amateur 2014 IFMA World Championships Gold (71 kg) Lumpinee Stadium 2013 Lumpinee Stadium Welterweight Championship (147 lb) World Muaythai Council 2013 WMC Intercontinental Super Welterweight Championship (154 lb) Pencak silat Southeast Asian Games 2021 Southeast Asian Games Men's Pencak silat Tanding (match) 90–95kg – Second place 2023 Southeast Asian Games Men's Pencak silat Tanding (match) 85–90kg – Third place Current ranking N°9 Rajadamnern Stadium at Middleweight (160 lb), April 2016 N°10 WBC Muaythai at Middleweight (160 lb), May 2016 Fight record |- style="background:#cfc;" | 2022-02-19 || Win ||align=left| Mohsen Hosseini ||Muay Hardcore || Thailand || TKO || 1 || |- style="background:#fbb;" | 2018-08-23 || Loss ||align=left| Hamza Ngoto ||Best of Siam XIII || Thailand || KO (Right Elbow)|| 2 || |- style="background:#fbb;" | 2018-07-06 || Loss ||align=left| Vladimír Moravčík||All Star Fight 5 || Czech Republic || decision || 3 || 3:00 |- style="background:#fbb;" | 2018-05-12 || Loss ||align=left| Cedric Doumbe || Glory 53: Lille || Lille, France || KO (Overhand Right) || 1 || 0:33 |- style="background:#fbb;" | 2018-03-03 || Loss ||align=left| Eyevan Danenberg || Glory 51: Rotterdam || Rotterdam, Netherlands || Decision (unanimous) || 3 || 3:00 |- ! style=background:white colspan=9 | |- |- style="background:#cfc;" | 2018-03-03 || Win ||align=left| Alan Scheinson || Glory 51: Rotterdam || Rotterdam, Netherlands || Decision (Split) || 3 || 3:00 |- ! style=background:white colspan=9 | |- |- style="background:#cfc;" | 2017-09-02 || Win ||align=left| Sun Weiqiang || Wu Lin Feng 2017|| Xi'an, China || Decision (unanimous) || 3 || 3:00 |- |- style="background:#fbb;" | 2017-08-05 || Loss ||align=left| Mohamed Mezouari || Fight League 7 || Tangier, Morocco || TKO (Low Kick) || 2 || |- ! style=background:white colspan=9 | |- style="background:#fbb;" | 2017-02-24 || Loss ||align=left| Murthel Groenhart || Glory 38: Chicago|| Hoffman Estates, Illinois || TKO (Punches) || 3 || 1:45 |- |- style="background:#cfc;" | 2016-10-21 || Win ||align=left| Casey Greene || Glory 34: Denver|| Broomfield, Colorado || KO || 2 || 2:58 |- |- style="background:#fbb;" | 2016-09-10|| Loss ||align=left| Nurla Mulali|| Kunlun Fight 51 || Fuzhou, China || Decision (Majority) || 3 || 3:00 |- |- style="background:#cfc;" | 2016-07-10 || Win ||align=left| Olivier Feher || Super Muaythai Workpoint || Thailand || TKO Round 3 || 3 || |- style="background:#cfc;" | 2015-10-17 || Win ||align=left| Adrien Rubis || Top King World Series || Ningbo, China || TKO Round 3 || 3 || 2:30 |- |- style="background:#cfc;" | 2015-09-04 || Win ||align=left| Aydin Tuncay || Top King World Series || Zhoukou, China || KO Round 1 || 1 || 2:40 |- style="background:#cfc;" | 2015-07-28 || Win ||align=left| Colin Law || Top King World Series || Kitec, Hong Kong || KO Round 1 || 1 || 1:17 |- style="background:#cfc;" | 2015-05-16 || Win ||align=left| Rungrawee P.K.SaenchaiMuaythaiGym || TV3 || Thailand || Decision || 5 || 3:00 |- style="background:#cfc;" | 2014-11-15 || Win ||align=left| Samy Sana || Top King World Series || Paris, France || Decision || 3 || 3:00 |- |- style="background:#fbb;" | 2014-09-27 || Lost ||align=left| Peemai Jitmuangnon || Siam Omnoi Stadium || Bangkok, Thailand || Decision || 5 || 3:00 |- |- style="background:#cfc;" | 2014-08-03 || Win ||align=left| Vong Noy || TV3 || Cambodia || KO || 2 || 00:52 |- |- style="background:#cfc;" | 2014-06-14 || Win ||align=left| Youssef Boughanem || Best of Siam 5 || Paris, France || TKO || 3 || 00:44 |- style="background:#cfc;" | 2014-03-21 || Win ||align=left| Karem Bezzouh || Naikhanom Tom PRO Champions || Ayutthaya, Thailand || Decision || 3 || 3:00 |- style="background:#cfc;" |- ! style=background:white colspan=9 | |- style="background:#cfc;" | 2014-03-19 || Win ||align=left| Apichart || Naikhanom Tom PRO Champions || Ayutthaya, Thailand || KO || 2 || |- style="background:#cfc;" | 2014-03-18 || Win ||align=left| Ekachai Parinyo || Naikhanom Tom PRO Champions || Ayutthaya, Thailand || KO || 1 || |- style="background:#cfc;" | 2014-02-08 || Win ||align=left| Fabio Pinca || La Nuit des Titans Tours || France || Decision || 5 || 3:00 |- style=|- style="background:#fbb;" |- style="background:#fbb;" | 2014-01-03 || Lost ||align=left| Tobby Smith || Muay Thai Combat Mania YOKKAO 6 || Pattaya, Thailand || Decision || 3 || 3:00 |- style="background:#cfc;" | 2013-12-13 || Win ||align=left| Khayal Dzhaniev || || Chelyabinsk, Russia || TKO || 3 || |- ! style=background:white colspan=9 | |- style="background:#cfc;" | 2013-11-23 || Win ||align=left| Eleha Nohi || || || Decision || 3 || 3:00 |- style="background:#cfc;" | 2013-09-26 || Win || style="text-align:left;"| Yassine Boughanem || || || Decision || 5 || 3:00 |- style="background:#cfc;" | 2013-06-7 || Win || style="text-align:left;"| Fahmongkol S.J. Danrayong || Lumpinee Stadium || Bangkok, Thailand || Decision || 5 || 3:00 |- ! style=background:white colspan=9 | |- style="background:#cfc;" | 2013-05-10 || Win ||align=left| Petchmankong Gaiyanghadao || || Bangkok, Thailand || Decision || 5 || 3:00 |- style="background:#fbb;" | 2013-04-05 || Lost || style="text-align:left;"| Wanchalerm Ouddonmueang || || Bangkok, Thailand || KO || 3 || |- style="background:#cfc;" | 2013-03-08 || Win || style="text-align:left;"| Damien Alamos || Lumpinee Stadium || Bangkok, Thailand || TKO || 2 || |- style="background:#fbb;" | 2013-02-07 || Lost || style="text-align:left;"| Petchboonchu FA Group || Rajadamnern Stadium || Bangkok, Thailand || Decision || 5 || 3:00 |- style="background:#cfc;" | 2013-01-04 || Win ||align=left| Fahmeechai FA Group || || Bangkok, Thailand || KO || 2 || |- style="background:#fbb;" | 2012-11-12 || Lost || style="text-align:left;"| Nong-O Kaiyanghadaogym || Lumpinee Stadium || Bangkok, Thailand || Decision || 5 || 3:00 |- style="background:#cfc;" | 2012-10-04 || Win || style="text-align:left;"| Sittisak Petpayathai || Rajadamnern Stadium || Bangkok, Thailand || TKO (Knees)|| 4 || |- style="background:#fbb;" | 2012-08-07 || Lost ||align=left| Jomthong Chuwattana || Lumpinee Stadium || Bangkok, Thailand || TKO || 3 || |- style="background:#cfc;" | 2012-07-13 || Win ||align=left| Yodtuantong Petchyindeeacademy || || Bangkok, Thailand || Decision || 5 || 3:00 |- style="background:#cfc;" | 2012-05-22 || Win ||align=left| Tuantong Pumphanmuang || || Bangkok, Thailand || Decision || 5 || 3:00 |- style="background:#fbb;" | 2012-04-30 || Lost ||align=left| Saeksan Or. Kwanmuang || Lumpinee Stadium || Bangkok, Thailand || Decision || 5 || 3:00 |- style="background:#fbb;" | 2012-03-09 || Lost ||align=left| Saeksan Or. Kwanmuang|| Lumpinee Stadium || Thailand || Decision || 5 || 3:00 |- style="background:#cfc;" | 2012-02-08 || Win ||align=left| Lekkla Thonsurankorn || || Thailand || KO || 3 || |- style="background:#cfc;" | 2011-12-31 || Win ||align=left| Yuttachai Pran26 || || Thailand || Decision || 5 || 3:00 |- style="background:#cfc;" | 2011-12-09 || Win ||align=left| Yodpanomrung S.B.P. Carnetwork || || Thailand || Decision || 5 || 3:00 |- style="background:#fbb;" | 2011-11-09 || Lost ||align=left| Petpanomrung Kiatmuu9 || Daprungprabaht Fights, Rajadamnern Stadium || Bangkok, Thailand|| Decision || 5 || 3:00 |- style="background:#cfc;" | 2011-10-14 || Win ||align=left| Rungpetch Gaiyang 5 Daow || || Bangkok, Thailand || Decision || 5 || 3:00 |- style="background:#cfc;" | 2011-09-16 || Win ||align=left| Duangpicard K. Sapaotong || || Bangkok, Thailand || TKO || 3 || |- style="background:#fbb;" | 2011-08-19 || Lost ||align=left| Pornsawan Lookprabaht || || Thailand || Decision || 5 || 3:00 |- style="background:#cfc;" | 2011-07-26 || Win ||align=left| Yodwicha Por Boonsit || || Thailand || Decision || 5 || 3:00 |- style="background:#cfc;" | 2011-07-01 || Win ||align=left| Kangwallek Petchyindee || || Thailand || Decision || 5 || 3:00 |- style="background:#cfc;" | 2011-06-01 || Win ||align=left| Mapichit Sitsongpeenong || || Thailand || Decision || 5 || 3:00 |- style="background:#fbb;" | 2011-04-29 || Lost ||align=left| Yodkhunpon Sitmonchai || || Thailand || TKO || 2 || |- style="background:#cfc;" | 2011-03-25 || Win ||align=left| Eakmongkol Gaiyang5DaowGym || || Bangkok, Thailand || Decision || 5 || 3:00 |- style="background:#cfc;" | 2011-02-25 || Win ||align=left| Eakmongkol Gaiyang5DaowGym || || Bangkok, Thailand || Decision || 5 || 3:00 |- style="background:#cfc;" | 2011-01-?? || Win ||align=left| Pradej Lookklongjan || || Thailand || Decision || 5 || 3:00 |- style="background:#fbb;" | 2010-08-24 || Loss ||align=left| Yodwicha Por Boonsit || || Thailand || Decision || 5 || 3:00 |- | colspan=9 | Legend: |- style="background:#cfc;" | 2014-05-09 || Win ||align=left| Timur Ineshin || 2014 IFMA World Championships, Final|| Langkawi, Malaysia || TKO || 3 || |- style="background:#cfc;" |- ! style=background:white colspan=9 | |- |- style="background:#cfc;" | 2014-05-06 || Win ||align=left| Farkhad Ahkmejanov || 2014 IFMA World Championships, Quarter Final || Langkawi, Malaysia || KO || 1 || |- style="background:#cfc;" | 2014-05-04 || Win ||align=left| Alim Nabiev || 2014 IFMA World Championships, 1/8 Final|| Langkawi, Malaysia || Decision || 3 || 3:00 |- | colspan=9 | Legend: See also List of male kickboxers References External links Sitsongpeenong Muaythai Camp 1991 births Living people Lightweight kickboxers Welterweight kickboxers Middleweight kickboxers Thongchai Sitsongpeenong Glory kickboxers Kunlun Fight kickboxers Silat practitioners SEA Games medalists in pencak silat Thongchai Sitsongpeenong Thongchai Sitsongpeenong Thongchai Sitsongpeenong Competitors at the 2021 SEA Games Competitors at the 2023 SEA Games
```php <?php use Spatie\Tags\Test\TestClasses\TestModel; beforeEach(function () { $this->testModel = TestModel::create(['name' => 'default']); }); it('provides models with tag name and slug already translated', function () { $this->testModel->attachTag('My Tag'); $locale = app()->getLocale(); $translated = $this->testModel->tagsTranslated->first()->toArray(); expect($translated['name'][$locale])->toEqual($translated['name_translated']); expect($translated['slug'][$locale])->toEqual($translated['slug_translated']); }); it('can provide models with tag name and slug translated for alternate locales', function () { $this->testModel->attachTag('My Tag'); $locale = 'fr'; $tag = $this->testModel->tags->first(); $tag->setTranslation('name', $locale, 'Mon tag'); $tag->save(); $translated = $this->testModel->tagsTranslated($locale)->first()->toArray(); expect($translated['name'][$locale])->toEqual($translated['name_translated']); expect($translated['slug'][$locale])->toEqual($translated['slug_translated']); }); ```
```php <?php /* * This file is part of PhpSpec, A php toolset to drive emergent * design by specification. * * (c) Marcello Duarte <marcello.duarte@gmail.com> * (c) Konstantin Kudryashov <ever.zet@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PhpSpec; use InvalidArgumentException; /** * The Service Container is a lightweight container based on Pimple to handle * object creation of PhpSpec services. */ class ServiceContainer { /** * @var array */ private $parameters = array(); /** * @var array */ private $services = array(); /** * @var array */ private $prefixed = array(); /** * @var array */ private $configurators = array(); /** * Sets a param in the container * * @param string $id * @param mixed $value */ public function setParam($id, $value) { $this->parameters[$id] = $value; } /** * Gets a param from the container or a default value. * * @param string $id * @param mixed $default * * @return mixed */ public function getParam($id, $default = null) { return isset($this->parameters[$id]) ? $this->parameters[$id] : $default; } /** * Sets a object or a callable for the object creation. A callable will be invoked * every time get is called. * * @param string $id * @param object|callable $value * * @throws \InvalidArgumentException if service is not an object or callable */ public function set($id, $value) { if (!is_object($value) && !is_callable($value)) { throw new InvalidArgumentException(sprintf( 'Service should be callable or object, but %s given.', gettype($value) )); } list($prefix, $sid) = $this->getPrefixAndSid($id); if ($prefix) { if (!isset($this->prefixed[$prefix])) { $this->prefixed[$prefix] = array(); } $this->prefixed[$prefix][$sid] = $id; } $this->services[$id] = $value; } /** * Sets a callable for the object creation. The same object will * be returned every time * * @param string $id * @param callable $callable * * @throws \InvalidArgumentException if service is not a callable */ public function setShared($id, $callable) { if (!is_callable($callable)) { throw new InvalidArgumentException(sprintf( 'Service should be callable, "%s" given.', gettype($callable) )); } $this->set($id, function ($container) use ($callable) { static $instance; if (null === $instance) { $instance = call_user_func($callable, $container); } return $instance; }); } /** * Retrieves a service from the container * * @param string $id * * @return object * * @throws \InvalidArgumentException if service is not defined */ public function get($id) { if (!array_key_exists($id, $this->services)) { throw new InvalidArgumentException(sprintf('Service "%s" is not defined.', $id)); } $value = $this->services[$id]; if (is_callable($value)) { return call_user_func($value, $this); } return $value; } /** * @param $id * @return bool */ public function isDefined($id) { return array_key_exists($id, $this->services); } /** * Retrieves a list of services of a given prefix * * @param string $prefix * * @return array */ public function getByPrefix($prefix) { if (!array_key_exists($prefix, $this->prefixed)) { return array(); } $services = array(); foreach ($this->prefixed[$prefix] as $id) { $services[] = $this->get($id); } return $services; } /** * Removes a service from the container * * @param string $id * * @throws \InvalidArgumentException if service is not defined */ public function remove($id) { if (!array_key_exists($id, $this->services)) { throw new InvalidArgumentException(sprintf('Service "%s" is not defined.', $id)); } list($prefix, $sid) = $this->getPrefixAndSid($id); if ($prefix) { unset($this->prefixed[$prefix][$sid]); } unset($this->services[$id]); } /** * Adds a configurator, that can configure many services in one callable * * @param callable $configurator * * @throws \InvalidArgumentException if configurator is not a callable */ public function addConfigurator($configurator) { if (!is_callable($configurator)) { throw new InvalidArgumentException(sprintf( 'Configurator should be callable, but %s given.', gettype($configurator) )); } $this->configurators[] = $configurator; } /** * Loop through all configurators and invoke them */ public function configure() { foreach ($this->configurators as $configurator) { call_user_func($configurator, $this); } } /** * Retrieves the prefix and sid of a given service * * @param string $id * * @return array */ private function getPrefixAndSid($id) { if (count($parts = explode('.', $id)) < 2) { return array(null, $id); } $sid = array_pop($parts); $prefix = implode('.', $parts); return array($prefix, $sid); } } ```
```java // Adapted from // path_to_url package com.standardnotes; import android.app.Activity; import android.app.Application; import android.content.Intent; import android.os.Build; import androidx.annotation.RequiresApi; import com.facebook.react.bridge.Promise; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.bridge.ReactContextBaseJavaModule; import com.facebook.react.bridge.ReactMethod; public class ReceiveSharingIntentModule extends ReactContextBaseJavaModule { public final String Log_Tag = "ReceiveSharingIntent"; private final ReactApplicationContext reactContext; private ReceiveSharingIntentHelper receiveSharingIntentHelper; public ReceiveSharingIntentModule(ReactApplicationContext reactContext) { super(reactContext); this.reactContext = reactContext; Application applicationContext = (Application) reactContext.getApplicationContext(); receiveSharingIntentHelper = new ReceiveSharingIntentHelper(applicationContext); } protected void onNewIntent(Intent intent) { Activity mActivity = getCurrentActivity(); if(mActivity == null) { return; } mActivity.setIntent(intent); } @RequiresApi(api = Build.VERSION_CODES.KITKAT) @ReactMethod public void getFileNames(Promise promise){ Activity mActivity = getCurrentActivity(); if(mActivity == null) { return; } Intent intent = mActivity.getIntent(); if(intent == null) { return; } receiveSharingIntentHelper.sendFileNames(reactContext, intent, promise); mActivity.setIntent(null); } @ReactMethod public void clearFileNames(){ Activity mActivity = getCurrentActivity(); if(mActivity == null) { return; } Intent intent = mActivity.getIntent(); if(intent == null) { return; } receiveSharingIntentHelper.clearFileNames(intent); } @Override public String getName() { return "ReceiveSharingIntent"; } } ```
GNet is a simple network library. It is written in C, object-oriented, and built upon GLib. It is intended to be small, fast, easy-to-use, and easy to port. The interface is similar to the interface for Java's network library. GNet has been ported to Linux, BSD, macOS, Solaris, HP-UX, and Windows. It may work on other flavors of Unix too. According to the GNet reference below, GNet is very soon (with the release of GLib 2.22.0) going to be deprecated and replaced by the newly added platform-independent network and socket abstraction layer in GLib/Gio GNet Features TCP "client" and "server" sockets. UDP and IP Multicast sockets. High-level TCP connection and server objects. GConnHttp - HTTP connection object. Asynchronous socket IO. Internet address abstraction. Asynchronous DNS lookup. IPv4 and IPv6 support. Byte packing and unpacking. URI parsing. SHA-1 and MD5 hashes. Base64 encoding and decoding. SOCKS support. Applications that use GNet eDonkey2000 - eDonkey2000 GTK GUI (DFS) frontend Gnome Chinese Checkers - board game Gnome Jabber - instant messaging and chat gtermix - telnet client for BBSes Jungle Monkey - distributed file sharing program Mail Notify - mail notification applet MSI - multi-simulation interface Pan - Gnome Newsreader PreViking - telephony middleware Sussen - network scanner Workrave - rest break reminder External links GNet Official site GNetWorld GIO Official site , Free computer libraries
```java /* * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ package org.dromara.maxkey.web.apis.identity.scim; import com.fasterxml.jackson.annotation.JsonInclude; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.RestController; import java.util.HashSet; import java.util.Set; @RestController @RequestMapping(value = "/api/idm/SCIM/v2/ServiceProviderConfig") public class ScimServiceProviderConfigController { public static final int MAX_RESULTS = 500; public static final int MAX_RESULTS_LIMIT = 5000; @RequestMapping @ResponseBody public ServiceProviderConfig getConfig() { return ServiceProviderConfig.INSTANCE; } @JsonInclude(JsonInclude.Include.NON_EMPTY) public static final class ServiceProviderConfig { public static final ServiceProviderConfig INSTANCE = new ServiceProviderConfig(); public static final String SCHEMA = "urn:ietf:params:scim:schemas:core:2.0:ServiceProviderConfig"; public final Supported patch = new Supported(false); public final Supported bulk = new BulkSupported(false); public final Supported filter = new FilterSupported(true, MAX_RESULTS); public final Supported changePassword = new Supported(false); public final Supported sort = new Supported(true); public final Supported etag = new Supported(false); public final Supported xmlDataFormat = new Supported(false); public final AuthenticationSchemes authenticationSchemes = new AuthenticationSchemes( new AuthenticationSchemes.AuthenticationScheme("Oauth2 Bearer", "OAuth2 Bearer access token is used for authorization.", "path_to_url", "path_to_url")); public Set<String> schemas = new HashSet<>(); private ServiceProviderConfig() { schemas.add(SCHEMA); } @JsonInclude(JsonInclude.Include.NON_EMPTY) public static class Schemas { public final Set<String> schemas = new HashSet<>(); public Schemas(String coreSchema) { schemas.add(coreSchema); } } @JsonInclude(JsonInclude.Include.NON_EMPTY) public static class Supported { public final boolean supported; public Supported(boolean b) { supported = b; } } @JsonInclude(JsonInclude.Include.NON_EMPTY) public static class FilterSupported extends Supported { public final Integer maxResults; public FilterSupported(boolean b, Integer maxResults) { super(b); this.maxResults = maxResults; } } @JsonInclude(JsonInclude.Include.NON_EMPTY) public static class BulkSupported extends Supported { public final Integer maxOperations; public final Integer maxPayloadSize; public BulkSupported(boolean b) { super(b); this.maxOperations = null; this.maxPayloadSize = null; } } @JsonInclude(JsonInclude.Include.NON_EMPTY) static class AuthenticationSchemes { public AuthenticationScheme[] authenticationSchemes; public AuthenticationSchemes(AuthenticationScheme... authenticationScheme) { this.authenticationSchemes = authenticationScheme; } @JsonInclude(JsonInclude.Include.NON_EMPTY) public static class AuthenticationScheme { public final String name; public final String description; public final String specUrl; public final String documentationUrl; AuthenticationScheme(String name, String description, String specUrl, String documentationUrl) { this.name = name; this.description = description; this.specUrl = specUrl; this.documentationUrl = documentationUrl; } } } } } ```
Beyt-e Maluh (, also Romanized as Beyt-e Malūḩ, Baité Malooh, and Beyt-e Mallūḩ; also known as Beyt-e Mallūkh) is a village in Veys Rural District, Veys District, Bavi County, Khuzestan Province, Iran. At the 2006 census, its population was 77, in 10 families. References Populated places in Bavi County
Redkinia is a genus of rod-like Ediacaran fossil fringed with large and small projections which has been putatively compared with the mandibles of an Arthropod and the mouthparts of Wiwaxia and Odontogriphus. If it were to have been a jaw, it would have been used for filter-feeding rather than crushing. References Proterozoic animals
The 2nd Welsh Brigade was a Royal Field Artillery unit of Britain's Territorial Force (TF) formed in 1908 that served in Palestine during World War I. Between the wars it converted to the anti-aircraft (AA) role and was captured in Java during World War II. Its successor unit continues in Britain's Army Reserve today. Origin The creation of the Territorial Force under the Haldane Reforms of 1908 saw a widespread reorganisation of existing Volunteer Force units. One new unit formed was II (or 2nd) Welsh Brigade, Royal Field Artillery. The bulk of the personnel came from the 2nd Volunteer Battalion Welsh Regiment based in Cardiff, originally raised as Rifle Volunteers in 1859, some of whom had seen active service during the Second Boer War. (Other members of this battalion joined the Glamorganshire Royal Horse Artillery, the remainder formed the 7th (Cyclist) Battalion, Welsh Regiment.) One battery of the new field artillery brigade was provided by the 1st Cardigan Royal Garrison Artillery (Volunteers), which had been formed at Aberystwyth, Cardiganshire, on 28 June 1901 as the Volunteers expanded during the Boer War. This had consisted of two 'position batteries' (later 'heavy batteries'). The new brigade had the following organisation: Headquarters (HQ) at Drill Hall, Cardiff 3rd Glamorganshire Battery at Drill Hall, Cardiff 4th Glamorganshire Battery at Drill Hall, Cardiff Cardiganshire Battery at Glyndwr Road, Aberystwyth 2nd Welsh Ammunition Column at Drill Hall, Cardiff The unit was part of the TF's Welsh Division. The batteries were each issued with four 15-pounder guns. Joshua Pritchard Hughes, Bishop of Llandaff, was appointed chaplain to the new brigade, with the rank of chaplain 1st class (TF). As a young clergyman he had been appointed chaplain to the 2nd Volunteer Battalion on 10 December 1876 and maintained the link as he rose in the church. World War I Mobilisation After the order to mobilise was received on 4 August 1914, the units of the Welsh Division assembled at their drill halls. The 2nd Welsh Brigade mobilised at Cardiff under the command of Lt-Col H.T. Gilling, TD, who had been CO since 1913. By 11 August the units had completed their concentration and TF members were invited to volunteer for Overseas Service. Four days later the War Office issued instructions to separate those men who had signed up for Home Service only, and form these into reserve units, and on 31 August, the formation of a reserve or 2nd Line unit was authorised for each 1st Line unit where 60 per cent or more of the men had volunteered for Overseas Service. The titles of these 2nd Line units would be the same as the original, but distinguished by a '2/' prefix. In this way duplicate batteries, brigades and divisions were created, mirroring those TF formations being sent overseas. 1/II Welsh Brigade, RFA At the end of August the Welsh Division concentrated at Northampton to continue its training. On 18 November the division was warned for garrison duty in India, but this was cancelled and in December it moved to Cambridge, then to Bedford in May 1915. In July the infantry of the division (now renamed the 53rd (Welsh) Division) embarked for service at Gallipoli, but the divisional artillery remained at Bedford. In October the batteries were re-armed with modern 18-pounder guns and on 8 November they handed over their obsolescent 15-pounders to the 2nd Line unit, which had just arrived at Bedford. 53rd (Welsh) Divisional Artillery was now ordered to France to join the British Expeditionary Force (BEF) on the Western Front. It embarked on 20 November and had concentrated at Pont-Remy by 25 November, from where parties were sent to various divisional artilleries for instruction in front line duties. Meanwhile, after suffering appalling casualties at Gallipoli, 53rd (Welsh) Division had been withdrawn to Egypt to refit. On 30 January 1916 the divisional artillery was ordered to rejoin the rest of the division. The batteries entrained at Pont-Remy, embarked at Marseilles on 3 February and disembarked at Alexandria on 11 February. By 22 February the artillery had rejoined the division at Beni Salama. For the rest of the year the recuperating division was stationed in the Suez Canal defences. In May 1916 the TF field brigades were numbered, the 1/II Welsh being designated CCLXVI Brigade, RFA, (266 Brigade) and the batteries became A, B and C. Then on 25 December 1916 the divisional artillery was reorganised: A Bty of CCLXVI Bde was broken up between B and C Btys (to make them up to six guns each) and they were redesignated A and B, while the brigade was redesignated CCLXVII Brigade, RFA (267 Bde). 53rd (W) Divisional Ammunition Column had remained in France, and was reformed in Egypt by abolishing the Brigade Ammunition Columns. Palestine Early in 1917 the Egyptian Expeditionary Force launched the Sinai and Palestine Campaign by crossing the Sinai desert and advancing against Turkish forces at Gaza City, but CCLXVII Bde remained in the Suez Canal defences and missed the First Battle of Gaza. The brigade rejoined the division on 19 April while the Second Battle of Gaza was in progress, but although it crossed Wadi Ghuzzeh and took up position, it did not fire a shot in the action. Infantry casualties had been high and gains minimal, and the EEF dug in for a summer of trench warfare. Although the War Office was unable to provide more divisions for the EEF, it could send guns: 53rd (W) Division's batteries were temporarily brought up to a strength of eight rather than six guns, until further troops arrived. The reorganised EEF renewed its offensive (the Third Battle of Gaza) on 27 October. XX Corps, including 53rd (W) Divisional artillery, moved into position during the night of 30/31 October to capture Beersheba, and the bombardment began at 05.55. After a pause at 07.00 to let the dust settle and determine the effect, the guns reopened. Infantry parties advanced to within of the barrage to finish cutting the barbed wire. They then rushed Point 1069 and the 18-pounder batteries began to move up to more advanced positions. Beersheba had fallen to the Desert Mounted Corps and XX Corps could bivouack on the objective. On 3 November 53rd (W) Division was ordered to advance to the Tel es Sheria road. The right column consisted of 160th (South Wales) Brigade but only one battery of CCLXVII Bde because of the shortage of water for the horses. It was a difficult march over broken country in hot weather and the gunners had to haul their guns up to the head of the valley to get in range of the Khuweilfe heights. 160th Brigade met determined opposition and could not clear the wells at Khuweilfe before nightfall. The attack was renewed at 05.00 next morning, but the artillery support ceased when the ammunition wagons could not get up to the guns, and the infantry only got as far as Hill 1706. However, on 6 November the division assaulted the Khuweilfe position supported by an intense bombardment by all its own guns and a heavy battery. After confused fighting the position was held, with the support of the divisional artillery breaking up Turkish counter-attacks. After breaking through the Gaza positions, the EEF pressed on to Jerusalem in appalling weather. XX Corps sent forward a flying column known as 'Mott's Detachment' that included 53rd (W) Division. Jerusalem fell on 8 December, but there was still heavy fighting to the end of the year as the Turks threw in counter-attacks. XX Corps renewed its advance in March 1918, 53rd(W) Division pushing forward a little on 2 March, then again on 6 March against only slight opposition, before the whole Corps advanced on 8 March. 53rd (W) Division's main objective was the hill of Tell 'Asur, and it was supported by plentiful artillery as well as its own field brigades. The peak was taken, lost, and retaken, followed by four more unsuccessful Turkish counter-attacks. That night the division also took Chipp Hill, which had defied the neighbouring division during daylight, but on 10 March found the wadi in front too steep to climb, only passing over it during darkness on 12 March. The new line was held through the summer months. In April a large number of formations and units were stripped from the EEF to reinforce the BEF on the Western Front following the German spring offensive. 53rd (W) Division took over a section of the line from 74th (Yeomanry) Division on 9 April, with 160th Infantry Bde and CCLXVII Bde taking over the right sector. Unlike most RFA brigades, which had gained a howitzer battery in the 1916 reorganisation, CCXLVII had remained without one. On 8 April 1918 it was joined by 439 (Howitzer) Bty, equipped with four 4.5-inch howitzers passed over by CXVII (H) Brigade in 74th (Y) Division. The new battery had been specially formed with personnel drawn from 53rd (W) and 60th (2/2nd London) Divisional Ammunition Columns and from 9th Mountain Battery, RGA. In the summer of 1918 the 53rd Division was 'Indianised', with three quarters of the infantry battalions sent to the BEF and replaced by others drawn from the British Indian Army, but this did not affect the divisional artillery, which retained its composition to the end of the war. At the climactic Battle of Megiddo 53rd Division attacked late on the first day (18 September), after a 20-minute bombardment. The sound of the infantry's approach march had previously been drowned by slow shellfire on Keen's Hill. The gunners then fired smoke shells to guide the infantry's advance in the moonlight. One Turkish position held out, and a new attack was arranged for 19 November. During the afternoon a party of Turks was found eating lunch in the open, and every field gun in range was called in to destroy them. When the attack went in at 19.00 it was completely successful, the main enemy position was taken and the guns could move forward. The pressure was kept up on 20 September: 160th Bde was involved in severe fighting without artillery support while the guns were moving up, and was driven off Gallows Hill. But then CCLXVII Bde came into action with a half-hour bombardment of Gallows Hill, breaking up a Turkish counter-attack that was being prepared, and demoralising the defenders of the hill, which was quickly reoccupied. By the end of the next day the Turkish army was shattered, and a general advance was ordered. After the battle the division was withdrawn to Alexandria before the Armistice of Mudros came into effect on 31 October. Demobilisation began on 20 December and was completed in June 1919. CCLXVII Brigade was placed in suspended animation. 2/II Welsh Brigade, RFA Although 2/II Welsh Bde was raised at Cardiff as early as 14 September 1914, the 2nd Welsh Division (68th (2nd Welsh) Division from August 1915) did not concentrate at Northampton until Spring 1915, the brigade joining it on 29 April. It moved to Earlswood on 4 August 1915 and then arrived at Bedford to replace the 1st Line brigade on 2 November. Training of the units was made difficult by the lack of arms and equipment, and the requirement to provide drafts to the 1st Line overseas. In June the first saddlery and horses began to arrive, but no guns until August, when the brigade received four French De Bange 90 mm guns. Some ammunition wagons arrived in September, and eight more 90 mm guns in October. Training began to speed up, with the 90 mm guns standing in for 15-pounders. When the brigade arrived at Bedford it took over 12 x 15-pounders from the 1st Line. In December 1915 these in turn were replaced by modern 18-pounders. 68th (2nd Welsh) Division had been assigned a role in Home Defence in November when it joined First Army (Home Forces) in Central Force, with its units quartered across Eastern England. In May 1916 the brigade was numbered CCCXLI Brigade (341 Bde) and the batteries became A, B and C. The Home Defence divisions continually supplied drafts to units fighting overseas, and CCCXLI Bde had disappeared from 68th (2nd W) Division's order of battle by mid-1917. Interwar 82nd (Welsh) Field Brigade, RA The 2nd Welsh Brigade, RFA, was reformed in the 53rd (W) Division on 7 February 1920, with 5th–8th Glamrgan Batteries (the Cardigan Battery was not reformed). It was redesignated the 82nd (Welsh) Brigade, RFA, when the TF was reorganised as the Territorial Army (TA) in 1921 (becoming a Field Brigade, RA, in 1924 when the RFA was subsumed into the Royal Artillery). It had the following organisation: HQ at Dumfries Place, Cardiff 325 (Glamorgan) Bty 326 (Glamorgan) Bty 327 (Glamorgan) Bty 328 (Glamorgan) Bty (Howitzer) 77th (Welsh) HAA Regiment, RA In the late 1930s the need for improved anti-aircraft (AA) defences for Britain's cities became apparent, and a programme of converting existing TA units was pushed forward. On 1 November 1938 the unit became 77th (Welsh) AA Regiment, RA, with the following organisation: HQ at Dumfries Place, Cardiff 239 (Glamorgan) AA Bty at Dumfries Place 240 (Glamorgan) AA Bty at Dumfries Place 241 (Glamorgan) AA Bty at Drill Hall, Pentre, Rhondda 242 (Glamorgan) AA Bty at Drill Hall, Pentre, Rhondda World War II Mobilisation The TA's AA units were mobilised on 23 September 1938 during the Munich Crisis, with units manning their emergency positions within 24 hours, even though many did not yet have their full complement of men or equipment. The emergency lasted three weeks, and they were stood down on 13 October. In February 1939 the existing AA defences came under the control of a new Anti-Aircraft Command. In June a partial mobilisation of TA units was begun in a process known as 'couverture', whereby each AA unit did a month's tour of duty in rotation to man selected AA and searchlight positions. On 24 August, ahead of the declaration of war, AA Command was fully mobilised at its war stations. Phoney War 77th (Welsh) AA Regiment came under the command of 45th Anti-Aircraft Brigade based at Cardiff and forming part of 5th Anti-Aircraft Division. In mid-May 1940, as the Battle of France got under way, 45 AA Bde's units were ordered to find rifle detachments to guard against possible attacks by German paratroopers. The brigade also had to lend 240 AA Bty of 77th AA Rgt, with a Gun-laying radar (GL) detachment, to reinforce the defences of Littlehampton on the South Coast of England. Battle of Britain On 1 June all AA regiments equipped with 3-inch or the newer 3.7-inch guns were termed Heavy Anti-Aircraft (HAA) to distinguish them from the new Light Anti-Aircraft (LAA) units being formed. In August and September 1940, the Cardiff Gun Defence Area (GDA) had 26 HAA guns. The number of raids over South Wales, and the number of times the guns engaged, increased sharply during August. At this time, 77th (W) HAA Rgt was deployed as follows: 239 HAA Bty The Bulwarks, Porthkerry – 4 x static 3.7-inch, later 8 x 3.7-inch with GL Sully – 4 x 3.7-inch 240 HAA Bty Llwyn-y-Grant, Cardiff – 2 x 3-inch, New House, Newport – 2 x 3-inch, 2 x 3.7-inch, later 4 x static 3.7-inch 241 HAA Bty – detached to 4th Anti-Aircraft Division 242 HAA Bty Ely Racecourse, Cardiff – 4 x 3.7-inch Intake, West Llandaff – 2 x 3.7-inch By late September, 242 HAA Bty had moved to: Lavernock Fort, Penarth – 6 x static 3.7-inch with GL Merry Harriers, Cardiff – 4 x mobile 3.7-inch and 241 HAA Bty had returned and taken over: Mardy Farm – 4 x static 3.7-inch Llwyn-y-Grant, Cardiff – 2 x 3-inch, later 2 x 3-inch joined from New House, while 240 HAA Bty had taken over: Pye Corner, Cardiff – 4 x static 3.7-inch with GL Blitz Following the Luftwaffe's defeat in the Battle of Britain, it began heavy night attacks on Britain's cities ('The Blitz'). At first the towns of South Wales, including important coal and oil port facilities, refineries, steelworks and ordnance factories, were under almost nightly air attack, to which the AA defences replied as best they could. In the absence of effective GL radar control, at night the guns could only reply blindly with fixed barrages. There was a lull in the intensity of raids on South Wales from late September as the Luftwaffe concentrated on London and the industrial cities of the English Midlands, but there was a flare-up in activity over South Wales in late October. Some of this was aircraft dropping Parachute mines in the Bristol Channel, which were plotted by the HAA batteries' GL sets. In November the AA guns began to claim some hits from GL-controlled fire – 239 HAA Bty claimed one aircraft shot down from the Bulwarks on the night of 7 November, and the 'Ball of Fire' concentrated barrage over Cardiff claimed another the next night. As AA Command's resources expanded, 5 AA Division's responsibilities were split in November 1940 and a new 9 AA Division was created to cover South Wales and the Severn Valley. 45 AA Brigade was transferred to the new formation. There were heavy night raids on Cardiff on 2 January, 3 and 4 March 1941 (the Cardiff Blitz), with frequent smaller raids. By the end of February 1941 the HAA guns (3-inch, 3.7-inch and 4.5-inch) in the Cardiff GDA only numbered 52 out of a planned establishment of 64. This increased a month later to 56 guns, though further additions to the establishment were already being called for. On 26 March 1941, 242 HAA Battery was sent to reinforce 62nd (Northumbrian) HAA Rgt in the Humber Gun Zone under 39 AA Bde. It then went to Southend-on-Sea. It had returned to regimental command by early May, when the Blitz came to an end. The regiment sent a cadre to 206th HAA Training Rgt at Arborfield, to provide the basis for a new 457 Bty; this was formed on 10 July 1941 and joined the newly-formed 132nd HAA Rgt. As the flow of new AA units from the training centres continued, experienced units began to be prepared for overseas service, and 77th (Welsh) HAA Rgt was one of these. The war establishment for regiments overseas was only three batteries, and 242 HAA Bty was formally detached in early June 1941. It went to Egypt where it joined 51st (London) HAA Rgt. By October 1941, 77th HAA Rgt was part of the War Office Reserve, ready to embark. Java The regiment sailed on 6 December aboard Convoy WS14 to join Middle East Forces, but on 9 January 1942, while still at sea, it was diverted to the Far East following the Japanese invasion of Malaya. The convoy arrived at Singapore on 13 January, but most of the regiment's equipment went on to the Middle East, and it had to be re-equipped from the stockpile at Singapore. The airbases at Singapore were under heavy attack and the RAF redeployed its aircraft to the Dutch East Indies: the AA units aboard WS14 were diverted again, sailing on 30 January and arriving at Batavia on Java on 3/4 February. As the regiment began to unload from the ships at Batavia on 4 February, it came under immediate air attack. Once the confusion cleared, the AA units deployed around the harbour. Then 16 AA Bde (whose HQ had disembarked at the same time) arranged for them to be sent to defend the most important ports and airfields. 77th HAA Regiment (less 239 HAA Bty left to defend Batavia) was sent to the naval base at Surabaya. Part of the regiment boarded an express train for Surabaya, but on the way it collided with a goods train, and three officers and 12 other ranks were killed, and another 60 officers and men injured. When the Japanese attack on Java began, 77th was the only fully equipped HAA regiment available; although two batteries of the Regular Army 6th HAA Rgt had been evacuated from Sumatra before it was captured, they had no guns and were sent to defend airfields as infantry. 77th HAA Regiment was in actionwas soon in action at Surabaya, claiming three bombers shot down. Japanese landings on Java began on 1 March near Batavia, covered by bombing raids, with the airfields as their primary target. 77th HAA Regiment was forced to withdraw from Surabaya to Tjilatjap in the face of strong attacks, and one Troop was cut off and lost at Surabaya. 'Blackforce', a mixed force of Australians and British commanded by Brig Arthur Blackburn, VC, kept up an active defence for several days, but the Dutch commander ordered his units to cease fire on 8 March, and the remnants of 16 AA Bde including 77th HAA Rgt surrendered on 12 March, after destroying their guns. No records of the AA engagements over Java have survived, but 16 AA Bde claimed to have destroyed 26 Japanese aircraft. The survivors of 77th (Welsh) HAA Regiment and the other British troops on Java spent the next three-and-a-half years as Prisoners of War (POWs), held in atrocious conditions. Large numbers died as a result of disease, overwork, brutal treatment, or shipwreck. The regiment, with 239, 240 and 241 Btys, was formally placed in suspended animation from 12 March 1942. Postwar When the TA was reconstituted on 1 January 1947, the regiment was reformed as 282nd (Welsh) Heavy Anti-Aircraft Regiment (coincidentally, its old number 77 was taken by the Regular Army 6th HAA Rgt alongside which it had served in Java). The regiment was part of 71 AA Bde (the prewar 45 AA Bde) at Cardiff. On 20 June 1950 the regiment absorbed 520th (Glamorgan) Light AA Rgt and on 1 January 1954 it absorbed 602nd (Welch) HAA Rgt, in each case without changing its own designation. On 10 March 1955, AA Command was disbanded and there was a further round of mergers among the TA's AA units, with 282nd HAA Rgt absorbing 534th (Swansea) HAA Rgt. It appears to have joined 41 (AA) AGRA (TA) by this time. This was followed on 1 May 1961 by amalgamation with 281st (Glamorgan Yeomanry) and 283rd (Monmouthshire) Field Rgts to form Q (Welsh) Bty in 282nd (Glamorgan and Monmouthshire) Field Regiment. After several more rounds of mergers the lineage is continued in 211 (South Wales) Bty in today's 104th Regiment Royal Artillery. Honorary Colonels The following served as Honorary Colonel of the unit: J. Gaskell, CBE, VD, TD, appointed 18 December 1909 Memorials A memorial board to the dead of 77th (Welsh) HAA Rgt was carved with a penknife by a prisoner of war in Changi POW Camp, and hung in a church built by the POWs. The church was destroyed by the Japanese, but the memorial was later found and re-hung in the Tabernacle Welsh Baptist Chapel, The Hayes, Cardiff. Footnotes Notes References Maj A.F. Becke,History of the Great War: Order of Battle of Divisions, Part 2a: The Territorial Force Mounted Divisions and the 1st-Line Territorial Force Divisions (42–56), London: HM Stationery Office, 1935/Uckfield: Naval & Military Press, 2007, . Maj A.F. Becke,History of the Great War: Order of Battle of Divisions, Part 2b: The 2nd-Line Territorial Force Divisions (57th–69th), with the Home-Service Divisions (71st–73rd) and 74th and 75th Divisions, London: HM Stationery Office, 1937/Uckfield: Naval & Military Press, 2007, . Basil Collier, History of the Second World War, United Kingdom Military Series: The Defence of the United Kingdom, London: HM Stationery Office, 1957. Capt Cyril Falls, History of the Great War: Military Operations, Egypt and Palestine, Vol II, From June 1917 to the End of the War, London: HM Stationery Office, 1930/Imperial War Museum and Naval & Military Press, 2013, . Gen Sir Martin Farndale, History of the Royal Regiment of Artillery: The Forgotten Fronts and the Home Base 1914–18, Woolwich: Royal Artillery Institution, 1988, . Gen Sir Martin Farndale, History of the Royal Regiment of Artillery: The Years of Defeat: Europe and North Africa, 1939–1941, Woolwich: Royal Artillery Institution, 1988/London: Brasseys, 1996, . Gen Sir Martin Farndale, History of the Royal Regiment of Artillery: The Far East Theatre 1939–1946, London: Brasseys, 2002, . J.B.M. Frederick, Lineage Book of British Land Forces 1660–1978, Vol I, Wakefield, Microform Academic, 1984, . J.B.M. Frederick, Lineage Book of British Land Forces 1660–1978, Vol II, Wakefield, Microform Academic, 1984, . Norman E.H. Litchfield, The Territorial Artillery 1908–1988 (Their Lineage, Uniforms and Badges), Nottingham: Sherwood Press, 1992, . Norman Litchfield & Ray Westlake, The Volunteer Artillery 1859–1908 (Their Lineage, Uniforms and Badges), Nottingham: Sherwood Press, 1982, . Gen Sir Frederick Pile's despatch: "The Anti-Aircraft Defence of the United Kingdom from 28th July, 1939, to 15th April, 1945" London Gazette 18 December 1947 Brig N.W. Routledge, History of the Royal Regiment of Artillery: Anti-Aircraft Artillery 1914–55, London: Royal Artillery Institution/Brassey's, 1994, Col J.D. Sainsbury, The Hertfordshire Yeomanry Regiments, Royal Artillery, Part 2: The Heavy Anti-Aircraft Regiment 1938–1945 and the Searchlight Battery 1937–1945, Welwyn: Hertfordshire Yeomanry and Artillery Trust/Hart Books, 2003, . Titles and Designations of Formations and Units of the Territorial Army, London: War Office, 7 November 1927 (RA sections also summarised in Litchfield, Appendix IV). Patrick Walker, 6th Heavy Anti-Aircraft Regiment, Royal Artillery, Rev Edn, Gloucester: Choir Press, 2013, Maj C.H. Dudley Ward, History of the 53rd (Welsh) Division (T.F.) 1914–1918, Cardiff: Western Mail, 1927/Uckfield: Naval & Military, 2004, . Ray Westlake, Tracing the Rifle Volunteers, Barnsley: Pen and Sword, 2010, . Maj-Gen S. Woodburn Kirby, History of the Second World War, United Kingdom Military Series: The War Against Japan Vol I, The Loss of Singapore, London: HM Stationery Office, 1957/Uckfield: Naval & Military, 2004, . External sources British Army website Mark Conrad, The British Army, 1914 (archive site) British Army units from 1945 on The Drill Hall Project Dutch East Indies Campaign 1941–1942 Great War Centenary Drill Halls. Imperial War Museum, War Memorials Register The Long, Long Trail Orders of Battle at Patriot Files The Regimental Warpath 1914–1918 (archive site) Land Forces of Britain, the Empire and Commonwealth – Regiments.org (archive site) Royal Artillery 1939–1945 Graham Watson, The Territorial Army 1947 Welsh Military units and formations in Cardiff Military units and formations in Glamorgan Military units and formations in Wales Military units and formations established in 1908
Tomasz Bednarek and Igor Zelenay were the defending champions. They didn't participate that year. Rubén Ramírez Hidalgo and Santiago Ventura defeated Dominik Hrbatý and Martin Kližan 6–2, 7–6(5) in the final. Seeds Draw Draw References Doubles Draw Kosice Open - Doubles 2009 Doubles
```c++ /// Source : path_to_url /// Author : liuyubobobo /// Time : 2020-11-29 #include <iostream> #include <vector> using namespace std; /// Dynamic Programming - LIS /// Time Complexity: O(n^2) /// Space Complexity: O(n) class Solution { public: int minimumMountainRemovals(vector<int>& nums) { int n = nums.size(); vector<int> dp1(n, 1); for(int i = 1; i < n; i ++){ for(int j = i - 1; j >= 0; j --) if(nums[i] > nums[j]) dp1[i] = max(dp1[i], 1 + dp1[j]); } vector<int> dp2(n, 1); for(int i = n - 2; i >= 0; i --){ for(int j = i + 1; j < n; j ++) if(nums[i] > nums[j]) dp2[i] = max(dp2[i], 1 + dp2[j]); } int res = 3; for(int i = 0; i < n; i ++) if(dp1[i] > 1 && dp2[i] > 1) res = max(res, dp1[i] + dp2[i] - 1); return n - res; } }; int main() { vector<int> nums1 = {1, 3, 1}; cout << Solution().minimumMountainRemovals(nums1) << endl; // 0 vector<int> nums2 = {2,1,1,5,6,2,3,1}; cout << Solution().minimumMountainRemovals(nums2) << endl; // 3 vector<int> nums3 = {4,3,2,1,1,2,3,1}; cout << Solution().minimumMountainRemovals(nums3) << endl; // 4 vector<int> nums4 = {1,2,3,4,4,3,2,1}; cout << Solution().minimumMountainRemovals(nums4) << endl; // 1 return 0; } ```
```python # mypy: allow-untyped-defs import weakref from typing import Set import torch from torch.autograd.graph import register_multi_grad_hook from torch.nn.modules.module import ( register_module_forward_hook, register_module_forward_pre_hook, ) from torch.utils._pytree import tree_flatten __all__ = ["ModuleTracker"] class ModuleTracker: """ ``ModuleTracker`` is a context manager that tracks the nn.Module hierarchy during execution so that other system can query which Module is currently being executed (or its backward is being executed). You can access the ``parents`` attribute on this context manager to get the set of all the Modules currently being executed via their fqn (fully qualified name, also used as the key within the state_dict). You can access the ``is_bw`` attribute to know if you are currently running in backward or not. Note that ``parents`` is never empty and always contains the "Global" key. The ``is_bw`` flag will remain ``True`` after the forward until another Module is executed. If you need it to be more accurate, please submit an issue requesting this. Adding a map from fqn to the module instance is possible but not done yet, please submit an issue requesting this if you need it. Example usage .. code-block:: python mod = torch.nn.Linear(2, 2) with ModuleTracker() as tracker: # Access anything during the forward pass def my_linear(m1, m2, bias): print(f"Current modules: {tracker.parents}") return torch.mm(m1, m2.t()) + bias torch.nn.functional.linear = my_linear mod(torch.rand(2, 2)) """ parents: Set[str] """ A Set containing the fqn for each module currently running their forward """ def __init__(self) -> None: self.parents = {"Global"} self._known_modules: weakref.WeakKeyDictionary = weakref.WeakKeyDictionary() self._seen_modules: weakref.WeakSet = weakref.WeakSet() self._has_callback = False def _maybe_set_engine_callback(self): # This assumes no concurrent calls to backward if self._has_callback: return def callback(): self.parents = {"Global"} self._has_callback = False torch.autograd.Variable._execution_engine.queue_callback(callback) self._has_callback = True @property def is_bw(self): """ A boolean marking if this is currently running during the backward pass or not """ return torch._C._current_graph_task_id() != -1 def _get_mod_name(self, mod): if mod not in self._known_modules: self._known_modules[mod] = type(mod).__name__ mod_name = self._known_modules[mod] if mod not in self._seen_modules: for name, submod in mod.named_children(): self._known_modules[submod] = f"{mod_name}.{name}" self._get_mod_name(submod) self._seen_modules.add(mod) return mod_name def _get_append_fn(self, name, is_bw): def fn(*args): if is_bw: self._maybe_set_engine_callback() if name in self.parents: print( "The module hierarchy tracking seems to be messed up." "Please file a bug to PyTorch." ) self.parents.add(name) return fn def _get_pop_fn(self, name, is_bw): def fn(*args): if name in self.parents: self.parents.remove(name) elif not is_bw: # Due to some input/output not requiring gradients, we cannot enforce # proper nesting in backward raise RuntimeError( "The Module hierarchy tracking is wrong. Report a bug to PyTorch" ) return fn def _fw_pre_hook(self, mod, input): name = self._get_mod_name(mod) self._get_append_fn(name, False)() args, _ = tree_flatten(input) tensors = [a for a in args if isinstance(a, torch.Tensor) and a.requires_grad] if tensors: register_multi_grad_hook(tensors, self._get_pop_fn(name, True)) def _fw_post_hook(self, mod, input, output): name = self._get_mod_name(mod) self._get_pop_fn(name, False)() args, _ = tree_flatten(output) tensors = [a for a in args if isinstance(a, torch.Tensor) and a.requires_grad] if tensors: register_multi_grad_hook(tensors, self._get_append_fn(name, True)) def __enter__(self): self._fw_pre_handle = register_module_forward_pre_hook(self._fw_pre_hook) self._fw_post_handle = register_module_forward_hook(self._fw_post_hook) return self def __exit__(self, *args): self._fw_pre_handle.remove() self._fw_post_handle.remove() ```
```java /* =========================================================== * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * * * Project Info: path_to_url * * This library is free software; you can redistribute it and/or modify it * (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * * You should have received a copy of the GNU Lesser General Public * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * [Oracle and Java are registered trademarks of Oracle and/or its affiliates. * Other names may be trademarks of their respective owners.] * * --------------------- * TimePeriodAnchor.java * --------------------- * * Original Author: David Gilbert; * Contributor(s): -; * */ package org.jfree.data.time; /** * Used to indicate one of three positions in a time period: * {@code START}, {@code MIDDLE} and {@code END}. */ public enum TimePeriodAnchor { /** Start of period. */ START, /** Middle of period. */ MIDDLE, /** End of period. */ END } ```
Playbox Theatre Company is a theatre company for children and young people based in Warwick, England. Playbox provide training for children and young people aged 3–25 in various different areas, including theatre training, musical theatre, circus, voice and Shakespeare. Based at their purpose built theatre in Warwick, The Dream Factory, Playbox also run training sessions at various outlying centres including Leamington, Stratford-upon-Avon, Kenilworth, Solihull and Banbury. As well as providing training, Playbox also put on a number of productions throughout the year at The Dream Factory, in addition to international tours. History The company was founded in 1986 by Mary King, the current Executive Director of Playbox Theatre. The company began life in a hotel room in 1986. That year they invited English theatre director Michael Bogdanov to be their patron and he accepted. By 1988 the company were performing in two theatres in Warwick and Kenilworth and a year later they added Balsall Common to their schedule. In 1989 Stewart McGill, husband of Mary King, joined Playbox as a director. In 1991 and 1992, Stratford upon Avon, Rugby, and Leamington Spa added to the list. In 1993 the company produced its first work for national television. In 1994 Playbox reached out further to Coventry and have since moved into buildings in Bristol and York. Today, Playbox Theatre are running sessions in Warwick, Leamington, Stratford-upon-Avon, Kenilworth, Solihull and Banbury. In 1999, Playbox's own theatre, The Dream Factory, opened in Warwick following a £2.7 million grant from the Heritage Lottery Fund. The theatre has a varying capacity as it is essentially a black box theatre but for safety the maximum is 250. There are 184 seats in the main auditorium, although these are flexible and can be altered for performances on a thrust stage, or in the round. On tour The company has performed throughout the country and further afield. In 1989 they played at the regionally well known Warwick Arts Centre and the world famous Edinburgh Festival. After Kraków City Council invited them to their city the company visited them. A year later a tour of the United States was staged. Further tours have been taken to these locations, as well as one to Germany, in the years since. Playbox has also taken Treasure Island to Cannizaro Park festival, playing on the same stage as Amy Winehouse. Playbox also added Tokyo to their resume in 2007. They visit Santa Monica every two years, in 2008 taking a tour of 'Monkey'. In the summer of 2010, Playbox will return to the Edinburgh Festival Fringe, where a group of 14 young actors will perform The Fallen, a new work exploring the effect of war on those left behind. Patrons David Almond Michael Bogdanov Sir Ben Kingsley Adrian Noble Harriet Walter Sophie Turner Notable shows His Dark Materials - Playbox were the first company, after the National, to stage Pullman's epic. It starred Olivia Meguer, Calum Finlay, Ed Miller and Tabby Lamb. Notable alumni and members Alumni include: Edmund Kingsley (son of Sir Ben Kingsley) Alice Lowe Jon Robyns Laura Wade Lil Woods Leo Bill Sophie Turner Joshua McGuire Tabby Lamb (Trans playwright and activist) References External links Playbox Theatre Company Amateur theatre companies in England Theatres in Warwickshire Warwick
The Mana Pillbox is an old World War II-era Japanese-built defensive fortification on the east coast of the island of Guam. It is located south of the village of Talofofo, about inland from the point marking the south end of As Anite Cove. It is a structure built out of coral limestone and concrete, with an interior chamber about in size. The entrance is on the south side, measuring . There is one gun port, facing north, measuring . The structure was designed to be well hidden in view from the sea and air. It was built, probably by conscripted Chamorro labor, during the Japanese occupation period 1941–44. The structure was listed on the National Register of Historic Places in 1991. See also National Register of Historic Places listings in Guam References Buildings and structures on the National Register of Historic Places in Guam World War II on the National Register of Historic Places in Guam 1940s establishments in Guam Talofofo, Guam Pillboxes (military)
Pourān Derakh'shandeh () (born 27 March 1951 in Kermanshah, Iran) is an Iranian film director, producer, screen writer, and researcher. Career Derakh'shandeh graduated in film directing in 1975 from Advanced School of Television and Cinema (مدرسه عالی تلویزیون و سینما) in Tehran. She started her professional career by making documentary films for the Kermanshah Television and subsequently for the Tehran Television. Her motion pictures include Relationship (1986), A Little Bird of Happiness (1987), Passing Through the Dust (1988), Lost Time (1989), A Love Without Frontier (1998), Candle in the Wind (2003), Wet Dream (2005), Eternal Children (2006), and Hush! Girls Don't Scream (2013). At the time she began working at NIRT and Produced “Plague”; A documentary about plague disease in Kurdistan Province. Next year, she produced a documentary about the "Last Wednesday of the Year" ceremony custom which is widespread in many parts of Iran, “End Wednesday” (1976). In 1978 she directed “Mineral Springs of Rah Haraz” and a trilogy documentary series about handicrafts in Kurdistan titled, “Moj, janamaz and sajadeh”, “Nazok kari” and “Short–napped coarse carpet”. The four-part “Synthetic and Natural Fiber” was a research documentary about thread, worsted cotton, silk and synthetic fiber. During 1979-1980, Derakhshandeh produced “The Wheels Whirl”. It examines economic and social depression and closed manufactures like Iran National. “Shokaran” focused on addiction. The 17-part documentary explores difficulties for women, men and children who are addicted to drugs, drug smuggling, and means of preventing drug abuse. The production lasted from 1980 to 1982. Memberships WIF - Women in Film. IFP - Independent Feature Project. CIFEJ - Centre international du film pour I'enfance et la jeunesse. (International Centre of Films for Children and Young People) DG of Iranian Cinema. WG of Iranian cinema. Academic experience Visual Communication, College of Social Sciences, Islamic Azad University, 1991-1999 Film Production, College of Psychology and Educational sciences, Tehran University, 1999 Derakhshandeh has also led some college research. International participation With the support of Farabi Cinema Foundation, Derakhshandeh participates at some local and international film festivals : Jury Member of Short Film International Film Festival (2011) Ava Handicap Film Festival (2011) Jury Member of International Fajr Film Festival (2011) Selection Jury International Fajr Film festival (2011) International Children Film Festival (2009) International Children Film Festival (2008) International Cosar Film Festival (2006) Select Jury member at 23rd Fajr Film Fest (2005). Third Eye 4.Asian Film Festival, Mumbai (2005). 3rd Pune International film fest (2005). 19th Isfahan INTL children Film Fest (2004). 34th Roshd INTL, Film Fest (2004). 18th Isfahan children INTL Film Fest (2003). Select Jury member at Varesh Film Fest (2003). 3rd Olympic sports and TV Film Fest (2003). IRIB collage Film Fest. Milad Koosar Documentary Film Fest. 12th Productions of provinces Film Fest (2003). Oil Film Fest (2003). Fourth Asian Film Fest in India (2001). Cairo Children Film Fest (2001). CIFEJ at 16th Isfahan INTL children Film Fest (2001). (oozra) Woman Villager Film Fest.(2000) Saabs Environment Film Fest (2000). Filmography Screenwriting Mute contact (1985) Passing through the Dust (1988) Lost Time (1988) That Night in the Train (1989) Parvin Etesami (1993–95) Love without Frontiers (1998) Candle in the Wind (2003) Wet Dream (2004) Farangis (2004) Masoume (2005) Documentary films Plague (1975) End Wednesday (1976) Gelim (1978) Revolve Gears (1978) Conium (1980) Tiger of Eshgh Valley (2001–2002) Springs of Sanghestan Valley (2001–2002) A Necklace of Dandelions for My Sister (2001–2002) Six Brides for Ameneh (2001–2002) Rasul, A Little Hercule (2001–2002) Shobo from Sunset til Sunset (2001–2002) Feature films Mute Contact (1986) A Little Bird of Happiness (1987) Passing through the Dust (1988) Lost Time (1989) A Love without Frontier (1998) Candle in the Wind (2003) Wet Dream (2005) Eternal Children (2006) Twenty (20) Produced by Pouran Derakhshandeh (2009) Endless Dream (2010) Professorials (2010) Hush! Girls Don't Scream (2013) Under the Smoky Roof (2017) Awards "Eternal Children" was elected as the best movies in "Hygiene, Safety, Health" Section Of 37th ROSHD international Film Festival Carlo Vevari International Film Festival First Prize for Twenty (20) (Producer and Director) "The Eternal Children" won six "Golden Butterfly" awards at the 21st Children and Young Adults Film Festival Sections : "The Golden Butterfly" award for the best artistic and technical film "The Golden Butterfly" award for the best director of the feature film "The Golden Butterfly" award for the best young adult artist, Ali Ahmadifar The Iranian Cinema "The Golden Butterfly" award for the best feature film (Producer & Director : Pouran Derakhshandeh ) The Children and Young Adults Jury "The Golden Butterfly " award for the best feature film Audience Award "The Golden Butterfly" award for the most welcomed Iranian film Out of Competition "Diploma of Honor" for the Best Film, awarded by Hamedan Municipality Jury Eternal Children Winner of two Crystal Simorgh awards in the 25th Fajr International Film Festival: Crystal Simorgh for Best Film Music for Mr. Kambiz Roshan Ravan Crystal Simorgh for Best Actress in a Supporting Role For Ms. Pantea Bahram Eternal Children Was Elected By Welfare Office In The Peritheral Part of The Festival A Golden Statue & Cash Prize for the best Family & Educational Movie(Wet Dream) From 36th Roshod INTL Film Fest-Tehran 2006 A Golden Statue & Cash Prize for the best Actor(Wet Dream) - Faramarz Gharibian Special Prize Of the Educational Department for Handicapped Children for "Relationship" and "Little Bird Of Happiness". A Candle in the Wind nominated in three categories. It won “Crystal simorgh” for the best leading actor, Bahram Radan, at the 22nd Fajr International Film Festival. It was also nominated in eight categories at House Cinema Film Fest. Special Mention at “Family Film” for her career. Honor diploma for “Six Brides for Ameneh” at Shahrekord “Women and Cinema” Film Fest (2002). Special Jury award from “Student and Graduates of IRIB College Film Fest” for love without—Frontier (2001). First “Golden Torch” Prize for "A Little Bird of Happiness" at Korean Film Fest (2001). Best Film "A Little Bird of Happiness" at Women's Film Fest (1992). Honor diploma and Grand Prize for "A Little Bird of Happiness" at Argentina Women's Film Fest (1988). Five awards for "A Little Bird of Happiness" at Fajr Film Fest (1987). Special mentions for “Mute Connection (Relationship)“ at Giffoney Audience Award for Best Film at 31st Fajr Film Festival - "Hush! Girls Don't Scream" (2013) Best Film Award and London Iranian Film Festival - "Hush! Girls Don't Scream"(2013) Retrospectives of Derakhshandeh's works Locarno International Film Festival (1995) Bangladesh International Film Festival (2005) Bombay International Film Festival (2005) Pune International Film Festival "India" (2005) Cinemanila International Film Festival "phelepin" (2005) Serilanka International Film Festival (2011) South Korea International Kids Film Festival (2011) Tribute to Pouran Derakhshandeh at the International Fajr Film Festival (2011) See also Iranian women List of famous Persian women List of female film directors Women's cinema References Pouran Deakhshandeh's Official Website: . External links Pouran Derakhshandeh's Official Website: — English, Persian. Iranian film directors Iranian screenwriters Persian-language film directors Writers from Tehran Iranian women film directors Women screenwriters 1951 births Living people Producers who won the Audience Choice of Best Film Crystal Simorgh
```php <?php declare(strict_types = 1); namespace Rx\Subject; use Rx\DisposableInterface; use Rx\ObserverInterface; class InnerSubscriptionDisposable implements DisposableInterface { private $observer; private $subject; public function __construct(Subject $subject, ObserverInterface $observer) { $this->subject = $subject; $this->observer = $observer; } public function dispose() { if ($this->subject->isDisposed()) { return; } if (null === $this->observer) { return; } $this->subject->removeObserver($this->observer); $this->observer = null; } } ```
```swift // // Extensions.swift // UICircularProgressRing // // Created by Luis on 2/5/19. // /** * This file includes internal extensions. */ import UIKit /// Helper extension to allow removing layer animation based on AnimationKeys enum extension CALayer { func removeAnimation(forKey key: UICircularRing.AnimationKeys) { removeAnimation(forKey: key.rawValue) } func animation(forKey key: UICircularRing.AnimationKeys) -> CAAnimation? { return animation(forKey: key.rawValue) } func value(forKey key: UICircularRing.AnimationKeys) -> Any? { return value(forKey: key.rawValue) } } /** A private extension to CGFloat in order to provide simple conversion from degrees to radians, used when drawing the rings. */ extension CGFloat { var rads: CGFloat { return self * CGFloat.pi / 180 } } /// adds simple conversion to CGFloat extension TimeInterval { var float: CGFloat { return CGFloat(self) } } /// adds simple conversion to TimeInterval extension CGFloat { var interval: TimeInterval { return TimeInterval(self) } } ```
```python # # # path_to_url # # Unless required by applicable law or agreed to in writing, software # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. import json import logging import os import re from argparse import ArgumentParser import paddle from paddle.base.log_helper import get_logger _logger = get_logger( __name__, logging.INFO, fmt='%(asctime)s-%(levelname)s: %(message)s' ) color_map = { "forward": "thread_state_running", # RGB: 126, 200, 148 "backward": "rail_idle", # RGB: 238, 142, 0 "optimizer": "rail_response", # RGB: 238, 142, 0 "default": "thread_state_unknown", # RGB: 199, 155, 125 } def parse_args(): parser = ArgumentParser() device_count = paddle.device.cuda.device_count() all_devices = ",".join([str(i) for i in range(device_count)]) parser.add_argument("--devices", type=str, default=all_devices) parser.add_argument("--log_dir", type=str, required=True) parser.add_argument("--multi_machine", action="store_true") args = parser.parse_args() return args def process_job_log(log_data, device_id, multi_machine_idx=-1): log_pattern = r'.*?Profiler Info: Job \((\d+)\), type = (\w+), micro_batch_id = (\d+), job_start_time = (\d+.\d+), job_end_time = (\d+.\d+)' matches = re.findall(log_pattern, log_data) events = [] last_end_time = None step_times = [] step_start_time = 0 step_end_time = 0 start_job_type = "" for i, match in enumerate(matches): job_id, job_type, micro_batch_id, job_start_time, job_end_time = match if job_type != "default" and start_job_type == "": start_job_type = job_type start_time = float(job_start_time.strip()) * 1000 end_time = float(job_end_time.strip()) * 1000 is_start_time_recorded = 0 if job_type == start_job_type and micro_batch_id == "0": if step_start_time != 0: step_times.append([step_start_time, step_end_time]) step_start_time = start_time step_end_time = end_time tid_name = ( "GPU" + str(device_id) if multi_machine_idx == -1 else "GPU" + str(device_id) + "(machine:" + str(multi_machine_idx) + ")" ) event_start = { "name": job_type + "_" + str(job_id), "cat": job_type, "ph": "B", "ts": start_time, "pid": 0, "tid": tid_name, } event_end = { "name": job_type + "_" + str(job_id), "cat": job_type, "ph": "E", "pid": 0, "ts": end_time, "tid": tid_name, } if job_type in color_map: event_start["cname"] = color_map[job_type] event_end["cname"] = color_map[job_type] events.append(event_start) events.append(event_end) last_end_time = end_time step_times.append([step_start_time, step_end_time]) return events, step_times def main(): args = parse_args() all_events = [] step_infos = [] start_step = 0 machine_num = 1 def process_one_machine_log(log_dir, multi_machine_idx=-1): for device_id in args.devices.split(","): _logger.info(f"Process device {device_id}") device_id = int(device_id) log_file = os.path.join(log_dir, "workerlog." + str(device_id)) with open(log_file, "r") as f: log_data = f.read() start_step_pattern = ( r'.*?Schedule Profiler start at step (\d+) and end at step.*' ) start_step_match = re.findall(start_step_pattern, log_data) start_step = ( int(start_step_match[0]) if len(start_step_match) > 0 else 0 ) events, step_times = process_job_log( log_data, device_id, multi_machine_idx ) all_events.extend(events) for i, info in enumerate(step_times): if len(step_infos) <= i: step_infos.append([float("inf"), float("-inf")]) step_infos[i][0] = min(step_infos[i][0], info[0]) step_infos[i][1] = max(step_infos[i][1], info[1]) if args.multi_machine: multi_machine_dirs = os.listdir(args.log_dir) multi_machine_dirs = [ os.path.join(args.log_dir, d) for d in multi_machine_dirs if d.startswith("machine") and os.path.isdir(os.path.join(args.log_dir, d)) ] machine_num = len(multi_machine_dirs) for i, d in enumerate(multi_machine_dirs): _logger.info(f"Process machine {i}") process_one_machine_log(d, i) else: process_one_machine_log(args.log_dir) for i, info in enumerate(step_infos): start_time = info[0] if i > 0: start_time = max(start_time, step_infos[i - 1][1]) event_start = { "name": "step" + str(i + start_step), "cat": "step", "ph": "B", "ts": start_time, "pid": 0, "tid": "Step", "cname": color_map["default"], } event_end = { "name": "step" + str(i + start_step), "cat": "step", "ph": "E", "ts": info[1], "pid": 0, "tid": "Step", "cname": color_map["default"], } all_events.append(event_start) all_events.append(event_end) save_path = os.path.join(args.log_dir, "pipeline_profile.json") with open(save_path, "w") as f: f.write(json.dumps({"traceEvents": all_events})) _logger.info(f"Save pipeline profile to {save_path}") # support Perfetto format save_path = os.path.join(args.log_dir, "pipeline_profile_perfetto.json") all_events.extend( [ { "args": {"name": "STEP"}, "cat": "__metadata", "name": "thread_name", "ph": "M", "pid": 0, "tid": 2333, "ts": 0, } ] ) for i in range(machine_num): for j in range(len(args.devices.split(","))): if machine_num > 1: name = f"GPU:{j}(machine:{i})" tid = i * len(args.devices.split(",")) + j + 2334 else: name = f"GPU:{j}" tid = j + 2334 all_events.extend( [ { "args": {"name": name}, "cat": "__metadata", "name": "thread_name", "ph": "M", "pid": 0, "tid": tid, "ts": 0, } ] ) json_str = json.dumps({"traceEvents": all_events}) json_str = json_str.replace('"Step"', '2333') for i in range(machine_num): for j in range(len(args.devices.split(","))): if machine_num > 1: json_str = json_str.replace( f'"GPU{j}(machine:{i})"', f'{i * len(args.devices.split(",")) + j + 2334}', ) else: json_str = json_str.replace(f'"GPU{j}"', f'{j + 2334}') with open(save_path, "w") as f: f.write(json_str) _logger.info(f"Save pipeline profile to {save_path}") if __name__ == "__main__": main() ```
Gulbahar Bano (born 1955) is a Pakistani ghazal singer. She started her singing career in 70s and early 80s from Radio Pakistan, Bahawalpur station. Irfan Ali, station director of radio Pakistan Bahawalpur first gave her a chance on radio and then helped her move to Karachi. She moved to Karachi in 80s and moved her focus from Kafi to ghazal singing. Later she moved to Lahore. She achieved Presidential Award for Pride of Performance in 2006. She is currently living a very vulnerable life with her brothers family in Khanqah Sharif, Bahawalpur District. She has lost senses since last few years and is not able to spend an ordinary life. Popular songs Chahat Mein Kia Dunya Dari, Ishq mai kesi Majbori - Poet: Mohsin Bhopali Hamain Jahan Mey Kya Kya Yeh Rang Dhal Gaye Raat Phir Kahan Mumkin Dard Kay Saaz Jayen Uss Gul Ke Taraf Kabhi Kabhi To Udasiyuon Ka Saman Tu Paas Bhi Ho To Toh kya ye tey hai ke ab umar bhar naheen milna Saagar roye lehrien shor machayein References External links Ghazal Queen GulBhahr Bano listen on SoundCloud Albums of Gulbahar Bano Gulbahar Bano Tracks Gulbahar Bano Interview of Gulbahar Bano Gul Bahar Bano is a famous Pakistani ghazal singer. Listen to her Songs here Gulbahar Bano on Spotify Gulbahar Bano - Pandora Radio 1963 births Living people Pakistani ghazal singers People from Bahawalpur District 20th-century Pakistani women singers 20th-century Pakistani singers
```go /* path_to_url Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ package register import ( "bytes" "fmt" "os" "testing" "k8s.io/minikube/pkg/minikube/tests" ) func TestPrintStep(t *testing.T) { Reg.SetStep(InitialSetup) expected := `{"data":{"currentstep":"0","message":"message","name":"Initial Minikube Setup","totalsteps":"%v"},"datacontenttype":"application/json","id":"random-id","source":"path_to_url","specversion":"1.0","type":"io.k8s.sigs.minikube.step"}` expected = fmt.Sprintf(expected, Reg.totalSteps()) expected += "\n" buf := bytes.NewBuffer([]byte{}) SetOutputFile(buf) defer func() { SetOutputFile(os.Stdout) }() GetUUID = func() string { return "random-id" } PrintStep("message") actual := buf.Bytes() tests.CompareJSON(t, actual, []byte(expected)) } func TestPrintInfo(t *testing.T) { expected := `{"data":{"message":"info"},"datacontenttype":"application/json","id":"random-id","source":"path_to_url","specversion":"1.0","type":"io.k8s.sigs.minikube.info"}` expected += "\n" buf := bytes.NewBuffer([]byte{}) SetOutputFile(buf) defer func() { SetOutputFile(os.Stdout) }() GetUUID = func() string { return "random-id" } PrintInfo("info") actual := buf.Bytes() tests.CompareJSON(t, actual, []byte(expected)) } func TestError(t *testing.T) { expected := `{"data":{"message":"error"},"datacontenttype":"application/json","id":"random-id","source":"path_to_url","specversion":"1.0","type":"io.k8s.sigs.minikube.error"}` expected += "\n" buf := bytes.NewBuffer([]byte{}) SetOutputFile(buf) defer func() { SetOutputFile(os.Stdout) }() GetUUID = func() string { return "random-id" } PrintError("error") actual := buf.Bytes() tests.CompareJSON(t, actual, []byte(expected)) } func TestErrorExitCode(t *testing.T) { expected := `{"data":{"a":"b","c":"d","exitcode":"5","message":"error"},"datacontenttype":"application/json","id":"random-id","source":"path_to_url","specversion":"1.0","type":"io.k8s.sigs.minikube.error"}` expected += "\n" buf := bytes.NewBuffer([]byte{}) SetOutputFile(buf) defer func() { SetOutputFile(os.Stdout) }() GetUUID = func() string { return "random-id" } PrintErrorExitCode("error", 5, map[string]string{"a": "b"}, map[string]string{"c": "d"}) actual := buf.Bytes() tests.CompareJSON(t, actual, []byte(expected)) } func TestWarning(t *testing.T) { expected := `{"data":{"message":"warning"},"datacontenttype":"application/json","id":"random-id","source":"path_to_url","specversion":"1.0","type":"io.k8s.sigs.minikube.warning"}` expected += "\n" buf := bytes.NewBuffer([]byte{}) SetOutputFile(buf) defer func() { SetOutputFile(os.Stdout) }() GetUUID = func() string { return "random-id" } PrintWarning("warning") actual := buf.Bytes() tests.CompareJSON(t, actual, []byte(expected)) } ```
```python ''' >>> p = np.poly1d([1.,2,3]) >>> p poly1d([1., 2., 3.]) >>> print(p) 2 1 x + 2 x + 3 >>> q = np.poly1d([3.,2,1]) >>> q poly1d([3., 2., 1.]) >>> print(q) 2 3 x + 2 x + 1 >>> print(np.poly1d([1.89999+2j, -3j, -5.12345678, 2+1j])) 3 2 (1.9 + 2j) x - 3j x - 5.123 x + (2 + 1j) >>> print(np.poly1d([-3, -2, -1])) 2 -3 x - 2 x - 1 >>> p(0) 3.0 >>> p(5) 38.0 >>> q(0) 1.0 >>> q(5) 86.0 >>> p * q poly1d([ 3., 8., 14., 8., 3.]) >>> p / q (poly1d([0.33333333]), poly1d([1.33333333, 2.66666667])) >>> p + q poly1d([4., 4., 4.]) >>> p - q poly1d([-2., 0., 2.]) >>> p ** 4 poly1d([ 1., 8., 36., 104., 214., 312., 324., 216., 81.]) >>> p(q) poly1d([ 9., 12., 16., 8., 6.]) >>> q(p) poly1d([ 3., 12., 32., 40., 34.]) >>> np.asarray(p) array([1., 2., 3.]) >>> len(p) 2 >>> p[0], p[1], p[2], p[3] (3.0, 2.0, 1.0, 0) >>> p.integ() poly1d([0.33333333, 1. , 3. , 0. ]) >>> p.integ(1) poly1d([0.33333333, 1. , 3. , 0. ]) >>> p.integ(5) poly1d([0.00039683, 0.00277778, 0.025 , 0. , 0. , 0. , 0. , 0. ]) >>> p.deriv() poly1d([2., 2.]) >>> p.deriv(2) poly1d([2.]) >>> q = np.poly1d([1.,2,3], variable='y') >>> print(q) 2 1 y + 2 y + 3 >>> q = np.poly1d([1.,2,3], variable='lambda') >>> print(q) 2 1 lambda + 2 lambda + 3 >>> np.polydiv(np.poly1d([1,0,-1]), np.poly1d([1,1])) (poly1d([ 1., -1.]), poly1d([0.])) ''' from __future__ import division, absolute_import, print_function import numpy as np from numpy.testing import ( assert_, assert_equal, assert_array_equal, assert_almost_equal, assert_array_almost_equal, assert_raises, rundocs ) class TestDocs(object): def test_doctests(self): return rundocs() def test_poly(self): assert_array_almost_equal(np.poly([3, -np.sqrt(2), np.sqrt(2)]), [1, -3, -2, 6]) # From matlab docs A = [[1, 2, 3], [4, 5, 6], [7, 8, 0]] assert_array_almost_equal(np.poly(A), [1, -6, -72, -27]) # Should produce real output for perfect conjugates assert_(np.isrealobj(np.poly([+1.082j, +2.613j, -2.613j, -1.082j]))) assert_(np.isrealobj(np.poly([0+1j, -0+-1j, 1+2j, 1-2j, 1.+3.5j, 1-3.5j]))) assert_(np.isrealobj(np.poly([1j, -1j, 1+2j, 1-2j, 1+3j, 1-3.j]))) assert_(np.isrealobj(np.poly([1j, -1j, 1+2j, 1-2j]))) assert_(np.isrealobj(np.poly([1j, -1j, 2j, -2j]))) assert_(np.isrealobj(np.poly([1j, -1j]))) assert_(np.isrealobj(np.poly([1, -1]))) assert_(np.iscomplexobj(np.poly([1j, -1.0000001j]))) np.random.seed(42) a = np.random.randn(100) + 1j*np.random.randn(100) assert_(np.isrealobj(np.poly(np.concatenate((a, np.conjugate(a)))))) def test_roots(self): assert_array_equal(np.roots([1, 0, 0]), [0, 0]) def test_str_leading_zeros(self): p = np.poly1d([4, 3, 2, 1]) p[3] = 0 assert_equal(str(p), " 2\n" "3 x + 2 x + 1") p = np.poly1d([1, 2]) p[0] = 0 p[1] = 0 assert_equal(str(p), " \n0") def test_polyfit(self): c = np.array([3., 2., 1.]) x = np.linspace(0, 2, 7) y = np.polyval(c, x) err = [1, -1, 1, -1, 1, -1, 1] weights = np.arange(8, 1, -1)**2/7.0 # Check exception when too few points for variance estimate. Note that # the Bayesian estimate requires the number of data points to exceed # degree + 3. assert_raises(ValueError, np.polyfit, [0, 1, 3], [0, 1, 3], deg=0, cov=True) # check 1D case m, cov = np.polyfit(x, y+err, 2, cov=True) est = [3.8571, 0.2857, 1.619] assert_almost_equal(est, m, decimal=4) val0 = [[2.9388, -5.8776, 1.6327], [-5.8776, 12.7347, -4.2449], [1.6327, -4.2449, 2.3220]] assert_almost_equal(val0, cov, decimal=4) m2, cov2 = np.polyfit(x, y+err, 2, w=weights, cov=True) assert_almost_equal([4.8927, -1.0177, 1.7768], m2, decimal=4) val = [[8.7929, -10.0103, 0.9756], [-10.0103, 13.6134, -1.8178], [0.9756, -1.8178, 0.6674]] assert_almost_equal(val, cov2, decimal=4) # check 2D (n,1) case y = y[:, np.newaxis] c = c[:, np.newaxis] assert_almost_equal(c, np.polyfit(x, y, 2)) # check 2D (n,2) case yy = np.concatenate((y, y), axis=1) cc = np.concatenate((c, c), axis=1) assert_almost_equal(cc, np.polyfit(x, yy, 2)) m, cov = np.polyfit(x, yy + np.array(err)[:, np.newaxis], 2, cov=True) assert_almost_equal(est, m[:, 0], decimal=4) assert_almost_equal(est, m[:, 1], decimal=4) assert_almost_equal(val0, cov[:, :, 0], decimal=4) assert_almost_equal(val0, cov[:, :, 1], decimal=4) def test_objects(self): from decimal import Decimal p = np.poly1d([Decimal('4.0'), Decimal('3.0'), Decimal('2.0')]) p2 = p * Decimal('1.333333333333333') assert_(p2[1] == Decimal("3.9999999999999990")) p2 = p.deriv() assert_(p2[1] == Decimal('8.0')) p2 = p.integ() assert_(p2[3] == Decimal("1.333333333333333333333333333")) assert_(p2[2] == Decimal('1.5')) assert_(np.issubdtype(p2.coeffs.dtype, np.object_)) p = np.poly([Decimal(1), Decimal(2)]) assert_equal(np.poly([Decimal(1), Decimal(2)]), [1, Decimal(-3), Decimal(2)]) def test_complex(self): p = np.poly1d([3j, 2j, 1j]) p2 = p.integ() assert_((p2.coeffs == [1j, 1j, 1j, 0]).all()) p2 = p.deriv() assert_((p2.coeffs == [6j, 2j]).all()) def test_integ_coeffs(self): p = np.poly1d([3, 2, 1]) p2 = p.integ(3, k=[9, 7, 6]) assert_( (p2.coeffs == [1/4./5., 1/3./4., 1/2./3., 9/1./2., 7, 6]).all()) def test_zero_dims(self): try: np.poly(np.zeros((0, 0))) except ValueError: pass def test_poly_int_overflow(self): """ Regression test for gh-5096. """ v = np.arange(1, 21) assert_almost_equal(np.poly(v), np.poly(np.diag(v))) def test_poly_eq(self): p = np.poly1d([1, 2, 3]) p2 = np.poly1d([1, 2, 4]) assert_equal(p == None, False) assert_equal(p != None, True) assert_equal(p == p, True) assert_equal(p == p2, False) assert_equal(p != p2, True) def test_polydiv(self): b = np.poly1d([2, 6, 6, 1]) a = np.poly1d([-1j, (1+2j), -(2+1j), 1]) q, r = np.polydiv(b, a) assert_equal(q.coeffs.dtype, np.complex128) assert_equal(r.coeffs.dtype, np.complex128) assert_equal(q*a + r, b) def test_poly_coeffs_immutable(self): """ Coefficients should not be modifiable """ p = np.poly1d([1, 2, 3]) try: # despite throwing an exception, this used to change state p.coeffs += 1 except Exception: pass assert_equal(p.coeffs, [1, 2, 3]) p.coeffs[2] += 10 assert_equal(p.coeffs, [1, 2, 3]) ```
```objective-c // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef V8_FAST_ACCESSOR_ASSEMBLER_H_ #define V8_FAST_ACCESSOR_ASSEMBLER_H_ #include <stdint.h> #include <memory> #include <vector> #include "include/v8-experimental.h" #include "src/base/macros.h" #include "src/handles.h" namespace v8 { namespace internal { class Code; class CodeStubAssembler; class Isolate; class Zone; namespace compiler { class Node; class CodeAssemblerLabel; class CodeAssemblerState; class CodeAssemblerVariable; } // This interface "exports" an aggregated subset of RawMachineAssembler, for // use by the API to implement Fast Dom Accessors. // // This interface is made for this single purpose only and does not attempt // to implement a general purpose solution. If you need one, please look at // RawMachineAssembler instead. // // The life cycle of a FastAccessorAssembler has two phases: // - After creating the instance, you can call an arbitrary sequence of // builder functions to build the desired function. // - When done, you can Build() the accessor and query for the build results. // // You cannot call any result getters before Build() was called & successful; // and you cannot call any builder functions after Build() was called. class FastAccessorAssembler { public: typedef v8::experimental::FastAccessorBuilder::ValueId ValueId; typedef v8::experimental::FastAccessorBuilder::LabelId LabelId; typedef v8::FunctionCallback FunctionCallback; explicit FastAccessorAssembler(Isolate* isolate); ~FastAccessorAssembler(); // Builder / assembler functions: ValueId IntegerConstant(int int_constant); ValueId GetReceiver(); ValueId LoadInternalField(ValueId value_id, int field_no); // Loads internal field and assumes the object is indeed a valid API object // with the proper internal fields present. // The intended use is to call this on an object whose structure has already // been checked previously, e.g. the accessor's receiver, which is map-checked // before the fast accessor is called on it. Using this on an arbitrary object // will result in unsafe memory accesses. ValueId LoadInternalFieldUnchecked(ValueId value_id, int field_no); ValueId LoadValue(ValueId value_id, int offset); ValueId LoadObject(ValueId value_id, int offset); // Converts a machine integer to a SMI. ValueId ToSmi(ValueId value_id); // Builder / assembler functions for control flow. void ReturnValue(ValueId value_id); void CheckFlagSetOrReturnNull(ValueId value_id, int mask); void CheckNotZeroOrReturnNull(ValueId value_id); LabelId MakeLabel(); void SetLabel(LabelId label_id); void Goto(LabelId label_id); void CheckNotZeroOrJump(ValueId value_id, LabelId label_id); // C++ callback. ValueId Call(FunctionCallback callback, ValueId arg); // Assemble the code. MaybeHandle<Code> Build(); private: ValueId FromRaw(compiler::Node* node); LabelId FromRaw(compiler::CodeAssemblerLabel* label); compiler::Node* FromId(ValueId value) const; compiler::CodeAssemblerLabel* FromId(LabelId value) const; void CheckIsJSObjectOrJump(ValueId value, LabelId label_id); void Clear(); Zone* zone() { return &zone_; } Isolate* isolate() const { return isolate_; } Zone zone_; Isolate* isolate_; std::unique_ptr<compiler::CodeAssemblerState> assembler_state_; std::unique_ptr<CodeStubAssembler> assembler_; // To prevent exposing the RMA internals to the outside world, we'll map // Node + Label pointers integers wrapped in ValueId and LabelId instances. // These vectors maintain this mapping. std::vector<compiler::Node*> nodes_; std::vector<compiler::CodeAssemblerLabel*> labels_; // Remember the current state for easy error checking. (We prefer to be // strict as this class will be exposed at the API.) enum { kBuilding, kBuilt, kError } state_; DISALLOW_COPY_AND_ASSIGN(FastAccessorAssembler); }; } // namespace internal } // namespace v8 #endif // V8_FAST_ACCESSOR_ASSEMBLER_H_ ```
```java /* * one or more contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright ownership. */ package io.camunda.zeebe.snapshots; import java.io.IOException; import java.nio.file.Path; import java.util.Map; public interface RestorableSnapshotStore { /** * Restores the snapshot by moving the snapshotFiles to the snapshotDirectory. * * <p>WARN. Implementation of this method can be not thread safe. * * @param snapshotId * @param snapshotFiles * @throws IOException */ void restore(String snapshotId, Map<String, Path> snapshotFiles) throws IOException; } ```
Arthur Robert Hoyle (1922 – 2 May 2012) was an Australian historian and biographer. Born in Sydney, New South Wales, Australia, in 1922 to Arthur Hoyle (1896–1971) and Gertrude Underwood (1895–1972), he served in the Royal Air Force as a navigator during World War II with 460 Squadron and was awarded the Distinguished Flying Cross. Hoyle returned to Australia and married Moira Peisley (1924–1998). He had four sons, Arthur Marshall Hoyle Phillip, Warwick and Andrew (dec). He served in the Australian Public Service and later taught Administration at the University of Canberra. He held the degrees of BA (Hons) and Dip Ed (University of Sydney) and M.SocSci (University of Birmingham). He is best known for his biographies. He died on 2 May 2012 at Calvary Retirement Community Canberra. Biographies King O'Malley: The American Bounder, A. R. Hoyle, Macmillan, Melbourne, 1981 Roderick Flanagan: A bright flame too soon extinguished, A. R. Hoyle, SP, Canberra, 1988 Into the Darkness: A personal memoir (Autobiography), A.R. Hoyle, SP, Canberra, 1989 Eddie Ward: The Truest Labor Man, A. R. Hoyle, SP, Canberra, 1994 The Life of John Hunter: Navigator, Governor, Admiral, A. R. Hoyle, Mulini Press, Canberra, 2001 Hughie Edwards VC: The Fortunate Airman, A. R. Hoyle, Mulini Press, Canberra, 2001 Autobiography Into the Darkness – One Young Australian's Journey from Sydney to the deadly skies over Germany 1939–1945 by Arthur Hoyle, DFC, Edited by David Vernon, Stringybark Publishing, Canberra, 2012, References External links Hughie Edwards Review Bibliography at the National Library of Australia Australian War Memorial 1922 births Australian historians Australian biographers Male biographers 2012 deaths Royal Air Force personnel of World War II Australian expatriates in England
```ruby class AddIndicesForReports < ActiveRecord::Migration[5.1] def change add_index :feedback_messages, [:reporter_id] add_index :feedback_messages, [:affected_id] add_index :feedback_messages, [:offender_id] end end ```
```go /* path_to_url Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ package mockec2 import ( "context" "fmt" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/service/ec2" ec2types "github.com/aws/aws-sdk-go-v2/service/ec2/types" "k8s.io/klog/v2" "k8s.io/kops/pkg/pki" ) func (m *MockEC2) ImportKeyPair(ctx context.Context, request *ec2.ImportKeyPairInput, optFns ...func(*ec2.Options)) (*ec2.ImportKeyPairOutput, error) { m.mutex.Lock() defer m.mutex.Unlock() klog.Infof("ImportKeyPair: %v", request) fp, err := pki.ComputeAWSKeyFingerprint(string(request.PublicKeyMaterial)) if err != nil { return nil, err } n := len(m.KeyPairs) + 1 id := fmt.Sprintf("key-%d", n) kp := &ec2types.KeyPairInfo{ KeyFingerprint: aws.String(fp), KeyName: request.KeyName, KeyPairId: aws.String(id), } if m.KeyPairs == nil { m.KeyPairs = make(map[string]*ec2types.KeyPairInfo) } m.KeyPairs[id] = kp response := &ec2.ImportKeyPairOutput{ KeyFingerprint: kp.KeyFingerprint, KeyName: kp.KeyName, } m.addTags(id, tagSpecificationsToTags(request.TagSpecifications, ec2types.ResourceTypeKeyPair)...) return response, nil } func (m *MockEC2) DescribeKeyPairs(ctx context.Context, request *ec2.DescribeKeyPairsInput, optFns ...func(*ec2.Options)) (*ec2.DescribeKeyPairsOutput, error) { m.mutex.Lock() defer m.mutex.Unlock() klog.Infof("DescribeKeyPairs: %v", request) var keypairs []ec2types.KeyPairInfo for _, keypair := range m.KeyPairs { allFiltersMatch := true if len(request.KeyNames) != 0 { match := false for _, keyname := range request.KeyNames { if keyname == aws.ToString(keypair.KeyName) { match = true } } if !match { allFiltersMatch = false } } for _, filter := range request.Filters { match := false switch *filter.Name { case "key-name": for _, v := range filter.Values { if aws.ToString(keypair.KeyName) == v { match = true } } default: return nil, fmt.Errorf("unknown filter name: %q", *filter.Name) } if !match { allFiltersMatch = false break } } if !allFiltersMatch { continue } copy := *keypair copy.Tags = m.getTags(ec2types.ResourceTypeKeyPair, *copy.KeyPairId) keypairs = append(keypairs, copy) } response := &ec2.DescribeKeyPairsOutput{ KeyPairs: keypairs, } return response, nil } func (m *MockEC2) DeleteKeyPair(ctx context.Context, request *ec2.DeleteKeyPairInput, optFns ...func(*ec2.Options)) (*ec2.DeleteKeyPairOutput, error) { m.mutex.Lock() defer m.mutex.Unlock() klog.Infof("DeleteKeyPair: %v", request) keyID := aws.ToString(request.KeyPairId) found := false for id, kp := range m.KeyPairs { if aws.ToString(kp.KeyPairId) == keyID { found = true delete(m.KeyPairs, id) } } if !found { return nil, fmt.Errorf("KeyPairs %q not found", keyID) } return &ec2.DeleteKeyPairOutput{}, nil } ```
```php <?php /* * * File ini bagian dari: * * OpenSID * * Sistem informasi desa sumber terbuka untuk memajukan desa * * Aplikasi dan source code ini dirilis berdasarkan lisensi GPL V3 * * Hak Cipta 2009 - 2015 Combine Resource Institution (path_to_url * Hak Cipta 2016 - 2024 Perkumpulan Desa Digital Terbuka (path_to_url * * Dengan ini diberikan izin, secara gratis, kepada siapa pun yang mendapatkan salinan * dari perangkat lunak ini dan file dokumentasi terkait ("Aplikasi Ini"), untuk diperlakukan * tanpa batasan, termasuk hak untuk menggunakan, menyalin, mengubah dan/atau mendistribusikan, * asal tunduk pada syarat berikut: * * Pemberitahuan hak cipta di atas dan pemberitahuan izin ini harus disertakan dalam * setiap salinan atau bagian penting Aplikasi Ini. Barang siapa yang menghapus atau menghilangkan * pemberitahuan ini melanggar ketentuan lisensi Aplikasi Ini. * * PERANGKAT LUNAK INI DISEDIAKAN "SEBAGAIMANA ADANYA", TANPA JAMINAN APA PUN, BAIK TERSURAT MAUPUN * TERSIRAT. PENULIS ATAU PEMEGANG HAK CIPTA SAMA SEKALI TIDAK BERTANGGUNG JAWAB ATAS KLAIM, KERUSAKAN ATAU * KEWAJIBAN APAPUN ATAS PENGGUNAAN ATAU LAINNYA TERKAIT APLIKASI INI. * * @package OpenSID * @author Tim Pengembang OpenDesa * @copyright Hak Cipta 2009 - 2015 Combine Resource Institution (path_to_url * @copyright Hak Cipta 2016 - 2024 Perkumpulan Desa Digital Terbuka (path_to_url * @license path_to_url GPL V3 * @link path_to_url * */ namespace App\Models; defined('BASEPATH') || exit('No direct script access allowed'); class Cacat extends BaseModel { /** * {@inheritDoc} */ protected $table = 'tweb_cacat'; } ```
Seolheulsan is a mountain of Gyeongsangnam-do, southeastern South Korea. It has an altitude of 488 metres. See also List of mountains of Korea References Mountains of South Korea Mountains of South Gyeongsang Province
The Journal of International Security Affairs is an American electronic journal on international relations and U.S. foreign and defense policy published twice annually by the Jewish Institute for National Security Affairs. It was established in 2001 and its editor-in-chief is Ilan Berman (American Foreign Policy Council). Notable members of its editorial board include John Bolton, former UN Ambassador and U.S. National Security Advisor, and the late Major General Sidney Schachnow. The headquarters of the Journal of International Security Affairs is in Washington, D.C. References External links Biannual magazines published in the United States English-language magazines Free magazines Jewish magazines published in the United States Magazines established in 2001 Magazines published in Washington, D.C. Political magazines published in the United States
```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 arraylike2object = require( '@stdlib/array/base/arraylike2object' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); // FUNCTIONS // /** * Tests whether an object has a specified method. * * @private * @param {Object} obj - input object * @param {string} method - method name * @returns {boolean} boolean indicating whether an object has a specified method * * @example * var bool = hasMethod( [], 'indexOf' ); * // returns true * * @example * var bool = hasMethod( [], 'beep' ); * // returns false */ function hasMethod( obj, method ) { return ( typeof obj[ method ] === 'function' ); } /** * Returns the index of the first element which equals a provided search element. * * @private * @param {Collection} x - input array * @param {*} searchElement - search element * @param {NonNegativeInteger} fromIndex - starting index (inclusive) * @param {boolean} equalNaNs - boolean indicating whether NaNs should be considered equal * @returns {integer} index * * @example * var x = [ 1, 2, 3, 4 ]; * * var idx = internal( x, 2, 0, false ); * // returns 1 */ function internal( x, searchElement, fromIndex, equalNaNs ) { var i; if ( equalNaNs && isnan( searchElement ) ) { for ( i = fromIndex; i < x.length; i++ ) { if ( isnan( x[ i ] ) ) { return i; } } return -1; } for ( i = fromIndex; i < x.length; i++ ) { if ( searchElement === x[ i ] ) { return i; } } return -1; } /** * Returns the index of the first element which equals a provided search element. * * @private * @param {Object} x - input array object * @param {*} searchElement - search element * @param {NonNegativeInteger} fromIndex - starting index (inclusive) * @param {boolean} equalNaNs - boolean indicating whether NaNs should be considered equal * @returns {integer} index * * @example * var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' ); * var arraylike2object = require( '@stdlib/array/base/arraylike2object' ); * * var x = arraylike2object( toAccessorArray( [ 1, 2, 3, 4 ] ) ); * * var idx = accessors( x, 2, 0, false ); * // returns 1 */ function accessors( x, searchElement, fromIndex, equalNaNs ) { var data; var get; var i; data = x.data; get = x.accessors[ 0 ]; if ( equalNaNs && isnan( searchElement ) ) { for ( i = fromIndex; i < data.length; i++ ) { if ( isnan( get( data, i ) ) ) { return i; } } return -1; } for ( i = fromIndex; i < data.length; i++ ) { if ( searchElement === get( data, i ) ) { return i; } } return -1; } // MAIN // /** * Returns the index of the first element which equals a provided search element. * * ## Notes * * - If unable to find an element which equals a provided search element, the function returns `-1`. * * @param {Collection} x - input array * @param {*} searchElement - search element * @param {integer} fromIndex - starting index (inclusive) * @param {boolean} equalNaNs - boolean indicating whether NaNs should be considered equal * @returns {integer} index * * @example * var x = [ 1, 2, 3, 4 ]; * * var idx = indexOf( x, 2, 0, false ); * // returns 1 * * @example * var Int32Array = require( '@stdlib/array/int32' ); * * var x = new Int32Array( [ 1, 2, 3, 4 ] ); * * var idx = indexOf( x, 2, 0, false ); * // returns 1 */ function indexOf( x, searchElement, fromIndex, equalNaNs ) { var obj; if ( hasMethod( x, 'indexOf' ) && equalNaNs === false ) { return x.indexOf( searchElement, fromIndex ); } if ( fromIndex < 0 ) { fromIndex += x.length; if ( fromIndex < 0 ) { fromIndex = 0; } } obj = arraylike2object( x ); if ( obj.accessorProtocol ) { return accessors( obj, searchElement, fromIndex, equalNaNs ); } return internal( x, searchElement, fromIndex, equalNaNs ); } // EXPORTS // module.exports = indexOf; ```
```ruby # encoding: utf-16be puts 'hello' ```
```javascript !function(a){a.fn.datepicker.dates.ja={days:["","","","","","",""],daysShort:["","","","","","",""],daysMin:["","","","","","",""],months:["1","2","3","4","5","6","7","8","9","10","11","12"],monthsShort:["1","2","3","4","5","6","7","8","9","10","11","12"],today:"",format:"yyyy/mm/dd",titleFormat:"yyyymm",clear:""}}(jQuery); ```