text
stringlengths
1
22.8M
```nix { description = "Immutable data structures"; inputs = { nixpkgs.url = github:NixOS/nixpkgs/nixpkgs-unstable; flake-utils.url = "github:numtide/flake-utils"; flake-compat = { url = "github:edolstra/flake-compat"; flake = false; }; gitignore = { url = "github:hercules-ci/gitignore.nix"; inputs.nixpkgs.follows = "nixpkgs"; }; pre-commit-hooks = { url = "github:cachix/pre-commit-hooks.nix"; inputs = { flake-compat.follows = "flake-compat"; flake-utils.follows = "flake-utils"; gitignore.follows = "gitignore"; nixpkgs.follows = "nixpkgs"; }; }; }; outputs = { self, nixpkgs, flake-utils, flake-compat, pre-commit-hooks, gitignore, }: flake-utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages.${system}; withLLVM = drv: if pkgs.stdenv.isLinux # Use LLVM for Linux to build fuzzers then drv.override {stdenv = pkgs.llvmPackages_latest.stdenv;} # macOS uses LLVM by default else drv; in { checks = { pre-commit-check = pre-commit-hooks.lib.${system}.run { src = ./.; hooks = { alejandra.enable = true; }; }; inherit (self.packages.${system}) unit-tests fuzzers-debug; } // pkgs.lib.optionalAttrs pkgs.stdenv.isLinux { unit-tests-valgrind = self.packages.${system}.unit-tests.overrideAttrs (prev: { nativeBuildInputs = with pkgs; prev.nativeBuildInputs ++ [valgrind]; name = "immer-unit-tests-valgrind"; ninjaFlags = ["tests"]; checkPhase = '' ctest -D ExperimentalMemCheck ''; }); }; devShells.default = (withLLVM pkgs.mkShell) { NIX_HARDENING_ENABLE = ""; inputsFrom = [ (import ./shell.nix { inherit system nixpkgs; }) ]; packages = [ # for the llvm-symbolizer binary, that allows to show stacks in ASAN and LeakSanitizer. pkgs.llvmPackages_latest.bintools-unwrapped ]; shellHook = self.checks.${system}.pre-commit-check.shellHook; }; packages = { immer = let inherit (gitignore.lib) gitignoreSource; nixFilter = name: type: !(pkgs.lib.hasSuffix ".nix" name); srcFilter = src: pkgs.lib.cleanSourceWith { filter = nixFilter; src = gitignoreSource src; }; in pkgs.callPackage nix/immer.nix {src = srcFilter ./.;}; default = self.packages.${system}.immer; fuzzers-debug = (withLLVM self.packages.${system}.immer).overrideAttrs (prev: { name = "immer-fuzzers"; # Fuzzers should be built with minimal dependencies to use them easily with OSS-Fuzz buildInputs = with pkgs; [boehmgc]; nativeBuildInputs = with pkgs; [cmake ninja]; dontBuild = false; dontStrip = true; # fuzzers target is not built by default ninjaFlags = ["fuzzers"]; cmakeBuildType = "Debug"; cmakeFlags = [ "-DENABLE_ASAN=ON" "-Dimmer_BUILD_TESTS=OFF" "-Dimmer_INSTALL_FUZZERS=ON" ]; }); unit-tests = (withLLVM self.packages.${system}.immer).overrideAttrs (prev: { name = "immer-unit-tests"; buildInputs = with pkgs; [catch2_3 boehmgc boost fmt]; nativeBuildInputs = with pkgs; [cmake ninja]; dontBuild = false; doCheck = true; # Building fuzzers but not running them, just to ensure they compile ninjaFlags = ["fuzzers tests"]; checkPhase = '' ninja test ''; cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Debug" "-Dimmer_BUILD_TESTS=ON" "-Dimmer_BUILD_EXAMPLES=OFF" ]; }); }; }); } ```
```python # Owner(s): ["oncall: package/deploy"] import torch try: from torchvision.models import resnet18 class TorchVisionTest(torch.nn.Module): def __init__(self) -> None: super().__init__() self.tvmod = resnet18() def forward(self, x): x = a_non_torch_leaf(x, x) return torch.relu(x + 3.0) except ImportError: pass def a_non_torch_leaf(a, b): return a + b ```
```yaml apiVersion: apps/v1 kind: Deployment metadata: name: traffic spec: replicas: 7 selector: matchLabels: app: traffic template: metadata: labels: app: traffic spec: containers: - name: traffic image: "fake.docker.io/google-samples/traffic-go-gke:1.0" ports: - name: http containerPort: 80 ```
```python """Xonsh color styling tools that simulate pygments, when it is unavailable.""" import builtins from collections import defaultdict from xonsh.platform import HAS_PYGMENTS from xonsh.lazyasd import LazyObject from xonsh.color_tools import RE_BACKGROUND from xonsh.tools import FORMATTER class _TokenType(tuple): """ Forked from the pygments project path_to_url See path_to_url """ parent = None def split(self): buf = [] node = self while node is not None: buf.append(node) node = node.parent buf.reverse() return buf def __init__(self, *args): # no need to call super.__init__ self.subtypes = set() def __contains__(self, val): return self is val or (type(val) is self.__class__ and val[: len(self)] == self) def __getattr__(self, val): if not val or not val[0].isupper(): return tuple.__getattribute__(self, val) new = _TokenType(self + (val,)) setattr(self, val, new) self.subtypes.add(new) new.parent = self return new def __repr__(self): return "Token" + (self and "." or "") + ".".join(self) def __copy__(self): # These instances are supposed to be singletons return self def __deepcopy__(self, memo): # These instances are supposed to be singletons return self Token = _TokenType() Color = Token.Color def partial_color_tokenize(template): """Tokenizes a template string containing colors. Will return a list of tuples mapping the token to the string which has that color. These sub-strings maybe templates themselves. """ if HAS_PYGMENTS and builtins.__xonsh__.shell is not None: styles = __xonsh__.shell.shell.styler.styles elif builtins.__xonsh__.shell is not None: styles = DEFAULT_STYLE_DICT else: styles = None color = Color.NO_COLOR try: toks, color = _partial_color_tokenize_main(template, styles) except Exception: toks = [(Color.NO_COLOR, template)] if styles is not None: styles[color] # ensure color is available return toks def _partial_color_tokenize_main(template, styles): bopen = "{" bclose = "}" colon = ":" expl = "!" color = Color.NO_COLOR fg = bg = None value = "" toks = [] for literal, field, spec, conv in FORMATTER.parse(template): if field is None: value += literal elif field in KNOWN_COLORS or "#" in field: value += literal next_color, fg, bg = color_by_name(field, fg, bg) if next_color is not color: if len(value) > 0: toks.append((color, value)) if styles is not None: styles[color] # ensure color is available color = next_color value = "" elif field is not None: parts = [literal, bopen, field] if conv is not None and len(conv) > 0: parts.append(expl) parts.append(conv) if spec is not None and len(spec) > 0: parts.append(colon) parts.append(spec) parts.append(bclose) value += "".join(parts) else: value += literal toks.append((color, value)) return toks, color def color_by_name(name, fg=None, bg=None): """Converts a color name to a color token, foreground name, and background name. Will take into consideration current foreground and background colors, if provided. Parameters ---------- name : str Color name. fg : str, optional Foreground color name. bg : str, optional Background color name. Returns ------- tok : Token Pygments Token.Color subclass fg : str or None New computed foreground color name. bg : str or None New computed background color name. """ name = name.upper() if name == "NO_COLOR": return Color.NO_COLOR, None, None m = RE_BACKGROUND.search(name) if m is None: # must be foreground color fg = norm_name(name) else: bg = norm_name(name) # assemble token if fg is None and bg is None: tokname = "NO_COLOR" elif fg is None: tokname = bg elif bg is None: tokname = fg else: tokname = fg + "__" + bg tok = getattr(Color, tokname) return tok, fg, bg def norm_name(name): """Normalizes a color name.""" return name.replace("#", "HEX").replace("BGHEX", "BACKGROUND_HEX") KNOWN_COLORS = LazyObject( lambda: frozenset( [ "BACKGROUND_BLACK", "BACKGROUND_BLUE", "BACKGROUND_CYAN", "BACKGROUND_GREEN", "BACKGROUND_INTENSE_BLACK", "BACKGROUND_INTENSE_BLUE", "BACKGROUND_INTENSE_CYAN", "BACKGROUND_INTENSE_GREEN", "BACKGROUND_INTENSE_PURPLE", "BACKGROUND_INTENSE_RED", "BACKGROUND_INTENSE_WHITE", "BACKGROUND_INTENSE_YELLOW", "BACKGROUND_PURPLE", "BACKGROUND_RED", "BACKGROUND_WHITE", "BACKGROUND_YELLOW", "BLACK", "BLUE", "BOLD_BLACK", "BOLD_BLUE", "BOLD_CYAN", "BOLD_GREEN", "BOLD_INTENSE_BLACK", "BOLD_INTENSE_BLUE", "BOLD_INTENSE_CYAN", "BOLD_INTENSE_GREEN", "BOLD_INTENSE_PURPLE", "BOLD_INTENSE_RED", "BOLD_INTENSE_WHITE", "BOLD_INTENSE_YELLOW", "BOLD_PURPLE", "BOLD_RED", "BOLD_UNDERLINE_BLACK", "BOLD_UNDERLINE_BLUE", "BOLD_UNDERLINE_CYAN", "BOLD_UNDERLINE_GREEN", "BOLD_UNDERLINE_INTENSE_BLACK", "BOLD_UNDERLINE_INTENSE_BLUE", "BOLD_UNDERLINE_INTENSE_CYAN", "BOLD_UNDERLINE_INTENSE_GREEN", "BOLD_UNDERLINE_INTENSE_PURPLE", "BOLD_UNDERLINE_INTENSE_RED", "BOLD_UNDERLINE_INTENSE_WHITE", "BOLD_UNDERLINE_INTENSE_YELLOW", "BOLD_UNDERLINE_PURPLE", "BOLD_UNDERLINE_RED", "BOLD_UNDERLINE_WHITE", "BOLD_UNDERLINE_YELLOW", "BOLD_WHITE", "BOLD_YELLOW", "CYAN", "GREEN", "INTENSE_BLACK", "INTENSE_BLUE", "INTENSE_CYAN", "INTENSE_GREEN", "INTENSE_PURPLE", "INTENSE_RED", "INTENSE_WHITE", "INTENSE_YELLOW", "NO_COLOR", "PURPLE", "RED", "UNDERLINE_BLACK", "UNDERLINE_BLUE", "UNDERLINE_CYAN", "UNDERLINE_GREEN", "UNDERLINE_INTENSE_BLACK", "UNDERLINE_INTENSE_BLUE", "UNDERLINE_INTENSE_CYAN", "UNDERLINE_INTENSE_GREEN", "UNDERLINE_INTENSE_PURPLE", "UNDERLINE_INTENSE_RED", "UNDERLINE_INTENSE_WHITE", "UNDERLINE_INTENSE_YELLOW", "UNDERLINE_PURPLE", "UNDERLINE_RED", "UNDERLINE_WHITE", "UNDERLINE_YELLOW", "WHITE", "YELLOW", ] ), globals(), "KNOWN_COLORS", ) DEFAULT_STYLE_DICT = LazyObject( lambda: defaultdict( lambda: "", { Token: "", Token.Aborted: "ansibrightblack", Token.AutoSuggestion: "ansibrightblack", Token.Color.BACKGROUND_BLACK: "bg:ansiblack", Token.Color.BACKGROUND_BLUE: "bg:ansiblue", Token.Color.BACKGROUND_CYAN: "bg:ansicyan", Token.Color.BACKGROUND_GREEN: "bg:ansigreen", Token.Color.BACKGROUND_INTENSE_BLACK: "bg:ansibrightblack", Token.Color.BACKGROUND_INTENSE_BLUE: "bg:ansibrightblue", Token.Color.BACKGROUND_INTENSE_CYAN: "bg:ansibrightcyan", Token.Color.BACKGROUND_INTENSE_GREEN: "bg:ansibrightgreen", Token.Color.BACKGROUND_INTENSE_PURPLE: "bg:ansibrightmagenta", Token.Color.BACKGROUND_INTENSE_RED: "bg:ansibrightred", Token.Color.BACKGROUND_INTENSE_WHITE: "bg:ansiwhite", Token.Color.BACKGROUND_INTENSE_YELLOW: "bg:ansibrightyellow", Token.Color.BACKGROUND_PURPLE: "bg:ansimagenta", Token.Color.BACKGROUND_RED: "bg:ansired", Token.Color.BACKGROUND_WHITE: "bg:ansigray", Token.Color.BACKGROUND_YELLOW: "bg:ansiyellow", Token.Color.BLACK: "ansiblack", Token.Color.BLUE: "ansiblue", Token.Color.BOLD_BLACK: "bold ansiblack", Token.Color.BOLD_BLUE: "bold ansiblue", Token.Color.BOLD_CYAN: "bold ansicyan", Token.Color.BOLD_GREEN: "bold ansigreen", Token.Color.BOLD_INTENSE_BLACK: "bold ansibrightblack", Token.Color.BOLD_INTENSE_BLUE: "bold ansibrightblue", Token.Color.BOLD_INTENSE_CYAN: "bold ansibrightcyan", Token.Color.BOLD_INTENSE_GREEN: "bold ansibrightgreen", Token.Color.BOLD_INTENSE_PURPLE: "bold ansibrightmagenta", Token.Color.BOLD_INTENSE_RED: "bold ansibrightred", Token.Color.BOLD_INTENSE_WHITE: "bold ansiwhite", Token.Color.BOLD_INTENSE_YELLOW: "bold ansibrightyellow", Token.Color.BOLD_PURPLE: "bold ansimagenta", Token.Color.BOLD_RED: "bold ansired", Token.Color.BOLD_UNDERLINE_BLACK: "bold underline ansiblack", Token.Color.BOLD_UNDERLINE_BLUE: "bold underline ansiblue", Token.Color.BOLD_UNDERLINE_CYAN: "bold underline ansicyan", Token.Color.BOLD_UNDERLINE_GREEN: "bold underline ansigreen", Token.Color.BOLD_UNDERLINE_INTENSE_BLACK: "bold underline ansibrightblack", Token.Color.BOLD_UNDERLINE_INTENSE_BLUE: "bold underline ansibrightblue", Token.Color.BOLD_UNDERLINE_INTENSE_CYAN: "bold underline ansibrightcyan", Token.Color.BOLD_UNDERLINE_INTENSE_GREEN: "bold underline ansibrightgreen", Token.Color.BOLD_UNDERLINE_INTENSE_PURPLE: "bold underline ansibrightmagenta", Token.Color.BOLD_UNDERLINE_INTENSE_RED: "bold underline ansibrightred", Token.Color.BOLD_UNDERLINE_INTENSE_WHITE: "bold underline ansiwhite", Token.Color.BOLD_UNDERLINE_INTENSE_YELLOW: "bold underline ansibrightyellow", Token.Color.BOLD_UNDERLINE_PURPLE: "bold underline ansimagenta", Token.Color.BOLD_UNDERLINE_RED: "bold underline ansired", Token.Color.BOLD_UNDERLINE_WHITE: "bold underline ansigray", Token.Color.BOLD_UNDERLINE_YELLOW: "bold underline ansiyellow", Token.Color.BOLD_WHITE: "bold ansigray", Token.Color.BOLD_YELLOW: "bold ansiyellow", Token.Color.CYAN: "ansicyan", Token.Color.GREEN: "ansigreen", Token.Color.INTENSE_BLACK: "ansibrightblack", Token.Color.INTENSE_BLUE: "ansibrightblue", Token.Color.INTENSE_CYAN: "ansibrightcyan", Token.Color.INTENSE_GREEN: "ansibrightgreen", Token.Color.INTENSE_PURPLE: "ansibrightmagenta", Token.Color.INTENSE_RED: "ansibrightred", Token.Color.INTENSE_WHITE: "ansiwhite", Token.Color.INTENSE_YELLOW: "ansibrightyellow", Token.Color.NO_COLOR: "noinherit", Token.Color.PURPLE: "ansimagenta", Token.Color.RED: "ansired", Token.Color.UNDERLINE_BLACK: "underline ansiblack", Token.Color.UNDERLINE_BLUE: "underline ansiblue", Token.Color.UNDERLINE_CYAN: "underline ansicyan", Token.Color.UNDERLINE_GREEN: "underline ansigreen", Token.Color.UNDERLINE_INTENSE_BLACK: "underline ansibrightblack", Token.Color.UNDERLINE_INTENSE_BLUE: "underline ansibrightblue", Token.Color.UNDERLINE_INTENSE_CYAN: "underline ansibrightcyan", Token.Color.UNDERLINE_INTENSE_GREEN: "underline ansibrightgreen", Token.Color.UNDERLINE_INTENSE_PURPLE: "underline ansibrightmagenta", Token.Color.UNDERLINE_INTENSE_RED: "underline ansibrightred", Token.Color.UNDERLINE_INTENSE_WHITE: "underline ansiwhite", Token.Color.UNDERLINE_INTENSE_YELLOW: "underline ansibrightyellow", Token.Color.UNDERLINE_PURPLE: "underline ansimagenta", Token.Color.UNDERLINE_RED: "underline ansired", Token.Color.UNDERLINE_WHITE: "underline ansigray", Token.Color.UNDERLINE_YELLOW: "underline ansiyellow", Token.Color.WHITE: "ansigray", Token.Color.YELLOW: "ansiyellow", Token.Comment: "underline ansicyan", Token.Comment.Hashbang: "", Token.Comment.Multiline: "", Token.Comment.Preproc: "underline ansiyellow", Token.Comment.PreprocFile: "", Token.Comment.Single: "", Token.Comment.Special: "", Token.Error: "ansibrightred", Token.Escape: "", Token.Generic: "", Token.Generic.Deleted: "ansired", Token.Generic.Emph: "underline", Token.Generic.Error: "bold ansibrightred", Token.Generic.Heading: "bold ansiblue", Token.Generic.Inserted: "ansibrightgreen", Token.Generic.Output: "ansiblue", Token.Generic.Prompt: "bold ansiblue", Token.Generic.Strong: "", Token.Generic.Subheading: "bold ansimagenta", Token.Generic.Traceback: "ansiblue", Token.Keyword: "bold ansigreen", Token.Keyword.Constant: "", Token.Keyword.Declaration: "", Token.Keyword.Namespace: "", Token.Keyword.Pseudo: "nobold", Token.Keyword.Reserved: "", Token.Keyword.Type: "nobold ansired", Token.Literal: "", Token.Literal.Date: "", Token.Literal.Number: "ansibrightblack", Token.Literal.Number.Bin: "", Token.Literal.Number.Float: "", Token.Literal.Number.Hex: "", Token.Literal.Number.Integer: "", Token.Literal.Number.Integer.Long: "", Token.Literal.Number.Oct: "", Token.Literal.String: "ansibrightred", Token.Literal.String.Affix: "", Token.Literal.String.Backtick: "", Token.Literal.String.Char: "", Token.Literal.String.Delimiter: "", Token.Literal.String.Doc: "underline", Token.Literal.String.Double: "", Token.Literal.String.Escape: "bold ansiyellow", Token.Literal.String.Heredoc: "", Token.Literal.String.Interpol: "bold ansimagenta", Token.Literal.String.Other: "ansigreen", Token.Literal.String.Regex: "ansimagenta", Token.Literal.String.Single: "", Token.Literal.String.Symbol: "ansiyellow", Token.Menu.Completions: "bg:ansigray ansiblack", Token.Menu.Completions.Completion: "", Token.Menu.Completions.Completion.Current: "bg:ansibrightblack ansiwhite", Token.Name: "", Token.Name.Attribute: "ansibrightyellow", Token.Name.Builtin: "ansigreen", Token.Name.Builtin.Pseudo: "", Token.Name.Class: "bold ansibrightblue", Token.Name.Constant: "ansired", Token.Name.Decorator: "ansibrightmagenta", Token.Name.Entity: "bold ansigray", Token.Name.Exception: "bold ansibrightred", Token.Name.Function: "ansibrightblue", Token.Name.Function.Magic: "", Token.Name.Label: "ansibrightyellow", Token.Name.Namespace: "bold ansibrightblue", Token.Name.Other: "", Token.Name.Property: "", Token.Name.Tag: "bold ansigreen", Token.Name.Variable: "ansiblue", Token.Name.Variable.Class: "", Token.Name.Variable.Global: "", Token.Name.Variable.Instance: "", Token.Name.Variable.Magic: "", Token.Operator: "ansibrightblack", Token.Operator.Word: "bold ansimagenta", Token.Other: "", Token.Punctuation: "", Token.Scrollbar: "bg:ansibrightblack", Token.Scrollbar.Arrow: "bg:ansiblack ansiwhite bold", Token.Scrollbar.Button: "bg:ansiblack", Token.Text: "", Token.Text.Whitespace: "ansigray", }, ), globals(), "DEFAULT_STYLE_DICT", ) PTK2_STYLE = { "completion-menu": "bg:ansicyan ansiwhite", "completion-menu.completion": "bg:#008888 #ffffff", "completion-menu.completion.current": "bg:ansibrightblack ansiwhite", "completion-menu.meta.completion": "bg:#00aaaa #ffffff", "completion-menu.meta.completion.current": "bg:#00aaaa #000000", "scrollbar.background": "bg:ansibrightblack", "scrollbar.arrow": "bg:ansiblack ansiwhite bold", "scrollbar.button": "bg:ansiblack", } ```
```java /* * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ package org.apache.beam.sdk.io.gcp.pubsublite.internal; import static com.google.cloud.pubsublite.internal.ExtractStatus.toCanonical; import static com.google.cloud.pubsublite.internal.UncheckedApiPreconditions.checkArgument; import com.google.api.gax.rpc.ApiException; import com.google.cloud.pubsublite.AdminClient; import com.google.cloud.pubsublite.AdminClientSettings; import com.google.cloud.pubsublite.Offset; import com.google.cloud.pubsublite.Partition; import com.google.cloud.pubsublite.TopicPath; import com.google.cloud.pubsublite.internal.wire.Subscriber; import com.google.cloud.pubsublite.proto.SequencedMessage; import java.util.List; import java.util.Map; import java.util.function.Consumer; import java.util.function.Supplier; import java.util.stream.Collectors; import org.apache.beam.sdk.io.Read; import org.apache.beam.sdk.io.gcp.pubsublite.SubscriberOptions; import org.apache.beam.sdk.runners.AppliedPTransform; import org.apache.beam.sdk.runners.PTransformOverride; import org.apache.beam.sdk.runners.PTransformOverrideFactory; import org.apache.beam.sdk.transforms.DoFn.OutputReceiver; import org.apache.beam.sdk.transforms.PTransform; import org.apache.beam.sdk.transforms.ParDo; import org.apache.beam.sdk.transforms.splittabledofn.RestrictionTracker; import org.apache.beam.sdk.util.construction.PTransformMatchers; import org.apache.beam.sdk.util.construction.ReplacementOutputs; import org.apache.beam.sdk.values.PBegin; import org.apache.beam.sdk.values.PCollection; import org.apache.beam.sdk.values.TupleTag; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class SubscribeTransform extends PTransform<PBegin, PCollection<SequencedMessage>> { private static final Logger LOG = LoggerFactory.getLogger(SubscribeTransform.class); private static final long MEBIBYTE = 1L << 20; private static final long SOFT_MEMORY_LIMIT = 512 * MEBIBYTE; private static final long MIN_PER_PARTITION_MEMORY = 10 * MEBIBYTE; private static final long MAX_PER_PARTITION_MEMORY = 100 * MEBIBYTE; private static final MemoryLimiter LIMITER = new MemoryLimiterImpl(MIN_PER_PARTITION_MEMORY, MAX_PER_PARTITION_MEMORY, SOFT_MEMORY_LIMIT); private final SubscriberOptions options; public SubscribeTransform(SubscriberOptions options) { this.options = options; } private void checkSubscription(SubscriptionPartition subscriptionPartition) throws ApiException { checkArgument(subscriptionPartition.subscription().equals(options.subscriptionPath())); } private Subscriber newSubscriber( Partition partition, Offset initialOffset, Consumer<List<SequencedMessage>> consumer) { try { return new SubscriberAssembler(options, partition) .getSubscriberFactory(initialOffset) .newSubscriber( messages -> consumer.accept(messages.stream().collect(Collectors.toList()))); } catch (Throwable t) { throw toCanonical(t).underlying; } } private MemoryBufferedSubscriber newBufferedSubscriber( SubscriptionPartition subscriptionPartition, Offset startOffset) throws ApiException { checkSubscription(subscriptionPartition); return new MemoryBufferedSubscriberImpl( subscriptionPartition.partition(), startOffset, LIMITER, consumer -> newSubscriber(subscriptionPartition.partition(), startOffset, consumer)); } private MemoryBufferedSubscriber getCachedSubscriber( SubscriptionPartition subscriptionPartition, Offset startOffset) { Supplier<MemoryBufferedSubscriber> getOrCreate = () -> PerServerSubscriberCache.CACHE.get( subscriptionPartition, () -> newBufferedSubscriber(subscriptionPartition, startOffset)); while (true) { MemoryBufferedSubscriber subscriber = getOrCreate.get(); Offset fetchOffset = subscriber.fetchOffset(); if (startOffset.equals(fetchOffset)) { return subscriber; } LOG.info( "Discarding subscriber due to mismatch, this should be rare. {}, start: {} fetch: {}", subscriptionPartition, startOffset, fetchOffset); try { subscriber.stopAsync().awaitTerminated(); } catch (Exception ignored) { } } } private SubscriptionPartitionProcessor newPartitionProcessor( SubscriptionPartition subscriptionPartition, RestrictionTracker<OffsetByteRange, OffsetByteProgress> tracker, OutputReceiver<SequencedMessage> receiver) { return new SubscriptionPartitionProcessorImpl( tracker, receiver, getCachedSubscriber( subscriptionPartition, Offset.of(tracker.currentRestriction().getRange().getFrom()))); } private TopicBacklogReader newBacklogReader(SubscriptionPartition subscriptionPartition) { checkSubscription(subscriptionPartition); return new SubscriberAssembler(options, subscriptionPartition.partition()).getBacklogReader(); } private TrackerWithProgress newRestrictionTracker( TopicBacklogReader backlogReader, OffsetByteRange initial) { return new OffsetByteRangeTracker(initial, backlogReader); } private InitialOffsetReader newInitialOffsetReader(SubscriptionPartition subscriptionPartition) { checkSubscription(subscriptionPartition); return new SubscriberAssembler(options, subscriptionPartition.partition()) .getInitialOffsetReader(); } private BlockingCommitter newCommitter(SubscriptionPartition subscriptionPartition) { checkSubscription(subscriptionPartition); return new SubscriberAssembler(options, subscriptionPartition.partition()).newCommitter(); } private TopicPath getTopicPath() { try (AdminClient admin = AdminClient.create( AdminClientSettings.newBuilder() .setRegion(options.subscriptionPath().location().extractRegion()) .build())) { return TopicPath.parse(admin.getSubscription(options.subscriptionPath()).get().getTopic()); } catch (Throwable t) { throw toCanonical(t).underlying; } } @SuppressWarnings("unused") private PCollection<SequencedMessage> expandSdf(PBegin input) { PCollection<SubscriptionPartition> subscriptionPartitions = input.apply(new SubscriptionPartitionLoader(getTopicPath(), options.subscriptionPath())); return subscriptionPartitions.apply( ParDo.of( new PerSubscriptionPartitionSdf( new ManagedFactoryImpl<>(this::newBacklogReader), new ManagedFactoryImpl<>(this::newCommitter), this::newInitialOffsetReader, this::newRestrictionTracker, this::newPartitionProcessor))); } private PCollection<SequencedMessage> expandSource(PBegin input) { return input.apply( Read.from( new UnboundedSourceImpl(options, this::newBufferedSubscriber, this::newBacklogReader))); } private static final class SourceTransform extends PTransform<PBegin, PCollection<SequencedMessage>> { private final SubscribeTransform impl; private SourceTransform(SubscribeTransform impl) { this.impl = impl; } @Override public PCollection<SequencedMessage> expand(PBegin input) { return impl.expandSource(input); } } public static final PTransformOverride V1_READ_OVERRIDE = PTransformOverride.of( PTransformMatchers.classEqualTo(SubscribeTransform.class), new ReadOverrideFactory()); private static class ReadOverrideFactory implements PTransformOverrideFactory< PBegin, PCollection<SequencedMessage>, SubscribeTransform> { @Override public PTransformReplacement<PBegin, PCollection<SequencedMessage>> getReplacementTransform( AppliedPTransform<PBegin, PCollection<SequencedMessage>, SubscribeTransform> transform) { return PTransformReplacement.of( transform.getPipeline().begin(), new SourceTransform(transform.getTransform())); } @Override public Map<PCollection<?>, ReplacementOutput> mapOutputs( Map<TupleTag<?>, PCollection<?>> outputs, PCollection<SequencedMessage> newOutput) { return ReplacementOutputs.singleton(outputs, newOutput); } } @Override public PCollection<SequencedMessage> expand(PBegin input) { return expandSdf(input); } } ```
The Gulfstream Aerospace Invitational was a golf tournament on the Champions Tour from 1984 to 1993. It was played in Indian Wells, California at The Vintage Club (1981–1992) and at the Indian Wells Golf Resort (1993). The purse for the 1993 tournament was US$550,000, with $82,500 going to the winner. The tournament was founded in 1981 as The Vintage Invitational. Winners Gulfstream Aerospace Invitational 1993 Raymond Floyd The Vintage ARCO Invitational 1992 Mike Hill 1991 Chi-Chi Rodríguez Vintage Chrysler Invitational 1990 Lee Trevino 1989 Miller Barber 1988 Orville Moody 1987 Bob Charles The Vintage Invitational 1986 Dale Douglass 1985 Peter Thomson 1984 Don January Vintage Invitational unofficial 1983 Gene Littler 1982 Miller Barber 1981 Gene Littler Source: References External links Results (1990–1993) at GolfObserver.com Former PGA Tour Champions events Golf in California Recurring sporting events established in 1981 Recurring sporting events disestablished in 1993 1981 establishments in California 1993 disestablishments in California
```java package com.ctrip.xpipe.redis.console.service.impl; import com.ctrip.xpipe.redis.console.annotation.DalTransaction; import com.ctrip.xpipe.redis.console.controller.api.data.meta.DcClusterCreateInfo; import com.ctrip.xpipe.redis.console.controller.api.data.meta.RedisCheckRuleCreateInfo; import com.ctrip.xpipe.redis.console.dao.RedisCheckRuleDao; import com.ctrip.xpipe.redis.console.exception.BadRequestException; import com.ctrip.xpipe.redis.console.model.RedisCheckRuleTbl; import com.ctrip.xpipe.redis.console.model.RedisCheckRuleTblDao; import com.ctrip.xpipe.redis.console.service.AbstractConsoleService; import com.ctrip.xpipe.redis.console.service.RedisCheckRuleService; import com.ctrip.xpipe.redis.core.entity.ClusterMeta; import com.ctrip.xpipe.redis.core.entity.DcMeta; import com.ctrip.xpipe.redis.core.meta.MetaCache; import com.ctrip.xpipe.utils.StringUtil; import com.google.common.base.Function; import com.google.common.collect.Lists; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.Arrays; import java.util.List; @Service public class RedisCheckRuleServiceImpl extends AbstractConsoleService<RedisCheckRuleTblDao> implements RedisCheckRuleService { @Autowired private RedisCheckRuleDao redisCheckRuleDao; @Autowired private DcClusterServiceImpl dcClusterService; @Autowired private MetaCache metaCache; @Override public void addRedisCheckRule(RedisCheckRuleCreateInfo redisCheckRuleCreateInfo) { RedisCheckRuleTbl proto = dao.createLocal(); if(redisCheckRuleIsExist(redisCheckRuleCreateInfo)){ throw new IllegalArgumentException("Redis config check rule : " + redisCheckRuleCreateInfo.getCheckType() + redisCheckRuleCreateInfo.getParam() + " already exists"); } if(redisCheckRuleCreateInfo.getDescription() == null) proto.setDescription(""); else proto.setDescription(redisCheckRuleCreateInfo.getDescription()); proto.setCheckType(redisCheckRuleCreateInfo.getCheckType()).setParam(redisCheckRuleCreateInfo.getParam()); redisCheckRuleDao.addRedisCheckRule(proto); } @Override public void updateRedisCheckRule(RedisCheckRuleCreateInfo redisCheckRuleCreateInfo) { RedisCheckRuleTbl redisCheckRuleTbl = getRedisCheckRuleById(redisCheckRuleCreateInfo.getId()); if(null == redisCheckRuleTbl) throw new IllegalArgumentException(String.format("Redis config check rule %s %s not found", redisCheckRuleCreateInfo.getCheckType(), redisCheckRuleCreateInfo.getParam())); if(redisCheckRuleCreateInfo.getCheckType() != null) redisCheckRuleTbl.setCheckType(redisCheckRuleCreateInfo.getCheckType()); if(redisCheckRuleCreateInfo.getParam() != null) redisCheckRuleTbl.setParam(redisCheckRuleCreateInfo.getParam()); if(redisCheckRuleCreateInfo.getDescription() != null) redisCheckRuleTbl.setDescription(redisCheckRuleCreateInfo.getDescription()); redisCheckRuleDao.updateRedisCheckRule(redisCheckRuleTbl); } @Override @DalTransaction public void deleteRedisCheckRuleById(Long ruleId) { RedisCheckRuleTbl redisCheckRuleTbl = getRedisCheckRuleById(ruleId); if(null == redisCheckRuleTbl) throw new BadRequestException(String.format("Redis config check rule %d not found",ruleId)); deleteRedisCheckRule(redisCheckRuleTbl); } @Override @DalTransaction public void deleteRedisCheckRuleByParam(String param) { RedisCheckRuleTbl redisCheckRuleTbl = getRedisCheckRuleByParam(param); if(null == redisCheckRuleTbl) throw new BadRequestException(String.format("Redis config check rule %s not found",param)); deleteRedisCheckRule(redisCheckRuleTbl); } private void deleteRedisCheckRule(RedisCheckRuleTbl proto) { redisCheckRuleDao.deleteRedisCheckRule(proto); Long id = proto.getId(); for(DcMeta dcMeta : metaCache.getXpipeMeta().getDcs().values()) { for(ClusterMeta clusterMeta : dcMeta.getClusters().values()) { String oldRedisCheckRule = clusterMeta.getActiveRedisCheckRules(); if(!StringUtil.isEmpty(oldRedisCheckRule) && oldRedisCheckRule.contains(id.toString())) { dcClusterService.updateDcCluster(new DcClusterCreateInfo().setDcName(dcMeta.getId()) .setClusterName(clusterMeta.getId()).setRedisCheckRule(removeOneRuleId(oldRedisCheckRule, id.toString()))); } } } } private String removeOneRuleId(String oldRedisCheckRule, String deletedId) { if(oldRedisCheckRule.equals(deletedId)) return ""; List<String> oldRedisCheckRules = Arrays.asList(oldRedisCheckRule.split(",")); StringBuilder stringBuilder = new StringBuilder(); oldRedisCheckRules.forEach(redisCheckRule -> { if(!deletedId.equals(redisCheckRule)) { stringBuilder.append(redisCheckRule).append(","); } }); stringBuilder.deleteCharAt(stringBuilder.length() - 1); return stringBuilder.toString(); } @Override public RedisCheckRuleTbl getRedisCheckRuleById(Long ruleId) { return redisCheckRuleDao.getRedisCheckRuleById(ruleId); } @Override public RedisCheckRuleTbl getRedisCheckRuleByParam(String param) { return redisCheckRuleDao.getRedisCheckRuleByParam(param); } @Override public List<RedisCheckRuleTbl> getRedisCheckRulesByCheckType(String checkType) { if(!"info".equals(checkType) && !"config".equals(checkType)){ throw new IllegalArgumentException("checkType must be config or info"); } return redisCheckRuleDao.getRedisCheckRulesByCheckType(checkType); } @Override public List<RedisCheckRuleTbl> getAllRedisCheckRules() { return redisCheckRuleDao.getAllRedisCheckRules(); } @Override public List<RedisCheckRuleCreateInfo> getRedisCheckRuleInfosByCheckType(String checkType) { return Lists.newArrayList(Lists.transform(getRedisCheckRulesByCheckType(checkType), new Function<RedisCheckRuleTbl, RedisCheckRuleCreateInfo>() { @Override public RedisCheckRuleCreateInfo apply(RedisCheckRuleTbl redisCheckRuleTbl) { RedisCheckRuleCreateInfo redisCheckRuleCreateInfo = new RedisCheckRuleCreateInfo().setId(redisCheckRuleTbl.getId()) .setCheckType(redisCheckRuleTbl.getCheckType()).setParam(redisCheckRuleTbl.getParam()) .setDescription(redisCheckRuleTbl.getDescription()); return redisCheckRuleCreateInfo; } })); } @Override public List<RedisCheckRuleCreateInfo> getAllRedisCheckRuleInfos() { return Lists.newArrayList(Lists.transform(getAllRedisCheckRules(), new Function<RedisCheckRuleTbl, RedisCheckRuleCreateInfo>() { @Override public RedisCheckRuleCreateInfo apply(RedisCheckRuleTbl redisCheckRuleTbl) { RedisCheckRuleCreateInfo redisCheckRuleCreateInfo = new RedisCheckRuleCreateInfo().setId(redisCheckRuleTbl.getId()) .setCheckType(redisCheckRuleTbl.getCheckType()).setParam(redisCheckRuleTbl.getParam()) .setDescription(redisCheckRuleTbl.getDescription()); return redisCheckRuleCreateInfo; } })); } boolean redisCheckRuleIsExist(RedisCheckRuleCreateInfo redisCheckRuleCreateInfo){ RedisCheckRuleTbl exist = getRedisCheckRuleByParam(redisCheckRuleCreateInfo.getParam()); return exist != null; } } ```
```php <?php // Test the output of Comment Querying functions. /** * @group comment */ class Tests_Comment_Query extends WP_UnitTestCase { protected static $post_id; protected $comment_id; /** * Temporary storage for comment exclusions to allow a filter to access these. * * Used in the following tests: * - `your_sha256_hashilling_descendants()` * - `your_sha256_hashlling_descendants()` * * @var array */ private $to_exclude; public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { self::$post_id = $factory->post->create(); } public function tear_down() { unset( $this->to_exclude ); parent::tear_down(); } /** * @covers WP_Comment_Query::query */ public function test_query() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'pingback', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'trackback', ) ); $c4 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'mario', ) ); $c5 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'luigi', ) ); $q = new WP_Comment_Query(); $found = $q->query( array( 'fields' => 'ids', ) ); $this->assertSameSets( array( $c1, $c2, $c3, $c4, $c5 ), $found ); } /** * @covers WP_Comment_Query::query */ public function test_query_post_id_0() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $q = new WP_Comment_Query(); $found = $q->query( array( 'post_id' => 0, 'fields' => 'ids', ) ); $this->assertSameSets( array( $c1 ), $found ); } /** * @ticket 12668 * * @covers WP_Comment_Query::query */ public function test_query_type_empty_string() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'pingback', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'trackback', ) ); $c4 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'mario', ) ); $c5 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'luigi', ) ); $q = new WP_Comment_Query(); $found = $q->query( array( 'type' => '', 'fields' => 'ids', ) ); $this->assertSameSets( array( $c1, $c2, $c3, $c4, $c5 ), $found ); } /** * @ticket 12668 * * @covers WP_Comment_Query::query */ public function test_query_type_comment() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'pingback', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'trackback', ) ); $c4 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'mario', ) ); $c5 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'luigi', ) ); $q = new WP_Comment_Query(); $found = $q->query( array( 'type' => 'comment', 'fields' => 'ids', ) ); $this->assertSameSets( array( $c1 ), $found ); } /** * @covers WP_Comment_Query::query */ public function test_query_type_pingback() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'pingback', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'pingback', ) ); $c4 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'trackback', ) ); $q = new WP_Comment_Query(); $found = $q->query( array( 'type' => 'pingback', 'fields' => 'ids', ) ); $this->assertSameSets( array( $c2, $c3 ), $found ); } /** * @covers WP_Comment_Query::query */ public function test_query_type_trackback() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'trackback', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'trackback', ) ); $c4 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'pingback', ) ); $q = new WP_Comment_Query(); $found = $q->query( array( 'type' => 'trackback', 'fields' => 'ids', ) ); $this->assertSameSets( array( $c2, $c3 ), $found ); } /** * 'pings' is an alias for 'trackback' + 'pingback'. * * @covers WP_Comment_Query::query */ public function test_query_type_pings() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'pingback', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'trackback', ) ); $c4 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'mario', ) ); $c5 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'luigi', ) ); $q = new WP_Comment_Query(); $found = $q->query( array( 'type' => 'pings', 'fields' => 'ids', ) ); $this->assertSameSets( array( $c2, $c3 ), $found ); } /** * Comments and custom * * @ticket 12668 * * @covers WP_Comment_Query::query */ public function test_type_array_comments_and_custom() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'pingback', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'trackback', ) ); $c4 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'mario', ) ); $c5 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'luigi', ) ); $c6 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'mario', ) ); $q = new WP_Comment_Query(); $found = $q->query( array( 'type' => array( 'comments', 'mario' ), 'fields' => 'ids', ) ); $this->assertSameSets( array( $c1, $c4, $c6 ), $found ); } /** * @ticket 12668 * * @covers WP_Comment_Query::query */ public function test_type_not__in_array_custom() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'pingback', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'trackback', ) ); $c4 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'mario', ) ); $c5 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'luigi', ) ); $c6 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'mario', ) ); $q = new WP_Comment_Query(); $found = $q->query( array( 'type__not_in' => array( 'luigi' ), 'fields' => 'ids', ) ); $this->assertSameSets( array( $c1, $c2, $c3, $c4, $c6 ), $found ); } /** * @ticket 12668 * * @covers WP_Comment_Query::query */ public function test_type__in_array_and_not_type_array_custom() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'pingback', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'trackback', ) ); $c4 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'mario', ) ); $c5 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'luigi', ) ); $c6 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'mario', ) ); $q = new WP_Comment_Query(); $found = $q->query( array( 'type__in' => array( 'comments' ), 'type__not_in' => array( 'luigi' ), 'fields' => 'ids', ) ); $this->assertSameSets( array( $c1 ), $found ); } /** * @ticket 12668 * * @covers WP_Comment_Query::query */ public function test_type_array_and_type__not_in_array_custom() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'pingback', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'trackback', ) ); $c4 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'mario', ) ); $c5 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'luigi', ) ); $c6 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'mario', ) ); $q = new WP_Comment_Query(); $found = $q->query( array( 'type' => array( 'pings' ), 'type__not_in' => array( 'mario' ), 'fields' => 'ids', ) ); $this->assertSameSets( array( $c2, $c3 ), $found ); } /** * @ticket 12668 * * @covers WP_Comment_Query::query */ public function test_type__not_in_custom() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'pingback', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'trackback', ) ); $c4 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'mario', ) ); $c5 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'luigi', ) ); $c6 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'mario', ) ); $q = new WP_Comment_Query(); $found = $q->query( array( 'type__not_in' => 'luigi', 'fields' => 'ids', ) ); $this->assertSameSets( array( $c1, $c2, $c3, $c4, $c6 ), $found ); } /** * @ticket 12668 * * @covers WP_Comment_Query::query */ public function test_type_array_comments_and_pings() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'pingback', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'trackback', ) ); $c4 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'mario', ) ); $c5 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'luigi', ) ); $q = new WP_Comment_Query(); $found = $q->query( array( 'type' => array( 'comments', 'pings' ), 'fields' => 'ids', ) ); $this->assertSameSets( array( $c1, $c2, $c3 ), $found ); } /** * @ticket 12668 * * @covers WP_Comment_Query::query */ public function test_type_array_comment_pings() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'pingback', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'trackback', ) ); $q = new WP_Comment_Query(); $found = $q->query( array( 'type' => array( 'comment', 'pings' ), 'fields' => 'ids', ) ); $this->assertSameSets( array( $c1, $c2, $c3 ), $found ); } /** * @ticket 12668 * * @covers WP_Comment_Query::query */ public function test_type_array_pingback() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'pingback', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'trackback', ) ); $q = new WP_Comment_Query(); $found = $q->query( array( 'type' => array( 'pingback' ), 'fields' => 'ids', ) ); $this->assertSame( array( $c2 ), $found ); } /** * @ticket 12668 * * @covers WP_Comment_Query::query */ public function test_type_array_custom_pingpack() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'pingback', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'trackback', ) ); $q = new WP_Comment_Query(); $found = $q->query( array( 'type' => array( 'peach', 'pingback' ), 'fields' => 'ids', ) ); $this->assertSame( array( $c2 ), $found ); } /** * @ticket 12668 * * @covers WP_Comment_Query::query */ public function test_type_array_pings() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'pingback', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'pingback', ) ); $q = new WP_Comment_Query(); $found = $q->query( array( 'type' => array( 'pings' ), 'fields' => 'ids', ) ); $this->assertSameSets( array( $c2, $c3 ), $found ); } /** * @ticket 12668 * * @covers WP_Comment_Query::query */ public function test_type_status_approved_array_comment_pings() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'pingback', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'pingback', ) ); $c4 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '0', 'comment_type' => 'pingback', ) ); $q = new WP_Comment_Query(); $found = $q->query( array( 'status' => 'approve', 'type' => array( 'pings' ), 'fields' => 'ids', ) ); $this->assertSameSets( array( $c3, $c2 ), $found ); } /** * @ticket 12668 * * @covers WP_Comment_Query::query */ public function test_type_array_trackback() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'trackback', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'pingback', ) ); $q = new WP_Comment_Query(); $found = $q->query( array( 'type' => array( 'trackback' ), 'fields' => 'ids', ) ); $this->assertSame( array( $c2 ), $found ); } /** * @ticket 12668 * * @covers WP_Comment_Query::query */ public function test_type_array_custom_trackback() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'trackback', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'pingback', ) ); $q = new WP_Comment_Query(); $found = $q->query( array( 'type' => array( 'toad', 'trackback' ), 'fields' => 'ids', ) ); $this->assertSame( array( $c2 ), $found ); } /** * @ticket 12668 * * @covers WP_Comment_Query::query */ public function test_type_array_pings_approved() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'trackback', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_type' => 'trackback', ) ); $c4 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '0', 'comment_type' => 'trackback', ) ); $q = new WP_Comment_Query(); $found = $q->query( array( 'status' => 'approve', 'type' => array( 'pings' ), 'fields' => 'ids', ) ); $this->assertSameSets( array( $c3, $c2 ), $found ); } /** * @ticket 29612 * * @covers WP_Comment_Query::query */ public function test_status_empty_string() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '0', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => 'spam', ) ); $q = new WP_Comment_Query(); $found = $q->query( array( 'status' => '', 'fields' => 'ids', ) ); $this->assertSameSets( array( $c1, $c2 ), $found ); } /** * @ticket 21101 * * @covers WP_Comment_Query::query */ public function test_status_hold() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '0', ) ); $q = new WP_Comment_Query(); $found = $q->query( array( 'status' => 'hold', 'fields' => 'ids', ) ); $this->assertSame( array( $c2 ), $found ); } /** * @ticket 21101 * * @covers WP_Comment_Query::query */ public function test_status_approve() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '0', ) ); $q = new WP_Comment_Query(); $found = $q->query( array( 'status' => 'approve', 'fields' => 'ids', ) ); $this->assertSame( array( $c1 ), $found ); } /** * @covers WP_Comment_Query::query */ public function test_status_custom() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => 'foo', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => 'foo1', ) ); $q = new WP_Comment_Query(); $found = $q->query( array( 'status' => 'foo', 'fields' => 'ids', ) ); $this->assertSame( array( $c2 ), $found ); } /** * @covers WP_Comment_Query::query */ public function test_status_all() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => 'foo', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '0', ) ); $q = new WP_Comment_Query(); $found = $q->query( array( 'status' => 'all', 'fields' => 'ids', ) ); $this->assertSameSets( array( $c1, $c3 ), $found ); } /** * @covers WP_Comment_Query::query */ public function test_status_default_to_all() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => 'foo', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '0', ) ); $q = new WP_Comment_Query(); $found = $q->query( array( 'fields' => 'ids', ) ); $this->assertSameSets( array( $c1, $c3 ), $found ); } /** * @ticket 29612 * * @covers WP_Comment_Query::query */ public function test_status_comma_any() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => 'foo', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '0', ) ); $q = new WP_Comment_Query(); $found = $q->query( array( 'status' => 'any', 'fields' => 'ids', ) ); $this->assertSameSets( array( $c1, $c2, $c3 ), $found ); } /** * @ticket 29612 * * @covers WP_Comment_Query::query */ public function test_status_comma_separated() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => 'foo', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '0', ) ); $q = new WP_Comment_Query(); $found = $q->query( array( 'status' => 'approve,foo,bar', 'fields' => 'ids', ) ); $this->assertSameSets( array( $c1, $c2 ), $found ); } /** * @ticket 29612 * * @covers WP_Comment_Query::query */ public function test_status_array() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => 'foo', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '0', ) ); $q = new WP_Comment_Query(); $found = $q->query( array( 'status' => array( 'approve', 'foo', 'bar' ), 'fields' => 'ids', ) ); $this->assertSameSets( array( $c1, $c2 ), $found ); } /** * @ticket 35478 * * @covers WP_Comment_Query::__construct */ public function test_multiple_post_fields_should_all_be_respected() { $posts = array(); $posts[] = self::factory()->post->create( array( 'post_status' => 'publish', 'post_author' => 3, ) ); $posts[] = self::factory()->post->create( array( 'post_status' => 'draft', 'post_author' => 4, ) ); $posts[] = self::factory()->post->create( array( 'post_status' => 'draft', 'post_author' => 3, ) ); $comments = array(); foreach ( $posts as $post ) { $comments[] = self::factory()->comment->create( array( 'comment_post_ID' => $post, ) ); } $q = new WP_Comment_Query( array( 'post_status' => 'draft', 'post_author' => 3, 'fields' => 'ids', ) ); $this->assertSame( array( $comments[2] ), $q->comments ); } /** * @covers ::get_comments */ public function test_get_comments_for_post() { $limit = 5; $post_id = self::factory()->post->create(); self::factory()->comment->create_post_comments( $post_id, $limit ); $comments = get_comments( array( 'post_id' => $post_id ) ); $this->assertCount( $limit, $comments ); foreach ( $comments as $comment ) { $this->assertEquals( $post_id, $comment->comment_post_ID ); } $post_id2 = self::factory()->post->create(); self::factory()->comment->create_post_comments( $post_id2, $limit ); $comments = get_comments( array( 'post_id' => $post_id2 ) ); $this->assertCount( $limit, $comments ); foreach ( $comments as $comment ) { $this->assertEquals( $post_id2, $comment->comment_post_ID ); } $post_id3 = self::factory()->post->create(); self::factory()->comment->create_post_comments( $post_id3, $limit, array( 'comment_approved' => '0' ) ); $comments = get_comments( array( 'post_id' => $post_id3 ) ); $this->assertCount( $limit, $comments ); foreach ( $comments as $comment ) { $this->assertEquals( $post_id3, $comment->comment_post_ID ); } $comments = get_comments( array( 'post_id' => $post_id3, 'status' => 'hold', ) ); $this->assertCount( $limit, $comments ); foreach ( $comments as $comment ) { $this->assertEquals( $post_id3, $comment->comment_post_ID ); } $comments = get_comments( array( 'post_id' => $post_id3, 'status' => 'approve', ) ); $this->assertCount( 0, $comments ); self::factory()->comment->create_post_comments( $post_id3, $limit, array( 'comment_approved' => '1' ) ); $comments = get_comments( array( 'post_id' => $post_id3 ) ); $this->assertCount( $limit * 2, $comments ); foreach ( $comments as $comment ) { $this->assertEquals( $post_id3, $comment->comment_post_ID ); } } /** * @ticket 21003 * * @covers ::get_comments */ public function test_orderby_meta() { $comment_id = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id ) ); $comment_id2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id ) ); $comment_id3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id ) ); add_comment_meta( $comment_id, 'key', 'value1', true ); add_comment_meta( $comment_id, 'key1', 'value1', true ); add_comment_meta( $comment_id, 'key3', 'value3', true ); add_comment_meta( $comment_id2, 'key', 'value2', true ); add_comment_meta( $comment_id2, 'key2', 'value2', true ); add_comment_meta( $comment_id3, 'key3', 'value3', true ); $comments = get_comments( array( 'meta_key' => 'key', 'orderby' => array( 'key' ), ) ); $this->assertCount( 2, $comments ); $this->assertEquals( $comment_id2, $comments[0]->comment_ID ); $this->assertEquals( $comment_id, $comments[1]->comment_ID ); $comments = get_comments( array( 'meta_key' => 'key', 'orderby' => array( 'meta_value' ), ) ); $this->assertCount( 2, $comments ); $this->assertEquals( $comment_id2, $comments[0]->comment_ID ); $this->assertEquals( $comment_id, $comments[1]->comment_ID ); $comments = get_comments( array( 'meta_key' => 'key', 'orderby' => array( 'key' ), 'order' => 'ASC', ) ); $this->assertCount( 2, $comments ); $this->assertEquals( $comment_id, $comments[0]->comment_ID ); $this->assertEquals( $comment_id2, $comments[1]->comment_ID ); $comments = get_comments( array( 'meta_key' => 'key', 'orderby' => array( 'meta_value' ), 'order' => 'ASC', ) ); $this->assertCount( 2, $comments ); $this->assertEquals( $comment_id, $comments[0]->comment_ID ); $this->assertEquals( $comment_id2, $comments[1]->comment_ID ); $comments = get_comments( array( 'meta_value' => 'value3', 'orderby' => array( 'key' ), ) ); $this->assertEquals( array( $comment_id3, $comment_id ), wp_list_pluck( $comments, 'comment_ID' ) ); $comments = get_comments( array( 'meta_value' => 'value3', 'orderby' => array( 'meta_value' ), ) ); $this->assertEquals( array( $comment_id3, $comment_id ), wp_list_pluck( $comments, 'comment_ID' ) ); // 'value1' is present on two different keys for $comment_id, // yet we should get only one instance of that comment in the results. $comments = get_comments( array( 'meta_value' => 'value1', 'orderby' => array( 'key' ), ) ); $this->assertCount( 1, $comments ); $comments = get_comments( array( 'meta_value' => 'value1', 'orderby' => array( 'meta_value' ), ) ); $this->assertCount( 1, $comments ); } /** * @ticket 30478 * * @covers WP_Comment_Query::query */ public function test_orderby_clause_key() { $comments = self::factory()->comment->create_many( 3 ); add_comment_meta( $comments[0], 'foo', 'aaa' ); add_comment_meta( $comments[1], 'foo', 'zzz' ); add_comment_meta( $comments[2], 'foo', 'jjj' ); $q = new WP_Comment_Query(); $found = $q->query( array( 'fields' => 'ids', 'meta_query' => array( 'foo_key' => array( 'key' => 'foo', 'compare' => 'EXISTS', ), ), 'orderby' => 'foo_key', 'order' => 'DESC', ) ); $this->assertSame( array( $comments[1], $comments[2], $comments[0] ), $found ); } /** * @ticket 30478 * * @covers WP_Comment_Query::query */ public function test_orderby_clause_key_as_secondary_sort() { $c1 = self::factory()->comment->create( array( 'comment_date' => '2015-01-28 03:00:00', ) ); $c2 = self::factory()->comment->create( array( 'comment_date' => '2015-01-28 05:00:00', ) ); $c3 = self::factory()->comment->create( array( 'comment_date' => '2015-01-28 03:00:00', ) ); add_comment_meta( $c1, 'foo', 'jjj' ); add_comment_meta( $c2, 'foo', 'zzz' ); add_comment_meta( $c3, 'foo', 'aaa' ); $q = new WP_Comment_Query(); $found = $q->query( array( 'fields' => 'ids', 'meta_query' => array( 'foo_key' => array( 'key' => 'foo', 'compare' => 'EXISTS', ), ), 'orderby' => array( 'comment_date' => 'asc', 'foo_key' => 'asc', ), ) ); $this->assertSame( array( $c3, $c1, $c2 ), $found ); } /** * @ticket 30478 * * @covers WP_Comment_Query::query */ public function test_orderby_more_than_one_clause_key() { $comments = self::factory()->comment->create_many( 3 ); add_comment_meta( $comments[0], 'foo', 'jjj' ); add_comment_meta( $comments[1], 'foo', 'zzz' ); add_comment_meta( $comments[2], 'foo', 'jjj' ); add_comment_meta( $comments[0], 'bar', 'aaa' ); add_comment_meta( $comments[1], 'bar', 'ccc' ); add_comment_meta( $comments[2], 'bar', 'bbb' ); $q = new WP_Comment_Query(); $found = $q->query( array( 'fields' => 'ids', 'meta_query' => array( 'foo_key' => array( 'key' => 'foo', 'compare' => 'EXISTS', ), 'bar_key' => array( 'key' => 'bar', 'compare' => 'EXISTS', ), ), 'orderby' => array( 'foo_key' => 'asc', 'bar_key' => 'desc', ), ) ); $this->assertSame( array( $comments[2], $comments[0], $comments[1] ), $found ); } /** * @ticket 32081 * * @covers WP_Comment_Query::__construct * @covers WP_Comment_Query::get_comments */ public function test_meta_query_should_work_with_comment__in() { $comments = self::factory()->comment->create_many( 3 ); add_comment_meta( $comments[0], 'foo', 'jjj' ); add_comment_meta( $comments[1], 'foo', 'zzz' ); add_comment_meta( $comments[2], 'foo', 'jjj' ); $q = new WP_Comment_Query( array( 'comment__in' => array( $comments[1], $comments[2] ), 'meta_query' => array( array( 'key' => 'foo', 'value' => 'jjj', ), ), 'fields' => 'ids', ) ); $this->assertSame( array( $comments[2] ), $q->get_comments() ); } /** * @ticket 32081 * * @covers WP_Comment_Query::__construct * @covers WP_Comment_Query::get_comments */ public function test_meta_query_should_work_with_comment__not_in() { $comments = self::factory()->comment->create_many( 3 ); add_comment_meta( $comments[0], 'foo', 'jjj' ); add_comment_meta( $comments[1], 'foo', 'zzz' ); add_comment_meta( $comments[2], 'foo', 'jjj' ); $q = new WP_Comment_Query( array( 'comment__not_in' => array( $comments[1], $comments[2] ), 'meta_query' => array( array( 'key' => 'foo', 'value' => 'jjj', ), ), 'fields' => 'ids', ) ); $this->assertSame( array( $comments[0] ), $q->get_comments() ); } /** * @ticket 27064 * * @covers ::get_comments */ public function test_get_comments_by_user() { $users = self::factory()->user->create_many( 2 ); self::factory()->comment->create( array( 'user_id' => $users[0], 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); self::factory()->comment->create( array( 'user_id' => $users[0], 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); self::factory()->comment->create( array( 'user_id' => $users[1], 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $comments = get_comments( array( 'user_id' => $users[0], 'orderby' => 'comment_ID', 'order' => 'ASC', ) ); $this->assertCount( 2, $comments ); $this->assertEquals( $users[0], $comments[0]->user_id ); $this->assertEquals( $users[0], $comments[1]->user_id ); $comments = get_comments( array( 'user_id' => $users, 'orderby' => 'comment_ID', 'order' => 'ASC', ) ); $this->assertCount( 3, $comments ); $this->assertEquals( $users[0], $comments[0]->user_id ); $this->assertEquals( $users[0], $comments[1]->user_id ); $this->assertEquals( $users[1], $comments[2]->user_id ); } /** * @ticket 35377 * * @covers ::get_comments */ public function test_get_comments_by_author_url() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_author' => 'bar', 'comment_author_email' => 'bar@example.com', 'comment_author_url' => 'path_to_url ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_author' => 'bar', 'comment_author_email' => 'bar@example.com', 'comment_author_url' => 'path_to_url ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_author' => 'bar', 'comment_author_email' => 'bar@example.com', 'comment_author_url' => 'path_to_url ) ); $comments = get_comments( array( 'author_url' => 'path_to_url 'fields' => 'ids', ) ); $this->assertSameSets( array( $c1, $c2 ), $comments ); } /** * @ticket 28434 * * @covers ::get_comments */ public function test_fields_ids_query() { $comment_1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 7, 'comment_approved' => '1', ) ); $comment_2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 1, 'comment_approved' => '1', ) ); $comment_3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 1, 'comment_approved' => '1', ) ); // Ensure we are dealing with integers, and not objects. $this->assertIsInt( $comment_1 ); $this->assertIsInt( $comment_2 ); $this->assertIsInt( $comment_3 ); $comment_ids = get_comments( array( 'fields' => 'ids' ) ); $this->assertCount( 3, $comment_ids ); $this->assertSameSets( array( $comment_1, $comment_2, $comment_3 ), $comment_ids ); } /** * @ticket 29189 * * @covers ::get_comments */ public function test_fields_comment__in() { $comment_1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 7, 'comment_approved' => '1', ) ); $comment_2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 1, 'comment_approved' => '1', ) ); $comment_3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 1, 'comment_approved' => '1', ) ); $comment_ids = get_comments( array( 'fields' => 'ids', 'comment__in' => array( $comment_1, $comment_3 ), ) ); $this->assertSameSets( array( $comment_1, $comment_3 ), $comment_ids ); } /** * @ticket 29189 * * @covers ::get_comments */ public function test_fields_comment__not_in() { $comment_1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 7, 'comment_approved' => '1', ) ); $comment_2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 1, 'comment_approved' => '1', ) ); $comment_3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 1, 'comment_approved' => '1', ) ); $comment_ids = get_comments( array( 'fields' => 'ids', 'comment__not_in' => array( $comment_2, $comment_3 ), ) ); $this->assertSameSets( array( $comment_1 ), $comment_ids ); } /** * @ticket 29189 * * @covers ::get_comments */ public function test_fields_post__in() { $p1 = self::factory()->post->create(); $p2 = self::factory()->post->create(); $p3 = self::factory()->post->create(); $c1 = self::factory()->comment->create( array( 'comment_post_ID' => $p1, 'user_id' => 7, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => $p2, 'user_id' => 1, 'comment_approved' => '1', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => $p3, 'user_id' => 1, 'comment_approved' => '1', ) ); $comment_ids = get_comments( array( 'fields' => 'ids', 'post__in' => array( $p1, $p2 ), ) ); $this->assertSameSets( array( $c1, $c2 ), $comment_ids ); } /** * @ticket 29189 * * @covers ::get_comments */ public function test_fields_post__not_in() { $p1 = self::factory()->post->create(); $p2 = self::factory()->post->create(); $p3 = self::factory()->post->create(); $c1 = self::factory()->comment->create( array( 'comment_post_ID' => $p1, 'user_id' => 7, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => $p2, 'user_id' => 1, 'comment_approved' => '1', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => $p3, 'user_id' => 1, 'comment_approved' => '1', ) ); $comment_ids = get_comments( array( 'fields' => 'ids', 'post__not_in' => array( $p1, $p2 ), ) ); $this->assertSameSets( array( $c3 ), $comment_ids ); } /** * @ticket 29885 * * @covers ::get_comments */ public function test_fields_post_author__in() { $author_id1 = 105; $author_id2 = 106; $p1 = self::factory()->post->create( array( 'post_author' => $author_id1 ) ); $p2 = self::factory()->post->create( array( 'post_author' => $author_id1 ) ); $p3 = self::factory()->post->create( array( 'post_author' => $author_id2 ) ); $c1 = self::factory()->comment->create( array( 'comment_post_ID' => $p1, 'user_id' => 1, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => $p2, 'user_id' => 1, 'comment_approved' => '1', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => $p3, 'user_id' => 1, 'comment_approved' => '1', ) ); $comment_ids = get_comments( array( 'fields' => 'ids', 'post_author__in' => array( $author_id1 ), ) ); $this->assertSameSets( array( $c1, $c2 ), $comment_ids ); } /** * @ticket 29885 * * @covers ::get_comments */ public function test_fields_post_author__not_in() { $author_id1 = 111; $author_id2 = 112; $p1 = self::factory()->post->create( array( 'post_author' => $author_id1 ) ); $p2 = self::factory()->post->create( array( 'post_author' => $author_id1 ) ); $p3 = self::factory()->post->create( array( 'post_author' => $author_id2 ) ); $c1 = self::factory()->comment->create( array( 'comment_post_ID' => $p1, 'user_id' => 1, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => $p2, 'user_id' => 1, 'comment_approved' => '1', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => $p3, 'user_id' => 1, 'comment_approved' => '1', ) ); $comment_ids = get_comments( array( 'fields' => 'ids', 'post_author__not_in' => array( $author_id1 ), ) ); $this->assertSameSets( array( $c3 ), $comment_ids ); } /** * @ticket 29885 * * @covers ::get_comments */ public function test_fields_author__in() { $p1 = self::factory()->post->create(); $p2 = self::factory()->post->create(); $p3 = self::factory()->post->create(); $p4 = self::factory()->post->create(); $c1 = self::factory()->comment->create( array( 'comment_post_ID' => $p1, 'user_id' => 1, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => $p1, 'user_id' => 2, 'comment_approved' => '1', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => $p2, 'user_id' => 3, 'comment_approved' => '1', ) ); $c4 = self::factory()->comment->create( array( 'comment_post_ID' => $p4, 'user_id' => 4, 'comment_approved' => '1', ) ); $comment_ids = get_comments( array( 'fields' => 'ids', 'author__in' => array( 1, 3 ), ) ); $this->assertSameSets( array( $c1, $c3 ), $comment_ids ); } /** * @ticket 29885 * * @covers ::get_comments */ public function test_fields_author__not_in() { $p1 = self::factory()->post->create(); $p2 = self::factory()->post->create(); $p3 = self::factory()->post->create(); $p4 = self::factory()->post->create(); $c1 = self::factory()->comment->create( array( 'comment_post_ID' => $p1, 'user_id' => 1, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => $p1, 'user_id' => 2, 'comment_approved' => '1', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => $p2, 'user_id' => 3, 'comment_approved' => '1', ) ); $c4 = self::factory()->comment->create( array( 'comment_post_ID' => $p4, 'user_id' => 4, 'comment_approved' => '1', ) ); $comment_ids = get_comments( array( 'fields' => 'ids', 'author__not_in' => array( 1, 2 ), ) ); $this->assertSameSets( array( $c3, $c4 ), $comment_ids ); } /** * @ticket 19623 * * @covers ::get_comments */ public function test_get_comments_with_status_all() { $comment_1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 7, 'comment_approved' => '1', ) ); $comment_2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 1, 'comment_approved' => '1', ) ); $comment_3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 1, 'comment_approved' => '0', ) ); $comments_approved_1 = get_comments( array( 'status' => 'all' ) ); $comment_ids = get_comments( array( 'fields' => 'ids' ) ); $this->assertSameSets( array( $comment_1, $comment_2, $comment_3 ), $comment_ids ); } /** * @ticket 19623 * * @covers ::get_comments */ public function test_get_comments_with_include_unapproved_user_id() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 7, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 1, 'comment_approved' => '1', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 1, 'comment_approved' => '0', ) ); $c4 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 6, 'comment_approved' => '0', ) ); $found = get_comments( array( 'fields' => 'ids', 'include_unapproved' => 1, 'status' => 'approve', ) ); $this->assertSameSets( array( $c1, $c2, $c3 ), $found ); } /** * @ticket 19623 * * @covers ::get_comments */ public function test_get_comments_with_include_unapproved_user_id_array() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 7, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 1, 'comment_approved' => '1', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 1, 'comment_approved' => '0', ) ); $c4 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 6, 'comment_approved' => '0', ) ); $c5 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 8, 'comment_approved' => '0', ) ); $found = get_comments( array( 'fields' => 'ids', 'include_unapproved' => array( 1, 8 ), 'status' => 'approve', ) ); $this->assertSameSets( array( $c1, $c2, $c3, $c5 ), $found ); } /** * @ticket 19623 * * @covers ::get_comments */ public function your_sha256_hashd() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 7, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 1, 'comment_approved' => '1', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 1, 'comment_approved' => '0', ) ); $c4 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 6, 'comment_approved' => '0', ) ); $c5 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 8, 'comment_approved' => '0', ) ); $found = get_comments( array( 'fields' => 'ids', 'include_unapproved' => '1,8', 'status' => 'approve', ) ); $this->assertSameSets( array( $c1, $c2, $c3, $c5 ), $found ); } /** * @ticket 19623 * * @covers ::get_comments */ public function test_get_comments_with_include_unapproved_author_email() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 7, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 0, 'comment_approved' => '1', 'comment_author' => 'foo', 'comment_author_email' => 'foo@example.com', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 0, 'comment_approved' => '0', 'comment_author' => 'foo', 'comment_author_email' => 'foo@example.com', ) ); $c4 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 0, 'comment_approved' => '0', 'comment_author' => 'foo', 'comment_author_email' => 'bar@example.com', ) ); $found = get_comments( array( 'fields' => 'ids', 'include_unapproved' => 'foo@example.com', 'status' => 'approve', ) ); $this->assertSameSets( array( $c1, $c2, $c3 ), $found ); } /** * @ticket 19623 * * @covers ::get_comments */ public function test_get_comments_with_include_unapproved_mixed_array() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 7, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 0, 'comment_approved' => '1', 'comment_author' => 'foo', 'comment_author_email' => 'foo@example.com', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 0, 'comment_approved' => '0', 'comment_author' => 'foo', 'comment_author_email' => 'foo@example.com', ) ); $c4 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 0, 'comment_approved' => '0', 'comment_author' => 'foo', 'comment_author_email' => 'bar@example.com', ) ); $c5 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 4, 'comment_approved' => '0', 'comment_author' => 'foo', 'comment_author_email' => 'bar@example.com', ) ); $found = get_comments( array( 'fields' => 'ids', 'include_unapproved' => array( 'foo@example.com', 4 ), 'status' => 'approve', ) ); $this->assertSameSets( array( $c1, $c2, $c3, $c5 ), $found ); } /** * @ticket 19623 * * @covers ::get_comments */ public function test_get_comments_with_include_unapproved_mixed_comma_separated() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 7, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 0, 'comment_approved' => '1', 'comment_author' => 'foo', 'comment_author_email' => 'foo@example.com', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 0, 'comment_approved' => '0', 'comment_author' => 'foo', 'comment_author_email' => 'foo@example.com', ) ); $c4 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 0, 'comment_approved' => '0', 'comment_author' => 'foo', 'comment_author_email' => 'bar@example.com', ) ); $c5 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 4, 'comment_approved' => '0', 'comment_author' => 'foo', 'comment_author_email' => 'bar@example.com', ) ); $found = get_comments( array( 'fields' => 'ids', 'include_unapproved' => 'foo@example.com, 4', 'status' => 'approve', ) ); $this->assertSameSets( array( $c1, $c2, $c3, $c5 ), $found ); } /** * @covers WP_Comment_Query::query */ public function test_search() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 4, 'comment_approved' => '0', 'comment_author' => 'foo', 'comment_author_email' => 'bar@example.com', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 4, 'comment_approved' => '0', 'comment_author' => 'bar', 'comment_author_email' => 'foo@example.com', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 4, 'comment_approved' => '0', 'comment_author' => 'bar', 'comment_author_email' => 'bar@example.com', 'comment_author_url' => 'path_to_url ) ); $c4 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 4, 'comment_approved' => '0', 'comment_author' => 'bar', 'comment_author_email' => 'bar@example.com', 'comment_author_url' => 'path_to_url 'comment_author_IP' => 'foo.bar', ) ); $c5 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 4, 'comment_approved' => '0', 'comment_author' => 'bar', 'comment_author_email' => 'bar@example.com', 'comment_author_url' => 'path_to_url 'comment_content' => 'Nice foo comment', ) ); $c6 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 4, 'comment_approved' => '0', 'comment_author' => 'bar', 'comment_author_email' => 'bar@example.com', 'comment_author_url' => 'path_to_url ) ); $q = new WP_Comment_Query(); $found = $q->query( array( 'search' => 'foo', 'fields' => 'ids', ) ); $this->assertSameSets( array( $c1, $c2, $c3, $c4, $c5 ), $found ); } /** * @ticket 35513 * * @covers WP_Comment_Query::query */ public function test_search_false_should_be_ignored() { $q = new WP_Comment_Query(); $q->query( array( 'search' => false, ) ); $this->assertStringNotContainsString( 'comment_author LIKE', $q->request ); } /** * @ticket 35513 * * @covers WP_Comment_Query::query */ public function test_search_null_should_be_ignored() { $q = new WP_Comment_Query(); $q->query( array( 'search' => null, ) ); $this->assertStringNotContainsString( 'comment_author LIKE', $q->request ); } /** * @ticket 35513 * * @covers WP_Comment_Query::query */ public function test_search_empty_string_should_be_ignored() { $q = new WP_Comment_Query(); $q->query( array( 'search' => false, ) ); $this->assertStringNotContainsString( 'comment_author LIKE', $q->request ); } /** * @ticket 35513 * * @covers WP_Comment_Query::query */ public function test_search_int_0_should_not_be_ignored() { global $wpdb; $q = new WP_Comment_Query(); $q->query( array( 'search' => 0, ) ); $this->assertStringContainsString( "comment_author LIKE '%0%'", $wpdb->remove_placeholder_escape( $q->request ) ); } /** * @ticket 35513 * * @covers WP_Comment_Query::query */ public function test_search_string_0_should_not_be_ignored() { global $wpdb; $q = new WP_Comment_Query(); $q->query( array( 'search' => '0', ) ); $this->assertStringContainsString( "comment_author LIKE '%0%'", $wpdb->remove_placeholder_escape( $q->request ) ); } /** * @covers WP_Comment_Query::query */ public function test_orderby_default() { global $wpdb; $q = new WP_Comment_Query(); $q->query( array() ); $this->assertStringContainsString( "ORDER BY $wpdb->comments.comment_date_gmt", $q->request ); } /** * @covers WP_Comment_Query::query */ public function test_orderby_single() { global $wpdb; $q = new WP_Comment_Query(); $q->query( array( 'orderby' => 'comment_agent', ) ); $this->assertStringContainsString( "ORDER BY $wpdb->comments.comment_agent", $q->request ); } /** * @covers WP_Comment_Query::query */ public function test_orderby_single_invalid() { global $wpdb; $q = new WP_Comment_Query(); $q->query( array( 'orderby' => 'foo', ) ); $this->assertStringContainsString( "ORDER BY $wpdb->comments.comment_date_gmt", $q->request ); } /** * @covers WP_Comment_Query::query */ public function test_orderby_space_separated() { global $wpdb; $q = new WP_Comment_Query(); $q->query( array( 'orderby' => 'comment_agent comment_approved', ) ); $this->assertStringContainsString( "ORDER BY $wpdb->comments.comment_agent DESC, $wpdb->comments.comment_approved DESC", $q->request ); } /** * @covers WP_Comment_Query::query */ public function test_orderby_comma_separated() { global $wpdb; $q = new WP_Comment_Query(); $q->query( array( 'orderby' => 'comment_agent, comment_approved', ) ); $this->assertStringContainsString( "ORDER BY $wpdb->comments.comment_agent DESC, $wpdb->comments.comment_approved DESC", $q->request ); } /** * @covers WP_Comment_Query::query */ public function test_orderby_flat_array() { global $wpdb; $q = new WP_Comment_Query(); $q->query( array( 'orderby' => array( 'comment_agent', 'comment_approved' ), ) ); $this->assertStringContainsString( "ORDER BY $wpdb->comments.comment_agent DESC, $wpdb->comments.comment_approved DESC", $q->request ); } /** * @covers WP_Comment_Query::query */ public function test_orderby_array_contains_invalid_item() { global $wpdb; $q = new WP_Comment_Query(); $q->query( array( 'orderby' => array( 'comment_agent', 'foo', 'comment_approved' ), ) ); $this->assertStringContainsString( "ORDER BY $wpdb->comments.comment_agent DESC, $wpdb->comments.comment_approved DESC", $q->request ); } /** * @covers WP_Comment_Query::query */ public function test_orderby_array_contains_all_invalid_items() { global $wpdb; $q = new WP_Comment_Query(); $q->query( array( 'orderby' => array( 'foo', 'bar', 'baz' ), ) ); $this->assertStringContainsString( "ORDER BY $wpdb->comments.comment_date_gmt", $q->request ); } /** * @ticket 29902 * * @covers WP_Comment_Query::query */ public function test_orderby_none() { $q = new WP_Comment_Query(); $q->query( array( 'orderby' => 'none', ) ); $this->assertStringNotContainsString( 'ORDER BY', $q->request ); } /** * @ticket 29902 * * @covers WP_Comment_Query::query */ public function test_orderby_empty_array() { $q = new WP_Comment_Query(); $q->query( array( 'orderby' => array(), ) ); $this->assertStringNotContainsString( 'ORDER BY', $q->request ); } /** * @ticket 29902 * * @covers WP_Comment_Query::query */ public function test_orderby_false() { $q = new WP_Comment_Query(); $q->query( array( 'orderby' => false, ) ); $this->assertStringNotContainsString( 'ORDER BY', $q->request ); } /** * @ticket 30478 * * @covers WP_Comment_Query::query */ public function test_orderby_array() { global $wpdb; $q = new WP_Comment_Query(); $found = $q->query( array( 'fields' => 'ids', 'orderby' => array( 'comment_agent' => 'DESC', 'comment_date_gmt' => 'ASC', 'comment_ID' => 'DESC', ), ) ); $this->assertStringContainsString( "ORDER BY $wpdb->comments.comment_agent DESC, $wpdb->comments.comment_date_gmt ASC, $wpdb->comments.comment_ID DESC", $q->request ); } /** * @ticket 30478 * * @covers WP_Comment_Query::query */ public function test_orderby_array_should_discard_invalid_columns() { global $wpdb; $q = new WP_Comment_Query(); $found = $q->query( array( 'fields' => 'ids', 'orderby' => array( 'comment_agent' => 'DESC', 'foo' => 'ASC', 'comment_ID' => 'DESC', ), ) ); $this->assertStringContainsString( "ORDER BY $wpdb->comments.comment_agent DESC, $wpdb->comments.comment_ID DESC", $q->request ); } /** * @ticket 30478 * * @covers WP_Comment_Query::query */ public function test_orderby_array_should_convert_invalid_order_to_DESC() { global $wpdb; $q = new WP_Comment_Query(); $found = $q->query( array( 'fields' => 'ids', 'orderby' => array( 'comment_agent' => 'DESC', 'comment_date_gmt' => 'foo', 'comment_ID' => 'DESC', ), ) ); $this->assertStringContainsString( "ORDER BY $wpdb->comments.comment_agent DESC, $wpdb->comments.comment_date_gmt DESC, $wpdb->comments.comment_ID DESC", $q->request ); } /** * @ticket 30478 * * @covers WP_Comment_Query::query */ public function your_sha256_hashuld_inherit_order_from_comment_date_gmt() { global $wpdb; $q = new WP_Comment_Query(); $found = $q->query( array( 'fields' => 'ids', 'orderby' => array( 'comment_agent' => 'DESC', 'comment_date_gmt' => 'ASC', ), ) ); $this->assertStringContainsString( "ORDER BY $wpdb->comments.comment_agent DESC, $wpdb->comments.comment_date_gmt ASC, $wpdb->comments.comment_ID ASC", $q->request ); } /** * @ticket 30478 * * @covers WP_Comment_Query::query */ public function your_sha256_hashuld_inherit_order_from_comment_date() { global $wpdb; $q = new WP_Comment_Query(); $found = $q->query( array( 'fields' => 'ids', 'orderby' => array( 'comment_agent' => 'DESC', 'comment_date' => 'ASC', ), ) ); $this->assertStringContainsString( "ORDER BY $wpdb->comments.comment_agent DESC, $wpdb->comments.comment_date ASC, $wpdb->comments.comment_ID ASC", $q->request ); } /** * @ticket 30478 * * @covers WP_Comment_Query::query */ public function your_sha256_hashen_not_sorted_by_date() { global $wpdb; $q = new WP_Comment_Query(); $found = $q->query( array( 'fields' => 'ids', 'orderby' => array( 'comment_agent' => 'ASC', ), ) ); $this->assertStringContainsString( "ORDER BY $wpdb->comments.comment_agent ASC, $wpdb->comments.comment_ID DESC", $q->request ); } /** * @ticket 30478 * * @covers WP_Comment_Query::query */ public function your_sha256_hashe_of_tie_ASC() { $now = current_time( 'mysql', 1 ); $comments = self::factory()->comment->create_many( 5, array( 'comment_post_ID' => self::$post_id, 'comment_date_gmt' => $now, ) ); $q = new WP_Comment_Query(); $found = $q->query( array( 'orderby' => 'comment_date_gmt', 'order' => 'ASC', ) ); // $comments is ASC by default. $this->assertEquals( $comments, wp_list_pluck( $found, 'comment_ID' ) ); } /** * @ticket 30478 * * @covers WP_Comment_Query::query */ public function your_sha256_hashe_of_tie_DESC() { $now = current_time( 'mysql', 1 ); $comments = self::factory()->comment->create_many( 5, array( 'comment_post_ID' => self::$post_id, 'comment_date_gmt' => $now, ) ); $q = new WP_Comment_Query(); $found = $q->query( array( 'orderby' => 'comment_date_gmt', 'order' => 'DESC', ) ); // $comments is ASC by default. rsort( $comments ); $this->assertEquals( $comments, wp_list_pluck( $found, 'comment_ID' ) ); } /** * @covers WP_Comment_Query::query */ public function test_meta_vars_should_be_converted_to_meta_query() { $q = new WP_Comment_Query(); $q->query( array( 'meta_key' => 'foo', 'meta_value' => '5', 'meta_compare' => '>', 'meta_type' => 'SIGNED', ) ); $this->assertSame( 'foo', $q->meta_query->queries[0]['key'] ); $this->assertSame( '5', $q->meta_query->queries[0]['value'] ); $this->assertSame( '>', $q->meta_query->queries[0]['compare'] ); $this->assertSame( 'SIGNED', $q->meta_query->queries[0]['type'] ); } /** * @covers WP_Comment_Query::query */ public function test_count() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 7, ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 7, ) ); $q = new WP_Comment_Query(); $found = $q->query( array( 'count' => true, 'orderby' => 'none', ) ); $this->assertSame( 2, $found ); } /** * @ticket 23369 * * @covers WP_Comment_Query::query */ public function test_count_with_meta_query() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 7, ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 7, ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 7, ) ); add_comment_meta( $c1, 'foo', 'bar' ); add_comment_meta( $c3, 'foo', 'bar' ); $q = new WP_Comment_Query(); $found = $q->query( array( 'count' => true, 'orderby' => 'none', 'meta_query' => array( array( 'key' => 'foo', 'value' => 'bar', ), ), ) ); $this->assertSame( 2, $found ); } /** * @ticket 38268 * * @covers WP_Comment_Query::query */ public function test_paged() { $now = time(); $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 50 ), ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 40 ), ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 30 ), ) ); $c4 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 20 ), ) ); $query = new WP_Comment_Query(); $found = $query->query( array( 'paged' => 2, 'number' => 2, 'orderby' => 'comment_date_gmt', 'order' => 'DESC', 'fields' => 'ids', ) ); $expected = array( $c2, $c1 ); $this->assertSame( $expected, $found ); } /** * @ticket 38268 * * @covers WP_Comment_Query::query */ public function test_offset_should_take_precedence_over_paged() { $now = time(); $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 50 ), ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 40 ), ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 30 ), ) ); $c4 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', $now - 20 ), ) ); $query = new WP_Comment_Query(); $found = $query->query( array( 'paged' => 2, 'offset' => 1, 'number' => 2, 'orderby' => 'comment_date_gmt', 'order' => 'DESC', 'fields' => 'ids', ) ); $expected = array( $c3, $c2 ); $this->assertSame( $expected, $found ); } /** * @covers WP_Comment_Query::query */ public function test_post_type_single_value() { register_post_type( 'post-type-1' ); register_post_type( 'post-type-2' ); $p1 = self::factory()->post->create( array( 'post_type' => 'post-type-1' ) ); $p2 = self::factory()->post->create( array( 'post_type' => 'post-type-2' ) ); $c1 = self::factory()->comment->create_post_comments( $p1, 1 ); $c2 = self::factory()->comment->create_post_comments( $p2, 1 ); $q = new WP_Comment_Query(); $found = $q->query( array( 'fields' => 'ids', 'post_type' => 'post-type-2', ) ); $this->assertSameSets( $c2, $found ); _unregister_post_type( 'post-type-1' ); _unregister_post_type( 'post-type-2' ); } /** * @ticket 20006 * * @covers WP_Comment_Query::query */ public function test_post_type_singleton_array() { register_post_type( 'post-type-1' ); register_post_type( 'post-type-2' ); $p1 = self::factory()->post->create( array( 'post_type' => 'post-type-1' ) ); $p2 = self::factory()->post->create( array( 'post_type' => 'post-type-2' ) ); $c1 = self::factory()->comment->create_post_comments( $p1, 1 ); $c2 = self::factory()->comment->create_post_comments( $p2, 1 ); $q = new WP_Comment_Query(); $found = $q->query( array( 'fields' => 'ids', 'post_type' => array( 'post-type-2' ), ) ); $this->assertSameSets( $c2, $found ); _unregister_post_type( 'post-type-1' ); _unregister_post_type( 'post-type-2' ); } /** * @ticket 20006 * * @covers WP_Comment_Query::query */ public function test_post_type_array() { register_post_type( 'post-type-1' ); register_post_type( 'post-type-2' ); register_post_type( 'post-type-3' ); $p1 = self::factory()->post->create( array( 'post_type' => 'post-type-1' ) ); $p2 = self::factory()->post->create( array( 'post_type' => 'post-type-2' ) ); $p3 = self::factory()->post->create( array( 'post_type' => 'post-type-3' ) ); $c1 = self::factory()->comment->create_post_comments( $p1, 1 ); $c2 = self::factory()->comment->create_post_comments( $p2, 1 ); $c3 = self::factory()->comment->create_post_comments( $p3, 1 ); $q = new WP_Comment_Query(); $found = $q->query( array( 'fields' => 'ids', 'post_type' => array( 'post-type-1', 'post-type-3' ), ) ); $this->assertSameSets( array_merge( $c1, $c3 ), $found ); } /** * @covers WP_Comment_Query::query */ public function test_post_name_single_value() { $p1 = self::factory()->post->create( array( 'post_name' => 'foo' ) ); $p2 = self::factory()->post->create( array( 'post_name' => 'bar' ) ); $c1 = self::factory()->comment->create_post_comments( $p1, 1 ); $c2 = self::factory()->comment->create_post_comments( $p2, 1 ); $q = new WP_Comment_Query(); $found = $q->query( array( 'fields' => 'ids', 'post_name' => 'bar', ) ); $this->assertSameSets( $c2, $found ); } /** * @ticket 20006 * * @covers WP_Comment_Query::query */ public function test_post_name_singleton_array() { $p1 = self::factory()->post->create( array( 'post_name' => 'foo' ) ); $p2 = self::factory()->post->create( array( 'post_name' => 'bar' ) ); $c1 = self::factory()->comment->create_post_comments( $p1, 1 ); $c2 = self::factory()->comment->create_post_comments( $p2, 1 ); $q = new WP_Comment_Query(); $found = $q->query( array( 'fields' => 'ids', 'post_name' => array( 'bar' ), ) ); $this->assertSameSets( $c2, $found ); } /** * @ticket 20006 * * @covers WP_Comment_Query::query */ public function test_post_name_array() { $p1 = self::factory()->post->create( array( 'post_name' => 'foo' ) ); $p2 = self::factory()->post->create( array( 'post_name' => 'bar' ) ); $p3 = self::factory()->post->create( array( 'post_name' => 'baz' ) ); $c1 = self::factory()->comment->create_post_comments( $p1, 1 ); $c2 = self::factory()->comment->create_post_comments( $p2, 1 ); $c3 = self::factory()->comment->create_post_comments( $p3, 1 ); $q = new WP_Comment_Query(); $found = $q->query( array( 'fields' => 'ids', 'post_name' => array( 'foo', 'baz' ), ) ); $this->assertSameSets( array_merge( $c1, $c3 ), $found ); } /** * @covers WP_Comment_Query::query */ public function test_post_status_single_value() { $p1 = self::factory()->post->create( array( 'post_status' => 'publish' ) ); $p2 = self::factory()->post->create( array( 'post_status' => 'draft' ) ); $c1 = self::factory()->comment->create_post_comments( $p1, 1 ); $c2 = self::factory()->comment->create_post_comments( $p2, 1 ); $q = new WP_Comment_Query(); $found = $q->query( array( 'fields' => 'ids', 'post_status' => 'draft', ) ); $this->assertSameSets( $c2, $found ); } /** * @ticket 20006 * * @covers WP_Comment_Query::query */ public function test_post_status_singleton_array() { $p1 = self::factory()->post->create( array( 'post_status' => 'publish' ) ); $p2 = self::factory()->post->create( array( 'post_status' => 'draft' ) ); $c1 = self::factory()->comment->create_post_comments( $p1, 1 ); $c2 = self::factory()->comment->create_post_comments( $p2, 1 ); $q = new WP_Comment_Query(); $found = $q->query( array( 'fields' => 'ids', 'post_status' => array( 'draft' ), ) ); $this->assertSameSets( $c2, $found ); } /** * @ticket 20006 * * @covers WP_Comment_Query::query */ public function test_post_status_array() { $p1 = self::factory()->post->create( array( 'post_status' => 'publish' ) ); $p2 = self::factory()->post->create( array( 'post_status' => 'draft' ) ); $p3 = self::factory()->post->create( array( 'post_status' => 'future' ) ); $c1 = self::factory()->comment->create_post_comments( $p1, 1 ); $c2 = self::factory()->comment->create_post_comments( $p2, 1 ); $c3 = self::factory()->comment->create_post_comments( $p3, 1 ); $q = new WP_Comment_Query(); $found = $q->query( array( 'fields' => 'ids', 'post_status' => array( 'publish', 'future' ), ) ); $this->assertSameSets( array_merge( $c1, $c3 ), $found ); } /** * @ticket 35512 * * @covers WP_Comment_Query::query */ public function test_post_type_any_should_override_other_post_types() { register_post_type( 'post-type-1', array( 'exclude_from_search' => false ) ); register_post_type( 'post-type-2', array( 'exclude_from_search' => false ) ); $p1 = self::factory()->post->create( array( 'post_type' => 'post-type-1' ) ); $p2 = self::factory()->post->create( array( 'post_type' => 'post-type-2' ) ); $c1 = self::factory()->comment->create_post_comments( $p1, 1 ); $c2 = self::factory()->comment->create_post_comments( $p2, 1 ); $q = new WP_Comment_Query(); $found = $q->query( array( 'fields' => 'ids', 'post_type' => array( 'any', 'post-type-1' ), ) ); $this->assertSameSets( array_merge( $c1, $c2 ), $found ); } /** * @ticket 35512 * * @covers WP_Comment_Query::query */ public function test_post_type_any_as_part_of_an_array_of_post_types() { register_post_type( 'post-type-1', array( 'exclude_from_search' => false ) ); register_post_type( 'post-type-2', array( 'exclude_from_search' => false ) ); $p1 = self::factory()->post->create( array( 'post_type' => 'post-type-1' ) ); $p2 = self::factory()->post->create( array( 'post_type' => 'post-type-2' ) ); $c1 = self::factory()->comment->create_post_comments( $p1, 1 ); $c2 = self::factory()->comment->create_post_comments( $p2, 1 ); $q = new WP_Comment_Query(); $found = $q->query( array( 'fields' => 'ids', 'post_type' => array( 'any' ), ) ); $this->assertSameSets( array_merge( $c1, $c2 ), $found ); } /** * @ticket 35512 * * @covers WP_Comment_Query::query */ public function test_post_status_any_should_override_other_post_statuses() { $p1 = self::factory()->post->create( array( 'post_status' => 'publish' ) ); $p2 = self::factory()->post->create( array( 'post_status' => 'draft' ) ); $c1 = self::factory()->comment->create_post_comments( $p1, 1 ); $c2 = self::factory()->comment->create_post_comments( $p2, 1 ); $q = new WP_Comment_Query(); $found = $q->query( array( 'fields' => 'ids', 'post_status' => array( 'any', 'draft' ), ) ); $this->assertSameSets( array_merge( $c1, $c2 ), $found ); } /** * @ticket 35512 * * @covers WP_Comment_Query::query */ public function test_post_status_any_as_part_of_an_array_of_post_statuses() { $p1 = self::factory()->post->create( array( 'post_status' => 'publish' ) ); $p2 = self::factory()->post->create( array( 'post_status' => 'draft' ) ); $c1 = self::factory()->comment->create_post_comments( $p1, 1 ); $c2 = self::factory()->comment->create_post_comments( $p2, 1 ); $q = new WP_Comment_Query(); $found = $q->query( array( 'fields' => 'ids', 'post_status' => array( 'any' ), ) ); $this->assertSameSets( array_merge( $c1, $c2 ), $found ); } /** * @ticket 24826 * * @covers WP_Comment_Query::__construct * @covers WP_Comment_Query::get_comments */ public function test_comment_query_object() { $comment_id = self::factory()->comment->create(); $query1 = new WP_Comment_Query(); $this->assertNull( $query1->query_vars ); $this->assertEmpty( $query1->comments ); $comments = $query1->query( array( 'status' => 'all' ) ); $this->assertIsArray( $query1->query_vars ); $this->assertNotEmpty( $query1->comments ); $this->assertIsArray( $query1->comments ); $query2 = new WP_Comment_Query( array( 'status' => 'all' ) ); $this->assertNotEmpty( $query2->query_vars ); $this->assertNotEmpty( $query2->comments ); $this->assertEquals( $query2->comments, $query1->get_comments() ); } /** * @ticket 22400 * * @covers WP_Comment_Query::query */ public function test_comment_cache_key_should_ignore_custom_params() { $p = self::factory()->post->create(); $c = self::factory()->comment->create( array( 'comment_post_ID' => $p ) ); $q1 = new WP_Comment_Query(); $q1->query( array( 'post_id' => $p, 'fields' => 'ids', ) ); $num_queries = get_num_queries(); $q2 = new WP_Comment_Query(); $q2->query( array( 'post_id' => $p, 'fields' => 'ids', 'foo' => 'bar', ) ); $this->assertSame( $num_queries, get_num_queries() ); } /** * @ticket 35677 * * @covers WP_Comment_Query::__construct */ public function test_cache_should_be_sensitive_to_parent__in() { global $wpdb; $q1 = new WP_Comment_Query( array( 'parent__in' => array( 1, 2, 3 ), ) ); $num_queries = get_num_queries(); $q2 = new WP_Comment_Query( array( 'parent__in' => array( 4, 5, 6 ), ) ); $this->assertNotEquals( $num_queries, get_num_queries() ); } /** * @ticket 35677 * * @covers WP_Comment_Query::__construct */ public function test_cache_should_be_sensitive_to_parent__not_in() { global $wpdb; $q1 = new WP_Comment_Query( array( 'parent__not_in' => array( 1, 2, 3 ), ) ); $num_queries = get_num_queries(); $q2 = new WP_Comment_Query( array( 'parent__not_in' => array( 4, 5, 6 ), ) ); $this->assertNotEquals( $num_queries, get_num_queries() ); } /** * @ticket 32762 * * @covers WP_Comment_Query::__construct */ public function your_sha256_hashmments_action() { $comments = self::factory()->comment->create_many( 2, array( 'comment_post_ID' => self::$post_id, ) ); add_comment_meta( $comments[1], 'foo', 'bar' ); add_action( 'pre_get_comments', array( $this, 'modify_meta_query' ) ); $q = new WP_Comment_Query( array( 'comment_post_ID' => self::$post_id, 'fields' => 'ids', ) ); remove_action( 'pre_get_comments', array( $this, 'modify_meta_query' ) ); $this->assertSameSets( array( $comments[1] ), $q->comments ); } public function modify_meta_query( $q ) { $q->meta_query = new WP_Meta_Query( array( array( 'key' => 'foo', 'value' => 'bar', ), ) ); } /** * @ticket 32762 * * @covers WP_Comment_Query::__construct */ public function your_sha256_hashomments_action() { $comments = self::factory()->comment->create_many( 2, array( 'comment_post_ID' => self::$post_id, ) ); add_comment_meta( $comments[1], 'foo', 'bar' ); add_action( 'pre_get_comments', array( $this, 'modify_meta_params' ) ); $q = new WP_Comment_Query( array( 'comment_post_ID' => self::$post_id, 'fields' => 'ids', ) ); remove_action( 'pre_get_comments', array( $this, 'modify_meta_params' ) ); $this->assertSameSets( array( $comments[1] ), $q->comments ); } public function modify_meta_params( $q ) { $q->query_vars['meta_key'] = 'foo'; $q->query_vars['meta_value'] = 'bar'; } /** * @ticket 33882 * * @covers WP_Comment_Query::__construct */ public function test_parent__in() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_parent' => $c1, ) ); $ids = new WP_Comment_Query( array( 'comment_post_ID' => self::$post_id, 'fields' => 'ids', 'parent__in' => array( $c1 ), ) ); $this->assertSameSets( array( $c2 ), $ids->comments ); } /** * @ticket 33882 * * @covers WP_Comment_Query::__construct */ public function test_parent__in_commas() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_parent' => $c1, ) ); $c4 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_parent' => $c2, ) ); $ids = new WP_Comment_Query( array( 'comment_post_ID' => self::$post_id, 'fields' => 'ids', 'parent__in' => "$c1,$c2", ) ); $this->assertSameSets( array( $c3, $c4 ), $ids->comments ); } /** * @ticket 33882 * * @covers WP_Comment_Query::__construct */ public function test_parent__not_in() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_parent' => $c1, ) ); $ids = new WP_Comment_Query( array( 'comment_post_ID' => self::$post_id, 'fields' => 'ids', 'parent__not_in' => array( $c1 ), ) ); $this->assertSameSets( array( $c1 ), $ids->comments ); } /** * @ticket 33882 * * @covers WP_Comment_Query::__construct */ public function test_parent__not_in_commas() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_parent' => $c1, ) ); self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_parent' => $c2, ) ); $ids = new WP_Comment_Query( array( 'comment_post_ID' => self::$post_id, 'fields' => 'ids', 'parent__not_in' => "$c1,$c2", ) ); $this->assertSameSets( array( $c1, $c2 ), $ids->comments ); } /** * @ticket 33883 * * @covers WP_Comment_Query::__construct */ public function test_orderby_comment__in() { self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $ids = new WP_Comment_Query( array( 'fields' => 'ids', 'comment__in' => array( $c2, $c3 ), 'orderby' => 'comment__in', ) ); $this->assertSame( array( $c2, $c3 ), $ids->comments ); } /** * @ticket 8071 * * @covers WP_Comment_Query::__construct */ public function test_no_found_rows_should_default_to_true() { $comments = self::factory()->comment->create_many( 3, array( 'comment_post_ID' => self::$post_id ) ); $q = new WP_Comment_Query( array( 'post_id' => self::$post_id, 'number' => 2, ) ); $this->assertSame( 0, $q->found_comments ); $this->assertSame( 0, $q->max_num_pages ); } /** * @ticket 8071 * * @covers WP_Comment_Query::__construct */ public function test_should_respect_no_found_rows_true() { $comments = self::factory()->comment->create_many( 3, array( 'comment_post_ID' => self::$post_id ) ); $q = new WP_Comment_Query( array( 'post_id' => self::$post_id, 'number' => 2, 'no_found_rows' => true, ) ); $this->assertSame( 0, $q->found_comments ); $this->assertSame( 0, $q->max_num_pages ); } /** * @ticket 8071 * * @covers WP_Comment_Query::__construct */ public function test_should_respect_no_found_rows_false() { $comments = self::factory()->comment->create_many( 3, array( 'comment_post_ID' => self::$post_id ) ); $q = new WP_Comment_Query( array( 'post_id' => self::$post_id, 'number' => 2, 'no_found_rows' => false, ) ); $this->assertSame( 3, $q->found_comments ); $this->assertSame( 2, $q->max_num_pages ); } /** * @ticket 37184 * * @covers WP_Comment_Query::__construct */ public function test_found_rows_should_be_fetched_from_the_cache() { $comments = self::factory()->comment->create_many( 3, array( 'comment_post_ID' => self::$post_id ) ); // Prime cache. new WP_Comment_Query( array( 'post_id' => self::$post_id, 'number' => 2, 'no_found_rows' => false, ) ); $q = new WP_Comment_Query( array( 'post_id' => self::$post_id, 'number' => 2, 'no_found_rows' => false, ) ); $this->assertSame( 3, $q->found_comments ); $this->assertSame( 2, $q->max_num_pages ); } /** * @ticket 8071 * * @covers WP_Comment_Query::__construct */ public function test_hierarchical_should_skip_child_comments_in_offset() { $top_level_0 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $child_of_0 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_parent' => $top_level_0, ) ); $top_level_comments = self::factory()->comment->create_many( 3, array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $q = new WP_Comment_Query( array( 'post_id' => self::$post_id, 'hierarchical' => 'flat', 'number' => 2, 'offset' => 1, 'orderby' => 'comment_ID', 'order' => 'ASC', 'fields' => 'ids', ) ); $this->assertSame( array( $top_level_comments[0], $top_level_comments[1] ), $q->comments ); } /** * @ticket 8071 * * @covers WP_Comment_Query::__construct */ public function test_hierarchical_should_not_include_child_comments_in_number() { $top_level_0 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $child_of_0 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_parent' => $top_level_0, ) ); $top_level_comments = self::factory()->comment->create_many( 3, array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $q = new WP_Comment_Query( array( 'post_id' => self::$post_id, 'hierarchical' => 'flat', 'number' => 2, 'orderby' => 'comment_ID', 'order' => 'ASC', ) ); $this->assertEqualSets( array( $top_level_0, $child_of_0, $top_level_comments[0] ), wp_list_pluck( $q->comments, 'comment_ID' ) ); } /** * @ticket 8071 * * @covers WP_Comment_Query::__construct */ public function test_hierarchical_threaded() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_parent' => $c1, ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_parent' => $c2, ) ); $c4 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_parent' => $c1, ) ); $c5 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $c6 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_parent' => $c5, ) ); $args = array( 'hierarchical' => 'threaded', 'orderby' => 'comment_ID', 'order' => 'ASC', ); $query_args = array_merge( $args, array( 'post_id' => self::$post_id, ) ); $q = new WP_Comment_Query( $query_args ); // Top-level comments. $this->assertEqualSets( array( $c1, $c5 ), array_values( wp_list_pluck( $q->comments, 'comment_ID' ) ) ); // Direct descendants of $c1. $this->assertEqualSets( array( $c2, $c4 ), array_values( wp_list_pluck( $q->comments[ $c1 ]->get_children( $args ), 'comment_ID' ) ) ); // Direct descendants of $c2. $this->assertEqualSets( array( $c3 ), array_values( wp_list_pluck( $q->comments[ $c1 ]->get_child( $c2 )->get_children( $args ), 'comment_ID' ) ) ); // Direct descendants of $c5. $this->assertEqualSets( array( $c6 ), array_values( wp_list_pluck( $q->comments[ $c5 ]->get_children( $args ), 'comment_ID' ) ) ); } /** * @ticket 8071 * * @covers WP_Comment_Query::__construct */ public function test_hierarchical_threaded_approved() { $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_parent' => $c1, ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '0', 'comment_parent' => $c2, ) ); $c4 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_parent' => $c1, ) ); $c5 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_parent' => $c5, ) ); $args = array( 'hierarchical' => 'threaded', 'status' => 'approve', 'orderby' => 'comment_ID', 'order' => 'ASC', ); $query_args = array_merge( $args, array( 'post_id' => self::$post_id, ) ); $q = new WP_Comment_Query( $query_args ); // Top-level comments. $this->assertEqualSets( array( $c1, $c5 ), array_values( wp_list_pluck( $q->comments, 'comment_ID' ) ) ); // Direct descendants of $c1. $this->assertEqualSets( array( $c2, $c4 ), array_values( wp_list_pluck( $q->comments[ $c1 ]->get_children( $args ), 'comment_ID' ) ) ); // Direct descendants of $c2. $this->assertEqualSets( array(), array_values( wp_list_pluck( $q->comments[ $c1 ]->get_child( $c2 )->get_children( $args ), 'comment_ID' ) ) ); } /** * @ticket 35192 * * @covers WP_Comment_Query::__construct */ public function your_sha256_hashilling_descendants() { $top_level_0 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $child1_of_0 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_parent' => $top_level_0, ) ); $child2_of_0 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_parent' => $top_level_0, ) ); $top_level_comments = self::factory()->comment->create_many( 3, array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $this->to_exclude = array( $child2_of_0, $top_level_comments[1] ); add_filter( 'comments_clauses', array( $this, 'prepend_exclusions' ) ); $q = new WP_Comment_Query( array( 'post_id' => self::$post_id, 'hierarchical' => 'flat', ) ); remove_filter( 'comments_clauses', array( $this, 'prepend_exclusions' ) ); $this->assertEqualSets( array( $top_level_0, $child1_of_0, $top_level_comments[0], $top_level_comments[2] ), wp_list_pluck( $q->comments, 'comment_ID' ) ); } public function prepend_exclusions( $clauses ) { global $wpdb; $clauses['where'] = $wpdb->prepare( 'comment_ID != %d AND comment_ID != %d AND ', $this->to_exclude[0], $this->to_exclude[1] ) . $clauses['where']; return $clauses; } /** * @ticket 35192 * * @covers WP_Comment_Query::__construct */ public function your_sha256_hashlling_descendants() { $top_level_0 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $child1_of_0 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_parent' => $top_level_0, ) ); $child2_of_0 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_parent' => $top_level_0, ) ); $top_level_comments = self::factory()->comment->create_many( 3, array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $this->to_exclude = array( $child2_of_0, $top_level_comments[1] ); add_filter( 'comments_clauses', array( $this, 'append_exclusions' ) ); $q = new WP_Comment_Query( array( 'post_id' => self::$post_id, 'hierarchical' => 'flat', ) ); remove_filter( 'comments_clauses', array( $this, 'append_exclusions' ) ); $this->assertEqualSets( array( $top_level_0, $child1_of_0, $top_level_comments[0], $top_level_comments[2] ), wp_list_pluck( $q->comments, 'comment_ID' ) ); } public function append_exclusions( $clauses ) { global $wpdb; $clauses['where'] .= $wpdb->prepare( ' AND comment_ID != %d AND comment_ID != %d', $this->to_exclude[0], $this->to_exclude[1] ); return $clauses; } /** * @ticket 36487 * * @covers WP_Comment_Query::__construct */ public function test_cache_should_be_hit_when_querying_descendants() { global $wpdb; $p = self::factory()->post->create(); $comment_1 = self::factory()->comment->create( array( 'comment_post_ID' => $p, 'comment_approved' => '1', ) ); $comment_2 = self::factory()->comment->create( array( 'comment_post_ID' => $p, 'comment_approved' => '1', 'comment_parent' => $comment_1, ) ); $comment_3 = self::factory()->comment->create( array( 'comment_post_ID' => $p, 'comment_approved' => '1', 'comment_parent' => $comment_1, ) ); $comment_4 = self::factory()->comment->create( array( 'comment_post_ID' => $p, 'comment_approved' => '1', 'comment_parent' => $comment_2, ) ); $q1 = new WP_Comment_Query( array( 'post_id' => $p, 'hierarchical' => true, ) ); $q1_ids = wp_list_pluck( $q1->comments, 'comment_ID' ); $num_queries = get_num_queries(); $q2 = new WP_Comment_Query( array( 'post_id' => $p, 'hierarchical' => true, ) ); $q2_ids = wp_list_pluck( $q2->comments, 'comment_ID' ); $this->assertSameSets( $q1_ids, $q2_ids ); $this->assertSame( $num_queries, get_num_queries() ); } /** * @ticket 37696 * * @covers WP_Comment_Query::__construct */ public function test_hierarchy_should_be_filled_when_cache_is_incomplete() { global $wpdb; $p = self::factory()->post->create(); $comment_1 = self::factory()->comment->create( array( 'comment_post_ID' => $p, 'comment_approved' => '1', ) ); $comment_2 = self::factory()->comment->create( array( 'comment_post_ID' => $p, 'comment_approved' => '1', 'comment_parent' => $comment_1, ) ); $comment_3 = self::factory()->comment->create( array( 'comment_post_ID' => $p, 'comment_approved' => '1', 'comment_parent' => $comment_1, ) ); $comment_4 = self::factory()->comment->create( array( 'comment_post_ID' => $p, 'comment_approved' => '1', 'comment_parent' => $comment_2, ) ); // Prime cache. $q1 = new WP_Comment_Query( array( 'post_id' => $p, 'hierarchical' => true, ) ); $q1_ids = wp_list_pluck( $q1->comments, 'comment_ID' ); $this->assertEqualSets( array( $comment_1, $comment_2, $comment_3, $comment_4 ), $q1_ids ); // Delete one of the parent caches. $last_changed = wp_cache_get( 'last_changed', 'comment' ); $key = md5( serialize( wp_array_slice_assoc( $q1->query_vars, array_keys( $q1->query_var_defaults ) ) ) ); $cache_key = "get_comment_child_ids:$comment_2:$key:$last_changed"; wp_cache_delete( $cache_key, 'comment' ); $q2 = new WP_Comment_Query( array( 'post_id' => $p, 'hierarchical' => true, ) ); $q2_ids = wp_list_pluck( $q2->comments, 'comment_ID' ); $this->assertSameSets( $q1_ids, $q2_ids ); } /** * @ticket 37966 * @ticket 37696 * * @covers WP_Comment_Query::query */ public function test_fill_hierarchy_should_disregard_offset_and_number() { $c0 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $c1 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $c2 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_parent' => $c1, ) ); $c3 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $c4 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_parent' => $c3, ) ); $c5 = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', 'comment_parent' => $c3, ) ); $q = new WP_Comment_Query(); $found = $q->query( array( 'orderby' => 'comment_date_gmt', 'order' => 'ASC', 'status' => 'approve', 'post_id' => self::$post_id, 'no_found_rows' => false, 'hierarchical' => 'threaded', 'number' => 2, 'offset' => 1, ) ); $found_1 = $found[ $c1 ]; $children_1 = $found_1->get_children(); $this->assertSameSets( array( $c2 ), array_keys( $children_1 ) ); $found_3 = $found[ $c3 ]; $children_3 = $found_3->get_children(); $this->assertSameSets( array( $c4, $c5 ), array_keys( $children_3 ) ); } /** * @ticket 27571 * * @covers WP_Comment_Query::__construct */ public function test_update_comment_post_cache_should_be_disabled_by_default() { global $wpdb; $p = self::factory()->post->create(); $c = self::factory()->comment->create( array( 'comment_post_ID' => $p ) ); $q = new WP_Comment_Query( array( 'post_ID' => $p, ) ); $num_queries = get_num_queries(); $this->assertTrue( isset( $q->comments[0]->post_name ) ); $this->assertSame( $num_queries + 1, get_num_queries() ); } /** * @ticket 27571 * * @covers WP_Comment_Query::__construct */ public function test_should_respect_update_comment_post_cache_true() { global $wpdb; $p = self::factory()->post->create(); $c = self::factory()->comment->create( array( 'comment_post_ID' => $p ) ); $q = new WP_Comment_Query( array( 'post_ID' => $p, 'update_comment_post_cache' => true, ) ); $num_queries = get_num_queries(); $this->assertTrue( isset( $q->comments[0]->post_name ) ); $this->assertSame( $num_queries, get_num_queries() ); } /** * @ticket 34138 * * @covers WP_Comment_Query::__construct */ public function test_comment_objects_should_be_filled_from_cache() { global $wpdb; $comments = self::factory()->comment->create_many( 3, array( 'comment_post_ID' => self::$post_id ) ); clean_comment_cache( $comments ); $num_queries = get_num_queries(); $q = new WP_Comment_Query( array( 'post_id' => self::$post_id, 'no_found_rows' => true, 'update_comment_post_cache' => false, 'update_comment_meta_cache' => false, ) ); // 2 queries should have been fired: one for IDs, one to prime comment caches. $num_queries += 2; $found = wp_list_pluck( $q->comments, 'comment_ID' ); $this->assertEqualSets( $comments, $found ); $this->assertSame( $num_queries, get_num_queries() ); } /** * @ticket 34138 * * @covers WP_Comment_Query::__construct */ public function your_sha256_hashd_cache_addition() { $suspend = wp_suspend_cache_addition(); wp_suspend_cache_addition( true ); $c = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id ) ); $q = new WP_Comment_Query( array( 'post_id' => self::$post_id, ) ); wp_suspend_cache_addition( $suspend ); $found = wp_list_pluck( $q->comments, 'comment_ID' ); $this->assertEqualSets( array( $c ), $found ); } /** * @covers WP_Comment_Query::__construct */ public function test_comment_query_should_be_cached() { global $wpdb; $c = wp_insert_comment( array( 'comment_author' => 'Foo', 'comment_author_email' => 'foo@example.com', 'comment_post_ID' => self::$post_id, ) ); $q = new WP_Comment_Query( array( 'post_id' => self::$post_id, 'fields' => 'ids', ) ); $num_queries = get_num_queries(); $q2 = new WP_Comment_Query( array( 'post_id' => self::$post_id, 'fields' => 'ids', ) ); $this->assertSame( $num_queries, get_num_queries() ); } /** * @covers WP_Comment_Query::__construct */ public function test_created_comment_should_invalidate_query_cache() { global $wpdb; $c = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $q = new WP_Comment_Query( array( 'post_id' => self::$post_id, 'fields' => 'ids', ) ); $num_queries = get_num_queries(); $q = new WP_Comment_Query( array( 'post_id' => self::$post_id, 'fields' => 'ids', ) ); $this->assertSame( $num_queries, get_num_queries() ); $this->assertSameSets( array( $c ), $q->comments ); } /** * @covers WP_Comment_Query::__construct */ public function test_updated_comment_should_invalidate_query_cache() { global $wpdb; $c = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $q = new WP_Comment_Query( array( 'post_id' => self::$post_id, 'fields' => 'ids', ) ); wp_update_comment( array( 'comment_ID' => $c, 'comment_author' => 'Foo', 'comment_author_email' => 'foo@example.com', 'comment_post_ID' => self::$post_id, ) ); $num_queries = get_num_queries(); $q = new WP_Comment_Query( array( 'post_id' => self::$post_id, 'fields' => 'ids', ) ); ++$num_queries; $this->assertSame( $num_queries, get_num_queries() ); $this->assertSameSets( array( $c ), $q->comments ); } /** * @covers WP_Comment_Query::__construct */ public function test_deleted_comment_should_invalidate_query_cache() { global $wpdb; $c = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $q = new WP_Comment_Query( array( 'post_id' => self::$post_id, 'fields' => 'ids', ) ); wp_delete_comment( $c ); $num_queries = get_num_queries(); $q = new WP_Comment_Query( array( 'post_id' => self::$post_id, 'fields' => 'ids', ) ); ++$num_queries; $this->assertSame( $num_queries, get_num_queries() ); $this->assertSameSets( array(), $q->comments ); } /** * @covers WP_Comment_Query::__construct */ public function test_trashed_comment_should_invalidate_query_cache() { global $wpdb; $c = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $q = new WP_Comment_Query( array( 'post_id' => self::$post_id, 'fields' => 'ids', ) ); wp_trash_comment( $c ); $num_queries = get_num_queries(); $q = new WP_Comment_Query( array( 'post_id' => self::$post_id, 'fields' => 'ids', ) ); ++$num_queries; $this->assertSame( $num_queries, get_num_queries() ); $this->assertSameSets( array(), $q->comments ); } /** * @covers WP_Comment_Query::__construct */ public function test_untrashed_comment_should_invalidate_query_cache() { global $wpdb; $c = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); wp_trash_comment( $c ); $q = new WP_Comment_Query( array( 'post_id' => self::$post_id, 'fields' => 'ids', ) ); wp_untrash_comment( $c ); $num_queries = get_num_queries(); $q = new WP_Comment_Query( array( 'post_id' => self::$post_id, 'fields' => 'ids', ) ); ++$num_queries; $this->assertSame( $num_queries, get_num_queries() ); $this->assertSameSets( array( $c ), $q->comments ); } /** * @covers WP_Comment_Query::__construct */ public function test_spammed_comment_should_invalidate_query_cache() { global $wpdb; $c = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); $q = new WP_Comment_Query( array( 'post_id' => self::$post_id, 'fields' => 'ids', ) ); wp_spam_comment( $c ); $num_queries = get_num_queries(); $q = new WP_Comment_Query( array( 'post_id' => self::$post_id, 'fields' => 'ids', ) ); ++$num_queries; $this->assertSame( $num_queries, get_num_queries() ); $this->assertSameSets( array(), $q->comments ); } /** * @covers WP_Comment_Query::__construct */ public function test_unspammed_comment_should_invalidate_query_cache() { global $wpdb; $c = self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'comment_approved' => '1', ) ); wp_spam_comment( $c ); $q = new WP_Comment_Query( array( 'post_id' => self::$post_id, 'fields' => 'ids', ) ); wp_unspam_comment( $c ); $num_queries = get_num_queries(); $q = new WP_Comment_Query( array( 'post_id' => self::$post_id, 'fields' => 'ids', ) ); ++$num_queries; $this->assertSame( $num_queries, get_num_queries() ); $this->assertSameSets( array( $c ), $q->comments ); } /** * @ticket 41348 * * @covers WP_Comment_Query::query */ public function test_count_query_should_miss_noncount_cache() { global $wpdb; $q = new WP_Comment_Query(); $query_1 = $q->query( array( 'fields' => 'ids', 'number' => 3, 'order' => 'ASC', ) ); $number_of_queries = get_num_queries(); $query_2 = $q->query( array( 'fields' => 'ids', 'number' => 3, 'order' => 'ASC', 'count' => true, ) ); $this->assertSame( $number_of_queries + 1, get_num_queries() ); } /** * @ticket 41348 * * @covers WP_Comment_Query::query */ public function test_count_query_should_hit_count_cache() { global $wpdb; $q = new WP_Comment_Query(); $query_1 = $q->query( array( 'fields' => 'ids', 'number' => 3, 'orderby' => 'none', 'count' => true, ) ); $number_of_queries = get_num_queries(); $query_2 = $q->query( array( 'fields' => 'ids', 'number' => 3, 'orderby' => 'none', 'count' => true, ) ); $this->assertSame( $number_of_queries, get_num_queries() ); } /** * @ticket 41348 * * @covers WP_Comment_Query::query */ public function test_different_values_of_fields_should_share_cached_values() { global $wpdb; $q = new WP_Comment_Query(); $query_1 = $q->query( array( 'fields' => 'all', 'number' => 3, 'order' => 'ASC', ) ); $number_of_queries = get_num_queries(); $query_2 = $q->query( array( 'fields' => 'ids', 'number' => 3, 'order' => 'ASC', ) ); $this->assertSame( $number_of_queries, get_num_queries() ); } /** * @ticket 40669 * * @covers ::get_comments */ public function test_add_comment_meta_should_invalidate_query_cache() { global $wpdb; $p = self::factory()->post->create( array( 'post_status' => 'publish' ) ); $c1 = self::factory()->comment->create_post_comments( $p, 1 ); $c2 = self::factory()->comment->create_post_comments( $p, 1 ); foreach ( $c1 as $cid ) { add_comment_meta( $cid, 'sauce', 'fire' ); } $cached = get_comments( array( 'post_id' => $p, 'fields' => 'ids', 'meta_query' => array( array( 'key' => 'sauce', 'value' => 'fire', ), ), ) ); $this->assertSameSets( $c1, $cached ); foreach ( $c2 as $cid ) { add_comment_meta( $cid, 'sauce', 'fire' ); } $found = get_comments( array( 'post_id' => $p, 'fields' => 'ids', 'meta_query' => array( array( 'key' => 'sauce', 'value' => 'fire', ), ), ) ); $this->assertSameSets( array_merge( $c1, $c2 ), $found ); } /** * @ticket 40669 * * @covers ::get_comments */ public function test_update_comment_meta_should_invalidate_query_cache() { global $wpdb; $p = self::factory()->post->create( array( 'post_status' => 'publish' ) ); $c1 = self::factory()->comment->create_post_comments( $p, 1 ); $c2 = self::factory()->comment->create_post_comments( $p, 1 ); foreach ( array_merge( $c1, $c2 ) as $cid ) { add_comment_meta( $cid, 'sauce', 'fire' ); } $cached = get_comments( array( 'post_id' => $p, 'fields' => 'ids', 'meta_query' => array( array( 'key' => 'sauce', 'value' => 'fire', ), ), ) ); $this->assertSameSets( array_merge( $c1, $c2 ), $cached ); foreach ( $c2 as $cid ) { update_comment_meta( $cid, 'sauce', 'foo' ); } $found = get_comments( array( 'post_id' => $p, 'fields' => 'ids', 'meta_query' => array( array( 'key' => 'sauce', 'value' => 'fire', ), ), ) ); $this->assertSameSets( $c1, $found ); } /** * @ticket 40669 * * @covers ::get_comments */ public function test_delete_comment_meta_should_invalidate_query_cache() { global $wpdb; $p = self::factory()->post->create( array( 'post_status' => 'publish' ) ); $c1 = self::factory()->comment->create_post_comments( $p, 1 ); $c2 = self::factory()->comment->create_post_comments( $p, 1 ); foreach ( array_merge( $c1, $c2 ) as $cid ) { add_comment_meta( $cid, 'sauce', 'fire' ); } $cached = get_comments( array( 'post_id' => $p, 'fields' => 'ids', 'meta_query' => array( array( 'key' => 'sauce', 'value' => 'fire', ), ), ) ); $this->assertSameSets( array_merge( $c1, $c2 ), $cached ); foreach ( $c2 as $cid ) { delete_comment_meta( $cid, 'sauce' ); } $found = get_comments( array( 'post_id' => $p, 'fields' => 'ids', 'meta_query' => array( array( 'key' => 'sauce', 'value' => 'fire', ), ), ) ); $this->assertSameSets( $c1, $found ); } /** * @ticket 45800 * * @covers WP_Comment_Query::query */ public function test_comments_pre_query_filter_should_bypass_database_query() { global $wpdb; add_filter( 'comments_pre_query', array( __CLASS__, 'filter_comments_pre_query' ), 10, 2 ); $num_queries = get_num_queries(); $q = new WP_Comment_Query(); $results = $q->query( array() ); remove_filter( 'comments_pre_query', array( __CLASS__, 'filter_comments_pre_query' ), 10, 2 ); // Make sure no queries were executed. $this->assertSame( $num_queries, get_num_queries() ); // We manually inserted a non-existing site and overrode the results with it. $this->assertSame( array( 555 ), $results ); // Make sure manually setting found_comments doesn't get overwritten. $this->assertSame( 1, $q->found_comments ); } public static function filter_comments_pre_query( $comments, $query ) { $query->found_comments = 1; return array( 555 ); } /** * @ticket 50521 * * @covers WP_Comment_Query::query */ public function test_comments_pre_query_filter_should_set_comments_property() { add_filter( 'comments_pre_query', array( __CLASS__, 'filter_comments_pre_query_and_set_comments' ), 10, 2 ); $q = new WP_Comment_Query(); $results = $q->query( array() ); remove_filter( 'comments_pre_query', array( __CLASS__, 'filter_comments_pre_query_and_set_comments' ), 10 ); // Make sure the comments property is the same as the results. $this->assertSame( $results, $q->comments ); // Make sure the comment type is `foobar`. $this->assertSame( 'foobar', $q->comments[0]->comment_type ); } public static function filter_comments_pre_query_and_set_comments( $comments, $query ) { $c = self::factory()->comment->create( array( 'comment_type' => 'foobar', 'comment_approved' => '1', ) ); return array( get_comment( $c ) ); } /** * @ticket 55460 * * @covers WP_Comment_Query::__construct */ public function test_comment_cache_key_should_ignore_unset_params() { $p = self::factory()->post->create(); $c = self::factory()->comment->create( array( 'comment_post_ID' => $p ) ); $_args = array( 'post_id' => $p, 'fields' => 'ids', 'update_comment_meta_cache' => true, 'update_comment_post_cache' => false, ); $q1 = new WP_Comment_Query(); $q1->query( $_args ); $num_queries_all_args = get_num_queries(); // Ignore 'fields', 'update_comment_meta_cache', 'update_comment_post_cache'. unset( $_args['fields'], $_args['update_comment_meta_cache'], $_args['update_comment_post_cache'] ); $q2 = new WP_Comment_Query(); $q2->query( $_args ); $this->assertSame( $num_queries_all_args, get_num_queries() ); } /** * @ticket 55218 * * @covers WP_Comment_Query::__construct */ public function your_sha256_hashus_identifier_error() { $p = self::$post_id; $c = self::factory()->comment->create( array( 'comment_post_ID' => $p, 'comment_content' => '1', 'comment_approved' => '0', 'comment_date_gmt' => gmdate( 'Y-m-d H:i:s', time() ), 'comment_author_email' => 'foo@bar.mail', 'comment_meta' => array( 'foo' => 'bar' ), ) ); $comment = get_comment( $c ); /* * This is used to get a bunch of globals set up prior to making the * database query. This helps with prepping for the moderation hash. */ $this->go_to( add_query_arg( array( 'unapproved' => $comment->comment_ID, 'moderation-hash' => wp_hash( $comment->comment_date_gmt ), ), get_comment_link( $comment ) ) ); /* * The result of the query is not needed so it's not assigned to variable. * * Returning the ID only limits the database query to only the one that was * causing the error reported in ticket 55218. */ new WP_Comment_Query( array( 'include_unapproved' => array( 'foo@bar.mail' ), 'meta_query' => array( array( 'key' => 'foo' ) ), 'post_id' => $p, 'fields' => 'ids', ) ); global $wpdb; $this->assertNotSame( "Column 'comment_ID' in where clause is ambiguous", $wpdb->last_error ); $this->assertStringNotContainsString( ' comment_ID ', $wpdb->last_query ); } /** * @ticket 56841 */ public function test_query_does_not_have_leading_whitespace() { self::factory()->comment->create( array( 'comment_post_ID' => self::$post_id, 'user_id' => 7, ) ); $q = new WP_Comment_Query(); $q->query( array( 'count' => true, 'orderby' => 'none', ) ); $this->assertSame( ltrim( $q->request ), $q->request, 'The query has leading whitespace' ); } } ```
George Lowe (born 22 October 1989 in England), is an English former rugby union player for Harlequins. He played as a Centre or on the Wing. Lowe made his first grade debut in the Premiership for Harlequins against Wasps on 5 September 2009. Lowe joined the Quins Academy Professionals in summer 2008, after leaving Epsom College, where he played in their first XV. He represented Surrey U18s, and also played for Harlequins in the A league whilst still a schoolboy. Lowe was called up to the England U20s squad for the U20 Six Nations, where he was in fine try-scoring form, and continued to represent England U20s throughout the Junior World Championship in the summer of 2009. An impressive 2010/11 season saw him help Quins claim the Amlin Challenge Cup and get shortlisted for the Land Rover Discovery of the Season. In the 2011/12 season, Lowe was a key part of the Harlequins team which won the Aviva Premiership for the first time in their history. Lowe started the final against Leicester Tigers, helping Harlequins to a 33–23 win. His efforts throughout the season saw him get included in Stuart Lancaster's England squad for the 2012 Summer tour to South Africa. In the summer of 2012, his body nutrition shakes, "Lowetein", was released. On 30 August 2017 Lowe announced his retirement from Rugby Union due to neck and back injuries. References External links Harlequins profile 1989 births Living people English rugby union players Harlequin F.C. players People educated at Epsom College Rugby union players from Kingston upon Thames Rugby union centres Rugby union wings
The men's 100 kg competition in judo at the 2018 Mediterranean Games was held on 29 June at the Cambrils Pavilion in Cambrils. Schedule All times are Central European Summer Time (UTC+2). Results Main Round Repechage References External links M100 2018
Massimo De Martin (born January 3, 1983 in Belluno) is an Italian professional football player who is currently unattached. He played in the Serie B for Vicenza Calcio. External links 1983 births Living people Italian men's footballers Serie B players AC Prato players LR Vicenza players AC Pavia 1911 SSD players SSD Virtus CiseranoBergamo 1909 players ASD Sangiovannese 1927 players Men's association football forwards People from Belluno Footballers from Veneto
```java /* */ package akka.http.javadsl.model; /** * Contains constants of the supported Http protocols. */ public final class HttpProtocols { private HttpProtocols() {} public final static HttpProtocol HTTP_1_0 = akka.http.scaladsl.model.HttpProtocols.HTTP$div1$u002E0(); public final static HttpProtocol HTTP_1_1 = akka.http.scaladsl.model.HttpProtocols.HTTP$div1$u002E1(); } ```
The year 699 BC was a year of the pre-Julian Roman calendar. In the Roman Empire, it was known as year 55 Ab urbe condita . The denomination 699 BC for this year has been used since the early medieval period, when the Anno Domini calendar era became the prevalent method in Europe for naming years. Events By place Middle East Hallashu-Inshushinak succeeds Shuttir-Nakhkhunte as king of the Elamite Empire. Manasseh succeeds Hezekiah as king of Judah. The first king who did not have an experience with the Kingdom of Israel, Manasseh ruled with his mother, Hephzibah, as regent. Sennacherib carries out his fifth military campaign in Babylonia, a series of raids against the villages around the foot of Mount Judi, located to the northeast of Nineveh. Births Deaths References
```ruby # frozen_string_literal: true module Admin class BaseController < ApplicationController include Authorization include AccountableConcern layout 'admin' before_action :set_body_classes before_action :set_cache_headers after_action :verify_authorized private def set_body_classes @body_classes = 'admin' end def set_cache_headers response.cache_control.replace(private: true, no_store: true) end def set_user @user = Account.find(params[:account_id]).user || raise(ActiveRecord::RecordNotFound) end end end ```
Aphaenops cerberus is a species of beetle in the subfamily Trechinae. It was described by Dieck in 1869. References cerberus Beetles described in 1869
Brazilian Civil Rights Framework for the Internet (in Portuguese: Marco Civil da Internet, officially (Federal) Law No 12.965/2014) is the law that governs the use of the Internet in Brazil and sets out guidelines for state action and rights and duties for users and operators. The bill was approved by the Brazilian Congress Câmara dos Deputados on March 25, 2014 and was submitted to the Senado Federal. The Marco Civil was approved by the Brazilian Senate on April 22, 2014 and signed into law by president Dilma Rousseff on April 23, 2014, at the Global Multistakeholder Meeting on the Future of Internet Governance. History The project was created in partnership between the Ministry of Justice and the Center for Technology and Society of the Law School at the Fundação Getúlio Vargas, at the time directed by professor Ronaldo Lemos. Both institutions launched on October 29, 2009 the first draft phase of a collaborative process to build the draft for the Marco Civil. The Marco Civil is aimed at protecting privacy rights, net neutrality, safe-harbors for internet service providers and online service providers, open government, and setting forth that access to the internet is a requisite to the exercise for civic rights. The first round of the draft took place between October 29 and December 17, 2009. More than 800 substantive contributions were received, including comments, e-mails, alternative drafts and references. The conception of the Marco Civil was originally created by professor Ronaldo Lemos, in an article published on May 22, 2007. Following the first round of discussions, the draft was published for public comments, throughout a collaborative process. The debates of the second phase took place between April 8 and May 30, 2010. On August 24, 2011, the draft bill was not only approved by the Executive Government in Brazil through the Brazilian Presidency, but also sent to Congress by President Dilma Rousseff, with the support of four Ministries (Justice, Science & Technology, Planning, and Communications). In Congress, the draft bill was received and processed under docket number 2126/2011. The Marco Civil was described by the then Ministry of Justice, Luiz Paulo Barreto as "The Constitution of the Internet" in Brazil. The project was scheduled to be voted several times in November 2012. An English/Portuguese translation, with changes marked in the Portuguese, was published circa November 18, 2013. As a reaction to the allegations of NSA monitoring Brazil's telecoms networks, passing the Marco Civil (which is often called "The Internet Constitution" in Brazil) has become a priority reaction for the Brazilian Government, as affirmed by President Dilma Rousseff during her speech to the 68th Session of the United Nations General Assembly, on September 24, 2013. An unofficial translation into English was made available by Paulo Rená in March 2014. Controversy In 2012 the National Association of Federal Police Chiefs issued a press release arguing the law was unconstitutional. English Version of the approved Marco Civil The approved law was translated into English by Carolina Rossini and distributed to all participants of the Global Multistakeholder Meeting on the Future of Internet Governance. This final version of April 2014 is available at publicknowledge.org. The Chamber of Deputies has also made an English translation available. References External links . Internet in Brazil Net neutrality Digital rights
Goradil (also, Gerodil’, Goradil’, and Gorodil’) is a village and the least populous municipality in the Absheron Rayon of Azerbaijan. It has a population of 2000. References Populated places in Absheron District
The Forum CentraleSupélec is an annual meeting that brings together companies and students from École Centrale Paris and Supélec. Taking place yearly at the Palais des Congrès in the heart of Paris, it aims at giving the students a first perception of the career prospect offered by their diploma. Over 3200 students participate every year to meet about 190 companies and several partner universities from all around the world. It remains one of the most important job fairs organised by French engineering schools (Grandes Écoles) and amongst the biggest in Europe. Past activities École Centrale Paris and Supélec are amongst the most prestigious engineering schools in France. They offer multidisciplinary curriculum for engineers, including scientific, engineering and management education. Since December 2008, a strategic alliance was announced between the two schools, known today through the common brand of CentraleSupélec. The merge between the job fairs organized independently in each one of the schools (the Forum Centrale Entreprises and the Forum Supélec) was brought to fruition in 2010. Since then, it has given rise to three events at the Palais des Congrès. International openness Several international companies and partner foreign universities take part in the Forum Centrale-Supélec. It is an opportunity for companies to present their international careers and business activities to the students. Since 2011 the Forum Centrale-Supélec has been part of the ECFA (European Career Forums Alliance), of which the Forum Centrale Entreprises was a founding member. Key figures The third edition of the Forum Centrale-Supélec has gathered 180 companies, including 86 École Centrale Paris or Supélec partners, and several CAC 40 firms. 16 universities contributed to the Forum, and one stand was occupied by the Administration of École Centrale Paris and Supélec in charge of international mobility. Among the 3200 students who attended the Forum Centrale-Supélec in 2012, 75% were from École Centrale Paris or Supélec ; 15% were studying master's degree at either engineering school, 5% were researchers and the last 5% were alumni students. In the day the Forum Centrale-Supélec takes place, about 90 students work on its organisation. Provided services to students Three weeks before the Forum, each school organises training activities to prepare the students for the event. Members of human resources from participating companies are invited to help. Activities include lectures on how to write a CV, job interview simulation in French and English, case studies, brainteasers, etc. Closing conference The event concludes with a conference in the auditorium of the Palais des Congrès held by a CEO of a large European industrial company. The Forum Centrale-Supélec has welcomed: Mr. Gallois, ex-CEO of EADS, in 2010. Mr. Mestrallet, CEO of GDF Suez, in 2011. Mr de Margerie, CEO of Total, in 2012. Mr. Herteman, CEO of Safran, in 2013. Mr. Lévy, CEO of Thales, in 2014. Mr. Oudéa, CEO of Société Générale, in 2015. See also École Centrale Paris Supélec Grandes écoles
```css `inline` element characteristics Default to a transparent `border-color` before adding a border to on `:hover` state elements Combining selectors `:required` and `:optional` pseudo classes Conditional comments ```
```smalltalk using SixLabors.ImageSharp.Processing.Processors.Convolution; namespace SixLabors.ImageSharp.Tests.Processing.Convolution; [Trait("Category", "Processors")] public class KernelSamplingMapTest { [Fact] public void KernalSamplingMap_Kernel5Image7x7RepeatBorder() { var kernelSize = new Size(5, 5); var bounds = new Rectangle(0, 0, 7, 7); var mode = BorderWrappingMode.Repeat; int[] expected = { 0, 0, 0, 1, 2, 0, 0, 1, 2, 3, 0, 1, 2, 3, 4, 1, 2, 3, 4, 5, 2, 3, 4, 5, 6, 3, 4, 5, 6, 6, 4, 5, 6, 6, 6, }; this.AssertOffsets(kernelSize, bounds, mode, mode, expected, expected); } [Fact] public void KernalSamplingMap_Kernel5Image7x7BounceBorder() { var kernelSize = new Size(5, 5); var bounds = new Rectangle(0, 0, 7, 7); var mode = BorderWrappingMode.Bounce; int[] expected = { 2, 1, 0, 1, 2, 1, 0, 1, 2, 3, 0, 1, 2, 3, 4, 1, 2, 3, 4, 5, 2, 3, 4, 5, 6, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, }; this.AssertOffsets(kernelSize, bounds, mode, mode, expected, expected); } [Fact] public void KernalSamplingMap_Kernel5Image7x7MirrorBorder() { var kernelSize = new Size(5, 5); var bounds = new Rectangle(0, 0, 7, 7); var mode = BorderWrappingMode.Mirror; int[] expected = { 1, 0, 0, 1, 2, 0, 0, 1, 2, 3, 0, 1, 2, 3, 4, 1, 2, 3, 4, 5, 2, 3, 4, 5, 6, 3, 4, 5, 6, 6, 4, 5, 6, 6, 5, }; this.AssertOffsets(kernelSize, bounds, mode, mode, expected, expected); } [Fact] public void KernalSamplingMap_Kernel5Image7x7WrapBorder() { var kernelSize = new Size(5, 5); var bounds = new Rectangle(0, 0, 7, 7); var mode = BorderWrappingMode.Wrap; int[] expected = { 5, 6, 0, 1, 2, 6, 0, 1, 2, 3, 0, 1, 2, 3, 4, 1, 2, 3, 4, 5, 2, 3, 4, 5, 6, 3, 4, 5, 6, 0, 4, 5, 6, 0, 1, }; this.AssertOffsets(kernelSize, bounds, mode, mode, expected, expected); } [Fact] public void KernalSamplingMap_Kernel5Image9x9BounceBorder() { var kernelSize = new Size(5, 5); var bounds = new Rectangle(1, 1, 9, 9); var mode = BorderWrappingMode.Bounce; int[] expected = { 3, 2, 1, 2, 3, 2, 1, 2, 3, 4, 1, 2, 3, 4, 5, 2, 3, 4, 5, 6, 3, 4, 5, 6, 7, 4, 5, 6, 7, 8, 5, 6, 7, 8, 9, 6, 7, 8, 9, 8, 7, 8, 9, 8, 7, }; this.AssertOffsets(kernelSize, bounds, mode, mode, expected, expected); } [Fact] public void KernalSamplingMap_Kernel5Image9x9MirrorBorder() { var kernelSize = new Size(5, 5); var bounds = new Rectangle(1, 1, 9, 9); var mode = BorderWrappingMode.Mirror; int[] expected = { 2, 1, 1, 2, 3, 1, 1, 2, 3, 4, 1, 2, 3, 4, 5, 2, 3, 4, 5, 6, 3, 4, 5, 6, 7, 4, 5, 6, 7, 8, 5, 6, 7, 8, 9, 6, 7, 8, 9, 9, 7, 8, 9, 9, 8, }; this.AssertOffsets(kernelSize, bounds, mode, mode, expected, expected); } [Fact] public void KernalSamplingMap_Kernel5Image9x9WrapBorder() { var kernelSize = new Size(5, 5); var bounds = new Rectangle(1, 1, 9, 9); var mode = BorderWrappingMode.Wrap; int[] expected = { 8, 9, 1, 2, 3, 9, 1, 2, 3, 4, 1, 2, 3, 4, 5, 2, 3, 4, 5, 6, 3, 4, 5, 6, 7, 4, 5, 6, 7, 8, 5, 6, 7, 8, 9, 6, 7, 8, 9, 1, 7, 8, 9, 1, 2, }; this.AssertOffsets(kernelSize, bounds, mode, mode, expected, expected); } [Fact] public void KernalSamplingMap_Kernel5Image7x7RepeatBorderTile() { var kernelSize = new Size(5, 5); var bounds = new Rectangle(2, 2, 7, 7); var mode = BorderWrappingMode.Repeat; int[] expected = { 2, 2, 2, 3, 4, 2, 2, 3, 4, 5, 2, 3, 4, 5, 6, 3, 4, 5, 6, 7, 4, 5, 6, 7, 8, 5, 6, 7, 8, 8, 6, 7, 8, 8, 8, }; this.AssertOffsets(kernelSize, bounds, mode, mode, expected, expected); } [Fact] public void KernalSamplingMap_Kernel5Image7x7BounceBorderTile() { var kernelSize = new Size(5, 5); var bounds = new Rectangle(2, 2, 7, 7); var mode = BorderWrappingMode.Bounce; int[] expected = { 4, 3, 2, 3, 4, 3, 2, 3, 4, 5, 2, 3, 4, 5, 6, 3, 4, 5, 6, 7, 4, 5, 6, 7, 8, 5, 6, 7, 8, 7, 6, 7, 8, 7, 6, }; this.AssertOffsets(kernelSize, bounds, mode, mode, expected, expected); } [Fact] public void KernalSamplingMap_Kernel5Image7x7MirrorBorderTile() { var kernelSize = new Size(5, 5); var bounds = new Rectangle(2, 2, 7, 7); var mode = BorderWrappingMode.Mirror; int[] expected = { 3, 2, 2, 3, 4, 2, 2, 3, 4, 5, 2, 3, 4, 5, 6, 3, 4, 5, 6, 7, 4, 5, 6, 7, 8, 5, 6, 7, 8, 8, 6, 7, 8, 8, 7, }; this.AssertOffsets(kernelSize, bounds, mode, mode, expected, expected); } [Fact] public void KernalSamplingMap_Kernel5Image7x7WrapBorderTile() { var kernelSize = new Size(5, 5); var bounds = new Rectangle(2, 2, 7, 7); var mode = BorderWrappingMode.Wrap; int[] expected = { 7, 8, 2, 3, 4, 8, 2, 3, 4, 5, 2, 3, 4, 5, 6, 3, 4, 5, 6, 7, 4, 5, 6, 7, 8, 5, 6, 7, 8, 2, 6, 7, 8, 2, 3, }; this.AssertOffsets(kernelSize, bounds, mode, mode, expected, expected); } [Fact] public void KernalSamplingMap_Kernel3Image7x7RepeatBorder() { var kernelSize = new Size(3, 3); var bounds = new Rectangle(0, 0, 7, 7); var mode = BorderWrappingMode.Repeat; int[] expected = { 0, 0, 1, 0, 1, 2, 1, 2, 3, 2, 3, 4, 3, 4, 5, 4, 5, 6, 5, 6, 6, }; this.AssertOffsets(kernelSize, bounds, mode, mode, expected, expected); } [Fact] public void KernalSamplingMap_Kernel3Image7x7BounceBorder() { var kernelSize = new Size(3, 3); var bounds = new Rectangle(0, 0, 7, 7); var mode = BorderWrappingMode.Bounce; int[] expected = { 1, 0, 1, 0, 1, 2, 1, 2, 3, 2, 3, 4, 3, 4, 5, 4, 5, 6, 5, 6, 5, }; this.AssertOffsets(kernelSize, bounds, mode, mode, expected, expected); } [Fact] public void KernalSamplingMap_Kernel3Image7x7MirrorBorder() { var kernelSize = new Size(3, 3); var bounds = new Rectangle(0, 0, 7, 7); var mode = BorderWrappingMode.Mirror; int[] expected = { 0, 0, 1, 0, 1, 2, 1, 2, 3, 2, 3, 4, 3, 4, 5, 4, 5, 6, 5, 6, 6, }; this.AssertOffsets(kernelSize, bounds, mode, mode, expected, expected); } [Fact] public void KernalSamplingMap_Kernel3Image7x7WrapBorder() { var kernelSize = new Size(3, 3); var bounds = new Rectangle(0, 0, 7, 7); var mode = BorderWrappingMode.Wrap; int[] expected = { 6, 0, 1, 0, 1, 2, 1, 2, 3, 2, 3, 4, 3, 4, 5, 4, 5, 6, 5, 6, 0, }; this.AssertOffsets(kernelSize, bounds, mode, mode, expected, expected); } [Fact] public void KernalSamplingMap_Kernel3Image7x7RepeatBorderTile() { var kernelSize = new Size(3, 3); var bounds = new Rectangle(2, 2, 7, 7); var mode = BorderWrappingMode.Repeat; int[] expected = { 2, 2, 3, 2, 3, 4, 3, 4, 5, 4, 5, 6, 5, 6, 7, 6, 7, 8, 7, 8, 8, }; this.AssertOffsets(kernelSize, bounds, mode, mode, expected, expected); } [Fact] public void KernalSamplingMap_Kernel3Image7BounceBorderTile() { var kernelSize = new Size(3, 3); var bounds = new Rectangle(2, 2, 7, 7); var mode = BorderWrappingMode.Bounce; int[] expected = { 3, 2, 3, 2, 3, 4, 3, 4, 5, 4, 5, 6, 5, 6, 7, 6, 7, 8, 7, 8, 7, }; this.AssertOffsets(kernelSize, bounds, mode, mode, expected, expected); } [Fact] public void KernalSamplingMap_Kernel3Image7MirrorBorderTile() { var kernelSize = new Size(3, 3); var bounds = new Rectangle(2, 2, 7, 7); var mode = BorderWrappingMode.Mirror; int[] expected = { 2, 2, 3, 2, 3, 4, 3, 4, 5, 4, 5, 6, 5, 6, 7, 6, 7, 8, 7, 8, 8, }; this.AssertOffsets(kernelSize, bounds, mode, mode, expected, expected); } [Fact] public void KernalSamplingMap_Kernel3Image7x7WrapBorderTile() { var kernelSize = new Size(3, 3); var bounds = new Rectangle(2, 2, 7, 7); var mode = BorderWrappingMode.Wrap; int[] expected = { 8, 2, 3, 2, 3, 4, 3, 4, 5, 4, 5, 6, 5, 6, 7, 6, 7, 8, 7, 8, 2, }; this.AssertOffsets(kernelSize, bounds, mode, mode, expected, expected); } [Fact] public void KernalSamplingMap_Kernel3Image7x5WrapBorderTile() { var kernelSize = new Size(3, 3); var bounds = new Rectangle(2, 2, 7, 5); var mode = BorderWrappingMode.Wrap; int[] xExpected = { 8, 2, 3, 2, 3, 4, 3, 4, 5, 4, 5, 6, 5, 6, 7, 6, 7, 8, 7, 8, 2, }; int[] yExpected = { 6, 2, 3, 2, 3, 4, 3, 4, 5, 4, 5, 6, 5, 6, 2, }; this.AssertOffsets(kernelSize, bounds, mode, mode, xExpected, yExpected); } private void AssertOffsets(Size kernelSize, Rectangle bounds, BorderWrappingMode xBorderMode, BorderWrappingMode yBorderMode, int[] xExpected, int[] yExpected) { // Arrange var map = new KernelSamplingMap(Configuration.Default.MemoryAllocator); // Act map.BuildSamplingOffsetMap(kernelSize.Height, kernelSize.Width, bounds, xBorderMode, yBorderMode); // Assert var xOffsets = map.GetColumnOffsetSpan().ToArray(); Assert.Equal(xExpected, xOffsets); var yOffsets = map.GetRowOffsetSpan().ToArray(); Assert.Equal(yExpected, yOffsets); } } ```
Ledum was a genus in the family Ericaceae, including 8 species of evergreen shrubs native to cool temperate and subarctic regions of the Northern Hemisphere and commonly known as Labrador tea. It is now recognised as a subsection of section Rhododendron, subgenus Rhododendron, of the genus Rhododendron. Description Ledum species often grow together with poisonous plants such as bog-laurel and bog-rosemary, but certain species (e.g. L. groenlandicum and L. palustre) are easily distinguished by the distinctive rust coloured fuzz on the bottom of leaves. Taxonomy Reclassification into Rhododendron Recent genetic evidence has shown that the species previously treated in this genus are correctly placed in the genus Rhododendron, where they are now treated as Rhododendron subsect. Ledum. Because some of the species names used in Ledum could not be used in Rhododendron (the names already having been used for other species already in this large genus), new names had to be coined for them. Species The species listed in genus Ledum (accepted and synonyms), with their current accepted names are: Species References Ledum Rhododendron Other Hybrids Natural hybrids (nothospecies) also occur. Ledum columbianum = Rhododendron × columbianum (R. groenlandicum × R. neoglandulosum) is listed by Harri Harmaja as a natural hybrid. Rhododendron vanhoeffeni Abromeit is a probably hybrid between Ledum palustre subsp. decumbens and Rhododendron lapponicum. Uses Some species (e.g. L. groenlandicum) have been used to produce Labrador tea. Other species have varying levels of toxicity (e.g. L. glandulosum). Evergreen Labrador Tea grows slowly, but retains its leaves year-round. Users should take care not to over-harvest leaves from any single plant. See also List of Sections in Subgenus Rhododendron Notes References Bibliography Ledum Flora of Alaska Herbs Herbal tea Plant subsections
```shell Quick `cd` tips Bash history reverse search Execute a command without saving it in the history Find any Unix / Linux command Adding directories to your `$PATH` ```
Byssomerulius psittacinus is a species of crust fungus in the family Irpicaceae. It was described as new to science in 2000 by mycologists Peter Buchanan, Leif Ryvarden, and Masana Izawa. The type was found in Fiordland National Park, where it was growing on the dead wood of Nothofagus. The specific epithet psittacinus ("parrot-like") refers to the wide range of colours observed in the fruit bodies. Initially a striking reddish-purple when fresh, it dries to brownish orange, pale orange yellow, or pale orange. References Fungi of New Zealand Irpicaceae Fungi described in 2000 Taxa named by Leif Ryvarden
Dendrobium wattii is a species of orchid. It is native to the Himalayas (Assam, Arunachal Pradesh, Yunnan) and to Indochina (Laos, Myanmar, Thailand, Vietnam). References wattii Flora of Indo-China Flora of the Indian subcontinent Orchids of India Orchids of Bangladesh Orchids of Yunnan Plants described in 1883 Taxa named by William Jackson Hooker
The 1979 Gator Bowl was a college football bowl game played on December 28, 1979. The North Carolina Tar Heels of the Atlantic Coast Conference defeated the Michigan Wolverines of the Big Ten Conference, 17–15. Background An 8-1 start (With a loss to #9 Notre Dame) had propelled Michigan to be ranked at 10th in the polls, before a loss to #14 Purdue followed by a loss to #2 Ohio State at home. This made them fall to 14th position in the polls and they finished as 3rd in the Big Ten Conference. The Tar Heels had started with a score of 4-0 and were ranked #14 before a loss to Wake Forest started a 1-3-1 middle stretch that ended with victories over Virginia and Duke to make them finish 5th in the Atlantic Coast Conference. This was Michigan's first Gator Bowl appearance. This was North Carolina's third ever Gator Bowl appearance. Scoring summary First quarter No score Second quarter Michigan - Virgil, 20-yard field goal Michigan - Anthony Carter, 53-yard pass from John Wangler (kick failed) North Carolina - Doug Paschal, 1-yard run (Hayes kick) Third quarter North Carolina - Phil Farris 12-yard pass from Matt Kupec (Hayes kick) Fourth quarter North Carolina - Hayes 32-yard field goal Michigan - Anthony Carter 30-yard pass from B. J. Dickey (B.J. Dickey pass failed) References External links Summary at Bentley Historical Library, University of Michigan Athletics History Gator Bowl Gator Bowl Michigan Wolverines football bowl games North Carolina Tar Heels football bowl games 20th century in Jacksonville, Florida December 1979 sports events in the United States 1979 in sports in Florida
```java /* * * * 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 io.samjs.plugins.badsad; import io.ballerina.projects.plugins.CompilerPlugin; import io.ballerina.projects.plugins.CompilerPluginContext; import io.ballerina.tools.diagnostics.Diagnostic; import io.ballerina.tools.diagnostics.DiagnosticSeverity; import io.samjs.jarlibrary.diagnosticutils.DiagnosticUtils; import java.io.PrintStream; /** * A {@code CompilerPlugin} that throws no class def error when loading the class. * * @since 2.0.0 */ public class BadSadCompilerPlugin5 extends CompilerPlugin { public BadSadCompilerPlugin5() { // The DiagnosticUtils class will not be available at the runtime Diagnostic diagnostic = DiagnosticUtils.createDiagnostic("", "", null, DiagnosticSeverity.ERROR); PrintStream out = System.out; out.println(diagnostic); } @Override public void init(CompilerPluginContext pluginContext) { } } ```
Abbas Saeed Ali Mansoor Ayyad (born 11 May 1987) is a footballer from Bahrain. He currently plays for the Bahraini football club Al-Ahli, and has played in the Bahrain national football team. External links Bahraini men's footballers Bahrain men's international footballers 1987 births Living people 2011 AFC Asian Cup players Footballers at the 2006 Asian Games Men's association football defenders Asian Games competitors for Bahrain
Pini is a 2010 web comedy series which was broadcast on Ynet. It was shot in London, Cambridge and Paris and was produced by Market Master. The Series was created and written by the star, Tomer Barzide. It is currently in its third season. It is widely regarded as a "pioneering project" in Israel. Plot The series follows Pini (Tomer Barzide) after he leaves military service as a cook in Israel and travels to London to become a successful chef (like Gordon Ramsay). He finds a flat share with Tom Jones (Tom Jones) as he struggles to adjust to life in London. Production The series was produced by Market Master. Production was carried out by Pini Productions over two months in London, Cambridge and Paris. It was shot in high density on Canon 550D DSLR cameras. The dialogue is a mixture of English, Hebrew and French. Cast Pini played by Tomer Barzide Tom Jones played by Tom Jones Carla played by Charlotte Beckett Olive played by Catherine Gordon Boss played by Daniel Moore Mark played by Oliver Browne Joseph played by Vauxhall Jermaine Audrey played by Sara Ginac Kasano played by Luca Pusceddu Barman played by David Keenan Michael played by Edward Eales-White Checkout Guy played by Marcus Kai Doctors Receptionist played by Kasha Bajor Crew Executive Producers - Udi Shadmi and Assaf Vidavsky Writer and Director - Tomer Barzide Director - Gille Klabin (first two episodes) Line Producer - Sean Keane Editor - Tom Jones Camera Operator - Tom Bradley Sound Recordist - Mario Percori (first two episodes) Stuart Gilfedder, Sean Keane Sound Post - Motti Benny, Mario Pecori (first two episodes) Casting - Rachael David Original Music composed by Sass Hoory Critical reception The series was well received and gained much credit for its production value. Pini is the first web series in Israel which is considered to have TV production value. The show had wide interest from TV and print media, a substantial number of hits on Ynet, and a large following on its Facebook fan page. Episodes References External links Pini Ynet Web Site IMDb profile 2010 web series debuts Comedy web series
```objective-c #import "GPUImageTwoInputFilter.h" @interface GPUImageLinearBurnBlendFilter : GPUImageTwoInputFilter @end ```
```objective-c #pragma once #include <torch/csrc/jit/backends/backend_detail.h> namespace torch { namespace jit { class backend_preprocess_register { std::string backend_name_; public: backend_preprocess_register( const std::string& name, const detail::BackendPreprocessFunction& preprocess) : backend_name_(name) { detail::registerBackendPreprocessFunction(name, preprocess); } }; } // namespace jit } // namespace torch ```
```java Collections vs arrays Multidimensional array declaration Converting a string to upper or lower case Finding a substring in a string Equals operation on different data types ```
```css Change the style of borders using `border-style` Hide the scrollbar in webkit browser Removing the bullets from the `ul` Adjacent sibling selector Autohiding scrollbars for **IE** ```
Pulivalu is a 1975 Indian Malayalam film directed by J. Sasikumar and produced by V. M. Chandi, with Prem Nazir, Jayabharathi, Jose Prakash and Sreelatha Namboothiri in the lead roles. Its score was composed by M. K. Arjunan. Cast Prem Nazir Jayabharathi Jose Prakash Sreelatha Namboothiri M. G. Soman Manju Bhargavi Meena Muthukulam Raghavan Pillai Veeran Soundtrack The music was composed by M. K. Arjunan and the lyrics were written by Sreekumaran Thampi. References External links 1975 films 1970s Malayalam-language films Films directed by J. Sasikumar
Elizabeth Ogilvy Benger (baptised on 15 June 1775 at West Camel, Somerset, died on 9 January 1827 in London) was an English biographer, novelist and poet. Some of her poetry had a strong social message. Early life and education Elizabeth was the daughter of John Benger or Benjey and his wife Mary, née Long. Her father was a tradesman in Wells. He became a Royal Navy purser in 1782 and the family lived mainly in Chatham, Kent until 1797. According to a fellow writer, Lucy Aikin, Elizabeth early showed "an ardour for knowledge, a passion for literature". She was allowed at the age of twelve to attend a local boys' school to learn Latin, and the next year had a poem published, The Female Geniad. This featured "female theologians, scholars, and preachers such as Cassandra del Fides, Isabella of Barcelona, and Issona of Verona, alongside Cornelia, as historic women to inspire 'the British fair' of her day." It was preceded by a customarily apologetic preface that "deploys innocence with great sophistication," as recent commentators put it. "The voice... is the voice of cultural authority." Career Impoverished after the death of her father in 1796, the family moved to Devizes, Wiltshire, and then to London in 1802, where Benger made the acquaintance of several literary figures. These included the novelists Jane and Anna Maria Porter, and the poet Caroline Champion de Crespigny, a former mistress of Lord Byron. She later became known to John Aikin and his daughter Lucy, the poet and children's writer Anna Laetitia Barbauld, Sarah Wesley, the writer daughter of the prominent Methodist Charles Wesley, and the novelist and actress Elizabeth Inchbald. She made a poorer impression on Charles and Mary Lamb, and on the diarist Henry Crabb Robinson, who described her as "ludicrously fidgety" at a party where Wordsworth was present. Elizabeth wanted to become a playwright, but she had no success and soon turned to poetry with a social message. "The Abolition of the Slave Trade" appeared in 1809, with verse by James Montgomery and James Grahame on the same subject. Then came two novels, the second of which was also translated into French. She later turned to non-fiction, translating from German and introducing a volume of letters by Friedrich Gottlieb Klopstock, and to writing and compiling competent biographical materials on Elizabeth Hamilton, John Tobin, Elizabeth of Bohemia, Anne Boleyn and Mary, Queen of Scots between 1818 and 1825. After that, her health began to fail. She was collecting materials for a life of Henry IV of France when she died on 9 January 1827. References 1775 births 1827 deaths 19th-century English non-fiction writers 19th-century English women writers 19th-century English writers English women novelists Writers from London English translators Women of the Regency era
```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.thingsboard.server.queue.provider; import jakarta.annotation.PostConstruct; import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression; import org.springframework.stereotype.Service; import org.thingsboard.server.gen.transport.TransportProtos; import org.thingsboard.server.gen.transport.TransportProtos.ToCoreMsg; import org.thingsboard.server.gen.transport.TransportProtos.ToCoreNotificationMsg; import org.thingsboard.server.gen.transport.TransportProtos.ToHousekeeperServiceMsg; import org.thingsboard.server.gen.transport.TransportProtos.ToRuleEngineMsg; import org.thingsboard.server.gen.transport.TransportProtos.ToRuleEngineNotificationMsg; import org.thingsboard.server.gen.transport.TransportProtos.ToTransportMsg; import org.thingsboard.server.gen.transport.TransportProtos.ToUsageStatsServiceMsg; import org.thingsboard.server.queue.TbQueueProducer; import org.thingsboard.server.queue.common.TbProtoQueueMsg; @Service @ConditionalOnExpression("'${service.type:null}'=='tb-transport'") public class TbTransportQueueProducerProvider implements TbQueueProducerProvider { private final TbTransportQueueFactory tbQueueProvider; private TbQueueProducer<TbProtoQueueMsg<ToRuleEngineMsg>> toRuleEngine; private TbQueueProducer<TbProtoQueueMsg<ToCoreMsg>> toTbCore; private TbQueueProducer<TbProtoQueueMsg<ToCoreNotificationMsg>> toTbCoreNotifications; private TbQueueProducer<TbProtoQueueMsg<ToUsageStatsServiceMsg>> toUsageStats; private TbQueueProducer<TbProtoQueueMsg<ToHousekeeperServiceMsg>> toHousekeeper; public TbTransportQueueProducerProvider(TbTransportQueueFactory tbQueueProvider) { this.tbQueueProvider = tbQueueProvider; } @PostConstruct public void init() { this.toTbCore = tbQueueProvider.createTbCoreMsgProducer(); this.toRuleEngine = tbQueueProvider.createRuleEngineMsgProducer(); this.toUsageStats = tbQueueProvider.createToUsageStatsServiceMsgProducer(); this.toTbCoreNotifications = tbQueueProvider.createTbCoreNotificationsMsgProducer(); this.toHousekeeper = tbQueueProvider.createHousekeeperMsgProducer(); } @Override public TbQueueProducer<TbProtoQueueMsg<ToTransportMsg>> getTransportNotificationsMsgProducer() { throw new RuntimeException("Not Implemented! Should not be used by Transport!"); } @Override public TbQueueProducer<TbProtoQueueMsg<ToRuleEngineMsg>> getRuleEngineMsgProducer() { return toRuleEngine; } @Override public TbQueueProducer<TbProtoQueueMsg<ToCoreMsg>> getTbCoreMsgProducer() { return toTbCore; } @Override public TbQueueProducer<TbProtoQueueMsg<ToRuleEngineNotificationMsg>> getRuleEngineNotificationsMsgProducer() { throw new RuntimeException("Not Implemented! Should not be used by Transport!"); } @Override public TbQueueProducer<TbProtoQueueMsg<ToCoreNotificationMsg>> getTbCoreNotificationsMsgProducer() { return toTbCoreNotifications; } @Override public TbQueueProducer<TbProtoQueueMsg<TransportProtos.ToVersionControlServiceMsg>> getTbVersionControlMsgProducer() { throw new RuntimeException("Not Implemented! Should not be used by Transport!"); } @Override public TbQueueProducer<TbProtoQueueMsg<ToUsageStatsServiceMsg>> getTbUsageStatsMsgProducer() { return toUsageStats; } @Override public TbQueueProducer<TbProtoQueueMsg<ToHousekeeperServiceMsg>> getHousekeeperMsgProducer() { return toHousekeeper; } } ```
```java /* * * This file is part of SchemaSpy. * * SchemaSpy is free software: you can redistribute it and/or modify * (at your option) any later version. * * SchemaSpy 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 SchemaSpy. If not, see <path_to_url */ package org.schemaspy.integrationtesting.mysql; import org.assertj.core.api.SoftAssertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; import org.schemaspy.integrationtesting.MysqlSuite; import org.schemaspy.testing.HtmlOutputValidator; import org.schemaspy.testing.XmlOutputDiff; import org.schemaspy.testing.testcontainers.SuiteContainerExtension; import org.xmlunit.builder.Input; import org.xmlunit.diff.Diff; import java.io.IOException; import java.net.URL; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.StandardOpenOption; import static org.assertj.core.api.Assertions.assertThat; import static org.schemaspy.testing.SchemaSpyRunnerFixture.schemaSpyRunner; /** * @author Nils Petzaell */ class MysqlHTMLRemoteRelationshipsIT { private static final Path outputPath = Paths.get("target","testout","integrationtesting","mysql","html_remote_relationships"); private static final URL expectedXML = MysqlHTMLRemoteRelationshipsIT.class.getResource("/integrationTesting/mysql/expecting/mysqlhtml_remote_relationships/htmlit.htmlit.xml"); private static final URL expectedDeletionOrder = MysqlHTMLRemoteRelationshipsIT.class.getResource("/integrationTesting/mysql/expecting/mysqlhtml_remote_relationships/deletionOrder.txt"); private static final URL expectedInsertionOrder = MysqlHTMLRemoteRelationshipsIT.class.getResource("/integrationTesting/mysql/expecting/mysqlhtml_remote_relationships/insertionOrder.txt"); @RegisterExtension static SuiteContainerExtension container = MysqlSuite.SUITE_CONTAINER; @BeforeAll static void generateHTML() { String[] args = new String[]{ "-t", "mysql", "-db", "htmlit", "-s", "htmlit", "-host", container.getHost() + ":" + container.getPort(3306), "-port", container.getPort(3306), "-u", container.getUsername(), "-p", container.getPassword(), "-o", outputPath.toString(), "-connprops", "useSSL\\=false;allowPublicKeyRetrieval\\=true", "-meta", Paths.get("src","test","resources","integrationTesting","mysql","metadata","remote_relationships.xml").toString(), "--no-orphans", "--include-routine-definition" }; schemaSpyRunner(args).run(); } @Test void verifyXML() { Diff d = XmlOutputDiff.diffXmlOutput( Input.fromFile(outputPath.resolve("htmlit.htmlit.xml").toString()), Input.fromURL(expectedXML) ); assertThat(d.getDifferences()).isEmpty(); } @Test void verifyDeletionOrder() throws IOException { assertThat(Files.newInputStream(outputPath.resolve("deletionOrder.txt"), StandardOpenOption.READ)).hasSameContentAs(expectedDeletionOrder.openStream()); } @Test void verifyInsertionOrder() throws IOException { assertThat(Files.newInputStream(outputPath.resolve("insertionOrder.txt"), StandardOpenOption.READ)).hasSameContentAs(expectedInsertionOrder.openStream()); } @Test void producesSameContent() throws IOException { SoftAssertions softAssertions = HtmlOutputValidator .hasProducedValidOutput( outputPath, Paths.get("src","test","resources","integrationTesting","mysql","expecting","mysqlhtml_remote_relationships") ); softAssertions.assertThat(softAssertions.wasSuccess()).isTrue(); softAssertions.assertAll(); } } ```
Angela "Annie" Marie Peavy (born August 12, 1996) is an American dressage rider. She will be participating in the 2016 Summer Paralympics in Rio de Janeiro riding Lancelot Warrior. Career Peavy is partially paralyzed on her left side, due to a blood clot that affected her prior to birth. She began taking riding lessons at a young age, and as of 2016 is being trained by Heather Blitz. In 2014, she competed at the World Equestrian Games. References External links 1996 births Living people Paralympic equestrians for the United States American dressage riders American female equestrians 21st-century American women
```javascript // flow-typed signature: 461d03b42b64c627f96550958f7285df // flow-typed version: <<STUB>>/rollup-plugin-filesize_v^6.0.1/flow_v0.54.1 /** * This is an autogenerated libdef stub for: * * 'rollup-plugin-filesize' * * Fill this stub out by replacing all the `any` types. * * Once filled out, we encourage you to share your work with the * community by sending a pull request to: * path_to_url */ declare module 'rollup-plugin-filesize' { declare module.exports: any; } /** * We include stubs for each file inside this npm package in case you need to * require those files directly. Feel free to delete any files that aren't * needed. */ declare module 'rollup-plugin-filesize/dist/index' { declare module.exports: any; } declare module 'rollup-plugin-filesize/src/index' { declare module.exports: any; } // Filename aliases declare module 'rollup-plugin-filesize/dist/index.js' { declare module.exports: $Exports<'rollup-plugin-filesize/dist/index'>; } declare module 'rollup-plugin-filesize/src/index.js' { declare module.exports: $Exports<'rollup-plugin-filesize/src/index'>; } ```
The University of Kansas Edwards Campus, also known as the KU Edwards Campus, is a satellite campus of the University of Kansas. The campus is located in Overland Park in the Kansas City metropolitan area; its four buildings are located on a site at 127th Street and Quivira Road. The University of Kansas opened its Edwards Campus in December 1992. , more than 2,500 students were enrolled at the campus. History On December 3, 1992, the University of Kansas dedicated the first building on the Edwards Campus, the "Regents Center". In November 2008, Johnson County voters approved a local sales tax to fund a partnership between the University of Kansas and Kansas State University in constructing the Johnson County Education Research Triangle (JCERT). The tax enabled the KU Edwards Campus to build the BEST Building. On December 16, 2011, Aisha Khan, a then-19-year-old student at nearby Johnson County Community College, called her sister from KU Edwards and said that she was running from a drunken stranger who had harassed her while she was outdoors studying. Police at Overland Park, Kansas treat the case as an abduction. On the night of December 21, 2011, the Overland Police Department informed Khan's family that she had been found safe and not held against her will. In June 2020, during the COVID-19 pandemic in Kansas, the University of Kansas announced that it would hold in-person classes at the Edwards Campus from August 24 as regularly scheduled, with a modified schedule lacking a Labor Day holiday, fall break, or spring break. In August 2020, KU reported that, out of an initial batch of 7088 test results received ahead of the 2020–2021 school year, 89 people tested positive (all but two of them being students). There are specific testing instructions for people at the KU Edwards Campus. , more than 2,500 students were enrolled at the campus. Student statistics KU Edwards Campus provides educational programming designed to help students complete degrees, change or advance their career and continue their education. Based on fall semester 2019 enrollment, the ages of KUEC students were: Based on a spring 2017 student survey and summer 2018 alumni survey. Male - 45% Female - 55% Have children under age 18 - more than 33% Work full-time - 37% Work part-time - 25% First in family to attend college - 23% Part-time students (less than 12 credit hours/semester) - 71% Reason for continuing their education, according to a pre-enrollment survey: Starting a Career 32% Career Advancement 27% Career Change 20% Personal Fulfillment 16% Other 8 5% Tradition Setting for Future Generations .5% Academic profile The KU Edwards Campus offers a undergraduate degree completion and graduate programs. U.S. News & World Report recognizes KU's public administration, overall education and special education. Johnson County Education Research Triangle sales tax In November 2008, Johnson County voters approved a local sales tax to fund a partnership between the University of Kansas and Kansas State University. The Johnson County Education Research Triangle (JCERT) is formed by KUEC, KU Medical Center and K-State-Olathe. The Triangle sales tax enabled the KU Edwards Campus to build the BEST Building, which allowed the Campus to grow by 1,000 students and launch 10 new academic programs. By 2019, the Johnson County Education Research Triangle supports 27 degrees and certificate programs at KUEC, which grew 15 percent in the 2018–19 school year. KU Professional & Continuing Education KU Professional & Continuing Education (abbreviated KUPCE) is a program located at the KU Edwards Campus. References External links University of Kansas Education in Johnson County, Kansas Buildings and structures in Overland Park, Kansas Education in Overland Park, Kansas 1993 establishments in Kansas
She Fought Alone is a 1995 American television film directed by Christopher Leitch. The film, which is based on a true story, stars Tiffani-Amber Thiessen and Brian Austin Green, who were known for Saved by the Bell and Beverly Hills, 90210 respectively, at the time of release. It was released on Region 2 DVD in 2000 and Region 1 in 2004. Plot Caitlin Rose is a shy and bullied 17-year-old in the new town of Lockhart, Illinois. She is not very well known at her school, but with the help of her best friend, she is accepted into the popular group at school, known as The Crew. While partying one night, she bonds with Ethan, and eventually she's sleeping with him while being secretly watched by his best friend, Jace. Acting under peer pressure, she soon starts to rebel, neglecting school and getting into trouble. A lot of the teachers are bothered by their behavior, complaining to administrators that they get away with everything, but to no avail. While at the movies one night, Caitlin finds out Ethan is dating another girl. Upset, she confronts him. Trying to keep up a tough image, he claims they were never serious, but she responds that she sees right through him before leaving. Back at home, she receives a visit from Jace, who lies his way into her home by saying that he wants to comfort her. Inside, he tries to kiss her, but when she refuses, he rapes her while her little sister listens through the door, unaware that her sister is being assaulted. The next day, she distances herself from everyone, not wanting to talk to her mother. When Avon demands to know what happened last night, Caitlin admits that Jace raped her. However, Avon doesn't believe Caitlin, claiming that she probably seduced him. Feeling betrayed, she leaves home, only to be told the same by her friends. She directly accuses Jace of rape, but nobody believes her, and the rest of Caitlin's friends soon turn their back on her. Determined to prove she is not lying, she goes to the hospital for an examination, but the doctors can't find any sign of rape because of the fact she was already sexually active before being raped. Nevertheless, Avon decides to believe her and offers to press charges, but Caitlin responds she just wants to forget everything that happened. She is soon troubled with nightmares, and at school, people start bullying her. At first, she considers dropping out, but she soon realizes she could be able to stop it by winning over Ethan's trust. She is unable to, however, and the harassing continues. This results in Caitlin getting into a fight with another girl, Hanna, who is subsequently suspended, not only for fighting Caitlin and writing graffiti, but also for arguing with a teacher. Her mother threatens to go to the mass media, which angers the principal. Trying to prevent the school from getting a bad reputation, she suspends Ethan and Jace from two football games. As revenge for the suspension, the group lure Caitlin into an abandoned house and assault her, cutting off her hair as a "punishment". However, Ethan sees how scared she is and lets her go. Devastated, Caitlin decides to fight back, calling an investigator the next day, and the two begin collecting evidence and preparing to sue the school. Meanwhile, Jace reveals to Ethan that he indeed raped Caitlin. Stunned by this revelation, Ethan makes amends with Caitlin. Feeling betrayed by his best friend, Jace starts vandalizing Ethan's property and car. Ethan picks up Caitlin, ready to flee the town, but they are stopped by the rest of The Crew. During the ensuing commotion, a knife fight breaks out between Ethan and Jace, which ends with Jace being stabbed in the leg, after which Ethan leaves with Caitlin. A court trial follows, during which the school district promises to update its policies. Jace testifies he will never play college football because of muscle damage sustained in the knife fight, and that he's ready to move on with his life and go to a state college. Caitlin leaves town for college, but expresses hope of one day returning to see Ethan and her friend Abby, who is pregnant with Jace's baby by rape. Cast Tiffani-Amber Thiessen as Caitlin Rose Brian Austin Green as Ethan Isabella Hofmann as Avon Rose David Lipper as Jace Maureen Flannigan as Abby Keith MacKechnie as Aaron Jessie Robertson as Junie Rose International titles Brazil - Luta Solitária France - L'Affront Germany - Mißbrauchte Träume Greece - Μόνη απέναντι στο ψέμα Norway - Ensom kamp Portugal - Só Contra Tudo Spain - Sola contra todos Italy - La ragazza di tutti References External links Movie trailer 1995 television films 1995 films 1995 crime drama films American crime drama films Films set in Illinois NBC network original films Films about rape 1990s English-language films Films directed by Christopher Leitch 1990s American films
Nebraska's 3rd congressional district is a congressional district in the U.S. state of Nebraska that encompasses its western three-fourths; it is one of the largest non-at-large districts in the country, covering nearly , two time zones and 68 counties. It includes Grand Island, Kearney, Hastings, North Platte, Alliance, and Scottsbluff. Additionally, it encompasses the Sandhills region and a large majority of the Platte River. With a Cook Partisan Voting Index rating of R+29, it is the most Republican district in Nebraska, a state with an all-Republican delegation. Political history Nebraska has had at least three congressional districts since 1883. The district's current configuration dates from 1963, when Nebraska lost a seat as a result of the 1960 United States census. At that time, most of the old 3rd and 4th districts were merged to form the new 3rd district. It is one of the most Republican districts in the nation, as Democrats have only come close to winning it three times as currently drawn, in 1974, 1990, and 2006, all years where the incumbent was not running for reelection. Republican presidential and gubernatorial candidates routinely carry the district with margins of 40 percent or more, while Franklin D. Roosevelt in 1936 was the last Democratic presidential candidate to win a plurality within the current district boundaries. Excepting historically Democratic Saline County on the district's eastern boundary, Thurston County which only moved into the district in 2023, and Dakota County which has only been within the district since 2013, the last Democrat to carry any county within the district at a presidential level was Jimmy Carter in 1976. Although the Nebraska Legislature is elected on a nonpartisan basis, all but two members representing significant portions of the district are known to be Republicans. With a Cook Partisan Voting Index (CPVI) of R+29, it is the most Republican congressional district outside Appalachia. Because Nebraska awards an Electoral College vote from each district, it is the most Republican Electoral College constituency. It is currently held by Republican Adrian Smith, who was first elected in 2006. Recent results in statewide races List of members representing the district Election history 2004 2006 2008 2010 2012 2014 2016 2018 2020 2022 Historical district boundaries See also Nebraska's congressional districts List of United States congressional districts References Congressional Biographical Directory of the United States 1774–present 03 1883 establishments in Nebraska
```go package httputils // import "github.com/docker/docker/api/server/httputils" import ( "encoding/json" "net/http" ) // WriteJSON writes the value v to the http response stream as json with standard json encoding. func WriteJSON(w http.ResponseWriter, code int, v interface{}) error { w.Header().Set("Content-Type", "application/json") w.WriteHeader(code) enc := json.NewEncoder(w) enc.SetEscapeHTML(false) return enc.Encode(v) } ```
Genevieve Forbes Herrick (May 21, 1894 – December 17, 1962) was a journalist for the Chicago Tribune. Early life Genevieve Forbes was born in Chicago, Illinois, on May 21, 1894, the daughter of Frank G. Forbes and Carolyn D. (Gee) Forbes. She attended Lakeview High School, then earned a bachelor's degree from Northwestern University in 1916 and a master's degree in English from the University of Chicago in 1917. At Northwestern, she was the first female editor-in-chief of the student newspaper, The Daily Northwestern. After teaching English for a year at Waterloo High School, she joined the Chicago Tribune in 1918. Chicago Tribune After a few years working as an assistant editor and covering literary and society events, Forbes got her breakthrough story in 1921 when she went to County Wexford, Ireland and posed undercover as an Irish immigrant making the journey to Ellis Island. Her 13-part series exposed the indignities and abuses, often physical, that immigrants suffered entering the United States. The series prompted an investigation by the United States House of Representatives and the replacement of Ellis Island Commissioner Frederick A. Wallis. Most of Herrick's work in the 1920s was the crime beat, reporting on Chicago's many gangsters and criminals. In 1924, she covered the Leopold and Loeb trial, where she met her future husband, reporter John Origen Herrick. They married on September 6, 1924, and her byline became Genevieve Forbes Herrick. Reportedly, the judge in the trial delayed sentencing to accommodate the Herricks' wedding. In March 1930, Herrick interviewed notorious gangster Al Capone, who complained "All I ever did is sell beer and whiskey to our best people." Herrick took a special interest in women in politics, covering, among others, US Representative Ruth Hanna McCormick, US Senator Hattie Wyatt Caraway, US Secretary of Labor Frances Perkins, and Alice Roosevelt Longworth. She criticized them when they refused to talk to the press, as she believed it was their obligation as public figures and role models. Roosevelt administration Herrick became closely associated with First Lady Eleanor Roosevelt. From the first one in 1933, Herrick was a regular attendee of Roosevelt's famous press conferences limited to women reporters. She became one of the "faithful four" reporters most trusted by Roosevelt and was a frequent lunch guest at the White House. Herrick also made some appearances on Roosevelt's radio show on the NBC Red Network, Mrs. Roosevelt's Own Program. Tribune publisher Robert R. McCormick was an ardent opponent of the Roosevelt administration and the New Deal. Following pointed criticism of her reporting by McCormick in May 1934, Herrick felt compelled to resign from the Tribune and the Tribune's WGN Radio. Herrick continued her journalistic work at other outlets, including regular columns at the New York Daily News and the magazine The Country Gentleman. She was president of the Women's National Press Club from 1933 to 1935. In August 1935, Herrick was seriously injured in and spent months recovering from a car accident in New Mexico that killed Anna Wilmarth Ickes, wife of US Secretary of the Interior Harold Ickes. During World War II, Herrick worked for the US Treasury Department, then became press relations chief for the Women's Army Corps. She worked in several capacities for the Office of War Information, eventually becoming chief of their Book and Magazine Bureau. Later life The Herricks moved to New Mexico in 1951. Genevieve Herrick did little writing in the 1950s. She died in St. Vincent's Hospital in Santa Fe, New Mexico on December 17, 1962, at the age of 68. The Herricks are buried in Arlington National Cemetery. References External links Herrick on an episode of Mrs. Roosevelt's Own Program 1894 births 1962 deaths 20th-century American journalists 20th-century American women journalists Chicago Tribune people Journalists from Illinois Northwestern University alumni University of Chicago alumni Burials at Arlington National Cemetery
```javascript The distinction between `==` and `===` `catch` is block scoped Detect an error type Detect **DO NOT TRACK** status ```
Brynjar Karl Sigurðsson (born 17 September 1973) is an Icelandic businessman, basketball coach and former player. He played several seasons in the Icelandic top-tier Úrvalsdeild karla and was a member of the Icelandic national team. Following his basketball career, he founded the company Sideline Sports which designed coaching software used by the Premier League, NBA and the NFL. A controversial figure in Iceland, he has been scrutinized for his coaching methods and fight with the Icelandic Basketball Association to let his junior women's team compete in boys tournaments. In February 2021, the documentary Raise the bar which follows him and his girls teams, premiered in Iceland. Early life Brynjar was born in Breiðholt, Reykjavík in 1973. He started training basketball at the age of 9. Basketball career Club career Brynjar spent most of his career with Valur and ÍA. In 1996, he was slated to play for freshly promoted KFÍ during the 1996–97 season but he eventually signed back with ÍA. In January 2001, Brynjar transferred from Valur to ÍA, which by then was playing in the second-tier 1. deild karla. He appeared in four games the rest of the season, averaging 27.3 points per game. The following season, he averaged 32.2 points in five games as a player-coach. He resigned in December the same year due to unpaid salary from the club. In 2009, Brynjar had a short comeback in with FSu, for whom he was the head coach, when he scored 20 points in a loss against Snæfell. National team career Brynjar played 11 games for the Icelandic national team from 1994 to 1995. Coaching career In May 2001, Brynjar was hired as a player-coach for ÍA. He resigned in December the same year due to unpaid salary. In 2005, he founded the FSu basketball academy in Selfoss. In 2008, he guided the team to promotion to the top-tier Úrvalsdeild karla after beating Valur in the 1. deild karla promotion playoffs. In 2021, he became the head coach of 1. deild kvenna club Aþena-UMFK. Handball career In 2011, Brynjar was selected to Valur's roster for its game against Akureyri in the Icelandic Handball Cup finals despite never having played professional handball before. The game plan was for him to see spot minutes as a defender in the first half but due to Valur playing a man short for an extended amount of time, he eventually did not see any playing time in Valur's 26–24 win. Executive career In October 2021, Brynjar was announced as the new chairman of Leiknir's basketball department. References External links Úrvalsdeild statistics 1989–2001 at Icelandic Basketball Association Icelandic statistics 2009-present at Icelandic Basketball Association 1973 births Living people Brynjar Karl Sigurdsson Brynjar Karl Sigurdsson Brynjar Karl Sigurdsson Brynjar Karl Sigurdsson Brynjar Karl Sigurdsson Brynjar Karl Sigurdsson Brynjar Karl Sigurdsson Brynjar Karl Sigurdsson
Petchia madagascariensis is a plant in the family Apocynaceae. Description Petchia madagascariensis grows as a shrub or small tree up to tall, with a trunk diameter of up to . Its flowers feature a creamy to yellow corolla. The fruit is orange with paired cylindrical follicles. Local traditional medicinal uses include as a treatment for stomach-ache, gonorrhoea, rheumatism, gout, malaria and as a diuretic and anthelmintic. Distribution and habitat Petchia madagascariensis is endemic to Madagascar. Its habitat is evergreen forest, mostly coastal, from sea level to altitude. References madagascariensis Plants used in traditional African medicine Endemic flora of Madagascar Plants described in 1844
XEWG-AM (1240) is a radio station in Ciudad Juárez, Chihuahua, Mexico. XEWG is known as Radio Crystal and is owned by Grupo Siete. History The concession for XEWG was awarded to Carlos Méndez Jauregui in 1941 and then sold to Francisco Núñez Rivera in 1958 and Estela Vega Padilla in 1964. Vega Padilla was the housekeeper and friend of Richard Eaton, owner of the United Broadcasting Company in the United States, who had loaned her the money to run the station; when the two had a falling out over profits in Mexico, she fled in 1970 with a child entrusted to her care by Eaton. The station was then sold to a company called Escarga. In 1985, Radiodifusora Centauro del Norte bought the station; in turn, it was transferred to the current concessionaire in 2006. In February 2020, XEWG added to its Bengala Regional Mexican format—the last Grupo Siete station using the name—by airing daytime Catholic religious programming branded as Radio Guadalupana, produced by the Roman Catholic Diocese of Ciudad Juárez, from 6 a.m. to 3 p.m. on weekdays and to 1:30 p.m. on weekends. This was later dropped as the station became known as Crystal 1240. References Radio stations in Chihuahua Radio stations established in 1941 Mass media in Ciudad Juárez
```python import logging import shutil from pathlib import Path from typing import Union from test_build_system_helpers import EnvDict, IdfPyFunc, bin_file_contains, file_contains, replace_in_file def get_two_header_bytes(file_path: Union[str, Path]) -> str: ''' get the bytes 3-4 of the given file path_to_url ''' data = b'' with open(file_path, 'rb') as f: data = f.read(4) extracted_bytes = data[2:4] return extracted_bytes.hex() def test_bootloader_custom_overrides_original(test_app_copy: Path, idf_py: IdfPyFunc, default_idf_env: EnvDict) -> None: logging.info('Custom bootloader overrides original') idf_path = Path(default_idf_env.get('IDF_PATH')) shutil.copytree(idf_path / 'components' / 'bootloader', test_app_copy / 'components' / 'bootloader') # Because of relative include of Kconfig, also esp_bootloader_format needs to be copied. shutil.copytree(idf_path / 'components' / 'esp_bootloader_format', test_app_copy / 'components' / 'esp_bootloader_format') idf_py('bootloader') assert file_contains(test_app_copy / 'build' / 'bootloader' / 'compile_commands.json', (test_app_copy / 'components' / 'bootloader' / 'subproject' / 'main' / 'bootloader_start.c')) def test_bootloader_custom_ignores_extra_component(test_app_copy: Path, idf_py: IdfPyFunc, default_idf_env: EnvDict) -> None: logging.info('Custom bootloader can ignore extra components') idf_path = Path(default_idf_env.get('IDF_PATH')) # Import the main bootloader component that overrides the default one shutil.copytree(idf_path / 'examples' / 'custom_bootloader' / 'bootloader_override' / 'bootloader_components', test_app_copy / 'bootloader_components') # Compile it normally and make sure the bootloader is overridden for now idf_py('bootloader') # Search for 'Custom bootloader message defined in the KConfig file.' in the resulting binary # which is the default value for EXAMPLE_BOOTLOADER_WELCOME_MESSAGE Kconfig option. default_message = bytes('Custom bootloader message defined in the KConfig file.', 'ascii') assert bin_file_contains(test_app_copy / 'build' / 'bootloader' / 'bootloader.bin', default_message) # Clean the project idf_py('fullclean') # Ignore bootloader component and rebuild replace_in_file(test_app_copy / 'CMakeLists.txt', '# placeholder_after_include_project_cmake', 'set(BOOTLOADER_IGNORE_EXTRA_COMPONENT "main")') idf_py('bootloader') # The overridden message must not be present anymore assert not bin_file_contains(test_app_copy / 'build' / 'bootloader' / 'bootloader.bin', default_message) def test_bootloader_correctly_set_image_header(test_app_copy: Path, idf_py: IdfPyFunc) -> None: logging.info('Flash size is correctly set in the bootloader image header') # Build with the default 2MB setting idf_py('bootloader') assert get_two_header_bytes(test_app_copy / 'build' / 'bootloader' / 'bootloader.bin') == '0210' # Change to 4MB (test_app_copy / 'sdkconfig').write_text('CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y') idf_py('reconfigure', 'bootloader') assert get_two_header_bytes(test_app_copy / 'build' / 'bootloader' / 'bootloader.bin') == '0220' # Change to QIO, bootloader should still be DIO (will change to QIO in 2nd stage bootloader) (test_app_copy / 'sdkconfig').write_text('CONFIG_FLASHMODE_QIO=y') idf_py('reconfigure', 'bootloader') assert get_two_header_bytes(test_app_copy / 'build' / 'bootloader' / 'bootloader.bin') == '0210' # Change to 80 MHz (test_app_copy / 'sdkconfig').write_text('CONFIG_ESPTOOLPY_FLASHFREQ_80M=y') idf_py('reconfigure', 'bootloader') assert get_two_header_bytes(test_app_copy / 'build' / 'bootloader' / 'bootloader.bin') == '021f' ```
Vivian Inés Urdaneta Rincón (born June 8, 1979, in Maracaibo) is a Venezuelan journalist and beauty queen who captured the crown of Miss International 2000. Miss Venezuela International Urdaneta, who stands , competed as Miss Costa Oriental in her country's national pageant, Miss Venezuela, and obtained the title of Miss Venezuela International. Miss International As the official representative of her country to the 2000 Miss International pageant held in Tokyo, Japan on October 14, 2000, she competed against 57 other delegates for the crown and won the title of Miss International 2000. References External links Official Miss International website - Past titleholders Miss Venezuela International winners Miss International winners Living people People from Maracaibo 1979 births Miss International 2000 delegates Venezuelan beauty pageant winners
Kingham may refer to: Places Kingham in Oxfordshire, United Kingdom Kingham Hill School in Oxfordshire, United Kingdom Kingham railway station in Oxfordshire, United Kingdom People Henry Kingham, British footballer Jonathan Kingham, American musician Tess Kingham, British politician Other HMS Kingham (M2704), a minesweeper of the British Royal Navy Lorraine Kingham, a fictional character on the TV show Neighbours
```yaml --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.15.0 name: messagequeuetriggers.fission.io spec: group: fission.io names: kind: MessageQueueTrigger listKind: MessageQueueTriggerList plural: messagequeuetriggers singular: messagequeuetrigger scope: Namespaced versions: - name: v1 schema: openAPIV3Schema: description: MessageQueueTrigger invokes functions when messages arrive to certain topic that trigger subscribes to. properties: apiVersion: description: |- APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: path_to_url#resources type: string kind: description: |- Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: path_to_url#types-kinds type: string metadata: type: object spec: description: |- MessageQueueTriggerSpec defines a binding from a topic in a message queue to a function. properties: contentType: description: Content type of payload type: string cooldownPeriod: description: The period to wait after the last trigger reported active before scaling the deployment back to 0 format: int32 type: integer errorTopic: description: Topic to collect error response sent from function type: string functionref: description: |- The reference to a function for message queue trigger to invoke with when receiving messages from subscribed topic. properties: functionweights: additionalProperties: type: integer description: |- Function Reference by weight. this map contains function name as key and its weight as the value. This is for canary upgrade purpose. nullable: true type: object name: description: Name of the function. type: string type: description: |- Type indicates whether this function reference is by name or selector. For now, the only supported reference type is by "name". Future reference types: * Function by label or annotation * Branch or tag of a versioned function * A "rolling upgrade" from one version of a function to another Available value: - name - function-weights type: string required: - name - type type: object maxReplicaCount: description: Maximum number of replicas KEDA will scale the deployment up to format: int32 type: integer maxRetries: description: Maximum times for message queue trigger to retry type: integer messageQueueType: description: Type of message queue (NATS, Kafka, AzureQueue) type: string metadata: additionalProperties: type: string description: ScalerTrigger fields type: object minReplicaCount: description: Minimum number of replicas KEDA will scale the deployment down to format: int32 type: integer mqtkind: description: Kind of Message Queue Trigger to be created, by default its fission type: string podspec: description: |- (Optional) Podspec allows modification of deployed runtime pod with Kubernetes PodSpec The merging logic is briefly described below and detailed MergePodSpec function - Volumes mounts and env variables for function and fetcher container are appended - All additional containers and init containers are appended - Volume definitions are appended - Lists such as tolerations, ImagePullSecrets, HostAliases are appended - Structs are merged and variables from pod spec take precedence properties: activeDeadlineSeconds: description: |- Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. format: int64 type: integer affinity: description: If specified, the pod's scheduling constraints properties: nodeAffinity: description: Describes node affinity scheduling rules for the pod. properties: preferredDuringSchedulingIgnoredDuringExecution: description: |- The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. items: description: |- An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). properties: preference: description: A node selector term, associated with the corresponding weight. properties: matchExpressions: description: A list of node selector requirements by node's labels. items: description: |- A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. properties: key: description: The label key that the selector applies to. type: string operator: description: |- Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. type: string values: description: |- An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. items: type: string type: array required: - key - operator type: object type: array matchFields: description: A list of node selector requirements by node's fields. items: description: |- A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. properties: key: description: The label key that the selector applies to. type: string operator: description: |- Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. type: string values: description: |- An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. items: type: string type: array required: - key - operator type: object type: array type: object x-kubernetes-map-type: atomic weight: description: Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. format: int32 type: integer required: - preference - weight type: object type: array requiredDuringSchedulingIgnoredDuringExecution: description: |- If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. properties: nodeSelectorTerms: description: Required. A list of node selector terms. The terms are ORed. items: description: |- A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. properties: matchExpressions: description: A list of node selector requirements by node's labels. items: description: |- A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. properties: key: description: The label key that the selector applies to. type: string operator: description: |- Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. type: string values: description: |- An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. items: type: string type: array required: - key - operator type: object type: array matchFields: description: A list of node selector requirements by node's fields. items: description: |- A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. properties: key: description: The label key that the selector applies to. type: string operator: description: |- Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. type: string values: description: |- An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. items: type: string type: array required: - key - operator type: object type: array type: object x-kubernetes-map-type: atomic type: array required: - nodeSelectorTerms type: object x-kubernetes-map-type: atomic type: object podAffinity: description: Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). properties: preferredDuringSchedulingIgnoredDuringExecution: description: |- The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. items: description: The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) properties: podAffinityTerm: description: Required. A pod affinity term, associated with the corresponding weight. properties: labelSelector: description: |- A label query over a set of resources, in this case pods. If it's null, this PodAffinityTerm matches with no Pods. properties: matchExpressions: description: matchExpressions is a list of label selector requirements. The requirements are ANDed. items: description: |- A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. properties: key: description: key is the label key that the selector applies to. type: string operator: description: |- operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. type: string values: description: |- values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. items: type: string type: array required: - key - operator type: object type: array matchLabels: additionalProperties: type: string description: |- matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. type: object type: object x-kubernetes-map-type: atomic matchLabelKeys: description: |- MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `LabelSelector` as `key in (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. Also, MatchLabelKeys cannot be set when LabelSelector isn't set. This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. items: type: string type: array x-kubernetes-list-type: atomic mismatchLabelKeys: description: |- MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `LabelSelector` as `key notin (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both MismatchLabelKeys and LabelSelector. Also, MismatchLabelKeys cannot be set when LabelSelector isn't set. This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. items: type: string type: array x-kubernetes-list-type: atomic namespaceSelector: description: |- A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. properties: matchExpressions: description: matchExpressions is a list of label selector requirements. The requirements are ANDed. items: description: |- A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. properties: key: description: key is the label key that the selector applies to. type: string operator: description: |- operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. type: string values: description: |- values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. items: type: string type: array required: - key - operator type: object type: array matchLabels: additionalProperties: type: string description: |- matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. type: object type: object x-kubernetes-map-type: atomic namespaces: description: |- namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace". items: type: string type: array topologyKey: description: |- This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. type: string required: - topologyKey type: object weight: description: |- weight associated with matching the corresponding podAffinityTerm, in the range 1-100. format: int32 type: integer required: - podAffinityTerm - weight type: object type: array requiredDuringSchedulingIgnoredDuringExecution: description: |- If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. items: description: |- Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key <topologyKey> matches that of any node on which a pod of the set of pods is running properties: labelSelector: description: |- A label query over a set of resources, in this case pods. If it's null, this PodAffinityTerm matches with no Pods. properties: matchExpressions: description: matchExpressions is a list of label selector requirements. The requirements are ANDed. items: description: |- A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. properties: key: description: key is the label key that the selector applies to. type: string operator: description: |- operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. type: string values: description: |- values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. items: type: string type: array required: - key - operator type: object type: array matchLabels: additionalProperties: type: string description: |- matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. type: object type: object x-kubernetes-map-type: atomic matchLabelKeys: description: |- MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `LabelSelector` as `key in (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. Also, MatchLabelKeys cannot be set when LabelSelector isn't set. This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. items: type: string type: array x-kubernetes-list-type: atomic mismatchLabelKeys: description: |- MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `LabelSelector` as `key notin (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both MismatchLabelKeys and LabelSelector. Also, MismatchLabelKeys cannot be set when LabelSelector isn't set. This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. items: type: string type: array x-kubernetes-list-type: atomic namespaceSelector: description: |- A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. properties: matchExpressions: description: matchExpressions is a list of label selector requirements. The requirements are ANDed. items: description: |- A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. properties: key: description: key is the label key that the selector applies to. type: string operator: description: |- operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. type: string values: description: |- values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. items: type: string type: array required: - key - operator type: object type: array matchLabels: additionalProperties: type: string description: |- matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. type: object type: object x-kubernetes-map-type: atomic namespaces: description: |- namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace". items: type: string type: array topologyKey: description: |- This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. type: string required: - topologyKey type: object type: array type: object podAntiAffinity: description: Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). properties: preferredDuringSchedulingIgnoredDuringExecution: description: |- The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. items: description: The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) properties: podAffinityTerm: description: Required. A pod affinity term, associated with the corresponding weight. properties: labelSelector: description: |- A label query over a set of resources, in this case pods. If it's null, this PodAffinityTerm matches with no Pods. properties: matchExpressions: description: matchExpressions is a list of label selector requirements. The requirements are ANDed. items: description: |- A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. properties: key: description: key is the label key that the selector applies to. type: string operator: description: |- operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. type: string values: description: |- values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. items: type: string type: array required: - key - operator type: object type: array matchLabels: additionalProperties: type: string description: |- matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. type: object type: object x-kubernetes-map-type: atomic matchLabelKeys: description: |- MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `LabelSelector` as `key in (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. Also, MatchLabelKeys cannot be set when LabelSelector isn't set. This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. items: type: string type: array x-kubernetes-list-type: atomic mismatchLabelKeys: description: |- MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `LabelSelector` as `key notin (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both MismatchLabelKeys and LabelSelector. Also, MismatchLabelKeys cannot be set when LabelSelector isn't set. This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. items: type: string type: array x-kubernetes-list-type: atomic namespaceSelector: description: |- A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. properties: matchExpressions: description: matchExpressions is a list of label selector requirements. The requirements are ANDed. items: description: |- A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. properties: key: description: key is the label key that the selector applies to. type: string operator: description: |- operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. type: string values: description: |- values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. items: type: string type: array required: - key - operator type: object type: array matchLabels: additionalProperties: type: string description: |- matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. type: object type: object x-kubernetes-map-type: atomic namespaces: description: |- namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace". items: type: string type: array topologyKey: description: |- This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. type: string required: - topologyKey type: object weight: description: |- weight associated with matching the corresponding podAffinityTerm, in the range 1-100. format: int32 type: integer required: - podAffinityTerm - weight type: object type: array requiredDuringSchedulingIgnoredDuringExecution: description: |- If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. items: description: |- Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key <topologyKey> matches that of any node on which a pod of the set of pods is running properties: labelSelector: description: |- A label query over a set of resources, in this case pods. If it's null, this PodAffinityTerm matches with no Pods. properties: matchExpressions: description: matchExpressions is a list of label selector requirements. The requirements are ANDed. items: description: |- A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. properties: key: description: key is the label key that the selector applies to. type: string operator: description: |- operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. type: string values: description: |- values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. items: type: string type: array required: - key - operator type: object type: array matchLabels: additionalProperties: type: string description: |- matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. type: object type: object x-kubernetes-map-type: atomic matchLabelKeys: description: |- MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `LabelSelector` as `key in (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. Also, MatchLabelKeys cannot be set when LabelSelector isn't set. This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. items: type: string type: array x-kubernetes-list-type: atomic mismatchLabelKeys: description: |- MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `LabelSelector` as `key notin (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both MismatchLabelKeys and LabelSelector. Also, MismatchLabelKeys cannot be set when LabelSelector isn't set. This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. items: type: string type: array x-kubernetes-list-type: atomic namespaceSelector: description: |- A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. properties: matchExpressions: description: matchExpressions is a list of label selector requirements. The requirements are ANDed. items: description: |- A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. properties: key: description: key is the label key that the selector applies to. type: string operator: description: |- operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. type: string values: description: |- values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. items: type: string type: array required: - key - operator type: object type: array matchLabels: additionalProperties: type: string description: |- matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. type: object type: object x-kubernetes-map-type: atomic namespaces: description: |- namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace". items: type: string type: array topologyKey: description: |- This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. type: string required: - topologyKey type: object type: array type: object type: object automountServiceAccountToken: description: AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. type: boolean containers: description: |- List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. items: description: A single application container that you want to run within a pod. properties: args: description: |- Arguments to the entrypoint. The container image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: path_to_url#running-a-command-in-a-shell items: type: string type: array command: description: |- Entrypoint array. Not executed within a shell. The container image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: path_to_url#running-a-command-in-a-shell items: type: string type: array env: description: |- List of environment variables to set in the container. Cannot be updated. items: description: EnvVar represents an environment variable present in a Container. properties: name: description: Name of the environment variable. Must be a C_IDENTIFIER. type: string value: description: |- Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". type: string valueFrom: description: Source for the environment variable's value. Cannot be used if value is not empty. properties: configMapKeyRef: description: Selects a key of a ConfigMap. properties: key: description: The key to select. type: string name: description: |- Name of the referent. More info: path_to_url#names TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap or its key must be defined type: boolean required: - key type: object x-kubernetes-map-type: atomic fieldRef: description: |- Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. properties: apiVersion: description: Version of the schema the FieldPath is written in terms of, defaults to "v1". type: string fieldPath: description: Path of the field to select in the specified API version. type: string required: - fieldPath type: object x-kubernetes-map-type: atomic resourceFieldRef: description: |- Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. properties: containerName: description: 'Container name: required for volumes, optional for env vars' type: string divisor: anyOf: - type: integer - type: string description: Specifies the output format of the exposed resources, defaults to "1" pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true resource: description: 'Required: resource to select' type: string required: - resource type: object x-kubernetes-map-type: atomic secretKeyRef: description: Selects a key of a secret in the pod's namespace properties: key: description: The key of the secret to select from. Must be a valid secret key. type: string name: description: |- Name of the referent. More info: path_to_url#names TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret or its key must be defined type: boolean required: - key type: object x-kubernetes-map-type: atomic type: object required: - name type: object type: array envFrom: description: |- List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. items: description: EnvFromSource represents the source of a set of ConfigMaps properties: configMapRef: description: The ConfigMap to select from properties: name: description: |- Name of the referent. More info: path_to_url#names TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap must be defined type: boolean type: object x-kubernetes-map-type: atomic prefix: description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string secretRef: description: The Secret to select from properties: name: description: |- Name of the referent. More info: path_to_url#names TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret must be defined type: boolean type: object x-kubernetes-map-type: atomic type: object type: array image: description: |- Container image name. More info: path_to_url This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets. type: string imagePullPolicy: description: |- Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: path_to_url#updating-images type: string lifecycle: description: |- Actions that the management system should take in response to container lifecycle events. Cannot be updated. properties: postStart: description: |- PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: path_to_url#container-hooks properties: exec: description: Exec specifies the action to take. properties: command: description: |- Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: type: string type: array type: object httpGet: description: HTTPGet specifies the http request to perform. properties: host: description: |- Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. type: string httpHeaders: description: Custom headers to set in the request. HTTP allows repeated headers. items: description: HTTPHeader describes a custom header to be used in HTTP probes properties: name: description: |- The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. type: string value: description: The header field value type: string required: - name - value type: object type: array path: description: Path to access on the HTTP server. type: string port: anyOf: - type: integer - type: string description: |- Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true scheme: description: |- Scheme to use for connecting to the host. Defaults to HTTP. type: string required: - port type: object sleep: description: Sleep represents the duration that the container should sleep before being terminated. properties: seconds: description: Seconds is the number of seconds to sleep. format: int64 type: integer required: - seconds type: object tcpSocket: description: |- Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified. properties: host: description: 'Optional: Host name to connect to, defaults to the pod IP.' type: string port: anyOf: - type: integer - type: string description: |- Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true required: - port type: object type: object preStop: description: |- PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The Pod's termination grace period countdown begins before the PreStop hook is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period (unless delayed by finalizers). Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: path_to_url#container-hooks properties: exec: description: Exec specifies the action to take. properties: command: description: |- Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: type: string type: array type: object httpGet: description: HTTPGet specifies the http request to perform. properties: host: description: |- Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. type: string httpHeaders: description: Custom headers to set in the request. HTTP allows repeated headers. items: description: HTTPHeader describes a custom header to be used in HTTP probes properties: name: description: |- The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. type: string value: description: The header field value type: string required: - name - value type: object type: array path: description: Path to access on the HTTP server. type: string port: anyOf: - type: integer - type: string description: |- Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true scheme: description: |- Scheme to use for connecting to the host. Defaults to HTTP. type: string required: - port type: object sleep: description: Sleep represents the duration that the container should sleep before being terminated. properties: seconds: description: Seconds is the number of seconds to sleep. format: int64 type: integer required: - seconds type: object tcpSocket: description: |- Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified. properties: host: description: 'Optional: Host name to connect to, defaults to the pod IP.' type: string port: anyOf: - type: integer - type: string description: |- Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true required: - port type: object type: object type: object livenessProbe: description: |- Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: path_to_url#container-probes properties: exec: description: Exec specifies the action to take. properties: command: description: |- Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: type: string type: array type: object failureThreshold: description: |- Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. format: int32 type: integer grpc: description: GRPC specifies an action involving a GRPC port. properties: port: description: Port number of the gRPC service. Number must be in the range 1 to 65535. format: int32 type: integer service: description: |- Service is the name of the service to place in the gRPC HealthCheckRequest (see path_to_url If this is not specified, the default behavior is defined by gRPC. type: string required: - port type: object httpGet: description: HTTPGet specifies the http request to perform. properties: host: description: |- Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. type: string httpHeaders: description: Custom headers to set in the request. HTTP allows repeated headers. items: description: HTTPHeader describes a custom header to be used in HTTP probes properties: name: description: |- The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. type: string value: description: The header field value type: string required: - name - value type: object type: array path: description: Path to access on the HTTP server. type: string port: anyOf: - type: integer - type: string description: |- Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true scheme: description: |- Scheme to use for connecting to the host. Defaults to HTTP. type: string required: - port type: object initialDelaySeconds: description: |- Number of seconds after the container has started before liveness probes are initiated. More info: path_to_url#container-probes format: int32 type: integer periodSeconds: description: |- How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. format: int32 type: integer successThreshold: description: |- Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. format: int32 type: integer tcpSocket: description: TCPSocket specifies an action involving a TCP port. properties: host: description: 'Optional: Host name to connect to, defaults to the pod IP.' type: string port: anyOf: - type: integer - type: string description: |- Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true required: - port type: object terminationGracePeriodSeconds: description: |- Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. format: int64 type: integer timeoutSeconds: description: |- Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: path_to_url#container-probes format: int32 type: integer type: object name: description: |- Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. type: string ports: description: |- List of ports to expose from the container. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Modifying this array with strategic merge patch may corrupt the data. For more information See path_to_url Cannot be updated. items: description: ContainerPort represents a network port in a single container. properties: containerPort: description: |- Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. format: int32 type: integer hostIP: description: What host IP to bind the external port to. type: string hostPort: description: |- Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. format: int32 type: integer name: description: |- If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services. type: string protocol: default: TCP description: |- Protocol for port. Must be UDP, TCP, or SCTP. Defaults to "TCP". type: string required: - containerPort type: object type: array x-kubernetes-list-map-keys: - containerPort - protocol x-kubernetes-list-type: map readinessProbe: description: |- Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: path_to_url#container-probes properties: exec: description: Exec specifies the action to take. properties: command: description: |- Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: type: string type: array type: object failureThreshold: description: |- Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. format: int32 type: integer grpc: description: GRPC specifies an action involving a GRPC port. properties: port: description: Port number of the gRPC service. Number must be in the range 1 to 65535. format: int32 type: integer service: description: |- Service is the name of the service to place in the gRPC HealthCheckRequest (see path_to_url If this is not specified, the default behavior is defined by gRPC. type: string required: - port type: object httpGet: description: HTTPGet specifies the http request to perform. properties: host: description: |- Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. type: string httpHeaders: description: Custom headers to set in the request. HTTP allows repeated headers. items: description: HTTPHeader describes a custom header to be used in HTTP probes properties: name: description: |- The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. type: string value: description: The header field value type: string required: - name - value type: object type: array path: description: Path to access on the HTTP server. type: string port: anyOf: - type: integer - type: string description: |- Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true scheme: description: |- Scheme to use for connecting to the host. Defaults to HTTP. type: string required: - port type: object initialDelaySeconds: description: |- Number of seconds after the container has started before liveness probes are initiated. More info: path_to_url#container-probes format: int32 type: integer periodSeconds: description: |- How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. format: int32 type: integer successThreshold: description: |- Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. format: int32 type: integer tcpSocket: description: TCPSocket specifies an action involving a TCP port. properties: host: description: 'Optional: Host name to connect to, defaults to the pod IP.' type: string port: anyOf: - type: integer - type: string description: |- Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true required: - port type: object terminationGracePeriodSeconds: description: |- Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. format: int64 type: integer timeoutSeconds: description: |- Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: path_to_url#container-probes format: int32 type: integer type: object resizePolicy: description: Resources resize policy for the container. items: description: ContainerResizePolicy represents resource resize policy for the container. properties: resourceName: description: |- Name of the resource to which this resource resize policy applies. Supported values: cpu, memory. type: string restartPolicy: description: |- Restart policy to apply when specified resource is resized. If not specified, it defaults to NotRequired. type: string required: - resourceName - restartPolicy type: object type: array x-kubernetes-list-type: atomic resources: description: |- Compute Resources required by this container. Cannot be updated. More info: path_to_url properties: claims: description: |- Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. This field is immutable. It can only be set for containers. items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. properties: name: description: |- Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container. type: string required: - name type: object type: array x-kubernetes-list-map-keys: - name x-kubernetes-list-type: map limits: additionalProperties: anyOf: - type: integer - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true description: |- Limits describes the maximum amount of compute resources allowed. More info: path_to_url type: object requests: additionalProperties: anyOf: - type: integer - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true description: |- Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: path_to_url type: object type: object restartPolicy: description: |- RestartPolicy defines the restart behavior of individual containers in a pod. This field may only be set for init containers, and the only allowed value is "Always". For non-init containers or when this field is not specified, the restart behavior is defined by the Pod's restart policy and the container type. Setting the RestartPolicy as "Always" for the init container will have the following effect: this init container will be continually restarted on exit until all regular containers have terminated. Once all regular containers have completed, all init containers with restartPolicy "Always" will be shut down. This lifecycle differs from normal init containers and is often referred to as a "sidecar" container. Although this init container still starts in the init container sequence, it does not wait for the container to complete before proceeding to the next init container. Instead, the next init container starts immediately after this init container is started, or after any startupProbe has successfully completed. type: string securityContext: description: |- SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. More info: path_to_url properties: allowPrivilegeEscalation: description: |- AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN Note that this field cannot be set when spec.os.name is windows. type: boolean capabilities: description: |- The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows. properties: add: description: Added capabilities items: description: Capability represent POSIX capabilities type type: string type: array drop: description: Removed capabilities items: description: Capability represent POSIX capabilities type type: string type: array type: object privileged: description: |- Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. Note that this field cannot be set when spec.os.name is windows. type: boolean procMount: description: |- procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled. Note that this field cannot be set when spec.os.name is windows. type: string readOnlyRootFilesystem: description: |- Whether this container has a read-only root filesystem. Default is false. Note that this field cannot be set when spec.os.name is windows. type: boolean runAsGroup: description: |- The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows. format: int64 type: integer runAsNonRoot: description: |- Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. type: boolean runAsUser: description: |- The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows. format: int64 type: integer seLinuxOptions: description: |- The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows. properties: level: description: Level is SELinux level label that applies to the container. type: string role: description: Role is a SELinux role label that applies to the container. type: string type: description: Type is a SELinux type label that applies to the container. type: string user: description: User is a SELinux user label that applies to the container. type: string type: object seccompProfile: description: |- The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows. properties: localhostProfile: description: |- localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must be set if type is "Localhost". Must NOT be set for any other type. type: string type: description: |- type indicates which kind of seccomp profile will be applied. Valid options are: Localhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied. type: string required: - type type: object windowsOptions: description: |- The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux. properties: gmsaCredentialSpec: description: |- GMSACredentialSpec is where the GMSA admission webhook (path_to_url inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field. type: string gmsaCredentialSpecName: description: GMSACredentialSpecName is the name of the GMSA credential spec to use. type: string hostProcess: description: |- HostProcess determines if a container should be run as a 'Host Process' container. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true. type: boolean runAsUserName: description: |- The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. type: string type: object type: object startupProbe: description: |- StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. More info: path_to_url#container-probes properties: exec: description: Exec specifies the action to take. properties: command: description: |- Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: type: string type: array type: object failureThreshold: description: |- Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. format: int32 type: integer grpc: description: GRPC specifies an action involving a GRPC port. properties: port: description: Port number of the gRPC service. Number must be in the range 1 to 65535. format: int32 type: integer service: description: |- Service is the name of the service to place in the gRPC HealthCheckRequest (see path_to_url If this is not specified, the default behavior is defined by gRPC. type: string required: - port type: object httpGet: description: HTTPGet specifies the http request to perform. properties: host: description: |- Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. type: string httpHeaders: description: Custom headers to set in the request. HTTP allows repeated headers. items: description: HTTPHeader describes a custom header to be used in HTTP probes properties: name: description: |- The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. type: string value: description: The header field value type: string required: - name - value type: object type: array path: description: Path to access on the HTTP server. type: string port: anyOf: - type: integer - type: string description: |- Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true scheme: description: |- Scheme to use for connecting to the host. Defaults to HTTP. type: string required: - port type: object initialDelaySeconds: description: |- Number of seconds after the container has started before liveness probes are initiated. More info: path_to_url#container-probes format: int32 type: integer periodSeconds: description: |- How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. format: int32 type: integer successThreshold: description: |- Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. format: int32 type: integer tcpSocket: description: TCPSocket specifies an action involving a TCP port. properties: host: description: 'Optional: Host name to connect to, defaults to the pod IP.' type: string port: anyOf: - type: integer - type: string description: |- Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true required: - port type: object terminationGracePeriodSeconds: description: |- Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. format: int64 type: integer timeoutSeconds: description: |- Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: path_to_url#container-probes format: int32 type: integer type: object stdin: description: |- Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false. type: boolean stdinOnce: description: |- Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false type: boolean terminationMessagePath: description: |- Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated. type: string terminationMessagePolicy: description: |- Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. type: string tty: description: |- Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false. type: boolean volumeDevices: description: volumeDevices is the list of block devices to be used by the container. items: description: volumeDevice describes a mapping of a raw block device within a container. properties: devicePath: description: devicePath is the path inside of the container that the device will be mapped to. type: string name: description: name must match the name of a persistentVolumeClaim in the pod type: string required: - devicePath - name type: object type: array volumeMounts: description: |- Pod volumes to mount into the container's filesystem. Cannot be updated. items: description: VolumeMount describes a mounting of a Volume within a container. properties: mountPath: description: |- Path within the container at which the volume should be mounted. Must not contain ':'. type: string mountPropagation: description: |- mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10. type: string name: description: This must match the Name of a Volume. type: string readOnly: description: |- Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. type: boolean subPath: description: |- Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). type: string subPathExpr: description: |- Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root). SubPathExpr and SubPath are mutually exclusive. type: string required: - mountPath - name type: object type: array workingDir: description: |- Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. type: string required: - name type: object type: array dnsConfig: description: |- Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. properties: nameservers: description: |- A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. items: type: string type: array options: description: |- A list of DNS resolver options. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy. items: description: PodDNSConfigOption defines DNS resolver options of a pod. properties: name: description: Required. type: string value: type: string type: object type: array searches: description: |- A list of DNS search domains for host-name lookup. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed. items: type: string type: array type: object dnsPolicy: description: |- Set DNS policy for the pod. Defaults to "ClusterFirst". Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. type: string enableServiceLinks: description: |- EnableServiceLinks indicates whether information about services should be injected into pod's environment variables, matching the syntax of Docker links. Optional: Defaults to true. type: boolean ephemeralContainers: description: |- List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing pod to perform user-initiated actions such as debugging. This list cannot be specified when creating a pod, and it cannot be modified by updating the pod spec. In order to add an ephemeral container to an existing pod, use the pod's ephemeralcontainers subresource. items: description: |- An EphemeralContainer is a temporary container that you may add to an existing Pod for user-initiated activities such as debugging. Ephemeral containers have no resource or scheduling guarantees, and they will not be restarted when they exit or when a Pod is removed or restarted. The kubelet may evict a Pod if an ephemeral container causes the Pod to exceed its resource allocation. To add an ephemeral container, use the ephemeralcontainers subresource of an existing Pod. Ephemeral containers may not be removed or restarted. properties: args: description: |- Arguments to the entrypoint. The image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: path_to_url#running-a-command-in-a-shell items: type: string type: array command: description: |- Entrypoint array. Not executed within a shell. The image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: path_to_url#running-a-command-in-a-shell items: type: string type: array env: description: |- List of environment variables to set in the container. Cannot be updated. items: description: EnvVar represents an environment variable present in a Container. properties: name: description: Name of the environment variable. Must be a C_IDENTIFIER. type: string value: description: |- Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". type: string valueFrom: description: Source for the environment variable's value. Cannot be used if value is not empty. properties: configMapKeyRef: description: Selects a key of a ConfigMap. properties: key: description: The key to select. type: string name: description: |- Name of the referent. More info: path_to_url#names TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap or its key must be defined type: boolean required: - key type: object x-kubernetes-map-type: atomic fieldRef: description: |- Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. properties: apiVersion: description: Version of the schema the FieldPath is written in terms of, defaults to "v1". type: string fieldPath: description: Path of the field to select in the specified API version. type: string required: - fieldPath type: object x-kubernetes-map-type: atomic resourceFieldRef: description: |- Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. properties: containerName: description: 'Container name: required for volumes, optional for env vars' type: string divisor: anyOf: - type: integer - type: string description: Specifies the output format of the exposed resources, defaults to "1" pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true resource: description: 'Required: resource to select' type: string required: - resource type: object x-kubernetes-map-type: atomic secretKeyRef: description: Selects a key of a secret in the pod's namespace properties: key: description: The key of the secret to select from. Must be a valid secret key. type: string name: description: |- Name of the referent. More info: path_to_url#names TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret or its key must be defined type: boolean required: - key type: object x-kubernetes-map-type: atomic type: object required: - name type: object type: array envFrom: description: |- List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. items: description: EnvFromSource represents the source of a set of ConfigMaps properties: configMapRef: description: The ConfigMap to select from properties: name: description: |- Name of the referent. More info: path_to_url#names TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap must be defined type: boolean type: object x-kubernetes-map-type: atomic prefix: description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string secretRef: description: The Secret to select from properties: name: description: |- Name of the referent. More info: path_to_url#names TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret must be defined type: boolean type: object x-kubernetes-map-type: atomic type: object type: array image: description: |- Container image name. More info: path_to_url type: string imagePullPolicy: description: |- Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: path_to_url#updating-images type: string lifecycle: description: Lifecycle is not allowed for ephemeral containers. properties: postStart: description: |- PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: path_to_url#container-hooks properties: exec: description: Exec specifies the action to take. properties: command: description: |- Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: type: string type: array type: object httpGet: description: HTTPGet specifies the http request to perform. properties: host: description: |- Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. type: string httpHeaders: description: Custom headers to set in the request. HTTP allows repeated headers. items: description: HTTPHeader describes a custom header to be used in HTTP probes properties: name: description: |- The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. type: string value: description: The header field value type: string required: - name - value type: object type: array path: description: Path to access on the HTTP server. type: string port: anyOf: - type: integer - type: string description: |- Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true scheme: description: |- Scheme to use for connecting to the host. Defaults to HTTP. type: string required: - port type: object sleep: description: Sleep represents the duration that the container should sleep before being terminated. properties: seconds: description: Seconds is the number of seconds to sleep. format: int64 type: integer required: - seconds type: object tcpSocket: description: |- Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified. properties: host: description: 'Optional: Host name to connect to, defaults to the pod IP.' type: string port: anyOf: - type: integer - type: string description: |- Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true required: - port type: object type: object preStop: description: |- PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The Pod's termination grace period countdown begins before the PreStop hook is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period (unless delayed by finalizers). Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: path_to_url#container-hooks properties: exec: description: Exec specifies the action to take. properties: command: description: |- Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: type: string type: array type: object httpGet: description: HTTPGet specifies the http request to perform. properties: host: description: |- Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. type: string httpHeaders: description: Custom headers to set in the request. HTTP allows repeated headers. items: description: HTTPHeader describes a custom header to be used in HTTP probes properties: name: description: |- The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. type: string value: description: The header field value type: string required: - name - value type: object type: array path: description: Path to access on the HTTP server. type: string port: anyOf: - type: integer - type: string description: |- Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true scheme: description: |- Scheme to use for connecting to the host. Defaults to HTTP. type: string required: - port type: object sleep: description: Sleep represents the duration that the container should sleep before being terminated. properties: seconds: description: Seconds is the number of seconds to sleep. format: int64 type: integer required: - seconds type: object tcpSocket: description: |- Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified. properties: host: description: 'Optional: Host name to connect to, defaults to the pod IP.' type: string port: anyOf: - type: integer - type: string description: |- Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true required: - port type: object type: object type: object livenessProbe: description: Probes are not allowed for ephemeral containers. properties: exec: description: Exec specifies the action to take. properties: command: description: |- Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: type: string type: array type: object failureThreshold: description: |- Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. format: int32 type: integer grpc: description: GRPC specifies an action involving a GRPC port. properties: port: description: Port number of the gRPC service. Number must be in the range 1 to 65535. format: int32 type: integer service: description: |- Service is the name of the service to place in the gRPC HealthCheckRequest (see path_to_url If this is not specified, the default behavior is defined by gRPC. type: string required: - port type: object httpGet: description: HTTPGet specifies the http request to perform. properties: host: description: |- Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. type: string httpHeaders: description: Custom headers to set in the request. HTTP allows repeated headers. items: description: HTTPHeader describes a custom header to be used in HTTP probes properties: name: description: |- The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. type: string value: description: The header field value type: string required: - name - value type: object type: array path: description: Path to access on the HTTP server. type: string port: anyOf: - type: integer - type: string description: |- Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true scheme: description: |- Scheme to use for connecting to the host. Defaults to HTTP. type: string required: - port type: object initialDelaySeconds: description: |- Number of seconds after the container has started before liveness probes are initiated. More info: path_to_url#container-probes format: int32 type: integer periodSeconds: description: |- How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. format: int32 type: integer successThreshold: description: |- Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. format: int32 type: integer tcpSocket: description: TCPSocket specifies an action involving a TCP port. properties: host: description: 'Optional: Host name to connect to, defaults to the pod IP.' type: string port: anyOf: - type: integer - type: string description: |- Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true required: - port type: object terminationGracePeriodSeconds: description: |- Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. format: int64 type: integer timeoutSeconds: description: |- Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: path_to_url#container-probes format: int32 type: integer type: object name: description: |- Name of the ephemeral container specified as a DNS_LABEL. This name must be unique among all containers, init containers and ephemeral containers. type: string ports: description: Ports are not allowed for ephemeral containers. items: description: ContainerPort represents a network port in a single container. properties: containerPort: description: |- Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. format: int32 type: integer hostIP: description: What host IP to bind the external port to. type: string hostPort: description: |- Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. format: int32 type: integer name: description: |- If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services. type: string protocol: default: TCP description: |- Protocol for port. Must be UDP, TCP, or SCTP. Defaults to "TCP". type: string required: - containerPort type: object type: array x-kubernetes-list-map-keys: - containerPort - protocol x-kubernetes-list-type: map readinessProbe: description: Probes are not allowed for ephemeral containers. properties: exec: description: Exec specifies the action to take. properties: command: description: |- Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: type: string type: array type: object failureThreshold: description: |- Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. format: int32 type: integer grpc: description: GRPC specifies an action involving a GRPC port. properties: port: description: Port number of the gRPC service. Number must be in the range 1 to 65535. format: int32 type: integer service: description: |- Service is the name of the service to place in the gRPC HealthCheckRequest (see path_to_url If this is not specified, the default behavior is defined by gRPC. type: string required: - port type: object httpGet: description: HTTPGet specifies the http request to perform. properties: host: description: |- Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. type: string httpHeaders: description: Custom headers to set in the request. HTTP allows repeated headers. items: description: HTTPHeader describes a custom header to be used in HTTP probes properties: name: description: |- The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. type: string value: description: The header field value type: string required: - name - value type: object type: array path: description: Path to access on the HTTP server. type: string port: anyOf: - type: integer - type: string description: |- Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true scheme: description: |- Scheme to use for connecting to the host. Defaults to HTTP. type: string required: - port type: object initialDelaySeconds: description: |- Number of seconds after the container has started before liveness probes are initiated. More info: path_to_url#container-probes format: int32 type: integer periodSeconds: description: |- How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. format: int32 type: integer successThreshold: description: |- Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. format: int32 type: integer tcpSocket: description: TCPSocket specifies an action involving a TCP port. properties: host: description: 'Optional: Host name to connect to, defaults to the pod IP.' type: string port: anyOf: - type: integer - type: string description: |- Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true required: - port type: object terminationGracePeriodSeconds: description: |- Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. format: int64 type: integer timeoutSeconds: description: |- Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: path_to_url#container-probes format: int32 type: integer type: object resizePolicy: description: Resources resize policy for the container. items: description: ContainerResizePolicy represents resource resize policy for the container. properties: resourceName: description: |- Name of the resource to which this resource resize policy applies. Supported values: cpu, memory. type: string restartPolicy: description: |- Restart policy to apply when specified resource is resized. If not specified, it defaults to NotRequired. type: string required: - resourceName - restartPolicy type: object type: array x-kubernetes-list-type: atomic resources: description: |- Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources already allocated to the pod. properties: claims: description: |- Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. This field is immutable. It can only be set for containers. items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. properties: name: description: |- Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container. type: string required: - name type: object type: array x-kubernetes-list-map-keys: - name x-kubernetes-list-type: map limits: additionalProperties: anyOf: - type: integer - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true description: |- Limits describes the maximum amount of compute resources allowed. More info: path_to_url type: object requests: additionalProperties: anyOf: - type: integer - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true description: |- Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: path_to_url type: object type: object restartPolicy: description: |- Restart policy for the container to manage the restart behavior of each container within a pod. This may only be set for init containers. You cannot set this field on ephemeral containers. type: string securityContext: description: |- Optional: SecurityContext defines the security options the ephemeral container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. properties: allowPrivilegeEscalation: description: |- AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN Note that this field cannot be set when spec.os.name is windows. type: boolean capabilities: description: |- The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows. properties: add: description: Added capabilities items: description: Capability represent POSIX capabilities type type: string type: array drop: description: Removed capabilities items: description: Capability represent POSIX capabilities type type: string type: array type: object privileged: description: |- Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. Note that this field cannot be set when spec.os.name is windows. type: boolean procMount: description: |- procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled. Note that this field cannot be set when spec.os.name is windows. type: string readOnlyRootFilesystem: description: |- Whether this container has a read-only root filesystem. Default is false. Note that this field cannot be set when spec.os.name is windows. type: boolean runAsGroup: description: |- The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows. format: int64 type: integer runAsNonRoot: description: |- Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. type: boolean runAsUser: description: |- The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows. format: int64 type: integer seLinuxOptions: description: |- The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows. properties: level: description: Level is SELinux level label that applies to the container. type: string role: description: Role is a SELinux role label that applies to the container. type: string type: description: Type is a SELinux type label that applies to the container. type: string user: description: User is a SELinux user label that applies to the container. type: string type: object seccompProfile: description: |- The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows. properties: localhostProfile: description: |- localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must be set if type is "Localhost". Must NOT be set for any other type. type: string type: description: |- type indicates which kind of seccomp profile will be applied. Valid options are: Localhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied. type: string required: - type type: object windowsOptions: description: |- The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux. properties: gmsaCredentialSpec: description: |- GMSACredentialSpec is where the GMSA admission webhook (path_to_url inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field. type: string gmsaCredentialSpecName: description: GMSACredentialSpecName is the name of the GMSA credential spec to use. type: string hostProcess: description: |- HostProcess determines if a container should be run as a 'Host Process' container. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true. type: boolean runAsUserName: description: |- The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. type: string type: object type: object startupProbe: description: Probes are not allowed for ephemeral containers. properties: exec: description: Exec specifies the action to take. properties: command: description: |- Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: type: string type: array type: object failureThreshold: description: |- Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. format: int32 type: integer grpc: description: GRPC specifies an action involving a GRPC port. properties: port: description: Port number of the gRPC service. Number must be in the range 1 to 65535. format: int32 type: integer service: description: |- Service is the name of the service to place in the gRPC HealthCheckRequest (see path_to_url If this is not specified, the default behavior is defined by gRPC. type: string required: - port type: object httpGet: description: HTTPGet specifies the http request to perform. properties: host: description: |- Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. type: string httpHeaders: description: Custom headers to set in the request. HTTP allows repeated headers. items: description: HTTPHeader describes a custom header to be used in HTTP probes properties: name: description: |- The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. type: string value: description: The header field value type: string required: - name - value type: object type: array path: description: Path to access on the HTTP server. type: string port: anyOf: - type: integer - type: string description: |- Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true scheme: description: |- Scheme to use for connecting to the host. Defaults to HTTP. type: string required: - port type: object initialDelaySeconds: description: |- Number of seconds after the container has started before liveness probes are initiated. More info: path_to_url#container-probes format: int32 type: integer periodSeconds: description: |- How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. format: int32 type: integer successThreshold: description: |- Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. format: int32 type: integer tcpSocket: description: TCPSocket specifies an action involving a TCP port. properties: host: description: 'Optional: Host name to connect to, defaults to the pod IP.' type: string port: anyOf: - type: integer - type: string description: |- Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true required: - port type: object terminationGracePeriodSeconds: description: |- Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. format: int64 type: integer timeoutSeconds: description: |- Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: path_to_url#container-probes format: int32 type: integer type: object stdin: description: |- Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false. type: boolean stdinOnce: description: |- Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false type: boolean targetContainerName: description: |- If set, the name of the container from PodSpec that this ephemeral container targets. The ephemeral container will be run in the namespaces (IPC, PID, etc) of this container. If not set then the ephemeral container uses the namespaces configured in the Pod spec. The container runtime must implement support for this feature. If the runtime does not support namespace targeting then the result of setting this field is undefined. type: string terminationMessagePath: description: |- Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated. type: string terminationMessagePolicy: description: |- Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. type: string tty: description: |- Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false. type: boolean volumeDevices: description: volumeDevices is the list of block devices to be used by the container. items: description: volumeDevice describes a mapping of a raw block device within a container. properties: devicePath: description: devicePath is the path inside of the container that the device will be mapped to. type: string name: description: name must match the name of a persistentVolumeClaim in the pod type: string required: - devicePath - name type: object type: array volumeMounts: description: |- Pod volumes to mount into the container's filesystem. Subpath mounts are not allowed for ephemeral containers. Cannot be updated. items: description: VolumeMount describes a mounting of a Volume within a container. properties: mountPath: description: |- Path within the container at which the volume should be mounted. Must not contain ':'. type: string mountPropagation: description: |- mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10. type: string name: description: This must match the Name of a Volume. type: string readOnly: description: |- Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. type: boolean subPath: description: |- Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). type: string subPathExpr: description: |- Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root). SubPathExpr and SubPath are mutually exclusive. type: string required: - mountPath - name type: object type: array workingDir: description: |- Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. type: string required: - name type: object type: array hostAliases: description: |- HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. items: description: |- HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. properties: hostnames: description: Hostnames for the above IP address. items: type: string type: array ip: description: IP address of the host file entry. type: string type: object type: array hostIPC: description: |- Use the host's ipc namespace. Optional: Default to false. type: boolean hostNetwork: description: |- Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false. type: boolean hostPID: description: |- Use the host's pid namespace. Optional: Default to false. type: boolean hostUsers: description: |- Use the host's user namespace. Optional: Default to true. If set to true or not present, the pod will be run in the host user namespace, useful for when the pod needs a feature only available to the host user namespace, such as loading a kernel module with CAP_SYS_MODULE. When set to false, a new userns is created for the pod. Setting false is useful for mitigating container breakout vulnerabilities even allowing users to run their containers as root without actually having root privileges on the host. This field is alpha-level and is only honored by servers that enable the UserNamespacesSupport feature. type: boolean hostname: description: |- Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. type: string imagePullSecrets: description: |- ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. More info: path_to_url#specifying-imagepullsecrets-on-a-pod items: description: |- LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. properties: name: description: |- Name of the referent. More info: path_to_url#names TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object x-kubernetes-map-type: atomic type: array initContainers: description: |- List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: path_to_url items: description: A single application container that you want to run within a pod. properties: args: description: |- Arguments to the entrypoint. The container image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: path_to_url#running-a-command-in-a-shell items: type: string type: array command: description: |- Entrypoint array. Not executed within a shell. The container image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: path_to_url#running-a-command-in-a-shell items: type: string type: array env: description: |- List of environment variables to set in the container. Cannot be updated. items: description: EnvVar represents an environment variable present in a Container. properties: name: description: Name of the environment variable. Must be a C_IDENTIFIER. type: string value: description: |- Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". type: string valueFrom: description: Source for the environment variable's value. Cannot be used if value is not empty. properties: configMapKeyRef: description: Selects a key of a ConfigMap. properties: key: description: The key to select. type: string name: description: |- Name of the referent. More info: path_to_url#names TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap or its key must be defined type: boolean required: - key type: object x-kubernetes-map-type: atomic fieldRef: description: |- Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. properties: apiVersion: description: Version of the schema the FieldPath is written in terms of, defaults to "v1". type: string fieldPath: description: Path of the field to select in the specified API version. type: string required: - fieldPath type: object x-kubernetes-map-type: atomic resourceFieldRef: description: |- Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. properties: containerName: description: 'Container name: required for volumes, optional for env vars' type: string divisor: anyOf: - type: integer - type: string description: Specifies the output format of the exposed resources, defaults to "1" pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true resource: description: 'Required: resource to select' type: string required: - resource type: object x-kubernetes-map-type: atomic secretKeyRef: description: Selects a key of a secret in the pod's namespace properties: key: description: The key of the secret to select from. Must be a valid secret key. type: string name: description: |- Name of the referent. More info: path_to_url#names TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret or its key must be defined type: boolean required: - key type: object x-kubernetes-map-type: atomic type: object required: - name type: object type: array envFrom: description: |- List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. items: description: EnvFromSource represents the source of a set of ConfigMaps properties: configMapRef: description: The ConfigMap to select from properties: name: description: |- Name of the referent. More info: path_to_url#names TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap must be defined type: boolean type: object x-kubernetes-map-type: atomic prefix: description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. type: string secretRef: description: The Secret to select from properties: name: description: |- Name of the referent. More info: path_to_url#names TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret must be defined type: boolean type: object x-kubernetes-map-type: atomic type: object type: array image: description: |- Container image name. More info: path_to_url This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets. type: string imagePullPolicy: description: |- Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: path_to_url#updating-images type: string lifecycle: description: |- Actions that the management system should take in response to container lifecycle events. Cannot be updated. properties: postStart: description: |- PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: path_to_url#container-hooks properties: exec: description: Exec specifies the action to take. properties: command: description: |- Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: type: string type: array type: object httpGet: description: HTTPGet specifies the http request to perform. properties: host: description: |- Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. type: string httpHeaders: description: Custom headers to set in the request. HTTP allows repeated headers. items: description: HTTPHeader describes a custom header to be used in HTTP probes properties: name: description: |- The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. type: string value: description: The header field value type: string required: - name - value type: object type: array path: description: Path to access on the HTTP server. type: string port: anyOf: - type: integer - type: string description: |- Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true scheme: description: |- Scheme to use for connecting to the host. Defaults to HTTP. type: string required: - port type: object sleep: description: Sleep represents the duration that the container should sleep before being terminated. properties: seconds: description: Seconds is the number of seconds to sleep. format: int64 type: integer required: - seconds type: object tcpSocket: description: |- Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified. properties: host: description: 'Optional: Host name to connect to, defaults to the pod IP.' type: string port: anyOf: - type: integer - type: string description: |- Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true required: - port type: object type: object preStop: description: |- PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The Pod's termination grace period countdown begins before the PreStop hook is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period (unless delayed by finalizers). Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: path_to_url#container-hooks properties: exec: description: Exec specifies the action to take. properties: command: description: |- Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: type: string type: array type: object httpGet: description: HTTPGet specifies the http request to perform. properties: host: description: |- Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. type: string httpHeaders: description: Custom headers to set in the request. HTTP allows repeated headers. items: description: HTTPHeader describes a custom header to be used in HTTP probes properties: name: description: |- The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. type: string value: description: The header field value type: string required: - name - value type: object type: array path: description: Path to access on the HTTP server. type: string port: anyOf: - type: integer - type: string description: |- Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true scheme: description: |- Scheme to use for connecting to the host. Defaults to HTTP. type: string required: - port type: object sleep: description: Sleep represents the duration that the container should sleep before being terminated. properties: seconds: description: Seconds is the number of seconds to sleep. format: int64 type: integer required: - seconds type: object tcpSocket: description: |- Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified. properties: host: description: 'Optional: Host name to connect to, defaults to the pod IP.' type: string port: anyOf: - type: integer - type: string description: |- Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true required: - port type: object type: object type: object livenessProbe: description: |- Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: path_to_url#container-probes properties: exec: description: Exec specifies the action to take. properties: command: description: |- Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: type: string type: array type: object failureThreshold: description: |- Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. format: int32 type: integer grpc: description: GRPC specifies an action involving a GRPC port. properties: port: description: Port number of the gRPC service. Number must be in the range 1 to 65535. format: int32 type: integer service: description: |- Service is the name of the service to place in the gRPC HealthCheckRequest (see path_to_url If this is not specified, the default behavior is defined by gRPC. type: string required: - port type: object httpGet: description: HTTPGet specifies the http request to perform. properties: host: description: |- Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. type: string httpHeaders: description: Custom headers to set in the request. HTTP allows repeated headers. items: description: HTTPHeader describes a custom header to be used in HTTP probes properties: name: description: |- The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. type: string value: description: The header field value type: string required: - name - value type: object type: array path: description: Path to access on the HTTP server. type: string port: anyOf: - type: integer - type: string description: |- Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true scheme: description: |- Scheme to use for connecting to the host. Defaults to HTTP. type: string required: - port type: object initialDelaySeconds: description: |- Number of seconds after the container has started before liveness probes are initiated. More info: path_to_url#container-probes format: int32 type: integer periodSeconds: description: |- How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. format: int32 type: integer successThreshold: description: |- Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. format: int32 type: integer tcpSocket: description: TCPSocket specifies an action involving a TCP port. properties: host: description: 'Optional: Host name to connect to, defaults to the pod IP.' type: string port: anyOf: - type: integer - type: string description: |- Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true required: - port type: object terminationGracePeriodSeconds: description: |- Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. format: int64 type: integer timeoutSeconds: description: |- Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: path_to_url#container-probes format: int32 type: integer type: object name: description: |- Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. type: string ports: description: |- List of ports to expose from the container. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Modifying this array with strategic merge patch may corrupt the data. For more information See path_to_url Cannot be updated. items: description: ContainerPort represents a network port in a single container. properties: containerPort: description: |- Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. format: int32 type: integer hostIP: description: What host IP to bind the external port to. type: string hostPort: description: |- Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. format: int32 type: integer name: description: |- If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services. type: string protocol: default: TCP description: |- Protocol for port. Must be UDP, TCP, or SCTP. Defaults to "TCP". type: string required: - containerPort type: object type: array x-kubernetes-list-map-keys: - containerPort - protocol x-kubernetes-list-type: map readinessProbe: description: |- Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: path_to_url#container-probes properties: exec: description: Exec specifies the action to take. properties: command: description: |- Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: type: string type: array type: object failureThreshold: description: |- Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. format: int32 type: integer grpc: description: GRPC specifies an action involving a GRPC port. properties: port: description: Port number of the gRPC service. Number must be in the range 1 to 65535. format: int32 type: integer service: description: |- Service is the name of the service to place in the gRPC HealthCheckRequest (see path_to_url If this is not specified, the default behavior is defined by gRPC. type: string required: - port type: object httpGet: description: HTTPGet specifies the http request to perform. properties: host: description: |- Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. type: string httpHeaders: description: Custom headers to set in the request. HTTP allows repeated headers. items: description: HTTPHeader describes a custom header to be used in HTTP probes properties: name: description: |- The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. type: string value: description: The header field value type: string required: - name - value type: object type: array path: description: Path to access on the HTTP server. type: string port: anyOf: - type: integer - type: string description: |- Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true scheme: description: |- Scheme to use for connecting to the host. Defaults to HTTP. type: string required: - port type: object initialDelaySeconds: description: |- Number of seconds after the container has started before liveness probes are initiated. More info: path_to_url#container-probes format: int32 type: integer periodSeconds: description: |- How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. format: int32 type: integer successThreshold: description: |- Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. format: int32 type: integer tcpSocket: description: TCPSocket specifies an action involving a TCP port. properties: host: description: 'Optional: Host name to connect to, defaults to the pod IP.' type: string port: anyOf: - type: integer - type: string description: |- Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true required: - port type: object terminationGracePeriodSeconds: description: |- Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. format: int64 type: integer timeoutSeconds: description: |- Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: path_to_url#container-probes format: int32 type: integer type: object resizePolicy: description: Resources resize policy for the container. items: description: ContainerResizePolicy represents resource resize policy for the container. properties: resourceName: description: |- Name of the resource to which this resource resize policy applies. Supported values: cpu, memory. type: string restartPolicy: description: |- Restart policy to apply when specified resource is resized. If not specified, it defaults to NotRequired. type: string required: - resourceName - restartPolicy type: object type: array x-kubernetes-list-type: atomic resources: description: |- Compute Resources required by this container. Cannot be updated. More info: path_to_url properties: claims: description: |- Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. This field is immutable. It can only be set for containers. items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. properties: name: description: |- Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container. type: string required: - name type: object type: array x-kubernetes-list-map-keys: - name x-kubernetes-list-type: map limits: additionalProperties: anyOf: - type: integer - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true description: |- Limits describes the maximum amount of compute resources allowed. More info: path_to_url type: object requests: additionalProperties: anyOf: - type: integer - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true description: |- Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: path_to_url type: object type: object restartPolicy: description: |- RestartPolicy defines the restart behavior of individual containers in a pod. This field may only be set for init containers, and the only allowed value is "Always". For non-init containers or when this field is not specified, the restart behavior is defined by the Pod's restart policy and the container type. Setting the RestartPolicy as "Always" for the init container will have the following effect: this init container will be continually restarted on exit until all regular containers have terminated. Once all regular containers have completed, all init containers with restartPolicy "Always" will be shut down. This lifecycle differs from normal init containers and is often referred to as a "sidecar" container. Although this init container still starts in the init container sequence, it does not wait for the container to complete before proceeding to the next init container. Instead, the next init container starts immediately after this init container is started, or after any startupProbe has successfully completed. type: string securityContext: description: |- SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. More info: path_to_url properties: allowPrivilegeEscalation: description: |- AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN Note that this field cannot be set when spec.os.name is windows. type: boolean capabilities: description: |- The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows. properties: add: description: Added capabilities items: description: Capability represent POSIX capabilities type type: string type: array drop: description: Removed capabilities items: description: Capability represent POSIX capabilities type type: string type: array type: object privileged: description: |- Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. Note that this field cannot be set when spec.os.name is windows. type: boolean procMount: description: |- procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled. Note that this field cannot be set when spec.os.name is windows. type: string readOnlyRootFilesystem: description: |- Whether this container has a read-only root filesystem. Default is false. Note that this field cannot be set when spec.os.name is windows. type: boolean runAsGroup: description: |- The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows. format: int64 type: integer runAsNonRoot: description: |- Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. type: boolean runAsUser: description: |- The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows. format: int64 type: integer seLinuxOptions: description: |- The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows. properties: level: description: Level is SELinux level label that applies to the container. type: string role: description: Role is a SELinux role label that applies to the container. type: string type: description: Type is a SELinux type label that applies to the container. type: string user: description: User is a SELinux user label that applies to the container. type: string type: object seccompProfile: description: |- The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows. properties: localhostProfile: description: |- localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must be set if type is "Localhost". Must NOT be set for any other type. type: string type: description: |- type indicates which kind of seccomp profile will be applied. Valid options are: Localhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied. type: string required: - type type: object windowsOptions: description: |- The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux. properties: gmsaCredentialSpec: description: |- GMSACredentialSpec is where the GMSA admission webhook (path_to_url inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field. type: string gmsaCredentialSpecName: description: GMSACredentialSpecName is the name of the GMSA credential spec to use. type: string hostProcess: description: |- HostProcess determines if a container should be run as a 'Host Process' container. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true. type: boolean runAsUserName: description: |- The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. type: string type: object type: object startupProbe: description: |- StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. More info: path_to_url#container-probes properties: exec: description: Exec specifies the action to take. properties: command: description: |- Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: type: string type: array type: object failureThreshold: description: |- Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. format: int32 type: integer grpc: description: GRPC specifies an action involving a GRPC port. properties: port: description: Port number of the gRPC service. Number must be in the range 1 to 65535. format: int32 type: integer service: description: |- Service is the name of the service to place in the gRPC HealthCheckRequest (see path_to_url If this is not specified, the default behavior is defined by gRPC. type: string required: - port type: object httpGet: description: HTTPGet specifies the http request to perform. properties: host: description: |- Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. type: string httpHeaders: description: Custom headers to set in the request. HTTP allows repeated headers. items: description: HTTPHeader describes a custom header to be used in HTTP probes properties: name: description: |- The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. type: string value: description: The header field value type: string required: - name - value type: object type: array path: description: Path to access on the HTTP server. type: string port: anyOf: - type: integer - type: string description: |- Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true scheme: description: |- Scheme to use for connecting to the host. Defaults to HTTP. type: string required: - port type: object initialDelaySeconds: description: |- Number of seconds after the container has started before liveness probes are initiated. More info: path_to_url#container-probes format: int32 type: integer periodSeconds: description: |- How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. format: int32 type: integer successThreshold: description: |- Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. format: int32 type: integer tcpSocket: description: TCPSocket specifies an action involving a TCP port. properties: host: description: 'Optional: Host name to connect to, defaults to the pod IP.' type: string port: anyOf: - type: integer - type: string description: |- Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true required: - port type: object terminationGracePeriodSeconds: description: |- Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. format: int64 type: integer timeoutSeconds: description: |- Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: path_to_url#container-probes format: int32 type: integer type: object stdin: description: |- Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false. type: boolean stdinOnce: description: |- Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false type: boolean terminationMessagePath: description: |- Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated. type: string terminationMessagePolicy: description: |- Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. type: string tty: description: |- Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false. type: boolean volumeDevices: description: volumeDevices is the list of block devices to be used by the container. items: description: volumeDevice describes a mapping of a raw block device within a container. properties: devicePath: description: devicePath is the path inside of the container that the device will be mapped to. type: string name: description: name must match the name of a persistentVolumeClaim in the pod type: string required: - devicePath - name type: object type: array volumeMounts: description: |- Pod volumes to mount into the container's filesystem. Cannot be updated. items: description: VolumeMount describes a mounting of a Volume within a container. properties: mountPath: description: |- Path within the container at which the volume should be mounted. Must not contain ':'. type: string mountPropagation: description: |- mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10. type: string name: description: This must match the Name of a Volume. type: string readOnly: description: |- Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. type: boolean subPath: description: |- Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). type: string subPathExpr: description: |- Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root). SubPathExpr and SubPath are mutually exclusive. type: string required: - mountPath - name type: object type: array workingDir: description: |- Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. type: string required: - name type: object type: array nodeName: description: |- NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. type: string nodeSelector: additionalProperties: type: string description: |- NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: path_to_url type: object x-kubernetes-map-type: atomic os: description: |- Specifies the OS of the containers in the pod. Some pod and container fields are restricted if this is set. If the OS field is set to linux, the following fields must be unset: -securityContext.windowsOptions If the OS field is set to windows, following fields must be unset: - spec.hostPID - spec.hostIPC - spec.hostUsers - spec.securityContext.seLinuxOptions - spec.securityContext.seccompProfile - spec.securityContext.fsGroup - spec.securityContext.fsGroupChangePolicy - spec.securityContext.sysctls - spec.shareProcessNamespace - spec.securityContext.runAsUser - spec.securityContext.runAsGroup - spec.securityContext.supplementalGroups - spec.containers[*].securityContext.seLinuxOptions - spec.containers[*].securityContext.seccompProfile - spec.containers[*].securityContext.capabilities - spec.containers[*].securityContext.readOnlyRootFilesystem - spec.containers[*].securityContext.privileged - spec.containers[*].securityContext.allowPrivilegeEscalation - spec.containers[*].securityContext.procMount - spec.containers[*].securityContext.runAsUser - spec.containers[*].securityContext.runAsGroup properties: name: description: |- Name is the name of the operating system. The currently supported values are linux and windows. Additional value may be defined in future and can be one of: path_to_url#platform-specific-configuration Clients should expect to handle additional values and treat unrecognized values in this field as os: null type: string required: - name type: object overhead: additionalProperties: anyOf: - type: integer - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true description: |- Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. This field will be autopopulated at admission time by the RuntimeClass admission controller. If the RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests. The RuntimeClass admission controller will reject Pod create requests which have the overhead already set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero. More info: path_to_url type: object preemptionPolicy: description: |- PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. type: string priority: description: |- The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. format: int32 type: integer priorityClassName: description: |- If specified, indicates the pod's priority. "system-node-critical" and "system-cluster-critical" are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. type: string readinessGates: description: |- If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to "True" More info: path_to_url items: description: PodReadinessGate contains the reference to a pod condition properties: conditionType: description: ConditionType refers to a condition in the pod's condition list with matching type. type: string required: - conditionType type: object type: array resourceClaims: description: |- ResourceClaims defines which ResourceClaims must be allocated and reserved before the Pod is allowed to start. The resources will be made available to those containers which consume them by name. This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. This field is immutable. items: description: |- PodResourceClaim references exactly one ResourceClaim through a ClaimSource. It adds a name to it that uniquely identifies the ResourceClaim inside the Pod. Containers that need access to the ResourceClaim reference it with this name. properties: name: description: |- Name uniquely identifies this resource claim inside the pod. This must be a DNS_LABEL. type: string source: description: Source describes where to find the ResourceClaim. properties: resourceClaimName: description: |- ResourceClaimName is the name of a ResourceClaim object in the same namespace as this pod. type: string resourceClaimTemplateName: description: |- ResourceClaimTemplateName is the name of a ResourceClaimTemplate object in the same namespace as this pod. The template will be used to create a new ResourceClaim, which will be bound to this pod. When this pod is deleted, the ResourceClaim will also be deleted. The pod name and resource name, along with a generated component, will be used to form a unique name for the ResourceClaim, which will be recorded in pod.status.resourceClaimStatuses. This field is immutable and no changes will be made to the corresponding ResourceClaim by the control plane after creating the ResourceClaim. type: string type: object required: - name type: object type: array x-kubernetes-list-map-keys: - name x-kubernetes-list-type: map restartPolicy: description: |- Restart policy for all containers within the pod. One of Always, OnFailure, Never. In some contexts, only a subset of those values may be permitted. Default to Always. More info: path_to_url#restart-policy type: string runtimeClassName: description: |- RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. If unset or empty, the "legacy" RuntimeClass will be used, which is an implicit class with an empty definition that uses the default runtime handler. More info: path_to_url type: string schedulerName: description: |- If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. type: string schedulingGates: description: |- SchedulingGates is an opaque list of values that if specified will block scheduling the pod. If schedulingGates is not empty, the pod will stay in the SchedulingGated state and the scheduler will not attempt to schedule the pod. SchedulingGates can only be set at pod creation time, and be removed only afterwards. This is a beta feature enabled by the PodSchedulingReadiness feature gate. items: description: PodSchedulingGate is associated to a Pod to guard its scheduling. properties: name: description: |- Name of the scheduling gate. Each scheduling gate must have a unique name field. type: string required: - name type: object type: array x-kubernetes-list-map-keys: - name x-kubernetes-list-type: map securityContext: description: |- SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field. properties: fsGroup: description: |- A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- If unset, the Kubelet will not modify the ownership and permissions of any volume. Note that this field cannot be set when spec.os.name is windows. format: int64 type: integer fsGroupChangePolicy: description: |- fsGroupChangePolicy defines behavior of changing ownership and permission of the volume before being exposed inside Pod. This field will only apply to volume types which support fsGroup based ownership(and permissions). It will have no effect on ephemeral volume types such as: secret, configmaps and emptydir. Valid values are "OnRootMismatch" and "Always". If not specified, "Always" is used. Note that this field cannot be set when spec.os.name is windows. type: string runAsGroup: description: |- The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows. format: int64 type: integer runAsNonRoot: description: |- Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. type: boolean runAsUser: description: |- The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows. format: int64 type: integer seLinuxOptions: description: |- The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows. properties: level: description: Level is SELinux level label that applies to the container. type: string role: description: Role is a SELinux role label that applies to the container. type: string type: description: Type is a SELinux type label that applies to the container. type: string user: description: User is a SELinux user label that applies to the container. type: string type: object seccompProfile: description: |- The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. properties: localhostProfile: description: |- localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must be set if type is "Localhost". Must NOT be set for any other type. type: string type: description: |- type indicates which kind of seccomp profile will be applied. Valid options are: Localhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied. type: string required: - type type: object supplementalGroups: description: |- A list of groups applied to the first process run in each container, in addition to the container's primary GID, the fsGroup (if specified), and group memberships defined in the container image for the uid of the container process. If unspecified, no additional groups are added to any container. Note that group memberships defined in the container image for the uid of the container process are still effective, even if they are not included in this list. Note that this field cannot be set when spec.os.name is windows. items: format: int64 type: integer type: array sysctls: description: |- Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. Note that this field cannot be set when spec.os.name is windows. items: description: Sysctl defines a kernel parameter to be set properties: name: description: Name of a property to set type: string value: description: Value of a property to set type: string required: - name - value type: object type: array windowsOptions: description: |- The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux. properties: gmsaCredentialSpec: description: |- GMSACredentialSpec is where the GMSA admission webhook (path_to_url inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field. type: string gmsaCredentialSpecName: description: GMSACredentialSpecName is the name of the GMSA credential spec to use. type: string hostProcess: description: |- HostProcess determines if a container should be run as a 'Host Process' container. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true. type: boolean runAsUserName: description: |- The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. type: string type: object type: object serviceAccount: description: |- DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. type: string serviceAccountName: description: |- ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: path_to_url type: string setHostnameAsFQDN: description: |- If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters to FQDN. If a pod does not have FQDN, this has no effect. Default to false. type: boolean shareProcessNamespace: description: |- Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Default to false. type: boolean subdomain: description: |- If specified, the fully qualified Pod hostname will be "<hostname>.<subdomain>.<pod namespace>.svc.<cluster domain>". If not specified, the pod will not have a domainname at all. type: string terminationGracePeriodSeconds: description: |- Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. format: int64 type: integer tolerations: description: If specified, the pod's tolerations. items: description: |- The pod this Toleration is attached to tolerates any taint that matches the triple <key,value,effect> using the matching operator <operator>. properties: effect: description: |- Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. type: string key: description: |- Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. type: string operator: description: |- Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. type: string tolerationSeconds: description: |- TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. format: int64 type: integer value: description: |- Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. type: string type: object type: array topologySpreadConstraints: description: |- TopologySpreadConstraints describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. All topologySpreadConstraints are ANDed. items: description: TopologySpreadConstraint specifies how to spread matching pods among the given topology. properties: labelSelector: description: |- LabelSelector is used to find matching pods. Pods that match this label selector are counted to determine the number of pods in their corresponding topology domain. properties: matchExpressions: description: matchExpressions is a list of label selector requirements. The requirements are ANDed. items: description: |- A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. properties: key: description: key is the label key that the selector applies to. type: string operator: description: |- operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. type: string values: description: |- values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. items: type: string type: array required: - key - operator type: object type: array matchLabels: additionalProperties: type: string description: |- matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. type: object type: object x-kubernetes-map-type: atomic matchLabelKeys: description: |- MatchLabelKeys is a set of pod label keys to select the pods over which spreading will be calculated. The keys are used to lookup values from the incoming pod labels, those key-value labels are ANDed with labelSelector to select the group of existing pods over which spreading will be calculated for the incoming pod. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. MatchLabelKeys cannot be set when LabelSelector isn't set. Keys that don't exist in the incoming pod labels will be ignored. A null or empty list means only match against labelSelector. This is a beta field and requires the MatchLabelKeysInPodTopologySpread feature gate to be enabled (enabled by default). items: type: string type: array x-kubernetes-list-type: atomic maxSkew: description: |- MaxSkew describes the degree to which pods may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference between the number of matching pods in the target topology and the global minimum. The global minimum is the minimum number of matching pods in an eligible domain or zero if the number of eligible domains is less than MinDomains. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 2/2/1: In this case, the global minimum is 1. | zone1 | zone2 | zone3 | | P P | P P | P | - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 2/2/2; scheduling it onto zone1(zone2) would make the ActualSkew(3-1) on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence to topologies that satisfy it. It's a required field. Default value is 1 and 0 is not allowed. format: int32 type: integer minDomains: description: |- MinDomains indicates a minimum number of eligible domains. When the number of eligible domains with matching topology keys is less than minDomains, Pod Topology Spread treats "global minimum" as 0, and then the calculation of Skew is performed. And when the number of eligible domains with matching topology keys equals or greater than minDomains, this value has no effect on scheduling. As a result, when the number of eligible domains is less than minDomains, scheduler won't schedule more than maxSkew Pods to those domains. If value is nil, the constraint behaves as if MinDomains is equal to 1. Valid values are integers greater than 0. When value is not nil, WhenUnsatisfiable must be DoNotSchedule. For example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains is set to 5 and pods with the same labelSelector spread as 2/2/2: | zone1 | zone2 | zone3 | | P P | P P | P P | The number of domains is less than 5(MinDomains), so "global minimum" is treated as 0. In this situation, new pod with the same labelSelector cannot be scheduled, because computed skew will be 3(3 - 0) if new Pod is scheduled to any of the three zones, it will violate MaxSkew. This is a beta field and requires the MinDomainsInPodTopologySpread feature gate to be enabled (enabled by default). format: int32 type: integer nodeAffinityPolicy: description: |- NodeAffinityPolicy indicates how we will treat Pod's nodeAffinity/nodeSelector when calculating pod topology spread skew. Options are: - Honor: only nodes matching nodeAffinity/nodeSelector are included in the calculations. - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations. If this value is nil, the behavior is equivalent to the Honor policy. This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag. type: string nodeTaintsPolicy: description: |- NodeTaintsPolicy indicates how we will treat node taints when calculating pod topology spread skew. Options are: - Honor: nodes without taints, along with tainted nodes for which the incoming pod has a toleration, are included. - Ignore: node taints are ignored. All nodes are included. If this value is nil, the behavior is equivalent to the Ignore policy. This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag. type: string topologyKey: description: |- TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. We consider each <key, value> as a "bucket", and try to put balanced number of pods into each bucket. We define a domain as a particular instance of a topology. Also, we define an eligible domain as a domain whose nodes meet the requirements of nodeAffinityPolicy and nodeTaintsPolicy. e.g. If TopologyKey is "kubernetes.io/hostname", each Node is a domain of that topology. And, if TopologyKey is "topology.kubernetes.io/zone", each zone is a domain of that topology. It's a required field. type: string whenUnsatisfiable: description: |- WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any location, but giving higher precedence to topologies that would help reduce the skew. A constraint is considered "Unsatisfiable" for an incoming pod if and only if every possible node assignment for that pod would violate "MaxSkew" on some topology. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler won't make it *more* imbalanced. It's a required field. type: string required: - maxSkew - topologyKey - whenUnsatisfiable type: object type: array x-kubernetes-list-map-keys: - topologyKey - whenUnsatisfiable x-kubernetes-list-type: map volumes: description: |- List of volumes that can be mounted by containers belonging to the pod. More info: path_to_url items: description: Volume represents a named volume in a pod that may be accessed by any container in the pod. properties: awsElasticBlockStore: description: |- awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: path_to_url#awselasticblockstore properties: fsType: description: |- fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: path_to_url#awselasticblockstore TODO: how do we prevent errors in the filesystem from compromising the machine type: string partition: description: |- partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). format: int32 type: integer readOnly: description: |- readOnly value true will force the readOnly setting in VolumeMounts. More info: path_to_url#awselasticblockstore type: boolean volumeID: description: |- volumeID is unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: path_to_url#awselasticblockstore type: string required: - volumeID type: object azureDisk: description: azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. properties: cachingMode: description: 'cachingMode is the Host Caching mode: None, Read Only, Read Write.' type: string diskName: description: diskName is the Name of the data disk in the blob storage type: string diskURI: description: diskURI is the URI of data disk in the blob storage type: string fsType: description: |- fsType is Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. type: string kind: description: 'kind expected values are Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared' type: string readOnly: description: |- readOnly Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. type: boolean required: - diskName - diskURI type: object azureFile: description: azureFile represents an Azure File Service mount on the host and bind mount to the pod. properties: readOnly: description: |- readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. type: boolean secretName: description: secretName is the name of secret that contains Azure Storage Account Name and Key type: string shareName: description: shareName is the azure share Name type: string required: - secretName - shareName type: object cephfs: description: cephFS represents a Ceph FS mount on the host that shares a pod's lifetime properties: monitors: description: |- monitors is Required: Monitors is a collection of Ceph monitors More info: path_to_url#how-to-use-it items: type: string type: array path: description: 'path is Optional: Used as the mounted root, rather than the full Ceph tree, default is /' type: string readOnly: description: |- readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: path_to_url#how-to-use-it type: boolean secretFile: description: |- secretFile is Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: path_to_url#how-to-use-it type: string secretRef: description: |- secretRef is Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: path_to_url#how-to-use-it properties: name: description: |- Name of the referent. More info: path_to_url#names TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object x-kubernetes-map-type: atomic user: description: |- user is optional: User is the rados user name, default is admin More info: path_to_url#how-to-use-it type: string required: - monitors type: object cinder: description: |- cinder represents a cinder volume attached and mounted on kubelets host machine. More info: path_to_url properties: fsType: description: |- fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: path_to_url type: string readOnly: description: |- readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: path_to_url type: boolean secretRef: description: |- secretRef is optional: points to a secret object containing parameters used to connect to OpenStack. properties: name: description: |- Name of the referent. More info: path_to_url#names TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object x-kubernetes-map-type: atomic volumeID: description: |- volumeID used to identify the volume in cinder. More info: path_to_url type: string required: - volumeID type: object configMap: description: configMap represents a configMap that should populate this volume properties: defaultMode: description: |- defaultMode is optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. format: int32 type: integer items: description: |- items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. items: description: Maps a string key to a path within a volume. properties: key: description: key is the key to project. type: string mode: description: |- mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. format: int32 type: integer path: description: |- path is the relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. type: string required: - key - path type: object type: array name: description: |- Name of the referent. More info: path_to_url#names TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: optional specify whether the ConfigMap or its keys must be defined type: boolean type: object x-kubernetes-map-type: atomic csi: description: csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature). properties: driver: description: |- driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster. type: string fsType: description: |- fsType to mount. Ex. "ext4", "xfs", "ntfs". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply. type: string nodePublishSecretRef: description: |- nodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed. properties: name: description: |- Name of the referent. More info: path_to_url#names TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object x-kubernetes-map-type: atomic readOnly: description: |- readOnly specifies a read-only configuration for the volume. Defaults to false (read/write). type: boolean volumeAttributes: additionalProperties: type: string description: |- volumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values. type: object required: - driver type: object downwardAPI: description: downwardAPI represents downward API about the pod that should populate this volume properties: defaultMode: description: |- Optional: mode bits to use on created files by default. Must be a Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. format: int32 type: integer items: description: Items is a list of downward API volume file items: description: DownwardAPIVolumeFile represents information to create the file containing the pod field properties: fieldRef: description: 'Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.' properties: apiVersion: description: Version of the schema the FieldPath is written in terms of, defaults to "v1". type: string fieldPath: description: Path of the field to select in the specified API version. type: string required: - fieldPath type: object x-kubernetes-map-type: atomic mode: description: |- Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. format: int32 type: integer path: description: 'Required: Path is the relative path name of the file to be created. Must not be absolute or contain the ''..'' path. Must be utf-8 encoded. The first item of the relative path must not start with ''..''' type: string resourceFieldRef: description: |- Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. properties: containerName: description: 'Container name: required for volumes, optional for env vars' type: string divisor: anyOf: - type: integer - type: string description: Specifies the output format of the exposed resources, defaults to "1" pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true resource: description: 'Required: resource to select' type: string required: - resource type: object x-kubernetes-map-type: atomic required: - path type: object type: array type: object emptyDir: description: |- emptyDir represents a temporary directory that shares a pod's lifetime. More info: path_to_url#emptydir properties: medium: description: |- medium represents what type of storage medium should back this directory. The default is "" which means to use the node's default medium. Must be an empty string (default) or Memory. More info: path_to_url#emptydir type: string sizeLimit: anyOf: - type: integer - type: string description: |- sizeLimit is the total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: path_to_url#emptydir pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true type: object ephemeral: description: |- ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity tracking are needed, c) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through a PersistentVolumeClaim (see EphemeralVolumeSource for more information on the connection between this volume type and PersistentVolumeClaim). Use PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod. Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information. A pod can use both types of ephemeral volumes and persistent volumes at the same time. properties: volumeClaimTemplate: description: |- Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `<pod name>-<volume name>` where `<volume name>` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long). An existing PVC with that name that is not owned by the pod will *not* be used for the pod to avoid using an unrelated volume by mistake. Starting the pod is then blocked until the unrelated PVC is removed. If such a pre-created PVC is meant to be used by the pod, the PVC has to updated with an owner reference to the pod once the pod exists. Normally this should not be necessary, but it may be useful when manually reconstructing a broken cluster. This field is read-only and no changes will be made by Kubernetes to the PVC after it has been created. Required, must not be nil. properties: metadata: description: |- May contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation. type: object spec: description: |- The specification for the PersistentVolumeClaim. The entire content is copied unchanged into the PVC that gets created from this template. The same fields as in a PersistentVolumeClaim are also valid here. properties: accessModes: description: |- accessModes contains the desired access modes the volume should have. More info: path_to_url#access-modes-1 items: type: string type: array dataSource: description: |- dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. If the namespace is specified, then dataSourceRef will not be copied to dataSource. properties: apiGroup: description: |- APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. type: string kind: description: Kind is the type of resource being referenced type: string name: description: Name is the name of resource being referenced type: string required: - kind - name type: object x-kubernetes-map-type: atomic dataSourceRef: description: |- dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the dataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, when namespace isn't specified in dataSourceRef, both fields (dataSource and dataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. When namespace is specified in dataSourceRef, dataSource isn't set to the same value and must be empty. There are three important differences between dataSource and dataSourceRef: * While dataSource only allows two specific types of objects, dataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While dataSource ignores disallowed values (dropping them), dataSourceRef preserves all values, and generates an error if a disallowed value is specified. * While dataSource only allows local objects, dataSourceRef allows objects in any namespaces. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled. properties: apiGroup: description: |- APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. type: string kind: description: Kind is the type of resource being referenced type: string name: description: Name is the name of resource being referenced type: string namespace: description: |- Namespace is the namespace of resource being referenced Note that when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details. (Alpha) This field requires the CrossNamespaceVolumeDataSource feature gate to be enabled. type: string required: - kind - name type: object resources: description: |- resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: path_to_url#resources properties: limits: additionalProperties: anyOf: - type: integer - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true description: |- Limits describes the maximum amount of compute resources allowed. More info: path_to_url type: object requests: additionalProperties: anyOf: - type: integer - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true description: |- Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: path_to_url type: object type: object selector: description: selector is a label query over volumes to consider for binding. properties: matchExpressions: description: matchExpressions is a list of label selector requirements. The requirements are ANDed. items: description: |- A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. properties: key: description: key is the label key that the selector applies to. type: string operator: description: |- operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. type: string values: description: |- values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. items: type: string type: array required: - key - operator type: object type: array matchLabels: additionalProperties: type: string description: |- matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. type: object type: object x-kubernetes-map-type: atomic storageClassName: description: |- storageClassName is the name of the StorageClass required by the claim. More info: path_to_url#class-1 type: string volumeAttributesClassName: description: |- volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. If specified, the CSI driver will create or update the volume with the attributes defined in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName, it can be changed after the claim is created. An empty string value means that no VolumeAttributesClass will be applied to the claim but it's not allowed to reset this field to empty string once it is set. If unspecified and the PersistentVolumeClaim is unbound, the default VolumeAttributesClass will be set by the persistentvolume controller if it exists. If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource exists. More info: path_to_url#volumeattributesclass (Alpha) Using this field requires the VolumeAttributesClass feature gate to be enabled. type: string volumeMode: description: |- volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. type: string volumeName: description: volumeName is the binding reference to the PersistentVolume backing this claim. type: string type: object required: - spec type: object type: object fc: description: fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. properties: fsType: description: |- fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. TODO: how do we prevent errors in the filesystem from compromising the machine type: string lun: description: 'lun is Optional: FC target lun number' format: int32 type: integer readOnly: description: |- readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. type: boolean targetWWNs: description: 'targetWWNs is Optional: FC target worldwide names (WWNs)' items: type: string type: array wwids: description: |- wwids Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. items: type: string type: array type: object flexVolume: description: |- flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. properties: driver: description: driver is the name of the driver to use for this volume. type: string fsType: description: |- fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. type: string options: additionalProperties: type: string description: 'options is Optional: this field holds extra command options if any.' type: object readOnly: description: |- readOnly is Optional: defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. type: boolean secretRef: description: |- secretRef is Optional: secretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts. properties: name: description: |- Name of the referent. More info: path_to_url#names TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object x-kubernetes-map-type: atomic required: - driver type: object flocker: description: flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running properties: datasetName: description: |- datasetName is Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated type: string datasetUUID: description: datasetUUID is the UUID of the dataset. This is unique identifier of a Flocker dataset type: string type: object gcePersistentDisk: description: |- gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: path_to_url#gcepersistentdisk properties: fsType: description: |- fsType is filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: path_to_url#gcepersistentdisk TODO: how do we prevent errors in the filesystem from compromising the machine type: string partition: description: |- partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). More info: path_to_url#gcepersistentdisk format: int32 type: integer pdName: description: |- pdName is unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: path_to_url#gcepersistentdisk type: string readOnly: description: |- readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: path_to_url#gcepersistentdisk type: boolean required: - pdName type: object gitRepo: description: |- gitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container. properties: directory: description: |- directory is the target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name. type: string repository: description: repository is the URL type: string revision: description: revision is the commit hash for the specified revision. type: string required: - repository type: object glusterfs: description: |- glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: path_to_url properties: endpoints: description: |- endpoints is the endpoint name that details Glusterfs topology. More info: path_to_url#create-a-pod type: string path: description: |- path is the Glusterfs volume path. More info: path_to_url#create-a-pod type: string readOnly: description: |- readOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: path_to_url#create-a-pod type: boolean required: - endpoints - path type: object hostPath: description: |- hostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: path_to_url#hostpath --- TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not mount host directories as read/write. properties: path: description: |- path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: path_to_url#hostpath type: string type: description: |- type for HostPath Volume Defaults to "" More info: path_to_url#hostpath type: string required: - path type: object iscsi: description: |- iscsi represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: path_to_url properties: chapAuthDiscovery: description: chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication type: boolean chapAuthSession: description: chapAuthSession defines whether support iSCSI Session CHAP authentication type: boolean fsType: description: |- fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: path_to_url#iscsi TODO: how do we prevent errors in the filesystem from compromising the machine type: string initiatorName: description: |- initiatorName is the custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface <target portal>:<volume name> will be created for the connection. type: string iqn: description: iqn is the target iSCSI Qualified Name. type: string iscsiInterface: description: |- iscsiInterface is the interface Name that uses an iSCSI transport. Defaults to 'default' (tcp). type: string lun: description: lun represents iSCSI Target Lun number. format: int32 type: integer portals: description: |- portals is the iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). items: type: string type: array readOnly: description: |- readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. type: boolean secretRef: description: secretRef is the CHAP Secret for iSCSI target and initiator authentication properties: name: description: |- Name of the referent. More info: path_to_url#names TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object x-kubernetes-map-type: atomic targetPortal: description: |- targetPortal is iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). type: string required: - iqn - lun - targetPortal type: object name: description: |- name of the volume. Must be a DNS_LABEL and unique within the pod. More info: path_to_url#names type: string nfs: description: |- nfs represents an NFS mount on the host that shares a pod's lifetime More info: path_to_url#nfs properties: path: description: |- path that is exported by the NFS server. More info: path_to_url#nfs type: string readOnly: description: |- readOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: path_to_url#nfs type: boolean server: description: |- server is the hostname or IP address of the NFS server. More info: path_to_url#nfs type: string required: - path - server type: object persistentVolumeClaim: description: |- persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: path_to_url#persistentvolumeclaims properties: claimName: description: |- claimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: path_to_url#persistentvolumeclaims type: string readOnly: description: |- readOnly Will force the ReadOnly setting in VolumeMounts. Default false. type: boolean required: - claimName type: object photonPersistentDisk: description: photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine properties: fsType: description: |- fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. type: string pdID: description: pdID is the ID that identifies Photon Controller persistent disk type: string required: - pdID type: object portworxVolume: description: portworxVolume represents a portworx volume attached and mounted on kubelets host machine properties: fsType: description: |- fSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified. type: string readOnly: description: |- readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. type: boolean volumeID: description: volumeID uniquely identifies a Portworx volume type: string required: - volumeID type: object projected: description: projected items for all in one resources secrets, configmaps, and downward API properties: defaultMode: description: |- defaultMode are the mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. format: int32 type: integer sources: description: sources is the list of volume projections items: description: Projection that may be projected along with other supported volume types properties: clusterTrustBundle: description: |- ClusterTrustBundle allows a pod to access the `.spec.trustBundle` field of ClusterTrustBundle objects in an auto-updating file. Alpha, gated by the ClusterTrustBundleProjection feature gate. ClusterTrustBundle objects can either be selected by name, or by the combination of signer name and a label selector. Kubelet performs aggressive normalization of the PEM contents written into the pod filesystem. Esoteric PEM features such as inter-block comments and block headers are stripped. Certificates are deduplicated. The ordering of certificates within the file is arbitrary, and Kubelet may change the order over time. properties: labelSelector: description: |- Select all ClusterTrustBundles that match this label selector. Only has effect if signerName is set. Mutually-exclusive with name. If unset, interpreted as "match nothing". If set but empty, interpreted as "match everything". properties: matchExpressions: description: matchExpressions is a list of label selector requirements. The requirements are ANDed. items: description: |- A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. properties: key: description: key is the label key that the selector applies to. type: string operator: description: |- operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. type: string values: description: |- values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. items: type: string type: array required: - key - operator type: object type: array matchLabels: additionalProperties: type: string description: |- matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. type: object type: object x-kubernetes-map-type: atomic name: description: |- Select a single ClusterTrustBundle by object name. Mutually-exclusive with signerName and labelSelector. type: string optional: description: |- If true, don't block pod startup if the referenced ClusterTrustBundle(s) aren't available. If using name, then the named ClusterTrustBundle is allowed not to exist. If using signerName, then the combination of signerName and labelSelector is allowed to match zero ClusterTrustBundles. type: boolean path: description: Relative path from the volume root to write the bundle. type: string signerName: description: |- Select all ClusterTrustBundles that match this signer name. Mutually-exclusive with name. The contents of all selected ClusterTrustBundles will be unified and deduplicated. type: string required: - path type: object configMap: description: configMap information about the configMap data to project properties: items: description: |- items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. items: description: Maps a string key to a path within a volume. properties: key: description: key is the key to project. type: string mode: description: |- mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. format: int32 type: integer path: description: |- path is the relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. type: string required: - key - path type: object type: array name: description: |- Name of the referent. More info: path_to_url#names TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: optional specify whether the ConfigMap or its keys must be defined type: boolean type: object x-kubernetes-map-type: atomic downwardAPI: description: downwardAPI information about the downwardAPI data to project properties: items: description: Items is a list of DownwardAPIVolume file items: description: DownwardAPIVolumeFile represents information to create the file containing the pod field properties: fieldRef: description: 'Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.' properties: apiVersion: description: Version of the schema the FieldPath is written in terms of, defaults to "v1". type: string fieldPath: description: Path of the field to select in the specified API version. type: string required: - fieldPath type: object x-kubernetes-map-type: atomic mode: description: |- Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. format: int32 type: integer path: description: 'Required: Path is the relative path name of the file to be created. Must not be absolute or contain the ''..'' path. Must be utf-8 encoded. The first item of the relative path must not start with ''..''' type: string resourceFieldRef: description: |- Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. properties: containerName: description: 'Container name: required for volumes, optional for env vars' type: string divisor: anyOf: - type: integer - type: string description: Specifies the output format of the exposed resources, defaults to "1" pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true resource: description: 'Required: resource to select' type: string required: - resource type: object x-kubernetes-map-type: atomic required: - path type: object type: array type: object secret: description: secret information about the secret data to project properties: items: description: |- items if unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. items: description: Maps a string key to a path within a volume. properties: key: description: key is the key to project. type: string mode: description: |- mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. format: int32 type: integer path: description: |- path is the relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. type: string required: - key - path type: object type: array name: description: |- Name of the referent. More info: path_to_url#names TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: optional field specify whether the Secret or its key must be defined type: boolean type: object x-kubernetes-map-type: atomic serviceAccountToken: description: serviceAccountToken is information about the serviceAccountToken data to project properties: audience: description: |- audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver. type: string expirationSeconds: description: |- expirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes. format: int64 type: integer path: description: |- path is the path relative to the mount point of the file to project the token into. type: string required: - path type: object type: object type: array type: object quobyte: description: quobyte represents a Quobyte mount on the host that shares a pod's lifetime properties: group: description: |- group to map volume access to Default is no group type: string readOnly: description: |- readOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. type: boolean registry: description: |- registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes type: string tenant: description: |- tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin type: string user: description: |- user to map volume access to Defaults to serivceaccount user type: string volume: description: volume is a string that references an already created Quobyte volume by name. type: string required: - registry - volume type: object rbd: description: |- rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: path_to_url properties: fsType: description: |- fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: path_to_url#rbd TODO: how do we prevent errors in the filesystem from compromising the machine type: string image: description: |- image is the rados image name. More info: path_to_url#how-to-use-it type: string keyring: description: |- keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: path_to_url#how-to-use-it type: string monitors: description: |- monitors is a collection of Ceph monitors. More info: path_to_url#how-to-use-it items: type: string type: array pool: description: |- pool is the rados pool name. Default is rbd. More info: path_to_url#how-to-use-it type: string readOnly: description: |- readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: path_to_url#how-to-use-it type: boolean secretRef: description: |- secretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: path_to_url#how-to-use-it properties: name: description: |- Name of the referent. More info: path_to_url#names TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object x-kubernetes-map-type: atomic user: description: |- user is the rados user name. Default is admin. More info: path_to_url#how-to-use-it type: string required: - image - monitors type: object scaleIO: description: scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. properties: fsType: description: |- fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Default is "xfs". type: string gateway: description: gateway is the host address of the ScaleIO API Gateway. type: string protectionDomain: description: protectionDomain is the name of the ScaleIO Protection Domain for the configured storage. type: string readOnly: description: |- readOnly Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. type: boolean secretRef: description: |- secretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. properties: name: description: |- Name of the referent. More info: path_to_url#names TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object x-kubernetes-map-type: atomic sslEnabled: description: sslEnabled Flag enable/disable SSL communication with Gateway, default false type: boolean storageMode: description: |- storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned. type: string storagePool: description: storagePool is the ScaleIO Storage Pool associated with the protection domain. type: string system: description: system is the name of the storage system as configured in ScaleIO. type: string volumeName: description: |- volumeName is the name of a volume already created in the ScaleIO system that is associated with this volume source. type: string required: - gateway - secretRef - system type: object secret: description: |- secret represents a secret that should populate this volume. More info: path_to_url#secret properties: defaultMode: description: |- defaultMode is Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. format: int32 type: integer items: description: |- items If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. items: description: Maps a string key to a path within a volume. properties: key: description: key is the key to project. type: string mode: description: |- mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. format: int32 type: integer path: description: |- path is the relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. type: string required: - key - path type: object type: array optional: description: optional field specify whether the Secret or its keys must be defined type: boolean secretName: description: |- secretName is the name of the secret in the pod's namespace to use. More info: path_to_url#secret type: string type: object storageos: description: storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. properties: fsType: description: |- fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. type: string readOnly: description: |- readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. type: boolean secretRef: description: |- secretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. properties: name: description: |- Name of the referent. More info: path_to_url#names TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object x-kubernetes-map-type: atomic volumeName: description: |- volumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. type: string volumeNamespace: description: |- volumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to "default" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created. type: string type: object vsphereVolume: description: vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine properties: fsType: description: |- fsType is filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. type: string storagePolicyID: description: storagePolicyID is the storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. type: string storagePolicyName: description: storagePolicyName is the storage Policy Based Management (SPBM) profile name. type: string volumePath: description: volumePath is the path that identifies vSphere volume vmdk type: string required: - volumePath type: object required: - name type: object type: array required: - containers type: object pollingInterval: description: The period to check each trigger source on every ScaledObject, and scale the deployment up or down accordingly format: int32 type: integer respTopic: description: Topic for message queue trigger to sent response from function. type: string secret: description: Secret name type: string topic: description: Subscribed topic type: string required: - topic type: object required: - metadata - spec type: object served: true storage: true ```
Jethmalani is a surname. Notable people with the surname include: Ram Jethmalani (1923–2019), Indian lawyer and politician Kamna Jethmalani (born 1985), Indian actress Mahesh Jethmalani (born 1956), Indian lawyer and politician Surnames of Indian origin
```raw token data Local intf Local circuit Dest address VC ID Status ------------- ------------------ --------------- ---------- ---------- Se5/0 FR DLCI 55 10.0.0.1 55 UP AT4/0 ATM AAL5 0/100 10.0.0.1 100 UP AT4/0.300 ATM AAL5 0/300 10.0.0.1 300 UP ```
Rovaniemen Palloseura (RoPS) is a football club founded in 1950 and based in Rovaniemi, Finland. In 2019 RoPS participated in the Finnish Premier Division, (Veikkausliiga) marking their 32nd season in the top flight (previously called "Veikkausliiga") since 1981. The club plays home games at the Rovaniemen Keskuskenttä in the Arctic Circle of Lapland. The closest affiliated team is RoPS/2 from Kakkonen who participates in the third tier of Finnish football. History RoPS have won the Finnish Cup on two occasions, in 1986 and 2013, and were runners-up in 1962. They placed third in the Finnish Premier Division in 1988 and 1989, before finishing as runner-up in 2015, losing out on the title by 1 point to eventual champions SJK. The club's most notable international achievement was reaching the quarter-finals of the European Cup-Winners' Cup in 1987–88 against Marseille. Match fixing allegations and scandal Throughout the 2000s, RoPS became infamous for suspected involvement in match fixing. In spring 2011 the Finnish National Bureau of Investigation started a large investigation into match fixing. On February 25 Singaporean businessman Wilson Raj Perumal, a convicted match fixer, was arrested after entering Finland with a fake passport. The National Bureau of Investigation suspected that over 30 games between 2008 and 2011, mostly from the Finnish premier league, had been fixed or manipulated. On July 19, 2011, the Rovaniemi Court of Appeal convicted Perumal and nine RoPS players of match-fixing. Altogether 24 games had been manipulated, and the intended score had been achieved in 11 of them. Perumal was sentenced to two years in prison and ordered to return 150,000 euros deemed to be match-fixing profits. The bribes ranged from 500 euros offered to one player to a total of 80,000 euros offered to eight players. The highest total of bribes for one individual was slightly over 40,000 euros. The players received suspended sentences. The sentenced players were six Zambian and two Georgian players: Godfrey Chibanga, Chileshe Chibwe, Francis Kombe, Stephen Kunda, Christopher Musonda, Chanda Mwaba, Nchimunya Mweetwa, Pavle Khorguashvili, and Valter Khorguashvili. Domestic history European history Notes 1R: First round 2R: Second round 1Q: First qualifying round QF: Quarter-finals Honours Finnish Cup Champions (2): 1986, 2013 Ykkönen Champions (2): 2010, 2012 Current squad Management and boardroom Management As of 18 February 2020. Boardroom As of 18 February 2020 Rovaniemi Football Academy Rovaniemi Football Academy (RFA) is the reserve team of RoPS. The team plays in Kakkonen in 2020 season. It is coached by Aleksi Tanner. Managers Jerzy Masztaler (1990–91) Graham Williams (1991) Olavi Tammimies (1992) Keith Armstrong (1993–94) Timo Salmi (1995) Graham Williams (1995) Ari Matinlassi (1995) Ari Rantamaa (1996–97) Kari Virtanen (1997–99) Olavi Tammimies (2000) Mauri Holappa (2001) Tomi Molin (2002) György Hamori (Jan 1, 2003 – June 23, 2004) Mika Lumijärvi (June 23, 2004 – June 30, 2005) Matti Vikman (interim) (June 30, 2005 – Dec 31, 2005) Jukka Ikäläinen (2006) Tom Saintfiet (Jan 1, 2008 – April 7, 2008) Valeri Bondarenko (April 14, 2008 – May 27, 2009) Mika Lumijärvi (May 27, 2009 – Oct 6, 2009) Zeddy Saileti (Oct 6, 2009 – Dec 31, 2009) John Allen (Jan 1, 2010 – Aug 9, 2011) Matti Hiukka (Aug 9, 2011 – Dec 31, 2011) Kari Virtanen (Jan 1, 2012 – Oct 13) Juha Malinen (Nov, 2013 – Oct, 2017) Toni Koskela (Oct, 2017 – May 22, 2019) Pasi Tuutti (May 22, 2019– ) References External links Official website Football clubs in Finland Association football clubs established in 1950 Sport in Rovaniemi 1950 establishments in Finland
```java /* * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ package org.apache.rocketmq.test.client.producer.order; import java.util.List; import org.apache.log4j.Logger; import org.apache.rocketmq.common.message.MessageQueue; import org.apache.rocketmq.test.base.BaseConf; import org.apache.rocketmq.test.client.rmq.RMQNormalConsumer; import org.apache.rocketmq.test.client.rmq.RMQNormalProducer; import org.apache.rocketmq.test.listener.rmq.order.RMQOrderListener; import org.apache.rocketmq.test.message.MessageQueueMsg; import org.apache.rocketmq.test.util.MQWait; import org.apache.rocketmq.test.util.TestUtils; import org.apache.rocketmq.test.util.VerifyUtils; import org.junit.After; import org.junit.Before; import org.junit.Test; import static com.google.common.truth.Truth.assertThat; public class OrderMsgRebalanceIT extends BaseConf { private static Logger logger = Logger.getLogger(OrderMsgRebalanceIT.class); private RMQNormalProducer producer = null; private String topic = null; @Before public void setUp() { topic = initTopic(); logger.info(String.format("use topic: %s !", topic)); producer = getProducer(nsAddr, topic); } @After public void tearDown() { super.shutdown(); } @Test public void testTwoConsumersBalance() { int msgSize = 10; RMQNormalConsumer consumer1 = getConsumer(nsAddr, topic, "*", new RMQOrderListener()); RMQNormalConsumer consumer2 = getConsumer(nsAddr, consumer1.getConsumerGroup(), topic, "*", new RMQOrderListener()); TestUtils.waitForSeconds(waitTime); List<MessageQueue> mqs = producer.getMessageQueue(); MessageQueueMsg mqMsgs = new MessageQueueMsg(mqs, msgSize); producer.send(mqMsgs.getMsgsWithMQ()); boolean recvAll = MQWait.waitConsumeAll(consumeTime, producer.getAllMsgBody(), consumer1.getListener(), consumer2.getListener()); assertThat(recvAll).isEqualTo(true); boolean balance = VerifyUtils.verifyBalance(producer.getAllMsgBody().size(), VerifyUtils.getFilterdMessage(producer.getAllMsgBody(), consumer1.getListener().getAllUndupMsgBody()).size(), VerifyUtils.getFilterdMessage(producer.getAllMsgBody(), consumer2.getListener().getAllUndupMsgBody()).size()); assertThat(balance).isEqualTo(true); assertThat(VerifyUtils.verifyOrder(((RMQOrderListener) consumer1.getListener()).getMsgs())) .isEqualTo(true); assertThat(VerifyUtils.verifyOrder(((RMQOrderListener) consumer2.getListener()).getMsgs())) .isEqualTo(true); } @Test public void testFourConsuemrBalance() { int msgSize = 20; RMQNormalConsumer consumer1 = getConsumer(nsAddr, topic, "*", new RMQOrderListener()); RMQNormalConsumer consumer2 = getConsumer(nsAddr, consumer1.getConsumerGroup(), topic, "*", new RMQOrderListener()); RMQNormalConsumer consumer3 = getConsumer(nsAddr, consumer1.getConsumerGroup(), topic, "*", new RMQOrderListener()); RMQNormalConsumer consumer4 = getConsumer(nsAddr, consumer1.getConsumerGroup(), topic, "*", new RMQOrderListener()); TestUtils.waitForSeconds(waitTime); List<MessageQueue> mqs = producer.getMessageQueue(); MessageQueueMsg mqMsgs = new MessageQueueMsg(mqs, msgSize); producer.send(mqMsgs.getMsgsWithMQ()); boolean recvAll = MQWait.waitConsumeAll(consumeTime, producer.getAllMsgBody(), consumer1.getListener(), consumer2.getListener(), consumer3.getListener(), consumer4.getListener()); assertThat(recvAll).isEqualTo(true); boolean balance = VerifyUtils .verifyBalance(producer.getAllMsgBody().size(), VerifyUtils .getFilterdMessage(producer.getAllMsgBody(), consumer1.getListener().getAllUndupMsgBody()) .size(), VerifyUtils.getFilterdMessage(producer.getAllMsgBody(), consumer2.getListener().getAllUndupMsgBody()).size(), VerifyUtils.getFilterdMessage(producer.getAllMsgBody(), consumer3.getListener().getAllUndupMsgBody()).size(), VerifyUtils.getFilterdMessage(producer.getAllMsgBody(), consumer4.getListener().getAllUndupMsgBody()).size()); logger.info(String.format("consumer1:%s;consumer2:%s;consumer3:%s,consumer4:%s", consumer1.getListener().getAllMsgBody().size(), consumer2.getListener().getAllMsgBody().size(), consumer3.getListener().getAllMsgBody().size(), consumer4.getListener().getAllMsgBody().size())); assertThat(balance).isEqualTo(true); assertThat(VerifyUtils.verifyOrder(((RMQOrderListener) consumer1.getListener()).getMsgs())) .isEqualTo(true); assertThat(VerifyUtils.verifyOrder(((RMQOrderListener) consumer2.getListener()).getMsgs())) .isEqualTo(true); assertThat(VerifyUtils.verifyOrder(((RMQOrderListener) consumer3.getListener()).getMsgs())) .isEqualTo(true); assertThat(VerifyUtils.verifyOrder(((RMQOrderListener) consumer4.getListener()).getMsgs())) .isEqualTo(true); } } ```
Pavona gigantea is a species from the genus Pavona. The species was originally described by Addison Emery Verrill in 1869. References Taxa named by Addison Emery Verrill Animals described in 1869 Cnidarians of the Pacific Ocean
Fox Sports FC (formerly Total Football) was an Australian football (soccer) discussion show that televised on Fox Sports. History Aired at 8:30pm every Tuesday night on Fox Sports, the show was split into two halves, with the first half of the show dedicated to the A-League and the second to European football. Regular panelists included Andy Harper, Mark Bosnich, Melanie McLaughlin, Mark Rudan and others to discuss and dissect the weekend's action. The European-based segment primarily discusses the Premier League, with wrap-ups and highlights of football around the world. The European section usually included a guest from England via video link such as Darren Lewis, Ray Parlour, Gary O'Reilly and Stewart Robson. See also The World Game References External links Fox Sports (Australian TV network) original programming Australian sports television series 2000s Australian television series 2010s Australian television series English-language television shows A-League Men on television
```makefile PKG_NAME="libmnl" PKG_VERSION="1.0.5" PKG_SHA256=your_sha256_hash PKG_LICENSE="GPL" PKG_SITE="path_to_url" PKG_URL="path_to_url{PKG_NAME}-${PKG_VERSION}.tar.bz2" PKG_DEPENDS_TARGET="autotools:host gcc:host" PKG_LONGDESC="A minimalistic user-space library oriented to Netlink developers." ```
```jsx import React from 'react'; const Opsec = () => { return ( <> <p> This edge is created when a Service Principal has been granted the AppRoleAssignment.ReadWrite.All edge. The edge is not abusable, but is used during post-processing to create abusable edges. </p> </> ); }; export default Opsec; ```
Vácduka is a village and commune in the comitatus of Pest in Hungary. Populated places in Pest County
```xml import * as React from 'react'; import createSvgIcon from '../utils/createSvgIcon'; const AccountBrowserIcon = createSvgIcon({ svg: ({ classes }) => ( <svg xmlns="path_to_url" viewBox="0 0 2048 2048" className={classes.svg} focusable="false"> <path d="M2048 128v1664H0V128h2048zM128 256v256h1792V256H128zm1792 1408V640H128v1024h1792zm-710-464q46 26 82 62t62 79 40 93 14 102h-128q0-53-20-99t-55-82-81-55-100-20q-53 0-99 20t-82 55-55 81-20 100H640q0-52 14-101t39-93 62-80 83-62q-33-35-51-81t-19-95q0-53 20-99t55-82 81-55 100-20q53 0 99 20t82 55 55 81 20 100q0 49-18 95t-52 81zm-314-176q0 27 10 50t27 40 41 28 50 10q27 0 50-10t40-27 28-41 10-50q0-27-10-50t-27-40-41-28-50-10q-27 0-50 10t-40 27-28 41-10 50z" /> </svg> ), displayName: 'AccountBrowserIcon', }); export default AccountBrowserIcon; ```
Masterclass is an American documentary television series airing on HBO. Each half-hour episode documents the experience of a small group of young artists working with a famous mentor. The series premiered on HBO on April 18, 2010, with opera star Plácido Domingo working with three aspiring young singers. The students in the program are chosen from participants in the Miami-based organization, YoungArts, a program of the National Foundation for Advancement in the Arts, which supports emerging artists. The series is produced and directed by Karen Goodman and Kirk Simon of the Simon & Goodman Picture Company. The Executive Producer is Lin Arison. Episodes Season 1 (2010) Season 2 (2012–13) Season 3 (2013–14) Awards Primetime Emmy Awards References External links Masterclass on HBO (official website) Masterclass on Simon & Goodman Picture Company (official website) HBO original programming 2010 American television series debuts 2010s American documentary television series English-language television shows
Catocala francisca or Catocala hermia francisca is a moth of the family Erebidae. It is found in California. Adults are on wing from June to September depending on the location. There is probably one generation per year. References External links Species info Images Moths described in 1880 francisca Moths of North America
Liaño may refer to: People David Liaño Gonzalez (born 1979), Spanish mountaineer Felipe de Liaño (died 1625), Spanish painter Francisco Liaño (born 1964), Spanish footballer Thomas Vásquez de Liaño (1546-1599), Roman Catholic prelate Places Liaño, locality in the municipality of Villaescusa in Cantabria, Spain See also Liano (disambiguation) Lianos (disambiguation)
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ ~ ~ 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. --> <LinearLayout xmlns:android="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="?attr/colorPrimary" android:gravity="center_horizontal|bottom" android:minHeight="192dp" android:orientation="vertical" android:padding="16dp" > <ImageView android:layout_width="?attr/actionBarSize" android:layout_height="?attr/actionBarSize" android:layout_gravity="center" android:layout_margin="4dp" android:adjustViewBounds="true" android:contentDescription="@string/app_name" android:scaleType="fitCenter" android:src="@mipmap/ic_launcher_round" /> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center" android:text="@string/lib_name" android:textAppearance="@style/Base.TextAppearance.AppCompat.Body2" /> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center" android:text="@string/lib_description" android:textAppearance="@style/Base.TextAppearance.AppCompat.Caption" /> </LinearLayout> ```
The women's hammer throw at the 2021 World Athletics U20 Championships was held at the Kasarani Stadium on 20 and 21 August. Records Results Qualification The qualification took place on 20 August, in two groups, with Group A starting at 09:08 and Group B starting at 10:05. Athletes attaining a mark of at least 60.00 metres ( Q ) or at least the 12 best performers ( q ) qualified for the final. Final The final was held on 21 August at 16:26. References Hammer throw women Hammer throw at the World Athletics U20 Championships U20
```shell #!/usr/bin/env bash # 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 set -e echo "This script checks of presence of variables required to perform operations on Google Cloud Platform. They should be stored as secrets." echo "More detailed information about Google Cloud Platform Credentials can be found in CI.md" function check_vars() { ret=true for var in "$@"; do if [ -n "${!var}" ]; then echo "$var is set" else echo >&2 "$var is not set" ret=false fi done $ret } if ! check_vars "GCP_PROJECT_ID" "GCP_REGION" "GCP_SA_EMAIL" "GCP_SA_KEY" "GCP_TESTING_BUCKET" "GCP_PYTHON_WHEELS_BUCKET"; then echo "gcp-variables-set=false" >> $GITHUB_OUTPUT echo >&2 "!!! WARNING !!!" echo >&2 "Not all GCP variables are set. Jobs which require them will be skipped." else echo "gcp-variables-set=true" >> $GITHUB_OUTPUT fi ```
```cmake vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apriorit/mhook REF 2.5.1 SHA512 your_sha256_hashyour_sha256_hash HEAD_REF master PATCHES fix-windows-packing-mismatch.patch ) vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" ) vcpkg_cmake_install() vcpkg_copy_pdbs() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/mhook" RENAME copyright) ```
Tetyana Shchurenko (; born 26 February 1976, in Dnipropetrovsk) is a retired Ukrainian triple jumper. She represented her nation Ukraine in the triple jump at the 2004 Summer Olympics, and also set a personal best of 14.22 metres from the national athletics meet in Kyiv. Shchurenko qualified for the Ukrainian squad, along with teammate Olena Hovorova, in the women's triple jump at the 2004 Summer Olympics in Athens. Two months before the Games, she jumped 14.22 metres to register her own personal best and an Olympic A-standard at the national athletics meet in Kyiv. During the prelims, Shchurenko got off to a rough start with an immediate foul, but spanned a mediocre 13.55-metre leap on her third attempt to secure a thirtieth spot from a roster of thirty-three athletes, failing to advance further to the final round. References External links 1976 births Living people Ukrainian female triple jumpers Olympic athletes for Ukraine Athletes (track and field) at the 2004 Summer Olympics Athletes from Dnipro
The Battle of Nöteborg in July 1656 was a naval battle between 250 smaller Russian ships, who had surrounded the city of Nöteborg, and 50 smaller Swedish ships under the command of Carl Gustaf Wrangel during the Russo-Swedish War (1656–58). Few details are known, but it was a Swedish victory. Sources Nöteborg Nöteborg Second Northern War Conflicts in 1656 1656 in Europe Leningrad Oblast
```shell #!/bin/bash if [ `uname -m` == "x86_64" ];then machine=x86_64 else machine=i686 fi #memcache if [ ! -f memcache-3.0.6.tgz ];then wget path_to_url fi rm -rf memcache-3.0.6 tar -xzvf memcache-3.0.6.tgz cd memcache-3.0.6 /alidata/server/php/bin/phpize ./configure --enable-memcache --with-php-config=/alidata/server/php/bin/php-config CPU_NUM=$(cat /proc/cpuinfo | grep processor | wc -l) if [ $CPU_NUM -gt 1 ];then make -j$CPU_NUM else make fi make install cd .. echo "extension=memcache.so" >> /alidata/server/php/etc/php.ini #zend if ls -l /alidata/server/ |grep "5.3.18" > /dev/null;then mkdir -p /alidata/server/php/lib/php/extensions/no-debug-non-zts-20090626/ if [ $machine == "x86_64" ];then if [ ! -f ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz ];then wget path_to_url fi tar zxvf ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz mv ./ZendGuardLoader-php-5.3-linux-glibc23-x86_64/php-5.3.x/ZendGuardLoader.so /alidata/server/php/lib/php/extensions/no-debug-non-zts-20090626/ else if [ ! -f ZendGuardLoader-php-5.3-linux-glibc23-i386.tar.gz ];then wget path_to_url fi tar zxvf ZendGuardLoader-php-5.3-linux-glibc23-i386.tar.gz mv ./ZendGuardLoader-php-5.3-linux-glibc23-i386/php-5.3.x/ZendGuardLoader.so /alidata/server/php/lib/php/extensions/no-debug-non-zts-20090626/ fi echo "zend_extension=/alidata/server/php/lib/php/extensions/no-debug-non-zts-20090626/ZendGuardLoader.so" >> /alidata/server/php/etc/php.ini echo "zend_loader.enable=1" >> /alidata/server/php/etc/php.ini echo "zend_loader.disable_licensing=0" >> /alidata/server/php/etc/php.ini echo "zend_loader.obfuscation_level_support=3" >> /alidata/server/php/etc/php.ini echo "zend_loader.license_path=" >> /alidata/server/php/etc/php.ini elif ls -l /alidata/server/ |grep "5.4.23" > /dev/null;then mkdir -p /alidata/server/php/lib/php/extensions/no-debug-non-zts-20100525/ if [ $machine == "x86_64" ];then if [ ! -f ZendGuardLoader-70429-PHP-5.4-linux-glibc23-x86_64.tar.gz ];then wget path_to_url fi tar zxvf ZendGuardLoader-70429-PHP-5.4-linux-glibc23-x86_64.tar.gz mv ./ZendGuardLoader-70429-PHP-5.4-linux-glibc23-x86_64/php-5.4.x/ZendGuardLoader.so /alidata/server/php/lib/php/extensions/no-debug-non-zts-20100525/ else if [ ! -f ZendGuardLoader-70429-PHP-5.4-linux-glibc23-i386.tar.gz ];then wget path_to_url fi tar zxvf ZendGuardLoader-70429-PHP-5.4-linux-glibc23-i386.tar.gz mv ./ZendGuardLoader-70429-PHP-5.4-linux-glibc23-i386/php-5.4.x/ZendGuardLoader.so /alidata/server/php/lib/php/extensions/no-debug-non-zts-20100525/ fi echo "zend_extension=/alidata/server/php/lib/php/extensions/no-debug-non-zts-20100525/ZendGuardLoader.so" >> /alidata/server/php/etc/php.ini echo "zend_loader.enable=1" >> /alidata/server/php/etc/php.ini echo "zend_loader.disable_licensing=0" >> /alidata/server/php/etc/php.ini echo "zend_loader.obfuscation_level_support=3" >> /alidata/server/php/etc/php.ini echo "zend_loader.license_path=" >> /alidata/server/php/etc/php.ini elif ls -l /alidata/server/ |grep "5.5.7" > /dev/null;then mkdir -p /alidata/server/php/lib/php/extensions/no-debug-non-zts-20121212/ sed -i 's#\[opcache\]#\[opcache\]\nzend_extension=opcache.so#' /alidata/server/php/etc/php.ini sed -i 's#;opcache.enable=0#opcache.enable=1#' /alidata/server/php/etc/php.ini fi ```
```objective-c /* * * This software may be used and distributed according to the terms of the */ #pragma once #include <folly/File.h> #include <folly/Range.h> #include <optional> #include "eden/common/utils/FileOffset.h" #include "eden/common/utils/ImmediateFuture.h" #include "eden/common/utils/PathFuncs.h" #include "eden/fs/inodes/FileContentStore.h" #include "eden/fs/inodes/InodeCatalog.h" #include "eden/fs/inodes/lmdbcatalog/LMDBStoreInterface.h" #include "eden/fs/inodes/overlay/OverlayChecker.h" #include "eden/fs/model/Tree.h" namespace folly { class File; } namespace facebook::eden { class EdenConfig; namespace overlay { class OverlayDir; } struct InodeNumber; class StructuredLogger; class LMDBFileContentStore; class LMDBInodeCatalog : public InodeCatalog { public: explicit LMDBInodeCatalog(LMDBFileContentStore* core) : core_(core) {} ~LMDBInodeCatalog() override {} LMDBInodeCatalog(const LMDBInodeCatalog&) = delete; LMDBInodeCatalog& operator=(const LMDBInodeCatalog&) = delete; LMDBInodeCatalog(LMDBInodeCatalog&&) = delete; LMDBInodeCatalog& operator=(LMDBInodeCatalog&&) = delete; bool supportsSemanticOperations() const override { return false; } void maintenance() override; std::vector<InodeNumber> getAllParentInodeNumbers() override; std::optional<InodeNumber> initOverlay( bool createIfNonExisting, bool bypassLockFile = false) override; void close(std::optional<InodeNumber> nextInodeNumber) override; bool initialized() const override; std::optional<overlay::OverlayDir> loadOverlayDir( InodeNumber inodeNumber) override; std::optional<overlay::OverlayDir> loadAndRemoveOverlayDir( InodeNumber inodeNumber) override; void saveOverlayDir(InodeNumber inodeNumber, overlay::OverlayDir&& odir) override; void saveOverlayDir(InodeNumber inodeNumber, std::string&& odir); void removeOverlayDir(InodeNumber inodeNumber) override; bool hasOverlayDir(InodeNumber inodeNumber) override; InodeNumber nextInodeNumber() override; InodeNumber scanLocalChanges( std::shared_ptr<const EdenConfig> config, AbsolutePathPiece mountPath, bool windowsSymlinksEnabled, InodeCatalog::LookupCallback& callback) override; std::optional<fsck::InodeInfo> loadInodeInfo(InodeNumber number) override; private: LMDBFileContentStore* core_; }; } // namespace facebook::eden ```
Sheila Nazarian is an Iranian-American plastic surgeon and television personality. She is the best known as the host of Netflix reality television series Skin Decision: Before and After. She has also guest starred  on television series such as The Real Housewives of Beverly Hills, Basketball Wives, and Revenge Body with Khloe Kardashian. Early life and education Nazarian was born in New York to a Jewish family from Iran. Her family had returned to Iran, during the 1979 Islamic Revolution, but they could no longer leave and at age 6 she was smuggled out of Iran into Pakistan along with her mother and eventually moved to Los Angeles. She attended Columbia University, earning a BA in economics with a pre-medical concentration. She initially pursued a career in orthopedics before deciding to study plastic surgery. After graduation, she attended Yeshiva University's Albert Einstein College of Medicine and later went on to a cosmetic and reconstructive surgery residency at the University of Southern California. While at USC, she also received a Master of Medical Management (MMM) from the Marshall School of Business. Career Nazarian went on to found her private practice, Nazarian Plastic Surgery, and a medical spa company, Spa 26. She also founded The Skin Spot, a line of skincare products and The Nazarian Institute, a non-profit organization that offers business and medical education to medical professionals. Nazarian has starred as a special guest on the daytime talk shows The Doctors and The Real, as well as the PragerU web series Stories of Us in 2022. She has also guest starred in reality series such as The Real Housewives of Beverly Hills, and Revenge Body with Khloe Kardashian. She has also appeared on news programs such as Inside Edition,] Extra, The Insider, KGNS News, JBS News, 50’inside, and E! News. In 2020, Nazarian began starring in Skin Decision: Before and After alongside nurse Jamie Sherill. The series was nominated for the Daytime Emmy Award for “Outstanding Lifestyle Series” in 2021. Awards and honors Nazarian has earned multiple awards and honors throughout her career, including: 2015–2017, Super Doctors, Southern California Rising Stars 2016, Iranian Jewish Women's Organization Woman of the Year (Shamsi Hekmat Achievement Award) 2018–2022, Super Doctors, Southern California Super Doctors 2018, Top 2 Plastic Surgeon in Los Angeles by Locale Magazine 2018, Inaugural Aesthetic Industry Awards, winner of Social Media Authority Award 2019, Aesthetic Everything Award, winner of Diamond Crystal Award 2022, America's Best Plastic Surgeons by Newsweek Activism Nazarian is an outspoken activist for Israel and Jewish causes. In response to the 2021 Israel-Palestine Crisis, she spoke out against antisemitism online. Family Sheila Nazarian is married to Fardad Mobin, a neurosurgeon. The pair have three children  and reside in Bel Air, Los Angeles, California. Television Appearances References American women television personalities Living people 21st-century American businesspeople Businesspeople from Los Angeles Participants in American reality television series 21st-century American businesswomen Year of birth missing (living people) American plastic surgeons American physicians American people of Iranian descent Jewish American activists
The W47 was an American thermonuclear warhead used on the Polaris A-1 sub-launched ballistic missile system. Various models were in service from 1960 through the end of 1974. The warhead was developed by the Lawrence Radiation Laboratory between 1957 and 1960. The W47 was in diameter and long, and weighed in the Y1 model and in the Y2 model. The Y1 model had design yield of 600 kilotons and the Y2 model had a doubled design yield of 1.2 megatons. The W47 was the first warhead with a new, miniaturized pit. The aerodynamic flare at the base provided stability of orientation during descent. Two small rocket motors were used to spin the warhead for better stability and symmetry during reentry. Design Declassified British documents indicate that the W47 contained of plutonium, of uranium, of lithium deuteride and of tritium. Live fire testing The W47 is the only US ICBM or SLBM warhead to have been live fired in an atmospheric missile and warhead test, on May 6, 1962. This event took place during shot Frigate Bird which was part of the Dominic test series. While stationed about southwest of Los Angeles, the American submarine fired a Polaris-A2 missile at an open ocean target point } short of the then British Kiritimati (Christmas Island), south of Hawaii. The missile traveled a distance of . The test was observed by two submerged US submarines stationed approximately from the target point, and . The missile warhead detonated at 23:30 GMT on May 6, 1962, approximately from the designated target point, and at the target altitude of . The detonation was successful and had the full design yield of the W47Y1 at approximately 600 kilotons. The shot was designed to improve confidence in the US ballistic missile systems, though even after the test there was considerable controversy. This was partly because it was revealed that the warhead selected for the test had undergone modifications before testing and was not necessarily representative of the stockpile. Reliability controversy The W47 warhead had a series of serious reliability problems with the warhead design. 300 of the EC-47 production prototype model were produced from April 1960 through June 1960, and were all promptly retired in June 1960 due to reliability concerns. Production of Y1 and Y2 models then proceeded in 1960 through 1964. A total of 1060 Y1 and Y2 models were produced, but they were found to have so many reliability problems that no more than 300 were ever in service at any given time. In 1966, 75% of the stockpiled Y2 warheads were thought to be defective and unusable. Repair programs continued for some time. A number of the Polaris warheads were replaced in the early 1960s, when corrosion of the pits was discovered during routine maintenance. Failures of the W45, W47, and W52 warheads are still an active part of the debate about the reliability of the US nuclear weapons force moving into the future, without ongoing nuclear testing. A one-point safety test performed on the W47 warhead just prior the 1958 moratorium (Hardtack/Neptune) failed, yielding a 100-ton explosion. Because the test ban prohibited the testing needed for inherently safe one-point safe designs, a makeshift solution was adopted: a boron-cadmium wire was folded inside the pit during manufacture, and pulled out by a small motor during the warhead arming process. Unfortunately, this wire had a tendency to become brittle during storage, and break or get stuck during arming, which prevented complete removal and rendered the warhead a dud. It was estimated that 50-75% of warheads would fail. This required a complete rebuild of the W47 primaries. The oil used for lubricating the wire also promoted corrosion of the pit. See also UGM-27 Polaris List of nuclear weapons References External links Dominic nuclear test series, including Frigate Bird Polaris/W47 flight test Nuclear warheads of the United States Lawrence Livermore National Laboratory Military equipment introduced in the 1960s
```c++ // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // // path_to_url // // Unless required by applicable law or agreed to in writing, // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // specific language governing permissions and limitations #include "kudu/util/net/sockaddr.h" #include <arpa/inet.h> #include <netdb.h> #include <sys/socket.h> #include <sys/un.h> #include <cerrno> #include <cstddef> #include <cstring> #include <limits> #include <ostream> #include <string> #include <glog/logging.h> #include "kudu/gutil/dynamic_annotations.h" #include "kudu/gutil/hash/string_hash.h" #include "kudu/gutil/port.h" #include "kudu/gutil/strings/join.h" #include "kudu/gutil/strings/substitute.h" #include "kudu/util/net/net_util.h" #include "kudu/util/slice.h" #include "kudu/util/stopwatch.h" using std::string; using std::vector; using strings::Substitute; namespace kudu { /// /// Sockaddr /// Sockaddr::Sockaddr() { set_length(0); } Sockaddr::Sockaddr(const Sockaddr& other) noexcept { *this = other; } Sockaddr::~Sockaddr() { ASAN_UNPOISON_MEMORY_REGION(&storage_, sizeof(storage_)); } Sockaddr Sockaddr::Wildcard() { struct sockaddr_in addr; memset(&addr, 0, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_addr.s_addr = INADDR_ANY; return Sockaddr(addr); } Sockaddr& Sockaddr::operator=(const Sockaddr& other) noexcept { if (&other == this) { return *this; } set_length(other.len_); memcpy(&storage_, &other.storage_, len_); return *this; } Sockaddr::Sockaddr(const struct sockaddr& addr, socklen_t len) { set_length(len); memcpy(&storage_, &addr, len); } // When storing sockaddr_in, do not count the padding sin_zero field in the // length of Sockaddr::storage_ since the padding might contain irrelevant // non-zero bytes that should not be passed along with the rest of the valid // and properly initialized sockaddr_in's fields to BytewiseCompare() and // HashCode(). Sockaddr::Sockaddr(const struct sockaddr_in& addr) : Sockaddr(reinterpret_cast<const struct sockaddr&>(addr), offsetof(struct sockaddr_in, sin_zero)) { DCHECK_EQ(AF_INET, addr.sin_family); } Status Sockaddr::ParseString(const string& s, uint16_t default_port) { HostPort hp; RETURN_NOT_OK(hp.ParseString(s, default_port)); return ParseFromNumericHostPort(hp); } Status Sockaddr::ParseFromNumericHostPort(const HostPort& hp) { struct in_addr addr; if (inet_pton(AF_INET, hp.host().c_str(), &addr) != 1) { return Status::InvalidArgument("Invalid IP address", hp.host()); } // Do not count the padding sin_zero field in the length of Sockaddr::storage_ // since the padding might contain irrelevant non-zero bytes that should not // be passed along with the rest of the valid and properly initialized // sockaddr_in's fields to BytewiseCompare() and HashCode(). constexpr auto len = offsetof(struct sockaddr_in, sin_zero); set_length(len); static_assert(len > offsetof(struct sockaddr_in, sin_addr)); storage_.in.sin_family = AF_INET; static_assert(len > offsetof(struct sockaddr_in, sin_family)); storage_.in.sin_addr = addr; #ifndef __linux__ static_assert(len > offsetof(struct sockaddr_in, sin_len)); storage_.in.sin_len = sizeof(struct sockaddr_in); #endif set_port(hp.port()); return Status::OK(); } Status Sockaddr::ParseUnixDomainPath(const string& s) { constexpr auto kMaxPathSize = SIZEOF_MEMBER(struct sockaddr_un, sun_path); if (s[0] == '@') { // Specify a path in the abstract namespace. if (s.size() > kMaxPathSize) { return Status::InvalidArgument(Substitute( "UNIX domain socket path exceeds maximum length $0", kMaxPathSize)); } set_length(offsetof(struct sockaddr_un, sun_path) + s.size()); storage_.un.sun_family = AF_UNIX; memcpy(storage_.un.sun_path, s.data(), s.size()); storage_.un.sun_path[0] = '\0'; } else { // Path names must be null-terminated. The null-terminated length // may not match the length s.size(). int c_len = strlen(s.c_str()); if (c_len != s.size()) { return Status::InvalidArgument("UNIX domain socket path must not contain null bytes"); } // Per unix(7) the length of the path name, including the terminating null // byte, should not exceed the size of sun_path. if (c_len + 1 > kMaxPathSize) { return Status::InvalidArgument(Substitute( "UNIX domain socket path exceeds maximum length $0", kMaxPathSize)); } // unix(7) says the addrlen can be specified as the full length of the // structure. set_length(sizeof(struct sockaddr_un)); storage_.un.sun_family = AF_UNIX; memcpy(storage_.un.sun_path, s.c_str(), c_len + 1); } return Status::OK(); } string Sockaddr::UnixDomainPath() const { CHECK_EQ(family(), AF_UNIX); switch (unix_address_type()) { case UnixAddressType::kUnnamed: return "<unnamed>"; case UnixAddressType::kPath: return string(storage_.un.sun_path); case UnixAddressType::kAbstractNamespace: size_t len = len_ - offsetof(struct sockaddr_un, sun_path) - 1; return "@" + string(storage_.un.sun_path + 1, len); } LOG(FATAL) << "unknown unix address type"; return ""; } Sockaddr::UnixAddressType Sockaddr::unix_address_type() const { CHECK_EQ(family(), AF_UNIX); if (len_ == sizeof(sa_family_t)) { return UnixAddressType::kUnnamed; } if (storage_.un.sun_path[0] == '\0') { return UnixAddressType::kAbstractNamespace; } return UnixAddressType::kPath; } Sockaddr& Sockaddr::operator=(const struct sockaddr_in &addr) { // Do not count the padding sin_zero field since it contains irrelevant bytes // that should not be passed along with the rest of the valid and properly // initialized fields into storage_. constexpr auto len = offsetof(struct sockaddr_in, sin_zero); set_length(len); memcpy(&storage_, &addr, len); DCHECK_EQ(family(), AF_INET); return *this; } bool Sockaddr::operator==(const Sockaddr& other) const { return BytewiseCompare(*this, other) == 0; } int Sockaddr::BytewiseCompare(const Sockaddr& a, const Sockaddr& b) { Slice a_slice(reinterpret_cast<const uint8_t*>(&a.storage_), a.len_); Slice b_slice(reinterpret_cast<const uint8_t*>(&b.storage_), b.len_); return a_slice.compare(b_slice); } void Sockaddr::set_length(socklen_t len) { DCHECK(len == 0 || len >= sizeof(sa_family_t)); DCHECK_LE(len, sizeof(storage_)); len_ = len; ASAN_UNPOISON_MEMORY_REGION(&storage_, len_); ASAN_POISON_MEMORY_REGION(reinterpret_cast<uint8_t*>(&storage_) + len_, sizeof(storage_) - len_); } uint32_t Sockaddr::HashCode() const { return HashStringThoroughly(reinterpret_cast<const char*>(&storage_), len_); } void Sockaddr::set_port(int port) { DCHECK_EQ(family(), AF_INET); DCHECK_GE(port, 0); DCHECK_LE(port, std::numeric_limits<uint16_t>::max()); storage_.in.sin_port = htons(port); } int Sockaddr::port() const { DCHECK_EQ(family(), AF_INET); return ntohs(storage_.in.sin_port); } std::string Sockaddr::host() const { switch (family()) { case AF_INET: return HostPort::AddrToString(storage_.in.sin_addr.s_addr); case AF_UNIX: DCHECK(false) << "unexpected host() call on unix socket"; // In case we missed a host() call somewhere in a vlog or error message not // covered by tests, better to at least return some string here. return "<unix socket>"; default: DCHECK(false) << "unexpected host() call on socket with family " << family(); return "<unknown socket type>"; } } const struct sockaddr_in& Sockaddr::ipv4_addr() const { DCHECK_EQ(family(), AF_INET); return storage_.in; } std::string Sockaddr::ToString() const { if (!is_initialized()) { return "<uninitialized>"; } switch (family()) { case AF_INET: return Substitute("$0:$1", host(), port()); case AF_UNIX: return Substitute("unix:$0", UnixDomainPath()); default: return "<invalid sockaddr>"; } } bool Sockaddr::IsWildcard() const { DCHECK_EQ(family(), AF_INET); return storage_.in.sin_addr.s_addr == 0; } bool Sockaddr::IsAnyLocalAddress() const { if (family() == AF_UNIX) return true; DCHECK_EQ(family(), AF_INET); return HostPort::IsLoopback(storage_.in.sin_addr.s_addr); } Status Sockaddr::LookupHostname(string* hostname) const { char host[NI_MAXHOST]; int flags = 0; auto* addr = reinterpret_cast<const sockaddr*>(&storage_); int rc = 0; LOG_SLOW_EXECUTION(WARNING, 200, Substitute("DNS reverse-lookup for $0", ToString())) { rc = getnameinfo(addr, addrlen(), host, NI_MAXHOST, nullptr, 0, flags); } if (PREDICT_FALSE(rc != 0)) { if (rc == EAI_SYSTEM) { int errno_saved = errno; return Status::NetworkError(Substitute("getnameinfo: $0", gai_strerror(rc)), strerror(errno_saved), errno_saved); } return Status::NetworkError("getnameinfo", gai_strerror(rc), rc); } *hostname = host; return Status::OK(); } string Sockaddr::ToCommaSeparatedString(const std::vector<Sockaddr>& addrs) { vector<string> addrs_str; addrs_str.reserve(addrs.size()); for (const Sockaddr& addr : addrs) { addrs_str.push_back(addr.ToString()); } return JoinStrings(addrs_str, ","); } } // namespace kudu ```
```java package com.arellomobile.mvp.compiler; import com.google.common.base.Joiner; import com.google.testing.compile.Compilation; import com.google.testing.compile.JavaFileObjects; import junit.framework.AssertionFailedError; import junit.framework.ComparisonFailure; import org.objectweb.asm.ClassReader; import org.objectweb.asm.util.TraceClassVisitor; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.PrintWriter; import java.util.List; import java.util.Optional; import javax.tools.JavaFileObject; import javax.tools.StandardLocation; import static com.google.testing.compile.Compiler.javac; /** * @author Evgeny Kursakov */ public abstract class CompilerTest { protected Compilation compileSources(JavaFileObject... sources) { return javac() .withOptions("-implicit:none") // don't process or generate classes for implicitly found sources .compile(sources); } protected Compilation compileSourcesWithProcessor(JavaFileObject... sources) { return javac() .withOptions("-implicit:none") // TODO: enable lint (-Xlint:processing) .withProcessors(new MvpCompiler()) .compile(sources); } /** * Asserts that all files from {@code exceptedGeneratedFiles} exists in {@code actualGeneratedFiles} * and have equivalent bytecode */ protected void assertExceptedFilesGenerated(List<JavaFileObject> actualGeneratedFiles, List<JavaFileObject> exceptedGeneratedFiles) throws Exception { for (JavaFileObject exceptedClass : exceptedGeneratedFiles) { final String fileName = exceptedClass.getName(); JavaFileObject actualClass = actualGeneratedFiles.stream() .filter(input -> fileName.equals(input.getName())) .findFirst() .orElseThrow(() -> new AssertionFailedError("File " + fileName + " is not generated")); String actualBytecode = getBytecodeString(actualClass); String exceptedBytecode = getBytecodeString(exceptedClass); if (!exceptedBytecode.equals(actualBytecode)) { JavaFileObject actualSource = findSourceForClass(actualGeneratedFiles, fileName); throw new ComparisonFailure(Joiner.on('\n').join( "Bytecode for file " + fileName + " not equal to excepted", "", "Actual generated file (" + actualSource.getName() + "):", "================", "", actualSource.getCharContent(false), "" ), exceptedBytecode, actualBytecode); } } } /** * Find .java file in resources by full qualified class name */ protected JavaFileObject getSourceFile(String className) { return JavaFileObjects.forResource(className.replace('.', '/') + ".java"); } private String getBytecodeString(JavaFileObject file) throws IOException { ByteArrayOutputStream out = new ByteArrayOutputStream(); ClassReader classReader = new ClassReader(file.openInputStream()); TraceClassVisitor classVisitor = new TraceClassVisitor(new PrintWriter(out)); classReader.accept(classVisitor, ClassReader.SKIP_DEBUG); // skip debug info (line numbers) return out.toString(); } private JavaFileObject findSourceForClass(List<JavaFileObject> outputFiles, String classFileName) { // TODO: more effective algorithm ;) String sourceFile = classFileName .replace(StandardLocation.CLASS_OUTPUT.getName(), StandardLocation.SOURCE_OUTPUT.getName()) .replace(".class", ""); // remove chars from end of name to find parent class source int nameStart = sourceFile.lastIndexOf("/") + 1; for (int i = sourceFile.length(); i > nameStart; i--) { String name = sourceFile.substring(0, i) + ".java"; Optional<JavaFileObject> file = outputFiles.stream() .filter(javaFileObject -> javaFileObject.getName().equals(name)) .findFirst(); if (file.isPresent()) return file.get(); } throw new RuntimeException("Can't find generated source for class " + classFileName); } } ```
Igor Dmitrievich Rostorotsky (; born 4 February 1962) is a retired Soviet Greco-Roman wrestler who competed in the superheavyweight division. He won both the world and European titles in 1985 and 1987. He was the first, and one of only two wrestlers to defeat Aleksandr Karelin, having won the 1987 championship of the Soviet Union. Rostorotsky was born in Russia, but later moved to Kazakhstan and graduated from the Karagandy State University with a degree in law. References Living people 1962 births Soviet male sport wrestlers World Wrestling Championships medalists European Wrestling Championships medalists
```javascript //! moment.js locale configuration //! locale : Boso Jowo (jv) //! author : Rony Lantip : path_to_url //! reference: path_to_url ;(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['moment'], factory) : factory(global.moment) }(this, function (moment) { 'use strict'; var jv = moment.defineLocale('jv', { months : your_sha256_hashober_Nopember_Desember'.split('_'), monthsShort : 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'), weekdays : 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'), weekdaysShort : 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'), weekdaysMin : 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'), longDateFormat : { LT : 'HH.mm', LTS : 'HH.mm.ss', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY [pukul] HH.mm', LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm' }, meridiemParse: /enjing|siyang|sonten|ndalu/, meridiemHour : function (hour, meridiem) { if (hour === 12) { hour = 0; } if (meridiem === 'enjing') { return hour; } else if (meridiem === 'siyang') { return hour >= 11 ? hour : hour + 12; } else if (meridiem === 'sonten' || meridiem === 'ndalu') { return hour + 12; } }, meridiem : function (hours, minutes, isLower) { if (hours < 11) { return 'enjing'; } else if (hours < 15) { return 'siyang'; } else if (hours < 19) { return 'sonten'; } else { return 'ndalu'; } }, calendar : { sameDay : '[Dinten puniko pukul] LT', nextDay : '[Mbenjang pukul] LT', nextWeek : 'dddd [pukul] LT', lastDay : '[Kala wingi pukul] LT', lastWeek : 'dddd [kepengker pukul] LT', sameElse : 'L' }, relativeTime : { future : 'wonten ing %s', past : '%s ingkang kepengker', s : 'sawetawis detik', m : 'setunggal menit', mm : '%d menit', h : 'setunggal jam', hh : '%d jam', d : 'sedinten', dd : '%d dinten', M : 'sewulan', MM : '%d wulan', y : 'setaun', yy : '%d taun' }, week : { dow : 1, // Monday is the first day of the week. doy : 7 // The week that contains Jan 1st is the first week of the year. } }); return jv; })); ```
Middle Spring Creek is a tributary of the Conodoguinet Creek in Franklin and Cumberland counties in Pennsylvania in the United States. The stream runs through the heart of Shippensburg and into Franklin County. Middle Spring Creek joins the Conodoguinet just south of a village named Mowersville. See also List of rivers of Pennsylvania References External links U.S. Geological Survey: PA stream gaging stations Rivers of Pennsylvania Tributaries of the Susquehanna River Rivers of Cumberland County, Pennsylvania Rivers of Franklin County, Pennsylvania
The M50 series protective mask consisting of the M50 and M51 variants, officially known as the Joint Service General Purpose (JSGPM) is a lightweight, protective mask system consisting of the mask, a mask carrier, and additional accessories. It was adopted by the U.S. military in 2006 and is manufactured by Avon Rubber, the rubber-producing department of Avon protection. The mask was designed/made to incorporate the state-of-the-art technologies to protect United States Armed Forces and the allied forces from current and anticipated threats from all types of weapons of mass destruction. It is an above-the-neck, chemical-biological (CB) respirator that protects against battlefield concentrations of CB agents, toxins, toxic industrial materials and radioactive particulate matter. The M50/51 masks replace the M40 field protective mask and M42, MCU-2/P series masks and the M45 of the Land Warrior Program. There are two mask variants: M50 (ground and shipboard use) and M51 (ground vehicle use). History The M50 series mask entered service in December 2006. In July 2014, Avon Protection received a contract to supply 135,000 M50s for $33 million. In March 2016, it was announced that 166,623 M50s were purchased by the Department of Defense (DOD) under a $42 million contract. Description The M50 series is certified to MIL-SPEC PRF-EA-10003. The mask design features improved performance against chemical and biological agents, toxic industrial chemicals, and nuclear fallout. The dual, low profile filters reduce weight and bulk while reducing breathing resistance by fifty percent over the M40 series mask. The filters incorporate a shelf-life indicator patch which changes colors from white to blue when the filters are no longer serviceable. The mask face blank incorporates self sealing filter mounts that allow for filter changes in a contaminated environment. The single element eye lens gives the mask a 96 degree field of view and improved compatibility with military equipment and battlefield optical systems. The drinking system of the mask allows for greater liquid flow however, is not compatible with previous drinking systems. Consequently, the mask is normally issued with an M50 series compatible canteen cap. The lifetime ownership cost of the mask was reduced by fifty percent when compared with the M40 series mask due to a lower repair part count, all maintenance being completed at the operator and unit level and color coding of repair parts which decreased on-hand repair part inventory. Variants FM - Foreign Military Export (civilian market sales will have this designator) M50: Gas mask made to replace existing gas masks in use by the US military. M51: Consisting of a M50 gas mask with a CVC hood for head/neck protection and a flexible pipe to connect to combat vehicle overpressure systems. C50: 40mm NATO STANAG threaded version to use standard and conformal filters, primarily sold to police and export markets. M53/FM53: This series gas mask is based on the M50 and specifically developed to meet the unique requirements of Special Operations Forces (SOF) operators. M53A1: Improved single filter port variant of the M53. M54/FM54: Current generation dual 40mm ports on all models, Improved fire and chemical resistance same overall build to the M53. Users : Adopted by the Belgian Army. : Adopted by the Finnish Army. : Used by Iraqi special forces under Counter-Terrorism Service. : Awarded contract in January 2021 for the Dutch Army. : Adopted by the Norwegian Armed Forces. : In service with the Philippine Army and Philippine Navy. :Donated to Ukraine by Luxembourg in response to the Russian invasion of Ukraine. : In service with all branches of the U.S. military. References External links US Air Force: , Avon Protection M50 product brochures Avon Protection M53 product brochures Avon Protection M53A1 website Avon Protection M53A1 product brochures 2020 pdf Gas masks of the United States United States Marine Corps equipment Military equipment introduced in the 2000s
```java package com.tencent.tinker.ziputils.ziputil; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.OutputStream; import java.nio.charset.Charset; import java.util.HashSet; import java.util.zip.CRC32; import java.util.zip.Deflater; import java.util.zip.DeflaterOutputStream; import java.util.zip.ZipEntry; import java.util.zip.ZipException; /** * Created by tangyinsheng on 2018/11/20. */ public class AlignedZipOutputStream extends DeflaterOutputStream { /** * Constants migrated from ZipConstants */ private static final long LOCSIG = 0x4034b50, EXTSIG = 0x8074b50, CENSIG = 0x2014b50, ENDSIG = 0x6054b50; /** * Constants migrated from ZipConstants */ private static final int LOCHDR = 30, EXTHDR = 16; // 1980-01-01 00:00:00 private static final int MOD_DATE_CONST = 0x21; private static final int TIME_CONST = 0; /** * General Purpose Bit Flags, Bit 3. * If this bit is set, the fields crc-32, compressed * size and uncompressed size are set to zero in the * local header. The correct values are put in the * data descriptor immediately following the compressed * data. (Note: PKZIP version 2.04g for DOS only * recognizes this bit for method 8 compression, newer * versions of PKZIP recognize this bit for any * compression method.) */ private static final int GPBF_DATA_DESCRIPTOR_FLAG = 1 << 3; /** * General Purpose Bit Flags, Bit 11. * Language encoding flag (EFS). If this bit is set, * the filename and comment fields for this file * must be encoded using UTF-8. */ private static final int GPBF_UTF8_FLAG = 1 << 11; private static final byte[] EMPTY_BYTE_ARRAY = {}; private static final byte[] ONE_ELEM_BYTE_ARRAY = {0}; /** * Indicates deflated entries. */ public static final int DEFLATED = ZipEntry.DEFLATED; /** * Indicates uncompressed entries. */ public static final int STORED = ZipEntry.STORED; private static final int ZIPLocalHeaderVersionNeeded = 20; private byte[] commentBytes = EMPTY_BYTE_ARRAY; private final HashSet<String> entries = new HashSet<>(); private int defaultCompressionMethod = DEFLATED; private int compressionLevel = Deflater.DEFAULT_COMPRESSION; private ByteArrayOutputStream cDir = new ByteArrayOutputStream(); private ZipEntry currentEntry; private final CRC32 crc = new CRC32(); private long crcDataSize = 0; private int offset = 0; private int nameLength; private byte[] nameBytes; private boolean finished = false; private boolean closed = false; private final int alignBytes; private int padding = 0; /** * Constructs a new {@code ZipOutputStream} that writes a zip file * to the given {@code OutputStream}. */ public AlignedZipOutputStream(OutputStream os) { this(os, 4); } /** * Constructs a new {@code ZipOutputStream} that writes a zip file * to the given {@code OutputStream}. */ public AlignedZipOutputStream(OutputStream os, int alignBytes) { super(os, new Deflater(Deflater.DEFAULT_COMPRESSION, true)); this.alignBytes = alignBytes; } /** * Closes the current {@code ZipEntry}, if any, and the underlying output * stream. If the stream is already closed this method does nothing. * * @throws IOException * If an error occurs closing the stream. */ @Override public void close() throws IOException { // don't call super.close() because that calls finish() conditionally if (!closed) { finish(); def.end(); out.close(); out = null; closed = true; } } /** * Closes the current {@code ZipEntry}. Any entry terminal data is written * to the underlying stream. * * @throws IOException * If an error occurs closing the entry. */ public void closeEntry() throws IOException { checkOpen(); if (currentEntry == null) { return; } if (currentEntry.getMethod() == DEFLATED) { super.finish(); } // Verify values for STORED types if (currentEntry.getMethod() == STORED) { if (crc.getValue() != currentEntry.getCrc()) { throw new ZipException("CRC mismatch"); } if (currentEntry.getSize() != crcDataSize) { throw new ZipException("Size mismatch"); } } int curOffset = LOCHDR; // Write the DataDescriptor if (currentEntry.getMethod() != STORED) { curOffset += EXTHDR; writeLong(out, EXTSIG); currentEntry.setCrc(crc.getValue()); writeLong(out, currentEntry.getCrc()); currentEntry.setCompressedSize(def.getTotalOut()); writeLong(out, currentEntry.getCompressedSize()); currentEntry.setSize(def.getTotalIn()); writeLong(out, currentEntry.getSize()); } // Update the CentralDirectory // path_to_url int flags = currentEntry.getMethod() == STORED ? 0 : GPBF_DATA_DESCRIPTOR_FLAG; // Since gingerbread, we always set the UTF-8 flag on individual files. // Some tools insist that the central directory also have the UTF-8 flag. // path_to_url flags |= GPBF_UTF8_FLAG; writeLong(cDir, CENSIG); writeShort(cDir, ZIPLocalHeaderVersionNeeded); // Version created writeShort(cDir, ZIPLocalHeaderVersionNeeded); // Version to extract writeShort(cDir, flags); writeShort(cDir, currentEntry.getMethod()); writeShort(cDir, TIME_CONST); writeShort(cDir, MOD_DATE_CONST); writeLong(cDir, crc.getValue()); if (currentEntry.getMethod() == DEFLATED) { curOffset += writeLong(cDir, def.getTotalOut()); writeLong(cDir, def.getTotalIn()); } else { curOffset += writeLong(cDir, crcDataSize); writeLong(cDir, crcDataSize); } curOffset += writeShort(cDir, nameLength); if (currentEntry.getExtra() != null) { curOffset += writeShort(cDir, currentEntry.getExtra().length); } else { writeShort(cDir, 0); } String comment = currentEntry.getComment(); byte[] commentBytes = EMPTY_BYTE_ARRAY; if (comment != null) { commentBytes = comment.getBytes(Charset.forName("UTF-8")); } writeShort(cDir, commentBytes.length); // Comment length. writeShort(cDir, 0); // Disk Start writeShort(cDir, 0); // Internal File Attributes writeLong(cDir, 0); // External File Attributes writeLong(cDir, offset); // Relative Offset of Local File Header cDir.write(nameBytes); nameBytes = null; if (currentEntry.getExtra() != null) { cDir.write(currentEntry.getExtra()); } offset += curOffset + padding; padding = 0; if (commentBytes.length > 0) { cDir.write(commentBytes); } currentEntry = null; crc.reset(); crcDataSize = 0; def.reset(); } /** * Indicates that all entries have been written to the stream. Any terminal * information is written to the underlying stream. * * @throws IOException * if an error occurs while terminating the stream. */ @Override public void finish() throws IOException { checkOpen(); if (finished) { return; } if (entries.isEmpty()) { throw new ZipException("No entries"); } if (currentEntry != null) { closeEntry(); } int cdirSize = cDir.size(); // Write Central Dir End writeLong(cDir, ENDSIG); writeShort(cDir, 0); // Disk Number writeShort(cDir, 0); // Start Disk writeShort(cDir, entries.size()); // Number of entries writeShort(cDir, entries.size()); // Number of entries writeLong(cDir, cdirSize); // Size of central dir writeLong(cDir, offset + padding); // Offset of central dir writeShort(cDir, commentBytes.length); if (commentBytes.length > 0) { cDir.write(commentBytes); } // Write the central directory. cDir.writeTo(out); cDir = null; finished = true; } private int getPaddingByteCount(ZipEntry entry, int entryFileOffset) { if (entry.getMethod() != STORED || alignBytes == 0) { return 0; } return (alignBytes - (entryFileOffset % alignBytes)) % alignBytes; } private void makePaddingToStream(OutputStream os, int padding) throws IOException { if (padding <= 0) { return; } while (padding-- > 0) { os.write(0); } } /** * Writes entry information to the underlying stream. Data associated with * the entry can then be written using {@code write()}. After data is * written {@code closeEntry()} must be called to complete the writing of * the entry to the underlying stream. * * @param ze * the {@code ZipEntry} to store. * @throws IOException * If an error occurs storing the entry. * @see #write */ public void putNextEntry(ZipEntry ze) throws IOException { if (currentEntry != null) { closeEntry(); } // Did this ZipEntry specify a method, or should we use the default? int method = ze.getMethod(); if (method == -1) { method = defaultCompressionMethod; } // If the method is STORED, check that the ZipEntry was configured appropriately. if (method == STORED) { if (ze.getCompressedSize() == -1) { ze.setCompressedSize(ze.getSize()); } else if (ze.getSize() == -1) { ze.setSize(ze.getCompressedSize()); } if (ze.getCrc() == -1) { throw new ZipException("STORED entry missing CRC"); } if (ze.getSize() == -1) { throw new ZipException("STORED entry missing size"); } if (ze.getSize() != ze.getCompressedSize()) { throw new ZipException("STORED entry size/compressed size mismatch"); } } checkOpen(); if (entries.contains(ze.getName())) { throw new ZipException("Entry already exists: " + ze.getName()); } if (entries.size() == 64*1024-1) { throw new ZipException("Too many entries for the zip file format's 16-bit entry count"); } nameBytes = ze.getName().getBytes(Charset.forName("UTF-8")); nameLength = nameBytes.length; if (nameLength > 0xffff) { throw new IllegalArgumentException("Name too long: " + nameLength + " UTF-8 bytes"); } def.setLevel(compressionLevel); ze.setMethod(method); currentEntry = ze; entries.add(currentEntry.getName()); // Local file header. // path_to_url int flags = (method == STORED) ? 0 : GPBF_DATA_DESCRIPTOR_FLAG; // Java always outputs UTF-8 filenames. (Before Java 7, the RI didn't set this flag and used // modified UTF-8. From Java 7, it sets this flag and uses normal UTF-8.) flags |= GPBF_UTF8_FLAG; writeLong(out, LOCSIG); // Entry header writeShort(out, ZIPLocalHeaderVersionNeeded); // Extraction version writeShort(out, flags); writeShort(out, method); if (currentEntry.getTime() == -1) { currentEntry.setTime(System.currentTimeMillis()); } writeShort(out, TIME_CONST); writeShort(out, MOD_DATE_CONST); if (method == STORED) { writeLong(out, currentEntry.getCrc()); writeLong(out, currentEntry.getSize()); writeLong(out, currentEntry.getSize()); } else { writeLong(out, 0); writeLong(out, 0); writeLong(out, 0); } writeShort(out, nameLength); final int currDataOffset = offset + LOCHDR + nameLength + (currentEntry.getExtra() != null ? currentEntry.getExtra().length : 0); padding = getPaddingByteCount(currentEntry, currDataOffset); if (currentEntry.getExtra() != null) { writeShort(out, currentEntry.getExtra().length + padding); } else { writeShort(out, padding); } out.write(nameBytes); if (currentEntry.getExtra() != null) { out.write(currentEntry.getExtra()); } makePaddingToStream(out, padding); } /** * Sets the comment associated with the file being written. * @throws IllegalArgumentException if the comment is >= 64 Ki UTF-8 bytes. */ public void setComment(String comment) { if (comment == null) { this.commentBytes = null; return; } byte[] newCommentBytes = comment.getBytes(Charset.forName("UTF-8")); if (newCommentBytes.length > 0xffff) { throw new IllegalArgumentException("Comment too long: " + newCommentBytes.length + " bytes"); } this.commentBytes = newCommentBytes; } /** * Sets the <a href="Deflater.html#compression_level">compression level</a> to be used * for writing entry data. */ public void setLevel(int level) { if (level < Deflater.DEFAULT_COMPRESSION || level > Deflater.BEST_COMPRESSION) { throw new IllegalArgumentException("Bad level: " + level); } compressionLevel = level; } /** * Sets the default compression method to be used when a {@code ZipEntry} doesn't * explicitly specify a method. See {@link ZipEntry#setMethod} for more details. */ public void setMethod(int method) { if (method != STORED && method != DEFLATED) { throw new IllegalArgumentException("Bad method: " + method); } defaultCompressionMethod = method; } private long writeLong(OutputStream os, long i) throws IOException { // Write out the long value as an unsigned int os.write((int) (i & 0xFF)); os.write((int) (i >> 8) & 0xFF); os.write((int) (i >> 16) & 0xFF); os.write((int) (i >> 24) & 0xFF); return i; } private int writeShort(OutputStream os, int i) throws IOException { if (i > 0xFFFF) { throw new IllegalArgumentException("value " + i + " is too large for type 'short'."); } os.write(i & 0xFF); os.write((i >> 8) & 0xFF); return i; } @Override public void write(int b) throws IOException { // Use static pre-allocated byte array to avoid memory fragment. final byte[] buf = ONE_ELEM_BYTE_ARRAY; buf[0] = (byte)(b & 0xff); write(buf, 0, 1); } /** * Writes data for the current entry to the underlying stream. * * @exception IOException * If an error occurs writing to the stream */ @Override public void write(byte[] buffer, int offset, int byteCount) throws IOException { checkOffsetAndCount(buffer.length, offset, byteCount); if (currentEntry == null) { throw new ZipException("No active entry"); } if (currentEntry.getMethod() == STORED) { out.write(buffer, offset, byteCount); } else { super.write(buffer, offset, byteCount); } crc.update(buffer, offset, byteCount); crcDataSize += byteCount; } private void checkOffsetAndCount(int arrayLength, int offset, int count) { if ((offset | count) < 0 || offset > arrayLength || arrayLength - offset < count) { throw new ArrayIndexOutOfBoundsException("length=" + arrayLength + "; regionStart=" + offset + "; regionLength=" + count); } } private void checkOpen() throws IOException { if (closed) { throw new IOException("Stream is closed"); } } } ```
```makefile libavcodec/lpc.o: libavcodec/lpc.c libavutil/common.h \ libavutil/attributes.h libavutil/macros.h libavutil/version.h \ libavutil/avconfig.h config.h libavutil/intmath.h libavutil/common.h \ libavutil/mem.h libavutil/error.h libavutil/avutil.h \ libavutil/rational.h libavutil/mathematics.h libavutil/intfloat.h \ libavutil/log.h libavutil/pixfmt.h libavutil/internal.h \ libavutil/timer.h libavutil/cpu.h libavutil/dict.h libavutil/libm.h \ libavutil/lls.h libavcodec/lpc.h libavutil/avassert.h \ libavcodec/aac_defines.h ```
Harald Nicolai Storm Wergeland (14 March 1912 – 25 January 1987) was a Norwegian physicist. He was a professor at the Norwegian Institute of Technology. He was born in Norderhov as a son of forest manager Harald Nicolay Storm Wergeland (1884–1953) and Ebba Marie Weien (1889–1952). In 1937 he married Hedvig Louise Ording, a sister of Fredrik Ording. He finished his secondary education in 1931. He graduated as a chemical engineer from the Norwegian Institute of Technology in 1936 and earned the dr.philos. degree in 1942. He was briefly a teacher at Trondheim Commerce School before working as an assistant at the Norwegian Institute of Technology from 1939. Wergeland worked as a professor of physics from 1946 to 1979 at the Norwegian Institute of Technology, now the Norwegian University of Science and Technology at Gløshaugen. He also served as associate professor at Purdue University from 1948 to 1949. Wergeland participated in the foundation of CERN and was a leading member of Pugwash in Norway. He served as praeses of the Royal Norwegian Society of Sciences and Letters from 1958 to 1965. He was a member of the Norwegian Academy of Science and Letters from 1943, the Royal Danish Academy of Sciences and Letters from 1964 and the Royal Swedish Academy of Sciences. He was decorated as a Knight, First Class of the Order of St. Olav in 1960 and received the Gunnerus Medal in 1970. References External links The family tree of Harald Wergeland on Geni.com 1912 births 1987 deaths Norwegian chemical engineers Norwegian physicists Norwegian Institute of Technology alumni Academic staff of the Norwegian Institute of Technology Norwegian expatriates in the United States Members of the Norwegian Academy of Science and Letters Members of the Royal Swedish Academy of Sciences Royal Norwegian Society of Sciences and Letters Members of the Royal Danish Academy of Sciences and Letters People associated with CERN
Siddha Bhairavi temple is a shrine situated at Mantridi in Ganjam district of Odisha India. The presiding deity is the goddess Bhairavi. Carved in crude fashion, the idol features one leg and four hands. It is said that this idol was excavated from a ploughed field. and was enshrined as such in a new temple in 1937. All the Sankranti days in every month of the Hindu calendar and Tuesdays are considered auspicious here. The temple is on National Highway 16, about from Berhampur. Berhampur railway station is the nearest railhead. Other attractions The temple houses 108 sub shrines dedicated to all Hindu gods present from Kashmir to Kanyakumari like the 12 jyotirlingas, Vaishno Devi, Dashavatara, Venkateswara, Ranganatha, Meenakshi, Badrinath. A big shrine is also present which houses Lord Jagannath along with his siblings. It is believed that at the end of Kali Yuga, Bhairavi devi will accompany Kalki Avatar in restoring Dharma. References External links The official web site. Hindu temples in Ganjam district Shakti temples
The International Analog Forestry Network (IAFN) is a non-governmental organization (NGO) that seeks to conserve and restore biodiversity worldwide through the application of analog forestry. The IAFN links a variety of community, governmental, and private organizations (29 as of November, 2012), as well as a number of individuals, who apply the practices and principles of analog forestry in their work. The IAFN was established in 1995 to facilitate the exchange of knowledge and experience among analog forestry practitioners and to further promote the system. The IAFN supports its partners through the development of technical manuals and promotional materials, training, research, and creating improved marketing opportunities. The IAFN established and currently monitors the Forest Garden Product standard, a certification standard for goods produced within forest gardens, which encompasses the requirements of most organic certification but with additional restrictions to further the protection of biodiversity. FGP standards are being adapted to certify minerals that have been "responsibly mined," as well as ecosystem services and products, such as carbon credits. The office of the IAFN is currently located in Londres, Puntarenas, Costa Rica. References External links Official website Forestry education International forestry organizations Forest conservation organizations Forestry in Costa Rica
The Finger was a hardcore punk band, formed by Ryan Adams and Jesse Malin, under the pseudonyms "Warren Peace" and "Irving Plaza" respectively (along with Colin Burns and Johnny T. Yerington as "Jim Beahm" and "Rick O'Shea"). The name derived from notorious early/mid-1990s Raleigh, North Carolina rock band Finger, of which Adams was a big fan. This light-hearted project allowed both artists to return to their punk backgrounds (Adams began his music career as singer for The Patty Duke Syndrome and Malin began his career in the hardcore punk band Heart Attack and more famously as the lead singer of D Generation). They began by releasing two EPs: We Are Fuck You and Punk's Dead Let's Fuck which were later collected to form the album We Are Fuck You, released in 2003. Discography 2003: We Are Fuck You References American hardcore punk groups Ryan Adams
```php <?php #snippet-start:[php.example_code.auto-scaling.service] namespace AutoScaling; use Aws\AutoScaling\AutoScalingClient; use Aws\AutoScaling\Exception\AutoScalingException; use AwsUtilities\AWSServiceClass; use Exception; class AutoScalingService extends AWSServiceClass { protected AutoScalingClient $autoScalingClient; public function __construct($autoScalingClient) { $this->autoScalingClient = $autoScalingClient; } #snippet-start:[php.example_code.auto-scaling.service.createAutoScalingGroup] public function createAutoScalingGroup( $autoScalingGroupName, $availabilityZones, $minSize, $maxSize, $launchTemplateId ) { return $this->autoScalingClient->createAutoScalingGroup([ 'AutoScalingGroupName' => $autoScalingGroupName, 'AvailabilityZones' => $availabilityZones, 'MinSize' => $minSize, 'MaxSize' => $maxSize, 'LaunchTemplate' => [ 'LaunchTemplateId' => $launchTemplateId, ], ]); } #snippet-end:[php.example_code.auto-scaling.service.createAutoScalingGroup] #snippet-start:[php.example_code.auto-scaling.service.updateAutoScalingGroup] public function updateAutoScalingGroup($autoScalingGroupName, $args) { if (array_key_exists('MaxSize', $args)) { $maxSize = ['MaxSize' => $args['MaxSize']]; } else { $maxSize = []; } if (array_key_exists('MinSize', $args)) { $minSize = ['MinSize' => $args['MinSize']]; } else { $minSize = []; } $parameters = ['AutoScalingGroupName' => $autoScalingGroupName]; $parameters = array_merge($parameters, $minSize, $maxSize); return $this->autoScalingClient->updateAutoScalingGroup($parameters); } #snippet-end:[php.example_code.auto-scaling.service.updateAutoScalingGroup] #snippet-start:[php.example_code.auto-scaling.service.deleteAutoScalingGroup] public function deleteAutoScalingGroup($autoScalingGroupName) { return $this->autoScalingClient->deleteAutoScalingGroup([ 'AutoScalingGroupName' => $autoScalingGroupName, 'ForceDelete' => true, ]); } #snippet-end:[php.example_code.auto-scaling.service.deleteAutoScalingGroup] #snippet-start:[php.example_code.auto-scaling.service.describeAutoScalingGroups] public function describeAutoScalingGroups($autoScalingGroupNames) { return $this->autoScalingClient->describeAutoScalingGroups([ 'AutoScalingGroupNames' => $autoScalingGroupNames ]); } #snippet-end:[php.example_code.auto-scaling.service.describeAutoScalingGroups] public function waitUntilGroupInService($autoScalingGroupNames) { $this->autoScalingClient->waitUntil('GroupInService', ['AutoScalingGroupNames' => $autoScalingGroupNames]); } #snippet-start:[php.example_code.auto-scaling.service.terminateInstanceInAutoScalingGroup] public function terminateInstanceInAutoScalingGroup( $instanceId, $shouldDecrementDesiredCapacity = true, $attempts = 0 ) { try { return $this->autoScalingClient->terminateInstanceInAutoScalingGroup([ 'InstanceId' => $instanceId, 'ShouldDecrementDesiredCapacity' => $shouldDecrementDesiredCapacity, ]); } catch (AutoScalingException $exception) { if ($exception->getAwsErrorCode() == "ScalingActivityInProgress" && $attempts < 5) { error_log("Cannot terminate an instance while it is still pending. Waiting then trying again."); sleep(5 * (1 + $attempts)); return $this->terminateInstanceInAutoScalingGroup( $instanceId, $shouldDecrementDesiredCapacity, ++$attempts ); } else { throw $exception; } } } #snippet-end:[php.example_code.auto-scaling.service.terminateInstanceInAutoScalingGroup] /** * @throws Exception */ public function terminateAllInstancesInAutoScalingGroup( $autoScalingGroupName, $shouldDecrementDesiredCapacity = true, $attempts = 0 ) { $instances = $this->describeAutoScalingGroups([$autoScalingGroupName])['AutoScalingGroups'][0]['Instances']; foreach ($instances as $instance) { $this->terminateInstanceInAutoScalingGroup( $instance['InstanceId'], $shouldDecrementDesiredCapacity, $attempts ); } $tries = 0; do { $autoScalingGroups = $this->describeAutoScalingGroups([$autoScalingGroupName]); sleep(10 * $tries++); if ($tries > 10) { throw new Exception("Terminating instances took too long."); } } while (count($autoScalingGroups['AutoScalingGroups'][0]['Instances']) > 0); } #snippet-start:[php.example_code.auto-scaling.service.setDesiredCapacity] public function setDesiredCapacity($autoScalingGroupName, $desiredCapacity) { return $this->autoScalingClient->setDesiredCapacity([ 'AutoScalingGroupName' => $autoScalingGroupName, 'DesiredCapacity' => $desiredCapacity, ]); } #snippet-end:[php.example_code.auto-scaling.service.setDesiredCapacity] #snippet-start:[php.example_code.auto-scaling.service.describeAutoScalingInstances] public function describeAutoScalingInstances($instanceIds) { return $this->autoScalingClient->describeAutoScalingInstances([ 'InstanceIds' => $instanceIds ]); } #snippet-end:[php.example_code.auto-scaling.service.describeAutoScalingInstances] #snippet-start:[php.example_code.auto-scaling.service.describeScalingActivities] public function describeScalingActivities($autoScalingGroupName) { return $this->autoScalingClient->describeScalingActivities([ 'AutoScalingGroupName' => $autoScalingGroupName, ]); } #snippet-end:[php.example_code.auto-scaling.service.describeScalingActivities] #snippet-start:[php.example_code.auto-scaling.service.enableMetricsCollection] public function enableMetricsCollection($autoScalingGroupName, $granularity) { return $this->autoScalingClient->enableMetricsCollection([ 'AutoScalingGroupName' => $autoScalingGroupName, 'Granularity' => $granularity, ]); } #snippet-end:[php.example_code.auto-scaling.service.enableMetricsCollection] #snippet-start:[php.example_code.auto-scaling.service.disableMetricsCollection] public function disableMetricsCollection($autoScalingGroupName) { return $this->autoScalingClient->disableMetricsCollection([ 'AutoScalingGroupName' => $autoScalingGroupName, ]); } #snippet-end:[php.example_code.auto-scaling.service.disableMetricsCollection] #snippet-start:[php.example_code.auto-scaling.service.describeAccountLimits] public function describeAccountLimits() { return $this->autoScalingClient->describeAccountLimits(); } #snippet-end:[php.example_code.auto-scaling.service.describeAccountLimits] } #snippet-end:[php.example_code.auto-scaling.service] ```
```c++ //==- DIAEnumLineNumbers.cpp - DIA Line Number Enumerator impl ---*- C++ -*-==// // // See path_to_url for license information. // //===your_sha256_hash------===// #include "llvm/DebugInfo/PDB/DIA/DIAEnumLineNumbers.h" #include "llvm/DebugInfo/PDB/DIA/DIALineNumber.h" #include "llvm/DebugInfo/PDB/PDBSymbol.h" using namespace llvm; using namespace llvm::pdb; DIAEnumLineNumbers::DIAEnumLineNumbers( CComPtr<IDiaEnumLineNumbers> DiaEnumerator) : Enumerator(DiaEnumerator) {} uint32_t DIAEnumLineNumbers::getChildCount() const { LONG Count = 0; return (S_OK == Enumerator->get_Count(&Count)) ? Count : 0; } std::unique_ptr<IPDBLineNumber> DIAEnumLineNumbers::getChildAtIndex(uint32_t Index) const { CComPtr<IDiaLineNumber> Item; if (S_OK != Enumerator->Item(Index, &Item)) return nullptr; return std::unique_ptr<IPDBLineNumber>(new DIALineNumber(Item)); } std::unique_ptr<IPDBLineNumber> DIAEnumLineNumbers::getNext() { CComPtr<IDiaLineNumber> Item; ULONG NumFetched = 0; if (S_OK != Enumerator->Next(1, &Item, &NumFetched)) return nullptr; return std::unique_ptr<IPDBLineNumber>(new DIALineNumber(Item)); } void DIAEnumLineNumbers::reset() { Enumerator->Reset(); } ```
Jeffrey Peter Galmond is a Danish Supreme Court lawyer and businessman. He is the owner of the law firm J. P. Galmond & Co. He owned large portions of the holding companies that owned the Russian mobile telecommunications operator Megafon. One of these portions was contested. Galmond had been accused of not being the true owner of the Russian assets, but of acting as a front to Russian minister of telecommunications Leonid Reiman. These claims were vigorously denied by Galmond. Involvement with Leonid Reiman Galmond became acquainted with Leonid Reiman in the 1980s. With headquarters in Copenhagen and offices in Hamburg, J.P. Galmond & Company established a presence in telecommunication, finance, and company law in Russia in 1989 and a representation office in St Petersburg in 1992 and in Moscow in 2000. In the early 1990s, Galmond met Leonid Reiman in Leningrad (St Petersburg), who was an executive with the Leningrad City Telephone Network (LGTS) that was renamed the St. Petersburg City Telephone Network (PTS) in 1993. Galmond later became Reiman's attorney. In 1994, Reiman collected numerous joint ventures of telecoms owned by his state-controlled employer into OAO Telecominvest (TCI) () in which his employer had a 95% share and Galmond the rest. In 1995, the non-Galmond held share was owned through First National Holding SA from Luxembourg by Germany's Commerzbank with a 51% share and by Reiman's employer and another state-controlled company with a 49% share. Then, First National Holding's share grew to 85%. OAO Telecominvest's main asset was a 45% stake in North-West GSM which became the core of Megafon. In 2001, after Commerzbank through its First National Holding SA ended its share of Telecominvest, Galmond had several companies including IPOC International Growth Fund which was established in 2000 in Bermuda and Lapal Ltd., Albany Invest Ltd., and Mercury Import Ltd. in the British Virgin Islands (BVI) acquire the telecom holdings of Commerzbank's former interests. IPOC International Growth Fund was formed as a mutual fund, however, there were no investment from shareholders owning a stake in it: The only income IPOC received was from its subsidiaries. IPOC International Growth Fund IPOC International Growth Fund, which controls several Russian telecoms, was competing against Alfa Group for control of a large share in Megafon. Both IPOC and Alfa Group used numerous 1929 Holding Company Schemes with shell companies in the British Virgin Islands, Luxembourg, Cyprus, Cayman Islands, and Delaware. Galmond's disputed 25% share in Megafon was held by Leonid Rozhetskin's LV Finance, a company which sold its share on 5 August 2003 for $200 million through several shell companies to Altimo a subsidiary of Alfa Group, the company fronted by Russian oligarch Mikhail Fridman. But, Galmond had an agreement to purchase LV Finance's 25% share in MegaFon already in 2001. Alfa Group was at the centre of many disputes involving disputed ownership of telecommunications operations. These companies included Norwegian Telenor, Swedish-Finnish TeliaSonera, Turkey's Turkcell and others. IPOC International Growth Fund even launched a RICO suit in the United States against Alfa Group and its associates. Early 2004 while Leonid Reiman was Deputy Minister of Transport and Communications, Gossvyaznadzor () stated that it is unclear how taxes are paid by VimpelCom OJSC and Impulse Design Bureau OJSC, which is a wholly owned subsidiary of VimpelCom. Reiman suggested that the two merge. While the courts came to a decision, however, Megafon greatly increase its market share in the key Moscow region as VimpelCom was held back from expanding into that region. At the time, Alfa had a significant share in Vimpel. In Geneva, the International Chamber of Commerce arbitration tribunal ruled that IPOC International Growth Fund had legal right to the 25% share in MegaFon and that Alfa Grouup did not have a genuine and proper commercial transaction when it tried to obtain the stake. During the proceedings, Kroll, a private investigations firm, had surveilled the chairman of the Geneva panel. In March 2004 on a tip from Alfa Group that IPOC International Growth Fund was involved in money laundering activities, Paula Cox, the Bermuda Minister of Finance, hired Michael Morrison and Malcolm Butterfield of KPMG to independently investigate the IPOC International Growth Fund and eleven other associated companies for any improper activities. On 9 March 2005, TeliaSonera, TeleComInvest, and IPOC International Growth Fund signed a shareholders' agreement in which they would actively pursue MegaFon's public listing. From the spring to October of 2005, Richard Burt's Due Diligence performed Project Yucca for BGR in which the auditing firm KPMG was infiltrated for Alfa Group's benefit by Due Diligence in order to obtain information about KPMG's audit of the IPOC International Growth Fund. Later, the Bermuda government accused the IPOC International Growth Fund, which is associated with Bermuda and BVI registered owners of Russian telecoms, of money laundering and also accused Due Diligence of impersonating secret service personnel. Author Eamon Javers in his book "Broker, Trader, lawyer, Spy", describes the infiltration by Alfa Group's agents into the KPMG investigation and the attempt to influence and manipulate the result of the investigation. In November 2005, The Financial Times reported that Jeffrey Galmond established through court documents that Leonid Reiman is the sole beneficiary of the Fiduciare Commerce Trust which indirectly controls OAO Telecominvest. In 2006, the beneficial owner of IPOC International Growth Fund was found to be Leonid Reiman according to a Zurich ruling by the International Chamber of Commerce. In February 2007, Galmond was accused by the Bermuda Minister of Finance, Paula Cox of minor infringements of local business requirements. She asked the supreme court to wind up IPOC International Growth Fund, a company owned by Galmond, along with several other companies associated with Galmond. Galmond and IPOC worked to solve the issue. One step taken was for IPOC to fund a report by KPMG into its operations. KPMG's report, which cost its client(s) US$13 million, found no evidence that Galmond was not the beneficial owner of the MegaFon stake, or Alfa's claim that money going into IPOC funds was the proceeds of money laundering. In April 2007 Finance Minister Paula Cox instructed the Registrar of Companies to file the petition to wind-up IPOC International Growth Fund and eight related companies. The move was aimed at protecting Bermuda's reputation as a jurisdiction. Bermuda also received around $22.5 million as its share of $45 million confiscated on 1 May 2008 from IPOC International Growth Fund in a criminal prosecution in the British Virgin Islands, where three IPOC-owned companies were domiciled. In July 2007, Altimo, which is owned by Mikhail Fridman's Alfa Group, won in its dispute with the IPOC International Growth Fund and received ownership of the 25.1% stake in MegaFon which was formerly owned by LV Finance. Both Altimo and IPOC International Growth Fund jointly decided to "end all court actions and end legal claims against each other." At that time, IPOC through its holdings in TeleComInvest held a 39.3% share of MegaFon and Alfa Group through Altimo held a 25.1% stake in MegaFon. RTK-Leasing In 2005, Galmond owned a 95% stake in Svyaz-Bank (), which had been privatized in 2003, through RTK-Leasing (), which is part of the IPOC Bermuda Fund. RTK-Leasing supplied equipment for the Russian post office which was considering support from Svyaz-Bank to create a Russian Post Bank because many Russian pensioners had accounts with Svyaz-Bank. In September 2008, VEB gained a 98% stake and control of Svyaz-Bank. Before the collapse of Svyaz-Bank and its subsequent takeover by VEB, both Daniel Bolotin (), who lived among Israel, Netherlands and Germany, was formerly known as Yevgeny Bolotin (; born in Mogilev, Byelorussian SSR, USSR) and was very close to Alexander Korovnikov (), and Roland Pieper () of European Technology and Investment Research Center (ETIRC) had received a $150 million loan from Svyaz-Bank in December 2007 for their purchase of Eclipse Aviation to rebrand the company as Eclipse Aerospace. From April 2004 until September 2008, Gennady Meshcheryakov () led Svyaz-Bank. In June 2010, Svyaz-Bank sued Tigran Nersisyan's () Borodino Group for failure to repay a 5.8 billion rubles loan. Other work Galmond has also worked as a lawyer for companies associated with Jón Ásgeir Jóhannesson's Icelandic conglomerate Baugur Group. In June 1993, Björgólfur Guðmundsson, Björgólfur Thor Björgólfsson and Magnús Þorsteinsson were among Galmond's first clients when Galmond was their attorney beginning with the establishment of their bottling company Baltic Bottling Plant in Saint Petersburg which was sold to Pepsi for 4 billion DKK in 1997. In April 2012 the Prosecutor in the German city of Frankfurt withdrew charges against Galmond and four former employees of Commerzbank AG of money laundering. The investigations of the German prosecutor had lasted for 7 years. Danish tabloid newspaper BT, on its front page of 24 December 2012, claimed that Galmond had committed tax evasion and fraud with the IPOC shares. On 15 January 2014, as a result of a libel case instigated by Galmond against the tabloid BT, BT publicly withdrew its accusations. As a result of a plea-bargain, BT paid compensation of DKK 100,000 to Galmond and the cost of the libel case. Galmond today lives in Switzerland. He had sold all of the assets in IPOC International Growth Fund after its liquidation in 2008. Controversy On 15 December 2011, the Frankfurt am Main prosecutor's office and German criminal authorities named Leonid Reiman as a suspect in a 1990s money laundering scheme involving Commerzbank, his longtime attorney Jeffrey Galmond, and four employees of Commerzbank. The case had begun as an investigation into the looting of Russia during the 1990s. In the first half of 1996, Reiman, Galmond, and Michael Boehmke, which both Galmond and Boehmke are attorneys with the Hamburg based firm Bollmann, Kisselbach & Partners, created agreements with Commerzbank. Galmond was the owner of First National Holding (FNH), a Luxembourg based firm, and Telecominvest holding () had accounts at Commerzbank and both companies had secret trust agreements with Reiman as Commerzbank acted as the owner of FNH until 2002. FNH was formed on 11 May 1995 and was previously known as the Selz & Turban Holding SA, which was headed by a Luxembourg attorney and was owned by two shell companies located in Panama. In 2008, The Frankfurt court determined that Reiman was the beneficiary of Danco Finans which Galmond claimed ownership and through which trust agreements were held by Commerzbank. Notes References Books External links J. P. Galmond & Co Official IPOC site RICO suit – Alfa Group Accused of Bribing to Buy MegaFon 13 June 2006 Dane battles for Russian mobile company at The Copenhagen post online Russia at Heart of German Probe – Moscow Times 26 July 2005 European Commission to investigate TeliaSonera deals in Russia – Helsingin Sanomat 28 March 2006 Royal Gazette: Cox moves to wind up IPOC Danish financial newspaper, Børsen, on allegations of money laundering 7 February 2007 Danish tabloid newspaper, Ekstrabladet, on the connections between Baugur and Galmond 29 October 2006 29 August 2008 [2] http://en.rian.ru/crime/20120406/172657260.html Danish businesspeople Danish jurists Year of birth missing (living people) Living people
Aberdeen F.C. competed in the Scottish Football League Division Two and the Scottish Cup in season 1904–05. Overview Season 1904–05 was Aberdeen's second season and their first in Scottish League football. They failed to gain election to Division One in 1904, but successfully applied to join Division Two. The team abandoned their white jerseys for a new black and gold strip this season. The Pittodrie attendance record was broken in January when 16,000 spectators watched as Glasgow club Queen's Park visited Aberdeen in the Scottish Cup. In the league, Aberdeen finished seventh out of twelve clubs. In the cup, they won through to round three after wins over Queen's Park and Bathgate, but lost to Third Lanark at Cathkin Park. Tom Ruddiman finished as the club's top scorer with ten goals from 15 appearances. Results Scottish Division Two Final standings Scottish Cup Squad Appearances & Goals |} References Aberdeen F.C. seasons Aberdeen
The 2014 Chicago Marathon was the 37th edition of the Chicago Marathon, held in Chicago, Illinois, on Sunday, October 12. Eliud Kipchoge won the men's race in a time of 2:04:11 hours, with a winning margin of seventeen seconds. Mare Dibaba won the women's division, with a winning margin of twenty seconds. The original winner, Rita Jeptoo, was disqualified after a failed drug test. Results Men Women Other notable finishers Lisa Uhl: 18th Wheelchair men Wheelchair women References Results Chicago Marathon 2014 Leaderboard. Chicago Marathon. Retrieved on 2014-12-27. Results. Association of Road Racing Statisticians. Retrieved 2020-04-07. Chicago Marathon 2010s in Chicago 2014 in Illinois Chicago Marathon Chicago Chicago Marathon Chicago Marathon
GNU is a Unix-like computer operating system developed by the GNU Project. GNU or gnu may also refer to: Science and technology Gnu, or wildebeests, a genus of antelopes GNU Project, a free software, mass collaboration project 9965 GNU, an asteroid Organisations government of national unity, a coalition government during a national emergency Government of National Unity (Libya), a transitional unitary government during 2021 Government of National Unity (South Africa), a constitutional arrangement Grand National Union of Kenya, a Kenyan political party Great Northern Union, a US men's barbershop chorus Gyeongsang National University, a university in South Korea Other uses Gnau language, by ISO 639-3 language code Gnu Snowboards, produced by Mervin Manufacturing in the US Goodnews Airport, Alaska, US, by IATA and FAA LID codes Sopwith Gnu, a 1910s British touring biplane "The Gnu", a song by Flanders and Swann A fairy chess piece used in Wildebeest chess The Gnus, an upper-school student newspaper of Sandy Spring Friends School The Gnu Theatre, a Los Angeles theatre designed and built by Jeff Seymour The Gnu, a pub in North Newbald, England Gary Gnu, fictional character in The Great Space Coaster See also Gnu goat, or Takin, a goat-antelope found in the eastern Himalayas Gnu High, an album by Canadian musician Kenny Wheeler GNU license (disambiguation)
```java /* * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ package org.apache.shardingsphere.sqltranslator.distsql.parser.core; import org.antlr.v4.runtime.tree.ParseTree; import org.apache.shardingsphere.distsql.parser.autogen.SQLTranslatorDistSQLStatementBaseVisitor; import org.apache.shardingsphere.distsql.parser.autogen.SQLTranslatorDistSQLStatementParser.AlgorithmDefinitionContext; import org.apache.shardingsphere.distsql.parser.autogen.SQLTranslatorDistSQLStatementParser.AlterSQLTranslatorRuleContext; import org.apache.shardingsphere.distsql.parser.autogen.SQLTranslatorDistSQLStatementParser.PropertiesDefinitionContext; import org.apache.shardingsphere.distsql.parser.autogen.SQLTranslatorDistSQLStatementParser.PropertyContext; import org.apache.shardingsphere.distsql.parser.autogen.SQLTranslatorDistSQLStatementParser.ShowSQLTranslatorRuleContext; import org.apache.shardingsphere.distsql.parser.autogen.SQLTranslatorDistSQLStatementParser.UseOriginalSQLDefinitionContext; import org.apache.shardingsphere.distsql.segment.AlgorithmSegment; import org.apache.shardingsphere.sql.parser.api.ASTNode; import org.apache.shardingsphere.sql.parser.api.visitor.SQLVisitor; import org.apache.shardingsphere.sql.parser.statement.core.value.identifier.IdentifierValue; import org.apache.shardingsphere.sqltranslator.distsql.statement.queryable.ShowSQLTranslatorRuleStatement; import org.apache.shardingsphere.sqltranslator.distsql.statement.updateable.AlterSQLTranslatorRuleStatement; import java.util.Properties; /** * SQL statement visitor for SQL translator DistSQL. */ public final class SQLTranslatorDistSQLStatementVisitor extends SQLTranslatorDistSQLStatementBaseVisitor<ASTNode> implements SQLVisitor<ASTNode> { @Override public ASTNode visitShowSQLTranslatorRule(final ShowSQLTranslatorRuleContext ctx) { return new ShowSQLTranslatorRuleStatement(); } @Override public ASTNode visitAlterSQLTranslatorRule(final AlterSQLTranslatorRuleContext ctx) { return new AlterSQLTranslatorRuleStatement((AlgorithmSegment) visit(ctx.sqlTranslatorRuleDefinition().algorithmDefinition()), isUseOriginalSQLWhenTranslatingFailed(ctx.sqlTranslatorRuleDefinition().useOriginalSQLDefinition())); } @Override public ASTNode visitAlgorithmDefinition(final AlgorithmDefinitionContext ctx) { return new AlgorithmSegment(getIdentifierValue(ctx.algorithmTypeName()), getProperties(ctx.propertiesDefinition())); } private Properties getProperties(final PropertiesDefinitionContext ctx) { Properties result = new Properties(); if (null == ctx || null == ctx.properties()) { return result; } for (PropertyContext each : ctx.properties().property()) { result.setProperty(IdentifierValue.getQuotedContent(each.key.getText()), IdentifierValue.getQuotedContent(each.value.getText())); } return result; } private Boolean isUseOriginalSQLWhenTranslatingFailed(final UseOriginalSQLDefinitionContext ctx) { return null == ctx ? null : Boolean.valueOf(getIdentifierValue(ctx.useOriginalSQL())); } private String getIdentifierValue(final ParseTree context) { return null == context ? null : new IdentifierValue(context.getText()).getValue(); } } ```
Transport for Brisbane, previously called Brisbane Transport, is an organisational division of the Brisbane City Council, responsible through its related Council Committee for providing policy and advice to Brisbane City Council, and for delivering various public transport services across the City of Brisbane. The division does this as part of an agreement with Translink, an agency of the Department of Transport and Main Roads that operates public transport across South East Queensland. History The origins of Transport for Brisbane (formerly, Brisbane Transport) can be traced to August 1885 where the Metropolitan Tramways & Investment Company established a service in Brisbane under franchise from the Queensland Government with 18 horse trams. The tram system remained in private hands until January 1923 when the Queensland government established the Brisbane Tramways Trust, compulsorily acquiring the tram network and supporting infrastructure, then in 1925 creating the Brisbane City Council and transferring responsibility for the tram network to the council. Before the council withdrew support in 1961, the council supported the tram network by expanding it to a peak of with over 400 trams. Bus services commenced in 1925 by the Brisbane City Council. Brisbane City Council shut down bus services due to financial loss in November 1927. Bus services recommenced 13 years later, in July 1940 with 12 Albion Valkyries. In 1948 the Brisbane City Council acquired 20 operators with 67 buses. The first Rocket services began on the morning of 18 April 1977 between Garden City and the Brisbane CBD. These services were based on the idea that bus travel time could be reduced to less than the travel time by car by the removal of most embarkation stops. In the 1990s, Brisbane City Council corporatised its transport services to form Brisbane Transport, a council-owned commercial businesses managed at arm's length from the council and providing consultancy services back to it. Infrastructure Transport for Brisbane operates services along dedicated busway infrastructure to avoid peak hour traffic congestion on roads closest to the Brisbane CBD. Services BUZ (bus upgrade zone) Bus upgrade zones (BUZ) are high-frequency bus routes mostly running direct to the Cultural Centre. All BUZ services run at least every fifteen minutes from around 06:00 to 23:00 seven days a week and at least every ten minutes during peak hours from Monday to Friday. Except for the 199 BUZ, all other BUZ services operate on a limited stop basis (express service). CityGlider CityGlider is a high frequency bus service around the Brisbane CBD, operating every five minutes during peak and every 10 to 15 minutes during off-peak. The service is pre-paid, meaning you can't buy any tickets on the bus, you must have already purchased a ticket, or have a go card to pay for your fare. This is the first service in Brisbane to operate 24 hours on Friday and Saturday and 18 hours every other day. Bus stops serviced by the CityGlider are identified with signs and painted kerb. City Centre Free Loops The free City Loop, Spring Hill Loop and South Brisbane Loop bus services provide high frequency public transport access within the Brisbane Central Business District (CBD), at no cost to riders. Services also run between the CBD and Spring Hill areas and through South Brisbane and West End. The City Loop operates in a clockwise (route 40) and anti-clockwise (route 50) direction. The City Loop uses distinctive purple buses and stop at the purple signposted bus stops. The South Brisbane bus loop travels in an anti-clockwise direction along Grey Street, Montague Road, Vulture Street and Tribune Street. The bus stops were re-branded to a distinctive green and white stripe pattern. The Spring Hill Loop service (route 30) between Brisbane City and Spring Hill runs on a continuous loop between the CBD and Spring Hill precincts. Distinctive yellow buses stop at the yellow signposted bus stops. Rocket Rocket is a peak hour service operating in the direction of peak (towards the city in the mornings, and away from the city in the evenings), with limited stops. You can identify the stops for the Rocket service by the smaller "Rocket" sign shown under the standard bus stop sign. Clem7 Clem7 (Route 77) is a bus route using the Clem Jones Tunnel (Clem7) which links the suburbs of Eight Mile Plains and Chermside. It runs every 15 minutes at peak times and 30 minutes off-peak, Monday to Friday. The route commenced on 22 March 2010 at a cost of $1.6 million per annum. It has decreased the journey time between Eight Mile Plains and Chermside, removing the need to transfer at Cultural Centre. The route completes the cross-city journey in 39 minutes instead of up to 55 minutes via the Brisbane CBD. Fleet Rigid buses MAN 18.310s, Volvo B7RLEs and later Volvo B8RLEs make up the majority part of the rigid bus fleet of Brisbane Transport. A total of 390 18.310s joined the Brisbane Transport fleet from 2005 to 2010, with 324 fitted with CNG (Compressed Natural Gas) engines (Fleet numbers 1200 to 1523) and 66 powered by diesel (Fleet numbers 1001 to 1066). Buses 1001 to 1015 were on loan to South West Transit, 1019 to 1029 were on loan to Hornibrook Bus Lines services since 2012, and returned to Brisbane Transport in July 2021. CNG powered buses are starting to pull off from service starting from 2019. The rest of the regular rigid fleet are all Volvos, including 553 diesel-powered B7RLEs (delivered from 2009 to 2018, fleet numbers 1801 to 2353, two withdrawn from service due to accidents in 2017 and 2020). 139 Volvo B8RLEs (delivered from 2017 to 2021, numbers 2801 to 2939) and one Volvo B5RLEH Hybrid demonstrator bus (introduced in 2015, fleet number 1595), all low-floor, accessible and air-conditioned. In October 2020, the last Scania L94UB, the first CNG and low floor bus was retired after 20 years of service. In total 217 were made with two lost due to accidents in 2003 and in 2009 when the bus exploded due to a problem with the CNG engine. This has led the Brisbane City Council to retire all gas powered buses by 2027. Four Yutong E12 battery electric buses will operate on trial with Brisbane Transport, starting from June 2021 on the City Loop free services. The supply of Volvo buses from Volgren came to an end in June 2021, where this contract started in 2009 across a 12-year period, with the first delivery of a Volvo B7RLE (fleet number 1801); while the final bus in the contract is a Volvo B8RLE (fleet number 2939) which is the 882nd bus built. In 2020, one third of buses were powered by natural gas. By 2027 all gas powered buses will be phased out. Tag axle buses BT operates two models of tag axle buses, 8 Scania K310UB (delivered in early 2009, fleet numbers 1701 to 1708 and later renumbered as 5001 to 5008) and 149 Volvo B12BLE (delivered from 2010 to 2013, fleet numbers 5009 to 5157), both diesel-powered and delivered from 2009 on. These larger buses are used on high-demand trunk routes, mostly on the South East Busway. Articulated buses Articulated buses currently used by Transport for Brisbane are 30 CNG-powered MAN NG313s (Fleet numbers 1601 to 1630), delivered from 2007 to 2008 and 20 diesel-powered Volvo B8RLEAs (Fleet numbers 1631 to 1650), delivered in 2018. A further batch of 20 B8RLEAs (Fleet numbers 1651 to 1670) has started to deliver in early 2020, 1651 and 1652 entered service in April 2020; while 1653, 1662 to 1670 entered service in March 2021. Since 12 July 2021, 1653 and the remaining 8 new artics (Fleet numbers 1654 to 1661) joined the Blue CityGlider Route 60 fleet to replace the rigid B8RLEs (Fleet numbers 2820 to 2838), while 1662 to 1670 joined the CityGlider fleet progressively to replace all the rigid B8RLEs in late 2021. Historic Until the mid-1970s, heavy-duty AEC and Leyland buses were purchased. Later purchases were from European suppliers, Volvo B59s being purchased from 1976, MAN SL200s in 1982 and Volvo B10Ms from 1987. Depots Transport for Brisbane operates its services from seven depots for specified areas. Some of these depots service routes shared in overlapping areas with other depots. Generally, each of Transport for Brisbane's buses is allocated to a particular depot, displaying a letter prefix for that depot before its fleet number, and hence is assigned to specific routes. Former depots Accidents and incidents On 28 October 2016, a Volvo B7RLE, S1980, was set alight by 48 year old Anthony O'Donohue. The driver, 29 year old Manmeet Sharma, was killed in his seat while all of the passengers were safely evacuated with some receiving minor injuries. Mr. O'Donohue was found to be suffering from mental health problems and was charged with the murder of the driver and multiple counts of attempted murder. Following the fire, the bus was destroyed and the fleet number '1980' was permanently retired from the company. All buses manufactured after 2005 were to receive a physical barrier for the driver and all buses in the fleet were to receive more CCTV cameras and better signage to help with evacuation process on any of the companies buses. See also Bus transport in Queensland Transport in Brisbane References External links Brisbane City Council Translink timetables Showbus gallery Bus companies of Queensland Public transport in Brisbane Translink (Queensland) 1925 establishments in Australia
The women's 100 metre backstroke event at the 2018 Asian Games took place on 22 August at the Gelora Bung Karno Aquatic Stadium. Schedule All times are Western Indonesia Time (UTC+07:00) Records Results Heats Final References Swimming at the 2018 Asian Games
```java /* * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ package org.apache.rocketmq.common.constant; public class PermName { public static final int PERM_PRIORITY = 0x1 << 3; public static final int PERM_READ = 0x1 << 2; public static final int PERM_WRITE = 0x1 << 1; public static final int PERM_INHERIT = 0x1 << 0; public static String perm2String(final int perm) { final StringBuffer sb = new StringBuffer("---"); if (isReadable(perm)) { sb.replace(0, 1, "R"); } if (isWriteable(perm)) { sb.replace(1, 2, "W"); } if (isInherited(perm)) { sb.replace(2, 3, "X"); } return sb.toString(); } public static boolean isReadable(final int perm) { return (perm & PERM_READ) == PERM_READ; } public static boolean isWriteable(final int perm) { return (perm & PERM_WRITE) == PERM_WRITE; } public static boolean isInherited(final int perm) { return (perm & PERM_INHERIT) == PERM_INHERIT; } } ```
```javascript OC.L10N.register( "comments", { "Comments" : "", "You commented" : " ", "{author} commented" : "{author} (-)", "You commented on %1$s" : " %1$s", "You commented on {file}" : " {file}", "%1$s commented on %2$s" : "%1$s %2$s", "{author} commented on {file}" : "{author} (-) {file}", "<strong>Comments</strong> for files" : "' <strong></strong> ", "Files" : "", "You were mentioned on \"{file}\", in a comment by an account that has since been deleted" : " \"{file}\" , , ", "{user} mentioned you in a comment on \"{file}\"" : "{user} \"{file}\"", "Files app plugin to add comments to files" : " \"\" ", "Edit comment" : " ", "Delete comment" : " ", "Cancel edit" : " ", "New comment" : " ", "Write a comment " : " ...", "Post comment" : " ", "@ for mentions, : for emoji, / for smart picker" : "@ , : , / ", "Could not reload comments" : " ", "No comments yet, start the conversation!" : " ", "No more messages" : " ", "Retry" : " ", "Failed to mark comments as read" : " ", "Unable to load the comments list" : " ", "_1 new comment_::_{unread} new comments_" : ["{unread} ","{unread} ","{unread} ","{unread} "], "Comment" : "", "An error occurred while trying to edit the comment" : " ", "Comment deleted" : " ", "An error occurred while trying to delete the comment" : " ", "An error occurred while trying to create the comment" : " ", "You were mentioned on \"{file}\", in a comment by a user that has since been deleted" : " \"{file}\" , " }, "nplurals=4; plural=(n % 1 == 0 && n % 10 == 1 && n % 100 != 11 ? 0 : n % 1 == 0 && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14) ? 1 : n % 1 == 0 && (n % 10 ==0 || (n % 10 >=5 && n % 10 <=9) || (n % 100 >=11 && n % 100 <=14 )) ? 2: 3);"); ```
The Caprice was a 19th-century Sandy Hook pilot boat built in 1871 by Brown & Lovell in East Boston, Massachusetts for Peter McEnany and other New York pilots. In 1876, she was run down and sank, off Bay Ridge, Brooklyn, by the steamship New Orleans. She was raised and was one of the pilot boats that survived the Great Blizzard of 1888. The Caprice was last reported sailing off the coast of New York in 1891. Construction and service The pilot boat Caprice was built in 1871 by Brown & Lovell shipyard at East Boston, Massachusetts, originally as a Boston schooner yacht. She was later made into a New York pilot boat in 1877 for Pilot McEnany and other New York Sandy Hook pilots. The Caprice was launched on April 10, 1871, as a clipper yacht from the shipyard of Brown & Lovell, at East Boston. She was registered with the Record of American and Foreign Shipping from 1874 to 1885. From 1874 to 1875, the ship master was George H. Sisco; her owners were Eugene Sullivan and Peter McEnry; and she belonged to the Port of New York. From 1876 to 1885 the ship master changed to pilot E. H. Sullivan and her owner changed to the New York Pilots. On February 28, 1876, the pilot boat Caprice, No. 15 was run down and sank, off Bay Ridge, Brooklyn, by the Cromwell line steamship New Orleans. The crew were able to escape onto the New Orleans, and there were no deaths. Captain Derborn, the captain of the New Orleans provided his account of the collision. The Caprice was later raised and towed to the city to be refurbished and put back to service. On February 3, 1878, the pilot boat Caprice, No. 15 was in heavy icy storm off Barnegat Light and was completely wrecked. Seaman Charles Walburg of the Caprice was washed overboard and drowned. Six of the other crew were taken safely off the pilot boat by a passing bark and returned to the city. In 1881, two gentlemen, Mr. Burns and Mr. Benjamin, were invited to take a voyage, for a week, on the working pilot schooner Caprice. The story A Cruise In A Pilot-Boat was published in The Century Magazine in the November 1881 – April 1882 edition. From the article and references to ship's logs, we learn that the Caprice went past Castle Garden, out to Barnegat light, by the Little Egg Harbor, and up the coast to Sandy Hook. They continued to Nantucket Lightship where they described having spotted a steamer and a race to board it. They took out a yawl with two seamen and a pilot, and reached the leeward side of the steamer. The pilot then climbed up the ladder to board the ship. The story ends with the pilot boat going through The Narrows back into port. In the Blizzard of 1888 Pilot Sullivan was in the Caprice when the blizzard struck. The boat was fifteen miles south of the Sandy Hook Lightship and was driven seventy-five miles south. The Caprice weathered out the blizzard and was only slightly damaged as her steering gear was disabled. On July 16, 1889, the pilot boat Caprice and pilot John Phalan, reported seeing Peter C. Campbell's airship at Williamsburg, Brooklyn. He was seventy-four miles south of Montauk Point, when Phalan saw a big yellow, oval-shaped balloon dragging in the ocean. The balloon then separated from the airship and flew up into the air. Professor Edward D. Hogan was believed to be lost at sea. On February 8, 1890, during a dense fog, the pilot boat Caprice, No. 15, on station duty, when she struck the shoal at the end of the West Bank Light in the Lower New York Bay and then sank. The pilot and crew escaped in life boats and went to Staten Island. A wrecking company was able to raise the boat and tow it to back to Brooklyn. The last report of the pilot boat Caprice was on June 9, 1891, when she was struck by a large whale off the coast of New York. Pilots Cameron and J. J. Kelly of the Caprice were awaken when they heard a thump and discovered that a whale had struck their boat. The whale followed them for a while as they sailed away but soon tired as he was badly hurt. See also Pilot boat List of Northeastern U. S. Pilot Boats References Schooners of the United States Service vessels of the United States 1871 ships Pilot boats Ships built in Boston Maritime incidents in February 1876 Blizzards in the United States
```javascript /** @author Ian Hofmann-Hicks (evil) */ const curry = require('../core/curry') // Constant (Kestrel) /** constant :: a -> b -> a */ const constant = x => () => x module.exports = curry(constant) ```
Lumber is processed wood in North American English, corresponding to timber in the rest of the English speaking world. Lumber may also refer to: Lumber room, a room to store currently un-needed furniture Places Norway Lumber (Kristiansand), a neighbourhood in the city of Kristiansand United States Lumber, Arkansas, an unincorporated community in Arkansas Lumber City, Georgia, a city in Telfair County, Georgia Lumber, West Virginia, an unincorporated community in West Virginia Lumber River, a river in North Carolina Lumber Bridge, North Carolina, a town in Robeson County, North Carolina Lumber Township, Cameron County, Pennsylvania, a township in Pennsylvania See also Lumber City (disambiguation)