timeout vs protocol error in detail

I am trying debug a connection to a VFD.
Depending on how I switch A and B I get either

failed to read request timed out

or

failed to read protocol error

I didn't quite find the protocol error in the source code. Or is this error it?
To me it sounds like "failed to read protocol error" is getting at least something back - so that's the correct A/B connection. But the data coming back is wrong and hence the protocol error.

Ah, I guess it's "failed to read" plus protocol error

Hi Torsten,
Indeed, that's "failed to read: protocol error". Usually, this means the
library read something back off the serial line and either can't make
sense of it or found an actual protocol violation.
I can't look at the code right now, but what's the exact message you've
got? Mind posting a snippet of code? Or was it using modbus-cli?
Assuming the VFD speaks modbus RTU and the serial speed is set
appropriately, did you try playing with stop bits (1 or 2) and/or parity
(even, odd or none)?
On RS-485 links, inverting polarities most often results in timeouts as
receivers don't see the framing they are expecting.
On 26/05/2023 15:25, Torsten Curdt wrote:

I am trying debug a connection to a VFD.
Depending on how I switch A and B I get either
failed to read request timed out

or
failed to read protocol error

I didn't quite find the protocol error in the source code. Or is this
error
https://github.com/simonvetter/modbus/blob/4b0c5defc4ebb0ecf197003cc73260672fafc4d9/tcp_transport.go#L155
it?
To me it sounds like "failed to read protocol error" is getting at
least something back - so that's the correct A/B connection. But the
data coming back is wrong and hence the protocol error.
—
Reply to this email directly, view it on GitHub
https://github.com/simonvetter/modbus/issues/30, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAWG3CATUY5VK6FC6AYR3TXICVNDANCNFSM6AAAAAAYQHR25Q.
You are receiving this because you are subscribed to this
thread.Message ID: @.***>

--
Simon Vetter

Thanks for the quick response!

Indeed, that's "failed to read: protocol error". Usually, this means the library read something back off the serial line and either can't make sense of it or found an actual protocol violation.

That's sounds in line with what I am seeing with another implementation.
(A GRBL board that is reading only nonsense values.)
Since I now figured out the details of the error this probably goes beyond the context of the library.
So feel free to close at any time.
But since you asked, I'll write down the details.
Maybe it's helpful for someone else at some stage.
And if you have any pointers to debugging this I'd be more than grateful.
--
I've setup a YL620A VFD. (Link to manual)
P00.13=10  # factory reset

P00.01=3   # controlled by RS485
P07.08=5   # controlled by RS485

P03.00=3   # baud (3=9600, 4=19200)
P03.01=1   # set RS485 slave id to 1
P03.02=2   # 8 N 1

So the RS485 should be set to 9600@8N1.
In theory it could be really bad EMI - which I doubt without a spindle attached or running.
I wrote a quick test program to see if I can read some meaningful data.
package main

import (
	"fmt"
	"time"

	"github.com/simonvetter/modbus"
)

type Value int

func uints2value(uints []uint16, signed bool) Value {

	value := Value(0)

	if signed && uints[0]&(1<<15) != 0 {
		value = -1
	}

	for _, u := range uints {
		value = value << 16
		value = value | Value(u)
	}

	return Value(value)
}

func read(BaudRate uint) {
	PortPath := "/dev/tty.usbserial-110"

	DataBits := uint(8)
	Parity := modbus.PARITY_NONE
	StopBits := uint(1)

	client, err := modbus.NewClient(&modbus.ClientConfiguration{
		URL:      "rtu://" + PortPath,
		Speed:    BaudRate,
		DataBits: DataBits,
		Parity:   Parity,
		StopBits: StopBits,
		Timeout:  500 * time.Millisecond,
	})
	if err != nil {
		panic(fmt.Errorf("cannot create client: %w", err))
	}

	err = client.Open()
	if err != nil {
		panic(fmt.Errorf("cannot open client: %w", err))
	}

	for i:=0 ; i<5 ; i++ {

		address := 8451
		//address := 8203

		signed := false
		quantity := 1

		registers16, err := client.ReadRegisters(uint16(address), uint16(quantity), modbus.HOLDING_REGISTER)
		if err != nil {
			fmt.Println("failed to read", err)
		} else {
			value := uints2value(registers16, signed)
			fmt.Println("value", value)
		}

		time.Sleep(1000)
	}
}

func main() {
	read(uint(9600))
	read(uint(19200))
	read(uint(38400))
}

It's a bit absurd. It's not my first rodeo with this VFD.
At that time it was one of the wires not having proper contact.
After fixing the cable it worked back then. (Doh!)
That said, I think I was getting timeouts instead of protocol errors.
So when I ran into troubles this time, I switched to a new cable - but so far no luck.
It's a shame there is no good way to measure if A+B are connected correctly (to my knowledge).
My first guess was also a baud rate mismatch.
Unfortunately I don't have a proper oscilloscope handy to dig a bit deeper into the signals.
Anyway - if you have any ideas it would be great.
But feel free to close the ticket. The original question got answered :)

I'd try to call Close() on the client before switching to the next baudrate to properly close and release the serial port, even though that's probably not the root cause.
Did you place proper 120Ohm termination resistors ? If your bus is short and you only have one, then place one, but those are needed (if not included in the endpoints).
Other things I'd try, if you haven't already :

configuring 2 stop bits in the client,
using a shorter and/or shielded RS-485 wire,
wiring the COM terminal in addition to A/B terminals of the RS485 link, and connecting the shield to PE/chassis ground,
using another, potentially different make and model USB to RS485 adapter (I've fried a couple in my life in unexpected ways, especially in industrial environments),
borrowing an oscilloscope or signal analyzer to dump what goes over the wire.

Since you mentioned not being able to use an oscilloscope, another way of sniffing the wire could be to use two USB to RS485 adapters : one would be used by the modbus client while the other would run a program merely dumping raw bytes seen on the wire.

I'm gonna go ahead and close this but feel free to come back and comment with your findings! HTH, good luck!

I'd try to call Close() on the client before switching to the next baudrate to properly close and release the serial port, even though that's probably not the root cause.

👍

Did you place proper 120Ohm termination resistors ? If your bus is short and you only have one, then place one, but those are needed (if not included in the endpoints).

I measured. It seems only the usb adapter has termination.
So that's only one side of a 30cm cable.
I'll try with a 2nd 120 ohm resistor when I am back with the machine.

Other things I'd try, if you haven't already :

configuring 2 stop bits in the client,

Even when it's configured to 1 stop bit on the VFD?

using a shorter and/or shielded RS-485 wire,

The cable was shielded with the shield connected to the frame.
I also tried a 10cm cable.

wiring the COM terminal in addition to A/B terminals of the RS485 link, and connecting the shield to PE/chassis ground,

After some research it seems connecting GND (not just A+B) is important. But I had done that from the start.

using another, potentially different make and model USB to RS485 adapter (I've fried a couple in my life in unexpected ways, especially in industrial environments),

It started with the board having problems talking to the VFD.
Only then I switched to the adapter that also showed problems. The adapter worked before.
So essentially both clients would need to be fried. Possible - but so likely.
But I might just get another usb adapter to try.

borrowing an oscilloscope or signal analyzer to dump what goes over the wire.

I will bring my scope the next time I am at the machine. A shame I didn't bring it in the first time.

another way of sniffing the wire could be to use two USB to RS485 adapters : one would be used by the modbus client while the other would run a program merely dumping raw bytes seen on the wire.

Uh, interesting. How would you do that? Just have it in parallel and then open it as serial port and dump the raw bytes?

Uh, interesting. How would you do that? Just have it in parallel and then open it as serial port and dump the raw bytes?

It will probably take another month until I get to it - but I will keep you posted.

Alright. Finally some time to do some more debugging.
This really is beyond the library - but since you asked :)
Maybe you have some insights.
I reaching the end of my abilities.
I double checked that the RS485 adapter works. I got another one and created a null-modem connection just fine.
Then I used very short cable of about 15cm, with A/B being twisted and connected the oscilloscope on two channels to A+GND and B+GND.

The base noise level doesn't seem so bad.

When sending data it looks kind of OK to me. I just would have expected higher voltages.

To me it confirms what the transmission LED of the adapter and the error responds suggests: It is sending - but there is just is no response. Now I guess the reasons for that could be endless. That said I am not entirely sure how identify a response coming from the VFD either.
The adapter has a 120 Ohm termination resistor. But I've also tried with another resistor right at the VFD. It didn't change much really. Since I only have GND and no VCC I don't think adding bias resistors is in the cards.
I am wondering if there is any other way to tell whether the RS485 unit on the VFD is just broken - or whether this was the the same behaviour when misconfigured and just not answering.
I could still try the 2nd parallel adapter to read what's on the bus - but if there is no response...

Just for kicks I also tried the 2nd parallel adapter. No dice.

Will order a new VFD :-/

But I've also tried with another resistor right at the VFD. It didn't change much really. Since I only have GND and no VCC I don't think adding bias resistors is in the cards.

Just to make sure, the termination resistors need to be placed between A and B. They're meant to pull the line to line voltage back to 0V after a transmission, they really aren't bias resistors (i.e. pulling lines towards VCC or GND).
I'm mentioning this because your first scope screenshot got me thinking: either i'm not reading that properly (which might very well be the case :D) or both lines are at ~1.2V relative to GND when idle, which shouldn't be the case if nothing is driving them (they should be close to 0V).
Also, what's the pinout on that USB to RS485 thingy? aren't the 2 left pins termination resistor connections, in which case they should be tied to A and B? Are you sure GND is indeed the center pin?
Your hex captures with the 2nd adapter show valid modbus RTU requests, with register addresses matching your code, so that's a start.

Just to make sure, the termination resistors need to be placed between A and B.

(nod) That's how I tried it.

They're meant to pull the line to line voltage back to 0V after a transmission, they really aren't bias resistors (i.e. pulling lines towards VCC or GND).

From what I understood biasing is usually the preferred way to setup RS485.
But this isn't really an option in my case. I only have A, B and GND.
And I suspect this should only be become important on longer cable lengths.

I'm mentioning this because your first scope screenshot got me thinking: either i'm not reading that properly (which might very well be the case :D) or both lines are at ~1.2V relative to GND when idle, which shouldn't be the case if nothing is driving them (they should be close to 0V).

The Rigol UI really isn't great :-/ but that's also how I read it, too.
If they should be close 0V - that's good information.

Also, what's the pinout on that USB to RS485 thingy? aren't the 2 left pins termination resistor connections, in which case they should be tied to A and B? Are you sure GND is indeed the center pin?

Yes, it's clearly marked.
I am no longer near the machine so I cannot send an actual photo, but here is an image from the web

Your hex captures with the 2nd adapter show valid modbus RTU requests, with register addresses matching your code, so that's a start.

Indeed. Or the ending :)
I gave in and ordered a new VFD (different brand though).
RS485 seems to be working with that one.
Although I am still curious to compare the two.
Just to learn what went wrong here.


Features in combination with diff

I'm trying to use public-api with features in the diff mode. However, --features eats all following strings, e.g.:
cargo public-api --features runtime-tokio-hyper,async diff HEAD..master

This runs the normal public-api with features runtime-tokio-hyper, async diff HEAD..master.
Is there any way to provide these features? I tried quoting and with or without , between.

the problem is
https://github.com/Enselic/cargo-public-api/blob/5c8a62be427ee28eb6a23c86889f33d1fda7ca7c/cargo-public-api/src/main.rs#L60C45-L60C54
1.., we should probably not set that, since that's not how it's done in cargo, you need to use multiple --features or separate with ,. It requires that precisely to avoid this issue

Yep, that makes sense.

Should I open a mr or do you want to fix that?

Yes, feel free to submit a fix. Also, there is a way around this. --features is global so you can specify it after diff and it's argument
cargo public-api diff HEAD..master --features runtime-tokio-hyper async

For me this outputted expected 1 or 2 args got 3

hmm, might be something else strange happening with that

Are you testing with git main @jwiesler ? We have not published that fix yet to crates.io

Nope, I used the crates.io version. I see the commit is from 2 weeks ago, is there anything blocking you from publishing?

Well, I'd really like to see this bug fixed before I publish a new version! Did you encounter unexpected obstacles when trying to submit a fix?

No, I just didn't find any time yet, and I probably won't this week.

I can confirm that it works on master as expected.
I checked:

"feature-a feature-b"
"feature-a,feature-b"
feature-a,feature-b

Would be cool if you'd release a new version on crates.io if you didn't already :)

According to my testing it's not working quite right.


Completion crashes in-between fields in structs

This bug seems to have been introduced with some of the new odin parser changes.
My_Struct :: struct {
  type: int,
  a*
  indent: int,
  width: int,
  penalty: f32,
}

Waiting on PR https://github.com/odin-lang/Odin/pull/1331

Fixed


Added Microsoft Edge Beta version 108.0.1462.38.

[x] Have you signed the Contributor License Agreement?
[x] Have you checked that there aren't other open pull requests for the same manifest update/change?

[x] Does your manifest conform to the 1.2 schema?

Note: <path> is the name of the directory containing the manifest you're submitting.

Microsoft Reviewers: Open in CodeFlow

@wingetbot run


Website doesn't respond

When I try to continue my story, this

happens over and over again on different devices, which started yesterday in the evening.
The neural network doesn't respond on any device, and many people report about having the same issue.

Ah yes, it seems the website has been repaired

The network does not respond again

The website does not respond once again. Reopen, perhaps?

It seems that the problem is happening again.

Yeah, that happens. Ping me on twitter next time, pls.
http://twitter.com/mgrankin


Fix #737 comma being stripped from a #[rustfmt_skip]'d match arm

Eh, I fixed this (differently) in #749.


35990-Added multi-lingual notebook

@kishore-patel @ravichamarthy Please review and merge
Tracker: https://github.ibm.com/aiopenscale/tracker/issues/35990
Changes include

Added the multi-lingual support notebook with updated urls for data files

Looks good to me.

@ravichamarthy  - Give a final glance to this PR and merge it.


Add additional CC specific properties to docs

Is your feature request related to a problem? Please describe.
There are CC specific properties which are hard to understand the value of unless you read the code. Looking at the CCValueOptions interface, all of the following properties would potentially be useful to add to the documentation:

internal (might not be that useful if the CC isn't exposed at all outside of the driver)
minVersion (could help with troubleshooting)
forceCreation (not sure what this is useful for yet)
stateful (lets us know whether setValue will trigger a value notification or a value updated event)
secret (let's us know that this CC should not be logged - probably not necessary, but it wouldn't hurt)

Ideally, this information could also be queryable by a consumer of the driver and/or added to value metadata so that consumer applications know how to appropriately handle the CC/value. As an example, we know that if a CC is not stateful, it will send value notifications, and if the application knows that it can update the UI for that command class accordingly.
Describe the solution you'd like
Home Assistant generates template automation triggers for users based on discovery of the values on a Z-Wave JS node. Right now, we have hard coded the templates for value notifications for Basic, Central Scene, and Scene Activation CCs, but it would be nice to be able to discover this information dynamically so that we don't fall behind.
I understand that this may be a large ask, so at a minimum it would be nice to at least see this information in the docs so that I don't have to hunt for it in the code.
Describe alternatives you've considered
Right now I resort to looking through the code and asking Al
Additional context
Add any other context or screenshots about the feature request here. If you want to propose an API, share your thoughts how it could be used (syntax).

This should be solved since v10. Can you check if your use-case is supported?


chore(deps): update ci dependencies

This PR contains the following updates:

Package
Type
Update
Change

common-dev-assets

digest
81754c2 -> ffeb38a

github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper
require
minor
v1.41.5 -> v1.42.1

Release Notes

terraform-ibm-modules/ibmcloud-terratest-wrapper (github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper)
v1.42.1
Compare Source
Bug Fixes

deps: update gomod (#899) (471a7b7)

v1.42.0
Compare Source
Features

add schematics consistency test features (#892) (d33d6d0)

Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.

[ ] If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

/run pipeline

/run pipeline

ℹ Artifact update notice
File name: tests/go.mod
In order to perform the update(s) described in the table above, Renovate ran the go get command, which resulted in the following additional change(s):

4 additional dependencies were updated
The go directive was updated for compatibility reasons

Details:

Package
Change

go
1.22.0 -> 1.22.4

github.com/IBM/cloud-databases-go-sdk
v0.7.0 -> v0.7.1

github.com/IBM/platform-services-go-sdk
v0.71.0 -> v0.71.1

github.com/IBM/schematics-go-sdk
v0.3.0 -> v0.4.0

golang.org/x/net
v0.25.0 -> v0.30.0

/run pipeline

ℹ Artifact update notice
File name: tests/go.mod
In order to perform the update(s) described in the table above, Renovate ran the go get command, which resulted in the following additional change(s):

4 additional dependencies were updated
The go directive was updated for compatibility reasons

Details:

Package
Change

go
1.22.0 -> 1.22.4

github.com/IBM/cloud-databases-go-sdk
v0.7.0 -> v0.7.1

github.com/IBM/platform-services-go-sdk
v0.71.0 -> v0.71.1

github.com/IBM/schematics-go-sdk
v0.3.0 -> v0.4.0

golang.org/x/net
v0.25.0 -> v0.30.0

/run pipeline

:tada: This PR is included in version 1.5.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Thorough minification

Aims to fix #1135
I found one usage of typeof process (should there be more?)
Changed the rollup config to only replace and shim process in production

/cc @probablyup does this fix your issues?

Yup, looks great!

@bkazi just need to add a CHANGELOG entry :)

Added the changelog entry!


MsalInterceptor not acquiring tokens when endpoint contains query parameters

Library

[ ]<EMAIL_ADDRESS>or<EMAIL_ADDRESS>[ ]<EMAIL_ADDRESS>[ ]<EMAIL_ADDRESS>[ ]<EMAIL_ADDRESS>[ ]<EMAIL_ADDRESS>[ ]<EMAIL_ADDRESS>[x]<EMAIL_ADDRESS>[ ]<EMAIL_ADDRESS>
Framework

[x] Angular 11
[ ] React
[ ] Other

Description
Some web API endpoints contain query parameters. MsalInterceptor does not seem to acquire tokens for such endpoints (e.g. Azure Resource Manager API)
Error Message

API response:
zone.js:3324 GET https://management.azure.com/tenants?api-version=2020-01-01 401
core.js:5980 ERROR
HttpErrorResponse {headers: HttpHeaders, status: 401, statusText: "OK", url: "https://management.azure.com/tenants?api-version=2020-01-01", ok: false, …}
error:
error:
code: "AuthenticationFailed"
message: "Authentication failed. The 'Authorization' header is missing."
__proto__: Object
__proto__: Object
headers: HttpHeaders {normalizedNames: Map(0), lazyUpdate: null, lazyInit: ƒ}
message: "Http failure response for https://management.azure.com/tenants?api-version=2020-01-01: 401 OK"
name: "HttpErrorResponse"
ok: false
status: 401
statusText: "OK"
url: "https://management.azure.com/tenants?api-version=2020-01-01"
__proto__: HttpResponseBase

msal-angular logs:
[Thu, 11 Mar 2021 02:58:43 GMT]<EMAIL_ADDRESS>: Verbose - Emitting event to callback 80777888-4672-4c37-a974-70e698762e80: msal:handleRedirectEnd
auth-config.ts:30 [Thu, 11 Mar 2021 02:58:43 GMT]<EMAIL_ADDRESS>: Verbose - BroadcastService - msal:handleRedirectEnd results in setting inProgress to none
auth-config.ts:30 [Thu, 11 Mar 2021 02:58:43 GMT]<EMAIL_ADDRESS>: Verbose - getAllAccounts called
auth-config.ts:30 [Thu, 11 Mar 2021 02:58:43 GMT]<EMAIL_ADDRESS>: Verbose - BrowserCacheManager.getIdTokenCredential called
auth-config.ts:30 [Thu, 11 Mar 2021 02:58:43 GMT]<EMAIL_ADDRESS>: Verbose - BrowserCacheManager.getIdTokenCredential: cache hit
auth-config.ts:30 [Thu, 11 Mar 2021 02:58:43 GMT]<EMAIL_ADDRESS>: Verbose - BrowserCacheManager.getAccessTokenCredential called
auth-config.ts:30 [Thu, 11 Mar 2021 02:58:43 GMT]<EMAIL_ADDRESS>: Verbose - BrowserCacheManager.getAccessTokenCredential: cache hit
auth-config.ts:30 [Thu, 11 Mar 2021 02:58:43 GMT]<EMAIL_ADDRESS>: Verbose - BrowserCacheManager.getRefreshTokenCredential called
auth-config.ts:30 [Thu, 11 Mar 2021 02:58:43 GMT]<EMAIL_ADDRESS>: Verbose - BrowserCacheManager.getRefreshTokenCredential: cache hit

MSAL Configuration

export function MSALInstanceFactory(): IPublicClientApplication {
  return new PublicClientApplication({
    auth: {
        clientId: 'CLIENT_ID',
        authority: 'https://login.microsoftonline.com/TENANT_ID',
        redirectUri: '/',
    },
    cache: {
        cacheLocation: BrowserCacheLocation.LocalStorage,
        storeAuthStateInCookie: isIE,
    }
});
}

export function MSALInterceptorConfigFactory(): MsalInterceptorConfiguration {
  const protectedResourceMap = new Map<string, Array<string>>();

protectedResourceMap.set("https://management.azure.com/tenants?api-version=2020-01-01", ["https://management.azure.com/user_impersonation"]);

  return {
    interactionType: InteractionType.Redirect,
    protectedResourceMap
  };
}

Reproduction steps
Attempt calling an endpoint with query params:
    this.http.get("https://management.azure.com/tenants?api-version=2020-01-01")
      .subscribe((response: any) => {
          // ...
      })

Expected behavior
Tokens for such endpoints should be acquired as usual.
Identity Provider

[ x ] Azure AD
[ ] Azure B2C Basic Policy
[ ] Azure B2C Custom Policy
[ ] ADFS
[ ] Other

Browsers/Environment

[ x ] Chrome
[ ] Firefox
[ ] Edge
[ ] Safari
[ ] IE
[ ] Other (Please add browser name here)

Regression

[ ] Did this behavior work before?
Version:

Security

[ ] Is this issue security related?

Source

[ ] Internal (Microsoft)
[ x ] Customer request

@derisen Thanks Dogan. @jo-arroyo can you take a look into this when you have a chance?

Worth pointing out that wildcards can be used as a mitigation, but that shouldn't be required if the query parameters are hard-coded in each request.

If you are going to modify the MsalInterceptor, could you change the type of protectedResourceMap on MsalInterceptorConfiguration from Map<string, Array<string>> to Map<string, Array<string> | null> to support null as stated on  the documentation please?
Otherwise the compiler complains about the type when using null as scope.

If you are going to modify the MsalInterceptor, could you change the type of protectedResourceMap on MsalInterceptorConfiguration from Map<string, Array<string>> to Map<string, Array<string> | null> to support null as stated on the documentation please?
Otherwise the compiler complains about the type when using null as scope.

This is a good change, cc: @jo-arroyo


passing options to create commands

Starting to play with options passing. I've got:
{
  "database": "peak",
  "tables": [
    "table",
    {
      "otherTable": {
        "primaryKey": "otherTableImportantNumber"
      }
    },
    "oneMoreTable"
  ]
}

in YAML
database: peak
tables:
- table
- otherTable:
  primaryKey: otherTableImportantNumber
- oneMoreTable

Or as an alternative
{
  "database": "peak",
  "tables": [
    "table",
    {
      "name": "otherTable",
      "primaryKey": "otherTableImportantNumber"
    },
    "oneMoreTable"
  ]
}

in YAML
database: "peak"
tables:
- "table"
-
  name: "otherTable"
  primaryKey: "otherTableImportantNumber"
- "oneMoreTable"

I think I prefer the second case in JSON and the first in YAML. I'm inclined to go with the second if only because it prevents some strange edge cases. E.g. what happens when you have two root keys in the object, is that two different tables with configuration?
Will PR this shortly, just trying to be public as I work out my thinking

It should be table rather than name to match the index command syntax.


Speech recognition doesn't work on iOS 13.3

Hi,
I have created an ionic app which uses this cordova-plugin-recognition for converting speech to text.
It works well on android.
But when I create an ipa file and uploaded it to testflight to be tested via apple store, the testers are not able to record their voice.
It does nothing on trying to record speech nor throws any error.
The code which I used is as follows:
initSpeech() {
this.speechRecognition.hasPermission()
.then((hasPermission: boolean) => {
console.log(hasPermission)
if (!hasPermission) {
this.speechRecognition.requestPermission()
.then(
() => console.log('granted'),
() => console.log('Denied')
)
}
})
}
start() {
// Start the recognition process
this.speechRecognition.startListening()
.subscribe(
(matches: Array) => { this.voicetext = matches[0]; this.mainForm.controls['comments'].setValue(matches[0]); },
(onerror) => console.log('error:', onerror)
)
}
//stop listening for(ios only)
stop() {
this.speechRecognition.stopListening();
}
Please help me with this

folks… could anyone could help me in right direction.
Thanks,
Seema Sharma

I have the same problem. The app won't request MICROPHONE usage permission, and the recognition won't start because of the lack of permission.


ARROW-5091: [Flight] Rename FlightGetInfo message to FlightInfo

@lihalite

This may make the Java code a bit confusing (between FlightInfo and Flight.FlightInfo...).

Codecov Report

Merging #4143 into master will decrease coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #4143      +/-   ##
==========================================
- Coverage   87.79%   87.79%   -0.01%
==========================================
  Files         748      748
  Lines       91841    91844       +3
  Branches     1252     1252
==========================================
+ Hits        80636    80638       +2
- Misses      11088    11089       +1
  Partials      117      117

Impacted Files
Coverage Δ

cpp/src/arrow/flight/server.cc
84.58% <ø> (ø)
:arrow_up:

cpp/src/arrow/flight/internal.cc
90.59% <100%> (ø)
:arrow_up:

cpp/src/arrow/flight/client.cc
92.59% <100%> (ø)
:arrow_up:

cpp/src/plasma/thirdparty/ae/ae.c
70.75% <0%> (-0.95%)
:arrow_down:

cpp/src/arrow/util/thread-pool-test.cc
97.66% <0%> (-0.94%)
:arrow_down:

cpp/src/arrow/util/bpacking.h
99.81% <0%> (ø)
:arrow_up:

cpp/src/arrow/csv/column-builder.cc
97.07% <0%> (+1.75%)
:arrow_up:

Continue to review full report at Codecov.

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


installServerIntoExtension script issue

The launch.json is now requiring absolute paths and you get a warning when launching the server with
			"outDir": "../tslint/server"

Warning:
Relative paths in 'launch.json' will no longer be supported, use '${workspaceRoot}/../tslint/server' instead.

Changing the launch.json as requested to
			"outDir": "${workspaceRoot}/../tslint/server"

Results in an incorrect error from installServerExtension:
installServerIntoExtension ../tslint ./package.json ./src/tsconfig.json && tsc -p ./src

outDir in ./.vscode/launch.json must point to /Users/egamma/Projects/vscode-tslint/tslint/server but it points to /Users/egamma/Projects/vscode-tslint/tslint-server/tslint/server
Please change outDir in ./.vscode/launch.json to ../tslint/server

Published<EMAIL_ADDRESS>


I2C Command frequency

Hello,
I've written a C++ application that controls the Industrial Automation Board via I2C. Sending the commands manually works fine so far, however I've noticed some glitches when sending fast consecutive commands. Introducing a delay between the commands fixed the problems somewhat. The delay came out to be about 8 - 10ms through experimentation. Is that observation about right or is the fastest possible I2C command frequency higher? Because 10ms delay sounds quiet high in my opinion.
Regards

Hi,
Let me know the firmware version of your card (run the "megaind 0 board" command in the terminal)

Hi,
the firmware version is 01.10

Please update to the latest, instructions: https://github.com/SequentMicrosystems/megaind-rpi/blob/master/update/README.md
Let me know if something change.

Thanks, that decreased the minimum time to about 1ms, which is fast enough for my application. However, i've noticed some odd glitches. As a test, i wrote a program that toggles the four on board LEDs every second by sending the four I2C commands consecutively with 1ms delay (as you can see in the picture)

In about 95% of the time everything goes right, but sometimes one LEDs does not toggle. The same behaviour occurs when changing the delay to 2ms, as if the IABoard is sometimes busy and cannot react on the command. Is there a way to work around that issue (instead of increasing the delay again) or should i just double ckeck with a read command if the right value was set?

The i2c bus respond faster than millisecond but the loop that check if a new LED command has arrived repeat every millisecond (inside the microcontroller on the card).
Try to use the 2ms delay, that should be enough for the LED command to be executed.

I see, thanks for your help


[flutter_driver] Add waitForTappable to flutter_driver

Adds a new flutter_driver method in the same vain as waitFor. Where waitFor will crawl the entire widget tree and return successfully as long as the widget located by a SerializableFinder is in that tree, waitForTappable generates a new Finder from the hitTestable() method call. This only returns successfully if the widget is 'in view'.
From this, you could write a method like the one below, to check that a widget is 'visible'.
static Future<bool> isPresent(SerializableFinder finder, FlutterDriver driver,
      {Duration timeout = const Duration(seconds: 1)}) async {
    try {
      await driver.waitFor(finder, timeout: timeout);
      return true;
    } catch (_) {
      return false;
    }
  }

Fixes
#38657
Tests
This method took heavy inspiration from the waitFor method, and I couldn't seem to find any tests related to that method in the flutter_driver package. If I've missed anything, I'm glad to write tests. I just need to be pointed in the proper direction.
Pre-launch Checklist

[x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
[x] I read the [Tree Hygiene] wiki page, which explains my responsibilities.
[x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
[x] I signed the [CLA].
[x] I listed at least one issue that this PR fixes in the description above.
[x] I updated/added relevant documentation (doc comments with ///).
[x] I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt.
[x] All existing and new tests are passing.

@googlebot I signed it!

/cc @dnfield


Fix changelog generator of wallet prod releases

closing in favor of https://github.com/iotaledger/iota/issues/4362


Task name updating

Integrating the new permeation task to be task 3, bumping all the following tasks by one.
Not sure if you want to use the PR as an opportunity to add anything else to the README @RemDelaporteMathurin

Maybe remove the Codespaces beta thing?

Maybe remove the Codespaces beta thing?

Think I did that in the last commit


Input icon is not visible when using iTwinUI v3 and v2

Describe the bug (current behavior)
Icon is not visible in InputWithDecorations and SearchBox components from iTwinUI v3 if there are any components from iTwinUI v2 used also.
Expected Behavior
Icon should be visible.
Link to minimal repro
https://stackblitz.com/edit/vitejs-vite-g3dw9a?file=src%2FApp.tsx&terminal=dev
Steps To Reproduce

Open sandbox
Icons are not visible in SearchBox and InputWithDecorations components.
Remove TextV2 component and it's import. Icons become visible after sandbox is refreshed.

Anything else?
No response

I think the issue is coming from the svg selector that is not scoped only to v2:
https://github.com/iTwin/iTwinUI/blob/f6dae8dfd50bdf5bf5c125e7920ba76b9d4124ab/packages/itwinui-css/src/utils/icon.scss#L21

🚀 Fixed in 2.12.24, thanks for reporting this! @saskliutas


CFormSelect dropdown style doesn't comply with the dark style

When switching to the dark theme, the background color of CFormSelect dropdown stays white. Since the text turns white because of the dark style, this makes it impossible to read the options.
As an example, we can just use the online admin template: https://coreui.io/react/demo/4.0/dark/#/forms/select
Try to open any select input and you will see that the options are invisible.

@lucagalbu do you have this problem in Firefox?

I have this problem in all the browsers I tried on Windows 10:

Chrome Version 96.0.4664.45 (Offizieller Build) (64-Bit)
Firefox 94.0.2 (64-bit)
Edge Version 96.0.1054.34 (Offizielles Build) (64-Bit)

On Wed, Dec 1, 2021 at 2:04 AM Łukasz Holeczek @.***>
wrote:

@lucagalbu https://github.com/lucagalbu do you have this problem in
Firefox?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/coreui/coreui-react/issues/228#issuecomment-983061407,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AE7PZ3XLCB6QZYZ62S3U3KDUOVDARANCNFSM5JCMV5LA
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

I'm having this issue as well. <CFormSelect> doesn't show options with the dark theme, except for the one that is highlighted.

Same here. Any workaround?


fix the renaming issue to noctua-form legacy. and build

@kltm this is 98% fix to noctua-form-legacy rename issue

I'm sure you know what's going on in there.


Layout scrambled when rotating screen

If the map is opened in mobile works ok, but the layout is messed up if you rotate the screen

It happens too when the window is resized (only height)
Setting a fixed size instead of a max limit should do the trick and avoid adding a window.resize listener.

Fixed by https://github.com/AbelVM/gauge_legend/commit/4cc6b0f60a2c974700afc41a0b683fce0361665f

Fixed by https://github.com/AbelVM/gauge_legend/commit/4cc6b0f60a2c974700afc41a0b683fce0361665f


Updated socket client

The socket client was updated to eliminate nuisance errors. Before,
errors were regularly thrown that the socket connection was dropped and
the pychromecast would be reconnecting. This no longer happens.
An error also existed where Chromecast connections were dropped after a
few hours. It is my guess that this commit will fix this issue, but
that has not yet been confirmed.
The PING command is also now sent to the Chromecast and the PONG
response is now handled. Pychromecast now uses this mechanism to
determine if a socket connection is dropped. PINGs are set every 10
seconds and a PONG is expected back within 10 seconds. The Chromecast
will usually automatically PING the client, but not always. Because of
this, the PINGs sent to the client were not relied upon.
All hardcoded times were brought to the top and put in constants. The
timeout time was reduced to 30 seconds from 60.

By the way, don't mere yet. I'm still running some tests to make sure everything is working.

Looks good to me!

This library passed a 12 hour test. So far it seems much more stable. I'm merging. Feel free to publish when you can.


Added other functions

OK I ABSOLUTELY LOVE this PR, however the branch has been deprecated due to restructuring of the plugins system.
The plugin has been merged into the main Auto-GPT-Plugins repo, so check it out and please make your PR from there!


Strange ping result on first pinging memif interface

Expected Behavior
The console hasn't strange output on basic_memif_test running
Current Behavior
You could see 'Failed: no egress interface' on the first endpoint pinging.
Failure Information (for bugs)
Failed: no egress interface
Steps to Reproduce

Go to basic_memif_test
Add log for a ping response in the test(or you can run from the branch https://github.com/networkservicemesh/networkservicemesh/pull/925)
Run test

Failure Logs
=== RUN   TestSimpleMemifConnection
time="2019-04-11T01:44:16+07:00" level=info msg="Checking node: kube-master"
time="2019-04-11T01:44:16+07:00" level=info msg="Checking node: kube-worker"
time="2019-04-11T01:44:22+07:00" level=info msg="Started NSMgr/Dataplane: 5.969185092s on node kube-master"
time="2019-04-11T01:44:28+07:00" level=info msg="Executing: [vppctl ping <IP_ADDRESS> repeat 2] in pod vppagent-nsc:vppagent-nsc"
time="2019-04-11T01:44:28+07:00" level=info msg="Ping result: , attempt: 1"
time="2019-04-11T01:44:29+07:00" level=info msg="Executing: [vppctl ping <IP_ADDRESS> repeat 2] in pod vppagent-nsc:vppagent-nsc"
time="2019-04-11T01:44:31+07:00" level=info msg="Ping result: Failed: no egress interface\r\nFailed: no egress interface\r\n\r\nStatistics: 0 sent, 0 received, 0% packet loss\r\n, attempt: 2"
time="2019-04-11T01:44:31+07:00" level=info msg="Executing: [vppctl ping <IP_ADDRESS> repeat 2] in pod vppagent-nsc:vppagent-nsc"
time="2019-04-11T01:44:33+07:00" level=info msg="Ping result: \r\nStatistics: 2 sent, 0 received, 100% packet loss\r\n, attempt: 3"
time="2019-04-11T01:44:34+07:00" level=info msg="Executing: [vppctl ping <IP_ADDRESS> repeat 2] in pod vppagent-nsc:vppagent-nsc"
time="2019-04-11T01:44:36+07:00" level=info msg="Ping result: 116 bytes from <IP_ADDRESS>: icmp_seq=2 ttl=64 time=5.1751 ms\r\n\r\nStatistics: 2 sent, 1 received, 50% packet loss\r\n, attempt: 4"
time="2019-04-11T01:44:36+07:00" level=info msg="Ping successful"

today I've investigated this issue.
Failed: no egress interface returned each time if memif interface is not initialized.
And from logs seems that's OK behavior. Because we pinging the interface which is not initialized yet.
Looks like this defect can be closed

Do you think the test can be updated to make reflect better the situation. Like force interface initialisation?


Bigger size limit for BuiltinByteString

Describe the feature you'd like
Currently BuiltinByteStrings have 64 bytes size limit, but after some testing I found that it's actually less than that:
The Plutus script evaluation failed: DeserialiseFailure 175 "BadEncoding (0x00000042000d60ff,S {currPtr = 0x00000042000d60da, usedBits = 0}) \"Used more than 64 bytes decoding the constant: (con\\n  bytestring\\n  #048379352db5140c4a39137dd08c69193af732a7ceee3e6ff8cb07e37ce82e035579551734d7d9e4b6853d45c4a7846d5ef570e56f0353f83dad3b478a5f6699\\n)\""

The new verifySchnorrSecp256k1Signature and verifyEcdsaSecp256k1Signature functions however expect a 64 byte verification key, and we currently have to split that into two parts off-chain, and concatenate them on-chain. This is a problem that many developers will likely be facing, so we should add some documentation at least, and ideally raise the size limit.
Describe alternatives you've considered
I can't see any sensible alternative. It's possible to use these functions with the above mentioned hack, but it adds unnecessary complexity.

The limit is there for legal reasons to prevent illegal data being included on the chain easily. We can however change the limit, and we have some ideas for tweaking the binary format so that it won't be needed at all. However, it's too close to the Vasil HF for any such improvements to make it in, unfortunately.

Thank you @michaelpj for the quick response!
I will create a PR with some documentation with the "bytestring splitting hack". I want to link some gh issue there to be able track the status of this.

Maybe we could add this to https://github.com/input-output-hk/plutus/issues/4476. However, BuiltinByteStrings can be longer that 64 bytes as long as they are not hardcoded or used in datums and redeemers, so I'm not sure, where and what sort of validation would make sense.

After inspecting the binary format again, we convinced ourselves that the structure of it is good enough to provide us with the protection that we need, and so the limit is actually unnecessary. I ripped it out and I think it's just barely going to sneak into Vasil. Phew.


Preserve field name in ScalarValue::List

Which issue does this PR close?

Closes #2450 .
Rationale for this change

What changes are included in this PR?

Preserve list element name
Are there any user-facing changes?

@alamb you mentioned in #2840 the encoding/decoding issue still exists, please give more details, I'll try to fix it in this PR

Codecov Report

Merging #2893 (0a45547) into master (6a5de4f) will increase coverage by 0.06%.
The diff coverage is 90.00%.

@@            Coverage Diff             @@
##           master    #2893      +/-   ##
==========================================
+ Coverage   85.34%   85.41%   +0.06%
==========================================
  Files         276      276
  Lines       49294    49236      -58
==========================================
- Hits        42071    42055      -16
+ Misses       7223     7181      -42

Impacted Files
Coverage Δ

datafusion/sql/src/planner.rs
81.38% <50.00%> (ø)

datafusion/proto/src/to_proto.rs
53.64% <63.15%> (-2.83%)
:arrow_down:

.../physical-expr/src/aggregate/array_agg_distinct.rs
80.18% <93.75%> (ø)

datafusion/common/src/scalar.rs
75.74% <100.00%> (-0.04%)
:arrow_down:

datafusion/core/src/scalar.rs
99.61% <100.00%> (+<0.01%)
:arrow_up:

...atafusion/physical-expr/src/aggregate/array_agg.rs
95.87% <100.00%> (-0.05%)
:arrow_down:

...sion/physical-expr/src/aggregate/count_distinct.rs
94.73% <100.00%> (+0.01%)
:arrow_up:

...fusion/physical-expr/src/aggregate/sum_distinct.rs
92.72% <100.00%> (+0.06%)
:arrow_up:

datafusion/physical-expr/src/aggregate/tdigest.rs
91.30% <100.00%> (+0.05%)
:arrow_up:

datafusion/proto/src/from_proto.rs
35.84% <100.00%> (+1.20%)
:arrow_up:

... and 7 more

Continue to review full report at Codecov.

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

@alamb I have reenabled commented test, and build is ok. Do you think we can proceed?

@alamb please check this PR again

I think this PR looks good to go now -- we just need to rebase it against master. If that is having problems @comphead I will be happy to do so.
Thank you

Hi @alamb I have merged it, please have a look again

Thanks @comphead  -- I took the liberty of merging up from master again (to resolve yet another conflict I introduced in https://github.com/apache/arrow-datafusion/pull/2875). I plan to merge this PR once the tests pass

@alamb you mentioned in https://github.com/apache/arrow-datafusion/pull/2840 the encoding/decoding issue still exists, please give more details, I'll try to fix it in this PR

For the record, we discussed on slack and found the appropriate test coverage was here: https://github.com/apache/arrow-datafusion/blob/3f4aaabc74796fe8c538981c259d79da789b96ae/datafusion/proto/src/lib.rs#L345


[FEATURE REQUEST] Json parsing (Scoop pkgs), enable search by description + improve info loading speed

This would enable searching by package description and improve info menu loading speed. However, I am not sure this can be implemented since you said it's not not possible for Winget in https://github.com/martinet101/WingetUI/issues/223#issuecomment-1273551495. Is it the same case for Scoop?
This was implemented in scoop.sh official search engine, but I suppose it would be more difficult to do the same for a local app.
Would something like this work? (sorry if it this a stupid idea)
Example:

Check which buckets are installed (scoop bucket list)
Download manifests (only if missing) from installed buckets and store them inside .wingetui folder (or another one)
Use checksum or time stamp to check for manifest updates and download newer versions of outdated manifests

The issue with winget was that the time to download and read the manifests was enourmous.
I'll take a look at how would it woek with scoop

The issue with winget was that the time to download and read the manifests was enourmous.

Only downloading missing manifests and using checksum or time stamp to check for manifest updates should reduce bandwidth utilization

The issue with winget was that the time to download and read the manifests was enourmous.

Only downloading missing manifests and using checksum or time stamp to check for manifest updates should reduce bandwidth utilization

The issue is not bandwidth (that also it takes its time to download), but rather they come compressed and it took like 30 seconds to process the whole zip file

The issue is not bandwidth (that also it takes its time to download), but rather they come compressed and it took like 30 seconds to process the whole zip file

Isn't it possible to individually download the JSON files?

With winget not.
I have to see how scoop works

Custom buckets is a possible thing, could you please open a new issue?

In this feature I asked for some sort of advanced search for Scoop
I have asked in https://github.com/marticliment/WingetUI/issues/223 for Winget
What about Chocolatey?

I don't know, and honestly, I don't think advanced search will be available.
However, i'm thinking on a way to also add the winget monikers and some other similr behaviours on scoop, so a similar approach could be done for chocolatey.
I will let you know when  have further progress on this

this feature request seems useless since there is https://github.com/marticliment/WingetUI/issues/473 and https://github.com/marticliment/WingetUI/issues/223


run build Error

Application entry file "dist\electron\main.js" in the "D:\Demo\electron-demo\my-project\build\win-unpacked\resources\app.asar" does not exist. Seems like a wrong configuration.

How to solve this problem?

cannot resolve https://npm.taobao.org/mirrors/electron-builder-binaries/nsis-resources-3.3.0/nsis-resources-<IP_ADDRESS>z: status code 404


Adds a setting to force some types to always be included in the emitted types

This is useful to support, for example, enum types whose values are significant but whose type is not explicitly used in the functions prototypes.
For example in this code:
/// Returns the id of an opened object, or - if negative - an error code
#[no_mangle]
pub extern "C" fn open_object() -> i64 {
...
}

#[repr(i64)]
pub enum ErrorCode {
     InvalidState = -1,
     BadMood = -2,
     NotAGoodDay = -3,
}

ErrorCode  would not be emitted in the generated bindings because it doesn't appear in open_object prototype even if it is a potential return type.

:+1: Thanks !


Supporting ordered keys for objects

Use case: I have an object, where I want to control the sort/display order.
Using the code below, I can accomplish this with:

Whereas:

records is an object containing an indexed list of objects like:

{ "a":{"foo":"bar", "bar":"foo"},
  "b":{"foo":1,     "bar":2}
}

recordkeys is a sorted array of the keys involved e.g. ["b", "a"]
ckey will iterate through recordkeys.
crow will iterate through the objects contained in records.

It's essentially the same as:

But with a well-defined sort order instead; determined by the order in recordkeys. The current each={ ... in ... } statement basically has an implementation-defined sort order which cannot be influenced deterministically.
Patch for riot itself:
commit 12d0441da420700cd56237cff6cca4512c52b8bf
Author: Stephen R. van den Berg<EMAIL_ADDRESS>Date:   Mon Aug 29 15:57:42 2016 +0200

    Support inkey keyword for each and sorted keylists.

diff --git a/lib/browser/tag/each.js b/lib/browser/tag/each.js
index d5394ad..2fd3ad6 100644
--- a/lib/browser/tag/each.js
+++ b/lib/browser/tag/each.js
@@ -31,8 +31,9 @@ import {
  * @returns { Object } - new object containing the values of the original item
  *
  * The variables 'key' and 'val' are arbitrary.
- * They depend on the collection type looped (Array, Object)
+ * They depend on the collection type looped (Array, Object, [Array, Object])
  * and on the expression used on the each tag
+ * The [Array, Object] variant is valid when the member inkey is true.
  *
  */
 export function mkitem(expr, key, val, base) {
@@ -119,15 +120,21 @@ export default function _each(dom, parent, expr) {
   expr.update = function updateEach() {
     // get the new items collection
     var items = tmpl(expr.val, parent),
+      keys,
       // create a fragment to hold the new DOM nodes to inject in the parent tag
       frag = document.createDocumentFragment()
     root = ref.parentNode

+    if (expr.inkey) {
+      keys = items[0]
+      items = items[1]
+    }
+
     // object loop. any changes cause full redraw
     if (!isArray(items)) {
       hasKeys = items || false
       items = hasKeys ?
-        Object.keys(items).map(function (key) {
+        (keys || Object.keys(items)).map(function (key) {
           return mkitem(expr, key, items[key])
         }) : []
     }
@@ -144,7 +151,8 @@ export default function _each(dom, parent, expr) {
       // reorder only if the items are objects

       var
-        _mustReorder = mustReorder && typeof item == T_OBJECT && !hasKeys,
+        _mustReorder = mustReorder && typeof item == T_OBJECT &&
+         (!hasKeys || expr.inkey),
         oldPos = oldItems.indexOf(item),
         pos = ~oldPos && _mustReorder ? oldPos : i,
         // does a tag exist in this position?

And for riot-tmpl:
commit 6a6ae43b68f72c262c4ed242b009357e4452aed6
Author: Stephen R. van den Berg<EMAIL_ADDRESS>Date:   Mon Aug 29 03:18:38 2016 +0200

    Support inkey keyword for each and sorted keylists.

diff --git a/src/brackets.js b/src/brackets.js
index 45842a8..9c0460d 100644
--- a/src/brackets.js
+++ b/src/brackets.js
@@ -118,7 +118,7 @@ var brackets = (function (UNDEF) {
     /\\({)|{/g,                 // $_RIX_OPEN
     RegExp('\\\\(})|([[({])|(})|' + S_QBLOCKS, REGLOB),       // $_RIX_CLOSE
     DEFAULT,                    // $_RIX_PAIR
-    /^\s*{\^?\s*([$\w]+)(?:\s*,\s*(\S+))?\s+in\s+(\S.*)\s*}/, // $_RIX_LOOP
+    /^\s*{\^?\s*([$\w]+)(?:\s*,\s*([$\w]+))?\s+in(key)?\s+(\S.*)\s*}/, // $_RIX_LOOP
     /(^|[^\\]){=[\S\s]*?}/      // $_RIX_RAW
   ]
It's essentially the same as:

```
But with a well-defined sort order instead; determined by the order in recordkeys.
@@ -319,7 +319,8 @@ var brackets = (function (UNDEF) {
var m = expr.match(_cache[$_RIX_LOOP])
 return m

 ? { key: m[1], pos: m[2], val: _cache[0] + m[3].trim() + _cache[1] }

 ? { key: m[1], pos: m[2], val: _cache[0] + m[4].trim() + _cache[1],

     inkey: m[3] === 'key' }
 : { val: expr.trim() }

}

I submitted this to https://github.com/riot/riot/issues/1964 as well.  It's a bit unclear what the best entrypoint for this is.

@BuGlessRB thanks, your code is correct but I think this enhancement is not easy for other riot modules, right now there's unresolved issues with the each feature.

In which way not easy?  The only dependency I can see is the number of matching regexp subexpressions.  I fixed that in riot-main correspondingly.  Are there any other modules that directly interface with that?

@aMarCruz @BuGlessRB I would not invest time on a feature that could be implemented outside of riot with 4 lines of code http://plnkr.co/edit/xwLvvoRwnXDdWM6twXU3?p=preview

I didn't realise that each={} supports function calls.  Yes this might work for me.  The only downside being that the index-key needs to be part of the objects too.
I'll refactor my code and see how this plays out.  Thanks for the feedback.

Thank you.


Inaccessible ErrorObject params in TypeScript

What version of Ajv are you using? Does the issue happen if you use the latest version?
Latest version.
Your typescript code

const validationError: ajv.ValidationError = new ajv.ValidationError([{
    dataPath: ".someKey",
    keyword: "enum",
    params: { allowedValues: ["1", "2", "3"] },
    schemaPath: "",
}]);
validationError.errors[0].params.allowedValues; // TypeError, see below

Typescript compiler error messages
$ tsc --target ES5 --noImplicitAny --noEmit spec/typescript/index.ts
spec/typescript/index.ts:60:34 - error TS2339: Property 'allowedValues' does not exist on type 'ErrorParameters'.
  Property 'allowedValues' does not exist on type 'RefParams'.

60 validationError.errors[0].params.allowedValues;

Describe the change that should be made to address the issue?
I opened a Draft PR here: https://github.com/ajv-validator/ajv/pull/1318.
Are you going to resolve the issue?
I already did, needs review and a bit of help with validating the relationships between keywords and params.

It's duplicate of https://github.com/ajv-validator/ajv/issues/1090 - implemented in v7-beta

Send some coins thiny...
Please help me dear Coder...
На сб, 7.11.2020 г., 16:46 ч. Evgeny Poberezkin<EMAIL_ADDRESS>написа:

Closed #1319 https://github.com/ajv-validator/ajv/issues/1319.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/ajv-validator/ajv/issues/1319#event-3969952302, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AHM4IDALFCGWSLXRNTXKZLLSOVMVTANCNFSM4TNQVDGA
.


enable single gpu training

Before I start, thank you for sharing your awesome work!
The thing is, I tried to train the model with single gpu but I failed since it only support DDP training so I slightly modified your training script to support both single/multi gpu training.
I tested on both single/multi gpu environments. To train with single gpu, execute without DDP launch, and change GPUS to (0, ) in config file.
Thanks.

@swdsld Thanks for enabling training with a single GPU! Please see my questions above.

Oh, I think I made a mistake. I'm sorry this my first pull request and I'm not used to it.
Let me fix this.

Sorry for the inconvenience.
This is my first pull request and I wasn't familiar with this. Now I've double checked with my available machines and works well!
Thanks.

Thank you for your suggestion. I applied your comments and checked if there's any other conflicts! Sorry there are some messed up commits;;

Looks good to me! Thanks for working on this. I'm going to merge this pull request.

Thank you :+1:


Improve readability of Add tools section

I was going through this long list of steps for the first time and mainly added subheadings to make the reading easier.

Segment long list into smaller lists with headings
Indent code boxes to match with list items
Minor rephrasing
remove dead link
fix typo

Awesome - thank you so much!


Adding-showAsInteger-property-chart2d

Fixes: https://github.com/mit-cml/appinventor-sources/issues/2759
Added a new Property ShowAsIntegers to Chart2D Component
When Checked X-Axis Labels and Point labels are rendered as Integers.
Updated Version numbers

@ewpatton could u please review?

Can one of the admins verify this patch?

Thank you @adirn26 for doing this. However, I'm thinking we want to have the option be a dropdown rather than a checkbox so that we can include other options such as date or time. Would you mind adapting this change to allow for those options as well?

@adirn26 I think those should be good enough for now. We can always decide to add more options in the future if the use cases arise.

Added a dropdown property called ChartValueType which contains options Decimal, Integer, Date and Time

Created a new PropertyEditor class called YoungAndroidChartLabelValueTypeChoicePropertyEditor
@ewpatton Updated According to the changes requested


time: Now is "slow"

What version of Go are you using (go version)?

$ go version
go version go1.20rc2 linux/amd64

Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/pierre/.cache/go-build"
GOENV="/home/pierre/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/pierre/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/pierre/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/pierre/.gimme/versions/go1.20rc2.src"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/pierre/.gimme/versions/go1.20rc2.src/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.20rc2"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
GOWORK=""
CGO_CFLAGS="-O2 -g"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-O2 -g"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1508083160=/tmp/go-build -gno-record-gcc-switches"

What did you do?
Disclaimer: yes I know, I'm trying to do something "silly" (benchmarking time.Now()).
But it has a real impact in production for me.
Context: I'm trying to measure the execution time of a function that is "fast" (below 1 microsecond).
I ran a benchmark on my function (with testing.B), so I know it's fast (below 1 microsecond).
But I want to measure its execution time while it's running in production (and report it in my metrics).
So I did something simple:
start := time.Now()
// call my function
dur := time.Since(start)
// report in my metrics

Then I noticed that the measured duration was much higher than the time measured in my benchmark (around 5 microseconds, vs 1 microsecond in my benchmark).
So I did a benchmark that calls time.Now():
func BenchmarkTimeNow(b *testing.B) {
	var res time.Time
	for i := 0; i < b.N; i++ {
		res = time.Now()
	}
	benchRes = res
}

➜  timebench go test -v -bench=.
goos: linux
goarch: amd64
pkg: timebench
cpu: AMD Ryzen 7 PRO 4750U with Radeon Graphics
BenchmarkTimeNow
BenchmarkTimeNow-16       543583              2249 ns/op
PASS
ok      timebench       1.249s

(Yes I closed all other running apps)
I'm very surprised, because this time (2249ns) is very high.
If I remember correctly, on my other computer it was 2 orders of magnitude lower (30ns)
I did a profiling of my benchmark.
All the CPU time is spent in time.now() (yes, lower case now)
My question: how can I measure the execution time of a function, if calling time.Now() is slower than calling my function ?
Feel free to close this issue if you think it's not a problem.
What did you expect to see?
Calling time.Now() should take approximately 30ns.
This is the benchmark result on my other computer:
➜  timebench go test -v -bench=.
goos: linux
goarch: amd64
pkg: timebench
cpu: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
BenchmarkTimeNow
BenchmarkTimeNow-12     35953132                31.34 ns/op
PASS
ok      timebench       1.164s
➜  timebench go version
go version go1.20rc2 linux/amd64

What did you see instead?
Calling time.Now() takes 2249ns, which is slower than the execution time of the function I'm trying to measure.

For what it's worth we already have a benchmark for time.Now in the time package.  it's called BenchmarkNow.
When I run go test time -test.run=xxx -test.bench=BenchmarkNow on my amd64-linux laptop I get
BenchmarkNow-16             	44539380	        25.24 ns/op

You got similar results on your "other computer."
So tell us more about the computer on which time.Now is slow.

Here is the result:
➜  ~ go test time -test.run=xxx -test.bench=BenchmarkNow
goos: linux
goarch: amd64
pkg: time
cpu: AMD Ryzen 7 PRO 4750U with Radeon Graphics
BenchmarkNow-16             	  528529	      2261 ns/op
BenchmarkNowUnixNano-16     	  532738	      2254 ns/op
BenchmarkNowUnixMilli-16    	  531685	      2253 ns/op
BenchmarkNowUnixMicro-16    	  522962	      2286 ns/op
PASS
ok  	time	7.798s

There must be some relevant difference between them.
Try building a trivial Go program that calls time.Now and run it on both systems under strace -f.  See if there are any differences.

@pierrre, are you in a VM? What type?

Hello, I will try to run strace, but I don't have access to the other computer today, so I will come back later.
@bradfitz no I'm not using a VM
Both computers are normal laptops with ArchLinux installed, same kernel version.
The "slow" one is a Lenovo Thinkpad (T14S Gen 1, less than 1 year old).
The "fast" one is a Dell XPS 15 (few years old).
Yes my production environment is running in a VM, but I didn't talk about it in this issue.

That looks like the "slow" computer is somehow missing the VDSO that contains a non-syscall implementation of clock_gettime.  I'm not sure offhand what could cause that.  The VDSO is normally supplied by the kernel.  See man vdso for background.

You could try searching dmesg for messages containing "VDSO" or "TSC" (or "time", if those yield nothing). My guess would be that the kernel is deciding that the TSC is not available/reliable, thus forcing the VDSO to fall back to system calls.
Given that you see the system calls with strace, that means that VDSO is indeed falling back to system calls (or, less likely, the VDSO doesn't exist at all, but I don't think modern Linux ever omits it entirely). This is the source of the slowness (it is not a Go issue), the remaining question is why it is falling back.

You can look at:
/sys/devices/system/clocksource/clocksource0/available_clocksource
/sys/devices/system/clocksource/clocksource0/current_clocksource
To see the available and current clock source. The clock source needs to be tsc for the VDSO to work without fallback (or pvclock/hvclock, but those are only relevant to VM guests).

It could be related to one of https://bugzilla.kernel.org/show_bug.cgi?id=202525 or https://bugzilla.kernel.org/show_bug.cgi?id=216146 (both of which should result in dmesg warnings).

Here is the result of strace on my "fast" computer:
[pid  5814] --- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=5812, si_uid=1000} ---
[pid  5813] <... tgkill resumed>)       = 0
[pid  5814] rt_sigreturn({mask=[]} <unfinished ...>
[pid  5813] nanosleep({tv_sec=0, tv_nsec=10000000},  <unfinished ...>
[pid  5814] <... rt_sigreturn resumed>) = 387849827
[pid  5813] <... nanosleep resumed>NULL) = 0
[pid  5813] epoll_pwait(3, [], 128, 0, NULL, 0) = 0
[pid  5813] nanosleep({tv_sec=0, tv_nsec=10000000}, NULL) = 0
[pid  5813] epoll_pwait(3, [], 128, 0, NULL, 0) = 0
[pid  5813] getpid()                    = 5812
[pid  5813] tgkill(5812, 5814, SIGURG <unfinished ...>

repeated thousands of times

I asked several coworkers at my company to run the same benchmark on various computer models:
5 of them have an Intel CPU, and the benchmark result is "fast": 30ns
1 has exactly the same model/CPU as I have.
His Linux distribution is Fedora 37.
And he can reproduce the "slow" benchmark result: ~2000ns

About the clock source:
On my "slow" computer:
➜  ~ cat /sys/devices/system/clocksource/clocksource0/available_clocksource
hpet acpi_pm
➜  ~ cat /sys/devices/system/clocksource/clocksource0/current_clocksource
hpet

About dmesg:
On my "slow" computer:
➜  ~ sudo dmesg | grep -iE "(vdso|tsc|clocksource)"
[    0.000000] tsc: Fast TSC calibration using PIT
[    0.000000] tsc: Detected 1696.689 MHz processor
[    0.036105] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns:<PHONE_NUMBER>343963 ns
[    0.096170] clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns:<PHONE_NUMBER>04 ns
[    0.112863] clocksource: tsc-early: mask: 0xffffffffffffffff max_cycles: 0x1874efa0393, max_idle_ns:<PHONE_NUMBER>71 ns
[    0.232866] TSC synchronization [CPU#0 -> CPU#1]:
[    0.232866] Measured<PHONE_NUMBER> cycles TSC warp between CPUs, turning off TSC clock.
[    0.232866] tsc: Marking TSC unstable due to check_tsc_sync_source failed
[    0.240266] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns:<PHONE_NUMBER>511994 ns
[    0.302925] clocksource: Switched to clocksource hpet
[    0.309641] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns:<PHONE_NUMBER> ns
[   17.853505] SVM: TSC scaling supported

This is the source of the slowness (it is not a Go issue), the remaining question is why it is falling back.

OK I understand, feel free to close this issue if there is nothing we can do on Go side.
Thank you for your help :+1:

[    0.232866] Measured<PHONE_NUMBER> cycles TSC warp between CPUs, turning off TSC clock.
[    0.232866] tsc: Marking TSC unstable due to check_tsc_sync_source failed

This is the immediate problem. The kernel has decided that the TSC is not reliable and disabled its use.
There is nothing we can do in Go. I suggest reaching out on one of the kernel bugs. https://bugzilla.kernel.org/show_bug.cgi?id=202525 has the same kernel warnings, though a slightly different CPU model.


Protocols do not allow generic parameters; use associated types instead

public protocol ReuseIdentifierContainer {
associatedtype Reusable
var identifier: String { get }
}

R.swift 7 requires the latest Swift version that ships with Xcode 14.
If you're using an older version, you can continue to use version 6: https://github.com/mac-cain13/R.swift/tree/v6.1.0

Problem solved using R.Swift version 6.0.0


Add notebook intro about pandas

I added a jupyter notebook in 3_using_external_libraries: 5_data_analysis_library_pandas.ipynb
There is also a csv file used for one of the exercises.
Note that to read and write HDF5 and Excel files additional libraries might have to be installed.
I added the instructions to do so as comments.
The content of the notebook is only an introduction to pandas. For example, 'reshaping' is not described and the parts about plotting and grouping could easily be extended.

Thanks for the review. I made some modifications:

solutions moved to solutions folder
added some advantages of using the library
corrected typo


[Relax] Handle dynamic arguments in legalization of nn.attention

Prior to this commit, when using causal_mask="BottomRight" in R.nn.attention, the legalization would assume that the query and key/value sequence lengths were static integers.  This commit updates the legalization to allow dynamic shapes.

We should really have "always think about the dynamic case" as a motto.

I like the motto, as it's the most user-friendly option at a high level.  Since specialization can go from dynamic to static, but going from static to dynamic would be ambiguous, I really like "dynamic until specialized" as the default behavior.


update to 1.7

Description
Updating docker and sidecar tags to 1.7.0
GitHub Issues
List the GitHub issues impacted by this PR:

GitHub Issue #

https://github.com/dell/csm/issues/743

Checklist:

[x] I have performed a self-review of my own code to ensure there are no formatting, vetting, linting, or security issues
[x] I have verified that new and existing unit tests pass locally with my changes
[x] I have not allowed coverage numbers to degenerate
[x] I have maintained at least 90% code coverage
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] I have added tests that prove my fix is effective or that my feature works
[x] Backward compatibility is not broken

How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration
-N/A

run e2e test

run e2e test

Run e2e pass

e2e pass


Home View: String Updates

Change "My Visit" to "Hours, Location and Admission"
Change "Exhibitions" to "Explore the Art"

@staticmade Feel free to close this issue.


Improve text color inside the graph

This definitely isn't readable :see_no_evil:

It could use black or white as text color depending on the index value?

Doing some quick tweaks in DevTools, I would suggest the following:

change border and text to be always black, because against the:

start of the bar: definitely readable and WCAG agrees (more if you consider most of the text isn't against the very start of the bar)
middle of the bar: black against white :man_shrugging:
the red in the end of the bar: readable to me, but according to WCAG it would be better to change that red a bit, to B80000 instead of B60000 (so it hits AA for large text)

bonus: make that text bold

As a frontend developer for the past decade or so, I would also suggest removal of box-shadows and text-shadows :eyes: I hope you don't feel offended, as this might seem like a matter of personal taste :pray:
But shadows are not present in the usual Home Assistant theme, and in all honesty it kinda makes it feel like a dated UI element (think "Web 2.0" buttons). Sometimes, simplicity is better than overdoing, and there are other means to make text readable against different backgrounds.
Bonus: make the index values follow the decimal places option.
Mocks below:

I can submit a PR with those changes, if you agree to my ideas :)

Don't worry I'm not offended at all, I love to share different points of view and receive suggestions
Of course I'll accept a PR, otherwise I can code it by myself but every bit of help is good 👍

I'd want suggest ho hide descriptions in case unavailable of entities,
currently in this case card shows wrong description.


Release notes for the iteration

Reading the release notes gives an overview what features of the system are supported by the released version of the system and is thus input for the acceptance testing by the customer&course organizer. If delivered functionality contains known bugs, those issues are highlighted in release notes.

Estimated 2 man-hours.


Register and Login don't really belong in (at least both simultaneously)

I don't understand this title


blueprints: fix filesystem customizations to allow toml Undecoded()

The current toml filesytem customizations will decode a FilesystemCustomization as a map[string]interface{}. This means that the underlying toml engine will not konw what keys inside the map are decoded and which are not decoded. This lead to the issue https://github.com/osbuild/bootc-image-builder/issues/655 in bootc-image-builder where we check if we have unencoded entries and if so error (in this case incorrectly).
This commit fixes the issue by moving the toml decoding from the struct/map[string]interface{} to primitive types.
I opened https://github.com/BurntSushi/toml/issues/425 to see if there is another way via a custom unmarshaler.

I submited an alternative idea upstream https://github.com/BurntSushi/toml/pull/426

Closing in favor of https://github.com/osbuild/images/pull/1049


Update BitTorrent Sync app

Update URL for new major version 2.0 (previous URL downloads v1.4).

Sorry, you have 2 pulls for this already ( #9866 , #9870 ).


Persist supplies in conquered areas

Suggestion/Feature request

Is your feature request related to a problem? Please describe:
When playing with just a small group it isn't always feasible to secure an area, fend off any reinforcement and afterwards fetch all the supplies and deliver them back to a FOB. Supplies unfortunately don't spawn again when restarting the server.
Describe the solution you'd like:
Have unclaimed supply crates (supplies, ammo, fuel) persist and spawn again when loading the mission.
Additional context:
None

That was fast. Thank you.

Wasn't much needed to implement this and the request makes sense, so you're welcome. 👍


500 error at /link/

'mtgo_username'
Reported on decksite by<PHONE_NUMBER>33835520
Request Method: GET
Path: /link?
Cookies: {'__cfduid': 'd2fbac5b36cca95c10c87756a543b014b1516672824', '_ga': 'GA1.2.584749659.1516672826', '_gid': 'GA1.2.27197670.1519874841', 'deck_id': '10624', 'session': '.eJxFUGFrwjAU_C_vcxlp2rSZ33SbiCJiaQdjjBLMs9alTU3SuSr-96WDzY_v3t27u3cFIZu6hcleKIsB1BImEKZJTBhPYxpFPGKMEghA6apCWXZorG7LkRc_0gAaV-myt2ha0aDXGt0Iz9aidwdaWifciJ6L5mmRc1bMkK2y4Xw66rXb5Nt5L7NLfOc7_Yk-zBXEbofW_s0geptsX9zqeTAblb9Jwun0K92uVVtHbOb1-N3VBm0pHExCH5ilCWf0gZOEURre92PVhMSckAAM7j10-Dc5FEUmjs1reKoufJHLbtov52SdsSFakpU3sTvd-Tbv_kvYuno_eKzqayUtfATwe6Z0w0iBGQqDBm4eFqZCn6rtlbr9ANVcdlE.DXqAVQ.2dbPATdCXgDtDhXUI8OO1ZY-U9o'}
Endpoint: link
View Args: {}
Person:<PHONE_NUMBER>33835520
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36
Referrer: None
Request Data: {}
KeyError
Stack Trace:
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1997, in call
return self.wsgi_app(environ, start_response)
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1985, in wsgi_app
response = self.handle_exception(e)
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/discord/.local/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraise
raise value
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1598, in dispatch_request
return self.view_functionsrule.endpoint
File "./decksite/auth.py", line 64, in decorated_function
return f(*args, **kwargs)
File "./decksite/main.py", line 218, in link
view = LinkAccounts()
File "./decksite/views/link_accounts.py", line 28, in init
self.validate()
File "./decksite/views/link_accounts.py", line 41, in validate
self.link_discord()
File "./decksite/views/link_accounts.py", line 44, in link_discord
p = deck.get_or_insert_person_id(self.form['mtgo_username'], None, None)

When you first load the page (in the GET), the self.form is never filled with the mtgo_username. Actually I don't quite follow the intention: the GET and the POST call the same code. I would expect that the actual linking would be done only in the POST, while the GET would just show the form.


Form_Validation does not work in 3.1.9

I had downloaded a fresh copy from 3.1.9 from the website. When ist comes to validate inputs with form_validation, CI was not able and returned alway false. Then i grabbed the Form_validation.php from the 3.1.x stable branch and replace my file with it, it works now fine

In Form validation callbacks not working. I guess this is a bug. I tried to copy from 3.1.x stable branch but it's still not working.

Saying "it doesn't work" is not helpful. Your issues are more than likely configuration problems.
Please post your "question" on the forum, with enough explanation that someone can help you.

That error message happens if you have a callback rule without an error message.

I have an error message, callback function is returning TRUE.
`if ($res == 0)
{
$this->form_validation->set_message('currentpass_check', 'Current password Didn't match');
return FALSE;
}
else
{
return TRUE;
	}`

@lichtwellenreiter There are no changes to the FV library since the 3.1.9 release:

$ git diff 3.1.9 3.1-stable system/libraries/Form_validation.php
$

Whatever problem you were having, it was likely because of manual patches that you've applied yourself. And even otherwise, if replacing 3.1.9 with 3.1-stable fixes something, that would only mean that we've found the problem and fixed it already; posting issues about that is pointless.
@apartamenti You're doing a lot of things wrong ...

Hijacking someone else's thread, without adding anything helpful to it.
Not listening to our instructions.
Posting a screenshot because ... why? That doesn't clarify anything.
Posting a random code snippet, which not only doesn't help either (we don't know the rest of your code), but is also not real - it would produce a syntax error.

Please, just post on the forums, listen to the feedback that you get and use more common sense.

@lichtwellenreiter There are no changes to the FV library since the 3.1.9 release:

$ git diff 3.1.9 3.1-stable system/libraries/Form_validation.php
$

Whatever problem you were having, it was likely because of manual patches that you've applied yourself. And even otherwise, if replacing 3.1.9 with 3.1-stable fixes something, that would only mean that we've found the problem and fixed it already; posting issues about that is pointless.
@apartamenti You're doing a lot of things wrong ...
* Hijacking someone else's thread, without adding anything helpful to it.

* Not listening to our instructions.

* Posting a screenshot because ... why? That doesn't clarify anything.

* Posting a random code snippet, which not only doesn't help either (we don't know the rest of your code), but is also not real - it would produce a syntax error.

Please, just post on the forums, listen to the feedback that you get and use more common sense.

Did you read https://github.com/bcit-ci/CodeIgniter/blob/develop/contributing.md , when you saying hijacking someone else's thread ? We've same problem with @lichtwellenreiter.  Be careful with the language!

OK I will.


[+Region/Zone] User API Implementation

Completed via https://github.com/cloud-barista/cb-spider/commit/f6541ddee417c2ecce9d153299eefc1507913894


stdenv: use gcc9 for aarch64

Several aarch64 builds fail with is referenced by DSO followed by
bin/ld: final link failed: bad value. This seems related to libgcc_s.so.
https://github.com/NixOS/nixpkgs/issues/108111

Motivation for this change
Things done

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

[ ] NixOS
[ ] macOS
[ ] other Linux distributions

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

@GrahamcOfBorg build stdenv

@GrahamcOfBorg build stdenv

@flokli you have access to an aarch64 machine right? Could you test this change a bit?

@flokli you have access to an aarch64 machine right? Could you test this change a bit?

Let's see how this turns out.

Let's see how this turns out.

@flokli you have access to an aarch64 machine right? Could you test this change a bit?

Nah, it's not powerful enough to build huge rebuilds. We could have tested on the community builder, though ;-)

@flokli you have access to an aarch64 machine right? Could you test this change a bit?

Nah, it's not powerful enough to build huge rebuilds. We could have tested on the community builder, though ;-)

I think using a different gcc for different architectures is a bad idea, guaranteed to cause lots of confusion. Maybe we should just stick to GCC 9 for now.

I think using a different gcc for different architectures is a bad idea, guaranteed to cause lots of confusion. Maybe we should just stick to GCC 9 for now.

Definitely not ideal, but this needs to be resolved for 21.03. Users/maintainers of other platforms need to step up as well.

Definitely not ideal, but this needs to be resolved for 21.03. Users/maintainers of other platforms need to step up as well.


Custom extensions in hooks

Adds two tests to replicate #850
Make sure to remove @pytest.mark.xfail this has been fixed.

Current coverage is 100% (diff: 100%)

Merging #856 into master will not change coverage

@@           master   #856   diff @@
====================================
  Files          16     16
  Lines         658    658
  Methods         0      0
  Messages        0      0
  Branches        0      0
====================================
  Hits          658    658
  Misses          0      0
  Partials        0      0

Powered by Codecov. Last update 1bdf78e...67d2938

lgtm 👍

Thank you @michaeljoseph! 😄


iPhone 6 and 6+ splash don't copy over

ios: {
    // iphone portrait
	iphonePortrait: 'artwork/screens/ios/screen-iphone-portrait.png',
	iphonePortraitx2: 'artwork/screens/ios/screen-iphone-portrait-2x.png',
	iphone568hx2: 'artwork/screens/ios/screen-iphone-568h-2x.png',
	iphone667h: 'artwork/screens/ios/screen-iphone-667h.png',
	iphone736h: 'artwork/screens/ios/screen-iphone-736h.png'
}

The last 2 are always default phone gap. The paths are right, the keys are right. What am I missing? I've even checked the resolutions to make sure those are right.

:+1:


LSTM model is giving an ValueError while predicting based on X_test data

Hi need a help to solve value erorr wile running LSTM. It seems everything works fine on training data but prediction generates less then expected dimensions
my x_train data shape is (846, 30, 3), my y_train data shape is  (846,) my x_test 363, 30, 3), my y_test (363)
hat = modell.predict(test_X) generates (363, 100)
part of the code
reshape input to be 3D [samples, timesteps, features]
train_X = tr_xval.reshape((tr_xval.shape[0], 30, 3))
test_X = ts_xval.reshape((ts_xval.shape[0], 30, 3))
train_y=tr_yval
test_y=ts_yval
print(train_X.shape, train_y.shape, test_X.shape, test_y.shape)
design network
modell = Sequential()
modell.add(LSTM(200, activation='relu',input_shape=(train_X.shape[1], train_X.shape[2]),return_sequences=False,stateful=False))
#model.add(LSTM(neurons, batch_input_shape=(batch_size, X.shape[1], X.shape[2]), stateful=True))
modell.add(Dense(100, activation='relu'))
modell.compile(loss='mae', optimizer='adam',metrics=['accuracy'])
modell.summary()
fit network
history = modell.fit(train_X, train_y, epochs=200, batch_size=72, validation_data=(test_X, test_y), verbose=2, shuffle=False)
#works fin until here but then
yhat = modell.predict(test_X)
from sklearn.preprocessing import MinMaxScaler
scaler = MinMaxScaler(feature_range=(0, 1))
values=lnorm.values.astype('float32')
scaled = scaler.fit_transform(values)
invert scaling for forecast
inv_yhat = np.concatenate((yhat, test_X[:, -2:]), axis=1)
inv_yhat = scaler.inverse_transform(inv_yhat)
inv_yhat = inv_yhat[:,0]
invert scaling for actual
test_y = test_y.reshape((len(test_y), 1))
inv_y = np.concatenate((test_y, test_X[:, -2:]), axis=1)
inv_y = scaler.inverse_transform(inv_y)
inv_y = inv_y[:,0]

ValueError                                Traceback (most recent call last)
C:\Users\M55F1~1.AYU\AppData\Local\Temp/ipykernel_7572/1751946881.py in
5
6 # invert scaling for forecast
----> 7 inv_yhat = np.concatenate((yhat, test_X[:, -2:]), axis=1)
8 inv_yhat = scaler.inverse_transform(inv_yhat)
9 inv_yhat = inv_yhat[:,0]
<array_function internals> in concatenate(*args, **kwargs)
ValueError: all the input arrays must have same number of dimensions, but the array at index 0 has 2 dimension(s) and the array at index 1 has 3 dimension(s)

来信已收到，谢谢！


Python: convertToDelta return py4j.java_gateway.JavaObject instead of delta.tables.DeltaTable

Hi,
I am running the deltaTable = DeltaTable.convertToDelta(spark, f"parquet.{data_path}") to read a DeltaTable from the parquet files  but it doesn't return one as suggested in the documents. However, it successfully converts them. If I read them exactly after that line again using forPath, it will give me the DeltaTable.

I am using spark 3.1 and get delta as an package using sparkConf.set("spark.jars.packages", "io.delta:delta-core_2.12:1.0.0").
Regards,
Shahram

Hi @shsab You are seeing this because Delta use Py4J to interface the python with the JVM world. The object returned will still be a DeltaTable object you should be able to check by running deltaTable.toDF().count()

#789 fixes the return type of convertToDelta for Python


Adding a link to demo example

@bkutil @mstemm linking from the adapter readme to its usage example, for better discovery of our helpful demo.

+1

The test failure is unrelated, feel free to merge :)


feat(headless ssr): refresh recommendations server-side

Adding server-side rendering for commerce SSR package only.

Updated headless-react package to reflect the new changes

Features
Customizable Recommendation Controller

Users can specify which recommendation controller to refresh by providing the recommendation key (as defined in the engine configuration).

If no key is specified, the recommendation controller will not perform any queries.

Supports selecting recommendations using the build method.

Recommendation Name Validation

Validation against invalid recommendation names.
Prevention of duplicate recommendation names.

Code to increase readability
Factory methods
Moved factory methods into dedicated files to avoid bloating the commerce-engine-ssr file.
Examples include:

hydrated-state-factory.ts
static-state-factory.ts

Core Engine Types
Centralized all core engine types into types/core-engine.ts.
Recommendation State Factories
Created dedicated factories for handling static and hydrated states for recommendations (recommendation-static-state-factory.ts).
Improved Controller Handling
Simplified the logic for building controllers based on solution type to eliminate complex, hard-to-read conditional blocks (https://github.com/coveo/ui-kit/pull/4617/commits/677fd451c1b88b4507157a7e55b2272fdef9df13)
https://coveord.atlassian.net/browse/KIT-3503

[ ] try to make it so typescript does not allow duplicate keys in fetchStaticState


Fix NSDecimal interpreter test

We fixed the behavior of Decimal.ulp with https://github.com/apple/swift-foundation/pull/741. We should update the test to reflect the new value.
Resolves: rdar://133416145

@swift-ci please test

This will break when tested against older Darwin OSes, right?
I think this either needs a runtime check, or (probably better) that we just remove this test, since it's already tested in Foundation.

This will break when tested against older Darwin OSes, right?
I think this either needs a runtime check, or (probably better) that we just remove this test, since it's already tested in Foundation.

Ahh good call. Thanks I removed it.

@swift-ci please test

@swift-ci please test Linux


Crawl PX4 codebase and generate pub/sub graph

@CarloWood Would you be interested in helping us out with a Python script (there are a few like the px_generate_params.py and px_generate_airframes.py) that:

Parses the complete src directory
Identifies modules by their CMakeLists.txt file (see px_generate_params.py for an example)
Looks for calls to orb_advertise(), orb_advertise_multi(), orb_publish_auto() and the topic names
Looks for calls to orb_subscribe(), orb_subscribe_multi()
Draws a graph that links publishers and subscribers
Bonus: Checks a specific config. We can start with SITL configs where all apps that are started are in one file

This would be extremely helpful as it would show developers how the system relates. Eventually I'd like to grow this into a website that links to Doxygen for each module.

Can then probably use d3 to eventually display: https://github.com/d3/d3/wiki/Gallery

I gave this a whirl for fun, but the graph is incredibly complex (I used the px4fmu-v2 build).
test.gv.pdf
Maybe it makes more sense to split things up by topic? Does d3 handle complex graphs like this well?

Ha, thanks @stephanbro. That's more spaghetti than I was expecting.
Anyone familiar with good tools for displaying graphs interactively? Optionally selecting modules and topics.

Just a few thoughts from looking at it.

can you skip the mavlink, logger, sdlog2 modules? These subscribe to everything and don't really tell us anything. Publications from mavlink could be helpful though.
skip the less common drivers.  trone, px4flow, sf0x, iridium, bst, pwm_out_sim, ulanding
skip load_mon

If that's still way too much then separate graphs for MC, FW, VTOL could help.
Ultimately it would be nice to have everything optionally browsable, but stripping it down to the core in order to make it comprehensible would really people understand the architecture.

@stephanbro Can you send a PR with the script so we can iterate together on it?

Random thought - would this be easier/better to do at runtime? Have some optional code (in uorb?) so that each publication records the module, topic, count, and likewise for each subscription.
Then we can generate the graph for an actual vehicle/flight and color/size each edge based on number of publications.

@dagar I went with you suggestion and removed the mavlink, sdlog2, and logger modules and things look a lot cleaner (though not all the way there yet).
Here's an example of that: pub_sub_nomavlink.pdf
And here is an example removing the less common drivers you suggested and load_mon:
pub_sub_nomavlink_noload_mon.pdf

I also did a MC only graph, but even that feels a bit too cluttered. You can see it here: pub_sub_mc.pdf
I'm starting to think that the dynamic viewer using JS is going to be the best option.

Nice!
It's getting close to usable. I think it depends what the ultimate purpose of this would be. A dynamic viewer sounds amazing, but realistically would a developer even somewhat familiar with the codebase bother using it when they could just grep?
I personally think the majority of the value is giving potential new developers a gentle and accurate introduction to the architecture that we can easily keep updated. I think we could even get there with a few more tweaks of this existing script.
Next

could you do it at the module (folder) level rather than source file? Commander has many pieces.

drop uavcan, gpio_led.c, nshterm.c, no airspeed driver for MC (airspeed.cpp and meas_airspeed.cpp)

would it be possible to combine all common edges (per direction) between modules? Then stack the labels. If this is possible reconnecting mavlink and sdlog2/logger might make sense.

keep individual graphs per major configuration (MC/FW/VTOL)

sensor drivers (mpu6000, lsm303d, etc) aren't connected to sensors? sensor_accel, sensor_gyro, etc

Here is a version using the module level and dropping the additional items you suggested:
pub_sub_module.pdf
There are some known issues with how I'm grabbing the topic which can be see in this line: topic = re.search('ORB_ID\((.+?)\)', line).
Right now there are some items, such as the sensor data, which don't follow this method for subscription, so they don't get picked up by the script.
As for combining all edges, it might be do-able. I need to do some digging in graphviz to see what is possible.

I've done some small tweaks to also look for the orb_copy lines instead of just orb_subscribe, which fixed the issue with the sensors missing connection (possibly other items as well). There are some outlying issues as I'm still relying on the regex in the previous comment.
I was able to do some processing of the data and condense the number of edges as you suggested:
pub_sub_combined_edges.pdf
Here is re-adding the mavlink, logger, and sdlog2:
pub_sub_combined_edges_logger.pdf

So I actually quite like the last two, but I would guess it still looks like spaghetti to someone new?
What do you think?
If you want to update it in #6368 I could get it running on a CI system and uploading the output to s3. Then we could continue tweaking and try different versions for MC, FW, VTOL, and perhaps different levels of detail.
Nice work!

Another random idea to explore later, but I wonder if we can force the node positioning a bit to better express the important flow?
This kind of thing, but also with drivers and sensors leading into the estimator.

I think that it still looks a bit spaghetti-like, but it's thinned out enough that I think it could be understood without too much effort. I've updated the PR with the things we've talked about in this issue so we can start looking at the other builds and types if you want to add it to the CI like you suggested.
I like the idea you have of changing the node positions to have a better flow. Graphviz seems like it has a fair bit of customization as well as the ability to do sub-graphs that could probably organize things like the plot above. I will try to look in to it more to see what can be done.

Thanks for the great work so far! I would also love to see what it looks like if only the wakeup sources are shown, or perhaps in a different color.

I took a shot at this as well. It's not easy to get something useful though, we have too many connections already! :)
Graphviz
The following uses graphviz, but with different placement algorithms (force-based to minimize the edge lengths) than above. This applies to the graphs:

Dotted lines are publications
each topic has it's own color
parameter_update topic is excluded
it's not complete yet, special cases e.g. for mavlink and the Subscription class are missing

These are some graphs that include all modules:

full graph for all modules: graph.fv.pdf
pubs only: graph_pubs.fv.pdf
subs only: graph_subs.fv.pdf
It works for single modules too: graph_module_ekf2.fv.pdf

All modules from ROMFS: graph.fv.pdf
Only the SITL modules: graph.fv.pdf
D3.js
I then experimented with the D3.js library:

All modules: https://logs.px4.io/plot_app/static/uorb_graph_d3/no_collision_force.html
All modules with a collision avoidance force: https://logs.px4.io/plot_app/static/uorb_graph_d3/collision_force.html. It's a bit more violent until the modules found their place.

It's a really cool library. Try to hover over a node! For example when hovering over the sensor_accel topic, you can see all of our supported accel drivers.
What do you think?
@hamishwillee

Awesome!
If we could do something like selectable filters on the side (modules and topics), and filter presets for a few common configurations I'd find it immediately useful.
Then for different parts of the documentation we could highlight only the relevant modules and data.

@bkueng Same feedback: Awesome, if we have filters it would be easier to use.

What he said https://github.com/PX4/Firmware/issues/6189#issuecomment-346890361
It is very cool, but it there is a lot going on. Filtering would help a lot.

Thanks for your feedback and ideas. I agree the full graph is a bit too much. Although it can still be useful for certain cases (does not need to be the default view though).
I did the following updates:

smooth fade in/out on hover
added a search field
exclude topics that have no publisher or no subscriber
excluded src/examples
double-click on a topic opens the .msg file definition (does not work for multi-topics though). double-click on a module could open the module doc.
handling more special cases (except Subscription & Publication classes)

This is the updated graph for FMUv4, it's already reduced quite a bit:

https://logs.px4.io/plot_app/static/v4_all/index.html
mavlink makes a huge portion, so this is without mavlink: https://logs.px4.io/plot_app/static/v4_no_mavlink/index.html

What do you think? Does it need to be reduced further?
@hamishwillee some use-cases that I see:

check which modules are available (e.g. drivers and what data they publish)
available topics and how they're connected between the modules
relationships and dependencies between modules: which topics does a module require? which modules provide a certain topic? what is the output of a module?
analysis for refactorings and cleanups

Next I'll look into auto-generating from certain cmake config targets (I've done that manually for v4 now) with a user-selectable list.


Question about GQA accuracy.

when I set --train train --valid valid for python src/tasks/gqa.py, I find that the accuracy for valid set is 80%. what wrong with this setting and how to evaluate the result on the valid set. Thank you!

The train and dev set are all collected from Visual Genome thus could not be a faithful indicator of the out-of-domain performance (the GQA test set).  The GQA challenge holds another validation set  testdev set for this purpose, which are collected from test set of MS COCO (not shared by VG). Please use this testdev to tune the model as possible.
The results on valid set should be around 70%. 80% is due to the valid set is used as a part of training data in LXMERT since we would use testdev.
More details here: https://cs.stanford.edu/people/dorarad/gqa/evaluate.html


feat(prettier): support format commonjs and amd call

Current dependencies on/for this PR:

main

PR #1473   👈

This stack of pull requests is managed by Graphite.


lib/backend/repository; handle when auth challenge is missing scope

On some registries (like quay) the scope portion of the bearer auth
challenge can be omitted. In these situations docker2aci has all the
pieces it needs to infer the scope of the token to request, so this
commit changes docker2aci to do so when the scope is missing.

I don't have a private quay account to test but I assume you did and it works.
LGTM.