Calendar not showing selected date

I needed a calendar and went to shadcn to get the foundation to my implementation. Then I couldn't make it show the selected date. There's no error in console, nothing. It just doesn't show the selection. I then created a new project without anything but the calendar and the problem stayed the same. I was expecting that, when the page was loaded, the current date to be selected and also when I click on a day, the component then shows it selected. But this is not happening. Can somebody give me a north on this?
I followed the steps:
npx create-next-app@latest
npx shadcn-ui@latest init
then added the components
npx shadcn-ui@latest add calendar
npx shadcn-ui@latest add popover

this is the package.json
{
  "name": "shadtest",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "next lint"
  },
  "dependencies": {
    "@radix-ui/react-popover": "^1.0.7",
    "@radix-ui/react-slot": "^1.0.2",
    "class-variance-authority": "^0.7.0",
    "clsx": "^2.0.0",
    "date-fns": "^2.30.0",
    "lucide-react": "^0.294.0",
    "next": "14.0.3",
    "react": "^18",
    "react-day-picker": "^8.9.1",
    "react-dom": "^18",
    "tailwind-merge": "^2.1.0",
    "tailwindcss-animate": "^1.0.7"
  },
  "devDependencies": {
    "@types/node": "^20",
    "@types/react": "^18",
    "@types/react-dom": "^18",
    "autoprefixer": "^10.0.1",
    "postcss": "^8",
    "tailwindcss": "^3.3.0",
    "typescript": "^5"
  }
}

this is the component.json
{
  "$schema": "https://ui.shadcn.com/schema.json",
  "style": "default",
  "rsc": true,
  "tsx": true,
  "tailwind": {
    "config": "tailwind.config.ts",
    "css": "src/app/global.css",
    "baseColor": "slate",
    "cssVariables": true
  },
  "aliases": {
    "components": "@/components",
    "utils": "@/lib/utils"
  }
}

this is the page.tsx
import { CalendarDemo } from "./CalendarDemo";
import { DatePickerDemo } from "./DatePickerDemo";

export default function Home() {
  return (

      <CalendarDemo />
      <DatePickerDemo />

  );
}

this are the components CalendarDemo and DatePickerDemo
"use client";

import { Calendar } from "@/components/ui/calendar";
import { useState } from "react";

export function CalendarDemo() {
  const [date, setDate] = useState<Date | undefined>(new Date());

  return (
    <Calendar
      mode="single"
      selected={date}
      onSelect={setDate}
      className="rounded-md border"
      initialFocus
    />
  );
}

"use client";

import * as React from "react";
import { format } from "date-fns";
import { Calendar as CalendarIcon } from "lucide-react";

import { cn } from "@/lib/utils";
import { Button } from "@/components/ui/button";
import { Calendar } from "@/components/ui/calendar";
import {
  Popover,
  PopoverContent,
  PopoverTrigger,
} from "@/components/ui/popover";

export function DatePickerDemo() {
  const [date, setDate] = React.useState<Date>();

  return (
    <Popover>
      <PopoverTrigger asChild>
        <Button
          variant={"outline"}
          className={cn(
            "w-[280px] justify-start text-left font-normal",
            !date && "text-muted-foreground"
          )}
        >
          <CalendarIcon className="mr-2 h-4 w-4" />
          {date ? format(date, "PPP") : Pick a date}
        </Button>
      </PopoverTrigger>
      <PopoverContent className="w-auto p-0">
        <Calendar
          mode="single"
          selected={date}
          onSelect={setDate}
          initialFocus
        />
      </PopoverContent>
    </Popover>
  );
}

Hello, I'm sorry. Since I was (am) against the clock I just gave up from shadcn calendar and implemented my own. By your message, I understood that in your environment this is not happening. Well, the console log was showing normal behavior. The first render was having the date set already for the current one, if I click over the curent date in calendar, the date state goes to undefined and if I click back or in another date, it sets up again. But this is what I see at that moment of creation of this issue. Sadly I didn't have the green project nor the shadcn calendar implementation of my actual app anymore to show you the results, but this above was what I saw. The component was working almost 100%. Only the selection, hover styles were off.
Thank you for your answer, but I'm not using shadcn calendar anymore.

Hello, I'm sorry. Since I was (am) against the clock I just gave up from shadcn calendar and implemented my own. By your message, I understood that in your environment this is not happening. Well, the console log was showing normal behavior. The first render was having the date set already for the current one, if I click over the curent date in calendar, the date state goes to undefined and if I click back or in another date, it sets up again. But this is what I see at that moment of creation of this issue. Sadly I didn't have the green project nor the shadcn calendar implementation of my actual app anymore to show you the results, but this above was what I saw. The component was working almost 100%. Only the selection, hover styles were off.
Thank you for your answer, but I'm not using shadcn calendar anymore.

I'm delighted to hear that you've crafted a setup tailored to your requirements! As mentioned, the issue likely revolved around a style not reaching the intended location. Nevertheless, that's inconsequential now. I hope the calendar you've transitioned to brings you satisfaction, and I wish you success in your endeavors!

Hi guys, just a heads up here.
I took some time to really investigate why shadcn was not working only for me and I found out that it was because I had 2 global.css, in fact, one (the imported one in the project) was globals.css, while the one from shadcn is only global.css. After placing the content inside globals.css, the UI started to look like in the documentation.
Sorry for the false issue. Thank you all for your hard work on this awesome library.
Cheers.

This issue has been automatically closed because it received no activity for a while. If you think it was closed by accident, please leave a comment. Thank you.

Still seeing this issue in projects

I found a solution, changed defaultMonth as a prop and added some conditions inside Dropdown component
Probably its a some bug that dropdown gives default values
`"use client";
import * as React from "react";
import { buttonVariants } from "@/components/ui/button";
import { ScrollArea } from "@/components/ui/scroll-area";
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from "@/components/ui/select";
import { cn } from "@/lib/utils";
import { ChevronLeft, ChevronRight } from "lucide-react";
import { DayPicker } from "react-day-picker";
import { ru } from "date-fns/locale";
function Calendar({
className,
classNames,
showOutsideDays = true,
...props
}) {
return (
<DayPicker
showOutsideDays={showOutsideDays}
locale={ru}
className={cn("p-3", className)}
captionLayout="dropdown"
classNames={{
months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
month: "space-y-4",
vhidden: "vhidden hidden",
caption: "flex justify-center pt-1 relative items-center",
caption_label: "text-sm font-medium",
caption_dropdowns: cn(
"flex justify-between gap-1 w-full",
),
nav: "space-x-1 flex items-center",
nav_button: cn(
buttonVariants({ variant: "outline" }),
"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"
),
nav_button_previous: "absolute left-1",
nav_button_next: "absolute right-1",
table: "w-full border-collapse space-y-1",
head_row: "flex",
head_cell:
"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",
row: "flex w-full mt-2",
cell: "text-center text-sm p-0 relative [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",
day: cn(
buttonVariants({ variant: "ghost" }),
"h-9 w-9 p-0 font-normal aria-selected:opacity-100"
),
day_selected:
"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",
day_today: "bg-accent text-accent-foreground",
day_outside: "text-muted-foreground opacity-50",
day_disabled: "text-muted-foreground opacity-50",
day_range_middle:
"aria-selected:bg-accent aria-selected:text-accent-foreground",
day_hidden: "invisible",
...classNames,
}}
defaultMonth={props.selected}
components={{
Dropdown: ({ onChange, children, ...rest }) => {
const options = React.Children.toArray(children);
let value;
if(rest.name === "months") {
value = props.selected?.getMonth();
}else{
value = props.selected?.getFullYear();
}
      const selected = options.find((child) => child.props.value === value);

      const handleChange = (value) => {
        const changeEvent = {target: { value }};
        onChange?.(changeEvent);
      };

      return (
        <Select
          value={value?.toString()}
          onValueChange={(value) => {
            handleChange(value);
          }}
        >
          <SelectTrigger className="pr-1.5 focus:ring-0">
            <SelectValue>{selected?.props?.children}</SelectValue>
          </SelectTrigger>
          <SelectContent position="popper">
            <ScrollArea className="h-80">
              {options.map((option, id) => (
                <SelectItem
                  key={`${option.props.value}-${id}`}
                  value={option.props.value?.toString() ?? ""}
                >
                  {option.props.children}
                </SelectItem>
              ))}
            </ScrollArea>
          </SelectContent>
        </Select>
      );
    },
    IconLeft: ({ ...props }) => <ChevronLeft className="h-4 w-4" />,
    IconRight: ({ ...props }) => <ChevronRight className="h-4 w-4" />,
  }}
  {...props}
/>

);
}
Calendar.displayName = "Calendar";
export { Calendar };`

I’m experiencing the same issue, and I suspect it might be related to the CSS.
My implementation
export function CalendarDemo() {
  const [date, setDate] = React.useState<Date | undefined>(new Date());

  return (
    <Calendar
      mode="single"
      selected={date}
      onSelect={setDate}
      className="rounded-md border"
      today={new Date()}
      defaultMonth={new Date()}
    />
  );
}

Using Chrome DevTools, I compared the CSS of some dates and noticed some differences.
These are the classes applied to the “today” date element: rdp-button_reset rdp-button inline-flex items-center justify-center border rounded-md text-sm leading-6 transition-colors !outline-none !ring-transparent disabled:pointer-events-none disabled:opacity-30 bg-transparent text-white hover:bg-[#393A3B] border-transparent hover:text-secondary-foreground focus-visible:text-secondary-foreground active:bg-[#393A3B] shadow-none active:shadow-[inset_0px_4px_4px_0px_#0000004D] h-9 w-9 p-0 font-normal aria-selected:opacity-100 bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground bg-accent text-accent-foreground
The key issue here is that bg-transparent is applied first, followed by bg-primary, causing Chrome to ignore bg-primary.

@AlexanderArmua, mine was CSS. I created my project with Next.js scaffold command script (create-next-blabla), this added the globals.css to the project. But when you add shadcn to the project, a global.css file is created. As my project was importing just the first one, then the shadcn css was not being rendered. After moving the content of the second file to the first one and deleting the second one, everything worked. But by that time I had already implemented my own calendar. Which was really beautiful, by the way =D


Tensor allocation insanely slow for "from_array(Array)".

Hello,
It seems to me that this library's tensor allocation performance is not good at all. See the following code:
    [MethodImpl(MethodImplOptions.AggressiveOptimization)]
    public static (Tensor, Tensor) Batch(this Board[] boards, float[,] sideToMove, float[,] notSideToMove, int batchSize)
    {
        Stopwatch stopwatch = Stopwatch.StartNew();
        for (int i = 0; i < batchSize; i++) {
            FillArrayFromBoard(boards[i], sideToMove, notSideToMove, i);
        }
        stopwatch.Stop();
        LastElapsedMs = (int)stopwatch.ElapsedMilliseconds;

        return (from_array(sideToMove, dtype:float32), from_array(notSideToMove, dtype:float32));
    }

When using arrays of size [100000, 768] for both sideToMove and notSideToMove, LastElapsedMs = 201ms on a run. However, the whole method takes 6570ms. That means the tensor allocation alone is taking > 6000ms even accounting for the time Stopwatch.StartNew() and Stopwatch.Stop() take.
To test it, you can just do from_array() 2x on a [100000, 768] array. Is there a faster way to do this? Because otherwise, it slows down performance quite a lot.
I'm using TorchSharp-cuda-windows v0.97.0.

I would like to add that I've confirmed the Tensors are being allocated on the CPU & not the GPU.

It seems that normal tensor allocation isn't slow.
Stopwatch stopwatch = Stopwatch.StartNew();
Tensor zero = zeros(100000, 768);
stopwatch.Stop();
zero.Dispose();

Console.WriteLine("Allocation took: " + stopwatch.ElapsedMilliseconds + "ms");

The output of this code is:
Allocation took: 103ms

However, the from_array() method is insanely slow.

@TheBlackPlague -- from_array is a very general tensor factory, accepting any number of dimensions. That generality probably has some overhead. Can you try 'tensor(float[,]) instead and see what that does to performance? 'tensor()' is the canonical way to create a tensor from an array, but it only has overloads up to four dimensions. If you need more, we can add...

@TheBlackPlague -- I deleted my first comment after measuring myself. Thanks for reporting this performance issue, which pertains to both from_array() and the more canonical 'tensor()' factories for creating tensors from .NET arrays.
I will investigate.

Will there be a version shipping soon with the fix? Sorry for rushing, but I intended to use this library to train neural networks for my chess engine, StockNemo.

@TheBlackPlague -- that depends on how much time it takes to get a reasonable fix in place. In the meantime, switch to using 'tensor()' instead of 'from_array()' which I think is more general than you need. The fix I have in mind may not apply to from_array().

@TheBlackPlague -- that depends on how much time it takes to get a reasonable fix in place. In the meantime, switch to using 'tensor()' instead of 'from_array()' which I think is more general than you need. The fix I have in mind may not apply to from_array().

Yeah, after making the issue, I learned that tensor() was better since it wasn't for n dimensions. However, the performance of it, like you mentioned, is the exact same. It currently puts it in an unusable state for my case since my project relies on fast tensor creation and then training with it. I understand it's hard to come up with a good fix instantly, so I'm not expecting one within 24 hours, but I would love it if you could keep me updated.
If there's anything necessary or that might be helpful from my end, please feel free to reach out.

It looks like the fix is going to work, and will be several orders of magnitude faster. I can make a release later this week after more testing.

@TheBlackPlague -- I have a PR for this bug. Maybe you can help code review?
https://github.com/dotnet/TorchSharp/pull/671

Thank you for working hard on this. I appreciate it. I've submitted some comments and suggestions, both for stack allocations & overall improvement of testing, etc.
Thank you for requesting my input.

By the way, from_array() will be just as fast as tensor() except for complex numbers which will retain the copy for now.

By the way, from_array() will be just as fast as tensor() except for complex numbers which will retain the copy for now.

Yep, I saw. That's great to hear. :)

@TheBlackPlague -- thanks for reviewing. If you want, it would be great if you could introduce yourself to the community around TorchSharp here: https://github.com/dotnet/TorchSharp/discussions/333
Not required, by any means, but appreciated. It's great to know the people who are working on the code, whether putting in PRs or reviewing them.

@TheBlackPlague -- 0.97.1 has been released to NuGet. Please validate that it addresses your performance issue.

@TheBlackPlague -- 0.97.1 has been released to NuGet. Please validate that it addresses your performance issue.

I will try today. Thank you very much.

@TheBlackPlague, @tarekgh:
A follow-up on this bug. According to Pytorch docs, torch.tensor() is supposed to make a copy of the input, which the current implementation doesn't do. There are others, like as_tensor() and frombuffer() which share the buffer, but tensor() is not supposed to.
I have an implementation of frombuffer(), which allocates a [100000,768] tensor in 5 μs, while a proper tensor() call cloning the array will take 190 ms, i.e. a 40,000x difference.
In order to comply with Pytorch, I will have to change the implementation of tensor() back and recommend using frombuffer() when speed is essential, with the caveat that the resulting tensor shares its buffer with the source.

That's understandable. Of course complying with Pytorch documentation is necessary.

@NiklasGustafsson should we have option to allow full cloning and not sharing the buffer? like torch.tensor(fullCloning = false).

I would think that cloning would be the default, if anything.

@MovGP0 -- FYI, since you introduced from_array()

I was thinking that from_array() will correspond to from_numpy() in Pytorch, with the same non-copying semantics.

In other words, from_array() and frombuffer() would share, tensor() would not. as_tensor would be implemented using from_array()

@tarekgh -- here's something that surprised me:
                var arr1 = new float[100000 * 768];
                System.Collections.Generic.IList<float> arrList = arr1;

                sw.Start();

                for (var i = 0; i < 100; i++) {
                    var a = arrList.ToArray();
                }
                sw.Stop();

                Console.WriteLine($"Total time per call to as_tensor(List<float>): {sw.Elapsed.TotalMilliseconds / 100} ms");

Why doesn't the call to ToArray() take almost 0 time when the object is already an array -- I clock it at 155 ms.

This would be the various ways of creating tensors from arrays, parallel to Pytorch, if from_array() is treated as from_numpy():
// Never copy:
public static Tensor from_array(Array rawArray)

// Copy if necessary:
public static Tensor frombuffer(Array rawArray, ScalarType dtype, long count = -1, long offset = 0, bool requiresGrad = false, Device? device = null)
public static Tensor as_tensor(Array data, ScalarType? dtype = null, Device? device = null)
public static Tensor as_tensor(Tensor data, ScalarType? dtype = null, Device? device = null)

// Alway copy:
public static Tensor tensor(<<VARIOUS>>, torch.Device? device = null, bool requiresGrad = false)

Related discussion

However, the from_array() method is insanely slow.

The generic method uses reflection internally, which forks for almost any Kind of array, but has a performance impact. There are surely ways to optimize the method, but currently the best way is to prefer method overloads for specific types instead of the generic one.

The problem turned out to be that a copy was being made, making the method linear by the size of the array. With this PR, from_array() is constant-time (a few micro-seconds) but shares memory with the original, which was how come I made the overloaded versions of torch.tensor() fast but incorrect.

To summarize, here's what the pytorch docs have to say about copying semantics. Since both frombuffer() and as_tensor() take dtype and/or device arguments, sharing memory is not necessarily possible, since the resulting tensor may end up with a different element type or on a different device.
torch.tensor():
Constructs a tensor with no autograd history (also known as a “leaf tensor”, see Autograd mechanics) by copying data
torch.frombuffer():
The returned tensor and buffer share the same memory. Modifications to the tensor will be reflected in the buffer and vice versa. The returned tensor is not resizable.
torch.as_tensor():
Converts data into a tensor, sharing data and preserving autograd history if possible.
torch.from_numpy():
The returned tensor and ndarray share the same memory.

As measured on my workstation:
Total time per call to as_tensor(float[]): 4.78 µs
Total time per call to frombuffer(): 3.212 µs
Total time per call to from_array(): 4.002 µs
Total time per call to tensor(): 187.8 ms
Total time per call to as_tensor(List<float>): 209.13 ms

@NiklasGustafsson, I wanted to ask, are the recent changes available on NuGet?

No, I haven't made another release yet. Maybe early next week.

@TheBlackPlague -- it is now on NuGet. 0.97.2


fastly: 4.6.1 -> 4.6.2

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/fastly/cli/releases.
meta.description for fastly is: Command line tool for interacting with the Fastly API
meta.homepage for fastly is: https://github.com/fastly/cli
meta.changelog for fastly is: https://github.com/fastly/cli/blob/v4.6.2/CHANGELOG.md
Updates performed

Golang update

To inspect upstream changes
Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
found 4.6.2 with grep in /nix/store/3hgaian26r51xis78fvn15q6qhz16ymb-fastly-4.6.2
found 4.6.2 in filename of file in /nix/store/3hgaian26r51xis78fvn15q6qhz16ymb-fastly-4.6.2

Rebuild report (if merged into master) (click to expand)

1 total rebuild path(s)

1 package rebuild(s)

First fifty rebuilds by attrpath
fastly

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/3hgaian26r51xis78fvn15q6qhz16ymb-fastly-4.6.2 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A fastly https://github.com/r-ryantm/nixpkgs/archive/3bf0de1ee9f850a00945c3b88eb222e9a07677d7.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/3hgaian26r51xis78fvn15q6qhz16ymb-fastly-4.6.2
ls -la /nix/store/3hgaian26r51xis78fvn15q6qhz16ymb-fastly-4.6.2/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package built:

fastly

Maintainer pings
cc @ereslibre @shyim for testing.

Result of nixpkgs-review pr 211318 run on x86_64-linux 1

1 package built:

fastly


The question of FaceNet accuracy in Java

I tested the FaceNet in Android, but the accuracy was not high. I used the face detection algorithm to ask for the Euclidean distance of the detected face to the FaceNet model.I wonder if the accuracy of face detection has been reduced.Here is my code :
protected  float[] getFloatFromBitmap(Bitmap bitmap){

    float[] floatValues = new float[WIDTH*HEIGHT*CHANNEL];
    int [] intValues = new int[WIDTH*HEIGHT];
    bitmap.getPixels(intValues,0,bitmap.getWidth(),0,0,bitmap.getWidth(),bitmap.getHeight());
    for (int i = 0; i < intValues.length; ++i) {

        final int val = intValues[i];
        floatValues[i * 3 + 0] = ((val >> 16) & 0xFF)/255.0f;
        floatValues[i * 3 + 1] = ((val >> 8) & 0xFF)/255.0f ;
        floatValues[i * 3 + 2] = (val & 0xFF)/255.0f;
    }
    return preWhiten(floatValues);
}

Maybe you should consider normalization. Each pixel value should subtract the mean and divided by variance.
Hope that can help you.

Thank you for your advice, but I found that PreWhiten's function seems to be similar to that of standardization.
public float[] preWhiten(float[] s){
    double sum = avgR + avgG;
    sum += avgB;
    int len = s.length;
    double mean = sum/len;
    double temp =  0;
    for(double t : s){

        temp += (t-mean)*(t-mean);
    }
    temp /= len;
    double std =  Math.sqrt(temp);
    double std_adj =  1.0 / (Math.max(std,1.0/Math.sqrt(len)));
    for(int i=0;i<len;i++){

        double tem_s = s[i]-mean;
        s[i] = (float) (tem_s * std_adj);
    }
    return  s;
}


B6 Completion

Full and minified logs are included. Please refer to the attached files.

confirmed:B6

confirmed:B6


www.bootstrap-switch.org

Hey nostalgiaz,
Do you want take over the Domain www.bootstrap-switch.org?
I have trouble with my contract holder of my web space.
I wait now for the AUTH Codes for all my domains, because i switch to a other provider.

@BdMdesigN Do you have any intention to use github pages?
At now, if anybody need access documentation is accessible via archive https://web.archive.org/web/20161015011945/http://www.bootstrap-switch.org/

Please switch to a github url like bootstrap-switch.github.io. I cannot access the documentation.

Hotfix: download the master repository as a zip file and open offline the html files in the master zip.

Accessible here
http://www.jque.re/plugins/version3/bootstrap.switch/

bootstrap-switch.io and .com is available... just sayin. ;)
https://domains.google.com/registrar?s=bootstrap-switch&hl=en&_ga=1.153917112.1274011180.1484758698#tld=com,io&chp=tld

@webdevnerdstuff please don't mention unregistered domains

dupe of #528

Meant to just say the .io and .com were available, but Github changed the comment. Was more of a suggestion.
I have gotten many complaints from my team about the site being missing for a while now, even though I have told them to download the zip from the repo to get the docs there.

@LostCrew:
I don't get the Auth Code yet and i don't have contact with the contract holder.

@BdMdesigN bootstrapswitch.com is now registered and should become the new docs website

New site is online https://bttstrp.github.io/bootstrap-switch/


Do not process psr_3 log messages, as it's now done by symfony.

Related to https://github.com/symfony/symfony/pull/21705
Note: It's not an issue to let monolog doing it, but if monolog do it
symfony can not do it. The best experience is when symfony do it.
So let's disable it.

this is about getting colors for replaced placeholders, right ?

@stof Yes. it's all about colors ;)

Thank you @lyrixx.


add setup for current-user adapter to readme

There was but one detail missing from the readme.

:octocat:


kora-icon-theme: init at 1.3.4

Motivation for this change
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 108429 1

1 package built:

kora-icon-theme

Result of nixpkgs-review pr 108429 1

1 package built:

kora-icon-theme


Feature/298 make dates display utc

Background: MUI detects a UTC time stamp (or time stamp with no time) and tries to show it in browser local time. So if you look at the same date from Japan or California, it will render as different days. See original ticket for more examples: https://github.com/globalmangrovewatch/gmw-users/issues/298
Big thanks to @ghelobytes for unblocking this!!!! 🎉
There is no way to tell MUI date pickers not to do that and to show the date/time in the original form.
Description of hack to make MUI date picker display UTC:

Date comes from server in timeless ISO format (yyyy-mm-dd)
MUI wants to show that date in local time so removes whatever the offset for the browser timezone is. So the ui adds some fake offset for MUI to feel good about removing, and remaining date is displayed in the ui as the same date on the server.
User edits date.
User saves form. We need to remove the added offset again so the server gets UTC. Here we also remove the time component from the date.

~~Question for devs:

while this code technically works with my dev QA, should we use it? Is it worth the complexity/maintenance/future bug costs?

If we proceed, I would update the rest of the dates in the app to behave similarly.

what's a good way to test this @mmnoo does this change mean that we now have timezone id's?

what's a good way to test this @mmnoo does this change mean that we now have timezone id's?

Sorry bout that. The best way I have figured out is to use the sensors panel in dev tools. Switch the locations. Both for reading the dates and editing them. I also look up what was submitted in postman.


add D.Exponential

Jenkins, test this please.

Jenkins CI test (for commit a978a86132381f612d076f25195291510cc3a712, target branch master) failed with status FAILURE.
(For contributors, please wait until the reviewer confirms the details of the error.)

Jenkins, test this please.

Jenkins CI test (for commit e16fe006d2f6966c4628e1107d8db8b672f1da9a, target branch master) succeeded!

Jenkins, test this please.


gimpPlugins.gmic: 3.3.4 -> 3.3.5

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.
meta.description for gimpPlugins.gmic is: GIMP plugin for the G'MIC image processing framework
meta.homepage for gimpPlugins.gmic is: http://gmic.eu/
Updates performed

Ran passthru.UpdateScript

To inspect upstream changes
Impact
Checks done

built on NixOS
The tests defined in passthru.tests, if any, passed
found 3.3.5 in filename of file in /nix/store/2csff06fgsqjppbh2n12lc8nkw4bcbqb-gmic-qt-gimp-3.3.5

Rebuild report (if merged into master) (click to expand)

3 total rebuild path(s)

3 package rebuild(s)

First fifty rebuilds by attrpath
gimp-with-plugins
gimpPlugins.gmic
gmic-qt

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/2csff06fgsqjppbh2n12lc8nkw4bcbqb-gmic-qt-gimp-3.3.5 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A gimpPlugins.gmic https://github.com/r-ryantm/nixpkgs/archive/2db7d81f6405fe6ac2e3395486045e8535ba558c.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/2db7d81f6405fe6ac2e3395486045e8535ba558c#gimpPlugins.gmic

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/2csff06fgsqjppbh2n12lc8nkw4bcbqb-gmic-qt-gimp-3.3.5
ls -la /nix/store/2csff06fgsqjppbh2n12lc8nkw4bcbqb-gmic-qt-gimp-3.3.5/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review --extra-nixpkgs-config '{ allowInsecurePredicate = x: true; }' run on x86_64-linux 1

1 package failed to build:

gimp-with-plugins

2 packages built:

gimpPlugins.gmic
gmic-qt

Maintainer pings
cc @AndersonTorres @lilyinstarlight for testing.

@NixOS/nixpkgs-merge-bot merge


Device Filter - Virtual Chassis

Environment
Python version: 3.6
NetBox version: 2.5.11)
Proposed Functionality
Would like the ability to filter devices that are virtual chassis.
something like:
http://netbox/api/dcim/devices/?virtual_chassis_id=True
Use Case
Easier to provide ('brief') list of devices that are virtual chassis via url filter query. This would enable requests/queryies against the Netbox device list from other tools (eg Prime).
Database Changes
None
External Dependencies
None

This behavior already exists.

virtual_chassis_id is the filter used to identify a particular virtual chassis. A new filter would need to be introduced if determining virtual chassis membership as a boolean.

Adding a boolean filter named virtual_chassis_member.


Use CAPI utils to reduce boilerplate

Signed-off-by: Chuck Ha<EMAIL_ADDRESS>What this PR does / why we need it:
This PR uses the util code and removes some boilerplate making the Reconcile function shorter and easier to read.
It also bumps CAPI version and refactors some test logic.
Release note:
NONE

/assign @fabriziopandini @detiber

/lgtm

/lgtm


Created new button style

Changes proposed in this pull request:

Check that following are added:
-[] HTML and CSS files.
-[] Screenshots.

No chances of conflict


LSTM Engine Diplopia Issue and Inaccurate HOCR Character Level Box Dimensions

Environment:  Tesseract Latest Master from GitHub, Ubuntu 20.04.2
User References: @bertsky @stweil
BackGround
The problem named Diplopia (courtesy of @bertsky) consists in there being more than 1 character appearing in the LSTM output character stream for what is the same physical area of the original image.
I encountered this issue early on in my use of Tesseract, and reported it on earlier thread #2738 .  It has also been reported by many others.  I then attempted to implement a workaround outside of the Tesseract code itself, using the HOCR output format character level box dimensions to try to identify overlapping characters.  This was unsuccessful because, as it turns out, the character level box dimensions are inaccurate for LSTM generally, and are in fact guaranteed to be inaccurate when diplopia occurs.
So I then downloaded the latest Tesseract Master code and embarked on an expedition to try to understand how it works and see if I could come up with a fix for diplopia.  The rest of this post documents the key results of my investigation.
Initial Diplopia Fix
I have just now created Pull Request #3476 which I hope is an adequate fix for most diplopia cases.  See the PR for more details.
This fix generally follows the current style of the RecodeBeamSearch which attempts to assemble the character level output stream from the lower level LSTM NetworkIO matrix output.  This matrix output delivers a set of entries for each timestep in the LSTM process, each entry consisting of a potential matching character and an likelihood score (key) in the range from 0.0 to 1.0.
There is nothing in the current matrix output that identifies the physical location of the possible match in the source image.  Consequently, my fix attempts to identify possible diplopia by looking for two matrix output entries in a given timestep which have what could be called a 'meaningful' score, that is, a score that is high enough to indicate it is likely a 'real' match.  If two such entries are found in the same timestep, then the fix tries to prevent any beam from subsequently containing both.
Inaccurate LSTM HOCR Character Level Box Dimensions
I had originally tried to use the HOCR dimensions as a workaround to fix diplopia, but found them inaccurate.  I then pursued the diplopia fix above separately from this issue, but I have looked at how these dimensions are created and am of the opinion that the current implementation cannot ever be successful.  What it does now consists of three sequential stages:

In the initial image segmenting (before either legacy or LSTM engine is called for recognition) the image is divided into words and blobs within words.  I assume (but have not verified) that for the legacy engine each blob is handled individually to try to identify which single character it may match.  For the LSTM engine, the blobs are re-assembled back into a word level image, and then handed to the engine for recognition.  In both cases, the original blob dimensions are saved for later.
During its recognition process, the LSTM engine processes the word level image in a series of so-called timesteps.  These are in fact traversing the image from left to right a certain number of pixels per timestep.  During the RecodeBeamSearch processing to assemble the output character stream, there is a process which attempts to calculate the character dimensions using the known overall dimensions of the word image plus the known number of timesteps.  At the currently defined timestep size, the granularity level is too coarse so this process will never be able to be accurate.  I have experimented with reducing the size of the timesteps, which does result in some improvement in the character box dimension accuracy, but at the expense of extra processing time and reduced recognition accuracy.  Perhaps retraining is necessary if the timestep size is reduced.
The final stage is the assembly of the HOCR output.  If the legacy engine was used, then the original blob dimensions from step#1 are used, which is as good as it can get in that case.  If the LSTM engine was used, then there is code which tries to decide whether the original blob dimensions or the calculated ones from step#2 are 'better'.  In general, if the number of characters found in a word by LSTM is the same as the original blob count, then it seems to use the blob dimensions and ignores the calculated ones.  When diplopia occurs, this mechanism is completely unsuccessful.

Long Term Solution to LSTM Diplopia and Character Box Dimensions
So as it turns out, these issues are in fact related, or at least the solution for both is.  What both of them really need is the precise physical image location of the character match being attempting.  If the character box dimensions were accurate, then diplopia could be solved either during the RecodeBeamSearch, or after the LSTM engine has done its thing.  It would have to be determined how much of a physical overlap would mean we have diplopia, but that could be an easy configuration setting.
As I see it, therefore the LSTM matrix processing using the NetworkIO interface needs to add to its return values (in addition to the possible character and the likelihood score) the starting pixel location of the possible match, and the horizontal size of the potential match image from the train data.  Once that is done, the rest should be relatively straightforward.
Having said that, I have spent a fair bit of time to try to understand the matrix operations, but so far have not been successful in how to accomplish the above suggestion.  It MUST be the case that somewhere down in there that location information can be retrieved, and I intend to continue to look.  But if anybody can give me some hints, it would be appreciated.

It should be possible to filter cases of diplopia (for testing) if ground truth is available:

inserted characters
overlapping bounding boxes

This is a typical one (punctuation at end of line):
similarity 0.925925925925926 < 0.99 : ONB_aze_18950706_1.jpg_tl_119.gt.txt
$grt_line: möglich iſt, daß die „Oppoſition“ bei der Vertrauens⸗
$ocr_line: möglich iſt, dab "Die „Oppoſition“ bei Der Vertrauens⸗—

Or difficult shape/separation:
H 18 0 52 96 0
M 18 0 97 92 0
A 102 4 176 94 0
R 181 7 244 96 0
P 242 6 288 96 0
O 289 7 343 94 0
C 349 7 406 89 0
R 420 0 481 96 0
A 415 5 546 91 0
T 531 9 621 96 0
E 628 7 692 96 0
S 701 7 762 95 0

I have just now created Pull Request #3476 which I hope is an adequate fix for most diplopia cases

What is the status of this pull request?
In my personal opinion,
As far as I have tried, this change is worthwhile because it has no adverse effects and fixes many of the diplopica issues.
However, I am concerned about the impact on the training process and changing the default behavior.
So I think it would be better to add a configuration variable that is off by default, and use it only if people want to use it (If this change is unacceptable in its current state).
Also,
I recently trained a jpn_vert model with my own rendered training data, and the diplopia issue has become less frequent.
I think the difference between the training data and the real world data is also the cause of the diplopia issue, since text2image generates binarized images and the rendered font is bolder than typical printing (for japanese text).

The problem seems to come from characters that are joined, but the right coordinate seems to be more reliable. In my situation I just look at the right coordinate to correct the left coordinate.
for i in range(len(ocr_result['left'])-1):             if ocr_result['left'][i+1]< ocr_result['right'][i]:                 ocr_result['left'][i+1] = ocr_result['right']

I am not sure if this is related, but my symbol boxes are completely off in a lot of cases. I wanted to implement bold font recognition by measuring the pixel density inside a symbol box for each letter, but when symbol boxes are completely off, this is a no-go.

Left there is source that was sent to Tesseract with lines, word and symbol boxes. Right is my own threshold image with symbol boxes.

This is a zoomed out version, so you can see how the boxes are all over the place.
The boxes are sometimes gigantic, contain more than one character (so one character is inside multiple boxes, and they overlap) or I have an instance where a box spans vertically over two lines. This looks to me like some kind of bug, because some boxes are really crazy.

With the pull reques above: https://github.com/tesseract-ocr/tesseract/pull/3476

I have filtered out boxes that are mostly correct (some correct boxes with ý etc. are there as well). Seems like diplopia causes the box of one of the symbols to be vertically broken (space above and below the letter).

@woodjohndavid Does it give you enough info to improve or should I look myself into your pull request?
Below clear test image.

Adding with lines for completness.

Hmm, now I have built just main without the patch, and it may have been improved by other patches and that pull request actually does nothing.

Can anybody point me out to a code that cause these diplopias?

@exander77 glad you are interested in addressing this issue.  I would encourage you to re-read the starting entry on this thread, which, among other things, explains my understanding of why the bounding boxes are inaccurate.  This is in a way related to the diplopia issue, in that the ultimate fix for both lies in the same area I believe.
The code you are looking for is found in recodebeam.cpp.  Method ComputeTopN is the start where the LSTM engine incoming results are first processed.

@woodjohndavid Yes, I am interested. I can't get the hang on how are the results got from the network. Where is the info about position of the character and the with available? I see that each output contains a number of floats and that is passed to CompouteTopN. I have no idea what is going on there.

@exander77
Interesting example. The text recognition with CTC/LTSM seems very accurate and has no diplopia with your sample. It's a character bounding box problem (with some influence of a not so perfect training model for CES).
I tried to apply my script hacked together for PR#3599 and #3787. Find results here https://github.com/wollmers/ocr-bbox-gt/tree/main/data/issue_3477.
Read https://github.com/tesseract-ocr/tesseract/pull/3599#issuecomment-1114673556 for an explanation how it works.
What I didn't take in to account are the 3 different fonts (bold, regular, italic) in your example. If we want to measure statistically the "best" width of a character, we must do this per font. This is a "hen and egg" problem: We need correct bounding boxes to identify the font. But we need also the font identified to get correct bounding boxes. Also, even with --oem 0 not all bounding boxes are correct. An improved post-correction would take the bounding boxes from --oem 0, calculate features of the characters as possible and then identify the font. Per font the "best" metrics per character can be learned and outliers corrected. If the metrics of a character are known, outliers (hight, width) can be detected.
I still have a solution for font classification, which needs good quality bounding boxes, to measure features like width, height, aspect, density, vertical position, ascender, descender. Thanks to your input I got new ideas for improvements.

@wollmers Yes, the diplopia is not an issue for me, the characters appear only once in the output stream. The character wrongly appears in two bounding boxes, or the bounding boxes are generally inaccurate.
Also, I think there actually is a recognition problem as well.

Word:  vodikm)
Word:  jch Word: zontu)`
Word voíkových is split into vodikm) and jch. And I am not really sure why? Seems like part of v got merged into o and recognized as m? How did that happened? The italic o there is clearly readable and I don't and easily recognizable?
Word iontů followed by ) is mangled into zontu). Most likely because the accents were cropped from the recognition? It is easy to confuse i and z when you crop accent over i. The accent is also cropped fromů creating u.
Also: : in bazický: is not part of word box. This happens inside ComputeWordBounds.
Interestingly, what I wanted to do is to identify bold text, and I was unable to do so, because the bounding boxes are not correct.
If there is a solution for font classification, I would have use for it.
Just compiling with the PRs you mentioned (and the diplopia one as well). See how that behaves.

Also, the symbol  <| on the right side of the page is now separated.

@exander77
Which version are you using? With Tesseract 5.1.0 on Intel Mac I get:
$ tesseract 3477.jpg 3477.psm6 -l ces  --psm 6 \
	--tessdata-dir  /usr/local/share/tessdata makebox hocr txt pdf

$ cat 3477.psm6.txt
Aljoša, Aljoška v. Alexej

alka, -v ž. (2. mn. alek) severský mořský pták S
z příbuzenstva racků; z001. rod Alca a Plautus:
a. malá; a. velká ,

alkajský příd. liter. a. verš řecký n. latinský
verš nazvaný podle básníka Alkaia; a-á strofa
složená z těchto veršů

alkalický příd. (z arab. zákl.) chem. jevicí vlast.
nosti zásad; zásaditý, bazický: a. roztok
mající menší koncentraci vodíkových iontů
(větší koncentraci hydroxylových iontů) než

$ diff 3477.psm6.gt.txt 3477.psm6.txt
4c4
< z příbuzenstva racků; zool. rod Alca a Plautus:
---
> z příbuzenstva racků; z001. rod Alca a Plautus:
11c11
< alkalický příd. (z arab. zákl.) chem. jevící vlast-
---
> alkalický příd. (z arab. zákl.) chem. jevicí vlast.

# 5 character errors (without the left pointing triangle symbol):

Word mismatches:
"jevící"     1
  "jevicí"     1 (1.0000)
"vlast-¶"     1
  "vlast.¶"     1 (1.0000)
"zool."     1
  "z001."     1 (1.0000)

With --oem 0 (legacy method)
$ tesseract 3477.jpg 3477.oem0.psm6.ces -l t5data/ces --oem 0 --psm 6
	--tessdata-dir  /usr/local/share/tessdata makebox hocr txt pdf

I get nice bounding boxes (few misinterpretations like speckles, split of Háček, overlaps because italic/kerning):

With the 3 PRs:
Word: hydroxylových Word: iontů
So the recognition is actually significantly improved with these PRs.

There are still the typical bbox errors:

My observation is, that the number of boxes is correct (each recognised character has a box), but many boxes have wrong positions and/or width.

@wollmers Yes, it is in no way perfect. Legacy is far superior to this. Except for : that is outside the word without a box.

FYI I've updated https://github.com/tesseract-ocr/tesseract/pull/3787 with some bug fixes that I found since the initial implementation.


BULK_PKGCLEAN

Support pkgclean at bulk time via BULK_PKGCLEAN == 1.  This is pretty simply just removing the pkg_is_needed check at the top of delete_old_pkg and letting the "unwanted origin" and other code take effect.

bulk -a already does this mode too.


type

hi
there is a typo in the link you provided: $ git clone https://github.com/aichbauer/express-resr-api-boilerplate.git where express-resr should be express-rest I guess!

Thanks for your issue.
You are right, it should be express-rest
A PR is highly appreciated.


prop-types warning

react: 15.5.4
react-router-dom: 4.1.1
prop-types: ^15.5.4
how to fix these warning? Thanks

Warning: Failed prop type: Calling PropTypes validators directly is not supported by the prop-types package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types
in Route
Warning: Failed context type: Calling PropTypes validators directly is not supported by the prop-types package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types
in Router (created by BrowserRouter)
in BrowserRouter

This is a bug tracker, not a support system. For usage questions, please use Stack Overflow or Reactiflux. Thanks!

Works fine for me while using Rollup, Webpack, but does not work while using packages from cdn. I.e.
  <script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.4.2/react.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.4.2/react-dom.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/react-router/4.1.1/react-router.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/react-router-dom/4.1.1/react-router-dom.js"</script>

Note: I'm transpiling golang to JavaScript so this may be, erhm, weird.


Support aliases for dimension select in metrics_sql

https://rilldata.slack.com/archives/CTCJ58H3M/p1724936897237479

We accumulate the fields data into slices for Dimension and Measure objects that weren't designed to contain Alias
type Dimension struct {
	Name    string            `mapstructure:"name"`
	Compute *DimensionCompute `mapstructure:"compute"`
}

Should we add Alias now or use other struct types instead of Dimension/Measure? Dimensions


add support for custom Croutons

Hi Manu,
looking for custome (CI) background color.
Codestrong!

with 1.2.4 do:
crouton.show({
  text: "custom color crouton",
  color: "orange"
});

works also for crouton.make()


Outlaw comma in non-binary metadata values

You just keep taking and taking and taking away, don't you? ;-)


Refactor app bar

This requires additional styling and logic, but this can be merged now to separate some of the old code into discrete components.

@AlmightyYakob Can you review this at a high level? There is certainly more work to do, but I want to merge what I have so far, to minimize future conflicts.

Successful sign-in/register should redirect to another page, instead of staying on the login/register page. Maybe the home page or something
There's some missing spacing between elements in the app bar, between the "Welcome" button and the DANDI Image, and between elements on the right side.

Agreed, all of these things need to be fixed in future work. Since this change created and reorganized so many other components, I wanted to get it into the shared codebase ASAP.


exhaustive checks on DC tests

In TestDCHandshakeServerAuth, the external loop iterates over the dcTests, and the internal loops over the signatureSchemes. It seems that the test is not executing all the combinations of (dcTests, signatureSchemes), is this the intended test?
Inspecting the dcCounter value, it runs from 0 to Len only for the first test case.
	for i, test := range dcTests {
		clientConfig.SupportDelegatedCredential = test.clientDCSupport
+		t.Logf("dcCounter: %v\n", dcCounter)
		for dcCounter < len(dcTestDCScheme)-1 {
			if test.serverDCSupport {
				serverConfig.GetDelegatedCredential = testGetDelegatedCredential
				dcCounter++
			} else {
				serverConfig.GetDelegatedCredential = nil
			}

Yes, it is expected. It is really not needed to test all the conditions as the other ones will fail one way or another. The added of a dcCounter was a request, which I think is unnecessary as it tests with every possible algorithm the tls connection (while in truthness if the DC is able to be created and validated, then it should work).
I expected to change the way DC test work when the new API lands (next week when I return to work): the usage of callbacks make it almost impossible to check with different algos and variables.

I'm going to leave this open for a while until the design of the new API is taken into account.

the usage of callbacks make it almost impossible to check with different algos and variables

it is possible to create a factory of functions, so each produced function must use one combination of dc and signature scheme.

it is possible to create a factory of functions, so each produced function must use one combination of dc and signature scheme.

The callbacks will likely disappear in the new API by using the cert ones, so no need of it then.

Solved now.


Multiple windows

A Chrome user requested this feature to have multiple windows.

I need to build a dashboard and this window is just what I needed! Can I get multiple instances with different URLs running?

Yes please! 😍

Please do! I would be ecstatic if this app could have that functionality.

+1 for multiply instances

What's better than a flobro window? Several flobro windows! Please add this feature, yes!

Pennywise already did it: https://github.com/kamranahmedse/pennywise/releases

Continuing this issue in #61


[move-prover] print new values of havocked variables in error trace #256_142

Motivation

When doing loop analysis, insert trace_local instructions for havocked user-declared locals. This shows the implicitly reassigned values to the user.

Also show "enter loop" and "loop invariant holds" info to the user. This fixes issue.

Remove temporary variables introduced by the compiler from the error trace. This fixes issue.

When a loop invariant does not hold, the current error message shown to the user is incomplete and hard to understand

Test Plan
cargo test --release

/canary

/land


The type initializer for "Lucene.Net.Diagnostics.Debugging" threw an exception

Is there an existing issue for this?

[X] I have searched the existing issues

Describe the bug
I get the following Exception:
System.TypeInitializationException
HResult=0x80131534
Message=The type initializer for "Lucene.Net.Diagnostics.Debugging" threw an exception.
Source=Lucene.Net
StackTrace:
at Lucene.Net.Store.BaseDirectory.SetLockFactory(LockFactory lockFactory)
at Lucene.Net.Store.FSDirectory.SetLockFactory(LockFactory lockFactory)
at Lucene.Net.Store.FSDirectory..ctor(DirectoryInfo path, LockFactory lockFactory)
at Lucene.Net.Store.MMapDirectory..ctor(DirectoryInfo path, LockFactory lockFactory, Int32 maxChunkSize)
at Lucene.Net.Store.MMapDirectory..ctor(DirectoryInfo path, LockFactory lockFactory)
at Lucene.Net.Store.MMapDirectory..ctor(DirectoryInfo path)
...
Inner Exception 1:
FileLoadException: Could not load file or assembly "Microsoft.Extensions.Configuration.Abstractions, Version=<IP_ADDRESS>, Culture=neutral,
PublicKeyToken=adb9793829ddae60" or one of its dependencies. The located assembly's manifest definition does not match the assembly referencen. (Exception from HRESULT: 0x80131040)
I'm using beta16 and .Net Framework 4.8.1
It happens when I try to open a directory:
_IndexPath = FSDirectory.Open(new DirectoryInfo(Path.GetFullPath(Path.Combine(indexRootPath, subDir))));
or
_IndexPath = new MMapDirectory(new DirectoryInfo(Path.GetFullPath(Path.Combine(indexRootPath, subDir))));
I tried Version 1.1.2 of Microsoft.Extensions.Configuration.Abstractions and Microsoft.Extensions.Configuration
but that didn't help.
I use several projects in my solution. I searched for "Microsoft.Extensions.Configuration.Abstractions.dll" and these are all instances that were found:
[0]	{[D:\TestProgram\Index\IndexSearch\bin\Debug\Microsoft.Extensions.Configuration.Abstractions.dll, {Microsoft.Extensions.Configuration.Abstractions, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=adb9793829ddae60}]}	System.Collections.Generic.KeyValuePair<string, System.Reflection.AssemblyName>
[1]	{[D:\TestProgram\packages\Microsoft.Extensions.Configuration.Abstractions.1.1.2\lib\netstandard1.0\Microsoft.Extensions.Configuration.Abstractions.dll, {Microsoft.Extensions.Configuration.Abstractions, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=adb9793829ddae60}]}	System.Collections.Generic.KeyValuePair<string, System.Reflection.AssemblyName>
Expected Behavior
_IndexPath = FSDirectory.Open(new DirectoryInfo(Path.GetFullPath(Path.Combine(indexRootPath, subDir))));
should open the directory instead of producing an exception
Steps To Reproduce
use beta16 and .Net Framework 4.8.1 (also happens with lower versions)
try to open a directory:
private FSDirectory _IndexPath;
_IndexPath = FSDirectory.Open(new DirectoryInfo(Path.GetFullPath(Path.Combine(indexRootPath, subDir))));
or
_IndexPath = new MMapDirectory(new DirectoryInfo(Path.GetFullPath(Path.Combine(indexRootPath, subDir))));
Exceptions (if any)
System.TypeInitializationException
HResult=0x80131534
Message=The type initializer for "Lucene.Net.Diagnostics.Debugging" threw an exception.
Source=Lucene.Net
StackTrace:
at Lucene.Net.Store.BaseDirectory.SetLockFactory(LockFactory lockFactory)
at Lucene.Net.Store.FSDirectory.SetLockFactory(LockFactory lockFactory)
at Lucene.Net.Store.FSDirectory..ctor(DirectoryInfo path, LockFactory lockFactory)
at Lucene.Net.Store.MMapDirectory..ctor(DirectoryInfo path, LockFactory lockFactory, Int32 maxChunkSize)
at Lucene.Net.Store.MMapDirectory..ctor(DirectoryInfo path, LockFactory lockFactory)
at Lucene.Net.Store.MMapDirectory..ctor(DirectoryInfo path)
...
Inner Exception 1:
FileLoadException: Could not load file or assembly "Microsoft.Extensions.Configuration.Abstractions, Version=<IP_ADDRESS>, Culture=neutral,
PublicKeyToken=adb9793829ddae60" or one of its dependencies. The located assembly's manifest definition does not match the assembly referencen. (Exception from HRESULT: 0x80131040)
Lucene.NET Version
Lucene.Net 4.8.0-beta00016
.NET Version
.Net Framework 4.8.1 (also happens with lower versions)
Operating System
Windows 10
Anything else?
No response

This issue happens when you have a version conflict between the version of Microsoft.Extensions.Configuration.Abstractions that we target and other libraries in your project. Unfortunately, the version resolution on these older packages doesn't work well and manual fixup is often required when you pull in another dependency that depends on Microsoft.Extensions.Configuration.Abstractions or any of the other libraries in Microsoft.Extensions.Configuration.
The solution is to go through your project dependencies to determine the lowest version of Microsoft.Extensions.Configuration.Abstractions that can be targeted to resolve the conflict. You may use a higher version than this and it will work (in the master branch we are currently targeting 3.1.6, which seems to solve this).
You can then either add a direct reference to Microsoft.Extensions.Configuration.Abstractions and all of the other Microsoft.Extensions.Configuration packages to your project or use assembly binding redirects to do the same.

With our upgrade to v8.0.0 of the Microsoft.Extensions.Configuration.Abstractions package for beta17, this should be less likely to occur. Closing for now, but please reopen if you have issues with the beta 17 release.


Adding "A better way to structure AWS CDK projects around Nested Stacks" to the posts section

Description of changes:
Adding "A better way to structure AWS CDK projects around Nested Stacks" to the posts section

Thank you! 👍


Ingestion of two proposals without attached datasets fails

Issue Name
Ingestion of two proposals without attached datasets fails
Summary
We tried to ingest two proposals in an empty database created by scicat-backend-next, which turned out not to be possibile due to an index error in the mongo db.
Steps to Reproduce

Ingest a proposal e.g. using the same metadata as in the tests

{
  "proposalId": "first_proposal",
  "email": "proposer%40uni.edu",
  "title": "A test proposal",
  "abstract": "Abstract of test proposal",
  "ownerGroup": "20170251-group",
  "MeasurementPeriodList": []
}

the response will be code 201 with the following body
{
  "ownerGroup": "20170251-group",
  "accessGroups": [],
  "proposalId": "first_proposal",
  "email": "proposer%40uni.edu",
  "title": "A test proposal",
  "abstract": "Abstract of test proposal",
  "MeasurementPeriodList": [],
  "attachments": [],
  "datasets": [],
  "_id": "first_proposal",
  "__v": 0,
  "id": "first_proposal"
}

Try to ingest a second dataset with modified id

{
  "proposalId": "second_proposal",
  "email": "proposer%40uni.edu",
  "title": "A test proposal",
  "abstract": "Abstract of test proposal",
  "ownerGroup": "20170251-group",
  "MeasurementPeriodList": []
}

the answer will be a code 500
{
  "statusCode": 500,
  "message": "Internal server error"
}

and in the server logs we see
MongoServerError: E11000 duplicate key error collection: scicat.Proposal index: datasets.pid_1 dup key: { datasets.pid: null }

Manually playing the database e.g. chaning the entry of the first entry from

{
    _id: 'first_proposal',
    ownerGroup: '20170251-group',
    accessGroups: [],
    proposalId: 'first_proposal',
    email: 'proposer%40uni.edu',
    title: 'A test proposal',
    'abstract': 'Abstract of test proposal',
    MeasurementPeriodList: [],
    attachments: [],
    datasets: [],
    __v: 0
}

to
    datasets: [
        {
            pid: 'something'
        }
    ]

enables the ingestion of the second dataset.
Extra Details
To me it looks like the unique indes on "datasets.pid" in the Proposal collection realy is a problem.

@linupi : can you try to drop the database and run again the ingestion?
The data models are a little bit convoluted. I'm fixing them as I work on the tests.
If dropping the database does not work, can you go in mongo and check the indexes? That's how I found that the issue was a left over index from previous implementation of the data model. Unfortunately, changing the data model does not force Mongoose to update the indexes.

@nitrosx the problematic index is still there when I start with a fresh DB from scratch...

I think this is being caused by this line:
https://github.com/SciCatProject/scicat-backend-next/blob/e6f961f011f60f1874cd5e6858b223a74972fb73/src/proposals/schemas/proposal.schema.ts#L104
I don't know mongoose very well, but from the error, I'm guessing this is creating Dataset sub-documents within the Proposal collection rather than referencing them and that the error is caused by the second new sub-document Dataset.
@linupi Is there any way you could look at the first proposal in mongo that got created and see if this is true?
I am guessing that this relationship should be expressed in the proposal schema as a list of ids rather than a list of Datasets.

I must be wrong about storing it as an embedded document, however the error definitely implies that the act of creating a proposal is attempting to create a new blank Dataset.

Tested via swagger in the latest release: No problems in creating more than one Proposal without datasets


test-branch/execute-job/wrong-commit-sha-on-pr/489083eb-f2ac-45b2-a0b7-8b5015b1b6b6

PR for testing 54471e9c91b9b1480da5bbd736f38b2d145f3dfe

/canonical/self-hosted-runners/run-workflows 7ddef3959f187604fba5ae6db88ff44d9ebcdeeb


skip labels in phiquation

@rultor release, tag is 0.5.0

@rultor release, tag is 0.5.0

@yegor256 OK, I will release it now. Please check the progress here

@rultor release, tag is 0.5.0

@yegor256 Done! FYI, the full log is here (took me 15min)


subset_otf_from_ufo: Handle .notdef glyph

The glyph names of UFO anf OT binary need to match up for the export flag testing to work. The .notdef glyph must be handled specially because it is usually the first glyph in the OT, but might not be present or in the first glyph slot in the UFO.
https://github.com/googlei18n/fontmake/issues/443
Now for some tests.

Hum. There doesn't seem to be a dedicated place for testing this. Well, it Works For Me(tm).

We should probably us ufo2ft.util.makeOfficialGlyphOrder, ufo_order isn’t correct if there are glyphs that are not in the font.glyphOrder.

Add summary where? Here?
Glyphs' export flag on single glyphs and the global "Keep Glyphs" setting are now correctly handled when subsetting is implicitly (by setting the flags) or explicitly requested.

Yes
On Thu, 14 Jun 2018, 13:26 Cosimo Lupo<EMAIL_ADDRESS>wrote:

are you done? if so i'll merge
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/googlei18n/fontmake/pull/444#issuecomment-397275829,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAXPndxh95hRK7yb7OtJdV5OTvw-zlyhks5t8laSgaJpZM4UnrsH
.

Thanks

a byproduct of this PR is that the post-build subsetting feature no longer requires that the UFO explicitly defines public.glyphOrder in lib.plist, since we are now using the same function ufo2ft uses to make a glyph order, and this always returns something even when glyphOrder is not defined.

@anthrotype @madig I think that this impacts us.  I am maintaining a separate subset lib.plist file by hand for our subset definitions.  How do we specify the subset Unicode code points following this change?   If this is a big refactor on the definition file end, it might be the push necessary for me to move to a different approach.  The current one is crazy but works so I haven't addressed it.  Also, what are your thoughts about supporting a non-glyphs library (and maybe even external to UFO spec) specific way to support subset definitions in fontmake.  Perhaps an approach from command line like pyftsubset or a json/yml definition file down the road?

there is no change, it continues to work like before. What changed is the situation where one has both the global "Keep Glyphs" list, and the individual glyph Export flags. The former global list always wins. The latter are used only then the former is not defined. As for the mismatching glyphOrder between the UFO and the TTFont, I don't think that should impact you.

a non-glyphs library (and maybe even external to UFO spec) specific way to support subset definitions in fontmake

see https://github.com/unified-font-object/ufo-spec/issues/68

Note that the reason we use the fonttools subsetter ex-post, instead of subsetting the source UFOs (in ufo2ft, for example), is that it's trivial to remove glyphs from a font, its kerning or groups, but subsetting the feature file is not straightforward. Granted, we could remove all reference to a dropped glyph in all the feaLib AST statements, and drop the empty statements, blocks, etc. ... but calling the fonttools subsetter is too convenient.

related https://github.com/fonttools/fonttools/issues/1121#issuecomment-350015932

there is no change, it continues to work like before.

I am reading this statement as it is ok to specify both <key>public.glyphOrder</key> with the full set list and <key>com.schriftgestaltung.Keep Glyphs</key> with only the subset glyph definitions in the same lib.plist file and behavior does not change.  You still get only the code points specified in com.schriftgestaltung.Keep Glyphs (and ignore public.glyphOrder definitions for the Unicode positions included in the subsets irrespective of ordering) with these changes?  Sorry, I am making sure that I understand your comment above.

it is ok to specify both public.glyphOrder with the full set list and com.schriftgestaltung.Keep Glyphs with only the subset glyph definitions

totally, yes! sorry if I confused you with my previous statement.
it's not "codepoints" technically, but glyph names, but yeah :+1:

but calling the fonttools subsetter is too convenient.

That was not intended to be a criticism of the implementation approach, rather wearing the compiler user cap it would be nice to be able to specify definitions, including specification of multiple subset definitions simultaneously if it is to be part of a source spec, through different means.   I commented in the ufoLib thread with some ideas about this that would be very helpful to us.  We would like to create a number of subset files and I can't support this with our current approach.
https://github.com/unified-font-object/ufo-spec/issues/68#issuecomment-397331040

Thanks Cosimo.  Appreciate your help and feedback.


'mul' in shader: compile error

Hi
I'm trying to compile my first sample shader using shaderc. In the documents you have mentioned that we should use mul for multiplying matrix and vectors. and also it is what it is in example shaders.
But when I try to compile it using this command :
shaderc -f test.sc --platform windows --verbose --type vertex -o test.bin.h --bin2c
It pops up the error message :
Failed to build shader.```

Here is the shader (test.sc) :

$input a_position, a_color0
$output v_color0
uniform mat4  u_modelViewProj;
void main()
{
gl_Position = mul(u_modelViewProj, vec4(a_position, 1.0));
v_color0 = a_color0;
}

Am I missing something ?
thanks

Yup, you need:
#include <bgfx_shader.sh>

Thanks.
I also forgot to add -p [profile] in the command-line for hlsl

Cool! :+1:


Add seamless support for ImmutableJS structures in select() path

This change allows you to use syntax like @select(['foo', 'bar', 'baz']) where either 'foo' or 'bar' are ImmutableJS structures inside of your Redux state.

Hey @clbond this is an interesting idea. However I have some reservations about making immutable a dependency of ng2-redux.
Not everyone who uses ng2-redux wants to use or even depend on immutableJS.
It's also worth noting that you can use @select(['path']) with Immutable if you define your reducer data with Immutable.Record instead of Map.  See https://github.com/rangle/angular2-redux-starter/pull/217 for an example of what I'm talking about.
That said, there's still some merit to a general approach for Iterables like this - perhaps there's a way to put it in its own package somehow?

Good point. Pushed a change that makes immutable an optional dependency. If the project is not using immutablejs, then neither will ng2-redux; if it is using immutablejs, then ng2-redux will use it.

Might be worth adding a couple of unit tests? For Map and List?
@e-schultz what's your take in this approach?

@SethDavenport Good call; added some unit tests related to optional immutable support (without depending upon immutablejs itself in order to write the tests, just creating mock objects that mimic immutablejs structures).

I personally think it is important to include this optional support, especially since we are able to do it without introducing a dependency upon immutable and since we use ng2-redux together with immutable in all of our starter projects. I tested the changes on a project that uses immutable and one that does not, and it worked as expected. The project that had the immutable dependency got automatic ng2-redux support for Immutable structures. The one that did not depend on immutable just got the same old behaviour.

Overall I like the idea, especially with how common it is to use redux with immutable

I would tend to agree that the way that I implemented the optional immutable stuff is a little sketchy, having that try-catch block around the require() statement. But in looking around at how other people have confronted this issue of optional dependencies, they all used the same method. There is even an npm package called "optional" (https://www.npmjs.com/package/optional) which allows this syntax:
const dep = optional('dependency');

And the way that it implements that functionality is using the same try-catch-require block:
module.exports = function(module, options){
  try{
    return require(module);
  } catch(err){}
  return null;
};

So I think this is a perfectly safe way of saying "if the project that is being compiled has an existing immutablejs dependency, then use it." And we don't have to add immutable to our package.json under devDependencies or peerDependencies.

Works for me then. :shipit:


Deprecated CSS preprocessor

Delegate.SassBuilder is archived at github. Consider replacing it with AspNetCore.SassCompiler

Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: 2703a48e-8b35-53fc-ac36-cfb395833077
Version Independent ID: 39d464d9-aca6-34fa-7e52-5fde2e393ba7
Content: ASP.NET Core Blazor CSS isolation
Content Source: aspnetcore/blazor/components/css-isolation.md
Product: aspnet-core
Technology: aspnetcore-blazor
GitHub Login: @guardrex
Microsoft Alias: riande

Thanks @boppbo ... I'll put it into a PR and see if management would like to approve the swap.

@guardrex found two another occurences. There might be more

Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: 164d7efe-01bf-0b26-7a23-f10704f338f5
Version Independent ID: b3e2bc87-1582-2d34-c7c2-7c8e901ac771
Content: Introduction to Razor Pages in ASP.NET Core
Content Source: aspnetcore/razor-pages/index.md
Product: aspnet-core
Technology: aspnetcore-razorpages
GitHub Login: @Rick-Anderson
Microsoft Alias: riande

Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: d2e47828-6da8-2323-053f-dcbf7475b1b6
Version Independent ID: 62d4c2be-4233-64e1-2a3d-8a5e98d9d941
Content: Views in ASP.NET Core MVC
Content Source: aspnetcore/mvc/views/overview.md
Product: aspnet-core
Technology: aspnetcore-mvc
GitHub Login: @Rick-Anderson
Microsoft Alias: riande

Thanks ... I'll search the whole repo and get them all out. Stand-by ......

Looks like there were only two other spots, which arrive in those articles by an INCLUDE file. I've added a commit to the PR to change that INCLUDE file.


Custom profiles are unable to have custom descriptions without altering getProfileDescriptions()

Would be nice to have the description locale key stored in the profile.json file

Originally written by chomp

Implemented with https://dev.sp-tarkov.com/SPT-AKI/Server/commit/3b053b741bf9084a6a8c14fd7e7352fa3482e13b

Originally written by chomp


Benders MPI fail unexpectedly during Windows test in CI

A first step could be to save the study (or just output) as an asset in case of failure and try to look into logs.
We may need to try and reproduce locally.

One way to help investigation would be to:

Enable core dump during CI
Set core dump location to easily retrieve it
On failure bundle core dumps and executables


[apc] Fix bad expiry display for ttl=0

If ttl is 0, that means the key is kept indefinitely (until manual clearing, restart
or other eviction logic that is not eviction based, e.g. LRU).

Thanks! 🎉


⚠ Samsung has degraded performance

In 280faaf, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2664 ms

Resolved: Samsung performance has improved in 8aa79b2.


feature request: Remap confirm changes

Did you check existing requests?

[X] I have searched the existing issues

Describe the feature
I would like to remap the confirm button, in my case I would want to hit Enter key to confirm. I think that others might want to use Y/N
I'm guessing the prompt text needs to change to reflect that as well.
Something like this:

Provide background
I believe this would be a standard behaviour, I rarely see O used as a confirmation prompt
Additional details
No response

It's easy to remap these keys, see https://github.com/stevearc/oil.nvim/issues/114#issuecomment-1571332722

Everytime I press O to confirm, vim quits...

@huix9527 this sounds unrelated to this issue. If you have a problem please file a new issue and follow the template to create a minimal repro.


Linker error while building gtkdoc

I'm trying to make GStreamer modules build with meson inside Cerbero. When it builds gtkdoc I get this error:
Error in gtkdoc helper script:
'gtkdoc-scangobj' failed with status 1
ld: unrecognized option '-Wl,-rpath,/home/xclaesse/programmation/cerbero/build/sources/linux_x86_64/gst-transcoder-1.9/cerbero-build-dir/'
ld: use the --help option for usage information
Linking of scanner failed:

The exact command line that produce that error is:
gtkdoc-scangobj --types=/home/xclaesse/programmation/cerbero/build/sources/linux_x86_64/gst-transcoder-1.9/cerbero-build-dir/docs/libs/gst-transcoder.types --module=gst-transcoder --cflags="-I/home/xclaesse/programmation/cerbero/build/sources/linux_x86_64/gst-transcoder-1.9/cerbero-build-dir/gst-libs -I/home/xclaesse/programmation/cerbero/build/sources/linux_x86_64/gst-transcoder-1.9/gst-libs -I/home/xclaesse/programmation/cerbero/build/dist/linux_x86_64/include/glib-2.0 -I/home/xclaesse/programmation/cerbero/build/dist/linux_x86_64/lib/glib-2.0/include -pthread -I/home/xclaesse/programmation/cerbero/build/dist/linux_x86_64/include/gstreamer-1.0" --ldflags="-L/home/xclaesse/programmation/cerbero/build/sources/linux_x86_64/gst-transcoder-1.9/cerbero-build-dir/ -Wl,-rpath,/home/xclaesse/programmation/cerbero/build/sources/linux_x86_64/gst-transcoder-1.9/cerbero-build-dir/ -lgsttranscoder-1.0 -L/home/xclaesse/programmation/cerbero/build/dist/linux_x86_64/lib -lglib-2.0 -lgobject-2.0 -lgstreamer-1.0 -lgstpbutils-1.0"

GStreamer's gtkdoc seems to build fine with meson when using gst-build, so I don't understand what's the difference when ran inside cerbero env.
Any clue?

Ohh, digging code in gtkdoc-scangobj, those ldflags are passed to "ld" binary and not "gcc" so -Wl,-rpath,/foo should be translated to -rpath=/foo I think. Right?

Oops, wrong github project, sorry for the noise.


Allow enabling of --headless

Is your feature request related to a problem? Please describe.
We cannot currently use GdUnit in our CI pipeline, due to our test running server lacking a display driver of any kind, and as such, requires usage of --headless with Godot. GdUnit errors out when Godot is in headless mode, causing our tests to fail to run.
Describe the solution you'd like
Some way of disabling the headless check when running in these environments, with an acknowledgement of the limitations brought about by doing so.
Describe alternatives you've considered
We currently maintain an internal fork of GdUnit, with line 273 of GdUnitCmdTool.gd changed to the following:
if DisplayServer.get_name() == "headless" and OS.get_environment("HEADLESS_GDUNIT") != "enabled":

This allows us to set HEADLESS_GDUNIT on the server, while ensuring the same checking for these cases of tests that use UI interaction.

To add to this - I'm happy to work on a PR for this if you're OK with this feature. Let me know how you would want this implemented, if at all 😄

Hi @MikeSchulze  - I'm very much aware of this context. Some important context on our side - we don't have any kind of display server on our CI runner - importantly, we selfhost both our repositories and our CI pipeline.
We fully know that mouse inputs aren't accepted, and as such we're going to be in an unsupported state. However, for our usages, this works fine - and the alternative is the current situation of the entire test runner crashing (instead of giving us an option to continue regardless). Ultimately, we'll take the situation where we can do something, rather than nothing.
As such, your action is still incompatible for us. xvfb-run isn't present, which breaks the workaround as per index.js#L56. For us, we're aware of the limitations surrounding headless mode - and, for us, it's entirely fine for the context of what we need GdUnit to do.
If this is still out of scope, feel free to close this issue - we're happy to maintain our own private fork if this is a strong line in the sand 😄
However, I would say this has been a significant headache for us, considering that --headless is totally supported for builds, and headless modes for unit testing are supported by the big engines. Having a tool that intentionally triggers a crash (instead of a warning of "here be dragons! this is absolutely unsupported") is a pretty major breakage from the norm.
As such - if you are fundamentally opposed to removing the intentional hard crash instead of a warning, would it be worth adding a note about --headless causing these issues to the documentation? Thanks 💕

I understand your problem, but why do you say that the runner is crashed?
That should not be the case, when the headless mode is detected, the runner ends with a custom error and exit code 103.
To solve this problem, I suggest adding a new property --ignoreHeadlessMode to show a warning instead of the actual error and continue the processing.


Prefer built-in Math methods when available

sign, sinh, cosh, cbrt, log2.
I happened to notice CesiumMath.sign in some external code and thought "surely that's built-in"... It is.  (post-IE11 anyway)
I went through and fixed up some existing ones by comparing against the built-in list and cleaned up some code (e.g. code apparently written without knowing about exp).

@shunter, thanks for the pull request! Maintainers, we have a signed CLA from @shunter, so you can review this at any time.
:warning: I noticed that CHANGES.md has not been updated. If this change updates the public API in any way, fixes a bug, or makes any non-trivial update, please add a bullet point to CHANGES.md and comment on this pull request so we know it was updated. For more info, see the Pull Request Guidelines.

I am a bot who helps you make Cesium awesome! Contributions to my configuration are welcome.
:earth_africa: :earth_americas: :earth_asia:

Thanks @shunter!


Support for custom headers

It would be great to support setting of custom headers on the static website.
This would be useful so that people can set security headers etc on their sites, for example some standard security headers below.
It might be good to set default security headers on static websites as best practice to achieve a good score on https://securityheaders.com/ .
          {
            "key": "X-Content-Type-Options",
            "value": "nosniff"
          },
          {
            "key": "Strict-Transport-Security",
            "value": "max-age=10886400; includeSubDomains; preload"
          },
          {
            "key": "Referrer-Policy",
            "value": "same-origin"
          },
          {
            "key": "X-DNS-Prefetch-Control",
            "value": "off"
          },
          {
            "key": "X-XSS-Protection",
            "value": "1; mode=block"
          },
          {
            "key": "Feature-Policy",
            "value": "accelerometer 'none'; camera 'self'; geolocation 'none'; gyroscope 'none'; magnetometer 'none'; microphone 'self'; payment 'none'; usb 'none'"
          },

Along similar lines

X-Powered-By and Server headers should be removable (or removed by default)
Cache-Control would be handy to be customisable
For example, if a static content generator already fingerprints filenames, we can give a larger max-age and omit the ETag

Along similar lines

X-Powered-By and Server headers should be removable (or removed by default)
Cache-Control would be handy to be customisable
For example, if a static content generator already fingerprints filenames, we can give a larger max-age and omit the ETag

Being able to set via blob metadata would be useful, offers means to control it

This is something I'm very interested too!
Netlify currently supports this on their deployments and GatsbyJs even have a plugin that automatically creates a headers file!
https://docs.netlify.com/routing/headers/#syntax-for-the-headers-file
https://www.gatsbyjs.org/packages/gatsby-plugin-netlify/

Hey @jordanfinners , thanks for the great feedback! We've added a few default headers while we add the ability for users to add custom headers. Appreciate your feedback!

Besides adding custom headers, removing default headers should be supported too:

While it's nice to have such security options enabled by default, I would really like being to tune them as needed.

I agree, I'm now building an app that requires geolocation access but this is disabled by default :(
I guess there's no way to get around this, right?

Yes currently there is no way around them, our support for custom headers got delayed slightly but is still on the way. In the meantime we will soften our default security headers to avoid causing issues for you all!

@miwebst good to hear it's on the roadmap!
Does 'soften our default security headers' mean that you'll allow geolocation access at least for the 'self' scope or are they already 'softened' at the moment?

We have added the ability to add DefaultHeaders to responses, you can find the documentation here: https://docs.microsoft.com/en-us/azure/static-web-apps/routes#default-headers
For now this is part of the routes.json, in the future this file is likely to change to something more generic.

@miwebst That's great news, just managed to add a Feature-Policy header for geolocation access 👍
Thanks for the update!


MODCLUSTER-517 Upgrade jboss-parent to 21

Jira
https://issues.jboss.org/browse/MODCLUSTER-517

Triggering build using a merge of 42803b6853972c32cbaf52bf54ebbb74db98ce94 on branch master:
Private: https://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/mod_cluster-1.3.x-pull-player-executor/


[WIP] Support Authentication Enabled Artifact Repository

Codecov Report

Merging #27 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #27   +/-   ##
=======================================
  Coverage   83.17%   83.17%
=======================================
  Files          20       20
  Lines        1064     1064
=======================================
  Hits          885      885
  Misses        179      179

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 67705dc...e26ab17. Read the comment docs.


Share connections between replications

Prior to this PR, replication pools would unnecessarily hold onto idle connections. The connection pool could also block for a long period of time when terminating. This PR moves connection ownership from the connection pool to a separate process which shares connections between pools. Connections live longer than they are being used, but idle connections are periodically closed on a configurable interval.

I really like this, great job. That said, lots of comments to address before merging. Very much appreciate the multiple commits, it made reviewing much easier.

@rnewson I believe I made all the changes from your comments. I'm currently testing, adding more logging, and adding instrumentation.

@sagelywizard Nice work! Good design. It turned out simpler than I thought.
I only looked over the code so far. Added some comments, some minor nits, some edge cases and such.

I can't get this to run. It crashes immediately as waiting is not initialised. If I add waiting=dict:new() in init, things are better but all replications fail.

So, I realized there was a problem last week with the supervision. Also, I dislike that trap_exit, so I was trying to think of a way to get rid of that. I thought I'd make a comment here before writing up a fix.
We want a few constraints:

If the owner dies, we want all associated workers to die.
If the pooler dies, we want all existing async worker spawners to die.
If the pooler dies, we want all existing workers to die.
If a worker dies, we want the associated owner to die.

We currently need that trap_exit because we need the pooler to crash the worker spawners and the workers if it dies, but we need to handle 'EXIT's when the worker spawners or the workers die.
Right now, there's an awful race condition where if the pooler dies with an async worker spawner response in its inbox, it'll leave the recently created worker orphaned. If we stick all connections under a supervisor with a let everything die restart strategy and put that supervisor as well as the pooler under an one_for_all, that should take care of #3. It'll also make the trap_exit unnecessary, so we can just use monitors and untrapped links.

@sagelywizard
I dislike trap_exit in general but in a few cases, maybe like this it is not too terrible. We are spawning and managing the lifetime of worker processes so we are concerted with catching their 'EXIT's so it makes sense. For example with that flag we get a nice property that workers launched via spawn_link will die if connection pool dies. Without we might have to monitor for parent (pool's) death.
On constraints.

owner dies => all workers die  : The reason we want all workers to die and not merely returned to the pool is that socket/buffer could end up with unread data from previous owner? If somehow we could be sure a work's state can be cleaned, then we could returned it to the pool (but in reality probably not safe).

pool dies => all worker spawners die: Makes sense. Currently the spawn_link + trap_exit bit will do that, but if we use a sup, we'd have to monitor for it. Another approach is to let them live, they'd finish connecting and exit or send their result to a non-existing pool pip() and die. If this is simpler in code, then I don't see it being too terrible.

pool dies => all workers die: Yap, makes sense.

worker dies => owner dies. In general it would be left up to the owner. Maybe they want to monitor.  I know we wanted to limit our changes to the httpc_pool module, but we already made enough changes there that adding a link and unlink on acquire and relinquish might not be too bad, especially if it means one less link and unlink in the new pool process.

Is this a special case to consider as well? "owner dies => all worker spawners die" ? Or was it part of 1). In the code it might be special depending how it is done. If it is simpler, we could postulate that we should just let the worker finish opening than it will be cleaned up if it is not used.  I think this is related to the race condition you mentioned.
Looking back worker spawners made things a bit more complicated because they introduced more possible events and states that we have to consider into this system. Wondering if there is a way to make it simpler. Maybe make the owner process spawn the worker so they are blocked spawning, the tell pool, "Btw I am owner so and so and I spawned and using this worker. When I die, you can have this worker for other owners to use"?

fair points. if trap_exit/link is safer, simpler, better, let's do that.

Good idea about establishing the connection outside of the pooler proc! I think that makes things simpler.

One more -- metrics not defined.

Tested with dyno/rep. Data is replicated properly. See connections established in the logs. Monitors are cleaned up. Great work!
Made a note about possibly simplifying reference handling, but I might have also skipped some case or race condition.
Another thing I noticed is  workers exit with reason normal in many cases. So wondering if they are staying alive enough to be meaningfully re-used by others.  I the connection_close_interval to a very large value. Started a few replications with rep. When they stopped replication data, they settled on just a few change feeds. But all the other connections (used for checkpoints, fetching db info) which I expected to to be left in the table sitting un-owned simply exited.
Stats show that re-use did happen (saw acquires bumped a large enough times). We can investigate this more tomorrow.

@sagelywizard looks much, simpler! eunit tests pass

Testing with a simple replication job, I see failures -- connection pool crashes taking down everything below (well, to the right of) it.
In [1]: rep.replicate_1_to_n_and_wait_till_equal(1)
creating rdyno_src_0000001
 > created  1 dbs with prefix rdyno_src_
creating rdyno_tgt_0000001
 > created  1 dbs with prefix rdyno_tgt_
updating documents
 > _replicator rdyno_0000001_0000001 : 1-93e8a27a73420120da7f949b553cfc6d
>>> update cycle 0  <<<
 > waiting for target  1
 > function _wait_till_dbs_equal succeded after 0.055 +/- 1.0  sec.
 > waiting to propagate changes from  1 to 1  : 0.071 sec.

Logs shows _db_changes keeps restarting periodically.

+1  Tested this. It seems to work.
Applying this diff, fixes the problem of connection dying too early:
diff --git a/src/couch_replicator_connection.erl b/src/couch_replicator_connection.erl
index 7bb68b9..08140f4 100644
--- a/src/couch_replicator_connection.erl
+++ b/src/couch_replicator_connection.erl
@@ -50,6 +50,7 @@ init([]) ->
     ok = config:listen_for_changes(?MODULE, self()),
     Interval = config:get_integer("replicator", "connection_close_interval", ?DEFAULT_CLOSE_INTERVAL),
     {ok, Timer} = timer:send_after(Interval, close_idle_connections),
+    ibrowse:add_config([{inactivity_timeout, Interval}]),
     {ok, #state{close_interval=Interval, timer=Timer}}.

@@ -116,6 +117,7 @@ handle_cast({relinquish, WorkerPid}, State) ->

 handle_cast({connection_close_interval, V}, State) ->
     {ok, cancel} = timer:cancel(State#state.timer),
+    ibrowse:add_config([{inactivity_timeout, V}]),
     {ok, NewTimer} = timer:send_after(V, close_idle_connections),
     {noreply, State#state{close_interval=V, timer=NewTimer}}.

Can discuss this a bit more, perhaps, or postpone it.

That's the squerge.


MudField: Text overflow ellipsis for labels

Description
As proposed in #9574, field label styles to prevent text overflow and text wrap. instead does ellipsis. Tested locally and seems to work okay.
Before:

After:

How Has This Been Tested?
Visually tested on different docs pages.
Type of Changes

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation (fix or improvement to the website or code docs)

Checklist

[x] The PR is submitted to the correct branch (dev).
[x] My code follows the code style of this project.
[ ] I've added relevant tests.

Thanks!

Nice tweak! We had already applied a no-wrap style for this very reason.
Just a suggestion to maybe list things like this as a breaking change in the release notes in the future.  I can anticipate apps where ellipses start appearing for long labels that may have already been styled to assume they will wrap as they did in the past.


Implement copy operation for collections

iRODS does not provide a dedicated API operation for copying collections. This responsibility has traditionally been left up to clients and libraries.
Here are our choices (in no particular order):

(A) Implement this functionality directly, just like other clients (e.g. icommands)
(B) Wait for the iRODS server to provide a dedicated API operation
(C) Declare this is out of scope for the HTTP API

My current thinking is leaning towards (B) and (C).
Thoughts?

certainly doesn't need to be top of the list for HTTP API at this time.
for B), we'd be waiting for, at least, https://github.com/irods/irods/issues/7213

Got it - letting it ride.


How to set up Passive Push for cronjobs ?

⚠ Please verify that this question has NOT been raised before.

[X] I checked and didn't find similar issue

🛡 Security Policy

[X] I agree to have read this project Security Policy

📝 Describe your problem
I want to replace healthchecks.io by Kuma.
I read different issues/PR about the new push feature that would let me using Kuma to monitor the execution of my jobs (#4449 …)
I can't find enough documentation to set up the push.
The need is simple. I have cronjobs that run once per day, when a job start it pushes begin and when the job ends it pushes end.
The job is considered failed if no END was sent for a BEGIN (after x hours if possible)
If the job is successful, I'm interested to have the execution time between the BEGIN and END
How I'm supposed so setup Kuma to address this kind of need ?
I tried to send different msg=BEGIN/msg=END to the demo, but the events are not all recorded.
Should I send a status=up when the job start and a status=down when the job end instead of using msg ?
📝 Error Message(s) or Log
No response
🐻 Uptime-Kuma Version
1.23
💻 Operating System and Arch
Debian 12
🌐 Browser
Firefox
🖥 Deployment Environment

Runtime: N/A
Database: N/A
Filesystem used to store the database on: N/A
number of monitors: N/A

The job is considered failed if no END was sent for a BEGIN (after x hours if possible)

If you drop the first part and just monitor if the END is send (after x hours), that is directly supported.
I don't see the need to monitor for an arming of the monitor step.
If you really need this functionality, you can achive it via the third party api^1 and pausing the monitor.
An alternative way of phrasing your problem would be to set the montor to DOWN at the BEGIN of the cronjob and let the retry mechanism keep it from notifying you. The END sets it to UP again. Time which it can be DOWN/ in the cronjob is specified via the retry-settings and monitoring inteval.

I tried to send different msgs to the demo

Only evens considered "important" (f.ex. UP->DOWN, DOWN->UP) cause an alert and are recorded.

execution time

You can "abuse" the ping-parameter (in ms) for this, but it might not look pretty.