Subtitle sync

This adds subtitle syncing. I.e make subtitles appear later or earlier in the media timeline.

Let's continue discussion here, so we see changes without switching form issue to pr and back.
It would be good if the cue moving stuff is handled inside the SubtitleProvider class. The FFmpegInteropMSS class is huge already, let's not blow that up with subtitle-specific implementations. Moving it into SubtitleProvider has the benefit that we can use the timer, mutex and tick function that are already defined there.
I currently don't think that we need the AutoResetEvent. If we lock the mutex in both the set method and the tick method, then nothing can go wrong. Even if the previous tick function comes when the next set was already triggered, it would use the updated values already, since Tick can only execute after next set is completed (mutex locked). So I think there cannot be a situation where we get incorrect results. The same is already true for the anti-flicker solution, which is also safe even if Tick method runs async.
About removed internal subs: Internal subs are expected to be in sync with the video, so moving them more than a tiny bit will be a rare situation. Bigger delays will usually only be required for external subs. Still, we could decide to only remove bitmap subs on CueExited but keep all text subs.
Let's also keep in mind that we will always have problems with bigger negtive delay on internal subs. When seek is used, we won't get subs that are stored before the target frame. So subs would only come after some seconds of playback. We cannot do much about this. It also happens with other players.

It would be good if the cue moving stuff is handled inside the SubtitleProvider class. The FFmpegInteropMSS class is huge already, let's not blow that up with subtitle-specific implementations. Moving it into SubtitleProvider has the benefit that we can use the timer, mutex and tick function that are already defined there.

Agreed. I will move it over there.

I currently don't think that we need the AutoResetEvent. If we lock the mutex in both the set method and the tick method, then nothing can go wrong. Even if the previous tick function comes when the next set was already triggered, it would use the updated values already, since Tick can only execute after next set is completed (mutex locked). So I think there cannot be a situation where we get incorrect results. The same is already true for the anti-flicker solution, which is also safe even if Tick method runs async.
Ok, we could give it a try. Sounds reasonable.

About removed internal subs: Internal subs are expected to be in sync with the video, so moving them more than a tiny bit will be a rare situation. Bigger delays will usually only be required for external subs. Still, we could decide to only remove bitmap subs on CueExited but keep all text subs.
Let's also keep in mind that we will always have problems with bigger negtive delay on internal subs. When seek is used, we won't get subs that are stored before the target frame. So subs would only come after some seconds of playback. We cannot do much about this. It also happens with other players.

Well, even if we do remove the cues, it would still make little sense to delay the embedded ones by any large amount. Right now I delay by seconds, just to be sure it works. So I tested that...
...I don't think we need to remove the cues. It doesn't make much sense. So lets say we have a cue which is 10 seconds after the current time, even if we hasten the cues by 10 seconds (which would normally bring it into view), it won't work, since we don't have that cue yet decoded. For embedded we would need to seek the subtitle stream individually, and I don't think that is possible without seeking the entire input stream.
So yah, for embedded subtitles I say we just add the offset to start position calculus and that is it. No need to remove the cue removal ^^

Yes maybe we should not even touch removal. Things will repair when playing for a few seconds and the same problem will occur anyways after each seek.

EDIT: actually no, for external subs, we no longer have the samples provider. For embedded subs, yes, the calculus will be done there. I guess we can introduce a new class, "ExternalSubtitleProvider" and move the logic to it.

For external audio, I move the actual real sample provider instance from the external parser MSS into the main MSS instance. ;) This has a few side effects to handle, but it worked well. But for external subs it might be better to have a specific implementation, as you proposed.

For start time of new subs (live playback of embedded subs), we just need to add the subtitle delay in SubtitleProvider.h, where m_startOffset is already added:
virtual void QueuePacket(AVPacket *packet) override
{
...
			position.Duration = LONGLONG(av_q2d(m_pAvStream->time_base) * 10000000 * packet->pts) - m_startOffset;

Yes, that's how I did it in my test. I will add the new class and push the code.

I still think there is a possibility of thread races, and should probably be synchronised against the main mutex. What happens if mid way through parsing an external sub, someone changes the delay? This will result in some cues having different offsets.

I already wanted to point that out: It would be better if we do not access the config class property here. Instead, during creation of the original MSS we should get the value once from the config class, store it and use it for all subtitles. If we now add external subs, use the stored value in the MSS. Only when the set method is called on the MSS, we get this new value and update all subs. That way, all changes to the delay are mutex locked.
This also allows users to change the value in the config class, to have a default delay (something you currently prevent, but should be possible). So now the property could be get/set.

I will give it a try in the evening.

I still don't think that would be enough. The actual parsing of the external subtitle is done outside of mutex lock. If we do mutex lock it, it might interrupt playback.

You are right. I would have proposed to just ignore that scenario, but the changeset you just pushed looks good.

What about syncing the external subtitle providers with that same mutex? I would personally do it, makes it much easier to consume the API.

I am not sure I understand what you mean. If you think it is a good idea, just try it. :)

So while I was enjoying lunch i had an idea: should we add offsets to Duration of cues as well? I don't know of any player doing this, but I imagine it might be some sort of ease of access feature.

I had this very same idea quite some time ago! Indeed no player supports it right now, but I would personally enable it if available.
It raises some questions on whether to allow overlapping of subs or not. It would be good if we could add it in a way so no overlapping is added. So only extend the sub until the point where the next sub comes. Of course if original subs do already overlap, we can ignore that.
The prevent overlap part is probably a bit difficult to realize, since the next sub might not yet be parsed (for embedded subs), and we alsoi need to be able to undo modifications when duration is reduced - which would force us to remember the original duration.

I think we should allow overlapping. I don't see the problem if they did overlap. I don't think anyone would increase durations by more than a few seconds.

When people talk fast (e.g. discussion), subs usually come right after each other. If we add a delay, we would have subs moving around through the whole discussion. This does not look nice, and does not improve readability of subs (which is probably the goal of having extended duration).

What about syncing the external subtitle providers with that same mutex? I would personally do it, makes it much easier to consume the API.

Well it was a bad idea.

When people talk fast (e.g. discussion), subs usually come right after each other. If we add a duration, we would have subs moving around through the whole discussion. This does not look nice, and does not improve readability of subs (which is probably the goal of having extended duration).
We could also add durations as simple solution first (with overlapping) and add overlap prevention later, as optional feature.

Indeed that could be a problem. But if we don't have all subtitles longer, then the goal of making them easier to read also cannot be accomplished.

Anyway, anything i've missed?

Enhanced subtitle duration without overlap prevention: Makes many subs easier to read but some subs harder to read.
Enhanced subtitle duration with overlap prevention: Makes many subs easier to read but some stay as they are.
So for me, I would use the feature, but only with overlap prevention.

Ok then. We should probably leave that for another PR.

@lukasf do you think this is ready for the merge?^^

Ok, I can agree with ...Delay.
And since most of the review is based on having thread races, maybe we should rethink how we are going to handle this. I think using too many variables and too many mutexes will make things harder to understand in the future, even for us. Unfortunately, C++ is really, really bad at handling multithreading.
I will try to think of a way to eliminate the possibility of thread races at root level (i.e the call to that SetSubtitlesDelay method in ffmpeginteropMSS) without crowding the main class itself. I am pretty sure we can continue to find such problems as we go cause this implementation is so prone to thread races.
And all of this because Microsoft forces us to use that DispatcherTimer.

And by the way, I know I am bad at naming things xD

So my idea is to return async actions wrapping the call to dispatcher timer. The actions would return when the subtitle is done updating its positions. Then the set subtitle delay in the ffmpeginterop mss would mutex lock and wait on all actions to complete, and then release the mutex. This will solve the source of all thread races at its root. Guess I will use the autoresetevent anyway, unless there is some other primitive i can use from c++/Cx.
As for the negative duration cues, I think your idea to save in a list should do the job..

Acutally, I don't think the threading is that bad. The only problem in the current code is that oldOffset is modified when the offset has not yet been applied. Move the change of oldOffset from the Set method to OnTick, and the race condition is gone. And I think we can also get rid of the other mutex (which locks adding external subs): Get the current offset at the start of AddExternalSubtitle and load the sub with that offset. When the sub is loaded (and main mutex is locked), we check if the current offset has changed. If it has changed, we now call SetOffset on the sub with the actual value. Now everything should be threadsafe, without any added locking or async methods.
The solution you propose would sure work. But it also adds quite some overhead, and it forces us to make the set method async.
One more benefit from my solution: It would allow us to add multiple external subs in one run (in parallel). With the current or your proposed solution, only one sub will be added at any time, due to the newly introduced mutex lock.

Well, for loading multiple subs in parallel, I am not sure. If that happens we expose to other thread races... I.e changes in the config class. And the parsing of a subtitle is IO intensive, and i doubt someone would expect to do it in parallel. Most people would keep their media files on hard disk drives, and loading 2 in parallel would expose be slower than 2 one after the other.
The problem with moving the offset to on tick is that we cannot pass arguments to that event handler, so we will need some kind of global state, which means we have to lock anyway.
And all of this is actually done on the UI thread anyway so it is not true parallelism. The overhead is minimal. In fact, I think updating each sub track 1 by 1 is probably the best way. Right now we flood the UI thread with several dispatcher timers. On slower CPUs this might cause freezes.
I will give some more thought about it.

I think my solution will be simple and thread safe. Maybe I did not describe it very well. I think I will just implement it (maybe on other branch), then we can discuss on that. Using OnTick is only really needed for a sub that is actually showing. All others can update directly.

If you have time you can push it here and we can undo the conmit if it destroies the universe.
If not, i will try it in the evening.

Ok I just pushed my changeset. The main difference for the race condition is setting the currentDelay only in OnTick, after it has really been applied. Now it does not matter how often Set method is called. OnTick will always have the actual current delay, and the latest new delay, so calculations are correct and output is right.
I have also done the other changes I mentioned. Current delay is initialized in the constructor with the value that was used when creating the external MSS parser. If the delay has changed while we were parsing the stream (which is very unlikely), SetDelay is called again before the sub is added. So streams are always added with latest delay, even if delay changes inbetween.

Ah I see what you mean now.
Yes, this make sense. But I still think there would be a race in AddExternalSubtitleAsync when we copy the config from the main instance to the subConfig. I say we should lock it...just that particular region.

Actually, that might not be so much of a problem. Users should expect to have weird results when doing parallelism like that with subtitles and different encoding/properties for each file. It is a niche case anyway.

Even a lock would not help much, since we do not lock anything on config value changes. If people modify the config instance after it has been passed into the MSS constructor, while other async actions (or playback) are running, the behavior will always be a bit unpredictable.

Ok cool. Thanks for that commit. I am now handling the merge and other review issues. I really didn't have time today until now.

So I removed the autoresetevent class.
Renamed the "offset" to "delay"
Fixed the problem with negative duration cues. That one took some doing, sadly we cannot use either winRt Map or std::map to store the cue to duration pair, so I ended up using a vector

Cool, this looks good!
Yesterday I have been thinking if we can inherit ExternalSubtitleProvider from SubtitleProvider and move the delay stuff into SubtitleProvider. Then, it would automatically work for embedded subs as well, and in the MSS class we would not have to differentiate between embedded and external subs (and have them all in the same list). I will try this in the evening (don't know if it really is a good idea - let's see).

I thought about that when i created the class, but I decided it is too complicated.

When I started moving the sync code into main SubtitleProvider class I realized we do not even need the ExternalSubsParser. See my latest changeset! I directly put the original SubtitleParser from external MSS into main MSS and things work very well.

Cool. Nice catch. Just by eye-balling it, I think we need to do some detaching of references though, for example, the FrmpegReader is still referenced from the extractor MSS.

Good point. I added detach code and I can confirm that reader and external mss instances are destroyed as soon as the external sub is loaded.

Looks good!

Are we good for merge, or shall we give this some more time for testing?

I think we are good.


[E2E framework] Optimise the writing of E2E tests for Smart Contracts

Open PR: https://github.com/hashgraph/hedera-services/pull/2913


Add deleSMS function with flag

will enable more delete option
example 1,4 delete all SMS from the storage area

Thank you!


AWS EBS volume data is deleted in certain cases

Hello!
Kubernetes sometimes deletes all data from my EBS backed volume. Given a controller like so:
apiVersion: v1
kind: ReplicationController
metadata:
  labels:
    name: nginx
  name: nginx
spec:
  replicas: 1
  selector:
    name: nginx
  template:
    metadata:
      labels:
        name: nginx
    spec:
      containers:
      - image: nginx
        name: nginx
        volumeMounts:
        - name: nginx-store
          mountPath: "/var/nginx"
      volumes:
      - name: nginx-store
        awsElasticBlockStore:
          volumeID: aws://REGION/VOLUME_ID
          fsType: ext4

One would expect data in "/var/nginx" to persist, however, it doesn't appear to persist when the pod moves between hosts.
Running kubectl stop pod nginx-ID works most of the time, but when the pod moves between hosts I see an event like so:
Thu, 09 Jul 2015 20:02:57 +0000   Thu, 09 Jul 2015 20:02:57 +0000   1         nginx-f26t2   Pod                                                         failedSync         {kubelet REDACTED}   Error syncing pod, skipping: Error attaching EBS volume: VolumeInUse: VOLUME_ID is already attached to an instance
                                  status code: 400, request id: []
Thu, 09 Jul 2015 20:02:57 +0000   Thu, 09 Jul 2015 20:02:57 +0000   1         nginx-f26t2   Pod                 failedMount   {kubelet REDACTED}   Unable to mount volumes for pod "nginx-f26t2_default": Error attaching EBS volume: VolumeInUse: VOLUME_ID is already attached to an instance

The interesting part is that the EBS volume does re-attach to the system the pod is moving to and it does mount properly - it just has no data in it when it is mounted (as if its been rm -rfed)
I am learning Go and eager to grok the Kubernetes codebase a bit, so I wanted to take a stab (more of a wild guess). My suspicion is this code: https://github.com/GoogleCloudPlatform/kubernetes/blob/530bff315ff034d0c9098004f35f01d26ab40aaa/pkg/cloudprovider/aws/aws.go#L1316-L1322
It seems to me that if we receive an error message we return, which prevents us from reaching waitForAttachmentStatus. I get the feeling this causes a race wherein the new pod boots up while the volume is being attached. This would account for my seeing this fairly rarely. It seems to me Kubernetes should block the entire pod creation process while it waits for the disk to be mounted to the correct Node. Instead, it sees the AWS failure and continues on its way.
Any thoughts? Thanks for your time!

/cc @brendandburns

Ouch; if this is correct this is both bad and indicates a fairly important missing e2e test!

We should have an e2e test for this, I'm working on one here: #11128.  So far I haven't been able to reproduce the problem.
The events in kubectl describe aren't necessearily a problem (but it is very helpful to see them, so thank you!).  It takes a while to detach the volume from the old host, but kubernetes will likely reschedule the pod before that is complete.  We would expect to see the pod fail to start until the volume has been released, and it makes sense that we would see those events.
This assumes that we don't actually start the pod until the volume is correctly mounted.  If (as you suggested) we are somehow starting the pod without the volume being mounted, we would see this problem.  Another hypothetical: if we are forcibly detaching or shutting down the pod and it isn't flushing to EBS, we might see data loss there.  But so far I have yet to find these problems.
Similarly, as long as we return an error from AttachVolume, I would expect the pod to fail to start.  Kubernetes should retry until AttachVolume succeeds.  I'm verifying that is indeed the case.  But (as long as everything works as I understand it) there shouldn't be a problem as long as we don't silently ignore errors in AttachVolume.
@erulabs Can you provide some more information about what files are on '/var/nginx', and what behaviour you see when the data is there vs is not there?

@justinsb I apologize - I was traveling right after reporting this bug and haven't gotten back to it - I'm going to try to recreate on the newest release (This bug was on r19). While it did occur to me twice (once with a Jenkins installation and another time with just a few test text files (the /var/nginx) example. It's possible this was me getting unlucky with AWS or the host boxes, and this time I'll do a deeper dive into the host nodes themselves if it happens again.
Thanks for the test :D I'll close this issue if thats OK, and re-open if I can recreate reliably on the newest release. After reading a bunch of your AWS/EBS code, I'm starting to lean toward blaming cloud infrastructure rather than the handling code.


fix(state): Avoid panicking on state errors during shutdown

Motivation
Zebra can panic if there's a disk error during shutdown, but there's nothing we can do about that error anyway.
Specifications
https://docs.rs/rocksdb/latest/rocksdb/struct.DBCommon.html#method.flush
https://docs.rs/rocksdb/latest/rocksdb/struct.DBCommon.html#method.flush_wal
Complex Code or Requirements
This is concurrent code, but this PR just updates error handling and comments.
Solution

Ignore errors during state shutdown and just log them
Document the different ways we've tried to handle database shutdown
Add the macOS shutdown crash to the README known issues

Testing
This is covered by existing state tests.
Review
This is a low priority cleanup.
Reviewer Checklist

[ ] Will the PR name make sense to users?

[ ] Does it need extra CHANGELOG info? (new features, breaking changes, large changes)

[ ] Are the PR labels correct?
[ ] Does the code do what the ticket and PR says?

[ ] Does it change concurrent code, unsafe code, or consensus rules?

[ ] How do you know it works? Does it have tests?

Follow Up Work
Fix the actual shutdown bug.

@mergifyio update


Wont even Let me Submit my name/The server won't connect.

No Matter how much I change my name, whenever i submit, nothing happens, and not only that, no matter how much I refresh the page, it just wont connect.

Open the console. Is there an error? If it is 403, you are IP banned. This could be a cause of breaking the rules or using an IP address with a bad score (e.g. public wifi, or a VPN).

reach out to me or a mod on discord for this issue

reach out to me or a mod on discord for this issue


MC API changed no longer getting MC.

Work in Progress to fix

Fixed finished with a new version of the solution, simpler to install.
looking for someone to test it.

Hi Eric! How are you !
Thanks for this solution ! I'll tried to fix it myself, but I will blocked on JSON format.
Where can I found the new version for test it !

Doing good thanks,
Actually I have the updated version on my side but looking for someone to test it before publishing.
It is a major revemp as it is a PowerPlatform solution (easier to import) with a flow to create the SPO lists 😊
Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows

From: Ancel-1 @.>
Sent: Friday, March 18, 2022 10:30:47 AM
To: ericsche/MCinTeams @.>
Cc: Eric Scherlinger @.>; Assign @.>
Subject: Re: [ericsche/MCinTeams] MC API changed no longer getting MC. (Issue #3)
Hi Eric! How are you !
Thanks for this solution ! I'll tried to fix it myself, but I will blocked on JSON format.
Where can I found the new version for test it !
—
Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fericsche%2FMCinTeams%2Fissues%2F3%23issuecomment-1072232525&data=04|01||87931e8ff80f48f1119408da08c1fc3a|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637831926489776475|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000&sdata=pjFptyVDGm%2BU84bhzSExTZGD7%2F0KGrmwuxxuvY%2BiDZM%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAIP3UEBTJ6NLUNOXXHNCW23VAREMPANCNFSM5MD66PCA&data=04|01||87931e8ff80f48f1119408da08c1fc3a|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637831926489776475|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000&sdata=Rpt8WdzLq6z2TZ4Ickde1qcX8FQIM0AgOcyTdf15fxE%3D&reserved=0.
Triage notifications on the go with GitHub Mobile for iOShttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04|01||87931e8ff80f48f1119408da08c1fc3a|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637831926489776475|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000&sdata=5gmDHQs7%2BZoZ0xjTIL0ds6uZSjPsQjN9cLjoXd2WbYU%3D&reserved=0 or Androidhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04|01||87931e8ff80f48f1119408da08c1fc3a|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637831926489776475|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000&sdata=nmasFZmEpj1RxchQREemtlUM3%2FxC5yb8fMys6jcvHiI%3D&reserved=0.
You are receiving this because you were assigned.Message ID: @.***>

If you're looking for someone to test I want to be that person.
I strongly use the first version you gave me and I admit that a new one would be great :)

Cool !
Lets make that happen.
Let me send you a private message so we can secure some time.
Might not be next Week but the Week after.
Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows
From: @.>
Sent: Friday, 18 March 2022 14:42
To: @.>
Cc: Eric @.>; @.>
Subject: Re: [ericsche/MCinTeams] MC API changed no longer getting MC. (Issue #3)
If you're looking for someone to test I want to be that person.
I strongly use the first version you gave me and I admit that a new one would be great :)
—
Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fericsche%2FMCinTeams%2Fissues%2F3%23issuecomment-1072423414&data=04|01||2b1a5f49695c440c872408da08e52aa5|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637832077593934447|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000&sdata=tR5cvNi6kwlNpfru%2BbQZuM8dIhJl45KBMjcUaOQoTQA%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAIP3UEFM6AFIGJHRZNJNLYTVASB43ANCNFSM5MD66PCA&data=04|01||2b1a5f49695c440c872408da08e52aa5|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637832077593934447|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000&sdata=Hzy4VnctPUM63kSaP6ys7oGE4tuwfze0Qqy8IhE5sDU%3D&reserved=0.
Triage notifications on the go with GitHub Mobile for iOShttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04|01||2b1a5f49695c440c872408da08e52aa5|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637832077593934447|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000&sdata=cbPzdRBV793QncKIPmgXt7RdtnaGpOxligwvoh9Iq1I%3D&reserved=0 or Androidhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04|01||2b1a5f49695c440c872408da08e52aa5|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637832077593934447|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000&sdata=7yvOzXehna4MnoW4SgdUs8GvSUN6EsD%2BEpyHxQXHLF8%3D&reserved=0.
You are receiving this because you were assigned.Message ID: @.***>

Can't find how to send a private message do you mind sending me and email to ericsche [at] microsoft.com ?

Hi you know already 😉
You Can join me at<EMAIL_ADDRESS>

Hi Eric,
Did you receive my emails to test your application?

Closing issue this is fixed by version 2.


Migrate @tanstack/react-query to v5

https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5

when use useObservableQuery I will be encountered queryClient.defaultQueryOptions is not a function error

Would somebody be able to submit a PR to migrate it? I'm currently quite swamped with a big project to improve computed and persistence, and I don't use Query myself so it's a bit tough for me to test it correctly.
I think we should have plugins for both v4 and v5 to maintain compatibility?
We're planning to deprecate useObservableQuery soon to favor the persistPluginQuery persistence plugin, so let's focus the efforts on upgrading persistPluginQuery.

Any progress on this? Would be really great to see this added.

Thanks for the bump! I've been focused on getting the 3.0 update ready so I haven't had a chance to dig into the PR yet. I just replied to it - basically I'm concerned about breaking users of v4 by using v5 APIs, so if we can clear that up I'm very happy to merge it :)

I just released version 3.0 alpha which has a new much better sync system which may fully solve remote sync so you don’t need Query. And it also includes a new Query plugin, and set it up to work with Query v5. See:
Docs of the new sync system: https://legendapp.com/open-source/state/v3/sync/persist-sync
Docs of the Query plugin: https://legendapp.com/open-source/state/v3/sync/tanstack-query/
Does that work well for you? Please let me know if it needs any futher improvements.


window

I'm submitting a...

[ ] Bug report
[ ] Feature request
[ ] Documentation issue or request

In package

[ ] @ng-toolkit/init
[ ] @ng-toolkit/serverless
[ ] @ng-toolkit/universal
[ ] @ng-toolkit/pwa
[ ] @ng-toolkit/firebug

Current behavior

Expected behavior

Minimal reproduction of the problem with instructions

Example repository

What is the motivation / use case for changing the behavior?

Environment

Angular version: X.Y.Z

- Node version: XX
- Platform:

Others:

same as #681

Closed as invalid issue. Please, fill the issue template when opening new issues in order to help us track the bug.


Conditional Put doesn't seem to respect any attr beside the Sort Key

I'm using DDBTB v1.3.7. I'm attempting to conditionally write to the database using the attr options. My schema is defined as such:
const pairScema = schema({
  pk: string().key(),
  id: string().key(),
  userId: string().required(),
  code: string().required(),
}).and((_prevSchema) => ({
  SK0: string()
    .key()
    .link<typeof _prevSchema>(({ id }) => calcSK0(id)),
  SK1: string().link<typeof _prevSchema>(({ userId }) =>
    calcSK1(userId),
  ),
}));

In my case, I'm attempting to insert the pair into my entity on two conditions:

The id doesn't already exist
The userId doesn't already exist.

I cannot get the second condition to prevent a put operation if it already exists. I.e. If I attempt to prevent an insertion based on an arbitrary value (but with a different id), the operation succeeds and I get two values inserted into my DB.
The code in question is:
const options: Record<string, Condition> = {
  condition: {
    attr: 'userId',
    exists: false,
  },
};

await this.entity
  .build(PutItemCommand)
  .item(pair.toJSON())
  .options(options)
  .send();

where this.entity is an entity defined elsewhere and pair is an object that serializes to the schema above when toJSON is called.
I'll note that if I set exists to true above, The initial insertion fails (i.e. fails if the attr doesn't exist). Now, if I use the following condition:
{
  attr: 'SK0',
  exists: false,
}

The condition will fail as expected. I'm not sure if I'm missing something or if this is a bug.

So, looks like it's a DynamoDB thing:
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.ConditionExpressions.html#Expressions.ConditionExpressions.PreventingOverwrites
Seems that this conditional write operation only supports primary keys. Is there any confirmation that this is correct?

Hi @methompson !
I don't think this is correct. As far as I know, you can use conditions on any attribute within a PutItem.
I'm not sure I understand the issue correctly. You are building the following PutItemCommand:
const command = this.entity
  .build(PutItemCommand)
  .item(pair.toJSON())
  .options({
    condition: {
      attr: 'SK0',
      exists: false,
    }
  });

And it doesn't prevent overriding a pre-existing item that doesn't have a SKO attribute ?
Can you log the result of the command params ? console.log(command.params()) ?

@ThomasAribart No, if I use the code that you've quoted, that works as intended. I.e. if the SK0 value does not exist, it will PUT. If it does exist in another item, it will fail (and throw an error).
I've found that other attributes in the same condition doesn't seem to work as expected.
For instance,
const command = this.entity
  .build(PutItemCommand)
  .item(pair.toJSON())
  .options({
    condition: {
      attr: 'userId',
      exists: false,
    }
  });

will allow me to write a new item if the userId attribute exists in another item. Oddly enough, if I set exists: true, it will fail as expected. I'm testing these against our AWS account and confirming that not only is the code not throwing an error, but I'm finding two items in our DB rather than one.
Later today, when I'm back at my desk for work, I will work up a full-fledged example that should illustrate the problem.

@methompson Ok, that sounds really weird to me. The condition cannot be evaluated against an item with another primary key. Or we have found a bug in DynamoDB itself 😅
Can you log the params to inspect the query? Simply console.log(command.params()). It might be an issue with your toJSON() method.

@methompson Any update on this?

@ThomasAribart I apologize, priorities at work have shifted and I have to concentrate on another thing. When I get back to my AWS v3 conversion, I can provide a full-fledged example.

Ok, closing this issue for the moment for house keeping!


fix: Bind keyboard events to the current  excalidraw container

fixes https://github.com/excalidraw/excalidraw/issues/3405
Also fixes handling keyboard events for individual excalidraw container when multiple excalidraw rendered

[ ] Keyboard shortcuts are no more binded after modal rendered so fix it.
[ ] update changelog

Was trying to break it and in the process fixed some cases.

I'm ambivalent about 2c8ec6b (#3430) — on one hand it's good that the modal is specific to the component, on the other hand it effectively isn't a modal: at least not a modal for the host app, only only for the excalidraw component. May be ok for some use cases while not for the others (both in terms of UX and UI).

We need to disable focus outline on the containers we've added tabIndex to:

excalidraw:

modals:

More cases:

[ ] focus the container after installing library
[ ] focus on error dialog close
[ ] focus on clear-library alert dialog confirm (not sure why other alert dialogs work, or hitting cancel)

I bet there will be other cases. And we need to test other browsers.

[ ]  focus the container after installing library
it's focussing on body and the next tab will go to the library popup which should be fine?

[ ]  focus on error dialog close
It does focus on the error dialog close button when custom error dialog is rendered coz of autofocus attribute, which case it's not doing it?

[ ]  focus on clear-library alert dialog confirm (not sure why other alert dialogs work, or hitting cancel)
This is an issue in prod as well so wanted to fix this along with some other A11y fixes in a separate PR.

it's focussing on body and the next tab will go to the library popup which should be fine?

What do you do you mean by next tab? Manually having to press tab? We should focus the editor automatically as we do with other cases so people don't have to tab.

It does focus on the error dialog close button when custom error dialog is rendered coz of autofocus attribute, which case it's not doing it?

I mean after you close the dialog. May not affect all error dialogs, haven't checked.

This is an issue in prod as well so wanted to fix this along with some other A11y fixes in a separate PR.

But prod doesn't introduce this PR's a11y regression. But sure, we can withstand a small period where it doesn't work correctly.

I'd still name bindKeyGlobally differently as this isn't descriptive. Calling it handleKeysGlobally should be fine.

I'd still name bindKeyGlobally differently as this isn't descriptive. Calling it handleKeysGlobally should be fine.

handlKeysGlobally sounds more like a callback since it starts with handle (maybe it's just me), lets name it as shouldHandleKeysGlobally instead?

IMO it comes down to context. A verb* naming can be used both for booleans and methods, and we already do it e.g. with detectScroll: boolean. Usually, handlers use  on* scheme (which we again do for our public API, unlike in our codebase for some reason).
Ultimately, you have a intellisense (even if you don't use TS), and even if not, users won't randomly use props without reading the docs first.
Whatever we do, I'd not use should* as that is unnecessary and we don't use this for other props.
I just wanted to use something short, but descriptive. bindKeyGlobally is weird: what key? Bind how?
I'd maybe correct myself and use handleKeyboardGlobally since keys is ambiguous again.


Add GitHub Workflow for Testing of Developer Push

Run linux and windows build/test on developer push.
The workflow will run a job on each OS.  Secrets can be passed to set the git config values that some of the tests check for.

It appears git config/options do not allow leading whitespace in GIT_CONFIG_PARAMETERS.  While that may be desirable, a PR will be opened to pass in a dummy config parm.  Jobs with no secrets are failing.
@dscho Any interest in having git handle leading whitespace in the env var?

@dscho Any interest in having git handle leading whitespace in the env var?

The GIT_CONFIG_PARAMETERS variable is actually intended to be internal to Git, so what we do here is basically a hack and we have to play by Git's rules, i.e. not have leading whitespace.
In other words, I think we will have to convert https://github.com/gitgitgadget/gitgitgadget/blob/e36bd5e0674bb1902eb55ce154e0db4b80456306/.github/workflows/pr-test.yml#L77 so that it looks more like https://github.com/gitgitgadget/gitgitgadget/blob/e36bd5e0674bb1902eb55ce154e0db4b80456306/.github/workflows/pr-test.yml#L68

we have to play by Git's rules, i.e. not have leading whitespace.

I opened pr #302 so a leading value is always present in GIT_CONFIG_PARAMETERS.  Otherwise there is still the problem of having a space between the two sets - needed if the first set is valued and not needed if the first set is not valued.  I'm not seeing a simple way to handle it (not saying there isn't one - it is just not obvious to me).


Process creation does not log event ID 4688 correctly

Please use the following bug reporting template to help produce actionable and reproducible issues. Please try to ensure that the reproduction is minimal so that the team can go through more bugs!

A brief description
Creating a new process within the Linux subsystem causes an incomplete Process Creation event (ID 4688) to be added the Security event log. The New Process Name and Process Command Line fields are blank.

Expected results
Creating a new process within the Linux subsystem should log the same quality of information as normal Windows process creation. New Process Name should be the full pathname to the process, and Process Command Line should be the command line.

Actual results (with terminal output if applicable)
Here is an excerpt from the XML view of a Linux subsystem Process Creation event:

<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-Security-Auditing" Guid="{54849625-5478-4994-A5BA-3E3B0328C30D}" />
    <EventID>4688</EventID>
    <Version>2</Version>
    <Level>0</Level>
    <Task>13312</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8020000000000000</Keywords>
    <TimeCreated SystemTime="2017-02-23T01:23:45.678901234Z" />
    <EventRecordID>21272</EventRecordID>
    <Correlation />
    <Execution ProcessID="4" ThreadID="8916" />
    <Channel>Security</Channel>
    <Computer>DESKTOP-XXXXXXX</Computer>
    <Security />
  </System>
  <EventData>
    <Data Name="SubjectUserSid">S-1-5-21-XXXXXXXX-XXXXXXXX-XXXXXXXX-1001</Data>
    <Data Name="SubjectUserName">XXXXXXXX</Data>
    <Data Name="SubjectDomainName">DESKTOP-XXXXXXX</Data>
    <Data Name="SubjectLogonId">0x214XXX</Data>
    <Data Name="NewProcessId">0x2470</Data>
    <Data Name="NewProcessName" />
    <Data Name="TokenElevationType">%%1938</Data>
    <Data Name="ProcessId">0x24a8</Data>
    <Data Name="CommandLine" />
    <Data Name="TargetUserSid">S-1-0-0</Data>
    <Data Name="TargetUserName">-</Data>
    <Data Name="TargetDomainName">-</Data>
    <Data Name="TargetLogonId">0x0</Data>
    <Data Name="ParentProcessName">bash</Data>
    <Data Name="MandatoryLabel">S-1-16-8192</Data>
  </EventData>
</Event>

Your Windows build number
14393.693

Steps / All commands required to reproduce the error from a brand new installation

Using the Local Group Policy Editor, under Computer Configuration -> Windows Settings -> Security Settings -> Local Policy -> Audit Policy, enable Audit Process Tracking.
Run any Windows program, e.g. notepad.exe.
In the Event Viewer, check the Security log for a Process Creation event (filter by ID 4688) corresponding to that program.
Open a Linux subsystem bash prompt, and run any command that will create a new process, e.g. vim.
In the Event Viewer, check the Security log for a corresponding Process Creation event. This can be identified where the Creator Process Name is bash. In this event, both the New Process Name and Process Command Line will be blank.

Strace of the failing command
Running the command using strace -e execve confirms that the system call is being made to execute a program.

Required packages and commands to install
Nothing other than the Linux subsystem itself.

See our contributing instructions for assistance.

We have made significant changes to process notifications since Windows 10 Anniversary Update.  Please see this blog for more information: https://blogs.msdn.microsoft.com/wsl/2016/11/01/wsl-antivirus-and-firewall-compatibility/


ESP32 compatibility

Hi Pierre- Great job with these new ACAN2515 and ACAN2517 drivers! Most other MCP2515/2517 drivers seem to be lacking in various areas, but your ACAN drivers look excellent and very easy to use. Im looking forward to experimenting with them.
One question I had was regarding Espressif ESP32 compatibility. The Arduino ESP32 SPI drivers are a bit different in that they do not support the spi.usingInterrupt function. When I compile the ACAN2515/2517 test programs for ESP32, the compiler gives an error because the "usingInterrupt" does not exist in ESP32.
Just as a quick experiment, I modified your source files (ACAN2515.cpp/ACAN2517.cpp) and commented out line 156 "mSPI.usingInterrupt (itPin)".
On my work bench here with an MCP2517 development board (MCP2517 with a 20Mhz Ceralock resonator), with that mSPI.usingInterrupt line removed, the ACAN2517 driver initializes "ok", and it does send out CAN messages correctly. It does NOT receive any messages correctly though.
My tests were done with low speed single-wire CAN (33.333k) used on some GM/Opel/Saab vehicles, with a TH8056 single-wire-CAN transceiver connected to the MCP2517.
I could not make it send or receive with traditional 500k CAN. Perhaps something wrong with oscillator settings or my use of a 20MHz resonator and not a true 40MHz crystal?
I assume the receiving problem was due to the ACAN driver not correctly using the interrupt trigger from the MCP2517 due to the fact that I removed the usingInterrupt function.
Do you have any ideas on how to modify the driver to work correctly with the ESP32's SPI hardware?
Thanks
Ben

Hi Ben,
Thank you for your message, it's nice to have thanks.

I could not make it send or receive with traditional 500k CAN. Perhaps something wrong with oscillator settings or my use of a 20MHz resonator and not a true 40MHz crystal?

I did not try a 20MHz resonator, but I think it will work.
I didn't use my driver with ESP32, I did not known that mSPI.usingInterrupt is not implemented.
On arduino, this function enables mSPI.beginTransaction to mask interrupts when called in user code. So only removing this line makes the driver buggy.
The workaround is to manually mask interrupt when needed.
Fortunatly (for us), the Teensy software has a bug, that requires to manually mask interrupt.
So take a look in ACAN2517.cpp to the tryToSend method: just remove conditional compilation for allways mask and unmask interrupts :
bool ACAN2517::tryToSend (const CANMessage & inMessage) {
noInterrupts () ;
mSPI.beginTransaction (mSPISettings) ;
bool result = false ;
if (inMessage.idx == 0) {
result = enterInTransmitBuffer (inMessage) ;
}else if (inMessage.idx == 255) {
result = sendViaTXQ (inMessage) ;
}
mSPI.endTransaction () ;
interrupts () ;
return result ;
}
I hope that will solve the issue. If it works for the ACAN2517.cpp, il will work for the ACAN2515.cpp.
Best regards,
Pierre

Le 27 nov. 2018 à 19:55, btdieselworks<EMAIL_ADDRESS>a écrit :
Hi Pierre- Great job with these new ACAN2515 and ACAN2517 drivers! Most other MCP2515/2517 drivers seem to be lacking in various areas, but your ACAN drivers look excellent and very easy to use. Im looking forward to experimenting with them.
One question I had was regarding Espressif ESP32 compatibility. The Arduino ESP32 SPI drivers are a bit different in that they do not support the spi.usingInterrupt function. When I compile the ACAN2515/2517 test programs for ESP32, the compiler gives an error because the "usingInterrupt" does not exist in ESP32.
Just as a quick experiment, I modified your source files (ACAN2515.cpp/ACAN2517.cpp) and commented out line 156 "mSPI.usingInterrupt (itPin)".
On my work bench here with an MCP2517 development board (MCP2517 with a 20Mhz Ceralock resonator), with that mSPI.usingInterrupt line removed, the ACAN2517 driver initializes "ok", and it does send out CAN messages correctly. It does NOT receive any messages correctly though.
My tests were done with low speed single-wire CAN (33.333k) used on some GM/Opel/Saab vehicles, with a TH8056 single-wire-CAN transceiver connected to the MCP2517.
I could not make it send or receive with traditional 500k CAN. Perhaps something wrong with oscillator settings or my use of a 20MHz resonator and not a true 40MHz crystal?
I assume the receiving problem was due to the ACAN driver not correctly using the interrupt trigger from the MCP2517 due to the fact that I removed the usingInterrupt function.
Do you have any ideas on how to modify the driver to work correctly with the ESP32's SPI hardware?
Thanks
Ben
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub https://github.com/pierremolinaro/acan2517/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/ASys1BpI4kh2EFwyf2Za3w8QmL7J3w1-ks5uzYqpgaJpZM4Y2IHs.

Can you help me with setting bautrate registers for sending at speed 33,333kb for opel.
What values i have to write to registers
BRP
SEG1
SEG2
SJW
Thanks

Hello,
You do need to write theses registers directly, the library computes the values from your speed (33,333kb) and the frequency  of the clock that drives the MCP2517FD.
Just open the LoopBackDemoESP32.ino and set :
- the first argument according the clock (here ACAN2517Settings::OSC_4MHz10xPLL),
- the second argument to your speed.
ACAN2517Settings settings (ACAN2517Settings::OSC_4MHz10xPLL, 33333) ;
settings.mRequestedMode = ACAN2517Settings::InternalLoopBack ; // Select loopback mode
const uint32_t errorCode = can.begin (settings, [] { can.isr () ; }) ;
if (errorCode == 0) {
Serial.print ("Bit Rate prescaler: ") ;
Serial.println (settings.mBitRatePrescaler) ;
Serial.print ("Phase segment 1: ") ;
Serial.println (settings.mPhaseSegment1) ;
Serial.print ("Phase segment 2: ") ;
Serial.println (settings.mPhaseSegment2) ;
Serial.print ("SJW:") ;
Serial.println (settings.mSJW) ;
Serial.print ("Actual bit rate: ") ;
Serial.print (settings.actualBitRate ()) ;
Serial.println (" bit/s") ;
Serial.print ("Exact bit rate ? ") ;
Serial.println (settings.exactBitRate () ? "yes" : "no") ;
Serial.print ("Sample point: ") ;
Serial.print (settings.samplePointFromBitStart ()) ;
Serial.println ("%") ;
}else{
Serial.print ("Configuration error 0x") ;
Serial.println (errorCode, HEX) ;
}
The serial prints that follow shows in the monitor the computed settings :
Bit Rate prescaler: 4
Phase segment 1: 239
Phase segment 2: 60
SJW:60
Actual bit rate: 33333 bit/s
Exact bit rate ? no
Sample point: 80%
No error, although the actual speed is slightly different. So : BRP = 4, PS1=239, …
Note, if you want to directly the registers, you should write theses values minus one.
Regards,
Pierre Molinaro

Le 14 oct. 2019 à 10:36, Piter2004<EMAIL_ADDRESS>a écrit :
Can you help me with setting bautrate registers for sending at speed 33,333kb for opel.
What values i have to write to registers
BRP
SEG1
SEG2
SJW
Thanks
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub https://github.com/pierremolinaro/acan2517/issues/1?email_source=notifications&email_token=AEWKZVERDV7GI27I54DZBV3QOQVRFA5CNFSM4GGYQHWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBDXQOI#issuecomment-541554745, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEWKZVDKUW3TQC6NQYV3W5LQOQVRFANCNFSM4GGYQHWA.


CLI args for script

Allow to pass command-line arguments to script, e.g. scripts/script.py argument1 {params.argument2}
Why?
shell rules can be used for passing CLI arguments to scripts, however when importing a module from a remote code repository, paths to the shell scripts are not resolved. Using script, the path is resolved. For some use cases, CLI arguments are preferable to the snakemake object (keep option to run script standalone) or reading in a config file from the script (e.g. foreach rules).
See related discussion on stackoverflow
How?
The script path is split at the first space, the second part is added as-is to the script execution command.
Possible issues

spaces in script filenames won't work, even if quoted.
?

QC

[X] The PR contains a test case for the changes or the changes are already covered by an existing test case.
[X] The documentation (docs/) is updated to reflect the changes or this is not necessary (e.g. if the change does neither modify the language nor the behavior or functionalities of Snakemake).

Docs:  The correct version for this update should be edited

Summary by CodeRabbit

New Features

Introduced the ability to pass command-line arguments to scripts within the Snakemake framework, enhancing script flexibility and usability.
Added new rules to handle command-line arguments in both R and Python scripts, expanding workflow capabilities.
Implemented a command-line interface in a new R script for parsing and handling user inputs.

Bug Fixes

Improved handling of script paths with spaces to ensure proper execution of command-line arguments.

Documentation

Updated documentation to reflect new command-line argument features and usage examples.

Closing this, as the same functionality can be reached using shell in combination with a parameter for the script with wokspace.path(path/to/script) see docs


resourceapply: fix event helpers messages

@sttts @deads2k noticed i returned wrong order, this is just fixing that... seft-lgtm so I can pick it up in bumps.


Added composer.json

Hello,
thank you for creating this pull request.
I have opened an issue on our Issue Tracker for you. See the issue link: https://issues.shopware.com/issues/PT-8261.
Please use this issue to track the state of your pull request.

thanks for your contribution @shyim :+1:
the change will be merged soon

merged with 34016dafcbead4c0f94ee50722ae405e220bafcc


Testing, ignore this PR

Hi @ajay-arora, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!

It looks like you're working at Microsoft (ajarora). If you're full-time, we DON'T require a contribution license agreement.

If you are a vendor, DO please sign the electronic contribution license agreement. It will take 2 minutes and there's no faxing! https://cla.azure.com.

TTYL, AZPRBOT;


Post Studio :: No photos / no access granted state

Need to identify copy for when a user has no photos to populate at the end of the studio / did not allow access to photos

@kperusko FYI in the latest build I allowed push notifications but was not prompted for photo access. Not sure if that's just because it wasn't pushed yet.

@kperusko to clarify the steps at this point are:
*Allow the app access to photos
*Open camera
*Take photo
*Save to Design Studio Album --> Is this automatically created when there are no photos?
Would like to confirm so the corresponding copy is accurate.

@younglisa you probably already gave the access to the photo gallery, and app will only ask you once (if you uninstall the app, the settings are stored 24h so you'll have to clear privacy settings).
The steps above are accurate, but folder is created only if you start taking pictures from within the app.

@kperusko so if you are at the end of the studio and have not taken any photos, but decide to do it all at the end, those photos will NOT show up in the gallery view because the folder will not have been created?
Feel like that is a potential issue.

@younglisa talked with @sshaar08 and Francia - we're going to create a folder/ask for permissions when they open the app for the first time.

@kperusko that makes sense, thanks! Will think about copy.

What if for this error state we leverage the other message and add a line to denote the additional instructions? @brooklynchuck thoughts?
Header (whatever the current one is think it's:) Oops...no photos!
Body:
Photograph your groups' results now to automatically save them with this studio template. Share the brilliance. Take a bow.
Tip: Be sure to allow the app access to your photos and save them to the Design Studio Express album for easier access.

sorry, i'm not completely understanding the flow on this. that's my fault! Lisa, can I ask you for 5 minutes to explain it to me in person?
C:
--
Chuck Wells
Copywriter/CD
646.320.5657
Ai |  alexanderinteractive.com

From: younglisa<EMAIL_ADDRESS>Sent: Monday, December 21, 2015 11:17 PM
To: aiaio/DesignStudioExpress
Cc: Chuck Wells
Subject: Re: [DesignStudioExpress] Post Studio :: No photos / no access granted state (#82)
What if for this error state we leverage the other message and add a line to denote the additional instructions? @brooklynchuckhttps://github.com/brooklynchuck thoughts?
[https://avatars1.githubusercontent.com/u/15159569?v=3&s=400]https://github.com/brooklynchuck
brooklynchuck (brooklynchuck)https://github.com/brooklynchuck
github.com
Follow brooklynchuck on GitHub and watch them build beautiful projects.
Header (whatever the current one is think it's:) Oops...no photos!
Body:
Photograph your groups' results now to automatically save them with this studio template. Share the brilliance. Take a bow.
Tip: Be sure to allow the app access to your photos and save them to the Design Studio Express album for easier access.

Reply to this email directly or view it on GitHubhttps://github.com/aiaio/DesignStudioExpress/issues/82#issuecomment-166501709.

IF NO PERMISSION
Header: Photos need your permission!
Body: Open iPhone Settings and tap on Design Studio Express. Allow app to access your photos. Take photos using camera as normal and save in new "DSX Photos" folder.
IF PERMISSION, BUT NO PHOTOS
Header: What? No photos?
Body: You'll want a visual record later to see how you solved your design challenge, or share with the team. Take photos using camera as normal and save in the "DSX Photos" folder.
--
Chuck Wells
Copywriter/CD
646.320.5657
Ai |  alexanderinteractive.com

From: younglisa<EMAIL_ADDRESS>Sent: Monday, December 21, 2015 11:17 PM
To: aiaio/DesignStudioExpress
Cc: Chuck Wells
Subject: Re: [DesignStudioExpress] Post Studio :: No photos / no access granted state (#82)
What if for this error state we leverage the other message and add a line to denote the additional instructions? @brooklynchuckhttps://github.com/brooklynchuck thoughts?
Header (whatever the current one is think it's:) Oops...no photos!
Body:
Photograph your groups' results now to automatically save them with this studio template. Share the brilliance. Take a bow.
Tip: Be sure to allow the app access to your photos and save them to the Design Studio Express album for easier access.

Reply to this email directly or view it on GitHubhttps://github.com/aiaio/DesignStudioExpress/issues/82#issuecomment-166501709.

Thanks @brooklynchuck !
@kperusko tossing it over to you


URL.absoluteString isn't optional

Related to #390
NetworkFetcher.swift:34:28: error: cannot force unwrap value of non-optional type 'String'
        super.init(key: key!)

This is strange: NetworkFetcher.swift:34 in my fork was correct before #390 was merged. Thanks for fixing this up.
I'm not entirely sure why CI is failing. According to Stack Overflow, maybe we should add CODE_SIGNING_REQUIRED=NO to the end of script in .travis.yml:
script:
  - set -o pipefail && xcodebuild -workspace Haneke.xcworkspace -scheme Haneke-iOS -sdk iphonesimulator10.3 -destination 'platform=iOS Simulator,name=iPhone 7 Plus,OS=10.3' build test | xcpretty --color CODE_SIGNING_REQUIRED=NO

Would you mind changing that line in your PR and seeing if that allows Travis-CI to pass, @z4r?


Added support for using Gradle wrapper scripts

Description of changes:
Added support for using Gradle wrapper scripts AKA "./gradlew"
Why is this change necessary:
Gradle wrappers enforce that a build uses the proper version of Gradle. Without this change components will be built with the system's Gradle command which may be the wrong version.
How was this change tested:
I built a component locally with it
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Additional tests should be added to make sure that ./gradlew is called instead of gradle when using this configuration.

Thank you for your contribution.
PR looks good to me. But to proceed further, you need to make the following changes -

Update the commit messages to match the conventional commits format for the GitHub workflow checks to pass. You can also refer to the previous commits of this repository.

Add relevant unit tests and integration tests to maintain the code coverage of the repository so the codecov can pass.

Once you're done with 1 and 2, one of the Greengrass engineers will add UATs (mainly test data) for the same.

Also feel free to link this issue https://github.com/aws-greengrass/aws-greengrass-gdk-cli/issues/84 in your PR that you're addressing this. Let us know if  you need more information.


Store password hashes prefixed with the used scheme/algorithm + BCRYPT support

Stores the password scheme and hash options among with the hash itself.
Users can still sign in with their deprecated passwords (which allows password hash migration paths on existing installations)
PASSWORD_HASH_ALGORITHM can be configured in app.ini
New users are always created with the configured hash algorithm
Stored hashes are updated on next successful user login

Supported Hash Functions

BCRYPT (default)
PBKDF2-HMAC-SHA256
PBKDF2-HMAC-SHA512

@bkcsoft thank you for your feedback. I'm not sure if the updateHashAlgorithm approach is appropriate.
Before that I tried accessing the settings object within the the user model's main() function, but did not have access to it yet (exited with runtime error). IMO bombing out while starting the application with invalid settings is better than to wait for the first user attempting to login.

@gronke see this for reference: https://github.com/gogits/gogs/pull/2406/files
Especially this: https://github.com/bkcsoft/gogs/blob/1ab8a60d737b278c176d0b6204843a79dab0e878/routers/install.go#L96
and this: https://github.com/bkcsoft/gogs/blob/1ab8a60d737b278c176d0b6204843a79dab0e878/modules/base/tool.go#L36

@bkcsoft Nice, that was exactly what I was looking for. You had a good eye seeing my lack of best practice patterns during my first steps with Go. Many thanks for that!

Would be really nice if say, you could add a feature to allow auto-upgrade from sha256 to sha512...

I think auto-upgrading password hashes should go into another pull-request and would also require us to store the password scheme (like described in the Dovecot docs). The intention of this PR was to introduce an option that changes the global default. The list of supported hashing functions can be later extended based on this.

Yet if this pull-request gets accepted, lots of discrepancies regarding different users having different password hash will complicate things. A system to store the hash used should come first. That way, we don't have to force a password reset on everyone.

@LefsFlarey let's move the discussion around that to #3662 and focus this PR on optionally replacing sha256 with sha512 entirely.

On-topic, the difference between SHA-256 and SHA-512 is merely the fact that the former is generated through 32-bit words versus the latter, which is generated through 64-bit words. Strength-wise, they are more or less, equivalent.
While I think this feature implementation may be of some use, I will have to advise that until implementation of #3662 has been done, implementing this pull-request will break all current user accounts that rely on the old SHA-256 hashing algorithm. This means that this pull-request, will only effectively be useful for fresh installations from this commit onwards and not so much on older installations.
**TL;DR: ** Bad idea to merge this PR till implementation of some sort of backward compatibility is done.

@LefsFlarey my initial intention was not to increase security, but to open the door for changing the algorithm dynamically. You convinced me that this is only of value when providing an upgrade path for existing installations.

You are talking about the hash function to be used in PBKDF2, not directly using SHA256 or SHA512 right?
Because both SHA256 and SHA512 would be horribly bad for password hashing if used directly.
And maybe you should consider making it switchable between PBKDF2, bcrypt and scrypt instead of switching the input to PKBDF2.

You are talking about the hash function to be used in PBKDF2, not directly using SHA256 or SHA512 right?
@FSMaxB yes, only the hash function used in PBKDF2 is replaced here.

Currently I'm looking into parsing the password scheme stored in the database and select the the hashing library according to that. In the first step I'd like to target {SHA256} (default when no scheme present) and {SHA512} and stick with PBKDF2. Later we can easily extend the list of supported schemes and add {SHA512-CRYPT}, {SSHA} or whatever schemes may come to our mind.

@FSMaxB, I would like to add using the hashes directly isn't actually horribly bad. If you do your homework, learn to salt and learn to iterate, it's exactly like PBKDF2.

The latest changes add support for dynamic password scheme detection like described in the Python Passlib documentation. Both the Salt and the Checksum are stored Base64 encoded.
Supported Schemes:

PBKDF2-HMAC-SHA256
PBKDF2-HMAC-SHA512

Example
Input
Iterations: 10000
keyLength: 50
Salt: cxewZCrp2T
Password: demo
Sample Output
{PBKDF2-HMAC-SHA256}$10000$aFNFcldwcmludQ==$GcvY3b3CE5PWx5SSLB3kvhtYrA9My7pQ9Ln8F5psWl+GZznnIYy3oGQTxOaWYHkmrZU=

There is no need to store the keyLen, because we can easily calculate it from the given checksum.
References used

https://pythonhosted.org/passlib/lib/passlib.hash.pbkdf2_digest.html#passlib.hash.pbkdf2_sha1
https://en.wikipedia.org/wiki/Crypt_(C)
http://wiki.dovecot.org/Authentication/PasswordSchemes

To Do
The next feature should be automatically upgrading deprecated password schemes on login. We can add a configuration option that defines the target one that should be propagated with future logins.

@LefsFlarey @bkcsoft may I ask you for another review?

@gronke, I'm personally not too certain if I, as a sysadmin, would like to give control over password hash storage to the endusers.

The control is not in the hands of the end-users, but in control of the system administrator. The admin can define the preferred hash algorithm and on the next login of a user the stored password is updated. The system supports mixed password hashes in the database, so that users can still login after a change.
@LefsFlarey Is that solution a better fit for you?

@gronke, not for me. There are plenty of people who fork this project without knowing a single grain of salt about hashes or password security. Those are who I am referring to.

All of those are solid choices and it's good to have infrastructure in place for changing the hash if something happens (like new found vulnerabilities).

not for me. There are plenty of people who fork this project without knowing a single grain of salt about hashes or password security. Those are who I am referring to.

@LefsFlarey All of the choices available provide the same or higher level of security than the current implementation. To support other hashing algorithms more manual work is involved. If somebody decides to fork Gogs and implement bad security, that is absolutely not our fault.


Chrome aggressive caching weird interaction with Volto seamless mode

There's a Chrome caching issue that behaves bad with SSR. To reproduce:

upload an image in Volto
navigate to the image. Click on the "Click to download full sized image"
click on the "Back" button of the browser

Now you'll get a JSON response page. This happens because the URLs match (HTML doc transfer and JSON transfer) and Chrome has a bug. This behavior can't be reproduced in Firefox.
Possible solutions:

open image in new tab (target=_blank)
change getContent action calls to add some query parameter to make the URLs different

Note that this is not restricted to images (at least I don't think so), but to any outside URL that you could back from

Fixed in refactored seamless mode in Volto 14


Configuration defaults to Debug

In version 0.10.0 the description for the configuration input in workflow editor states "(optional) The configuration to use. By default your Scheme defines which configuration (Debug, Release, ...) should be used, but you can overwrite it with this option."
This doesn't seem to be the actual behavior though. If empty, the build defaults to Debug configuration (or possibly the first one defined in the project) although the scheme states otherwise.
Also the configuration input is marked as required in the workflow editor while it is described as optional.

Hello @heitorfr
Thanks for the heads up, I will create a task for the tooling team to check it out and make the appropriate changes.


ca: Remove unnecessary cast

@diogomonica

Current coverage is 56.65% (diff: 100%)

Merging #1656 into master will decrease coverage by 0.22%

@@             master      #1656   diff @@
==========================================
  Files            90         90
  Lines         14574      14565     -9
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
- Hits           8290       8252    -38
- Misses         5203       5223    +20
- Partials       1081       1090     +9

Powered by Codecov. Last update 317bb8c...68b11e9


New npm release

New npm release to include last commit https://github.com/bborn2/gulp-connect-proxy-with-headers/commit/2586b1215f801a8db1744f2384636fa8879d3bbe

@utsavdevsharma y may publish y package to npm as new?
author sleeping long of time

@akaguny you may directly install from github like this http://stackoverflow.com/a/17509764
This package was not fulfilling all my requirements so I ended up using https://www.npmjs.com/package/http-proxy-middleware . Its great!

@utsavdevsharma are y may show case with forwarding request what realized dummy simple in gulp-connect-proxy?
My case is angular app and sending requests to any hosts


Choices not defined

Hi
I have just started using choices , but not abe to get a start .
I am using in my GWT application , using cdn
Getting this error
Also trying in codepen , if i can get some guidance what i am missing
https://jsfiddle.net/junaidp/q62owxL8/

@junaidp You aren't passing a select element in your codepen example

thanks , now i am passing select element in codepen , its working , but still not in the project.
in my html i am adding a select element exactly as in the feedle above.
In the screenshot of developer tools, we can see that choices cdn is there

now when i run, first i am checking the element in alert( here is the screenshot) ...

but then on next line
var example = new Choices($doc.getElementById('cities'));
I get this error ..

Now , choices are here as cdn , element is here , Not getting what i am missing here .

fixed, issue was in GWT calling to javascript


Add cheat sheet zh-cn translations

Trusted LGTM

LGTM

Let L-G-T-M work

LGTM

Is the backport done?

Yes.


Save core dumps after segfaults

We're still seeing some segfaults on our nodes. These generate core dumps that we could use to debug, but we don't save them before restarting.
We should save these core dumps.

We're no longer seeing segfaults (see https://github.com/MinaProtocol/mina/issues/8353). Closing as completed.


Improve visual splines

This is a cartopy issue: https://github.com/SciTools/cartopy/issues/825.

No need to file this here.


Add left margin in Keras resource page.

Describe the bug
Left Margin is needed to be added in the Keras resource page.
To Reproduce

Go to the Nav Bar.
Click on 'Resources'.
Click on 'AI ML'.
Go to Frameworks and click on 'Keras'.

Expected Behavior
The page is supposed to have uniform margins.
Screenshot/ Video

Desktop (please complete the following information)
Device - HP Laptop
OS - Windows 11
Browser - Opera GX
Additional context
No response

@DikshaDhasmana go ahead

can I fix this issue? @pradeeptosarkar

@sankettank66 already assigned to @DikshaDhasmana


PWM output can glitch when updating duty cycle

I am puzzled by the output of a PWM test using PIGPIO. WIth the code below, as expected, the duty cycle of the pulse moves smoothly up and down EXCEPT, as not expected, sometimes it stays high for one full 10 msec period, then immediately returns to the normal short duty cycle. The problem is intermittent, it happens maybe once in 2000 PWM cycles (20 seconds at 100 Hz). I suspect it happens when the PWM frequency is changed with pi.set_PWM_dutycycle() at just the wrong moment relative to the phase of the PWM trigger. Can I avoid this?
Scope Trace: https://goo.gl/photos/jjTCGfjfmibjQJEX7

Python code generating the problem:
Ptest.txt
I am using PIGPIO_VERSION 58
Output of pi.get_hardware_revision() is 10620993
cat /proc/cpuinfo says
Hardware        : BCM2709
Revision        : a21041
uname -a says
Linux rp21 4.1.19-v7+ #858 SMP Tue Mar 15 15:56:00 GMT 2016 armv7l GNU/Linux

I tested with your script.
import time
import pigpio

LED_PIN = 25
pi = pigpio.pi()
pi.set_mode(LED_PIN, pigpio.OUTPUT)
pi.set_PWM_range(LED_PIN, 255)
pi.set_PWM_frequency(LED_PIN, 100)

while True:
    for i in range(5, 100, 5):
        pi.set_PWM_dutycycle(LED_PIN,i);time.sleep(0.1)

    for i in range(100, 5, -5):
        pi.set_PWM_dutycycle(LED_PIN,i);time.sleep(0.1)

pi.set_mode(LED_PIN, pigpio.INPUT)
pi.stop()

Okay, this behaviour goes back to at least V16 (12-Jun-2014) so it looks like it's a feature rather than an introduced bug. Earlier versions are incompatible with the script.
That's a pity as at least an introduced bug suggests a fix. I'll look at the code to see if there is a (not too hard) way to get better behaviour.

Should be fixed in the now released V59.

Sounds great!  I am having trouble with the zip file though, I can download it, but cannot unzip it. File is 6934 bytes.
End-of-central-directory signature not found. ...
unzip: cannot find zipfile directory in one of pigpio.zip or pigpio.zip.zip and cannot find pigpio.zip.ZIP, period.

-------Original Message-------
From: joan2937<EMAIL_ADDRESS>To: joan2937/pigpio<EMAIL_ADDRESS>Cc: John Beale<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [joan2937/pigpio] PWM output can glitch when updating duty cycle (#102)
Sent: 22 Dec '16 10:29
Should be fixed in the now released V59.
--
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

nevermind my earlier message. Looked at my ".zip" file and it turns out to be an error HTML page generated from the
wifi connection I used that wanted a click-through signin. Sorry!

-------Original Message-------
From: joan2937<EMAIL_ADDRESS>To: joan2937/pigpio<EMAIL_ADDRESS>Cc: John Beale<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [joan2937/pigpio] PWM output can glitch when updating duty cycle (#102)
Sent: 22 Dec '16 10:29
Should be fixed in the now released V59.
--
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.


Yarn support

Using the new Microsoft.DotNet.Web.Spa.ProjectTemplates for a React project I noticed it uses npm for packaging, but was hoping to use yarn (especially with the recent botched npm 5.7.0 release).
While some of this is a templating question and should be asked there, my question here mostly is with regards to the middleware(s) and such.
I've only briefly looked around at the source code, but it appears to use npm directly.
Looking at the .csproj the template generates it looks like I can replace npm <command> with yarn <command>...
<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>netcoreapp2.0</TargetFramework>
    <TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
    <TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
    <IsPackable>false</IsPackable>
    <SpaRoot>ClientApp\</SpaRoot>
    <DefaultItemExcludes>$(DefaultItemExcludes);$(SpaRoot)node_modules\**</DefaultItemExcludes>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.5" />
    <PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="2.0.0" />
  </ItemGroup>

  <ItemGroup>
    <DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.1" />
  </ItemGroup>

  <ItemGroup>
    <!-- Don't publish the SPA source files, but do show them in the project files list -->
    <Content Remove="$(SpaRoot)**" />
    <None Include="$(SpaRoot)**" Exclude="$(SpaRoot)node_modules\**" />
  </ItemGroup>

  <Target Name="DebugEnsureNodeEnv" BeforeTargets="Build" Condition=" '$(Configuration)' == 'Debug' And !Exists('$(SpaRoot)node_modules') ">
    <!-- Ensure Node.js is installed -->
    <Exec Command="node --version" ContinueOnError="true">
      <Output TaskParameter="ExitCode" PropertyName="ErrorCode" />
    </Exec>
    <Error Condition="'$(ErrorCode)' != '0'" Text="Node.js is required to build and run this project. To continue, please install Node.js from https://nodejs.org/, and then restart your command prompt or IDE." />
    <Message Importance="high" Text="Restoring dependencies using 'npm'. This may take several minutes..." />
    <Exec WorkingDirectory="$(SpaRoot)" Command="npm install" />
  </Target>

  <Target Name="PublishRunWebpack" AfterTargets="ComputeFilesToPublish">
    <!-- As part of publishing, ensure the JS resources are freshly built in production mode -->
    <Exec WorkingDirectory="$(SpaRoot)" Command="npm install" />
    <Exec WorkingDirectory="$(SpaRoot)" Command="npm run build" />

    <!-- Include the newly-built files in the publish output -->
    <ItemGroup>
      <DistFiles Include="$(SpaRoot)build\**" />
      <ResolvedFileToPublish Include="@(DistFiles->'%(FullPath)')" Exclude="@(ResolvedFileToPublish)">
        <RelativePath>%(DistFiles.Identity)</RelativePath>
        <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
      </ResolvedFileToPublish>
    </ItemGroup>
  </Target>

</Project>

...but for the middleware I wasn't sure if it was possible to influence it to use yarn.
I looked in the previous issues for yarn support but it seemed most was for the 1.0.0 templates and were not applicable to the new 2.0.0 way.
Thanks

I have been using spa.UseProxyToSpaDevelopmentServer("http://localhost:3000"); instead of spa.UseReactDevelopmentServer(npmScript: "start"); but wasn't sure if:

There are only places that npm would be used
If I wanted to switch back to having create-react-app started by the ASP.NET, could I use something like spa.UseReactDevelopmentServer(yarnScript: "start"); or spa.UseReactDevelopmentServer(npmScript: "start", runner: "yarn");

I have been using spa.UseProxyToSpaDevelopmentServer

That will work fine and is a good approach.

[wasn't sure if] There are only places that npm would be used

As far as I'm aware, those are the only places it's used (in the csproj, and in UseReactDevelopmentServer).

[wasn't sure if] If I wanted to switch back to having create-react-app started by the ASP.NET, could I use something like spa.UseReactDevelopmentServer(yarnScript: "start");

We don't currently have any yarnScript or runner params as in your examples. If you're interested in submitting a PR to add that support we could certainly consider it!

@SteveSandersonMS
https://github.com/aspnet/JavaScriptServices/pull/1776


Program Main method throws "The application called an interface that was marshalled for a different thread." before the application can even start

I've just used the .NET upgrade tool to convert a large UWP app to WinUI  3.
The upgrade tool left it with hundreds of bugs to work through, but most were caused by incorrect namespaces and a few other ugly bits, but that's a complaint for another day...
The app now attempts to launch, gets as far as the splash screen. but crashes in the auto-generated Program.Main() function in App.g.i.cs
The exception is thrown when attempting to fire the global::Microsoft.UI.Xaml.Application.Start(... method.
I'm not sure where I should begin to hunt for a solution for this. Given that the exception is thrown at such an incredibly early stage of startup, I'm unsure if it's due to something incorrect in my application, or perhaps something has not been configured correctly via the .NET upgrade tool, or something else entirely.

You're most likely hitting problems with Package.appxmanifest, which the Upgrade tool doesn't edit. To fix that, edit the Package.appxmanifest file with these changes:

Add this namespace on the :

  xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"

Edit the  from EntryPoint="appnamehere.App"> to EntryPoint="$targetentrypoint$"
Replace any specified  with this:

    <rescap:Capability Name="runFullTrust" />

That resolved it, thanks!
I also needed to add the following to App.xaml
<Application.Resources>
            <XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
</Application.Resources>

A doc update to the upgrade assistant page has been queued to call add these extra potential steps.

A doc update to the upgrade assistant page has been queued to call add these extra potential steps.

Hi @codendone can you or someone similarly versed in this type of issue take a look at GitHub issue #9208 whenever you may have a chance? I am having the same type of issued described in here in #8920/#616/#308 and the fixes outlined in these seem not to do the trick. Thank you
https://github.com/microsoft/microsoft-ui-xaml/issues/9208

xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"

Could you be as so kind to explain why do we have to add fulltrust? I didn't have it previosly.


[AutoPR azure-iot-deviceupdate] add sample readme.typescript.md

Create to sync https://github.com/openapi-env-test/azure-rest-api-specs/pull/3125
You can install the use using pip install of the artificats.

API change check for azure-iot-deviceupdate
API changes have been detected in azure-iot-deviceupdate. You can review API changes here


plot_coupling_map() and plot_gate_map() needs snapshot testing

Now we have snapshot testing for other graphs besides circuits (thanks to #6672), it should be extended with other graphing functions, like plot_coupling_map and plot_gate_map (introduced in #6751).

Can I work on this one?

Sure, I'll assign it to you so others know you're working on it. Feel free to ask questions if you need help!

Hi @Quant02 there are also some specific guidelines on snapshot testing in the terra CONTRIBUTING.md file that will be useful for this issue specifically: https://github.com/Qiskit/qiskit-terra/blob/main/CONTRIBUTING.md#snapshot-testing-for-visualizations

Hi @Quant02 there are also some specific guidelines on snapshot testing in the terra CONTRIBUTING.md file that will be useful for this issue specifically: https://github.com/Qiskit/qiskit-terra/blob/main/CONTRIBUTING.md#snapshot-testing-for-visualizations

Thanks! This is being really useful.

I have committed some changes. Snapshot testing, using binder, is successful for plot_coupling_map(), but there is some issue with plot_gate_map(). I'm assuming that it is because of the fact that plot_gate_map() requires a real backend. A review of the changes and suggestions to get over this problem can be really helpful.

I have committed some changes. Snapshot testing, using binder, is successful for plot_coupling_map(), but there is some issue with plot_gate_map(). I'm assuming that it is because of the fact that plot_gate_map() requires a real backend. A review of the changes and suggestions to get over this problem can be really helpful.

https://github.com/Qiskit/qiskit-terra/pull/7003
This is a pull request summarizing the work till now. Please review this. @1ucian0 , @jakelishman , @javabster


Floating point conversion gives surprising results

Converting from a floating point type like Float or Double into Rational gives surprising results:
ghci> tryInto @Rational (0.1 :: Float)
Right (13421773 % 134217728)

ghci> tryInto @Rational (0.1 :: Double)
Right<PHONE_NUMBER>896397 %<PHONE_NUMBER>8963968)

Ultimately this is caused by toRational not returning a minimal result:
ghci> toRational (0.1 :: Float)
13421773 % 134217728

ghci> toRational (0.1 :: Double)
3602879701896397 %<PHONE_NUMBER>8963968

Somewhat surprisingly, converting back into the original floating point type gives the original value:
ghci> fmap (into @Float) $ tryInto @Rational (0.1 :: Float)
Right 0.1

ghci> fmap (into @Double) $ tryInto @Rational (0.1 :: Double)
Right 0.1

I'm aware that floating point numbers are represented in base 2, so a number like 0.1 isn't exactly representable. And when printing the number, I think it tries to find the minimal unambiguous representation. Which is to say: I'm not sure if this is actionable, but it would be nice if tryInto @Rational (0.1 :: Float) gave Right (1 % 10).

Ah, of course:
ghci> approxRational 0.0001 (epsilon :: Float)
1 % 9989

It could be useful to study fromFloatDigits from the scientific package, which uses floatToDigits.


Generic Type only used as generic constraint is not checked

Bug Report
🔎 Search Terms
generic used for generic constraint not checked
🕗 Version & Regression Information

This is the behavior in every version I tried (5.0.2)

⏯ Playground Link
Playground link with relevant code
💻 Code
interface Runner<T extends Record<string, { v11: string }>> {
//  Run(a1: keyof T): void
  Run<K extends keyof T, N extends T[K]["v11"]>(a1: K, a2: N): void
}

function goodcaller(r: Runner<{ v1: { v11: "s1" | "s2" } }>) {
  caller(r)
}

function badcaller1(r: Runner<{ v2: { v11: "s1" | "s2" } }>) {
  caller(r)
}

function badcaller2(r: Runner<{ v1: { v11: "s3" | "s4" } }>) {
  caller(r)
}

function caller(r: Runner<{ v1: { v11: "s1" } }>) {
  r.Run("v1")
  r.Run("v2")
  r.Run("v1", "s1")
  r.Run("v1", "s2")
  r.Run("v2", "s1")
}

🙁 Actual behavior
As long as line 2 is commented out, the calls to "caller" on line 11 & 15 do not report an error, even though we can see from line 21, 22, 23 that we correctly restrict parameters based on "T". If line 2 is added, the errors are reported correctly. It seems generic types used only as internal generic constraints (like line 3) are not checked
🙂 Expected behavior
Generics used for constraints only should be included in the type analysis, because they are actually needed and lead to invalid code if ignored

Variance measurement doesn't take constraints into account. As a workaround, you can add a variance annotation to Runner. In this case it's invariant, so write
interface Runner<in out T extends Record<string, { v11: string }>> {

Simpler example of what's wrong:
interface Foo<T> {
  bar<U extends T>(s: U): void;
}
const x: Foo<string> = {
  bar(m) {
    m.toLocaleLowerCase();
  }
};
let y: Foo<number> = x;
y.bar(32);

Damn, i somehow missed the possibility to manually define variance in Typescript interfaces. I guess i have to learn how to use google properly. Sorry for wasting your time

Well, if you want to track this i can re-open the issue


Docs: Implement new home screens

New home screens
We need to re-implement the homescreens of the Twig and React Storybook projects. I've created designs in Figma for this which you can see here.
See the Screenshots below
Requirements

Make it clear what the Storybook project has
Make it clear which library it is (Twig or React)
Show the version number being used
Move the user on to the next step, the getting started page

Animation
The idea is that the triangles would "float" very slowly in different directions, though we'll have to do some experimenting to get the animations right. So they don't float off the screen or into weird super-positions, may be they should float in one direction for a while and then in another after that.
Why do we need this
Because people judge books by their covers. We want developers to feel good about using the DS for their projects and it takes a little marketing.
Caveats
I'm not a designer and these designs aren't pixel perfect, I don't think they need to be, the Storybook projects are Development Documentation after all. However, I think they're good enough to give an idea of the effect we want to accomplish.
Feedback welcome!
Designs

There's also this option which @GGKapanadze and @inesdgomes both like more. We can take a vote on Tuesday. If anyone has any different ideas, feel free to share!

We need to show which lib we're working with on the sidebar.


Adding vmx flag for nested KVM

Just a simple way to add nested KVM by enabling vmx.

It will work only on Intel CPU, but it's a start to work with snapshot for a better solution


fix typo

I dont know what is this. Sorry but my english not good!

Unsubscribe me please!

Unsubscrribe


jpeg: auto-detect jpeg_mem_src and jpeg_mem_dest

If not defined then return a meaningful error at runtime.
This makes it possible to build and use the image package - except the in-memory JPEG compress and decompress operations - on systems that ship with old libjpeg or libjpeg-turbo like Centos 6.x (#152) or Amazon Linux AMI (libjpeg-turbo 1.2.90 at the time of writing).
Later on we can also decide to write replacement functions if we really want to add support for these operations (see this).

excellent. thanks.


Broken links

Description:
https://apim.docs.wso2.com/en/next/Develop/ProductAPIs/restful-apis/

Fixed in https://github.com/wso2/docs-apim/pull/704


The plugin doesn't work when using the reformat action, pressing "Reload" fails with an error

Hi! I'm using the 0.3.5 version.
I have dprint enabled in the WebStorm settings, but it doesn't work when I trigger the "Reformat code" action (Cmd+Alt+L). It doesn't show any errors, it just does nothing when I press the hotkey combination.
If I enable "Run dprint formatter on save" though, it does reformat my code on save.
Also, I noticed this issue when pressing the reload button (maybe I should've created a separate one for it, but I guess I'll just leave it here for now):
Failed to read stdout of the editor service

java.nio.BufferUnderflowException
	at java.base/java.nio.Buffer.nextGetIndex(Buffer.java:651)
	at java.base/java.nio.HeapByteBuffer.getInt(HeapByteBuffer.java:402)
	at com.dprint.services.editorservice.EditorProcess.readInt(EditorProcess.kt:147)
	at com.dprint.services.editorservice.v5.StdoutListener.handleStdout(StdoutListener.kt:34)
	at com.dprint.services.editorservice.v5.StdoutListener.run(StdoutListener.kt:22)
	at com.dprint.services.editorservice.v5.EditorServiceV5$createStdoutListener$1.invoke(EditorServiceV5.kt:33)
	at com.dprint.services.editorservice.v5.EditorServiceV5$createStdoutListener$1.invoke(EditorServiceV5.kt:32)
	at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)

I hope this helps, but let me know if there are any logs or debug info I can fetch as well.
Thank you for maintaining this project!

Hi @mvlabat and thanks for the report, sorry it has taken me a bit to get to this.
What kind of file are you trying to format?
I have added a console tab with the label dprint that should appear at the bottom of the IDE. What is the output in that after running Cmd+Alt+L?
Also, there is something I have noticed with Cmd+Alt+L in that a file needs to be saved before the format will work. If you run Cmd+Alt+L twice you may see the file get formatted as IntelliJ will save the file under the hood after attempting to run the format. If this is the case I will chase JetBrains about whether this is intended behaviour and if I can change it.
"Run dprint formatter on save" will always work as it runs after the file has been saved so it is assured to be the latest changes in the editor.

Also, I noticed this issue when pressing the reload button (maybe I should've created a separate one for it, but I guess I'll just leave it here for now):
Failed to read stdout of the editor service

java.nio.BufferUnderflowException
	at java.base/java.nio.Buffer.nextGetIndex(Buffer.java:651)
	at java.base/java.nio.HeapByteBuffer.getInt(HeapByteBuffer.java:402)
	at com.dprint.services.editorservice.EditorProcess.readInt(EditorProcess.kt:147)
	at com.dprint.services.editorservice.v5.StdoutListener.handleStdout(StdoutListener.kt:34)
	at com.dprint.services.editorservice.v5.StdoutListener.run(StdoutListener.kt:22)
	at com.dprint.services.editorservice.v5.EditorServiceV5$createStdoutListener$1.invoke(EditorServiceV5.kt:33)
	at com.dprint.services.editorservice.v5.EditorServiceV5$createStdoutListener$1.invoke(EditorServiceV5.kt:32)
	at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)

Ah thanks, yeah this is an error on my part but it causes no harm outside of some error spam in the UI. I just need to ensure things are shut down in the correct order on restart, or I just need to silence that error.

I have asked about the odd save/format functionality in an IntelliJ plugin slack workspace. I will report back what I find out.

@ryan-rushton thank you for the response!
Oh, I can actually confirm that it works for me in some of the files, and pressing Cmd+Alt+L doesn't require me to save a file before triggering the action - it works correctly anyway.
Turns out, it doesn't work for me in .tsx files. Does the plugin respect the includes directive of dprint.json?
Here's my config:
{
  "typescript": {
    "quoteStyle": "preferSingle"
  },
  "json": {
  },
  "markdown": {
  },
  "includes": ["**/*.{ts,tsx,js,jsx,cjs,mjs,json,md}"],
  "excludes": [
    "**/node_modules",
    "**/*-lock.json"
  ],
  "plugins": [
    "https://plugins.dprint.dev/typescript-0.69.1.wasm",
    "https://plugins.dprint.dev/json-0.15.3.wasm",
    "https://plugins.dprint.dev/markdown-0.13.3.wasm"
  ]
}

It works for those .txs files I was editing when I run dprint from CLI.

Yeah so the plugin basically says that it can format those files when IntelliJ asks it if it can. Doing so will mean our "formatter" will override the default IntelliJ formatter. My hypothesis is that the default IntelliJ formatter gets run after a save, but external formatters (such as our dprint one) run before a save.
I have asked in an IntelliJ plugin developer slack channel for confirmation but haven't heard anything back. I am hoping the JetBrains representatives in there will confirm whether this is intended behaviour or a bug. If I don't hear anything back in the next few days I will raise a bug directly on their YouTrack and see what happens.

OOI, what other files were you comparing too. Just having a look at other plugins that implement this same interface and the rust plugin does something very similar to what I am doing.

Another file (for which the formatter worked) had the .ts extension. I'm not sure that WebStorm was running its default one afterwards, as it didn't fix any obvious places where formatting was off (like redundant tabs).
What is weird though, is that the plugin started working with .txs files as well. :D I think it might have happened after I reenabled dprint formatting in its own settings (as opposed to reenabling the whole plugin). Not really sure..
Also, I've run another test that probably confirms that the default formatter doesn't interfere with the dprint one:

I set indentation to 4 spaces for the default formatter and 2 spaces for dprint.
I enabled dprint in its settings, formatted a file, it correctly formatted it to have 2 spaces indentation.
I disabled dprint in its settings, formatted a file, the default formatter made the indentation to have 4 spaces as expected.

Had a bit of a dig into this and it appears the issue is with the underlying dprint process it seems.
@dsherret I have a that I am triggering a format on and the first format is always coming back as the file cannot be formatted. Example logs are here. I have confirmed that the text I am sending in is correct in that it needs to be formatted.
2022-07-05 19:36:58,637 [ 202676]   INFO - #c.d.f.DprintExternalFormatter - Sending format with id 7
2022-07-05 19:36:58,699 [ 202738]   INFO - #c.d.s.e.EditorServiceManager - Creating formatting task for /Users/ryanrushton/work/dprint-test/my-app/src/App.tsx
2022-07-05 19:36:58,699 [ 202738]   INFO - #c.d.s.e.v.EditorServiceV5 - Formatting /Users/ryanrushton/work/dprint-test/my-app/src/App.tsx
2022-07-05 19:36:58,699 [ 202738]   INFO - #c.d.s.e.v.EditorServiceV5 - Created formatting task for /Users/ryanrushton/work/dprint-test/my-app/src/App.tsx with id 7
2022-07-05 19:36:58,745 [ 202784]   INFO - #c.d.s.e.v.StdoutListener - Responding to message 7: Has changed is 0
2022-07-05 19:36:58,745 [ 202784]   INFO - #c.d.s.e.v.EditorServiceV5 - No need to format /Users/ryanrushton/work/dprint-test/my-app/src/App.tsx
2022-07-05 19:37:12,571 [ 216610]   INFO - #c.d.f.DprintExternalFormatter - Sending format with id 8
2022-07-05 19:37:12,577 [ 216616]   INFO - #c.d.s.e.EditorServiceManager - Creating formatting task for /Users/ryanrushton/work/dprint-test/my-app/src/App.tsx
2022-07-05 19:37:12,578 [ 216617]   INFO - #c.d.s.e.v.EditorServiceV5 - Formatting /Users/ryanrushton/work/dprint-test/my-app/src/App.tsx
2022-07-05 19:37:12,578 [ 216617]   INFO - #c.d.s.e.v.EditorServiceV5 - Created formatting task for /Users/ryanrushton/work/dprint-test/my-app/src/App.tsx with id 8
2022-07-05 19:37:12,580 [ 216619]   INFO - #c.d.s.e.v.StdoutListener - Responding to message 8: Has changed is 1
2022-07-05 19:37:12,580 [ 216619]   INFO - #c.d.s.e.v.EditorServiceV5 - Successfully formatted /Users/ryanrushton/work/dprint-test/my-app/src/App.tsx

https://user-images.githubusercontent.com/7344652/177301632-a1bf88c2-2bf3-4e8b-9483-1f2b7a2cc855.mp4

@ryan-rushton hmmm that's really strange. Does this reproduce each time? Have you been able to reproduce it with the vscode plugin?
What's the output of dprint when running with --verbose?

I have confirmed that the text I am sending in is correct in that it needs to be formatted.

This was the only thing I could think of (it initially sending the wrong file text to be formatted). I looked through the code and didn't see anything obvious.

Just a follow up as @dsherret and I figured this out. IntelliJ is sending a range that is larger than the actual content of the file. This was causing a no-op formatting result. For whatever reason it didn't happen on second format. I have raised this in the IntelliJ plugin slack and will see if anything comes up around it.

@mvlabat a new version (0.3.6) should be up on the store in the next day or so. I think it should fix both of those issues you encountered.


Test numbers are resetting on test suite

ok 1 passes text to readonly textarea
ok 2 calls onCancel on cancel button click
ok 1 calls mute api and commits the changes
ok 2 calls unmute api and commits the changes
ok 3 sets volume, unmutes and commits changes
ok 4 must do nothing if the initial config isMuted is false
ok 5 must mute the player if the inital config sets the player as muted
ok 1 must set an initial state
ok 2 must update the config on INITIAL_CONFIG
ok 3 must ovewrite the state on LOAD_NEW_CONFIG
ok 4 must ovewrite the state on LOAD_PREVIOUS_CONFIG
ok 5 must set the isLive to true on LIVE_STREAM_START
ok 6 must be possible to add the current src to the state on LIVE_STREAM_START
ok 1 does not add duplicates
ok 2 clears properly
ok 3 does not add more than MAX_HISTORY items
ok 4 includes added items
ok 5 works without localStorage
ok 1 must guess the mime of the passed source
ok 2 must sort the renditions by screenWidth
ok 3 must not sort if the renditions have no frameWidth
ok 1 must format in hours minutes seconds
ok 2 must not show the hours by default
ok 3 must be possible force the hours to appear
ok 1 returns Image element with src

We have for the moment agreed to remove the numbers as they are misleading and represent no order.
https://github.com/MailOnline/jest-tap-reporter/pull/5 removes the test numbers and improves the output