Update concat plate UMAP embeddings

Update concat plate UMAP embeddings
In this PR, the concat UMAP embeddings were updated to remove Plate 4 controls as we moved in a different direction with the manuscript. Additionally, the NF1 environment had to be updated due to CellProfiler breaking all of a sudden. This might lead to small changes with pycytominer processing since versions might have changed in env, unfortunately.

Thanks for the review @MattsonCam! I am merging now!


Out of date page - "Access policies" vs "Access configuration"

Out of date page - "Access policies" vs "Access configuration" #106219

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

ID: 44b9a84f-6765-67dc-bb7b-04303e070c03
Version Independent ID: 32fc20a0-4321-c74a-34aa-909f43a72db0
Content: Grant permission to applications to access an Azure key vault using Azure RBAC
Content Source: articles/key-vault/general/rbac-guide.md
Service: key-vault
Sub-service: general
GitHub Login: @msmbaldwin
Microsoft Alias: mbaldwin

@andyadamides
Thanks for your feedback! We will investigate and update as appropriate.

@andyadamides
Could you please elaborate the query for better understanding. So, we can assist you further.

The blade for Key Vault in my Azure Portal looks like the image I pasted. The blade in this documentation page is inconsistent:
![image](https://user-images.githubusercontent.com/2568261/223373844-4d9ccea8-bd5c-4dc9-8cb0-6469e6328fb6.png)

@andyadamides
I'm going to assign this to the document author so they can take a look at it accordingly
@msmbaldwin
Can you please check and add your comments on this doc update request as applicable.

Thank you for letting us know. We updated the screenshot. #please-close


add a unit test for mounting cgroup v1

Codecov Report

Merging #392 (4923758) into main (36df0a1) will increase coverage by 0.74%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #392      +/-   ##
==========================================
+ Coverage   76.92%   77.66%   +0.74%
==========================================
  Files          52       52
  Lines        8280     8336      +56
==========================================
+ Hits         6369     6474     +105
+ Misses       1911     1862      -49


Sass "unquote" messages in terminal while building site

hugo v0.111.0-DEV-4346987faf6ca957a855c0bae2938da50c53bbf0+extended linux/amd64
Start building sites …
hugo v0.111.0-DEV-4346987faf6ca957a855c0bae2938da50c53bbf0+extended linux/amd64 BuildDate=2023-02-22T18:17:22Z
$hero_image: unquote("/images/branding/hero_hua9a3fe386f9ea701cd17932d3f64b3ee_167551_640x0_resize_q50_h2_catmullrom.webp");
$hero_image: unquote("/images/branding/hero_hua9a3fe386f9ea701cd17932d3f64b3ee_167551_640x0_resize_q50_h2_catmullrom.webp");

This is fixed.


Doorbird camera discussion

https://github.com/AlexxIT/go2rtc/issues/323
https://github.com/AlexxIT/go2rtc/issues/778
https://github.com/AlexxIT/go2rtc/issues/841

Hi,
how can I help to integrate backchannel audio for doorbird devices?

Developing two way without physical access to device is very hard task. There is no feedback.
Theoretically only possible if there is some other camera nearby that I can watch and hear through.

I'll give you access to my device. Here's the link to the api documentation:

You can find related information on page 18.

I also need yet another camera for feedback.

I'll give you access to my device. Here's the link to the api documentation: Doorbird API You can find related information on page 18.

@oeiber I can help also as requested

Hello, what do you need exactly, i own a doorbird too.

I also have a doorbird if I can help. On my side both video and audio receive work well. But not microphone.

There is a plugin in scrypted.app for doobird which seems to support audio transmit. Can it help ?
https://github.com/koush/scrypted/tree/main/plugins/doorbird

I also have a doorbird and would love this feature.

Dankeschön. An SIP hatte ich auch schon rumgewerkelt. Da ich aber ein Noob bin, habe ich es bisher nicht zum laufen gebracht;)
Ich teste den Guide und melde mich ✌

Thank you - sound great.
I also tried a bit with SIP but im a noob and was not able to get it running;) .Ill try with your guide.

Yes, same for me, but I succeed. Forum/discord + chatgpt help...
I can share you some config if needed

@fransiouz: I get crazy with asterisk. Iam not able to get my doorbird registered after several hours. I would appreciate if you could share your asterisk custom config files (extensions.conf / pjsip.conf / sip.conf)?

Here is my config. The main point is that it's not the doorbird that initiate the call, but your HA user from your phone or tablet. I created a HA user for my tablet where i have HA installed where I can initiate the call with the SIP CARD. In asterisk add-on, I set up a AMI password + auto add extensions. It will create an extension for the tablet user (in my case extension 102). Then you need to copy some conf files :
/homeassistant/asterisk/custom/extensions.conf
[default]
exten => _X!,1,Dial(${PJSIP_DIAL_CONTACTS(${EXTEN})})

/homeassistant/asterisk/custom/pjsip_custom.conf
[transport-udp]
type=transport
protocol=udp
bind=<IP_ADDRESS>:5060

[transport-wss]
type=transport
protocol=wss
bind=<IP_ADDRESS>

;choose an extension number for the doorbird
[6001]
type=endpoint
transport=transport-udp
context=default
disallow=all
allow=ulaw
auth=6001
aors=6001

[6001]
type=auth
auth_type=userpass
password=PASSWORD_TO_SET_IN_DOORBIRD
username=6001

[6001]
type=aor
max_contacts=1
contact=sip:6001@IP_DOORBIRD:5060

/homeassistant/asterisk/custom/confbridge.conf
Not sure if necessary, but it's there...
[general]
; Don't delete, required by asterisk

; Privileged HA users that respond to calls
[admin_user]
type=user
marked=yes
admin=yes
music_on_hold_when_empty=false
quiet=yes
hear_own_join_sound=no
send_events=yes

; Unprivileged doorbell user that initiates calls
[default_user]
type=user
send_events=yes
music_on_hold_when_empty=yes
quiet=yes
hear_own_join_sound=no
wait_marked=yes
end_marked=yes
timeout=300 ;5 minute max call time, set to 0 to make it unlimited

; Set up a conference bridge for each doorbell like this:
[doorbird]
type=bridge
max_members=10
enable_events=yes

Then, in doorbird apps, you need to configure and authorize SIP calls:
Administration /Favorites/Calls SIP ==> you need to add the HA users that are able to call the doorbird. For my tablet, i have added 102@IP_HOMEASSISTANT
Administration/SIP Parameters.
Activate SIP with IP where asterisk is installed (normally HA IP)
SIP users = 6001
Password SIP = same pass than in pjsip_custom.conf
Check Authorize calls IN and add your tablet (102@HA_IP) in Activated SIP users.
When you save this config in doorbird APPS, you should see in asterisk addon logs sip:6001@IPDOORBIRD is added.
Finally, in HA fronted, I added the sip card to be able to call the doorbird :
- type: custom:sipjs-card
    server: ASTERISK_IP
    port: "443" <== don't remember the default port
    video: false
    button_size: "62"
    prefix: ""
    custom:
      - name: Doorbell
        number: "6001"
        icon: mdi:doorbell
        camera: camera.doorbird
    extensions:
      - person: person.tablet
        name: Tablet
        extension: "102"
        secret: AUTO_ADD_PASSWORD

My whole setup is in https. You may have issues without https to be able to activate mic within the apps. But check the logs in asterisk add-on to see if the call is initiate or not.
Hope it help !
Keep me in touch

Thank your great the support. I finally got my doorbird connected without any issues. But im forcing the SSL error. I think this could connected to your "whole setup in https". But i dunno know how to solve this issues. I tried to connect to https://HA-IP:8089/ws to temporarily fix it, but still the same issue.
Asterisk Addon Logs:
[Nov 20 20:47:08] ERROR[2383]: iostream.c:663 ast_iostream_start_tls: Problem setting up ssl connection: error:00000001:lib(0)::reason(1), Internal SSL error [Nov 20 20:47:08] ERROR[2383]: tcptls.c:179 handle_tcptls_connection: Unable to set up ssl connection with peer '<IP_ADDRESS>:57840' [Nov 20 20:47:08] ERROR[2383]: iostream.c:563 ast_iostream_close: SSL_shutdown() failed: error:00000001:lib(0)::reason(1), Internal SSL error
Further i got an frontend issue. Not sure if this is connected to the ssl issue or a seperat task:

type: custom:sipjs-card
server:
port: "8089"
video: false
button_size: "62"
prefix: ""
custom:
name: Doorbell
number: "6001"
icon: mdi:doorbell
camera: camera.doorbird
extensions:
'- person: person.me
name: me
extension: "100"
secret: "Auto Add Secret from addon"
'- person: person.wife
name: wife
extension: "101"
secret: "Auto Add Secret from addon"

After investing some time with my colleague, here is our current status regarding backchannel audio with doorbird devices:
ffmpeg does not send "Content-Lenght: 99999" header, which is needed to keep the stream open.
The following go code streams pipeline inputs to the doorbird device:
`package main
import (
"bufio"
"flag"
"fmt"
"net"
"os"
"time"
)
type DoorbirdClient struct {
host      string
port      string
httpUser  string
httpPass  string
maxRateKB int
conn      net.Conn
}
func NewDoorbirdClient(host, port, httpUser, httpPass string, maxRateKB int) *DoorbirdClient {
return &DoorbirdClient{
host:      host,
port:      port,
httpUser:  httpUser,
httpPass:  httpPass,
maxRateKB: maxRateKB,
}
}
func (d *DoorbirdClient) doConnect() {
var err error
d.conn, err = net.Dial("tcp", d.host+":"+d.port)
if err != nil {
fmt.Println("Error connecting to target server:", err)
return
}
defer d.conn.Close()
fmt.Printf("Connected to %s:%s\n", d.host, d.port)

postHeader := fmt.Sprintf("POST /bha-api/audio-transmit.cgi?http-user=%s&http-password=%s HTTP/1.0\r\n", d.httpUser, d.httpPass)
headers := []string{
	postHeader,
	"Content-Type: audio/basic",
	"Connection: Keep-Alive",
	"Cache-Control: no-cache",
	"Content-Length: 999999",
	"",
}
for _, header := range headers {
	if _, err := d.conn.Write([]byte(header + "\r\n")); err != nil {
		fmt.Println("Error sending header:", err)
		return
	}
}

d.receiveAndSendData()

}
func (d *DoorbirdClient) receiveAndSendData() {
bufferSize := 1024
maxBytesPerSecond := d.maxRateKB * 1024
reader := bufio.NewReader(os.Stdin)
for {
	data := make([]byte, bufferSize)
	n, err := reader.Read(data)
	if err != nil {
		if err.Error() == "EOF" {
			break
		}
		fmt.Println("Error reading data:", err)
		return
	}

	if n == 0 {
		break
	}

	if _, err := d.conn.Write(data[:n]); err != nil {
		fmt.Println("Error sending data:", err)
		return
	}

	timeToWait := float64(n) / float64(maxBytesPerSecond)
	time.Sleep(time.Duration(timeToWait * float64(time.Second)))
}

fmt.Println("Finished sending all received data.")

}
func main() {
host := flag.String("host", "<IP_ADDRESS>", "Target host")
port := flag.String("port", "80", "Target port")
httpUser := flag.String("user", "user", "HTTP user")
httpPass := flag.String("pass", "pass", "HTTP password")
maxRateKB := flag.Int("rate", 8, "Maximum rate in KB/s")
flag.Parse()

client := NewDoorbirdClient(*host, *port, *httpUser, *httpPass, *maxRateKB)
client.doConnect()

}
example:ffmpeg -fflags nobuffer -f alaw -ar 8000 -i test.wav -ac 1 -ar 8000 -f mulaw - | go run main.go -host <IP_ADDRESS> -port 80 -user user -pass password`
As far as i know, tapo devices are working very similar, don't they?
@AlexxIT Maybe this code can be modified and added directly to go2rtc?

This is hard to do because there is no way I can test this code at all

Ok. I'll give you access to my dorbird device and will bring a notebook with microphone and speaker in front of it.

I think this should work

perfect! when would it be convenient for you?

It's hard to say. We could try this weekend.

sounds good! what do you need to access the windows notebook?

Any messenger from my contacts. Just voice call.

Thanks to @oeiber new source added to master version. Will be in next release:
streams:
  video-audio:
    - rtsp://user:pass@<IP_ADDRESS>:554/mpeg/media.amp
    - doorbird://user:pass@<IP_ADDRESS>?media=audio
  two-way:
    - rtsp://user:pass@<IP_ADDRESS>:554/mpeg/media.amp
    - doorbird://user:pass@<IP_ADDRESS>?media=audio
    -<EMAIL_ADDRESS>  mjpeg-video:
    - doorbird://user:pass@<IP_ADDRESS>?media=video

Unfortunately backchannel audio is not working for me, yet:
Configuration:
streams:
  spa01:
    - rtsp://user:password@<IP_ADDRESS>:8557/mpeg/720p/media.amp
    - doorbird://user:password@<IP_ADDRESS>?media=audio
    -<EMAIL_ADDRESS>
Stream info:
{
  "producers": [
    {
      "id": 7998,
      "format_name": "rtsp",
      "protocol": "rtsp+tcp",
      "remote_addr": "<IP_ADDRESS>:8557",
      "url": "rtsp://user:password@<IP_ADDRESS>:8557/mpeg/720p/media.amp",
      "sdp": "v=0\r\no=-<PHONE_NUMBER>359174 1 IN IP4 <IP_ADDRESS>\r\ns=RTSP/RTP stream from DoorBird\r\ni=mpeg/720p/media.amp\r\nt=0 0\r\na=tool:LIVE555 Streaming Media v2024.05.15\r\na=type:broadcast\r\na=control:*\r\na=range:npt=now-\r\na=x-qt-text-nam:RTSP/RTP stream from DoorBird\r\na=x-qt-text-inf:mpeg/720p/media.amp\r\nm=video 0 RTP/AVP 96\r\nc=IN IP4 <IP_ADDRESS>\r\nb=AS:2\r\na=rtpmap:96 H264/90000\r\na=fmtp:96 packetization-mode=1;profile-level-id=4D0028;sprop-parameter-sets=Z00AKNoBQBbpUgAAAwDwAAA4QMCAAehIAAiVRe98LwiEag==,aO48gA==\r\na=control:track1\r\n",
      "user_agent": "go2rtc/1.9.7",
      "medias": [
        "video, recvonly, H264"
      ],
      "receivers": [
        {
          "id": 7999,
          "codec": {
            "codec_name": "h264",
            "codec_type": "video",
            "level": 40,
            "profile": "Main"
          },
          "childs": [
            8000
          ],
          "bytes": 7104992,
          "packets": 5426
        }
      ],
      "bytes_recv": 7171280
    },
    {
      "id": 8001,
      "format_name": "pcm",
      "protocol": "http",
      "remote_addr": "<IP_ADDRESS>",
      "url": "http://user:password@<IP_ADDRESS>/bha-api/audio-receive.cgi?media=audio",
      "medias": [
        "audio, recvonly, PCMU/8000"
      ],
      "receivers": [
        {
          "id": 8005,
          "codec": {
            "codec_name": "pcm_mulaw",
            "codec_type": "audio",
            "sample_rate": 8000
          },
          "childs": [
            8006
          ],
          "bytes": 758784,
          "packets": 741
        }
      ],
      "bytes_recv": 758784
    },
    {
      "id": 25465,
      "format_name": "doorbird",
      "protocol": "http",
      "url": "http://<IP_ADDRESS>/bha-api/audio-transmit.cgi?http-user=user\u0026http-password=password",
      "medias": [
        "audio, sendonly, PCMU/8000"
      ],
      "senders": [
        {
          "id": 25466,
          "codec": {
            "codec_name": "pcm_mulaw",
            "codec_type": "audio",
            "sample_rate": 8000
          },
          "parent": 8003
        }
      ]
    }
  ],
  "consumers": [
    {
      "id": 7997,
      "format_name": "webrtc",
      "protocol": "ws+udp",
      "remote_addr": "<IP_ADDRESS>:61586 host",
      "user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 18_0_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Home Assistant/2024.11 (io.robbie.HomeAssistant; build:2024.971; iOS 18.0.1) Mobile/HomeAssistant, like Safari",
      "medias": [
        "video, sendonly, H264, H265, VP8, VP9",
        "audio, recvonly, OPUS/48000/2, G722/8000, PCMU/8000, PCMA/8000",
        "audio, sendonly, OPUS/48000/2, G722/8000, PCMU/8000, PCMA/8000, L16, PCML"
      ],
      "receivers": [
        {
          "id": 8003,
          "codec": {
            "codec_name": "pcm_mulaw",
            "codec_type": "audio",
            "sample_rate": 8000
          },
          "childs": [
            25466
          ],
          "bytes": 375520,
          "packets": 2347
        }
      ],
      "senders": [
        {
          "id": 8000,
          "codec": {
            "codec_name": "h264",
            "codec_type": "video"
          },
          "parent": 7999,
          "bytes": 7104992,
          "packets": 5426
        },
        {
          "id": 8006,
          "codec": {
            "codec_name": "pcm_mulaw",
            "codec_type": "audio",
            "sample_rate": 8000
          },
          "parent": 8005,
          "bytes": 758784,
          "packets": 741
        }
      ],
      "bytes_recv": 424420,
      "bytes_send": 7952220
    }
  ]
}

I can see a lot of retries in the logs.
My college did also some testing with transfering audio to doorbird devices. He finally ended up with using a tcp socket instead of http. He also meantioned, it would be neccacary to implement some rate control, because of doorbird's weak tcp buffering behaviour:

package main

import (
	"bufio"
	"flag"
	"fmt"
	"net"
	"os"
	"time"
)

type DoorbirdClient struct {
	host      string
	port      string
	httpUser  string
	httpPass  string
	maxRateKB int
	conn      net.Conn
}

func NewDoorbirdClient(host, port, httpUser, httpPass string, maxRateKB int) *DoorbirdClient {
	return &DoorbirdClient{
		host:      host,
		port:      port,
		httpUser:  httpUser,
		httpPass:  httpPass,
		maxRateKB: maxRateKB,
	}
}

func (d *DoorbirdClient) doConnect() {
	var err error
	d.conn, err = net.Dial("tcp", d.host+":"+d.port)
	if err != nil {
		fmt.Println("Error connecting to target server:", err)
		return
	}
	defer d.conn.Close()

	fmt.Printf("Connected to %s:%s\n", d.host, d.port)

	postHeader := fmt.Sprintf("POST /bha-api/audio-transmit.cgi?http-user=%s&http-password=%s HTTP/1.0\r\n", d.httpUser, d.httpPass)
	headers := []string{
		postHeader,
		"Content-Type: audio/basic",
		"Connection: Keep-Alive",
		"Cache-Control: no-cache",
		"Content-Length: 999999",
		"",
	}
	for _, header := range headers {
		if _, err := d.conn.Write([]byte(header + "\r\n")); err != nil {
			fmt.Println("Error sending header:", err)
			return
		}
	}

	d.receiveAndSendData()
}

func (d *DoorbirdClient) receiveAndSendData() {
	bufferSize := 1024
	maxBytesPerSecond := d.maxRateKB * 1024
	reader := bufio.NewReader(os.Stdin)

	for {
		data := make([]byte, bufferSize)
		n, err := reader.Read(data)
		if err != nil {
			if err.Error() == "EOF" {
				break
			}
			fmt.Println("Error reading data:", err)
			return
		}

		if n == 0 {
			break
		}

		if _, err := d.conn.Write(data[:n]); err != nil {
			fmt.Println("Error sending data:", err)
			return
		}

		timeToWait := float64(n) / float64(maxBytesPerSecond)
		time.Sleep(time.Duration(timeToWait * float64(time.Second)))
	}

	fmt.Println("Finished sending all received data.")
}

func main() {
	host := flag.String("host", "<IP_ADDRESS>", "Target host")
	port := flag.String("port", "80", "Target port")
	httpUser := flag.String("user", "user", "HTTP user")
	httpPass := flag.String("pass", "pass", "HTTP password")
	maxRateKB := flag.Int("rate", 8, "Maximum rate in KB/s")

	flag.Parse()

	client := NewDoorbirdClient(*host, *port, *httpUser, *httpPass, *maxRateKB)
	client.doConnect()
}

What do you think?

go2rtc also uses raw TCP connection
it's not about buffering, but about real time

@kevp89 Thanks. I don't use standard http client, but I do use standard http request. I don't use standard http, but I do use standard http request.
https://github.com/AlexxIT/go2rtc/blob/d7cdc8b3b07f6fbff7daae2736377de98444b962/pkg/doorbird/backchannel.go#L30-L53

Hi @ll,
First come first: Thank you guys for setting this all up to get the doorbirds running with go2rtc
Yesterday I have downloaded the nightly release, and I can confirm I can receive audio now.
However, as soon as I press the microphone button my Doorbird is running into its limits.
Home Assistant still has access to doorbird but I am only barely able to use the app to connect. Also the connection with the doorbird app on my mobile is not working anymore properly. Everything is super slow and I get reoccurring responses to check the data connection. By the way, the microphone path is also not working. Have still only receive path.

Resetting the doorbird (plugging out and in from power) doesn’t help to improve.
Disabling the microphone in Home Assistant is also not helping.
Only when I stop and restart Frigate/go2rtc the doorbird starts to behave properly and all connections are working as expected, again.

Not sure, whether my setup is wrong, but in summary my doorbird is stalled as soon as I activate the microphone and it heals only, when I restart Frigate/go2rtc.
I am using the 2-way configuration:
    Frontdoor:
      - rtsp://userid:password@myIP:8557/mpeg/720p/media.amp
      - doorbird://userid:password@myIP?media=audio
      - doorbird://userid:password@myIP

@fladenbrotic which version did you try?

I have made changes after @kevp89 advice. You can try new master version.

@fladenbrotic which version did you try?

go2rtc platform=linux/arm64 revision=mod.d7cdc8b version=1.9.7

I have made changes after @kevp89 advice. You can try new master version.

Hi Alex,
did download the latest nightly build.

go2rtc platform=linux/arm64 revision=mod.d8c0f9d version=1.9.7

unfortunatelly, I do not see any difference.

Hi @ll,
I just realized something indeed changed.
Now it is sufficiant to close the browser tab to get it back to normal.
I also realized that now, the microphone is not toggeling in Frigate lovelace card (I am using home assistant). Which means, when I press the mic-symbol it is changing shortly to red and jumps back to the striked-through mic icon. On the other side, the the browser is confirming the mic is in use.
In summary. It seems like the mic is turned on, but Frigate doesn't recognize the same. Closing of the tab is healing the system.
Not sure, if these informatin are helping to circle the issue down.
Regards

It is better to debug the work in go2rtc WebUI. And if everything is fine there, move on to other software.

Hi Alex
Unfortunately even with the latest build the error persists.
Currently the producer is started and afterwords it's looping endlessly through the producer.reconnect function.
As far as i know the doorbird does block every client from sending data apart from the first one.
Currently the producer reconnect does spawn a tcp session per reconnect and according to the packet captures there is no voice data in the transmitted request, just the header and afterwards no data.
After several seconds the doorbird closes the connection with "HTTP/200 OK"
13:06:37.056 DBG [streams] retry=0 to<EMAIL_ADDRESS>13:06:37.059 DBG [streams] retry=0 to<EMAIL_ADDRESS>13:06:37.062 DBG [streams] retry=0 to<EMAIL_ADDRESS>13:06:37.065 DBG [streams] retry=0 to<EMAIL_ADDRESS>13:06:37.069 DBG [streams] retry=0 to<EMAIL_ADDRESS>13:06:37.071 DBG [streams] retry=0 to<EMAIL_ADDRESS>13:06:37.075 DBG [streams] retry=0 to<EMAIL_ADDRESS>13:06:37.078 DBG [streams] retry=0 to<EMAIL_ADDRESS>13:06:37.082 DBG [streams] retry=0 to<EMAIL_ADDRESS>13:06:37.085 DBG [streams] retry=0 to<EMAIL_ADDRESS>13:06:37.090 DBG [streams] retry=0 to<EMAIL_ADDRESS>13:06:37.096 DBG [streams] retry=0 to<EMAIL_ADDRESS>13:06:37.099 DBG [streams] retry=0 to<EMAIL_ADDRESS>13:06:37.103 DBG [streams] retry=0 to<EMAIL_ADDRESS>13:06:37.107 DBG [streams] retry=0 to<EMAIL_ADDRESS>13:06:37.110 DBG [streams] retry=0 to<EMAIL_ADDRESS>13:06:37.113 DBG [streams] retry=0 to<EMAIL_ADDRESS>13:06:37.116 DBG [streams] retry=0 to<EMAIL_ADDRESS>

You forgot real time flags in your input
https://github.com/AlexxIT/go2rtc/blob/f1ba5e95ec21f3e03c158a372ca25d53193c6992/internal/ffmpeg/ffmpeg.go#L66

Hi @AlexxIT,
as @kevp89 already mentioned, the error persists. Using wireshark, I can see there's a new TCP stream, everytime go2rtc loops through the reconnect function. Additionally there's also no voice data inside the stream.
How can I help to solve the problem?

It's hard to say. It worked when I tested it. It will be possible to retry the remote connection next sunday.

It's hard to say. It worked when I tested it. It will be possible to retry the remote connection next sunday.

Hi Alex! Unfortunately Sunday doesn't work for me. Maybe we can find some time a few days later? Thank you!


fix travis-ci python3.6 build and add python3.7

Fix python3.6 travis-ci and tox configuration
Add python3.7 travis-ci and tox configuration

ps: the build will fail with tox==2.4.1, however, this error has been fixed (https://github.com/tox-dev/tox/pull/382) and will be shipped with the next tox version

Hi @luzfcb! Thanks for the PR 👋
Shall we remove 3.7 for now?

Closing this in favor of https://github.com/audreyr/cookiecutter/pull/844


Reduced message size for standard UDP protocol?

Dear all,
I am testing the possibilities to control the Panda using the FCI using a small embedded computing unit. The network chip of this computing unit has an MTU-size of 1500 bytes and is not equipped with a Gigabit ethernet port.
While outgoing UDP control messages for the franka robot have a size of ca 370 bytes, incoming robot-state messages sent by the robot have more than 1500 bytes, which consistently leads to significant delays due to package fragmentation.
Is there any way to reduce the size of the incoming robot state messages to something smaller than 1500 bytes? Even temporary or hacky solutions would be highly appreciated!

Hi,
we thought about going back to 1472 bytes for the robot state to avoid packet fragmentation e.g. by using compression. However, this is more of a longterm goal. There is no way to reduce the size of the robot state without changing the FCI, what would require an update of the firmware of the robot.
What is your result of the ping test? In general, 100 Mbit/s (full duplex) would be more than enough for FCI.

Thank you for the quick response, I see that this might be a long-term issue then.
At the core of the problem is that my hardware is not equipped with a dedicated network chip, the fragmentation/reassembly is handled by the CPU, which only frees up time for this every 10ms.

Would it be an option to implement some sort of subscription system? Some other robot manufacturers allow you to register for specific data, instead of always streaming a full message.
For the default setup, it could just subscribe to everything.
For other uses, consumers could express interest in subsets which could lower datarate requirements (and the issue that @markusgft is running into) significantly.

A subscription system like the one proposed by @gavanderhoorn would certainly be a great solution.
Another potential mid-term solution (not requiring compression/decompression) would be to simply reduce the message size. I think the current robot state message is just slightly larger than 1500 bytes. At the same time it I find it very "verbose", e.g.

the strings descripting failure or robot states could potentially be made much leaner
the orientation-states could be expressed in terms of quaternions rather than rotation matrices
etc...

In any case, I do not have the feeling that there will be a quick solution. Lets close this for now.


Low FPS on a DX7 game

The latest experimental release is the only one that runs the game, but in an extremely low framerate. The game isnt very well known, but it's a classic in my country. I am attaching the log in the hopes that it might give you some insight.
DDrawCompat-B2000.log

Thanks. I can reproduce the issue with other palettized games on Intel HD actually. I'll try to fix it for the next release.

Great! Might I ask when's the next release coming? 😁
On Sun, Mar 28, 2021, 12:23 narzoul @.***> wrote:

Thanks. I can reproduce the issue with other palettized games on Intel HD
actually. I'll try to fix it for the next release.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/narzoul/DDrawCompat/issues/89#issuecomment-808870399,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHJPRI3S5XZXR7RDFSAWDF3TF37SDANCNFSM4Z5MHF6Q
.

If I find the issue quickly enough, then maybe tonight, otherwise probably sometime next week.

That's great! Thank you so much :)
On Sun, Mar 28, 2021, 12:28 narzoul @.***> wrote:

If I find the issue quickly enough, then maybe tonight, otherwise probably
sometime next week.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/narzoul/DDrawCompat/issues/89#issuecomment-808870934,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHJPRI55LI5KZDDWNLE4JPTTF4AGDANCNFSM4Z5MHF6Q
.

I've updated the experimental release, that should fix the issue now. Feel free to reopen if it doesn't.

It works! Thank you very much! I actually tried a LOT of ddraw
implementations and this is the only one that has worked. I hope you have a
great upcoming week!
On Sun, Mar 28, 2021, 21:25 narzoul @.***> wrote:

I've updated the experimental release, that should fix the issue now. Feel
free to reopen if it doesn't.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/narzoul/DDrawCompat/issues/89#issuecomment-808937375,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHJPRI3DQF4OSBJLIHCLPM3TF57A5ANCNFSM4Z5MHF6Q
.


🐛 BUG: wrangler deploy does not bind to configured KV namespaces

Which Cloudflare product(s) does this pertain to?
KV, Wrangler core
What version(s) of the tool(s) are you using?
3.51.0 [Wrangler]
What version of Node are you using?
20.11.1
What operating system and version are you using?
Mac Sonoma 14.2.1
Describe the Bug
Observed behavior
When I run wrangler deploy in my worker project, the worker will be deployed and show all the bindings in console but the KV binding. All the bindings are specified in wrangler.toml file, a KV namespace is included.
kv_namespaces = [
  { binding = "MyKV", id = "xxx" }
]

Expected behavior
My worker should connect to MyKV and appear in console log.
Please provide a link to a minimal reproduction
No response
Please provide any relevant error logs
No response

I found the root cause of the issue. The settings for KV bindings will no longer working if I use the syntax:
kv_namespaces = [
  { binding = "<BINDING_NAME1>", id = "<NAMESPACE_ID1>" },
  { binding = "<BINDING_NAME2>", id = "<NAMESPACE_ID2>" }
]

It works normally after I change to the syntax:
[[kv_namespaces]]
binding = "<BINDING_NAME1>"
id = "<NAMESPACE_ID1>"

[[kv_namespaces]]
binding = "<BINDING_NAME2>"
id = "<NAMESPACE_ID2>"

I also ran into the same issue. npx wrangler deploy would not push the kv_namespace binding up.
The formatting change posted by @an-nguyen-codeleap solved the issue.

I found the root cause of the issue. The settings for KV bindings will no longer working if I use the syntax:
kv_namespaces = [
  { binding = "<BINDING_NAME1>", id = "<NAMESPACE_ID1>" },
  { binding = "<BINDING_NAME2>", id = "<NAMESPACE_ID2>" }
]

It works normally after I change to the syntax:
[[kv_namespaces]]
binding = "<BINDING_NAME1>"
id = "<NAMESPACE_ID1>"

[[kv_namespaces]]
binding = "<BINDING_NAME2>"
id = "<NAMESPACE_ID2>"

so many docs, websites and asking ai shows the old syntax, I had a feeling it was wrong because of the [ai] binding but this is the only fucking place that I find the new syntax... waste of time.

Yeah - this needs the docs updating, wasted hours on this


Better support for color blindness

I suggest making a custom version of the theme for color-blind simplicity. You can change the theme colors I have seen it on Atom UI/Syntax Theme READMEs.

I suggest making a custom version of the theme for color-blind simplicity. You can change the theme colors I have seen it on Atom UI/Syntax Theme READMEs.

A specialized version of the theme? Not just improve the colors of this? Sure. "General usability" isn't a design point (although "look good" is one of them)

This is the theme without any color :

This is the theme without any color :

That's actually not as bad as I expected! The function/class definitions still contrasts!

That's actually not as bad as I expected! The function/class definitions still contrasts!

@KomodoKode You can pull request some tweaked colors.
Remember, the average dev workflow is:
git clone
cd fall-syntax
apm link . --dev
<Open it in dev mode>

@KomodoKode You can pull request some tweaked colors.
Remember, the average dev workflow is:
git clone
cd fall-syntax
apm link . --dev
<Open it in dev mode>

Got it, Thanks!

Got it, Thanks!

Got it, Thanks!

Got it, Thanks!


Generate themed screenshots

Provide login credentials to Device farm in-app explorer, and save generated screenshots in a meta  folder

Keep working on this as an automation process. I'll get the initial screenshots up for beta

@renevatium Cool, will be generating future screenshots in this pre push hook

Duplicate of #64


Bad sympification of matrix from sympy

If inputing a sympy matrix to the symengine Matrix constructor the resulting symengine matrix will get wrong dimensions
import sympy

import symengine

A = sympy.Matrix([[1,2], [3,4]])

symengine.Matrix(A)
Out[1]:
[1]
[2]
[3]
[4]

Fixed by #350


ubootNanoPCT4: Init at 2021.01

Motivation for this change
For @tmountain, do not merge without their approval of the PR.
Assuming this board doesn't do anything extremely weird, it should work just like every other RK3399 board with mainline u-boot.
To test:
 $ nix-build -A pkgsCross.aarch64-multiplatform.ubootNanoPCT4
[...]
  CFGCHK  u-boot.cfg
installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/fpryf9d42kayllzwv619rzmsjlgdclvw-uboot-nanopc-t4-rk3399_defconfig-2021.01-aarch64-unknown-linux-gnu
patching script interpreter paths in /nix/store/fpryf9d42kayllzwv619rzmsjlgdclvw-uboot-nanopc-t4-rk3399_defconfig-2021.01-aarch64-unknown-linux-gnu
checking for references to /build/ in /nix/store/fpryf9d42kayllzwv619rzmsjlgdclvw-uboot-nanopc-t4-rk3399_defconfig-2021.01-aarch64-unknown-linux-gnu...
/nix/store/fpryf9d42kayllzwv619rzmsjlgdclvw-uboot-nanopc-t4-rk3399_defconfig-2021.01-aarch64-unknown-linux-gnu

 $ dd if=result/idbloader.img of=/dev/mmcblkX conv=fsync,notrunc bs=512 seek=64

 $ dd if=result/u-boot.itb of=/dev/mmcblkX conv=fsync,notrunc bs=512 seek=16384

It is unknown to me if the HDMI output during u-boot should or should not be working.
Things done

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

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

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

Converted to draft until @tmountain verifies it works.

Converted to draft until @tmountain verifies it works.

I tried building as instructed, and I ran into the following issue.
$ git clone https://github.com/samueldr/nixpkgs.git
$ git checkout feature/u-boot-nanopc-t4-rk3399
$ nix-build -j6 -A pkgsCross.aarch64-multiplatform.ubootNanoPCT4

make: *** [Makefile:940: all] Error 2
builder for '/nix/store/fffgk84q7b22qxlzxaxk19ihya32kdm0-aarch64-unknown-linux-gnu-stage-static-gcc-debug-10.2.0.drv' failed with exit code 2
cannot build derivation '/nix/store/lh4fnlvzigz78j5kc89w3xg42jx4hzfh-aarch64-unknown-linux-gnu-stage-static-gcc-debug-wrapper-10.2.0.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/v5blkadz217pm41dq0dvr1xw3w97808d-stdenv-linux.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/ym4vc0269ipxkdwzgdd41wl34cx3y8ks-glibc-2.32-24-aarch64-unknown-linux-gnu.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/9ps20aawh3l5rxsz2z7v0h1mysapvcya-aarch64-unknown-linux-gnu-stage-final-gcc-debug-wrapper-9.3.0.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/k6zm5n5bh369i23ssqmcmjbixnfq65xx-perl-5.32.0-aarch64-unknown-linux-gnu.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/nxb398h5fvw8cfspgdb1vy0z7gz6ixip-openssl-1.1.1i-aarch64-unknown-linux-gnu.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/svmjdfdadrd75cvwg9ad9k11kh04w9s2-stdenv-linux.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/43bmlkajn1jxqzc6nxprn5pbnbxlbnj7-uboot-nanopc-t4-rk3399_defconfig-2021.01-aarch64-unknown-linux-gnu.drv': 1 dependencies couldn't be built
error: build of '/nix/store/43bmlkajn1jxqzc6nxprn5pbnbxlbnj7-uboot-nanopc-t4-rk3399_defconfig-2021.01-aarch64-unknown-linux-gnu.drv' failed

New to Nix, so please let me know if I'm doing something wrong.

I tried building as instructed, and I ran into the following issue.
$ git clone https://github.com/samueldr/nixpkgs.git
$ git checkout feature/u-boot-nanopc-t4-rk3399
$ nix-build -j6 -A pkgsCross.aarch64-multiplatform.ubootNanoPCT4

make: *** [Makefile:940: all] Error 2
builder for '/nix/store/fffgk84q7b22qxlzxaxk19ihya32kdm0-aarch64-unknown-linux-gnu-stage-static-gcc-debug-10.2.0.drv' failed with exit code 2
cannot build derivation '/nix/store/lh4fnlvzigz78j5kc89w3xg42jx4hzfh-aarch64-unknown-linux-gnu-stage-static-gcc-debug-wrapper-10.2.0.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/v5blkadz217pm41dq0dvr1xw3w97808d-stdenv-linux.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/ym4vc0269ipxkdwzgdd41wl34cx3y8ks-glibc-2.32-24-aarch64-unknown-linux-gnu.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/9ps20aawh3l5rxsz2z7v0h1mysapvcya-aarch64-unknown-linux-gnu-stage-final-gcc-debug-wrapper-9.3.0.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/k6zm5n5bh369i23ssqmcmjbixnfq65xx-perl-5.32.0-aarch64-unknown-linux-gnu.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/nxb398h5fvw8cfspgdb1vy0z7gz6ixip-openssl-1.1.1i-aarch64-unknown-linux-gnu.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/svmjdfdadrd75cvwg9ad9k11kh04w9s2-stdenv-linux.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/43bmlkajn1jxqzc6nxprn5pbnbxlbnj7-uboot-nanopc-t4-rk3399_defconfig-2021.01-aarch64-unknown-linux-gnu.drv': 1 dependencies couldn't be built
error: build of '/nix/store/43bmlkajn1jxqzc6nxprn5pbnbxlbnj7-uboot-nanopc-t4-rk3399_defconfig-2021.01-aarch64-unknown-linux-gnu.drv' failed

New to Nix, so please let me know if I'm doing something wrong.

Was this done on the device itself? The exact instructions I shared were to cross-compile from an x86_64 system.
To do it on the AArch64 system:
 $ nix-build -A ubootNanoPCT4

Was this done on the device itself? The exact instructions I shared were to cross-compile from an x86_64 system.
To do it on the AArch64 system:
 $ nix-build -A ubootNanoPCT4

Got it to build just fine after switching away from the cross-compile version. I installed the image, and it tries to boot, but it gets stuck in a Getty loop (loading the info below repeatedly, see the screenshot).
https://imgur.com/a/Ryrh90t
Re-flashing with the pre-built u-boot images that I took from Armbian u-boot resolves the issue, and I can boot the Nix installer successfully.

Got it to build just fine after switching away from the cross-compile version. I installed the image, and it tries to boot, but it gets stuck in a Getty loop (loading the info below repeatedly, see the screenshot).
https://imgur.com/a/Ryrh90t
Re-flashing with the pre-built u-boot images that I took from Armbian u-boot resolves the issue, and I can boot the Nix installer successfully.

Doing some digging is leading me to wonder if this is related to CPU frequency. (This issue)[https://forum.armbian.com/topic/5556-neo2-usually-doesnt-cold-start-on-first-attempt/] showed the same symptom (Getty restarting), and the discussion pointed towards CPU frequency. In previous u-boot builds for the NanoPC-T4, I have seen images incorporated with a specific frequency:
  # taken from https://github.com/archlinuxarm/PKGBUILDs/pull/1728/files
  tools/mkimage -n rk3399 -T rksd -d ../rkbin/bin/rk33/rk3399_ddr_933MHz_v1.23.bin "${pkgdir}/boot/idbloader.img"
  cat ../rkbin/bin/rk33/rk3399_miniloader_v1.19.bin >> "${pkgdir}/boot/idbloader.img"

Not sure if it is related, but throwing out a suggestion in case it is helpful. I'm available to continue testing if needed.

Doing some digging is leading me to wonder if this is related to CPU frequency. (This issue)[https://forum.armbian.com/topic/5556-neo2-usually-doesnt-cold-start-on-first-attempt/] showed the same symptom (Getty restarting), and the discussion pointed towards CPU frequency. In previous u-boot builds for the NanoPC-T4, I have seen images incorporated with a specific frequency:
  # taken from https://github.com/archlinuxarm/PKGBUILDs/pull/1728/files
  tools/mkimage -n rk3399 -T rksd -d ../rkbin/bin/rk33/rk3399_ddr_933MHz_v1.23.bin "${pkgdir}/boot/idbloader.img"
  cat ../rkbin/bin/rk33/rk3399_miniloader_v1.19.bin >> "${pkgdir}/boot/idbloader.img"

Not sure if it is related, but throwing out a suggestion in case it is helpful. I'm available to continue testing if needed.

I'm not familiar with this specific problem, but that frequency refers to the DRAM frequency. That file is the first stage bootloader (TPL) that does DRAM initialization.
With the Rock64 (RK3328), the U-Boot TPL doesn't work right and the kernel would usually crash before finishing booting, presumably due to memory corruption. I had to use the Rockchip provided binary blob instead. With the RockPro64 (RK3399), the  U-Boot TPL works, but maybe it doesn't for the NanoPC-T4.

I'm not familiar with this specific problem, but that frequency refers to the DRAM frequency. That file is the first stage bootloader (TPL) that does DRAM initialization.
With the Rock64 (RK3328), the U-Boot TPL doesn't work right and the kernel would usually crash before finishing booting, presumably due to memory corruption. I had to use the Rockchip provided binary blob instead. With the RockPro64 (RK3399), the  U-Boot TPL works, but maybe it doesn't for the NanoPC-T4.

I got a USB-to-TTL serial cable and used it to capture the boot messages via UART. Here's the full boot log for the image resulting from:
 $ nix-build -A ubootNanoPCT4

https://gist.github.com/tmountain/f3fd939dece80aaeb069c28db7d54e3d

I got a USB-to-TTL serial cable and used it to capture the boot messages via UART. Here's the full boot log for the image resulting from:
 $ nix-build -A ubootNanoPCT4

https://gist.github.com/tmountain/f3fd939dece80aaeb069c28db7d54e3d

@samueldr
After spending a ton of time on this, I can confidently say that the NanoPC-T4 does not work with the upstream u-boot. The only u-boot that I have been able to get to work reliably is the u-boot provided with Armbian (heavily patched), and after a lot of digging, I have extrapolated the appropriate patches and set up my own custom u-boot repo, which consists of the u-boot v2020.10 release with the appropriate Armbian patches applied.
My repo and relevant build instructions are available here:
https://github.com/tmountain/u-boot-nanopct4
I believe this repo provides a solid basis for a Nix derivation as it applies to u-boot and the NanoPC-T4; however, I'm uncertain what the Nix policy is regarding unofficial repos, etc. That said, you can view the patch itself here.
I'd be happy to take a stab at creating a new PR built around this work if it makes sense. If not, well... I'll keep the repo around for folks that want to build their own u-boot images for the nano.
Lastly, I tried reporting the NanoPC-T4 issues to the u-boot mailing list, but I did not receive a response.

@samueldr
After spending a ton of time on this, I can confidently say that the NanoPC-T4 does not work with the upstream u-boot. The only u-boot that I have been able to get to work reliably is the u-boot provided with Armbian (heavily patched), and after a lot of digging, I have extrapolated the appropriate patches and set up my own custom u-boot repo, which consists of the u-boot v2020.10 release with the appropriate Armbian patches applied.
My repo and relevant build instructions are available here:
https://github.com/tmountain/u-boot-nanopct4
I believe this repo provides a solid basis for a Nix derivation as it applies to u-boot and the NanoPC-T4; however, I'm uncertain what the Nix policy is regarding unofficial repos, etc. That said, you can view the patch itself here.
I'd be happy to take a stab at creating a new PR built around this work if it makes sense. If not, well... I'll keep the repo around for folks that want to build their own u-boot images for the nano.
Lastly, I tried reporting the NanoPC-T4 issues to the u-boot mailing list, but I did not receive a response.


Npc quests

Where else have you looked for answers to this question?
I have searched around for information on google for the last 1 hour and cant seem to find an answer
Share your question with as much detail as possible.
Is it possible to make the quests stay in the gui after being completed but just get the enchanted effect? And how would i do this?

Assuming you mean the built-in NPC GUI, there is not a way to accomplish this. You could request this functionality in something like QuestsGUI.


Good with Postman, Bad for Chrome - CORS

Hello!
When I try to use the withCors feature (copied into a middleware/withCors.ts file) - it is cool with Postman, but doesn't seem to work with Chrome-Fetch.  NodeJs also grabs it as well.  Is this a known issue and is there a workaround for it?    I think my biggest point of confusion is how I'm supposed to wrap the response.
router.get('/spell*', requireKey)
    .get('/spell-list', withCors({ methods: 'GET', maxAge: 86400, allowCredentials: true }), listSpells);

export const listSpells = async (): Promise<Response> => {
    const spellList = [ ... ]
    const response = new Response(JSON.stringify(spellList));
    response.headers.set('Content-Type', 'application/json');
    response.headers.set('Access-Control-Allow-Origin', '*')

    return response
}

This is what I have so far
withCors.ts
export const withCors = (options: {
    origin?: string,
    methods?: string,
    headers?: string,
    maxAge?: number,
    allowCredentials?: boolean,
}) => (request: Request) => {
    const {
        origin = '*',
        methods = 'GET, POST, PATCH, PUT, DELETE',
        headers = 'referer, origin, content-type, x-api-key',
        maxAge = null,
        allowCredentials = false,
    } = options

    const referer = request.headers.get('Referer') ?? 'localhost'
    const apiKey = request.headers.get('x-api-key') ?? ''
    console.log(options, apiKey, referer);

    const url = new URL(referer)
    const allowedOrigin = url.origin.match(/[^\w](example\.com)|(localhost:1313)$/)
        ? url.origin
        : 'https://example.com'

    if (
        request.headers.get('Origin') !== null &&
        request.headers.get('Access-Control-Request-Method') !== null
    ) {
        const headIni: HeadersInit = new Headers();
        headIni.append('Access-Control-Allow-Origin', origin)
        headIni.append('Access-Control-Allow-Methods', methods)
        headIni.append('Access-Control-Allow-Headers', headers)
        if (allowCredentials) {
            headIni.append('Access-Control-Allow-Credentials', 'true')
        }

        if (maxAge) {
            headIni.append('Access-Control-Max-Age', `${maxAge}`)
        }

        // Handle CORS pre-flight request.
        return new Response(null, {
            status: 204,
            headers: headIni
        })
    }

    // Handle standard OPTIONS request.
    if (request.method === 'OPTIONS') {
        return new Response(null, {
            headers: {
                'Allow': `${methods}, HEAD, OPTIONS`,
            }
        })
    }
}

export const addCorsHeaders = (request: Request) => (response: Response) => {
    let allowedOrigin = 'https://example.com'
    const referer = request.headers.get('Referer')

    if (referer) {
        const url = new URL(referer)
        allowedOrigin = url.origin.match(/[^\w](example\.com)|(localhost:1313)$/)
            ? url.origin
            : allowedOrigin
    }

    try {
        response.headers.set('Access-Control-Allow-Origin', allowedOrigin)
        response.headers.set('Access-Control-Allow-Methods', 'GET, HEAD, POST, PATCH, DELETE, OPTIONS')
        response.headers.set('Access-Control-Allow-Credentials', 'true')
    } catch (err) {
        // couldn't modify headers
    }

    return response
}

I'm encountering the same exact issue

Does the case in this line  headers = 'referer, origin, content-type, x-api-key', matter?
Later you're pulling Referer and Origin from the headers... should the case match?
like:  headers = 'Referer, Origin, Content-Type, x-api-key',


Expired certificate demo version

Issue description
On demo.streamaserver.org, there is an alert for security problem. It sais that certificate is expired from 28/03/2020 (today).
Steps to Reproduce
Go to https://demo.streamaserver.org/ and see.

TODO : renew certificate

yep, this is onhoing. thanks :)

Site is now down altogether - points to namecheap parking servers with A records, but they give a 502 Bad Gateway on http and refuse connection on https. Removing demo link from https://github.com/awesome-selfhosted/awesome-selfhosted/ listing.

I’ve just seen the new link for the demo version, it works fine, thanks !
Huge thank for all your great work @dularion :D

Thanks for noticing :)


Figure out why certain file types do not work with img tag on hover event

Presently with the <img> tag in relation to hovering over the src, there are certain file types that don't presently appear to work, these being:
bmp
no file type(extension)
tiff(but it doesn't appear to be a web file format, so neglect able I imagine)
The following are presently working:
svg
jpg
jpeg
png
gif

There's a possible way to hack this upstream to make it work for any URL.  It involves programmatically trying to assign a URL to an img element's src, and listening for onload and onerror:
var img = document.createElement('img');
img.onload = function() {
  // url points to an image and can be loaded, display pop-up
};
img.onerror = function() {
  // url points to a non-image, and can't be loaded, don't display.
};
img.src = url;

I'd look in Brackets' upstream issues and see if this is filed already.

I filed https://github.com/adobe/brackets/issues/10786 upstream.

I got sick of waiting for this to land upstream, so I've just landed it on our fork.  Closing.


Examples of use or screencast of how this package should work?

I'm having trouble getting this package to work properly, and part of the problem is I don't know what to run or what results to expect.
When I type M-x org-roam-search-node-find I get a list of nodes to pick from (same as M-x org-roam-node-find).  What command do I run to be able to enter a search expression to search for nodes?

I have updated the readme and also look at https://github.com/natask/sexp-string#custom-pexs  for syntax.

Thank you @natask!


fix: el-select 多选模式下默认值中含有不可编辑的选项，tag标签还是可以清除

Please make sure these boxes are checked before submitting your PR, thank you!

[x] Make sure you follow Element's contributing guide (中文 | English | Español | Français).
[x] Make sure you are merging your commits to dev branch.
[x] Add some descriptions and refer relative issues for you PR.

#21835

加了clearable 属性，全部清除时候如何处理呢


jasypt-spring-boot-starter not working with open-jdk 1.8

Below is the error I get:
Caused by: java.lang.UnsupportedClassVersionError: com/ulisesbocchio/jasyptspringboot/EnableEncryptablePropertySourcesPostProcessor : Unsupported major.minor version 52.0 (unable to load class com.ulisesbocchio.jasyptspringboot.EnableEncryptablePropertySourcesPostProcessor)
at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2499)
at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:859)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1301)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1166)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:250)
at org.springframework.boot.SpringApplication.createSpringFactoriesInstances(SpringApplication.java:407)
Execution environment:
openjdk version "1.8.0_91"
OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-0ubuntu4~15.10.1-b14)
OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)
pom.xml contains:

com.github.ulisesbocchio
jasypt-spring-boot-starter
1.7

Did you try pulling the repo and building from sources with open jdk?
Do you have public repo I can see your project configuration?

any update??

It seems that you're running your app with something else than what you're actually showing. Version 52 is Java 8, so if you get that error it means whatever you're running with doesn't support it, meaning it's a lower version JRE/JDK.

Sorry...could not respond earlier.  Yes, I did clone the latest and tried
with java 1.8   Stand alone it works with but when I bundled my project in
war and run inside tomcat, it does not work
tomcat version is 8 and java version installed on ubuntu server is openjdk 8
Regards,
Deepti
Director - gheware.com
+91 -<PHONE_NUMBER>
-- Track your phone on Google Map by Google Play App
https://play.google.com/store/apps/details?id=com.ghewareunigps.android.location.free
http://ghewareunigps.in/content/android
On Thu, Sep 1, 2016 at 1:06 AM, Ulises Bocchio<EMAIL_ADDRESS>wrote:

It seems that you're running your app with something else than what you're
actually showing. Version 52 is Java 8, so if you get that error it means
whatever you're running with doesn't support it, meaning it's a lower
version JRE/JDK.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/ulisesbocchio/jasypt-spring-boot/issues/32#issuecomment-243876115,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKQSNP4rse23nV2bdVcWfsB1-TWpcFcOks5qldfEgaJpZM4Juq_F
.

I see, check what version of java your tomcat is running on, it seems that that's your problem

Check out this sample project https://github.com/ulisesbocchio/jasypt-spring-boot-samples/tree/master/jasypt-spring-boot-demo-tomcat-ssl which works just fine with Tomcat

Checked out this samples project and set the property
-Djasypt-encryptor-password=secret before running and got below when ran in
STS spring boot launch:
Caused by: org.jasypt.exceptions.EncryptionOperationNotPossibleException:
null
at
org.jasypt.encryption.pbe.StandardPBEByteEncryptor.decrypt(StandardPBEByteEncryptor.java:1055)
~[jasypt-1.9.2.jar:na]
at
org.jasypt.encryption.pbe.StandardPBEStringEncryptor.decrypt(StandardPBEStringEncryptor.java:725)
~[jasypt-1.9.2.jar:na]
at
org.jasypt.encryption.pbe.PooledPBEStringEncryptor.decrypt(PooledPBEStringEncryptor.java:498)
~[jasypt-1.9.2.jar:na]
at
com.ulisesbocchio.jasyptspringboot.encryptor.LazyStringEncryptor.decrypt(LazyStringEncryptor.java:32)
~[jasypt-spring-boot-1.8-SNAPSHOT.jar:na]
at
org.jasypt.properties.PropertyValueEncryptionUtils.decrypt(PropertyValueEncryptionUtils.java:72)
~[jasypt-1.9.2.jar:na]
at
com.ulisesbocchio.jasyptspringboot.EncryptablePropertySource.getProperty(EncryptablePropertySource.java:16)
~[jasypt-spring-boot-1.8-SNAPSHOT.jar:na]
at
com.ulisesbocchio.jasyptspringboot.wrapper.EncryptableMapPropertySourceWrapper.getProperty(EncryptableMapPropertySourceWrapper.java:28)
~[jasypt-spring-boot-1.8-SNAPSHOT.jar:na]
at
org.springframework.core.env.PropertySourcesPropertyResolver.getProperty(PropertySourcesPropertyResolver.java:84)
~[spring-core-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at
org.springframework.core.env.PropertySourcesPropertyResolver.getProperty(PropertySourcesPropertyResolver.java:60)
~[spring-core-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at
org.springframework.core.env.AbstractEnvironment.getProperty(AbstractEnvironment.java:531)
~[spring-core-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at
org.springframework.context.support.PropertySourcesPlaceholderConfigurer$1.getProperty(PropertySourcesPlaceholderConfigurer.java:132)
~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at
org.springframework.context.support.PropertySourcesPlaceholderConfigurer$1.getProperty(PropertySourcesPlaceholderConfigurer.java:129)
~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at
org.springframework.core.env.PropertySourcesPropertyResolver.getProperty(PropertySourcesPropertyResolver.java:84)
~[spring-core-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at
org.springframework.core.env.PropertySourcesPropertyResolver.getPropertyAsRawString(PropertySourcesPropertyResolver.java:70)
~[spring-core-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at
org.springframework.core.env.AbstractPropertyResolver$1.resolvePlaceholder(AbstractPropertyResolver.java:207)
~[spring-core-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at
org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:147)
~[spring-core-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at
org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:126)
~[spring-core-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at
org.springframework.core.env.AbstractPropertyResolver.doResolvePlaceholders(AbstractPropertyResolver.java:204)
~[spring-core-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at
org.springframework.core.env.AbstractPropertyResolver.resolveRequiredPlaceholders(AbstractPropertyResolver.java:178)
~[spring-core-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at
org.springframework.context.support.PropertySourcesPlaceholderConfigurer$2.resolveStringValue(PropertySourcesPlaceholderConfigurer.java:172)
~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at
org.springframework.beans.factory.support.AbstractBeanFactory.resolveEmbeddedValue(AbstractBeanFactory.java:808)
~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1027)
~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014)
~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:545)
~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
Regards,
Deepti
Director - gheware.com
+91 -<PHONE_NUMBER>
-- Track your phone on Google Map by Google Play App
https://play.google.com/store/apps/details?id=com.ghewareunigps.android.location.free
http://ghewareunigps.in/content/android
On Thu, Sep 1, 2016 at 11:17 PM, Ulises Bocchio<EMAIL_ADDRESS>wrote:

Check out this sample project https://github.com/
ulisesbocchio/jasypt-spring-boot-samples/tree/master/
jasypt-spring-boot-demo-tomcat-ssl which works just fine with Tomcat
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/ulisesbocchio/jasypt-spring-boot/issues/32#issuecomment-244156917,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKQSNHAr2wdh3kVY03RE8RmUrDvKq8Gcks5qlw-ygaJpZM4Juq_F
.

The passwors is password, so you need -Djasypt-encryptor-password=password or just uncomment line 31 of SampleTomcatSslApplication.


Fix undefined index persistent_id on RedisResourceManager

In the RedisResourceManager there was a reference to a wrong variable ($server instead of $resource).
Added also some tests to catch the error during the test of the persistent id.
Refer to #3 , I have created a new PR to clean my code from other local branches that was creating troubles.

looks good to me

Travis-CI fails. I prefer to see #7 merged before

@Maks3w yes, the assertInstanceOf is probably related to what you have done with in #7

:+1:


CTC loss for TF and torch

Part of the CTC API for TensorFlow and torch. I'd like to start on the JAX implementation after this.
It can be optimized with further work, so please just let me know any general points I would need to address and I can optimize, refactor, and write the unit tests. Thank you!

Codecov Report
Attention: 17 lines in your changes are missing coverage. Please review.

Comparison is base (19184e9) 79.50% compared to head (f7554b4) 70.83%.

Files
Patch %
Lines

keras/backend/tensorflow/nn.py
15.38%
11 Missing :warning:

keras/backend/torch/nn.py
14.28%
6 Missing :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #18929      +/-   ##
==========================================
- Coverage   79.50%   70.83%   -8.68%
==========================================
  Files         336      336
  Lines       34974    34994      +20
  Branches     6863     6863
==========================================
- Hits        27807    24787    -3020
- Misses       5583     8730    +3147
+ Partials     1584     1477     -107

Flag
Coverage Δ

keras
70.74% <15.00%> (-8.63%)
:arrow_down:

keras-jax
?

keras-numpy
?

keras-tensorflow
63.10% <10.00%> (-0.04%)
:arrow_down:

keras-torch
63.73% <15.00%> (-0.03%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

I addressed the review and just fixed a formatting issue that was failing the check. This should be ready!

Sorry--fixed one more small linting issue (trailing space).

I just fixed the linting issue as well, so that no tests fail


drag and drop is not working with selenium+node js

Hello,
I am working with selenium+node js and I have to implement drag and drop functionality in my code. But i am getting location.getId() is not a function error.
here is my code.
dragAndDropElementFromPage()
{
return new Promise((resolve, reject) =>
{
try
{
Logger.logJSON('Webdriver', {message: Attempting to drag the element, ${this.webElement} and send to drop location.}, 'INFO');
driver.actions().dragAndDrop(this.webElement, { x: 100, y: 0 }).perform();
Logger.logJSON('Webdriver', {message: ${this.webElement} dragged successfully to drop location.}, 'INFO');
resolve();
}
catch(error)
{
reject(error);
}
});
Also i tried with driver.actions().dragAndDrop(this.webElement, this.webElemen).perform(); code also but getting same error.

This kind of questions better to ask on stackoverflow. Thanks

Hi, @pareshrana123 ! Take a look at this issue.


Enhance word splitting strategy

Today the word splitting strategy of the query tree is handled by the function split_best_frequency.
This function split a word into two sub-words by looking at the frequency of the less frequent sub-word of each possible pair.
drawback
However, this frequency computation doesn't represent faithfully the frequency of the pair because these two sub-words can be considered individually frequent without being frequently near together in documents.
possible enhancement
Inspired by the index.rs#word_documents_count method, a new method word_pair_frequency could be implemented in the trait search/query_tree.rs#Context using the word_pair_proximity_docids database instead of the word_docids one.
small warnings

the trait Context is derived 2 times, one in search/query_tree.rs#QueryTreeBuilder which is the real implementation, and one in the tests
the database word_pair_proximity_docids has a different CODEC than word_docids but a length decoder is already implemented in heed_codec/roaring_bitmap_length/

Files expected to be modified

milli/src/search/query_tree.rs

Hi @ManyTheFish, @curquiza,  this sounds interesting, and would like to work on it if not been taken already. Thanks.

I'd like to work on this issue

Hi @ManyTheFish, @curquiza, this sounds interesting, and would like to work on it if not been taken already. I have a few queries, it would be great if you could answer them. Thanks in advance.

Does function split_best_frequency, now needs to search for word pairs in word_pair_proximity_docids apart from individual word search in word_docids?

What will be the value of proximity when we search for pairs in word_pair_proximity_docids? Proximity is of type u8, do we need to search for all proximity values from 0 to 255 for each word split combination? This will not be efficient though.

split_best_frequency should only compute the probability of the pair of words side to side, for the implementation you will only need to check a word_pair_proximity_docidswith proximity of 1. Something like:
let key = (left_word, right_word, 1);
self.index.word_pair_proximity_docids.get(self.rtxn, &key)

you can get more or less copy-paste the method word_pair_proximity_docids in the criteria.

For writing test cases for this implementation, do we need to add a test database that mimics word_pair_proximity_docids similar to postings used for word_docids in the TestContext?

No, it's not necessary

Hello @akki1306 and @fuushyn
Thanks for your interest in this project 🔥 You are definitely more than welcome to open a PR for this!
Our contributing guidelines are available here and will guide you through your contribution. If you have any question you can also ask them here!
FYI, we prefer not assigning people to our issues because sometimes people ask to be assigned and never come back, which discourages the volunteer contributors from opening a PR to fix this issue.
We will accept and merge the first PR that fixes correctly and well implements the issue following our contributing guidelines.
We are looking forward to reviewing your PR 😊

@ManyTheFish I am trying to run cargo test and getting the following exception for some of the tests intermittently, the error points to IO error with invalid argument, its not able to create TempIndex.
thread 'update::word_prefix_pair_proximity_docids::tests::test_update' panicked at 'called Result::unwrap()on anErrvalue: IoError(Os { code: 22, kind: InvalidInput, message: "Invalid argument" })', milli/src/index.rs:1224:62
If I use cargo test -- --test-threads=1, this error does'nt occur.
I am using MACOS Monterey 12.6.
Am I missing something while running the test?

Because the tests are running on several threads, you'll have a lot of opened files at the same time, I suggest increasing the limit of opened files.
ulimit -Sn 10000 should fix your issue 😄


♻ Migration to Cairo

Closes #28
Remaining tasks:

ERC3525 presets
ERC3525 tests
Reimplement 721 receiver
Move ERC721 into a dedicated repo
Manage clear approval (storage key)
Clean some comments and code

Notable changes:

Create a slot in SlotEnumerable does not emit an event anymore, it must be carried by the implemeter with a dedicated event (note that mint a token emits an event according to specification, as it was before).
The preset that will handles both SlotEnum and SlotAproval will have to call SlotAproval.transfer_value_from then SlotEnumerable._after_transfer_value_from (it replaces the trick that was in place in Cairo 0)
Indexes are now managed starting from 0 internaly, checks are done to avoid the slot = 0 and token_id = 0 creation

Actually, it might be better to have the migration in its own repo to separate and keep both Cairo Zero vs Cairo libs.


sureflap

Hello,
good work!
Not sure how to contact you, so I'd do it via this ticket.
Do I understand correctly, that SureFlap Connect Door does not require SureFlap Connect HUB (https://www.surepetcare.com/en-gb/internet-hub/hub)
I'm about to buy doors, and I wonder what is minimum hardware requirement to access door statistics. I don't mind buying a hub too :)

Hey,
You do require the hub to use it with your phone or if you want to use it with home assistant.
Without the hub, the petdoor function as if it is the normal non-connection version without phone control.

Thanks.
I was hoping that it is already possible to connect to the doors directly :)


don not re download all files when error happened

This tools is awesome, but when internet connection lose, it does not check what files are downloaded before that and one again downloads entire playlist.

It does not redownload until you told it to do so.


About Interpolation.

I use "python -m synthesis interpolation --checkpoint ./checkpoints/afhq-stylegan2-5M.pt --folder ./testphotos/afhq/content ./testphotos/afhq/style“ to synthesize images. But got synthesized images between content image and style image, no style1 images and style2 image.  If I want to synthesize images using the style code interpolated between the two style codes obtained from the two reference images，what script should I use? Thank you.

Hi. Thank you for your interest.
If I understand correctly, you can try adding --lerp-from-src false to your command. For example, you can use the following command:
python -m synthesis interpolation \
--checkpoint ./checkpoints/afhq-stylegan2-5M.pt \
--folder ./testphotos/afhq/content ./testphotos/afhq/style \
--lerp-mode reference \
-- lerp-from-src false

I haven't tested this myself now, but if I remember correctly (I haven't run this code for a long time), this should work. If you have any trouble, please let me know!

Thank you very much for your assistance! I found that using the prototype yields better results compared to using the reference. Your guidance is invaluable.

Sorry, I have another question, I want to konw what the prototype represents?  I can't understand it


Fix for missing supplemental data codes

Information

QPPCT-671

Changes proposed in this PR:

Refactored the validation of supplemental data aggregate counts to occur within the same loop as the supplemental codes. This rendered the object that was causing the NPE to not be used anymore.
Added new tests for each supplemental type to ensure the correct error would output instead of a null pointer exception.

Checklist

[x] All JUnit tests pass (mvn clean verify).
[x] New unit tests written to cover new functionality.
[x] Added and updated JavaDocs for non-test classes and methods.
[x] No local design debt. Do you feel that something is "ugly" after your changes?
[n/a] Updated documentation (README.md, etc.) depending if the changes require it.

Thanks @saquino0827, for changing the variable names.  Unless you get your Checker changes in within the next hour, I won't be here to approve this PR.  :(

Closing this PR as it's superseded by https://github.com/CMSgov/qpp-conversion-tool/pull/628.
The code changes have been promoted as a hotfix instead of part of a sprint release.  Two new stories have already been created (QPPCT-683 and QPPCT-684) for the refactoring discussed in the PR comments.


Error : _.contains() is not a function in the latest version of lodash.

In the latest version(4.0.0) of lodash, _.contais() method is not defined. It was available in version "3.10.0".
We need to fix the version of lodash the bower.json :
"lodash": "~3.10.0"
or
we need to update " _.contains " with " _.includes " . Can we update it ?

You was 2 hours ahead of me.. I was just about to make the same case.
contains used to be an alias to includes, and in v4 they removed the alias.

I'm also having this issue.. Hope it will be solved soon!

+1

@mgonto @grabbou restangular is broken for new installs.

+1

+1

+1

+1

+1

+1

+1

A simple fix while we wait for someone with commit access is; sed -i /path/to/restangular/dist/restangular.js -e 's/_\.contains/_\.includes/g'

+1 Please fix ASAP

+1

Workaround:
For new installations I used as temporal bower dependency the sssilver fork
"restangular": "https://github.com/sssilver/restangular.git#master"

If you need a quick workaround before it gets fixed/released and rather than using a fork, you can just update your local project's bower.json dependencies...
"lodash": "3.10.1"
Or before installing restangular, use the command
bower install lodash#3.10.1 --save

+1

+1

+1

+1

+1

This is a problem for everyone that installs restangular using bower using the default method. There is no need to +1 this issue. It's a known problem, everyone is having it, and we are waiting for someone with commit permissions to step in. Like @mgonto or @grabbou, which is the last 2 people I found that have done changes.

There are 2 workarounds that works, use them if you need to temporary.
Click subscribe to the right if you want to know when someone is commenting on this issue.
Stop +1 posts. They will send out mails as default to everyone previously commented.
@ mentioning the owners have sent notifications to them, so they will fix this as soon as they can.

Having the same problem, i created THIS pull request to solve it. Let's wait the merge now.

+1

+1
:+1:

Hey. I haven't been in touch with mgonto for a while (I don't have publish permissions) but we could try to fix the most important bits over the weekend and release new version if that works.
Sorry for not responding at all, been pretty crazy year and for some reason I've always skipped these updates :/

+1

+1

+1

Hi @ all, thanks for opening up an issue on this.
The issue is finally fixed with the recently released v1.5.2.
Thanks to @grabbou who gave me the idea of contacting @mgonto and asking him about fixing this stuff and helping him merging PRs and answering issues!
Thanks for all of your contributions!

:+1:

The specification in package.json still says >=1.3.1 which is incorrect.
In most cases you will get latest lodash which will work, but it projects that have a number of lodash versions npm may consolidate to an older version which will then break restangular.

@bholloway: Yep, you're right. I looked at lodash 1.3 and just saw the "include" function, but missed the missing "s" at the end :see_no_evil: What would you recommend to make it really compatible for everyone? For me that's only setting the lodash version to ^3.10, because this version has "include" as well as "includes" and "contains", so this seems to most compatible version to me at the moment.

Hi, 3.10 seems reasonable to me.

the most recent version of lodash has all versions
https://github.com/lodash/lodash/blob/a0a649aaeabb0b99300ecb32f80f060f3f39815d/vendor/underscore/underscore.js#L274

@achadee no, that's just underscore.js inside the vendor folder of lodash (puh, it gets even more confusing...)


(Optionally) allow non-global-unicast peer addresses

Hi, thanks for the great project.
We are trying to use it to communicate with AWS Transit Gateway Connect Attachment. In short, communication with the attachment happens over GRE.
Inside of each tunnel, there are BGP sessions over /29 ranges in 169.254.

Those are link-local IPv4 unicast ranges;
Those are currently filtered out in corebgp: https://github.com/jwhited/corebgp/blob/f3f0a0ed16a9bcd94f145478eb02fcd3ea035925/packet.go#L274-L278
There's currently no possibility to select other ranges in TGW Connect Peer configuration;

Proposal:

Introduce a new configuration entry in PeerConfig;
If this new flag is enabled, skip the relevant check;
Open to implement a different approach, if you see a better one.

If the BGP Identifier field of the OPEN message is syntactically
incorrect, then the Error Subcode MUST be set to Bad BGP Identifier.
Syntactic correctness means that the BGP Identifier field represents
a valid unicast IP host address.

https://datatracker.ietf.org/doc/html/rfc4271#section-6.2
Maybe a better approach would be to exclude only non-unicast addresses here and not expose anything in the config?
CC @jwhited

If the BGP Identifier field of the OPEN message is syntactically
incorrect, then the Error Subcode MUST be set to Bad BGP Identifier.
Syntactic correctness means that the BGP Identifier field represents
a valid unicast IP host address.

https://datatracker.ietf.org/doc/html/rfc4271#section-6.2
Maybe a better approach would be to exclude only non-unicast addresses here and not expose anything in the config?
CC @jwhited

if addr.IsMulticast() sounds good to me. Once the PR is updated I'll review.


Implements new ICAO9303 part 5 long document numbers for TD1

This implements parsing for TD1 MRZ using the "long document number" feature introduced in  ICAO9303  Part 5.
This is used (at least) on Belgian national ID cards.

Hey @nicoinn,
Thank you for your contribution! 🙏


Tests look for the program mopac when the mopac package installs the program mopac7

Describe the bug
SKIPPED [1] qcengine/tests/test_harness_canonical.py:63: Program 'mopac' not found.

$ pkg info -l mopac
mopac-7.1.15_8,1:
	/usr/local/bin/mopac7
	/usr/local/include/mopac7/libmopac7.h
	/usr/local/lib/libmopac7.a
	/usr/local/lib/libmopac7.so
	/usr/local/lib/libmopac7.so.1
	/usr/local/lib/libmopac7.so.1.0.13
	/usr/local/libdata/pkgconfig/libmopac7.pc
	/usr/local/libexec/mopac7
	/usr/local/share/examples/mopac/test/1scf.dat
	/usr/local/share/examples/mopac/test/elements.dat
	/usr/local/share/examples/mopac/test/force.dat
	/usr/local/share/examples/mopac/test/geometry.dat
	/usr/local/share/examples/mopac/test/keys.dat
	/usr/local/share/examples/mopac/test/nch34+.dat
	/usr/local/share/examples/mopac/test/oldgeo.dat
	/usr/local/share/examples/mopac/test/paras.dat
	/usr/local/share/examples/mopac/test/test_cos.dat
	/usr/local/share/examples/mopac/test/test_ef_.dat
	/usr/local/share/examples/mopac/test/test_gre.dat
	/usr/local/share/examples/mopac/test/test_pol.dat
	/usr/local/share/licenses/mopac-7.1.15_8,1/GPLv2+
	/usr/local/share/licenses/mopac-7.1.15_8,1/LICENSE
	/usr/local/share/licenses/mopac-7.1.15_8,1/catalog.mk

FreeBSD 13.1

The QCEngine harness is meant to work with the new MolSSI version of mopac, https://github.com/openmopac/mopac . I just checked and at least the conda package produces bin/mopac. Perhaps BSD packages a previous version?

Yes, that was it. I've just updated the FreeBSD port.
Most other distros still use the ancient mopac7.

Thank you!


Added TestExport to avoid creating unstructured json, fixes #860

Importing new test should work now correctly. Currently Experiments&/Comparisons are not correctly imported.
fixes #860

Currently Experiments&/Comparisons are not correctly imported.

Please can you open an issue to track this

Some comments;
1. Please can we have some user docs for test export/import?

Yes!

2. One thought, how do we handle different versions of test import/export? Or how would we in the future?  One significant impact of this change is that we are bound to one version of an exported test for the version of Horreum running, so say you could not export a test from Horreum 0.11.1 and import into 0.13.4 if the test data structure changes between releases.

The old API would allow users to upload the json payload an Horreum had the ability to perform some form of check, but with this change we would return a HTTP 400 bad request if the JSON did not deserialise to a valid TestExport.

In reality there is no difference, before this change if someone would send a json that did not deserialize to a Test + the additional fields it would fail. With this change the JSON is a bit different, but it is typed and we avoid custom (de)serialization as it's handled by Quarkus.

I think we should consider backwards compatibility between Horreum Versions. I am not saying we should make import/export backwards compatible now, but leave the possibility of supporting it in the future

With using TestExport we can add additional fields later on and it would still work with older version.

3. We need to consider datastores?  The default datastore is fine, but what about a Test with an Elastic backend etc?   We either need to throw an error, or tell the user to configure a datastore first, or serialize datastore with the test.  Serializing the datastore would require careful consideration about how to handle API tokens

I have not considered datastores at all tbh, we could also add datastores to TestExport...?

In reality there is no difference, before this change if someone would send a json that did not deserialize to a Test + the additional fields it would fail. With this change the JSON is a bit different, but it is typed and we avoid custom (de)serialization as it's handled by Quarkus.

Under the hood Quarkus is using ObjectMapper to serialize/deserialize to/from json, we can still do the same without the customer deserialization.  We can still enforce the type on the API, accepting different versions of concrete types.
If we don't we are locking an instance of Horreum to only accept Tests exported from another Horreum instance that has exported the same TestExport entity.
Adding fields might be fine, but if we removed required fields, change their type, change the relationship between test and other entities then it will break.
At the moment, we are effectively writing the DB structure to JSON. I don't see that staying stable between Horreum versions, and a change to the API to somthing like this, would still provide type safety, but give use the opportunity to evolve the entity graph contained in TestExport, whilst also supporting backwards compatibility;
    @NotNull
    @JsonProperty( required = true )
    @Schema(type = SchemaType.OBJECT,
            oneOf = {
                TestExport_v1.class,
                    TestExport_v2.class
    })
    public ObjectNode export(@PathParam("id") int testId);

I have not considered datastores at all tbh, we could also add datastores to TestExport...?

We could, but how do we handle the secrets? This relates to secrets in the existing export as well.  We can't encrypt/decrypt between Horreum instances that have different horreum.db.secret properties.
We might not want to handle that problem in this PR, so we could just add Datastore to the output and open another issue to handle secrets in the exported TestExport definition

If we don't we are locking an instance of Horreum to only accept Tests exported from another Horreum instance that has exported the same TestExport entity.
I think that's a fair limitation actually :)
Adding fields might be fine, but if we remove required fields, change their type, or change the relationship between the test and other entities then it will break.
Yes, and as I answered above it's a fair limitation imo, but I see your point.
At the moment, we are effectively writing the DB structure to JSON. I don't see that staying stable between Horreum versions, and a change to the API to something like this, would still provide type safety, but give us the opportunity to evolve the entity graph contained in TestExport, whilst also supporting backward compatibility;

Yes, I also see that changing in the not too distant future. What we then will end up with is a lot of parsing logic to support "old" versions of Horreum none might use...
I need to think about this..

    @NotNull
    @JsonProperty( required = true )
    @Schema(type = SchemaType.OBJECT,
            oneOf = {
                TestExport_v1.class,
                    TestExport_v2.class
    })
    public ObjectNode export(@PathParam("id") int testId);

We might not want to handle that problem in this PR, so we could just add Datastore to the output and open another issue to handle secrets in the exported TestExport definition

Yeah, that's a good suggestion.

If we don't we are locking an instance of Horreum to only accept Tests exported from another Horreum instance that has exported the same TestExport entity.

I think that's a fair limitation actually :)

Adding fields might be fine, but if we remove required fields, change their type, or change the relationship between the test and other entities then it will break.

Yes, and as I answered above it's a fair limitation imo, but I see your point.

Ok, let us flip it round another way.. We have so far said that the REST API needs to be stable between major versions. What we are now saying is that the REST API AND the DB schema needs to stay stable for a major version, if we make a change to the TestExport entity graph, we need to cut a new "major" version.

Yes, I also see that changing in the not too distant future. What we then will end up with is a lot of parsing logic to support "old" versions of Horreum none might use...
I need to think about this..

Parsing logic does not need to be complicated, it could be something like:
    public void importTest(ObjectNode newTest){
        if ( !newTest.has("version"))
            throw new BadRequestException("Missing field 'version' from the test definition");

        String version = newTest.get("version").asText();

        switch (version):
            case "1.0":
                TestExport_v1_0 test = mapper.treeToValue(newTest, TestExport_v1.class);
                break;
            case "1.1":
                TestExport_v1_1 test = mapper.treeToValue(newTest, TestExport_v2.class);
                break;
            default:
                throw new BadRequestException("Unknown version: " + version);
        }

The might be custom Mapping code, but we could have a base abstract Mapping for a major version, and the subclasses could override only where there has been minor changes.

@stalep I am not suggesting that we implement versioning now, but right now what we can do is change;
void importTest(TestExport testExport);
to
void importTest(ObjectNode testExport);

    TestExport testExportObj = mapper.treeToValue(testExport, TestExport.class);

With the API configured as;
   @GET
   @Path("{id}/export")
   @APIResponseSchema(value = TestExport.class,
           responseDescription = "A Test defintion formatted as json",
           responseCode = "200")
   ObjectNode export(@PathParam("id") int testId);

...

   @POST
   @Path("import")
   @APIResponse(responseCode = "204", description = "Import a new test")
   @RequestBody(content = @Content( mediaType = MediaType.APPLICATION_JSON,
           schema = @Schema( type = SchemaType.STRING, implementation = TestExport.class)) )
   @Operation(description="Import a previously exported Test")
   void importTest(ObjectNode testExport);

This would not lock the API into a particular version and we get all the benefits of type safety and auto parsing

Currently Experiments&/Comparisons are not correctly imported.

Please can you open an issue to track this

it's the issue this pr is for, #860

Currently Experiments&/Comparisons are not correctly imported.

Please can you open an issue to track this

Ah, you might have misunderstood. Now in main, experiments&comparisons are not working correctly. #860 is tracking that. With this pr it all works (I think).

Ah, sorry, I interpreted  Currently Experiments&/Comparisons are not correctly imported. as it was not working with this PR so was asking to open an issue so we could fix that. but if this PR fixes that problem, then please ignore :)

Just one last thing, what's the benefit of returning ObjectNode vs TestExport. I see the benefit of importing ObjectNode though.

Good point, I think returning TestExport would be better.

Merged. Thanks a lot for your contribution


How to reset the dropdown list ?

I have got two objects, one for handling selected item value & the other is a list of items. During the initial screen loading time, both of these objects are null and the dropdown looks disabled . When I bind data to the list and perform selections, it is working fine. Issue comes when I try to reset the drop down when I have performed a save action and need to get all field values cleared. I tried to 1) set null to both objects 2) set null to selected item value alone 3) set -1 to selected item value. Nothing actually did work.
SearchableDropdown.single(
            value: selectedValue,
            items: (itemsList != null && itemsList.isNotEmpty)
                ? itemsList.map((Item item) {
              return DropdownMenuItem(
                  child: Text(item.text),
                  value: item.value);
            }).toList()
                : [],
            hint: "Select Item",
            onChanged: (value) {
              setState(() {
                selectedValue = value;
              });
            },
            isExpanded: true,
          ),

What makes me mad is, during the initial loading time both objects are null , it is working fine and during reset process, it shows the following error,
RangeError (index): Invalid value: Only valid value is 0: 13

I'm having the same problem, is pretty dissapointing that I can't update the value for the SearchableDropdown. It works for me when I add an auxiliary variable _city that holds the id for the value of the SearchableDropdown, in the best case scenario I should be able to set user.userData.city as my value.
  int _city;
 Consumer<City>(
    builder: (ctx, cityData, child) =>
        SearchableDropdown(
      items: cityData.cities
          .map(
            (city) => DropdownMenuItem(
              value: city.id,
              child: Text(city.name),
            ),
          )
          .toList(),
      value: _city,
      onChanged: !_status
          ? (newValue) => setState(
                () {
                  _city = newValue;
                  user.userData.city = _city;
                },
              )
          : null,
      hint: const Text("Ciudad"),
    ),
  );

That's how I made it work, but the searchableDropdown, searches by value and not child, my values are numbers and the child is the description, there's no point of searching cities by their id (1, 2, 3...) I added searchFn, to search by child data, and got the same error again.
RangeError (index): Invalid value: Only valid value is 0: 2
this is my code with the searchFn added, I don't understand how that function broke it
Consumer<City>(
  builder: (ctx, cityData, child) =>
      SearchableDropdown(
    items: cityData.cities
        .map(
          (city) => DropdownMenuItem(
            value: city.id,
            child: Text(city.name),
          ),
        )
        .toList(),
    value: _city,
    onChanged: !_status
        ? (newValue) => setState(
              () {
                _city = newValue;
                user.userData.city = _city;
              },
            )
        : null,
    hint: const Text("Ciudad"),
    searchFn: (String keyword, items) {
      List<int> ret = [];
      if (items != null && keyword.isNotEmpty) {
        keyword.split(" ").forEach((k) {
          int i = 0;
          items.forEach((item) {
            if (k.isNotEmpty &&
                (item.child.data
                    .toString()
                    .toLowerCase()
                    .contains(k.toLowerCase()))) {
              ret.add(i);
            }
            i++;
          });
        });
      }
      if (keyword.isEmpty) {
        ret = Iterable<int>.generate(items.length)
            .toList();
      }
      return (ret);
    },
  ),
);

Hello @Suresh-Alangat and @JHeisecke ,
Here is some similar code based on the "Single dialog object" example which works fine at least with the search_choices plugin:
SearchChoices.single(
        value: selectedNumber,
        items: numberItemsEmpty ?? [],
        label: numberItemsEmpty == null
            ? ElevatedButton(
                onPressed: () {
                  setState(() {
                    numberItemsEmpty = ExampleNumber.list.map((exNum) {
                      return (DropdownMenuItem(
                          child: Text(exNum.numberString), value: exNum));
                    }).toList();
                  });
                },
                child: Text("Generate items list"))
            : ElevatedButton(
                onPressed: () {
                  setState(() {
                    selectedNumber = null;
                    numberItemsEmpty = null;
                  });
                },
                child: Text("Reset items list")),
        hint: (numberItemsEmpty?.isEmpty ?? true) ? "No items" : "Select Item",
        onChanged: (value) {
          setState(() {
            selectedNumber = value;
          });
        },
        isExpanded: true,
      )

As you can see, there is a buton to generate the list and another one to clear it. I get no error using both of them.
Can you please let me know how I should adapt this example to reproduce your issue?
Should I try to reset the list of items from the dialog? This could maybe explain the error you are getting.

Hi @lcuis thanks for the response.
I'm trying to understand your comment but I can't seem to, sorry, I'll try to explain what I'm doing so you can reproduce my error.

My code with minor tweaks

Consumer<City>(
  builder: (ctx, cityData, child) =>
      SearchableDropdown.single(
    items: cityData.cities
        .map(
          (city) => DropdownMenuItem(
            value: city.id,
            child: Text(city.name),
          ),
        )
        .toList(),
    value: user.userData.city,
    onChanged: !_status
        ? (newValue) => setState(
              () {
                user.userData.city= newValue;
              },
            )
        : null,
    hint: const Text("Ciudad"),
    searchFn: (String keyword, items) {
      List<int> ret = [];
      if (items != null && keyword.isNotEmpty) {
        keyword.split(" ").forEach((k) {
          int i = 0;
          items.forEach((item) {
            if (k.isNotEmpty &&
                (item.child.data
                    .toString()
                    .toLowerCase()
                    .contains(k.toLowerCase()))) {
              ret.add(i);
            }
            i++;
          });
        });
      }
      if (keyword.isEmpty) {
        ret = Iterable<int>.generate(items.length)
            .toList();
      }
      return (ret);
    },
    isExpanded: true,
  ),
);

I get my list from a petition I do to my backend and map it to a List of objects, for example:
[{id: 0, name: Asuncion}, {id: 1, name: San Lorenzo}, {id:2, name: "Lambare"}] (in my code that would be the value of cityData.cities) like so. For the purpose of this issue, let's assume cityData.cities is never null or empty.

Images for reference:

 user.userData.city holds the id of the city picked its value is changed on the onChanged function. Also user.userData.city is nevel null, it always has a value. user.userData.city is the value I want to send to my backend.
When I pick a city other than "Asuncion" (id 0) and save it. I get the error RangeError (index): Invalid value: Only valid value is 0: X X being the id of the city picked (always other than Asuncion). Another error is, when I pick Asuncion as my city and save it, I can't change it back to another city, when debugging newValue is receiving always value 0 (which is Asuncion) and not 1 or 2 when they're picked.
GIF reproducing error
I already had this working on a DropdownButtonFormField but I need a searchBar because in the future I should have more tan 200 cities in that dropdown. This is how it works on that widget
Consumer<City>(
  builder: (ctx, cityData, child) =>
      DropdownButtonFormField(
    items: cityData.cities
        .map(
          (city) => DropdownMenuItem(
            value: city.id,
            child: Text(city.name),
          ),
        )
        .toList(),
    value: user.userData.city,
    onChanged: !_status
        ? (newValue) => setState(
              () {
                user.userData.city = newValue;
              },
            )
        : null,
    hint: const Text("Ciudad"),
    isExpanded: true,
  ),
);

Hello @JHeisecke ,
Thanks for your explanations.
Here is an adaptation of your example for a minimalist but complete app:
import 'package:flutter/material.dart';
import 'package:searchable_dropdown/searchable_dropdown.dart';

class City {
  String name;
  int id;
  City(
    this.name,
    this.id,
  );
}

class CityData {
  List<City> cities = [
    City("Arrecife", 0),
    City("Puerto del Carmen", 1),
    City("Tias", 2),
    City("Costa Teguise", 3),
    City("Haria", 4),
  ];
  CityData();
}

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  CityData cityData = CityData();

  List<DropdownMenuItem<int>> cities;

  MyHomePage({
    Key key,
  }) : super(key: key) {
    cities = cityData.cities
        .map(
          (city) => DropdownMenuItem(
            value: city.id,
            child: Text(city.name),
          ),
        )
        .toList();
  }

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int selectedCityIndex;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            SearchableDropdown.single(
              items: widget.cities,
              value: selectedCityIndex,
              onChanged: (newValue) => setState(
                () {
                  selectedCityIndex = newValue;
                  print("selected city id: ${widget.cities[selectedCityIndex].value}");
                },
              ),
              hint: const Text("Ciudad"),
              searchFn: (String keyword, items) {
                List<int> ret = [];
                if (items != null && keyword.isNotEmpty) {
                  keyword.split(" ").forEach((k) {
                    int i = 0;
                    items.forEach((item) {
                      if (k.isNotEmpty &&
                          (item.child.data
                              .toString()
                              .toLowerCase()
                              .contains(k.toLowerCase()))) {
                        ret.add(i);
                      }
                      i++;
                    });
                  });
                }
                if (keyword.isEmpty) {
                  ret = Iterable<int>.generate(items.length).toList();
                }
                return (ret);
              },
              isExpanded: true,
            ),
          ],
        ),
      ),
    );
  }
}

I made several adaptations which may explain why this is working without errors for me.
Does this example run with errors for you?