[nrf5] Put common code for examples in seperate directory

Problem
In the near future, we will create many example apps for many platforms, it is necessary to maintain common code at the same place.
Summary of Changes
This PR attempts to solve the problem by moving Server.cpp and some code in main.cpp to platform/nrf528xx/app, and some common utility classes such as LEDWidget to platform/nrf528xx/util.
I also moved gdb scripts to common/nrf5/gdb.
See #1259

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

@bukepo @gerickson PTAL

@erjiaqing Please sign the CLA :)


Blog article on key technical properties of sustainable software

Author: Ross (@bartlettroscoe)
CC: @curfman, @maherou, @elaineraybourn
At the RSE18 conference that I attended a few weeks ago, one attendee commented that he was looking for material on sustainable software.  Therefore, I would like to propose that we create a blog article on the key properties of sustainable software.  In fact, I have already written up an outline for it at:

https://docs.google.com/document/d/1nvuNXznqK9mZZUcILEGsNbOSoepdaJ1pOn-Tgf7sHEk

(Just request access to the document and I will provide it any IDEAS-ECP team members)
I am looking for collaborators to to help with this document.  I am fine writing the entire thing if I don't find collaborators.

@bartlettroscoe : Can you please give us access to the outline document so that we can decided how to proceed.

@rinkug asked:

@bartlettroscoe : Can you please give us access to the outline document so that we can decided how to proceed.

I just moved the document:

https://docs.google.com/document/d/1nvuNXznqK9mZZUcILEGsNbOSoepdaJ1pOn-Tgf7sHEk

into the folder "IDEAS-ECP > BSSw.io > BSSw: Pans for Content Development > Items under consideration":

https://drive.google.com/drive/folders/1SmVVzPe3Wj-KxgAtB4KAKhxHhq4NlQaA

That way, anyone in IDEAS-ECP should be able to view this.

I started a conversation with Tobias Schlauch at the DLR over a year ago about possibly collaborating on this topic.  He gave me some things to read (which I have not read yet).

Read paper https://figshare.com/articles/The_Software_Engineering_Community_at_DLR_How_we_got_where_we_are/5331703 (downloaded at C:\cygwin64\home\rabartl\IDEAS\FY18\Tobias_Schlauch\ 20170822_track1the_software_engineering_community_at_dlr.pdf),  provide comments to Tobias, rename and move to backed-up CSE folder ..
*Read paper https://www.researchgate.net/publication/319141355_Is_100_Test_Coverage_a_Reasonable_Requirement_Lessons_Learned_from_a_Space_Software_Project (downloaded at C:\cygwin64\home\rabartl\IDEAS\FY18\Tobias_Schlauch\ 2017-08profes-dlr-web.pdf), provide comments to Tobias, rename and move to backed-up CSE folder ..
Read paper https://ieeexplore.ieee.org/document/8317991/ (downloaded at C:\cygwin64\home\rabartl\IDEAS\FY18\Tobias_Schlauch\ 08317991.pdf), provide comments to Tobias, rename and move to backed-up CSE folder …
Read paper https://elib.dlr.de/120462/ (download at C:\cygwin64\home\rabartl\IDEAS\FY18\Tobias_Schlauch\ 3C28f8E7z8PIFpptAVCMef.pdf), provide comments to Tobias, rename and move to backed-up CSE folder …

Just too may things to do in ATDM to enjoy reading papers and enjoying research :-(

@bartlettroscoe : Ross, I quickly read the google article outline you wrote. I think its very useful and relevant. We have a what-is (https://bssw.io/items/what-is-sustainability) on the website but an umbrella article/s (or a series of articles introducing properties of sustainability) would be a useful addition.
In fact, the paper/slides mentioned in your article outline pointing to lessons learnt from different disciplines is also very interesting and perhaps should be curated (https://figshare.com/articles/Software_sustainability_-_lessons_learned_from_different_disciplines/6935840). Better still, we should invite Neil from SSI  for a blog on this topic.

@bartlettroscoe, In addition to your article, an article/blog from Tobais would be wonderful as well. I think we kind of broached the topic of blog at RSE18, but didnt get a chance to discuss it much.

@rinkug said:

Better still, we should invite Neil from SSI for a blog on this topic.

I think Neil already provided a blog article on the topic of sustainability:

https://bssw.io/blog_posts/making-open-source-research-software-visible-a-path-to-better-sustainability

It seems that in:

https://figshare.com/articles/Software_sustainability_-_lessons_learned_from_different_disciplines

Neil is primarily discussing the programmatic and social aspects of sustainability while my blog article would focus on the technical properties and practices related to sustainability.

FYI: I am not actually working on this yet.  We should likely move this back to "Ready for Development".


(Optional) Support access layer (Implementing an API gateway server based on C++ from scratch)

We will support the access layer for the developers who cannot accept the disconnection of clients (due to the slot range changes) when adding/removing new turms servers into a cluster at the cost of performance, complexity, and expense.
And, we still prefer the architecture without the access layer as the default architecture.

Done. https://github.com/turms-im/turms/commit/75e8b7ffb83346ef6a8cf54088012364879a09c5
But we support the access layer by turms-gateway written in Java because we can share a lot of code and it's far easier to extend in this way.


profiling: memory_info: add support for new mallinfo API

Starting with glibc 2.33 the mallinfo API is deprecated
in favor of the newer mallinfo2 which returns the exact
same struct but with size_t elements instead of int.
For reference:
https://man7.org/linux/man-pages/man3/mallinfo.3.html

Friendly ping? :smiley:


Call operator (&{}) with no results doesn't type compare

Prerequisites

[X] Write a descriptive title.
[X] Make sure you are able to repro it on the latest released version
[X] Search the existing issues.
[X] Refer to the FAQ.
[X] Refer to Differences between Windows PowerShell 5.1 and PowerShell.

Steps to reproduce
&{} -is [int]
&{} -isnot [int]

Expected behavior
I understand that when the left-hand value in the expression is a collection, the operator returns the elements of the collection that match the right-hand value of the expression. but specifically in the case there is nothing returned, I would expect a [Bool] where both statements are each other's opposite (similar to @() -is [int]):
False
True

Knowing that the following comparisons do work:
@() -is [int]
False
@() -isnot [int]
True
@{} -in 1,2,3
False
@{} -notin 1,2,3
True

Actual behavior
Nothing returned, meaning that both statements below evaluate to False:
if (&{} -is [int]) { 'True' } else { 'False' }
if (&{} -isnot [int]) { 'True' } else { 'False' }

Error details
No response
Environment data
Name                           Value
----                           -----
PSVersion                      7.4.3
PSEdition                      Core
GitCommitId                    7.4.3
OS                             Microsoft Windows 10.0.19045
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0

Workaround
Use parenthesis:
(@{}) -is [int]
False
(@{}) -isnot [int]
True

No response

Nothing returned, meaning that both statements below evaluate to False

Both returned False

Expected behavior
[Bool] as it supposed to unroll in an empty output/collection:

For the same reason, I would actually expect also the following to return True rather than 1:
As I would expect @{1} to return a scalar value:
&{1} -is [int]
1

Anyways, I am probably wrong in this...

Regardless my expectation is correct or not, any change in this will likely result in a break change. Therefore a PSScriptAnalyzer rule like "use parentheses when type comparing the result a call operator" would probably more in place. (Please confirm.)

&{} -is [int]
&{} -isnot [int]

Perhaps it is worth understanding what the & operator does
& command [argument list ...] [&]

So you are basically passing -is [int] and -isnot [int] as arguments to an empty script block.
Lets see what happens if we handle the parameters
PS> &{param($is) $is} -is [int]
[int]
PS> &{param($isnot) $isnot} -isnot [int]
[int]

So the -is and -isnot are not behaving as operators but as simple arguments for the scriptblock.

To summarize @rhubarb-geek-nz's comment:

Use of &, the call operator, starts a command and is therefore parsed in argument mode; what follows the command name / path is invariably interpreted as arguments to pass to the former.

As with any command, if you want it to participate in an expression, you need to enclose it in (...)


12 of 24:00 by 00

Date / Time Picker displays 12 in the inner ring, should be 0 #24: it would be ideal to replace the 12 of 24:00 by 00

Would it be possible to merge this?
This bug looks pretty bad for locales with 24h format.

Still nothing here?


Could be nice to be able to choose te final status

Is your feature request related to a problem? Please describe.
Why is the final status of the payment as "pending" and not "paid".
Describe the solution you'd like
Could it be possible to have an option in the module configurations ?
Designs
By simply add an option like with "Uuden tilauksen tila" but for final success status.
Describe alternatives you've considered
Perhaps is there an another reason for the pending instead of paid ?

If it can help, I'm open to post a pull request about it.

@ajira86 Thanks for creating the suggestion! If you are interested in creating a pull request, we can review it and get back to you.


Using this library with Bottom Navigation

Hello,
I've currently worked through you example and have been able to incorporate the scan and connect functionality into my app.  I am currently using a bottom Navigation app structure, where one of my bottom menu items takes the user to a fragment that allows them to set up the connection and separate bottom menu items are different fragments where data can be sent.  I've tried to setup the connection variable of type BluetoothConnection in my shared viewModel.  However, whenever I navigate to a new fragment to send data, the connection variable pulled from the shared view model is null.
Is there an easy way to set this up using a shared view model?
Thanks!
Swarandeep Singh

Hello,
I realized a didn't setup the connection in the new fragment.   I ended up  setting up the connection in the onCreate of the new fragments via a lifecycleScope scoped coroutine.  As I'm new to app development, I'm wondering if this will cause any unintended consequences?
Thanks,
Swarandeep Singh

Hello there,
You should be able to use a shared view model to store the connection.
There must be something turning it into null.
Are you using some sort of dependency injection?


OSError: [Errno 2] No such file or directory: '/usr/local/lib/python2.7/dist-packages/crackmapexec-5.0.1.dev0-py2.7.egg/cme/thirdparty'

Describe the bug
I receive the following error when I run crackmapexec:
(CrackMapExec) root@kali:/opt/CrackMapExec# crackmapexec
Traceback (most recent call last):
  File "/usr/local/bin/crackmapexec", line 11, in <module>
    load_entry_point('crackmapexec==5.0.1.dev0', 'console_scripts', 'crackmapexec')()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2852, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2443, in load
    return self.resolve()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2449, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/local/lib/python2.7/dist-packages/crackmapexec-5.0.1.dev0-py2.7.egg/cme/__init__.py", line 10, in <module>
    for module in os.listdir(thirdparty_modules):
OSError: [Errno 2] No such file or directory: '/usr/local/lib/python2.7/dist-packages/crackmapexec-5.0.1.dev0-py2.7.egg/cme/thirdparty'

To Reproduce
Steps to reproduce the behavior:

run crackmapexec from Terminal

Expected behavior
No errors
Screenshots
If applicable, add screenshots to help explain your problem.
Crackmapexec info

OS: Linux kali 5.5.0-kali2-amd64 #1 SMP Debian 5.5.17-1kali1 (2020-04-21) x86_64 GNU/Linux
Version of CME: pulled via git clone; I believe 5.0.1dev
Installed from apt or using latest release ? Latest

Additional context
I had to run the install commands with sudo since I have a local user on Kali.

You didn't even take the time to read the wiki ... If you can't read the wiki there is a binary for you
https://github.com/byt3bl33d3r/CrackMapExec/issues/355#issuecomment-621382915

You didn't even take the time to read the wiki ... If you can't read the wiki there is a binary for you
#355 (comment)

Thanks, I misread the wiki the first time apparently and missed the first portion that mentioned the binaries. I downloaded one and it is working. Thanks for your help!


docs: build mcap.dev site with docusaurus

Public-Facing Changes

Description

What's a good way to preview these docs?

It looks like either:

stick with docusaurus v2 and use Vercel
Use docusaurus v1, which is apparently a "pure" static site generator, not a SPA

If you just want to look at it now, clone, cd docusaurus-docs && yarn install && yarn start

I tested the deployment at https://mcap-docs-preview-96cgxqbo7-foxglove.vercel.app/ , looks great.
Obviously still lots of content to figure out, but this feels like a really good navigation hierarchy (e.g. left and right navs), and it looks like you fixed the SPA URLs on the vercel deploy.
I'm feeling much better about this than readme.io, cleaner having all the doc generation in our own hands 👌
I would suggest stripping the content down to a minimal "good" starting point, so we can focus on landing this first then make PRs to improve the content over time.

Closing in favour of #518

Closing in favour of #518

Reopening for comparison with #518


[BUG]: docker image crashes

How are you running AnythingLLM?
Docker (local)
What happened?
docker pull mintplexlabs/anythingllm

export STORAGE_LOCATION=/mnt/intRaid_/anythingllm

touch "$STORAGE_LOCATION/.env"

ls /mnt/intRaid_/anythingllm/ -latr

docker run -d -p 3001:3001 --cap-add SYS_ADMIN -v ${STORAGE_LOCATION}:/app/server/storage -v ${STORAGE_LOCATION}/.env:/app/server/.env -e STORAGE_DIR="/app/server/storage" mintplexlabs/anythingllm

crashes
docker logs a7a0dff32a25023fcd7b3ce57f976f643ca067e850563096fde9eca740b0e726

[collector] info: Collector hot directory and tmp storage wiped!
[collector] info: Document processor app listening on port 8888
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
✔ Generated Prisma Client (v5.3.1) to ./node_modules/@prisma/client in 1.17s
Start using Prisma Client in Node.js (See: https://pris.ly/d/client)
import { PrismaClient } from '@prisma/client'
const prisma = new PrismaClient()
or start using Prisma Client at the edge (See: https://pris.ly/d/accelerate)
import { PrismaClient } from '@prisma/client/edge'
const prisma = new PrismaClient()
See other ways of importing Prisma Client: http://pris.ly/d/importing-client
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": SQLite database "anythingllm.db" at "file:../storage/anythingllm.db"
Error: Schema engine error:
SQLite database error
unable to open database file: ../storage/anythingllm.db
Are there known steps to reproduce?
Steps to Reproduce the Error
docker pull mintplexlabs/anythingllm

export STORAGE_LOCATION=/mnt/intRaid_/anythingllm

ls /mnt/intRaid_/anythingllm

touch "$STORAGE_LOCATION/.env"

docker run -d -p 3001:3001 --cap-add SYS_ADMIN -v ${STORAGE_LOCATION}:/app/server/storage -v ${STORAGE_LOCATION}/.env:/app/server/.env -e STORAGE_DIR="/app/server/storage" mintplexlabs/anythingllm

docker logs <container_id>

python 3.10
oracle linux 8

fixed
chmod -R 777 /mnt/{whereve you are mounting using -v}
https://github.com/Mintplex-Labs/anything-llm/issues/1996


Explicitly close unused agents to free memory space?

❓ Questions and Help
I initialize lots of agents by this_agent = sim.initialize_agent(sim_settings["default_agent"]). When my code is running, some of my agents that were initialized a long time ago are obsolete. So I manually close them by this_agent.close(). If I don't do close() explicitly and continue initializing agents, I assume that my memory will be filled up?

For clarification, sim.initialize_agent does not create a new agent, it sets the specified agent to an initial state (or generates a random one if a state isn't provided) and returns a reference to that agent so unless you are also recreating/reconfiguring the simulator also, you will just have many references to the same agent.
To answer your question, the agent does use a little bit of GPU memory for the rendering buffers for its sensors (this is what .close() explicitly frees), so you many need to call .close() depending on what you are doing.


Feat: Add Singlestore Engine Adapter

Very WIP now but is functional. Had some issues with typing imports not resolving hence the Any.
TODO:

[ ] Add tests
[ ] Add SQLGlot dialect to support physical properties for SORT & SHARD keys

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

Hey @nicosuave , thanks for your PR.
We can give this a closer review once the SQLGlot dialect is available and you can base the SingleStoreEngineAdapter off it and get the tests passing. So far it looks like you're on the right track!
Also, for ongoing maintenance, we will need access to a SingleStore instance to run the integration tests against and to test new features. Is that something you can arrange?

Thanks @erindru

We can give this a closer review once the SQLGlot dialect is available and you can base the SingleStoreEngineAdapter off it and get the tests passing. So far it looks like you're on the right track!

Could you or someone on the team point me in the right direction as to where to add a new key / index type in a SQLGlot dialect? I saw the token mapping dict, but that didn't seem like quite enough.

Also, for ongoing maintenance, we will need access to a SingleStore instance to run the integration tests against and to test new features. Is that something you can arrange?

Do you know the size of the test dataset? I think a Singlestore Helios cloud trial account should suffice https://www.singlestore.com/cloud-trial/

If running locally in CI with Docker is preferred, I can also provide a license key (at least for some time).

Could you or someone on the team point me in the right direction as to where to add a new key / index type in a SQLGlot dialect? I saw the token mapping dict, but that didn't seem like quite enough.

@VaggelisD or @georgesittas are you able to assist here?

Do you know the size of the test dataset? I think a Singlestore Helios cloud trial account should suffice https://www.singlestore.com/cloud-trial/

The test datasets are very small, we mostly focus on correctness at this stage. So a test run will issue hundreds / thousands of individual queries but will not load large amounts of data. I havent analyzed the limitations of your free tier but if its just based on data size then we are unlikely to exceed it

If running locally in CI with Docker is preferred, I can also provide a license key (at least for some time)

We support a bunch of cloud-only databases (BigQuery, Snowflake, Redshift, Athena etc) so adding another one is not a big deal. If a license key is required, then there is little benefit to running it locally in Docker vs just running against a hosted cloud instance

Hey 👋

Could you or someone on the team point me in the right direction as to where to add a new key / index type in a SQLGlot dialect? I saw the token mapping dict, but that didn't seem like quite enough.

Can you elaborate on what you mean by "key / index type" here? What's an example of that?

it's just custom single store ddl, it's like create table ( x key ...)

I see, so if I understand correctly, it's this bit in the syntax docs:
<create_definition>:
...
| { INDEX | KEY } [<index_name>] [<index_type>] (<index_col_name>,...)

If that's the case, I think it's already supported in sqlglot's parser (based on some tests I'm seeing). Happy to provide more detailed assistance, though I think I'll need some more context on what exactly needs to be implemented here so I can guide accordingly.

Thanks @georgesittas I'll take a closer look at the processing of physical properties; I assume that's the next spot to integrate

I have made some progress; was just struggling with the test suite a bit

closing due to inactivity


Intenllisense for init.lua

I am shifting from neovim to vscode and in my neovim config I configured sumneko and used hrsh7th/cmp-nvim-lua to get autocomplete when editing my nvim dot files but vscode-neovim is getting completions from vscode.
I managed to kinda replicate sumneko's behaviour  but I can't get complete for vim.* which came from cmp-nvim-lua plugin, is there a way to get something similar to that plugin's behaviour or better yet something that combines completion from both lsp and neovim?

install https://marketplace.visualstudio.com/items?itemName=sumneko.lua
run lua=vim.api.nvim_get_runtime_file("", true) to get runtime path
Add runtime path to settings.json, ex:

  "Lua.workspace.library": ["/usr/share/nvim/runtime/"],
  "Lua.diagnostics.globals": ["vim"]

profit


Extra output on first run

On the first execution, when the jenv.config file doesn't exist, some extra text is printed to console:
jenv list                                                                             0ms

    Directory: C:\Users\<me>\AppData\Roaming

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d----          17/04/2012    01:33                JEnv
__JEnvs__

I think it's missing a | Out-Null here.

oh. i thought i already catched that one. i will look into your issues as fast as possible but I do not have much time lately


Clarify in docs that interactive does not display the result.

Fixes #1198.

@ned2 - does this look better? Do you have a suggestion of how else we can make this clearer?


Bug: Login and password on the login page will not be cleared if it closes

Fixed by a0ec386 commit


Auto scroll on click of message action in history to view the new incoming message

Hi,
I have fixed the "No Auto scroll" issue #1031
This fix will make the chat auto scroll to view the new incoming message.
I am new to this architecture and would love some suggestions if this is not the right way to fix this issue.

Hi there! Thank you so much for this submission -- I'm sorry we didn't get to it in a timely manner. This feature has actually been implemented in v4, so I am closing this issue.


ValueError("arange's arguments must be of type tl.constexpr")

Repro:
from ctypes import c_void_p, c_long
import torch
import math
import random
import os
import tempfile
from math import inf, nan

from torch import device, empty, empty_strided
from torch._inductor.codecache import AsyncCompile
from torch._inductor.select_algorithm import extern_kernels

async_compile = AsyncCompile()

# kernel path: /tmp/torchinductor_binbao/c6/cc6zzr4utolgv4xkelihacaj4tao7d3rwarksyynltyjdwgx2cyd.py
# Source Nodes: [tmp], Original ATen: [aten.add]
# tmp => add
triton_poi_fused_add_0 = async_compile.triton('triton_', '''
import triton
import triton.language as tl
from torch._inductor.ir import ReductionHint
from torch._inductor.ir import TileHint
from torch._inductor.triton_heuristics import AutotuneHint, pointwise
from torch._inductor.utils import instance_descriptor
from torch._inductor import triton_helpers

@pointwise(
    size_hints=[8],
    filename=__file__,
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: 'i32'}, 'device': 0, 'device_type': 'cuda', 'constants': {}, 'configs': [instance_descriptor(divisible_by_16=(0, 1), equal_to_1=(), ids_of_folded_args=(), divisible_by_8=())]},
    inductor_meta={'autotune_hints': set(), 'kernel_name': 'triton_poi_fused_add_0', 'mutated_arg_names': []},
    min_elem_per_thread=0
)
@triton.jit
def triton_(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):
    xnumel = 5
    xoffset = tl.program_id(0) * XBLOCK
    xindex = xoffset + tl.arange(0, XBLOCK)[:]
    xmask = xindex < xnumel
    x0 = xindex
    tmp0 = tl.load(in_ptr0 + (x0), xmask)
    tmp1 = 1.0
    tmp2 = tmp0 + tmp1
    tl.store(out_ptr0 + (x0), tmp2, xmask)
''')

import triton
import triton.language as tl
from torch._inductor.triton_heuristics import grid, start_graph, end_graph
from torch._C import _cuda_getCurrentRawStream as get_cuda_stream

# Original path: /home/binbao/local/pytorch-triton/torch/testing/_internal/triton_utils.py:13
add_kernel_0 = async_compile.triton('add_kernel', '''
import triton
import triton.language as tl
from torch._inductor.utils import instance_descriptor
from torch._inductor.triton_heuristics import user_autotune

@user_autotune(
    configs=[],
    inductor_meta={'kernel_name': 'add_kernel_0'},
    triton_meta={'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: 'i32', 4: 'i32'}, 'device': 0, 'device_type': 'cuda', 'constants': {}, 'configs': [instance_descriptor(divisible_by_16=(0, 1, 2, 4), equal_to_1=(), ids_of_folded_args=(), divisible_by_8=(4,))]},
    filename=__file__
)
@triton.jit
def add_kernel(
    in_ptr0,
    in_ptr1,
    out_ptr,
    n_elements,
    BLOCK_SIZE: tl.constexpr,
):
    pid = tl.program_id(axis=0)
    block_start = pid * BLOCK_SIZE
    offsets = block_start + tl.arange(0, BLOCK_SIZE)
    mask = offsets < n_elements
    x = tl.load(in_ptr0 + offsets, mask=mask)
    y = tl.load(in_ptr1 + offsets, mask=mask)
    output = x + y
    tl.store(out_ptr + offsets, output, mask=mask)
''')

async_compile.wait(globals())
del async_compile

def call(args):
    arg0_1, arg1_1, arg2_1 = args
    args.clear()
    def grid_wrapper_for_add_kernel_0(meta):
        return (5, 1, 1)
    with torch.cuda._DeviceGuard(0):
        torch.cuda.set_device(0) # no-op to ensure context
        buf0 = empty((5, ), device='cuda', dtype=torch.float32)
        # Source Nodes: [tmp], Original ATen: [aten.add]
        stream0 = get_cuda_stream(0)
        triton_poi_fused_add_0.run(arg1_1, buf0, 5, grid=grid(5), stream=stream0)
        # Source Nodes: [triton_kernel_wrapper_mutation], Original ATen: []
        add_kernel_0.run(in_ptr0=arg1_1, in_ptr1=arg2_1, out_ptr=arg0_1, n_elements=5, BLOCK_SIZE=16, grid=grid_wrapper_for_add_kernel_0, stream=stream0)
        del arg0_1
        del arg1_1
        del arg2_1
        return (buf0, )

def benchmark_compiled_module(times=10, repeat=10):
    from torch._dynamo.testing import rand_strided
    arg0_1 = rand_strided((5, ), (1, ), device='cuda:0', dtype=torch.float32)
    arg1_1 = rand_strided((5, ), (1, ), device='cuda:0', dtype=torch.float32)
    arg2_1 = rand_strided((5, ), (1, ), device='cuda:0', dtype=torch.float32)
    return call([arg0_1, arg1_1, arg2_1])

if __name__ == "__main__":
    from torch._inductor.wrapper_benchmark import compiled_module_main
    compiled_module_main('None', benchmark_compiled_module)

Error:
Traceback (most recent call last):
  File "/home/binbao/local/triton/python/triton/compiler/code_generator.py", line 1150, in ast_to_ttir
    generator.visit(fn.parse())
  File "/home/binbao/local/triton/python/triton/compiler/code_generator.py", line 1035, in visit
    ret = super().visit(node)
  File "/home/binbao/local/miniconda3/envs/triton/lib/python3.10/ast.py", line 410, in visit
    return visitor(node)
  File "/home/binbao/local/triton/python/triton/compiler/code_generator.py", line 293, in visit_Module
    ast.NodeVisitor.generic_visit(self, node)
  File "/home/binbao/local/miniconda3/envs/triton/lib/python3.10/ast.py", line 418, in generic_visit
    self.visit(item)
  File "/home/binbao/local/triton/python/triton/compiler/code_generator.py", line 1035, in visit
    ret = super().visit(node)
  File "/home/binbao/local/miniconda3/envs/triton/lib/python3.10/ast.py", line 410, in visit
    return visitor(node)
  File "/home/binbao/local/triton/python/triton/compiler/code_generator.py", line 365, in visit_FunctionDef
    self.visit_compound_statement(node.body)
  File "/home/binbao/local/triton/python/triton/compiler/code_generator.py", line 288, in visit_compound_statement
    ret_type = self.visit(stmt)
  File "/home/binbao/local/triton/python/triton/compiler/code_generator.py", line 1035, in visit
    ret = super().visit(node)
  File "/home/binbao/local/miniconda3/envs/triton/lib/python3.10/ast.py", line 410, in visit
    return visitor(node)
  File "/home/binbao/local/triton/python/triton/compiler/code_generator.py", line 417, in visit_Assign
    values = self.visit(node.value)
  File "/home/binbao/local/triton/python/triton/compiler/code_generator.py", line 1035, in visit
    ret = super().visit(node)
  File "/home/binbao/local/miniconda3/envs/triton/lib/python3.10/ast.py", line 410, in visit
    return visitor(node)
  File "/home/binbao/local/triton/python/triton/compiler/code_generator.py", line 469, in visit_BinOp
    rhs = self.visit(node.right)
  File "/home/binbao/local/triton/python/triton/compiler/code_generator.py", line 1035, in visit
    ret = super().visit(node)
  File "/home/binbao/local/miniconda3/envs/triton/lib/python3.10/ast.py", line 410, in visit
    return visitor(node)
  File "/home/binbao/local/triton/python/triton/compiler/code_generator.py", line 964, in visit_Call
    return fn(*args, **extra_kwargs, **kws)
  File "/home/binbao/local/triton/python/triton/language/core.py", line 29, in wrapper
    return fn(*args, **kwargs)
  File "/home/binbao/local/triton/python/triton/language/core.py", line 829, in arange
    return semantic.arange(start, end, _builder)
  File "/home/binbao/local/triton/python/triton/language/semantic.py", line 500, in arange
    raise ValueError("arange's arguments must be of type tl.constexpr")
ValueError: arange's arguments must be of type tl.constexpr

I was able to bisect it to https://github.com/openai/triton/pull/2556

This Triton reproducer fails for me with the same error at f88b01f558df06f010a869e01473253a5f5cd8db, which is before https://github.com/openai/triton/pull/2556.

The Triton reproducer also fails for me at 053af4e9f8f005e1bc3f8ac9bf285eaf0ac9bf72, which is from April.

Phil asked me to check at da40a1e984bf57c4708daf603eb427442025f99b, which is the current release/2.1.x branch.  Fails in the same way.

solved by https://github.com/pytorch/pytorch/pull/114914

how to solve it？

Subject: Urgent Help Needed: ValueError in My Code
Dear All,
I hope this message finds you well. I’m encountering an issue in my code and would greatly appreciate any assistance you can provide. The specific error message I’m seeing is:
scss
复制代码
ValueError("arange's arguments must be of type tl.constexpr")
I'm quite anxious to resolve this, as it's blocking my progress. I’ve tried a few solutions but haven’t been able to fix it yet. Any advice or suggestions would be immensely appreciated!
Thank you so much for your help!
Best regards

Subject: Urgent Help Needed: ValueError in My Code
Dear All,
I hope this message finds you well. I’m encountering an issue in my code and would greatly appreciate any assistance you can provide. The specific error message I’m seeing is:
ValueError("arange's arguments must be of type tl.constexpr")
I'm quite anxious to resolve this, as it's blocking my progress. I’ve tried a few solutions but haven’t been able to fix it yet. Any advice or suggestions would be immensely appreciated!
Thank you so much for your help!
Best regards

triton-only repro
from ctypes import c_void_p, c_long
import torch
import math
import random
import os
import tempfile
from math import inf, nan

import triton
import triton.language as tl

@triton.jit
def add_kernel_triton(
    in_ptr0,
    in_ptr1,
    out_ptr,
    n_elements,
    BLOCK_SIZE: tl.constexpr,
):
    pid = tl.program_id(axis=0)
    block_start = pid * BLOCK_SIZE
    offsets = block_start + tl.arange(0, BLOCK_SIZE)
    mask = offsets < n_elements
    x = tl.load(in_ptr0 + offsets, mask=mask)
    y = tl.load(in_ptr1 + offsets, mask=mask)
    output = x + y
    tl.store(out_ptr + offsets, output, mask=mask)

triton_meta = {'signature': {0: '*fp32', 1: '*fp32', 2: '*fp32', 3: 'i32', 4: 'i32'}, 'device': 0, 'device_type': 'cuda', 'constants': {}, 'num_warps': 4, 'num_stages': 2, 'debug': True}
triton.compile(add_kernel_triton, **triton_meta)

Subject: Urgent Help Needed: ValueError in My Code
Dear All,
I hope this message finds you well. I’m encountering an issue in my code and would greatly appreciate any assistance you can provide. The specific error message I’m seeing is:
ValueError("arange's arguments must be of type tl.constexpr")
I'm quite anxious to resolve this, as it's blocking my progress. I’ve tried a few solutions but haven’t been able to fix it yet. Any advice or suggestions would be immensely appreciated!
Thank you so much for your help!
Best regards

BLOCK_SIZE should be in the constants part of the metadata, and not in the signature. You are compiling it with BLOCK_SIZE as a runtime value.

BLOCK_SIZE should be in the constants part of the metadata, and not in the signature. You are compiling it with BLOCK_SIZE as a runtime value.

Could you explain in more details?

Peter’s response is about the original question, I think.
Your question asks about the same error message, but your issue is probably unrelated to the original question in this GitHub issue; the original question was related to inductor usage of Triton, which was fixed last year already.
In your case, unless you’re using inductor or using some other unusual setup, you’re most likely just passing a value into tl.arange that is not marked as tl.constexpr. If you have more questions about what this means, you could probably open a new issue and provide some more details, such as the code you’re writing that throws this error, and the full stacktrace for the exception.


[bug]: Input field not forwarded when it's in another wrapper/hoc file

Describe the bug
Hi,
In my project, I created a wrapper component that consists of FormField along with Input component.
The issue is, props that I set in the custom component is not being forwarded to the wrapper component, such as the onChange method.
LoginForm.tsx
const LoginForm = () => {
   const form = useForm<z.infer<typeof LoginSchema>>({
    resolver: zodResolver(LoginSchema),
    defaultValues: {
      email: "",
      password: ""
    }
  });

return (
    <Form {...form}>
        <form
          onSubmit={form.handleSubmit(onSubmit)}
        >
          <FormInput
            control={form.control}
            name="email"
            label="Email"
            type="text"
            placeholder="Email"
            onChange={() => console.log("asdasd")}
            id="email"
            required
          />
      </form>
   </Form>
);

};

FormInput.tsx
const FormInput = (props) => {
   return (
      <FormField
        control={control}
        name={name || ""}
        render={({ field }) => (
             <FormItem>
                 <FormControl>
                   <Input
                     {...field}
                      variant={hasError ? "danger" : "default"}
                      type={type}
                      placeholder={placeholder}
                    />
             </FormItem>
        )}
      />
   );
}

Anyone knows the issue? Thanks
Affected component/components
Input
How to reproduce

Create a wrapper component that consists of
Display that component in another component

Codesandbox/StackBlitz link
No response
Logs
No response
System Info
MacOS, Arc Browser.

Before submitting

[X] I've made research efforts and searched the documentation
[X] I've searched for existing issues

You are passing the props to FormInput but you are not using it.
Since you are using typescript lets re-write the code in strong type kinda way:
Try this instead:
LoginForm
'use client'
import { Form } from '@/components/ui/form'
import { zodResolver } from '@hookform/resolvers/zod'
import { useForm } from 'react-hook-form'
import { z } from 'zod'
import { FormInput } from './FormInput'
import { Button } from '@/components/ui/button'

export const LoginSchema = z.object({
  email: z.string(),
  password: z.string(),
})

const LoginForm = () => {
  const form = useForm<z.infer<typeof LoginSchema>>({
    resolver: zodResolver(LoginSchema),
    defaultValues: {
      email: '',
      password: '',
    },
  })

  const onSubmit = (data: z.infer<typeof LoginSchema>) => {
    //Handle submition result
    console.log(data)
  }

  return (

      <Form {...form}>
        <form onSubmit={form.handleSubmit(onSubmit)} className="space-y-4">
          <FormInput
            control={form.control}
            name="email"
            label="Email"
            type="text"
            placeholder="Enter your email"
            id="email"
            required
          />
          <FormInput
            control={form.control}
            name="password"
            label="Password"
            type="password"
            placeholder="Enter your Password"
            id="password"
            required
          />
          <Button type="submit">Login</Button>
        </form>
      </Form>

  )
}

export default LoginForm

import { FormControl, FormField, FormItem } from '@/components/ui/form'
import { Input } from '@/components/ui/input'
import { cn } from '@/lib/utils'
import { Control } from 'react-hook-form'
import { LoginSchema } from './LoginForm'
import { z } from 'zod'

interface FormInputProps {
  control: Control<z.infer<typeof LoginSchema>>
  name: keyof z.infer<typeof LoginSchema>
  type: string
  required?: boolean
  id?: string
  label?: string
  placeholder?: string
  hasError?: boolean
}

export const FormInput = (props: FormInputProps) => {
  const { control, name, type, hasError, placeholder, id, required } = props
  return (
    <FormField
      control={control}
      name={name}
      render={({ field }) => (
        <FormItem>
          <FormControl>
            <Input
              {...field}
              id={id}
              required={required}
              //variant={hasError ? "danger" : "default"} assuming you have configured variants
              className={cn(hasError && 'border-red-500 ring-red-500')} // if you havent configured the variant you can use classes name
              type={type}
              placeholder={placeholder}
            />
          </FormControl>
        </FormItem>
      )}
    />
  )
}

This will insure your props is passed and is being used correctly, here is a screenshot for when submitting the form:

I hope thats help!

@OmarAljoundi Hey Omar, my current code resembles yours closely. The onSubmit function worked perfectly, but there were some issues with certain props like onChange and onBlur not being forwarded.
I ended up made updates to the FormInput component as shown below:
"use client";
import { Control } from "react-hook-form";
import { Input, InputProps } from "@/components/ui/input";
import {
  FormControl,
  FormDescription,
  FormField,
  FormItem,
  FormLabel,
  FormMessage
} from "@/components/ui/form";
import { ChangeEvent, FocusEvent, ReactNode } from "react";

export interface FormInputProps extends InputProps {
  label: string;
  helper?: string | ReactNode;
  control?: Control<any>;
  onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
  onBlur?: (event: FocusEvent<HTMLInputElement>) => void;
  onFocus?: (event: FocusEvent<HTMLInputElement>) => void;
}

const FormInput = ({
  label,
  name,
  type,
  placeholder,
  control,
  required,
  helper,
  onChange,
  onBlur,
  onFocus
}: FormInputProps) => {
  const fieldState = control?.getFieldState(`${name}`);
  const hasError = !!fieldState?.error;
  const hasErrorMessage = !!fieldState?.error?.message;

  return (
    <FormField
      control={control}
      name={name || ""}
      render={({ field }) => (
        <FormItem>
          <FormLabel>
            {label}
            {required && *}
          </FormLabel>
          <FormControl>
            <Input
              variant={hasError ? "danger" : "default"}
              type={type}
              placeholder={placeholder}
              {...field}
              onChange={(event) => {
                if (onChange) onChange(event);
                field.onChange(event);
              }}
              onBlur={(event) => {
                if (onBlur) onBlur(event);
                field.onBlur();
              }}
              onFocus={(event) => {
                if (onFocus) onFocus(event);
              }}
            />
          </FormControl>
          {!hasErrorMessage && <FormDescription>{helper}</FormDescription>}
          <FormMessage className="text-xs font-normal" />
        </FormItem>
      )}
    />
  );
};

export default FormInput;

FYI, I utilized control?: Control<any>; because of the component's reusability concern.
Thanks


Phantomjs 1.9.8 crashing

I'm controlling phantomjs from nodejs and scrolling down a page to load some dynamically loaded items.
Phantomjs often crashes in this scenario, sometimes very quickly, sometimes later.
Here is the stack trace.
http://pastebin.com/raw.php?i=aiAwLdFm

My guess is that it has something to do with resource received event or function.

This issue has been fixed in PhantomJS 2.


Access selection from python process?

Largely a question, possibly a feature request. I see that there are a bunch of arguments around selection for functions like df.hvplot.scatter. If I add a lasso tool to my plot, is it possible for me to access the selected points from the python process?
I'm under the impression this is possible in holoviews, but I'm not familiar enough with that library to tell if that feature is available here.
Thanks!

Yes, you can use HoloViews streams for that purpose; e.g. see http://holoviews.org/reference/apps/bokeh/selection_stream.html. hvplot returns HoloViews objects, so anything you see at holoviews.org will apply to the results of an hvplot call.  Streams are covered in several different user guides at holoviews.org, so you may have to look around for a bit to find the particular thing you want to do.

Right, if all you want to do is to access the selected data you can do something like this:
scatter = df.hvplot.scatter(...)
sel = Selection1D(source=scatter)
scatter

and in a new cell after a selection has been made:
selection_df = scatter.iloc[sel.index].dframe()

I'm not sure what's in your hvplot.scatter call so I didn't suggest the simpler df.iloc[sel.index].

Thanks! That's really useful!


Warning is shown in built bundle (Classic mode for store/ is deprecated and will be removed in Nuxt 3).

Version
v2.4.5
Reproduction link
https://codesandbox.io/s/jjyz70wpm3
Steps to reproduce
N/A

What is expected ?
No warning in built bundle.
What is actually happening?
Warning "Classic mode for store/ is deprecated and will be removed in Nuxt 3" is shown for https://nuxtjs.org/guide/vuex-store/#classic-mode.
Additional comments?
How can I prevent showing this warn?

This bug report is available on Nuxt community (#c8756)

how to solve this problem

See #4912


Sanity checks for input arrays delayed in async code

In #1565, a sanity check for the rgb flag was added to the on_chunk_loaded method of the Image layer, see:
https://github.com/napari/napari/blob/67eb6908f77d93d064a69a6b4f6b48034ac60a90/napari/layers/image/image.py#L628-L633
In other words, this check is not done on layer creation, but rather every time that a chunk loads, which seems like overkill — it only needs to happen once, on the first load.
One idea would be to have single "verify correct load" method that is called asynchronously at layer creation time. This method would not be cancellable, it would always execute before the first actual "show". This gives us a chance to catch errors gracefully (rather than e.g. having NumPy broadcasting errors in random places), without cluttering the chunk loading code.
See this discussion for details.

Yes, there must be a much better way to do this. I just threw that in because without the error was very confusing. The error gave no indication the problem was RGB related, at least by my memory. It was a while ago.
Reproducing the error is probably the first step. And attaching it here. I think with async the "guess RGB" is not run on load. So you have to trust the user to set the "rgb" flag correctly. But they can set it incorrectly.
This is semi-related to something I've been ignoring. Which probably should be a separate issue. Sometimes on start Napari will access/load a bunch of slices right away. Maybe to determine the contrast limit? Like RGB this is maybe something that we might need to change for async. Maybe do it more on-the-fly as the data comes in?
Both issues are sort of dealing with the fallout of async. Rather than async loads itself. But certainly both need to be addressed. And I suspect there's much more "fallout" once people start using it.

In other words, this check is not done on layer creation, but rather every time that a chunk loads, which seems like overkill — it only needs to happen once, on the first load.

@jni, see might comment here though about the fact that data can change dimensionality after the layer has been created, so this might actually be a little more complex, and we might need to keep checking more frequently. Comment posted below.

I agree, something feels funny here, but it could represent something deeper than rgb/ async that we want to consider even more now. We do have it so that you can change the dimensionality of the image data by modifying the data property, similarly the multiscale/ rgb too, but I'm not sure if we should allow that - i.e. once you create a layer should the dimensionality/ rgb/ multiscale be fixed, this could dramatically simplify lots of things, while being a reasonable restriction in functionality. In the absence of this restriction, I think the checks that @pwinston has here might be critical and we might need more for "dimensionality changes" too.

This rgb check was removed in #1659 and so this can be closed. If we need to revisit this topic we can reopen this issue or create a new one


Move addons to something like mead_addons

Right now we have addons that are just installed by pip when you pip install the package. This could cause problems, because this isn't registered on pypi is there is another package called addons we will clobber it, also if other projects we have like hpctl or xpctl have addons they will step on each other.
This should be renamed to something like mead_addons or moved inside the main baseline source tree and imported with baseline.addons

We now have https://github.com/mead-ml/hub/ which should eclipse the need to ship addons with baseline itself.


Update/Add [tool name]

Tool information

Tool name:
Tool license:
Add or update?
Desired version:
Approximate size:
If this is an add request:

Brief description of tool:
URL for tool's homepage:

Area for Triage:

Question, Bug, or Feature?:

Virtual environments affected

[ ] macOS 10.15
[ ] Ubuntu 16.04 LTS
[ ] Ubuntu 18.04 LTS
[ ] Windows Server 2016 R2
[ ] Windows Server 2019

Can this tool be installed during the build?

Tool installation time in runtime

Are you willing to submit a PR?

Hi @Kleinzs!
Could you please update the description with corresponding values?

I'm going to close the issue since no description provided.


Xcode projects

Since we supply Visual Studio projects, I thought we might want to supply Xcode projects as well.
The user has to supply zlib and fltk (if building playexr). I have an "xcode" branch in my fork that has zlib and fltk included if you want to skip that step.
Once that's done, you should be able to build OpenEXR libraries and the various command line utilities with a click.

OpenEXR builds reliably on macOS using cmake these days.


Error while automated test cases using VS and Selenium : Microsoft.TeamFoundation.DistributedTask.Task.TestExecution.NoTestPointsException: No automated test cases were found matching the specified test plan, test suites, test configuration. Ensure that right values were specified and try again.

Note
I have automated test cases using VS and Selenium and trying to run automated testcases from testplan, and this is the error i am getting: Microsoft.TeamFoundation.DistributedTask.Task.TestExecution.NoTestPointsException: No automated test cases were found matching the specified test plan, test suites, test configuration. Ensure that right values were specified and try again.

I have two test cases in that test plan. I have the status as Automated and both are associated to the automated test case in our solution.

Can you provide full zip logs with system.debug = true?
Also from the logs check the test point, test suite and configuration id the names are getting translated to and verify if they exist and that the build agent is configured with the necessary permissions to access them.


Move Migration Scripts?

I'm just wondering, a friend and I have both run into issues with the migration scripts. I made a PR fixing one a while ago but it seems they're still getting in the way and a lot of the problems seem to be related to having them mixed in there with migration files for tenants and all those if checks.
Is there a reason that the migration scripts related to HYN aren't kept in the vendor directory and migrated by HYN (Create your own instance of Migrator.php and feed the migration files in /vendor/hyn in there). Would you like to go that direction?

Sounds very plausible. If you're running on v2 already feel free to send in a PR. I'm actively working on version 3 so I might pull that in as well, I separated the source for now.

For v3 I'm considering simply running based on path by the way.

Related to this, we might even consider having migrations specific for one tenant only. If that is a plausible use case the implementation of such a Migrator class could then also more easily migrate the system migrations and global tenant migrations.. Hm.. 🤔

Tenant-specific migrations would be a good idea I think; it's certainly an aspect likely to come up in our project. I can see a scenario where one, or a few, tenants have an add-on feature or two that doesn't apply to the majority of sites. That's possible at the code level with routing and what not, but could also include DB requirements to support.
That actually may be better described as migration-by-feature rather than tenant. I.e. being able to create groups of migrations that can be applied to specific tenants, but not necessarily all. This way you wouldn't need to bloat unrelated tenant DB's with tables they don't need, nor would you need  multiple copies of the same migration to be applied to different tenants - you'd apply a shared set of migrations to multiple tenants as needed.
It's a thought!

Great idea, just not having any clue how to pursue such grouping :)

Can't say I've considered the implementation details much myself as of yet! :)
As a general thought I could see something along these lines:

Within the database folder (to keep /migrations global) a /features folder
Inside of /features are sub folders for each set of feature related migrations. E.g. lets say we have /features/quiz with various migration files inside as you might in /migrations.
An artisan command handles the running of these migrations, something along the lines of:
php artisan migrate:feature --feature quiz --site somedomain.com

That would keep site/feature specific migrations grouped separately from global migrations without having to replicate the same migration within multiple target site folders.
Obviously easier said than done! @Luceos, from your standpoint do you seen any obvious issues with the concept? There would be some fun in tracking migration application / reset / rollback between global and feature migrations...  @psaunders would something like this address the issues you're experiencing?

In 3.x you will be able to provide a realpath option to the migration command.
Obsoleted.


Use CancellationToken for Cancelling Tasks

How to use CancellationToken: https://hackernoon.com/why-do-you-need-a-cancellation-token-in-c-for-tasks
Also because of this Ted Talk

I'll leave this for someone else to do 🐱


Fix continue statement within switch/case keeping original behavior

continue statements within switch/case statements always have
behaved like break (ending the switch). Only exception is when
they are within a loop and we may want to use 'continue 2;'
instead (to jump to next iteration).
PHP7.3 has added a PHPWarning for all this switch/case/continue
uses (https://wiki.php.net/rfc/continue_on_switch_deprecation) so
this just changes is to the BC equivalent break. As far as there
isn't remaining code in the loop after the switch, it is 100%
the same than a continue 2.

@Asenar @oyejorge Would be great if this patch could be fast-tracked to keep less.php happy under PHP 7.3 without warnings.
This issue is is currently on a short-list of issues preventing MediaWiki's CI from passing under PHP 7.3. We might be able to suppress the warning from all call sites, but I'd be great to put that effort toward helping upstreams instead. Let me know if there's anything I can do to help.

Hi, no PR has been merged since March 2017. Not sure it will be maintained again But you can user this fork instead: https://github.com/kylekatarnls/less.php (composer require kylekatarnls/less.php) or this wrapper of the node package: https://github.com/kylekatarnls/less


Add feature gates for tech preview CSI drivers: GCE and Azure

CC @openshift/storage
Epics:
https://issues.redhat.com/browse/STOR-577
https://issues.redhat.com/browse/STOR-576

/lgtm

/assign @soltysh @deads2k


Invalid character entity

Describe the bug
Attempting to run Parcel on a project using okta-signin-widget
Image in question
Expected behavior
Expected the project to build without errors.
Screenshots
parcel build feature/index.html --dist-dir dist
![google-play-store](https://user-images.githubusercontent.com/444316/190267511-71ef83c6-3601-461a-98a0-cbdbed41d3c3.svg)

🚨 Build failed.

@parcel/optimizer-svgo: SvgoParserError: <input>:13:72: Invalid character entity

  11 |
  12 |
> 13 | … id="Livello1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&nsg…
     |                                                       ^
  14 | …ule:evenodd;clip-rule:evenodd}.st1{fill-rule:evenodd;clip-rule:evenodd;fil…
  15 |

Desktop (please complete the following information):
Unsure
Additional context
Reported the issue with Parcel as well.

This is a Parcel bug, see https://github.com/parcel-bundler/parcel/issues/8469#issuecomment-1279132032.


Docs: CentOS installation from source

A quick fix on a typo in the nvcc compiler flag and the gcc executable, as there is no gcc-7 or similar in CentOS, unlike Ubuntu which all get symlinked. After installing the devtoolset-7-gcc-c++ and activating those binaries, calling gcc will use the gcc at version 7 for compilation.

Thanks, LGTM!


feat/(CUST-CPC-1077): Update customer information on website

JIRA: https://champlainsaintlambert.atlassian.net/browse/CPC-1077
Context:
Created a v2 endpoint to update an owner's information and web page where the logged in customer can update their information.
Changes

Created the OwnerController class in the v2 folder of the API gateway
Created the endpoint to update an owner's information in the Controller
Created two controller integration tests to cover the implementation of the endpoint
Added the mockserver depency in build.gradle
Created the ProfileEdit page where customers can update their information on a pre-filled form. The pre-filled information is based on the logged in customer.
Created the necessary files for the implementation of the ProfileEdit page (models, API calls, CSS)

Before and After UI (Required for UI-impacting PRs)

My annotation was used correctly finally, thank you haha


cards: make rerolling duplicates the default behaviour

my understanding is this is the designer intent of the oracle tables for planets, creatures, etc is to reroll duplicate results (i can dig up the discord messages from shawn to this effect if needed), so the default for cards (or perhaps just new/unset channels) should be to reroll duplicates.

This has actually been the default behavior in the bot for a while now, but there are some places where the entities still haven't implemented the check. If there are specific offenders that are particularly annoying for duplicate rolls post a new issue and I will fix them.

🤔 hmm. well, it may have changed in the mean time, but planet cards did appear to be rolling duplicates (on a channel where reroll behaviour hadn't been set either way) as of Dec 14, which is what led me to open the issue in the first place:


potential for ssl problems when redirecting from DNS name to master ip

Environment info

Version: 0.8
Deployment: AZURE|ESX|AWS|GCLOUD|DEV|VBOX
Customer: NAME

Actual behavior

When accessing the cluster through DNS name the client might be redirected to the master ip address. there is a potential for problems with an uploaded ssl certificate since the host specified in the certificate is different then the redirected address

Steps to reproduce

upload certificate to cluster
try to access non master node, and check what happens on redirect

Screenshots or Logs or other output that would be helpful
(If large, please upload as attachment)

Irrelevant with k8s HA implementation, closing


add success and error message for user managment add user

@lavanya-bmw Can you please approve again


Split out Kubernetes worker/control plane from Metropolis control plane nodes

Currently, kubernetes worker and kubernetes control plane are the same role. Having this role also implies a local metropolis control plane because of how KPKI is set up.
We should split this so that we actually can have some nodes running just the Metropolis control plane, and others just the Kubernetes workloads.

Changing some things around kpki to support split private keys for Kubernetes. This should land this week.

Currently working on this. It seems to be working, still testing. If it does indeed, I'll start sending bits out for review ASAP this week.

Confirmed to be working, slowly pushing out commits related to this.

Ended up getting sidetracked on rewriting clusternet, now actually pushing this out.

Fixed in https://review.monogon.dev/c/monogon/+/1380 etc


App group enhancement introduced a breaking change (2.10.0)

The change introducing app groups moved the storage location when the app groups property is set which is a breaking change - https://github.com/mrousavy/react-native-mmkv/pull/402/files#diff-b667beab6bbb6d80aab761c6781a9a7fea5812e5814d98666080a2ec6edb38dfR46
Upgrading to 2.10.0 causes our users to lose stored data since we had an app group previously defined for other reasons.
It would probably be good to revert and release that change as v3 and also provide a way to override that storage location for backwards comparability.

Oh, whoops. Hmm I don't think reverting that change makes sense as that was more than a year ago and most people are already on that version by then, meaning they'll lose any data unless they upgrade to v3.
I think you could easily migrate by moving the mmkv file from the normal directory to the appgroup directory.

That's a fair point. Would you be opposed to us adding a property to allow using the default location?


clippy::as-ptr-cast-mut warning in From for ThinSlicePtr

Bevy version
https://github.com/bevyengine/bevy/commit/c019a60b39c5683656025bc9d24a02744aa59dea
What you did
Ran cargo +nightly clippy --workspace --all-targets --all-features -Z unstable-options --keep-going -- -Aclippy::type_complexity -Wclippy::nursery -Aclippy::use_self -Aclippy::missing_const_for_fn -Aclippy::redundant_pub_crate -Aclippy::cognitive_complexity -Aclippy::branches_sharing_code -Aclippy::option_if_let_else -Aclippy::useless_let_if_seq -Aclippy::equatable_if_let -Aclippy::iter_with_drain -Aclippy::iter_on_single_items -Aclippy::iter_on_empty_collections -Aclippy::type_repetition_in_bounds -Aclippy::trait_duplication_in_bounds -Aclippy::fallible_impl_from -Aclippy::future_not_send -Aclippy::imprecise_flops -Aclippy::suboptimal_flops -Wclippy::doc_markdown -Wclippy::redundant_else -Wclippy::match_same_arms -Wclippy::semicolon_if_nothing_returned -Wclippy::explicit_iter_loop -Wclippy::map_flatten -Dwarnings
What went wrong
error: casting the result of `as_ptr` to *mut T
   --> crates\bevy_ptr\src\lib.rs:238:50
    |
238 |             ptr: unsafe { NonNull::new_unchecked(slice.as_ptr() as *mut T) },
    |                                                  ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `slice.as_mut_ptr()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#as_ptr_cast_mut
    = note: `-D clippy::as-ptr-cast-mut` implied by `-D warnings`

from this code:
impl<'a, T> From<&'a [T]> for ThinSlicePtr<'a, T> {
    #[inline]
    fn from(slice: &'a [T]) -> Self {
        Self {
            // SAFETY: a reference can never be null
            ptr: unsafe { NonNull::new_unchecked(slice.as_ptr() as *mut T) },
            #[cfg(debug_assertions)]
            len: slice.len(),
            _marker: PhantomData,
        }
    }
}

This is an easy change, I'd approve a PR that did this.

@alice-i-cecile I don't think the fix as suggested is right. It would require changing everything to take a &mut [T]. Not sure what the right fix is here. The API's for ThinSlicePtr don't seem to allow getting a &mut [T] back out of the ThinSlicePtr, so at least there isn't any UB. The only reason we need a *mut T is to satisfy the API for making a NonNull.

Hmm, right. Okay, closing this out.

Notice that NonNull has a From instance for &T. However, this does not change the fact that mutating through a (pointer derived from a) shared reference is undefined behavior unless the mutation happens inside an UnsafeCell. The same goes for creating a mutable reference from a shared reference. When using this From instance without an UnsafeCell, it is your responsibility to ensure that as_mut is never called, and as_ptr is never used for mutation.

^^ Looking at the docs for NonNull. We could potentially change to NonNull::from(&*slice.as_ptr()).


Use a full GET request to detect yanked packages

Apparently a HEAD request is incorrectly returning 404 sometimes. Downloading the full tgz may be heavy, but I think it won't happen often and correctness should come before speed. We can iterate later if this fixes the problem.
Closes #8544.

If I am understanding correctly, Dependabot does the listing of versions, and then after does a HEAD on the tarball to see if it's yanked, e.g.:
  proxy | 2023/12/06 14:54:16 [026] GET https://registry.npmjs.org:443/axios
  proxy | 2023/12/06 14:54:17 [026] 200 https://registry.npmjs.org:443/axios
  proxy | 2023/12/06 14:54:17 [028] HEAD https://registry.npmjs.org:443/axios/-/axios-1.4.0.tgz
  proxy | 2023/12/06 14:54:17 [028] 200 https://registry.npmjs.org:443/axios/-/axios-1.4.0.tgz

I'm curious, if a version was yanked, wouldn't it not appear in the listing in the first place?

See https://github.com/dependabot/dependabot-core/pull/8489 for context. The unfortunate reality is no, yanked versions seems to appear in the listing, at least sometimes, so my conclusion was that the only reliable way to figure out whether a package is yanked is to directly check if it's there.


Adding a common troubleshooting instruction.

What changed, and why it matters
It seems that we're seeing the following build error frequent enough to have the fix be part of the build instructions:
Error: pg_config executable not found.

      pg_config is required to build psycopg2 from source.  Please add the directory
      containing pg_config to the $PATH or specify the full executable path with the
      option:

          python setup.py build_ext --pg-config /path/to/pg_config build ...

      or with the pg_config option in 'setup.cfg'.

      If you prefer to avoid building psycopg2 from source, please install the PyPI
      'psycopg2-binary' package instead.

I wasn't sure if I could add a code directive within a note directive so I used literal symbol for the brew install... command. Another option is to add a troubleshooting section somewhere else. Please suggest any change that you prefer.

To answer the question in the Discussion at the top, reStructuredText is quite happy with (for instance) a code directive inside a note, but it won't show up the way you want in GitHub because GitHub's reST rendering won't use the representation that is generated for notes (or warnings or any other admonitions). So the way you're doing it makes sense.


Missing indentation

Gitea version (or commit ref): 1.14.0+dev-59-ga67b2bc30
Git version: Git for Windows 2.28
Operating system:
downloaded via / running on docker
Database (use [x]):

[ ] PostgreSQL
[x] MySQL (MariaDB)
[ ] MSSQL
[ ] SQLite

Can you reproduce the bug at https://try.gitea.io:

[ ] Yes (provide example URL)
[x] No

Description
If you open files which contain code with indentation the very first indentation is just one space, every other indentation is just ignored.
Screenshots
Gitea Interface:

Raw Content:

this is a duplicate and is already fixed.

Which version will it have included?

try.gitea.io is on  1.14.0+dev-168
you should update.

@zeripath
We now are on 1.14.0+dev-215-gd025d84d9, it's still not working.
dev-215 is even newer than dev-168, right?
Is it broken again?

You would need to put up an example on try.gitea.io or at least something to copy/paste from here that should help reproduce it. There isn't anything easily reproducible with screenshots of text. I couldn't reproduce this based on the example of

files which contain code with indentation the very first indentation is just one space


Custom Calendar

Hi,
Great calendar picker!! But on iOS the Accept and Cancel option are on Chinese language.
Can you give the option for translate it or take the OS language.
And if you could add option to custom the calendar icon i will love you!
Thanks

Thanks for your propose！We have solved these in the latest release v1.1.0 with docs and example.
Thanks for your love more!


Slots

First of all: Surface looks really. really great!
I was just wondering what you mean by Slots?
Is it something like this? https://daveceddia.com/pluggable-slots-in-react-components/

I think it's more like Vue or Svelte slots.
https://svelte.dev/tutorial/named-slots
https://vuejs.org/v2/guide/components-slots.html

It's basically the same concept that can be found in other libs like Vue.js and Svelte, like @mazz-seven pointed out.

OK, thanks to both of you for clarifying :-)


fix: introduce CloudEventV1 and CloudEventV03 interfaces

This commit introduces CloudEventV1 and CloudEventV03 TypeScript interfaces. Additionally, it changes all of the user facing API to be .ts instead of .js files. Those are:

lib/cloudevent.ts
lib/bindings/http/http_receiver.ts
lib/bindings/http/http_emitter.ts
lib/bindings/http/constants.ts

Usage in JavaScript
The pure JS API has not changed. You still create a CloudEvent like this.
const { CloudEvent } = require('cloudevents-sdk');

const ce = new CloudEvent({
  source: 'a source',
  type: 'type'
});
console.log(ce);

❯ node index.js
CloudEvent {
  spec:
   Spec1 {
     payload:
      { specversion: '1.0',
        id: 'b3b875c3-f7f0-410f-8aca-6ddcc61625b4',
        time: '2020-05-28T20:51:07.033Z',
        source: 'a source',
        type: 'type',
        datacontenttype: undefined,
        data: undefined,
        subject: undefined } },
  formatter: JSONFormatter {},
  extensions: [] }

Usage in TypeScript
This change resolves the auto-completion issue with raw JavaScript objects through the use of the new interfaces. However, since there is no way I am aware of for interfaces to have default values,  both specversion and id are required user input when creating a CloudEvent. This differs from the JS usage since the CloudEventV1|CloudEventV03 interfaces are not enforced parameters in pure JS and the CloudEvent constructor generates these two fields by default.
The easiest solution would be to indicate that id and specversion are optional in the interfaces. But I'm not sure I like doing that, since a cloud event must have these attributes. They are optional in the ctor for the CloudEvent class because they are either generated or have a default value if not provided.
One option here would be to make the CloudEvent constructor accept CloudEventV1, CloudEventV03, or any. But doing that removes the nice autocompletion when creating a CloudEvent with an inlined raw object .
Example:
import { CloudEventV1 } from 'cloudevents-sdk/lib/v1';
import { CloudEvent } from 'cloudevents-sdk';

// This always has auto completion no matter what, but `id` and `specversion` are required
const ce: CloudEventV1 = {
  specversion: '1.0',
  source: '/some/source',
  type: 'example',
  id: '1234'
};

const event = new CloudEvent(ce);
console.log(event);

// This has auto completion only if we don't also specify 'any' as a possible parameter type.
const otherEvent = new CloudEvent({
  source: '/some/source',
  type: 'example'
});

❯ node index.js
CloudEvent {
  spec:
   Spec1 {
     payload:
      { specversion: '1.0',
        id: '1234',
        time: '2020-05-28T20:46:18.970Z',
        source: '/some/source',
        type: 'example',
        datacontenttype: undefined,
        data: undefined,
        subject: undefined } },
  formatter: JSONFormatter {},
  extensions: [] }

Documentation
The existing documentation in ./docs was removed and should replaced with generated
HTML from tsdocs, pending some other method of publishing API documentation. To keep
this commit relatively small and focused on the code, that will come as a separate docs-only PR.
Fixes: https://github.com/cloudevents/sdk-javascript/issues/184
Fixes: https://github.com/cloudevents/sdk-javascript/issues/188
Signed-off-by: Lance Ball<EMAIL_ADDRESS>

@grant what do you think about the tradeoffs re: auto completion? As this PR stands now, the only way to create a CloudEvent is with id and specversion required. Two options to eliminate the requirement that I see. Change the interface or accept any.

@grant please re-review with these new changes: https://github.com/cloudevents/sdk-javascript/pull/194/commits/26095e77fcc5fc2a33f83b99bc7c868bb2e0cff9

Nice job applying the interface union @lance.

OK - this is landing! I will cut a 2.0.1 release either over the weekend or on Monday.


I want to add extra class in li

As I need to hide li by their class or data-rate, So I want to add extra parameter in select2,
Can you please help me for find out this problem?

https://select2.org/dropdown#templating
Example of using the second parameter to templateResult to add a class.

This appears to be more of a usage question than a bug report or common feature request.  As we continue to keep the Select2 issue tracker geared towards these two areas, bug reports and common feature requests, we are redirecting usage questions to other communities such as the mailing list, IRC, or Stack Overflow.


FromQuery deserializer requires empty constructor

Hi guys 🚀
Describe the bug
As in the title FromQuery requires empty constructor. It is weird because I can use constructors (which initialise all properties) for [FromBody].
System.InvalidOperationException: Could not create an instance of type 'FancyQuery'. Model bound complex types must not be abstract or value types and must have a parameterless constructor. Alternatively, give the 'query' parameter a non-null default value.
To Reproduce
Steps to reproduce the behavior:

ASP.NET Core 2.2
Controller and DTO/Command

// Controller method

[HttpGet("fancy")]
public async Task<IActionResult> Find([FromQuery] FancyQuery query)
{
   // TODO: add some action
   return Ok();
}

// DTO
public class FancyQuery
  {
    public FancyQuery(int userId, int dumbValue)
    {
      UserId = userId;
      DumbValue = dumbValue;
    }

    public int UserId { get; set; }
    public int DumbValue { get; set; }
  }

Expected behavior
It should works like [FromBody].
Additional context
Add any other context about the problem here.
Include the output of dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   2.2.106
 Commit:    aa79b139a8

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.14
 OS Platform: Darwin
 RID:         osx.10.14-x64
 Base Path:   /usr/local/share/dotnet/sdk/2.2.106/

Host (useful for support):
  Version: 2.2.4
  Commit:  f95848e524

.NET Core SDKs installed:
  2.2.106 [/usr/local/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.2.4 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.2.4 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.2.4 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

This is by design. FromBody uses serializers such as Newtonsoft.Json which have a different feature set compared to model binding. Model binding - indicated by FromQuery, FromRoute etc, requires that complex types have a parameterless constructor.

I can confirm this happens, and it is really frustrating.
When you work with DDD, you don't want people to instantiate your objects with a "default constructor" as this facilitates code corruption.
I think the behaviour should be the same as [FromBody].
Is it possible for us to suggest this? Maybe in a future release this can be changed.
Thank you.

did you try with a private or protected empty constructor ?

@hbsis-williamdasilva - same! But you can always use get variables and then initialize your DDD object. It's not a big deal.

@RemiBou I tried both, but it only works with a public empty constructor.
@rafalschmidt97  yes, it is not the end of the world, but it is kinda strange that you cannot use the same object for FromBody and FromQuery (for example).
The deal is, when using an object to deserialize using FromBody, normaly you dont wanna this object to be used inside your system. He is only an object to receive informations, that is why the private empty constructor is nice. No one can use this object.
Using FromQuery, you open this to other developers to instantiate this object.


sqlparse: added T-SQL parser

sqlparse: added T-SQL grammar files
sqlparse: added generated code

Still, 40MB in size, 😢


Fix eslint errors by selectively enabling vue parser

eslint currently gives some errors because the vue parser when loaded via recommended config parses all files but can not handle hashbangs and newer ECMAScript features like the default eslint parser can (it did downgraded our parser from es2022 to es2020).
Selectively enable the vue parser only for .vue files and define rules explicitely to fix that issue.

Replacement PR: https://github.com/go-gitea/gitea/pull/20323


Bug in position of cells with respect to preview image for non-parent images

There is a shift in the view of the position of cells between the analyzetpstack view and the view in drift check and manual drift correct.  When I check the actual ROI with drift check, it appears that the view in drift check and the manual drift correct tool are self-consisent (that is, they are the "correct" view) and analyzetpstack is the incorrect view.

View in drift check has to agree with data because the same routine is used (tpreadframe)

Bug fixed. analyzetpstack_previewimage called analyzetpstack_getdirdrift with no number of drift frames argument, and the function analyzetpstack_getdirdrift did something odd (did a mean over columns instead of over rows) when the number of drift frames is 1 (default argument).


Module 'agora_rtc_engine' not found when running on Xcode to iOS device

I have cloned this project and run it on my simulator and iOS device. It runs fine on my iOS simulator, however, when I run it on my actual iOS device through Xcode, there is an error message as shown:

/Users/xx/AndroidStudioProjects/Agora-Flutter-SDK-V1/example/ios/Runner/GeneratedPluginRegistrant.m:10:9: Module 'agora_rtc_engine' not found

I have attached a screenshot of the error below.

I am currently using an M1 chip Macbook, flutter 2.2.0
I have tried
rm ios/Podfile
rm ios/Podfile.lock
rm -rf ios/Pods
rm -rf ios/Runner.xcworkspace
flutter clean
flutter build ios

from #320  but the same error is still there.
Any help will be appreciated! Thanks!

flutter doctor is as shown:
troylee@Troys-MacBook-Air ios % flutter doctor -v
[✓] Flutter (Channel stable, 2.2.0, on macOS 11.0 20A2411 darwin-arm, locale en-GB)
    • Flutter version 2.2.0 at /Users/troylee/Developer/flutter
    • Framework revision b22742018b (6 days ago), 2021-05-14 19:12:57 -0700
    • Engine revision a9d88a4d18
    • Dart version 2.13.0

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/troylee/Library/Android/sdk
    • Platform android-30, build-tools 30.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.4, Build version 12D4e
    • CocoaPods version 1.10.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] Connected device (2 available)
    • iPhone 12 Pro Max (mobile) • 7674A9DB-32BF-4027-BBDC-8FED2DD2008F • ios            • com.apple.CoreSimulator.SimRuntime.iOS-14-4
      (simulator)
    • Chrome (web)               • chrome                               • web-javascript • Google Chrome 90.0.4430.212

• No issues found!

seem like you not open the .workspace?

Oh yes, I was running on Runner.xcodeproj previously.
I have just tried using Runner.xcworkspace instead and it managed to run. Thank you!


DataTable for HTML output

Hi, I think It would be nice if you add DataTable (https://datatables.net/) for html output. We can use it to short Status code or find something.

Thanks for opening the issue. This looks super convenient. Support added in #98

I am sorry to come while this issue is actually closed. But could we think about disabling the paging ?
It feel horrible to click the next button to see all the results :(

@SakiiR I created an issue which has a suggestion for the amount of entries each page (https://github.com/ffuf/ffuf/issues/110)

oops ! 😨
Thank you 👍


Refresh static image every x seconds

I currently using this card to show static camera image by default. Image does not refresh unless you reload browser page. I used before Generic Camera built-in integration. It updates static_image_url every 10 seconds. Maybe it's possible to add same functionality for this card? Configuration could be something like this:
image:
  src: http://<IP_ADDRESS>:5000/api/camera/latest.jpg #latest snapshot URL from frigate
  refresh: true
  timeout: 10

You should be able to already do this, see here: https://github.com/dermotduffy/frigate-hass-card#card-refreshes--updates
Something like this (untested) may work for you:
view:
  default: image
  timeout: 10
  force: true

Forgot to mention, I already tried this type of configuration without success. When watching live video, it just goes back to image view after 10 seconds without updating the image.

On 2022-01-02, at 21:00, Dermot Duffy @.***> wrote:

You should be able to already do this, see here: https://github.com/dermotduffy/frigate-hass-card#card-refreshes--updates
Something like this (untested) may work for you:
view:
default: image
timeout: 10
force: true
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you authored the thread.

Oh, so it does go back to the image view, but the image is just not updating? OK -- can you provide the configuration you used? I'll look into it.

Yes, goes back but does not update. Here's my configuration:
type: custom:frigate-card
camera_entity: camera.living_room
view:
  default: image
  timeout: '10'
  force: true
live:
  provider: webrtc
  webrtc:
    entity: camera.living_room_rtsp
image:
  src: http://<IP_ADDRESS>:5000/api/living_room/latest.jpg

How can I test changes? HACS does not allow to download main  branch. Getting No content to download error.  I think it's because frigate-hass-card.js does not exist in directory.

Multiple loops refreshing image. For example: Edit card in Lovelace, new image refresh loop spawns. I think there are also some situations where it spawns new loop without editing card.


disable click option

I have a use case where I want to disable the on-click listener on the panel-toggle component. I can overwrite the on-click property in the dom to equal false but then the console throws an error since the action attempts to treat it as a function.
I'm currently passing in a empty function (instead of a boolean) to avoid the error. Could add a "disableClick" property.
this.attrs.disableClick ? null : this.get("on-click")();

Willing to open up a PR if interested.

If you can pass in on-click=null I think that should suffice, right? We could update the action to check for the existence of the function before trying to invoke it (so we don't need to expand the API).
A PR would be great!

well what if the behavior needs to be dynamic via a computed property? on-click=allowClick Passing in true would not work

Gotcha. Ok let's add a disabled state to the toggle component
{{#p.toggle disabled=true}}

which doesn't fire the on-click handler. Could you PR w/test?

@Luiz-N did this work for you? Ok to close?

@ryanto yeah i'll get to the PR soon


Disabled routing

Is there any possibility to disable the router? thanks

Hey Carlos,
thanks for reaching out. :-)
Actually routing should be disabled by default unless you specify a routeTitle for every step.
Have you tried removing those?

I am not using the WizardStep component, just the hook. And in the url of my site # / undefined appears
`  const { nextStep, previousStep, activeStepIndex, getStep } = useWizard()
...
{examQuestions.map(
(q, i) =>
getStep().isActive && (

{q.question_choice ? (

) : q.question_write ? (

) : q.question_file ? (

) : (
''
)}

)
)}
`

Okay that's interesting.
Just tried to recreate that issue and couldn't.
https://codesandbox.io/s/gifted-archimedes-cner0?file=/src/App.js
Could you provide me with a minimal example code that is not working?
Are you on the latest version which is 2.3.0?
Otherwise could you try getStep({routeTitle: null}) to see if this helps?

Hello, I think this is a real issue. I am encountering the same thing. It seems to be happening when hooks get initialised.
  const { nextStep, previousStep, activeStepIndex, getStep, moveToStep } = useWizard()

Oh interesting. I'll try to reproduce it with React router. Thanks for your input :)
Would you mind sharing your code that causes the issue?

I have a component rendered with react router and within that component I started building the custom wizard. It seems to be enough to call useWizard() and #undefined is added at the end of the route.

Most likely it is caused by this line from getRoutingHash.
getWindow() ? getWindow().location.hash.replace("#", "") : undefined;
An easy fix might be what @carscx proposed, add the possibility to disable the routing and everything should be fine

Sorry for not answering in so long. As an alternative, I have done the following, at least until there is a chance to disable the route.
history.replaceState({}, document.title, window.location.href.split('#')[0])

Alright I figured it out :-)
As i mentioned routing is disabled unless you specify routeTitles.
However, the implementation has a bug when the getStep is not called on the initial render. For example, when they're rendered conditionally or after an API call has been issued.
Is that the case for both for you? I was able to reproduce that and you can expect a fix soon :-)

:tada: This issue has been resolved in version 2.3.1 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

@carscx  @andreibeneatol
I've added you as contributors for finding this bug :-)
If you feel uncomfortable with it, just let me know and I'll remove you.
Thanks.

Is Ok, No problem, thank's to you for your rapid resolution.


Play nice with other bots in the #talk-to-james channel.

Ignore messages from all bots, not only own messages.

Why should one use other bots in #talk-to-james which is dedicated to only talking to james?
Your change is also non-effective, if the "other bot" uses text commands as James will then also complain.
I'd just use #smalltalk or request another #unattended-bot-usage channel or similar from Bastian maybe?

The answer in short: It reduces spam.
Whether other bots SHOULD be used in #talk-to-james is something I consider to be irrelevant for this PR. That's a whole different topic, including the questions if other bots should be used in James' channel and, if yes, if the channel should be renamed. It is however possible for bots to send messages in that channel. Since the warning about the purpose of the channel is directed at users, the warning should not be triggered. The original purpose of the message was to discourage conversation in a channel that is likely not actively monitored or even muted by most regular users. I don't think it's necessary in case of a user conversing with another bot.
The change is effective unless the other bot is using text commands - which by now is a practise that's actively discouraged from discords side and even a goal for this very bot to move past (#50).


SETSELECTIONFILTER(Record)

Are there any plans to provide external access to the SETSELECTIONFILTER function?
Example:
ResourceList.LOOKUPMODE(TRUE);
IF ResourceList.RUNMODAL = ACTION::LookupOK THEN BEGIN
  ResourceList.SETSELECTIONFILTER(Resource);
  ...
END;

This would give more flexibility and allow to receive multiple selections from NAV core pages without modifiying them.

You can create a "pageextension" object to extend the page and retrieve the selectionfilter.

By allowing this, the following (and future) function requests would be (at least partly) obsolete: #420 , #552, #609 , #948

SETSELECTIONFILTER across all pages would be useful.
The pageextension/function would be a good way to do so without adjusting page event signatures to include CurrPage.

I'm not sure I understand this request. Currently you can already access SetSelectionFilter both through a page variable and through CurrPage on a page extension. What do you mean by external access to this function?

What I mean is that this code compiles for me without any problems:
codeunit 50101 Demo
{
    procedure AccessSetSelectionFilter()
    var
        page1 : page  "Absence Over. by Cat. Matrix";
        tab1: record "Acc. Sched. KPI Buffer";
    begin
        page1.SetSelectionFilter(tab1);
    end;
}

So I don't quite understand what other kind of external access is required. Can you give an AL code example that demonstrates the problem?

I'm surprised, it really works, it is just undocumented.
So is UPDATE and SAVERECORD.
It would really be of big help if those functions - which are publically available - are documented somewhere and shown in the CAL Menu in DevEnv.


[eas-json][eas-cli] add global withoutCredentials property to eas.json

Why
Add global withoutCredentials property to eas.json (it currently only exists for Android). We discussed it with Brent and decided that it would be handy for custom builds.
How
Add global withoutCredentials property to eas.json
Test Plan
Add automated tests

/changelog-entry new-feature Add the withoutCredentials option as a common build profile field in eas.json


[FEAT] Silent Reboot

Using pylips in mqtt mode now on an 65pus8102 and 55pus9104, it works really good!!
Since activating alexa on the TV sets it doesn't deactivate the network interfaces in standby (I think it just don't go in any sleep mode) and I am able to wake it with pylips sending standby key.
Sadly in my case, after a few days the sound over my avr (connected with ARC) is choppy. A manual restart of the TV set, solves the issue.
So my feature request! / question is a silent, scheduled reboot with pylips.
PS. : adb reboot is working but not silent
Is this possible?
Thx

Hey @popy2k14 ,
What exactly do you mean with a 'silent reboot'? adb reboot works nicely for me, so I am not sure what is the behavior you would like to see?

Yeah, also using adb reboot now at night in the living room and day in bed room to reboot my devices on an daily basis.
With silent I mean, that the display of the TV is OFF during reboot.

Hey @popy2k14,
I've done some research but so far I had no luck with the 'silent' reboot :( I'll keep an eye on this feature request, though - I might think of something in the future.

Thanks a lot.


Use Optimisers.jl

With Flux.jl 0.13 moving to use the explicit optimisers in Optimisers.jl, I think FluxTraining.jl should also use those as a default.
This would also allow easier integration with alternative ADs like, PyCallChainRules.jl, see https://github.com/rejuvyesh/PyCallChainRules.jl/issues/19.
@ToucheSir can this be done in a backward-compatible way, i.e. supporting Flux v0.12 and below or does Optimisers.jl depend on Flux v0.13?

Looking into what's necessary here; it seems like there is no great way to support both Optimisers.jl and Flux.Optimise in FluxTraining.jl. I'm fine with eventually dropping support for the former, but mean to ask what the path forward is: will Flux.Optimise be deprecated and completely replaced by Optimisers.jl? Also, is there any functionality one would miss out on by dropping Flux.Optimise support?

I think this is doable with some conditional logic, but certainly it will be a little messy. Happy to help with the implementation if you decide to support both.

will Flux.Optimise be deprecated and completely replaced by Optimisers.jl?

That's the plan.

Also, is there any functionality one would miss out on by dropping Flux.Optimise support?

Tied/shared weights aren't yet supported. Arguably they aren't supported in Flux either for any mildly complex optimizer, but going from "incorrect but still works" to "always fails an early validation check" is probably breaking.

What's the issue you are running into supporting both? We made all the Flux.Optimise ones subtype Flux.Optimise.AbstractOptimiser. The Optimiser.jl ones do not and the purpose of this decision was to be able to distinguish between the two kinds. Does that help at all?


How does [Feature Request] change the width of el-upload???

Existing Component
Yes
Component Name
2.2.2
Description
chrome

Using CSS.


[BUG]: GoTool@0 doesn't support downloading Go 1.21 or above.

New issue checklist

[x] I searched for existing GitHub issues
[x] I read pipeline troubleshooting guide
[x] I checked how to collect logs

Task name
GoTool
Task version
0
Issue Description
GoTool tries to download all Golang releases from a path like: https://storage.googleapis.com/golang/go1.22.linux-amd64.tar.gz, but after Go 1.20 there are no longer published binaries at this path. Instead the URL https://golang.org/dl/ should be used, as you can see on the official Golang site: https://go.dev/dl/
Environment type (Please select at least one enviroment where you face this issue)

[ ] Self-Hosted
[X] Microsoft Hosted
[ ] VMSS Pool
[ ] Container

Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Azure DevOps Server Version (if applicable)
No response
Operation system
Ubuntu latest
Relevant log output
Starting: Get Go 1.22
==============================================================================
Task         : Go tool installer
Description  : Find in cache or download a specific version of Go and add it to the PATH
Version      : 0.231.0
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/tool/go-tool
==============================================================================
Downloading: https://storage.googleapis.com/golang/go1.22.linux-amd64.tar.gz
##[error]Failed to download version 1.22. Please verify that the version is valid and resolve any other issues.
Is there any workaround?  Is there any schedule for correcting the GoTool step?

I have the same issue, will this be fixed?

I'm having a similar issue but I'm wondering if for the fix here, the download URL could be configurable either as an input or overridden with an environment variable. In my case I have an artifactory instance acting as a proxying cache for requests to https://storage.googleapis.com/golang/%s. Also, is it possible to support wildcarded versions (1.22.*) similar to some of the dotnet tasks? I frequently re-bake runner images and the way that installer works is to grab the highest patch version
https://github.com/actions/runner-images/blob/584c7c0fef943495221b46033addefb6419ecb0f/images/ubuntu/toolsets/toolset-2204.json#L46C1-L48C25

I'm stumbling by the same problem, any plan to fix or workaround?

Adding the patch version (1.22.3) to the version variable does work, if that helps anyone.

It would be nice to have a "latest" as a valid input argument for version parameter for cases when you don't really care.

I had the same problem. @enzobrands solution worked.


Support opn

Using opn in a packaged program results in the error below.
Error: spawn /snapshot/deploy/node_modules/opn/xdg-open ENOENT

Is there a special setting on pkg that I am supposed to use?
More info: https://github.com/sindresorhus/opn/issues/61

I got the same issue, it Seems like pkg doesn't package shell scripts. @igorklopov could you elaborate the reason for closing this issue.

He closed the issue via a commit, which means he fixed the issue. The fix may not have hit a stable version yet.

@FallingSnow Did not know that! thank you!

@FallingSnow  When will you release a stable version with this fix? Thanks

I have no power over this repository or pkg.

@igorklopov When will you release a stable version with this fix? Thanks

@Mikanebu please try again with<EMAIL_ADDRESS>

@igorklopov seems to be working for me!

Seeing the same issue as @anuveyatsu