fixed stuff main.py

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Describe the changes proposed in the pull request A quick description of the changes made to the repository
What is the current behavior? (You can also link to an open issue here)
What is the new behavior (if this is a feature change)?
Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
Other information:

Bro you didn't fix anything lol

breh xd srsly? i thought my friend fixed it... sorry then 😅
Le jeu. 1 sept. 2022 à 21:17, Logicguy @.***> a écrit :

Bro you didn't fix anything lol
—
Reply to this email directly, view it on GitHub
https://github.com/logicguy1/Discord-Nitro-Generator-and-Checker/pull/165#issuecomment-1234626830,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AX2YOS4MHIXYXYP7TK4SUCTV4DXMLANCNFSM6AAAAAAQCIULA4
.
You are receiving this because you authored the thread.Message ID:
@.***
.com>

I mean you didnt change anything in the code so i dont pressen do

yea i think my frend didnt do much...do you want me to take the thing down?
Le sam. 3 sept. 2022 à 12:36, Logicguy @.***> a écrit :

I mean you didnt change anything in the code so i dont pressen do
—
Reply to this email directly, view it on GitHub
https://github.com/logicguy1/Discord-Nitro-Generator-and-Checker/pull/165#issuecomment-1236084606,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AX2YOS6ILMVXAMMN5A2VBD3V4ML2XANCNFSM6AAAAAAQCIULA4
.
You are receiving this because you authored the thread.Message ID:
@.***
.com>

No ill just close it


The check for ignoring should use the resource block

take the range details from the resource block rather than the result
block

add a check for someone adding the tfsec ignore in about the result
block

Resolves #781

Yup @liamg  - that seems to have been unnecessary after all. The key part is the range filename


History keyboard shortcut opening new tab in dvorak layouts

Operation System: Mac
Cmd+y is opening beaker://start for some reason

Update: Cmd+y accelerator works with qwerty but not dvorak

Can I close this as wontfix?

Yes 😭

Haha <3

I actually ended up fixing this one


some fixes to timeline

fixes from JFD and dvelasco

:+1:

@jospoortvliet um ... so what is the policy here? two :+1: or ... ? doas this automagically get deployed to owncloud.org?

nevermind ... just read the README :blush:

No more comments have come in so let's merge this.


[BUG] Exception in thread "main" java.lang.NoSuchFieldError: MANAGED_HSM

Describe the bug
If I use the latest following artifact

com.azure.resourcemanager
azure-resourcemanager-resources
2.27.0
, I get the following error:
Exception in thread "main" java.lang.NoSuchFieldError: MANAGED_HSM
at com.azure.resourcemanager.resources.fluentcore.utils.PagedConverter$PagedIterableImpl.stream(PagedConverter.java:200)
The line of code that causes this is : 	List subscriptionIds = azureResourceManager.subscriptions().list().stream()
.map(sub -> sub.subscriptionId()).collect(Collectors.toList());
Exception or Stack Trace
at com.azure.resourcemanager.resources.fluentcore.utils.ResourceManagerUtils.getDefaultScopeFromUrl(ResourceManagerUtils.java:185)
at com.azure.resourcemanager.resources.fluentcore.utils.ResourceManagerUtils.getDefaultScopeFromRequest(ResourceManagerUtils.java:147)
at com.azure.resourcemanager.resources.fluentcore.policy.AuthenticationPolicy.getScopes(AuthenticationPolicy.java:36)
at com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy.lambda$authorizeRequest$0(ArmChallengeAuthenticationPolicy.java:55)
at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:44)
at reactor.core.publisher.Mono.subscribe(Mono.java:4490)
at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.subscribeNext(MonoIgnoreThen.java:263)
at reactor.core.publisher.MonoIgnoreThen.subscribe(MonoIgnoreThen.java:51)
at reactor.core.publisher.Mono.subscribe(Mono.java:4490)
at reactor.core.publisher.FluxFlatMap.trySubscribeScalarMap(FluxFlatMap.java:200)
at reactor.core.publisher.MonoFlatMap.subscribeOrReturn(MonoFlatMap.java:53)
at reactor.core.publisher.Mono.subscribe(Mono.java:4475)
at reactor.core.publisher.FluxFlatMap.trySubscribeScalarMap(FluxFlatMap.java:203)
at reactor.core.publisher.MonoFlatMap.subscribeOrReturn(MonoFlatMap.java:53)
at reactor.core.publisher.Mono.subscribe(Mono.java:4475)
at reactor.core.publisher.FluxFlatMap.trySubscribeScalarMap(FluxFlatMap.java:200)
at reactor.core.publisher.MonoFlatMap.subscribeOrReturn(MonoFlatMap.java:53)
at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:57)
at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:52)
at reactor.core.publisher.Mono.subscribe(Mono.java:4490)
at reactor.core.publisher.FluxFlatMap.trySubscribeScalarMap(FluxFlatMap.java:203)
at reactor.core.publisher.MonoFlatMap.subscribeOrReturn(MonoFlatMap.java:53)
at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:57)
at reactor.core.publisher.MonoDeferContextual.subscribe(MonoDeferContextual.java:55)
at reactor.core.publisher.Flux.subscribe(Flux.java:8642)
at reactor.core.publisher.Flux.blockLast(Flux.java:2760)
at com.azure.core.util.paging.ContinuablePagedByIteratorBase.requestPage(ContinuablePagedByIteratorBase.java:102)
at com.azure.core.util.paging.ContinuablePagedByItemIterable$ContinuablePagedByItemIterator.(ContinuablePagedByItemIterable.java:75)
at com.azure.core.util.paging.ContinuablePagedByItemIterable.iterator(ContinuablePagedByItemIterable.java:55)
at java.base/java.lang.Iterable.spliterator(Iterable.java:101)
at com.azure.core.util.paging.ContinuablePagedIterable.stream(ContinuablePagedIterable.java:85)
at com.azure.resourcemanager.resources.fluentcore.utils.PagedConverter$PagedIterableImpl.stream(PagedConverter.java:200)
To Reproduce
Use the mentioned artifact
Code Snippet
List subscriptionIds = azureResourceManager.subscriptions().list().stream()
.map(sub -> sub.subscriptionId()).collect(Collectors.toList());
Expected behavior
List of subscription IDs should received without any exception being thrown
Screenshots
Not applicable
Setup (please complete the following information):

OS: Windows 10 Enterprise
IDE: IntelliJ
Library/Libraries: As mentioned
Java version: openjdk version "19.0.1" 2022-10-18
App Server/Environment:NA
Frameworks: NA

If you suspect a dependency version mismatch (e.g. you see NoClassDefFoundError, NoSuchMethodError or similar), please check out Troubleshoot dependency version conflict article first. If it doesn't provide solution for the problem, please provide:

verbose dependency tree (mvn dependency:tree -Dverbose)
exception message, full stack trace, and any available logs

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

[X ] Bug Description Added
[X] Repro Steps Added
[ X] Setup information Added

@maheshn99
You can also refer to this for troubleshooting on dependencies
https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/resourcemanager#dependency-management
As mentioned by Alan, please make sure azure-core-management 1.11.0+ is used in dependency.

@weidongxu-microsoft  Thank you for the response. The error went away, after I used the azure-core-management 1.11.1 library.


Update test cases

Signed-off-by: Binbin Lv<EMAIL_ADDRESS>

Codecov Report

Merging #464 (e51cafa) into main (90274c4) will decrease coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #464      +/-   ##
==========================================
- Coverage   61.03%   61.01%   -0.02%
==========================================
  Files         145      145
  Lines        5690     5690
  Branches      834      834
==========================================
- Hits         3473     3472       -1
  Misses       1986     1986
- Partials      231      232       +1

Impacted Files
Coverage Δ

towhee/engine/thread_pool_task_executor.py
78.72% <0.00%> (-2.13%)
:arrow_down:

Continue to review full report at Codecov.

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

/assign @fzliu

/approve
/lgtm


[DDW-561] Fix crashes when Yubikey is connected

This PR CHANGES.
Todos

[x] Patch usb library and recompile for Windows
[x] Create new nix/windows-usb-libs.zip

Testing Checklist

Slack QA thread
[ ] Test only on Windows all HWs

Review Checklist
Basics

[ ] PR has been assigned and has appropriate labels (feature/bug/chore, release-x.x.x)
[ ] PR is updated to the most recent version of the target branch (and there are no conflicts)
[ ] PR has a good description that summarizes all changes
[ ] PR has default-sized Daedalus window screenshots or animated GIFs of important UI changes:

[ ] In English
[ ] In Japanese

[ ] CHANGELOG entry has been added to the top of the appropriate section (Features, Fixes, Chores) and is linked to the correct PR on GitHub
[ ] Automated tests: All acceptance and unit tests are passing (yarn test)
[ ] Manual tests (minimum tests should cover newly added feature/fix): App works correctly in development build (yarn dev)
[ ] Manual tests (minimum tests should cover newly added feature/fix): App works correctly in production build (yarn package / CI builds)
[ ] There are no flow errors or warnings (yarn flow:test)
[ ] There are no lint errors or warnings (yarn lint)
[ ] There are no prettier errors or warnings (yarn prettier:check)
[ ] There are no missing translations (running yarn manage:translations produces no changes)
[ ] Text changes are proofread and approved (Jane Wild / Amy Reeve)
[ ] Japanese text changes are proofread and approved (Junko Oda)
[ ] UI changes look good in all themes (Alexander Rukin)
[ ] Storybook works and no stories are broken (yarn storybook)
[ ] In case of dependency changes yarn.lock file is updated

Code Quality

[ ] Important parts of the code are properly commented and documented
[ ] Code is properly typed with flow
[ ] React components are split-up enough to avoid unnecessary re-renderings
[ ] Any code that only works in main process is neatly separated from components

Testing

[ ] New feature/change is covered by acceptance tests
[ ] New feature/change is manually tested and approved by QA team
[ ] All existing acceptance tests are still up-to-date
[ ] New feature/change is covered by Daedalus Testing scenario
[ ] All existing Daedalus Testing scenarios are still up-to-date

After Review

[ ] Merge the PR
[ ] Delete the source branch
[ ] Update Slack QA thread by marking it with a green checkmark

This is a patch by fixing this Issue https://github.com/tessel/node-usb/issues/386
TODO: watch https://github.com/tessel/node-usb if they fix it, so we do not need to use the patched version anymore.

@danielmain ,
I have tested build 19071 Windows Mainnet/Testnet against Yubikey + HWs. Looked good. No crashes anymore. Also, tested against Mac/Linux just in case. Also looked good 👍 .
Before approving, could other QAs help to double check just in case please, thanks. cc: @ManusMcCole @dmitrii-gaico


Aligned NetworkReader functions.

most people in C# world don't align code like that as it seems.
probably some kind of convention somewhere, so I'll close this, sorry


Corrosion protection for the electronics

Right now the electronics are placed in an unsealed enclosure. We need to determine if we need some stronger form of corrosion protection for the electronics. This may be especially relevant if someone wants to deploy a sensor in an area near the ocean that has a high salinity content for instance.

mgchemicals has an informative introductory resource on conformal coating technologies here.
It seems that using an acrylic or silicon coating would work for our application. The acrylic is slightly cheaper, but apparently has pretty strong fumes during use (though not once cured). The other options (polyurethane and epoxy) would also be feasible, but are more impractical due to cure time and handling/mixing considerations, respectively.
These can be easily purchased on Amazon in a bottle containing a liquid that can be applied using a brush:

Acrylic conformal coating (It might be worth noting that there were a lot of complaints in the Amazon reviews about the quality of the provided brush affecting the ability to apply the coating. This could potentially be improved by using a different brush.)

Silicon conformal coating

Both of these products can also be purchased as Aerosols, but I figured for potential safety and environmental concerns, the brush-application method might be more desirable.
@keenanjohnson it might be a good idea using one of these before sending out the pre-assembled Alpha units that you plan on assembling. I'll leave it up to you which specific product you want to use, since you will be the one using it -- not sure if you think its worth dealing with acrylic fumes!

In the long-term (if we are doing higher volume PCB manufacturing), it should definitely be feasible to have a conformal coating applied by a PCB assembly service.

Ah yes, I've used those a bit to spot fix areas on boards where I rubbed the conformal coating off of products I've fixed :). Yeah, the aerosols are for sure a mess without a big chamber/application room, so I think we want to stay away from those for several reasons, including that it requires some sort of complicated masking situation to prevent the spray from getting into connectors.
Given that all of our electronics have lots of connectors/areas that can't be conformally coated (vents for the barometer and co2 sensor for example), I think the main thing is just to identify what are the high-value areas to conformally coat with brush.
@eren-rudy would this be something you could help me map out?
Seems like trying to hit most of the raspberry pi compute module top and bottom (avoiding connectors) is the highest value area. Looking around at the rest of the electronics, maybe the GPS module and some of the ICs on the bottom of the raspberry pi carrier?

I understand that we don't want to apply any conformal coating to sensors that need air exposure, however, I want to clarify a few things: (1) I'm curious about the reasoning behind not conformal coating the connectors, and (2) is there a cost-protection tradeoff that you are weighing when thinking about selectively coating high-risk areas?
RE: (1), I understand that coating the unmated connectors would make it such that they cannot be used, but, if its not inhibitive to assembly, I think there might be value to coating the mated connector.
RE: (2), my guess, is that -- although it may obviously be more valuable to coat a small-pitch IC -- there would still be non-trivial value to even just coating the soldermask and other traces.
Of course, I don't have any personal experience with applying conformal coating, so please let me know what you think! I'll definitely do more research into my assumption for point (2), since coating the whole board may be overkill. I'll be sure to share any useful resources I might find.

It also seems like the GPS requirement means you have to mount it somewhere that it's not under a roof. It seems like it would simplify the BOM if the GPS was left out, and you just had to provide lat/long at setup time. Then it could have a little more protection from the elements.
Also PurpleAir outdoor sensors are just open at the bottom and they seem to do fine. They do warn you to arrange the power cable so any moisture drips off it, and doesn't run into the electronics. However, I haven't taken one apart to see what, if anything, they have coated to avoid corrosion.

Hey @keenanjohnson. I appreciate the input, that all makes sense to me!
Regarding your earlier comment, I do want to clarify exactly what you meant by mapping out the areas to conformal coat. Is the intention to add to your assembly instructions by including information for users to apply the coating themselves?
If so, let me know. I can annotate the images and put them into an additional step in the assembly instructions.
My only concern about this is that it would increase the effective cost, since for the most part I imagine the conformal coat/silicon grease might not be used for other things after the user builds the Frog. In that case, maybe we can add some "optional but encouraged" steps to the assembly instructions? I guess it may not be a huge problem, since many people who want to build it themselves wouldn't mind having extra chemicals like that lying around. However, it does introduce a conundrum where the DIY version could be more expensive than the pre-assembled version.
Let me know what you think!

Yeah @eren-rudy ! That's exactly what I was thinking. Just annotating some pictures to indicate where to apply the conformal coat would be super useful!
Yeah I hear you about the price concern, but I think it's a bit unavoidable that building it yourself will be a little more expensive than purchasing one. That's just how it goes if something is being produced in bulk vs a one-off. The good news is that people can decide whether they want a conformal coat or not when they build it.

Added some simple instructions in PR 45.


Add extract_training_data function

remember we need to add tests for this function and make sure it is working as expected (e.g. returning polygons and not points)

remember we need to add tests for this function and make sure it is working as expected (e.g. returning polygons and not points)

Yes, I have created the tests and in that test I've covered this point. I've 3 tests as of now, just looking around if I can add any more.


Split fetch_metadata into fetch_statistics and fetch_schema

Which issue does this PR close?
n/a
Rationale for this change

Small cleanup. Also avoids a bit of work within infer_schema.
What changes are included in this PR?

Are there any user-facing changes?

👍


Introduce weak and nonline attribute.

This is used to mark symbols like nallocx as weak and replace
with better implementation when available.

Thank you @nicolasnoble !

Known Issues #17550 #17814


Recreate target image from mind file

I was wondering how you generate the target image created by the compiler on the front end? I cannot seem to figure out how to place that image on the canvas through the image tracking data.
Thank you!

Then how did you go about creating this target image after the mind file is compiled?

There are low resolution and grey scale images, but not the original image.

How did you create the grey scale image from the tracking data?

Actually as far as i knew its not possible to extract images from .mind, to achieve your requirement you have to manually convert all the images to greyscale and store them in assets of your project and have a config.json which contains in which order the images are given for compilation and for which targetIndex which image to be shown.


Update link to dual screen GitHub sample project

@pulimento : Thanks for your contribution! The author(s) have been notified to review your proposed change.


The token can't be found in request header

Core Library
MSAL.js v2 (@azure/msal-browser)
Core Library Version
2.14.1
Wrapper Library
MSAL Angular (@azure/msal-angular)
Wrapper Library Version
2.0
Description
I use MsalInterceptor to do authentication. I can see the token the localstorage but in Network TAB, click any api it won't show the token in the header. I am not sure if it related protectedResourceMap.
I have tried
protectedResourceMap.set('https://graph.microsoft.com/v1.0/me', [
     'user.read',
   ]);

or if the endpoint is localhost:4200/api/projects, but I have many endpoints.
protectedResourceMap.set('/api/', [
     'user.read',
   ]);

MSAL Configuration
No response
Relevant Code Snippets
const protectedResourceMap = new Map<string, Array<string>>();
   protectedResourceMap.set('https://graph.microsoft-ppe.com/v1.0/me', ['user.read']);

export function MSALGuardConfigFactory(): MsalGuardConfiguration {
  return {
    interactionType: InteractionType.Popup,
    authRequest: {
      scopes: ['user.read']
    }
  };
}

providers: [
    {
      provide: HTTP_INTERCEPTORS,
      useClass: MsalInterceptor,
      multi: true
    },
    {
      provide: MSAL_INSTANCE,
      useFactory: MSALInstanceFactory
    },
    {
      provide: MSAL_GUARD_CONFIG,
      useFactory: MSALGuardConfigFactory
    },
    {
      provide: MSAL_INTERCEPTOR_CONFIG,
      useFactory: MSALInterceptorConfigFactory
    },
    MsalService,
    MsalGuard,
    MsalBroadcastService
  ],

Identity Provider
No response
Source
External (Customer)

@zhshqzyc Can you please provide your msal configuration? The code snippet you shared does not show where you are providing the protectedResourceMap to msal. Please review this doc for interceptor usage directions.

It is something like
export function MSALInstanceFactor(): IPublicClientApplication {
      return new PublicClientApplication(
          auth: {
               clientId: id,
               authority: 'https://login.microsoftonline.com/2eerrrrrrtr/',
               redirectUri: windows.location.origin
         },
        cache: {
              cacheLocation: 'localStorage'
        }
}

and
export function MSALInterceptorConfigFactor(): MsalInterceptorConfiguration {
      const protectedResourceMap = new Map<string, Array<string>>();
      protectedResourceMap.set('https://graph.microsoft.com/ v1.0/me', ['user.read']);
      protectedResourceMap.set('http://localhost:4200/apps/project', ['user.read']);
      return {
            interactionType: InteractionType.Popup,
            protectedResourceMap
     };
 }

@zhshqzyc Are both the graph api call and your app's api call missing the access token, or is it just your own local api call that's not working as expected? Also you should not send your Graph access token (User.Read scope) to your own api. That token is intended only for MS Graph.
Please provide a link to a minimal reproduction of this issue using one of our samples here so we can help you debug. Thanks!

try https://github.com/zhshqzyc/FullStack

@zhshqzyc Each resource (MS Graph or your API) has their own scopes (permissions) associated with them. User.Read, for example, is a MS Graph scope and is used to acquire an access token for MS Graph. If you are implementing your own custom API you need to create a custom scope on your app registration and request that. "customscope.read" is meaningless unless you've previously created a scope with that name. Read more about scopes and resources here.
Given the above, the token is not being added to your headers because you haven't acquired an access token with the given scopes (because the scope doesn't exist). First, expose an api on your app registration and add the new scope(s) as permissions, then update your protectedResourceMap to request this new scope when calling your custom API.

We are close the final line. Say the clientId is d16e1a06-3be2-4ae1-8bd4-718c19cecac3 Please tell me which one is correct if I want use wildcard for all?
One
 protectedResourceMap.set('http://localhost:8080/api', ['api://d16e1a06-3be2-4ae1-8bd4-718c19cecac3/api']);
Two
 protectedResourceMap.set('http://localhost:8080/*', ['api://d16e1a06-3be2-4ae1-8bd4-718c19cecac3/.read']);
Three
 protectedResourceMap.set('http://localhost:8080', ['api://d16e1a06-3be2-4ae1-8bd4-718c19cecac3.read']);
Four
 protectedResourceMap.set('http://localhost:8080', ['api://d16e1a06-3be2-4ae1-8bd4-718c19cecac3/.read']);
Five: all above are wrong, should be .....

@zhshqzyc Regarding the resource if all your apis reside under /api you may need to try the following as it can depend on how your app is configured:
http://localhost:8080/api/* or /api/* or api/*
For more information please read this doc
Regarding the scope you will find the correct uri on your app registration when you click on it.

For the right side of protectedResourceMap.set.
['api://d16e1a06-3be2-4ae1-8bd4-718c19cecac3/api']
Is the d16e1a06-3be2-4ae1-8bd4-718c19cecac3 clientId or application Id? I think clientId is different from applicationId.

@zhshqzyc

Is the d16e1a06-3be2-4ae1-8bd4-718c19cecac3 clientId or application Id? I think clientId is different from applicationId.

ClientId and ApplicationId are the same thing.

I forked the code from https://www.youtube.com/watch?v=xDkvoAV55F4. The author didn't setup scope in his application. Is that okay for still using protectedResource?

He did. See here. If you need an access token for an API you need to specify at least 1 scope in the protectedResourceMap. If the API does not require an access token (unprotected) then you do not need to specify a scope in the protectedResourceMap and can pass null instead.

That is my confusion. My thought is to add a scope is through portal setting something such as the 'read' in the image
.
Then adding the code in app.module.ts. But the author of the video didn't set it in portal. Do I miss something? Because I still can't get the token attached in the header. I worried that I maybe miss some setting in azure portal.

@zhshqzyc

My thought is to add a scope is through portal setting something such as the 'read' in the image

Yes, you need to do this.

Then adding the code in app.module.ts. But the author of the video didn't set it in portal. Do I miss something?

I've taken a quick look at the video. He actually does do this, starting at the 11:00 mark.

It doesn't work well if I put them into protectedResourceMap together. Because I still can't get the token attached in the header. It popups more login windows then gone immediately.

This is likely because you haven't registered the scope in the portal. The access token will only be acquired if a scope is both registered and requested.

Yes, I think that I am close the final line. I can see the Bearer token in the header. One more question.
loginPopup() {     if (this.msalGuardConfig.authRequest){       this.authService.loginPopup({...this.msalGuardConfig.authRequest} as PopupRequest)         .subscribe((response: AuthenticationResult) => {           console.log(response);           this.authService.instance.setActiveAccount(response.account);         });       } else {         this.authService.loginPopup()           .subscribe((response: AuthenticationResult) => {             this.authService.instance.setActiveAccount(response.account);       });     }   }
In the above code, I want to see what is response after I login. So I added console.log(response). I can't find the refresh token in the response. Why?

@zhshqzyc The refresh token is not exposed by design, it is managed internally by MSAL. Can you please explain why you need it?

I don't know. Just the old applications used the fresh token. I am not sure how msal 2.0 works if the access token expired. Does a new window pops up if the token is expired?

No. Msal.js will use the refresh token (which it manages internally) to acquire a new access token when the access token is expired. When the refresh token is expired, msal.js will attempt to silently acquire a new set of both access and refresh tokens and if that fails only then will you be prompted to sign in again. You can read more about how msal.js manages token expiration/renewal here


Don't read bytes beyond the end pointer in consOpen

In some cases consOpen reads one byte after the end pointer. I discovered it using ghcjs where in the implementation of ByteString there are runtime checks whether accessed bytes are inside the boundaries, this seem to fix the issue.

Thanks for this, I am working on a new release of 'flat' and will incorporate your changes.
Do you have any simple test that shows this issue?

No, it's very hard to show this problem in ghc, you have to allocate a ByteString  at the end of memory segment so that reading next byte will cause a SEGFAULT, and maybe that won't even work I can only reproduce this probelm in GHCJS

Even a test that works only under ghcjs would be useful. Can you reproduce
it systematically or just occasionally?
Il giorno mer 12 gen 2022 alle ore 00:48 Vladislav Lagunov <
@.***> ha scritto:

No, it's very hard to show this problem in ghc, you have to allocate a
ByteString at the end of memory segment so that reading next byte will
cause a SEGFAULT, and maybe that won't even work I can only reproduce this
probelm in GHCJS
—
Reply to this email directly, view it on GitHub
https://github.com/Quid2/flat/pull/26#issuecomment-1010477990, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAFRQNJFCZ244H45VAV5ITUVS6UBANCNFSM5LHHOQSA
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you commented.Message ID:
@.***>

--
Pasqualino "Titto" Assini
http://networkpolitics.svbtle.com
http://quid2.org/

Not a test but I managed to get a minimal example that reliable reproduces this problem (using GHCJS). And problem only occurs when the input ByteString is constructed using createFromArrayBuffer, parsing a ByteString with same contents but constructed with Data.ByteString.pack won't raise this error (apparently in this case bounds check is not performed). Last fact I found about this problem is that the datatype has to have three or more constructors otherwise problem also doesn't happen.
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE TypeApplications #-}
import Data.ByteString as BS
import Data.JSString
import Flat
import GHC.Generics
import JavaScript.TypedArray.ArrayBuffer
import qualified GHCJS.Buffer as Buffer

data Foo
  = Foo
  | Bar
  deriving (Show, Generic, Flat)

main :: IO ()
main = do
  -- >>> [1]
  print $ BS.unpack $ flat Foo
  -- >>> Right Foo
  print $ unflat @Foo $ flat Foo
  -- >>> Right Foo
  print $ unflat @Foo $ BS.pack [1]
  -- >>> RangeError: Offset is outside the bounds of the DataView
  -- at DataView.getUint16
  print $ unflat @Foo $ fromSingleByte 1

fromSingleByte :: Int -> ByteString
fromSingleByte = Buffer.toByteString 0 Nothing .
  Buffer.createFromArrayBuffer . fromSingleByte_js

foreign import javascript unsafe
  "var buf = new ArrayBuffer(1);\
  \var view = new Int8Array(buf);\
  \view[0] = $1;\
  \$r = buf;"
  fromSingleByte_js :: Int -> ArrayBuffer
[consopen-counterexample.tar.gz](https://github.com/Quid2/flat/files/7877134/consopen-counterexample.tar.gz)

First of all, many  thanks for your help in this matter and apologies for taking so long in addressing it.
Maybe you should have been a bit more forceful.
Rather than wasting time in writing a test case you should have simply told me:
"Bloody fool, can't you see that you are guilty of a classic one-off bug? I therefore direct and command you to immediately merge this fix and afterwards go hide your head in shame under the nearest rock!"
I am sure that I would have complied expeditiously :-)
best

Haha, Ok) I'm really happy to contribute to this library, I'm using it a lot as transport in fullstack haskell apps, it's a great tool. Thanks to you and other people who develops and maintains flat 👍!


lime suite: The IConnection overhaul

About IConnection
IConnection is our entry point for communication and streaming with a device. The LMS7 driver class uses IConnection to interface with the device; and devices creators implement IConnection's methods to specify communication specifics.
Major goals
The main goals to come out of this re-work:

IConnection is device and protocol independent. It represents a device with a lime RFIC (or more). And says nothing about interface and protocol. There shouldn't be any enums in the public headers for stream or novena, or usb, pcie for example.
IConnection has API calls for all of the things we want to do with a device. SPI comms, streaming, control external switches associated with the bandselect.

RFIC enumeration interface
One or more RFICs may be present on a device. We need to enumerate the number of devices and to know which channels and slaves are present for that RFIC.

query the number of RFICs (default 1)
query a structure for each RFIC index that specifies:

a list of streaming rx channels
a list of streaming tx channels
spi slave number for RFIC
optional spi slave for external clock

New streaming interface

synchronous read and write interfaces with timeouts
each API call takes a channel index number
configuration commands to start streaming, request busts

New spi interface

bulk writes of spi addresses
bulk reads of spi addresses
each api calls takes a spi slave number

Other configuration calls

query capabilities, anything needed to implement device-specific behaviour in a general way (TBD)
query and set device time from FPGA registers
calls to handle band selection change by the lms-driver that might need to trigger external antenna switches
etc

Work on virtual methods here: https://github.com/limemicro/lms7suite/tree/connection_registry2

Made a quick additional function list for the IConnection. These should cover most of the possibly needed operations IConnection.txt, it still needs refining.
I think there should be listing of not just RFIC, but all the IC that can be controlled. Like:
0. LMS7002_0 (hasSPI, hasRFchannels)

LMS7002_1  (hasSPI,  hasRFchannels)
Si5351C  (hasSPI)
FPGA (isProgramable)
MCU (isProgramable)
....

This would allow GUI to abstract on board devices into just to single id which would be supplied to SPI, programming or other data transfering functions as destination parameter. Also listing all ICs by names would allow to connect existing GUI control panels to their respective device Ids just by matching names.
Sending/Transmitting samples:
I think the multiple channels samples should be passed as a 2D array, because most of the time all channels data are sent by interleaving them. Passing each channel with separate function call causes uncertainty when the complete samples packet could be formed, possibly missing target timestamp while not all channels are passed into packet.

Made a quick additional function list for the IConnection. These should cover most of the possibly needed operations IConnection.txt, it still needs refining.
I think there should be listing of not just RFIC, but all the IC that can be controlled. Like:

I see the ICInfo, and I created a similar RFICInfo. So I will combine these two structures together to ideally, query all capabilities about a set of related hardware. I think it will make sense to expand this struct in the future if a new "technical" feature or difference arises in a future hardware.
I think maybe if there was infinite time, I would abstract out the Si5351C as just a function to set/get the external reference clock -- that some devices would implement with the Si5351C driver. Perhaps for now, we just keep it as-is.

Sending/Transmitting samples:
I think the multiple channels samples should be passed as a 2D array, because most of the time all channels data are sent by interleaving them. Passing each channel with separate function call causes uncertainty when the complete samples packet could be formed, possibly missing target timestamp while not all channels are passed into packet.

Thats a good point. I think instead of a channel index, the stream calls will take a streamId. A board with two LMS7 RFIC may have four streamids for rx0, rx1, tx0, tx1
And yes, the stream calls should take an array/vector of pointers. That works much better. Thats how SoapySDR does it as well.

@rjonaitis  I saw the IConnectionIntegration branch. Thats exactly what I am thinking. At this point I am trying not to break the ability to compile so I can work on the other stuff (soapy sdr and stream). But I think it should be OK to merge connection_develop into IConnectionIntegration. But when everything compiles we should merge it all into one branch.
A few new changes to IConnection and LMS64CProtocol:

I added a general I2C API. But specifically its for the Si5351C, possibly other ICs later.

WriteI2C takes an address and array of bytes (string)
ReadI2C takes an address, number of bytes to read, yields an array of bytes (string)

The device info has the rfic spi slave numbers (an array)

Also Si5351 I2C address
And ADF4002 slave address

The LMS64C protocol implements SPI and I2C and dispatches to the appropriate function based on the address number

So hopefully, if things are working as planned, the class Si5351C should be able to use the I2C API now, and using the address provided by device info. :-)

Looks great. I replaced LMScomms to IConnection in most modules, left out some that are not necessary for Stream board, they can be done later. Now that the IConnection pointer is going to change for each device, the pointer has to be passed into all modules upon each time the device is changed, instead of passing it to constructors as it is now.

the pointer has to be passed into all modules upon each time the device is changed, instead of passing it to constructors as it is now.

Thats probably the cleanest way to do it. In this case, modules can have null IConnections, they will have to check if IConnection != null before IConnection IsOpen.
However, there is also a lazy solution using something like the connection manager. If you saw what I did to lmsComms, its basically a connection that hold a connection pointer. It implements the virtual methods and forwards them to the internal pointer.
My lmsComms changes are a temporary hack, but we can do the same basic idea for IConnection (IConnectionWrapper). This can prevent the gui classes from needing a new call to Initialize()...

I saw, your current changes, that would be the easiest solution, but having entire class just for wrapping single pointer and not doing anything else seams pointless :D.
I was thinking maybe just pass reference of a pointer of IConnection, e.g LMS7002M(IConnection &*port), but that could get confusing.

I was thinking maybe just pass pointer to a pointer of IConnection, e.g LMS7002M(IConnection **port), but that could get confusing.

Another option:
The GUI classes could hold a reference to a shared_ptr. We would have to check if the connection held a pointer, but the API use of IConnection would not change. Its important that a reference to a shared_pointer is held, because we still need to reset(new IConnection) in one place, in the connection manager.
A similar option:
Similar to the shared pointer, but without the reference stuff. IConnectionWrapper would be stored as regular pointer in the wxgui classes, but it would act like a shared pointer using operator->() to get access to the internal IConnection.
class IConnectionWrapper
{
public:
IConnection *GetConnection();
void SetConnection(IConnection *);
IConnection* operator->() const;

private:
IConnection *internal;
};

Both of these options prevent us from making a useless IConnection class that overloads all of the operators.

Now the wrapper options seams more convenient. It would also allow transfering of callback function pointers when changing connected device.

I made IConnectionProxy: https://github.com/limemicro/lms7suite/commit/599def7212bed681287612add06828d3718d0e1a

Yes, agreed :-)

Yes, agreed :-)

Quick update:  I deleted the lmscomms, and all of the remaining classes take IConnection * for initialize. Internally, these classes dynamic cast the iconnection to the LMS64CProtocol. So these classes should work like this, and we can gradually convert things over.
And because dynamic cast could result in null if the IConnection is not actually a LMS64CProtocol. So there may be a few more places to check for m_ser != nullptr.

I took care of all or most of the remaining "TODO use devIndex" code: https://github.com/limemicro/lms7suite/commit/e90a1451f94a6c8b0d2cd659ff06342e372f7bb9
I know the streaming abstraction needs work, but currently the old API should be still functioning. So what else is remaining as an open issue? In other words, what else do we need to do so that all previous functionality with the GUI works again, 100%.

Second update: I totally forgot about the CMD_BRDSPI_RD/CMD_BRDSPI_WR. Many of those calls above were for the SPI registers in the FPGA.
A few thoughts about FPGA registers:

I'm not sure there is really a write flag bit (1<<31) like in the RFIC. We can forgo the 0x7fff masks and |  (1<<31)
Perhaps this merits a generic FPGA register API. Read/write 32-bit registers with 32-bit addresses. It just so happens that the the interface is SPI over LMS64C for some FPGA boards.

So what else is remaining as an open issue? In other words, what else do we need to do so that all previous functionality with the GUI works again, 100%.

Mainly the MCU programming and Custom board parameters are left to do. I'm working on them right now.
Also there should to be a way of selecting which device is connected from the connectionRegistry by having actual connection pointer. Because now when the connection dialog closes, the connection index is lost, and the actual index might change if devices list changes.

I'm not sure there is really a write flag bit (1<<31) like in the RFIC. We can forgo the 0x7fff masks and | (1<<31)

Currently i don't know how FPGA handles communication direction. The LMS64C protocol idea was that the direction would be infered from command byte, and the firmware would handle the necessary bit changes, just like for the LMS7002 SPI. I'll check up how it actually works.

Perhaps this merits a generic FPGA register API. Read/write 32-bit registers with 32-bit addresses. It just so happens that the the interface is SPI over LMS64C for some FPGA boards.

I guess we could add FPGA read/write to IConnection instead of reusing transactSPI.

I just wanted to ask. I see a lot of classes that have a separate Iconnection for control and data. It looks like this causes a tremendous amount of code duplication. What was the design decision behind this? Like using Stream board on USB3, and EVB7 over the ttyUSB serial connection? If thats the case, perhaps we could make a new ConnectionEntry that combines the two connections intelligently to appear as one interface... Not sure though, Thanks.

Mainly the MCU programming and Custom board parameters are left to do. I'm working on them right now.

Cool

Also there should to be a way of selecting which device is connected from the connectionRegistry by having actual connection pointer. Because now when the connection dialog closes, the connection index is lost, and the actual index might change if devices list changes.

I see the problem. One idea: We could store the ConnectionHandle for the open connection. When the dialogue is re-loaded, we select the index based on currentHandle == handles[i].

So, for starters, I will add an equality operator for ConnectionHandle.
And maybe, if the connection object automatically stored its ConnectionHandle used for creation, that would be helpful for solving the problem, and potentially others similar uses.

Currently i don't know how FPGA handles communication direction. The LMS64C protocol idea was that the direction would be infered from command byte, and the firmware would handle the necessary bit changes, just like for the LMS7002 SPI. I'll check up how it actually works.

I didn't see the (1<<31) in the master branch. So I think BRDSPI read/write is just inferred from the packet command enum.
Also for interest, I think that the LMS64C does not need (1<<31) for the RFIC spi, its probably added by the FX3 based on the packet command enum. However, the LMS7002M driver must set this bit anyway so that other IConnection implementations will have the correct SPI bits; especially if they just operate as a pass-through to something like spi-dev.

I guess we could add FPGA read/write to IConnection instead of reusing transactSPI.

The philosophy behind the transactSPI/and read/writeI2C was that a specific device would 1) have an PI interface, and 2) have a translation between API and physical interface in one place only. Examples are Si5351C, lms7002m, ADF4002.
However, for the FPGA registers, quite a few files need this interface. So I think its simpler to have a register interface API to keep the code simple. Even if the usage is very "device specific", having an easy API to read/write registers seems like a good idea and should extend well to other boards.
I will take a shot at this...

Update:

added read/write registers api: https://github.com/limemicro/lms7suite/commit/4e197104ad0c6bfe1deca21b103f12112ccea899
added connection dialog index: https://github.com/limemicro/lms7suite/commit/9fc5c65c526be8598fb95a31dcdc8a202b9743c4

I just wanted to ask. I see a lot of classes that have a separate Iconnection for control and data. It looks like this causes a tremendous amount of code duplication. What was the design decision behind this? Like using Stream board on USB3, and EVB7 over the ttyUSB serial connection? If thats the case, perhaps we could make a new ConnectionEntry that combines the two connections intelligently to appear as one interface... Not sure though, Thanks.

At first there was only the control connection, the separate data connection had to be done when Stream and EVB7 was needed to be connected simultaneously through COM and USB connections. The problem with creating a single combined connection of these, is that it's impossible to detect which ports should be paired. As there can be more devices connected to PC that appear as COM ports, the ammount of possible combinations of them and USB devices grow exponentialy. Also the same Stream & EVB7 combo can be connected with just the Stream USB port, depending on some resistors on the board, that adds even more possible connection options. So passing two connections for control and data was more flexibile and simplier than trying to combine them.

Also for interest, I think that the LMS64C does not need (1<<31) for the RFIC spi, its probably added by the FX3 based on the packet command enum. However, the LMS7002M driver must set this bit anyway so that other IConnection implementations will have the correct SPI bits; especially if they just operate as a pass-through to something like spi-dev.

Yes the LMS64C ignores the (1<<31) bit, and sets it according to command enum. Yeah the Novena communication required that bit set when working with spi-dev, at that time i was adding it inside LMScomms instead of LMS7002 logic.

So passing two connections for control and data was more flexibile and simplier than trying to combine them.

I see what you mean.
It should be possible to expand the STREAM connection to discover COM devices and return USB + COM connection handle results. And then the STREAM Connection can re-use the COM connection code for the SPI (other several other) interfaces. So rather than two separate device columns in the dialog, you would get only one:

STREAM0 USB
STREAM0 USB + /dev/ttyACM1
STREAM0 USB + /dev/ttyACM2
STREAM1 USB
STREAM1 USB + /dev/ttyACM1
STREAM1 USB + /dev/ttyACM2

This would simplify the code in many places, but yielding all of the connection discovery results is sort of an N x M problem, for N stream boards, and M COM connections. But then maybe some of these results could be eliminated by performing test communications. And it would only look bad in extreme cases with too many COM ports. Anyway, its just a thought.

But then maybe some of these results could be eliminated by performing test communications. And it would only look bad in extreme cases with too many COM ports. Anyway, its just a thought.

I was thinking about doing that, but performing communications test to actually know what device is connected to each COM port can add up to great amount of time, considering that most of them would not respond to query and would need to wait for timeouts.
This might not be a case on Linux because not many devices appear as ttyACM. But for Windows users (at least for other developers that have many devices pluged in that appears as COM) this can be really annoying.


Enhance the speed and stability.

AB Download Manager is a good download tool. Thanks to Developer amir1376.
But the speed and stability of download are weaker than Internet Download Manager, especially speed.
I hope to enhance the speed and stability of download.
THANKS.

Using aria2 under the hood would be amazing

I think we should discuss how to enhance the speed and stability. After all, the speed and stability are the two most important parameters for all download tools!!!!


Specify output file of annotated data for Rasa X

What problem are you trying to solve?
Currently, you can't specify which file the annotated data from Rasa X gets added to when you push the NLU data to your git repository. As far as I know, it depends on the order in which your OS reads the files in your directory. It seems to get added to the first yml file.
I would like to be able to specify the NLU file the data gets appended to inside the data folder. In my project, we have multiple NLU files in the data folder that we don't want to combine for various reasons (mostly because we don't want to mix real and synthetic data) and the annotated data gets appended to the "wrong" file. That means I then have to manually copy it to the correct file and push the changes which is not scalable.
What's your suggested solution?
I don't know the technical details but it would be great if you could specify the output file for annotated data via the Rasa X UI.
Examples (if relevant)
No response
Is anything blocking this from being implemented? (if relevant)
No response
Definition of Done
The feature would be done once it is possible to specify the output file for the annotated data.

Thanks for submitting this feature request 🚀 @akelad will get back to you about it soon! ✨

closing and moving this to the rasa-x repo


Catch errors from wax related to timeout limits.

Related to: https://github.com/CartoDB/wax/issues/16
Depends on: https://github.com/CartoDB/wax/pull/17
It includes the code necessary to catch the errors thrown by wax when the request fails.
Before to merge, we need to include the wax.cartodb.js from the make op in wax, once the PR above is merged. This file needs to be included in the vendor folder.

retest this please

Closed since we're removing wax

Reopened, we're not removing wax just yet!


Routes trying to match too strict?

Here's an example code:
{-# LANGUAGE OverloadedStrings #-}
import Web.Scotty

import Data.Monoid (mconcat)

main = scotty 3030 $ do
    get "/:word" $ do
        beam <- param "word"
        html $ mconcat ["
Scotty, ", beam, " me up!
"]

The following works:
$ curl localhost:3030/beam

Scotty, beam me up!
%

But when there's an extra slash, it doesn't:
$ curl localhost:3030//beam

404: File Not Found!
%

@SkyWriter is this any issue ?  It's like gray side of HTTP RFC 2396 it is just matter of interpretation valid url is "/segment/" which says "//" is valid but not how to deal with it. For me it's fine like it is now.

Not much of an issue, really. It's just something that goes against common behavior.
E.g. https://github.com/scotty-web/scotty/ and https://github.com/scotty-web//scotty/ are rendering the same page, and that's pretty much what is happening with most (all?) of other frameworks.
Coming from a Ruby background I could come up with something like:
require 'sinatra'

get '/:word' do
  "
Hello, #{params[:word]}!
"
end

... And that would yield "Hello, world!" for both /world and //world. One might argue whether the second one should rather be "Hello, /world!", but getting 404 instead is something surprising. Not shocking since in the end it's a wrong URL, but surprising.
So, the question is: maybe it makes sense to somehow canonize the URL before parsing? Something along the lines of intercalate "/" . filter (not . null) . splitOn "/" (which is, like it always does, not covering the necessary corner cases, but delivers the premise).

i thought about this and am leaning toward being okay with implementing this or taking a PR, provided tests are written and that it doesn't somehow introduce a vulnerability, which i find extremely unlikely.

Submitted a pull request for this. Can you please take a look when you get a minute, @chessai? Thanks!


Debugging test with Node.js

I'm porting a Scala project to Scala.js and some of the test are failing with Scala.js and I need to trace what's going on. This application needs to run as a Node.js app, so I need to run and debug the tests in a Node.js enviroment.
I tried by adding jsEnv in Test := new org.scalajs.jsenv.nodejs.NodeJSEnv(org.scalajs.jsenv.nodejs.NodeJSEnv.Config().withArgs(List("--inspect-brk"))) in the build.sbt but when I run test I get this in the chrome inspector:
@scalajs-test-framework-detector:org.scalacheck.ScalaCheckFramework    VM84 [stdin]:28
@scalajs-test-framework-detector:                                                                                VM84 [stdin]:28
@scalajs-test-framework-detector:org.scalatest.tools.Framework                     VM84 [stdin]:28
@scalajs-test-framework-detector:

The execution is not stopping and I can't see the source code in the chrome inspector. I made a small project try debugging a simple test: https://github.com/Jarlakxen/scalajs-node-debugging
If I run sbt test I'm expecting to see the chrome inspector show up stopped in the first js line.

When I try running test inside the project you provide, I just get a
[debug] Starting process: node --inspect-brk
java.io.IOException: Stream closed
        at java.lang.ProcessBuilder$NullOutputStream.write(ProcessBuilder.java:433)
        at java.io.OutputStream.write(OutputStream.java:116)
        at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
        at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
        at java.io.FilterOutputStream.close(FilterOutputStream.java:158)
        at org.scalajs.jsenv.ExternalJSEnv$AbstractExtRunner.pipeVMData(ExternalJSEnv.scala:97)
        ...

Is there something I need to install/launch separately?

Mmh... that's weird. Which version of Node.js do you have?
I'm using 8, but with 7 should be the same.

Ah, I have 6.9.1. I'll retry later with a more recent version.

Oh! Sorry I forgot to mention the node version. Between 6 and 7 they changed --inspect --debug-brk to --inspect-brk

This seems to work very well with Scala.js 0.6.23 and Node.js v10.0.0. I suspect it was fixed in 0.6.22 thanks to #3122.
Use
parallelExecution in Test := false

in sbt settings to prevent Scala.js from using multiple Node.js processes (before 0.6.22 that was not good enough because Scala.js would still use 3 processes with that config; not anymore).
You can then debug with the Chrome DevTools, although at first you won't see the sources, because they are dynamically loaded with a require. I recommend calling
scala.scalajs.js.special.debugger()

at the beginning of the test you want to debug. That works well.


Update and rename lib/domains/info to lib/domains/info/fshnstudent/fshn....

...txt
Adding the email domain for the students of the Faculty of Natural Sciences at University of Tirana.

the university domain is www.unitir.edu.al/ - please provide the information, confirming the committed addresses also belong to the university. Thanks!


Energy calibration for core levels using side bands

It would be nice to add the possibility of using side bands measured at t0 for energy calibration.
If we e.g. bin data in dldTimeSteps and delayStage, select slices around to and also select in dldTimeSteps position around main core level peaks as well as around SBs we can get in some cases 5-10 energy points which are well-defined and they are intense enough to be used for find_bias_peaks routine. The only problem is that all of those will contain only one sample bias value, but this can be fed inside as an array of biases/energies.
This would be of help in case users forgot to do a proper energy calibration run (happening quite often :) )

Just to get a better idea about what I am talking about, here is a small figure of EDC from W4f core levels with defined regions for dldTimeSteps (yellow and red) as well as several orders of side bands right at t0.

Those defined regions will directly correspond to kinetic energies of those peaks (31.4 eV, 33.6 eV) and side bands
(26.6 eV, 27.8 eV, 29.0 eV, 30.2 eV and, 34.8 eV)

It's clear what you mean, and it should be possible to use the current fitting routine also for this case. Just the parameter generation will require a new workflow (e.g. multi peak identification routine).

It's clear what you mean, and it should be possible to use the current fitting routine also for this case. Just the parameter generation will require a new workflow (e.g. multi peak identification routine).

I have tested the routine to find peaks:
# binned data
roi = slice(4000, 4500)
delay = slice(1246.2,1246.6)
data = res.sel(delayStage=delay, dldTimeSteps=roi).sum('delayStage')

from scipy.signal import find_peaks
distance = 7
peaks, _ = find_peaks(data, height=None, distance=distance)

Which gives me this

Could you explain how this adds with the current fitting routine?


Allow users to set email_address_visibility during account creation.

First commit adds backend code to set email_address_visibility during account creation.
Second commit adds UI to allow user to set email_address_visibility during account creation.

Fixes: #24310

Screenshots and screen captures:

Self-review checklist

[ ] Self-reviewed the changes for clarity and maintainability
(variable names, code reuse, readability, etc.).

Communicate decisions, questions, and potential concerns.

[ ] Explains differences from previous plans (e.g., issue description).
[ ] Highlights technical choices and bugs encountered.
[ ] Calls out remaining decisions and concerns.
[ ] Automated tests verify logic where appropriate.

Individual commits are ready for review (see commit discipline).

[ ] Each commit is a coherent idea.
[ ] Commit message(s) explain reasoning and motivation for changes.

Completed manual review and testing of the following:

[ ] Visual appearance of the changes.
[ ] Responsiveness and internationalization.
[ ] Strings and tooltips.
[ ] End-to-end functionality of buttons, interactions and flows.
[ ] Corner cases, error conditions, and easily imagined bugs.

Thanks! Can we reduce the vertical spacing between the two lines of the notice?

The dropdown styling looks a bit ugly to me. Is there something better we can reuse from elsewhere? I'd like to at least have more vertical space around the text.

If I change the default email visibility user setting while a user is on the "Create your account" page, clicking "Sign up" takes me to:

That's all I've got. :)

Tested and it works fine if the default setting is changed while a user is going through the registration flow (once I checked by logging in as Desdemona in a separate browser).

Updated the PR -

Fixed the vertical spacing between lines.
Also, fixed the dropdown design. It was due to recently added modal_select class not being present. Have kept the font-size for select elements same as rest of the modal which we do for other modals in the app too.
Added code to show different notice for Admins and moderators case.
Updated the code for tagging the options for translation.

The left alignment of the new text looks off (it's a bit left of the options it's under)

The updated vertical spacing looks good though!

We use Admins in the options in the app

Yeah, probably we should use "Admins" for consistency with the rest of the app.

So, what should we do when user is importing settings from another account while creating a new realm? Should we use the email_address_visibility of other account or just set the database default of Everyone?

I think we probably want to always be showing the user the value that we're going to use for this -- so probably the simplest story is that this setting is never copied from other accounts -- it always uses the value that's displayed in registration (or if a user is created in the API, the RealmUserDefault value -- but there will never be an existing account to copy from in that case anyway)

Yeah, probably we should use "Admins" for consistency with the rest of the app.

Yeah, I think "Admins" in the dropdown, but "Administrators" in the other text.

so probably the simplest story is that this setting is never copied from other accounts

I agree with that approach. We should tweak https://zulip.com/help/import-your-settings, so that it says something like:

Privacy settings, except for email visibility, which you can configure when you join an organization.

Documentation PR: #24448

Updated the PR.

Fixed the alignment of the text on the page.
Now we use Admins in options and Administrators in other text. Added one more field in EMAIL_ADDRESS_VISIBILITY_TYPES_MAP since we want different text in option and in the text above the dropdown in the modal.

I think we probably want to always be showing the user the value that we're going to use for this -- so probably the simplest story is that this setting is never copied from other accounts -- it always uses the value that's displayed in registration (or if a user is created in the API, the RealmUserDefault value -- but there will never be an existing account to copy from in that case anyway)

Just to be clear, we do not show the email_address_visibility value in registration form when creating an organization and user can copy settings from existing account while creating new organization.

Do want to point the help link with modal heading to /help/configure-email-visibility? We already have "after you join" pointing to that link.

Do want to point the help link with modal heading to /help/configure-email-visibility? We already have "after you join" pointing to that link.

I think just one link is enough. The current way it works seems fine to me, or we could drop the link on "after you join" and put it in the modal heading instead.

Ok. Keeping link on "after you join" seems better to me. Will keep it that way only.

This lgtm but I think we need a bit more copy-editing in the modal; awaiting updated text from @alya before integrating.

OK here's new language for the modal's text:

Configure email address privacy

Zulip lets you control which roles in the organization can view your email address. Do you want to change the privacy setting for your email from the default configuration for this organization?

Who can access your email address

Ok.
Just to confirm, we would still keep the text after the dropdown "You can also change this setting after you join", right?

This is great, merged, thanks @sahil839!


GitHub Templates

Would be quite nice if there are some templates for issues and pull requests, for example anyone can see what type of information they have to give us. (Icon Request/Bug Report)
See this blogpost for more informations.

Great idea jens1o!

@jens1o I think this is a must. We're receiving lots of Github issues with no proper information like #140 or #137. Can you take care of it? If you want, of course. :wink: If not, I will try to create this templates asap. Maybe we can review them together and decide if they're right or wrong. What do you think?

Of course :)
I'll do that, you'll correcting my grammar mistakes, right?

Of course! :stuck_out_tongue_winking_eye: Many thanks Jens! :grinning:

@jens1o Super amazing work you've done here! :100:

:smile:
You've made me laughing loudly.

@jens1o we could also add into the issues template the steps needed to ask for an icon: extensions, official icon, alternative icon... what do you think?

That sounds great. Also, how about explicity asking them for bugs?

*notices in Dev Console

It's cool for me!

Should/Could I take care of it?

Of course: wink:

:smile:

The only problem is, after all the Template is way too long. :sob:

Yes, you're right. I've already thought about this but I prefer to be explicit even at risk of overwhelm the other users and receive proper feedback from the beginning. If not, we'll end up writing always the same questions to the same type of request.

GitHub should improve this, and make it more intiuitve.

How about add a notice about the title?(Or adding a label.)
It oftens confused me, whether it is a icon request or a foldericon request. Could we add a notice here @robertohuertasm ?

It's OK for me. Great ideas: specific label and template check. :+1:

Can you create the labels?

@jens1o you got it! :grin:

thanks


Set errno to zero for checking it after strtol().

It is necessary to clear the errno out first before calling strtol.
This was causing issues when uid/gid was passed as 0.
Signed-off-by: Archana Shinde<EMAIL_ADDRESS>

LGTM


3.4

Update to 3.4.

@EludeQ Would it be possible to close this PR? It's not your fault but GitHub links PRs on forks that contain specific commits in the detailed information for each commit, and even gives it higher priority that the actual upstream PR where that commit originated:

A PR like this is not the proper way to update your fork's branch, see https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork for details on how to do this from the GitHub UI.


Public files not showing up on web UI for user patcon

This appears empty to me, even though I have files there: https://keybase.pub/patcon

should be two text files: signal.hex.key and signal.base64.key
when I added them, a desktop notifcation said it was being sync'd
I can add other users via the GUI, and their folders are accessible on my filesystem
have not yet checked whether other keybase users can mount my public files

Keybase GUI Version: 1.0.9-20160205170023+ce05b7a

OK, @tehbmar informed me that he can mount my public dir and see the files. So it seems that it's the web UI.
Let me know if I should reticket in another repo :)

Hi @patcon.  I think this is a known bug that we have an outstanding fix for (pending internal code review right now).  Looks like it's working on keybase.pub (https://keybase.pub/patcon/), so I think you are good to go.  (We probably just needed to restart the KBFS daemon on the GUI.)  Please close if things seem ok to you now.

Yep, looks good to me! Thanks! I did restart quite a few times fwiw, using keybase ctl restart. This seemed to require another keybase unlock as well

It wasn't you that needed the restart, it was our daemon on KBFS pub.  Sorry for the confusion.


Questions re: bracket and brace rendering

Consider the following argument parser:
import argparse
import rich.console
from rich_argparse import RichHelpFormatter

console = rich.console.Console(markup=False, emoji=False, highlight=False)
parser = argparse.ArgumentParser(
    prog="list",
    description="Show all installed applications",
    add_help=False,
    formatter_class=RichHelpFormatter,
)
parser.add_argument(
    "config_name",
    nargs="?",
    help="a configuration name",
)
parser.add_argument(
    "-r",
    "--raw",
    action="store_true",
    required=True,
    help="show apps without formatting",
)
mutex = parser.add_mutually_exclusive_group()
mutex.add_argument(
    "--rich",
    action="store_true",
    help="Rich and poor are mutually exclusive. Choose either one but not both.",
)
mutex.add_argument(
    "--poor", action="store_false", dest="rich", help="Does poor mean --not-rich 😉?"
)
parser.add_argument(
    "-s",
    "--state",
    choices=["running", "stopped"],
    help="only show apps in a given state",
)
console.print(parser.format_help())

Note the inconsistent highlighting of brackets and braces.

options (i.e. -s) that are not required are surrounded in unstyled brackets
positional arguments that are not required (i.e. config_name) are surrounded by brackets styled with argparse.args
the mutually exclusive options --rich and --poor are surrounded by unstyled brackets and separated by an unstyled pipe character
the choices for the -s option are also mutually exclusive. They are surrounded by braces, and separated by a comma, but the braces and comma are styled with argparse.metavar

Observation: The brackets around optional arguments and the pipe separating the mutually exclusive options are the only text output which can not be styled using RichHelpFormatter.styles.
Suggestion: choices for an option (i.e. -s) of which you can only choose one, and mutually exclusive options (i.e. --rich and --poor), of which you can only choose one, should be rendered consistently.
Questions:

Are these behaviors with [brackets|braces|commas|pipes] intentional?
If not, would you consider rendering all of these symbols (braces, brackets, commas, pipes) with a new style, perhaps something like "argparse.symbols"?

After thinking about this a bit more, I think the brackets handling within argparse usage is too fragile. Some of the upstream bugs are enumerated here https://github.com/python/cpython/pull/105039. Implementing this proposal would only lead to more errors with no real benefit compared to the effort. I am closing this now but I may reconsider it when argparse handling of usage is fixed and its semantics are clear.


first contribution in gssoc

I added Ping_Pong Game project made by using Html, Css and Javascript Issue Number is #79
I want to make smaller and easier version of this game. The main points for the game are -
There will be 2 rods at the top and bottom of the screen.
Both rods will be controlled with the same keys. In other words, they will move together.
When the game starts, an alert should be shown about the highest score and the player who scored it. If there is no such record, say 'this is your first time'.
If the score becomes highest, then store the name and max-score in local storage.
After every round, when one wins an alert will be displayed showing the winning player and his score
Point down the features
Every round should start when the 'Enter' key is pressed. ( You can use another key as well )
The rods will only move horizontally using the 'a' and 'd' keys. ( You can use other keys as well )
The losing rod will get the ball for the next match and the rods and ball will move to center.
The score will be counted from the start of every match.

Thank you @Khaleeq01 ,for creating the PR and contributing to our GameZone 💗
Review team will review the PR and will reach out to you soon! 😇
Make sure that you have marked all the tasks that you are done with ✅.
Thank you for your patience! 😀

Hey @Khaleeq01 👋!
@kunjgit here,
We have this annoucement to make 📢!!
We have updated our README 🚀
Make sure you follow proper guideline to raise your next issues !!
Make sure you join our Discord🕹 if you haven't 😇
Thank you 💗!

@Khaleeq01 Please read guidlines which mentioned in Readme file and also provide issue number and Game details

@Durgesh4993 Should i provide the  Game details and issue number in comment section or create new Pull request. I write the game details in readme.md file

@Durgesh4993 and @kunjgit Please have a look i update the PR

Hey @Khaleeq01 👋!
@kunjgit here,
We have this annoucement to make 📢!!
During the time of PR don't alter main index file ! 🙂
In main Readme file just use * as a game number during the time we are merging we will add number !! 👀
Make sure you join our Discord🕹 if you haven't 😇
Thank you 💗!

Hey @Khaleeq01 !! still you are not adding image in assets and make your game entry in main README file !! 👀

Hey @Khaleeq01 follow proper guideline and make PR again

Thank you  @Khaleeq01 , for your valuable time and contribution in our GameZone 💗.
It’s our GameZone, so Let’s build this GameZone altogether !!🤝
Hoping to see you soon with another PR again 😇
Wishing you all the best for your journey into Open Source🚀

@kunjgit why are you closing this one will you tell me where i am wrong i did not understand


The arxiv paper links to nowhere.

Clicking on this option will redirect you to the main page of Arxiv...

Same to the GitHub main page:

Hi,
Apologies for any inconvenience caused.
We have now corrected the arXiv link, and you can access the correct URL by clicking the option.
Thank you for bringing this issue to our attention.


Multiple comments?

Would it be possible to ask for multiple comments?  Ask it to use some kind of syntax that could then be parsed and multiple comments added?

Ignore me, my first few tests just had single comments.


SIL serialization: add PrettyStackTraces

...to help in debugging things like SR-6522.

@swift-ci Please smoke test

Ping! I know it's trivial but I at least wanted someone else to see it.

I haven't looked at the specific places you have used it, but in principle putting more of these in make sense.


:sparkles: rename staging_sync to chart_sync

We all make mistakes. Especially when naming things...

Rename staging_sync to chart_sync
Rename chart_diff to chart-diff in etlwiz CLI so that we can call etlwiz chart-sync (this is consistent with indicator-upgrade)

Thanks, @lucasrodes! I totally missed those 🤦


Incorrect or unclear "regen_delay" and "placement_intensity"

The timings set in the config are either unclear or incorrect as when I time it the blocks begin to regen at approximately 24 seconds and finish at around 30 seconds when regen_delay is set to 1.0 (meaning there should be an entire minute before they even start regenerating, and they finish in half of that).
If this is intended then the config should be more clear but I believe this is an error.

seems fixed in 4.0.0 by fixing other issues


Similarity scraper does not support the discussed structure

This does not support the discussed structure in peermusic/user-stories#24. We need to be able to send it the following payload:

title, album and artist (supported, but only takes the "title" to evaluate and ignores "album" and "artist")
album and artist
artist
genre

The artist functionality gives back artists, instead of our wanted tracks.

Fixed, please extend music-similarity module.
While you are on review please check if the try-catch is would work this way.

:+1:


Cannot find module '/tmp/.../logger/dist/index.js

Hello, thank you for home gallery. I love it so far.
It has run for a while without problems. But now, after restarting my server, I can't get home gallery run.
No matter what command I enter, it says that it can't find a temporary file.
mini@m:~/homegallery$ ./home-gallery-latest-linux-x64
node:internal/modules/cjs/loader:361
      throw err;
      ^

Error: Cannot find module<EMAIL_ADDRESS>Please verify that the package.json has a valid "main" entry
    at tryPackage (node:internal/modules/cjs/loader:353:19)
    at Function.Module._findPath (node:internal/modules/cjs/loader:566:18)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/tmp/caxa/home-gallery/1.6.1/home-gallery/gallery.js:3:16)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32) {
  code: 'MODULE_NOT_FOUND',
  path<EMAIL_ADDRESS>  requestPath: '@home-gallery/logger'
}

Hi @Qomaa
This issue is caused by the used package tool caxa and its properties. Please delete the directory /tmp/caxa/home-gallery/1.6.1 and try to rerun the gallery.
The binary extracts than the required files to the temporary directory again and everything should be fine. Sometimes some files are deleted by the OS and your reported issue raises.

It works now! Thank you for your support!


Add expression expansion and selectors tutorial

As discussed on Discord, adding expression expansion and selectors to the user guide. Note that I changed the header formatting (and fixed a typo!) a bit since it seemed to be all over the place.
@alexander-beedie, pinging since you mentioned you wanted to join in (let me know how, my git skills aren't... great).

Another one of my commits popped up here. I'm not sure how to remove it, but can remove the other commit if this is preferred (just spelling/formatting changes).

I'm pretty sure I messed up trying to fix the list_typos branch from showing up. I'll see how I can fix this.

@ritchie46, I've separated the expression expansion and selectors section into its own page, prior to the functions content. This should address your comment.

I will add a commit to update once that is also in the release version.

Sounds good! :)

Just have one question on what you need added for those code snippets, and then we should be good to go :)

Sorry for not being clear. You had asked for:

Maybe add a few code snippets that show how the column selection and some compute result into multiple evaluated expressions.

I do have multiple examples on how multiple evaluated expressions result in sections "by multiple strings", "by regular expressions" and "by data type", so I'm not sure what code snippets you are looking for when you ask me to add them. 😅

Oh, right. I missed those.
Thanks for this. Very much appreciated!


Add root level aliases to parameter options

I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

Thanks for submitting! Adding proper support for aliases is a bit complicated. In some cases, the alias name does not collide with the parameter name (e.g. tracelevel / traceLevel), in others it does, like ranking. the tracelevel is already confusing with two entries.
Supporting both the structured ranking and ranking as an alias for ranking.profile (string) complicates things
After discussing with @freva we think a better approach is not supporting aliases. The QueryBuilder is after all a way to build a query using an interface with structure. the ranking parameter is a good example if this.
We can link to https://docs.vespa.ai/en/reference/query-api-reference.html where the aliases are documented. Other ideas for how to improve is very welcome, @xgboosting and we appreciate your feedback

Thanks for submitting! Adding proper support for aliases is a bit complicated. In some cases, the alias name does not collide with the parameter name (e.g. tracelevel / traceLevel), in others it does, like ranking. the tracelevel is already confusing with two entries.
Supporting both the structured ranking and ranking as an alias for ranking.profile (string) complicates things
After discussing with @freva we think a better approach is not supporting aliases. The QueryBuilder is after all a way to build a query using an interface with structure. the ranking parameter is a good example of this.
We can link to https://docs.vespa.ai/en/reference/query-api-reference.html where the aliases are documented. Other ideas for how to improve is very welcome, @xgboosting and we appreciate your feedback

Sounds good, I understand.


suggested HIP README changes

These updates reflect realities in Hedera Hashgraph such as the fact that there are no "hard forks" and some improvements which must be made by the Hedera Governing Council.
Note that this README will need to be updated soon in the future to reflect that there are changes which can be made via HIP which won't require HGC approval (e.g. such as community defined standards, which don't affect the core protocol, etc.) However, hopefully the community agrees that this provides a baseline which acknowledges the unique governance structure of Hedera, and will accept it before making those continued revisions.

Thanks for the quality feedback @steven-sheehy. Your notes should all have been addressed via fa37531 but please let me know if there's any other suggestions you may have.


ProgressBar does not show fast updates correctly

🐛 Bug Report
ProgressBar does not show fast updates correctly like showing download progress of a file.
🤔 Expected Behavior
Show progress according to updates.
😯 Current Behavior
Progress updates are manipulated by a CSS transition which is why fast updates don´t get reflected correctly.
💁 Possible Solution
Add option to turn off CSS transition.
🔦 Context
Showing progress for file downloads with fast progress updates.
💻 Code Sample
import { darkTheme, ProgressBar, Provider } from '@adobe/react-spectrum'
import React, { PureComponent } from 'react'

type ProgressAppProps = {}

type ProgressAppState = {
  value: number
}

export default class ProgressApp extends PureComponent<ProgressAppProps, ProgressAppState> {
  constructor(props: ProgressAppProps) {
    super(props)

    this.state = {
      value: 0,
    }

    this.updateValue()
  }

  updateValue(): void {
    const { value } = this.state
    if (value < 100) {
      this.setState({ value: value + 1 })

      setTimeout(() => {
        this.updateValue()
      }, 20)
    }
  }

  render(): JSX.Element {
    const { value } = this.state

    return (
      <Provider theme={darkTheme} height='100%'>
        <ProgressBar label='test' value={value} />
      </Provider>
    )
  }
}

🌍 Your Environment

Software
Version(s)

react-spectrum
3.3.0

Browser
Chrome

Operating System
MacOS

🧢 Your Company/Team
Adobe
🕷 Tracking Issue (optional)
NA

I wonder if we could automatically disable the transition if updates are occurring quickly?


feat: add delete task and list tasks manager api with request type and service type.

Description

Add a POST method to start an asynchronous task to clear the cache of the task id on the peer, and a query api to query the status of the asynchronous task and aggregate it into the existing asynchronous task creation logic.
The manager eventually collects the information needed to start the job and creates a GroupJob into the machine to send a message to the distributed task waiting for the scheduler to consume it.
There is already a Job definition that can reuse the job request to support a new Job, define a new JobRequest, and the response reuses the Job response.
Meanwhile, this PR add a delete task job and list tasks job implementation to the scheduler's async job to receive incoming jobs from the manager and call grpc's interface to complete tasks queries and deletions.
Related Issue

https://github.com/dragonflyoss/Dragonfly2/issues/2818

Motivation and Context

This change introduces api definitions for delete task and list task and request responsetype definitions, as well as interfaces under the services package, and introduced internaljob configuration parameters and job calls to asynchronously list or delete peers and task information for associated tasks in the scheduler.

Design: https://www.yuque.com/baimo/fv9qk8/ed40b9sg7l9crdt4
Design: https://github.com/dragonflyoss/Dragonfly2/issues/2818#issuecomment-2226748430

Screenshots (if appropriate)
Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Documentation Update (if none of the other choices apply)

Checklist

[x] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[x] I have read the CONTRIBUTING document.
[x] I have added tests to cover my changes.

@IRONICBo Fix Lint.


Leading widget for command palette actions

Codecov Report

Merging #18 (47dba6e) into development (b97ea1a) will increase coverage by 0.04%.
The diff coverage is 100.00%.

@@               Coverage Diff               @@
##           development      #18      +/-   ##
===============================================
+ Coverage        92.97%   93.02%   +0.04%
===============================================
  Files                7        7
  Lines              427      430       +3
===============================================
+ Hits               397      400       +3
  Misses              30       30

Impacted Files
Coverage Δ

...b/src/widgets/options/command_palette_options.dart
96.00% <100.00%> (+0.16%)
:arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Update troubleshooting for "Monitor/mmtune.json is empty or does not …

…exist" error
I had red and green LEDs on both of my rigs and the "Monitor/mmtune.json is empty or does not exist" error in my loop log. Both rigs were  running dev for several weeks before any problems. I used the above method to fix them both (loops started working again on master branch, have not switched to dev yet). This procedure has obviously not been vetted thoroughly, so it may be of limited use for the docs, but I figured I would document it and it might be a starting point if this is a commonly occurring problem.
This is my first PR so I tried to integrate it into the existing troubleshooting section to the best of my ability. I also linked to other sections of the docs. I'm not sure how close I came to formatting this correctly, but it's better than inaction I suppose!

Just reflashed one of my rigs using this method.  Not successful.  Still have blinking radio lights after reflash and rig is looping.

Thank you for this. I have run into this problem more than once. Pointed in the right direction by this PR, I have now learned that when you get this error in 'dev' (on Edison), a method to fix the problem is:

Flash the Edison
Install 'master'
Use instructions in this PR to reflash radio
Install 'dev' (given that one wants to continue using dev)

I did not succeed in fixing this directly working in dev.

I have done this with rig, installed master and flashed chip. My radio lights still flash however before and after I updated to dev.  I am looping, just blinking at same time.  Have not tried yet on second rig which is also doing this.  I did see the chip say erased and flashed however fwiw.

The LEDs are supposed to flash while you’re looping, every time a new command is run.

@scottleibrand I guess I didn't remember them flashing repeatedly for say 5-6 blink rotations every 60-90 seconds but maybe they did and I forgot? Sorry for my confusion.

The normal LED behavior is to flash once every 1 seconds (as it prints each .) during wait-for-silence, and then once for each other radio command.  So if you watch the pump-loop.log and the LEDs at the same time, you should see them flash every time something new is written to the log.


puppeteer margins:none  equivalence of chrome print

Even when i set margins 0 all. I am keep getting default margins my
@page{   margin: 0 !important;   padding: 0 !important; }
i was searching long time for this and did found nothing that would help.
^1.9.0 puppeteer
ubuntu 18.04
10.15.1 node
this.browser = await puppeteer.launch({args: ['--no-sandbox', '--disable-setuid-sandbox']});
const page = await this.browser.newPage();
// @ts-ignore
await page._emulationManager._client.send('Emulation.setDefaultBackgroundColorOverride', {
  color: {
    r: 0,
    g: 0,
    b: 0,
    a: 0
  }
});

await page.goto(
  'https://google.com',
  {
    waitUntil: 'networkidle0'
  }
);
await page.pdf({
  path: '/home/pdf.pdf',
  printBackground: true,
  displayHeaderFooter: true,
  format: 'A4',
  preferCSSPageSize: true,
  headerTemplate: '',
  footerTemplate: '',
  margin: {
    left: '0',
    right: '0',
    top: '0',
    bottom: '0'
  };
});```

@rpdiss I tried your code snippet and don't see any margins that come from pdf printing. There are margins, but they are inherent to the layout of google.com.
So what exactly went wrong?

@aslushnikov i want to achieve this effect

@rpdiss the following worked for me and produced the same PDF as "Save as PDF..." in Chromium with "margins: none".
const puppeteer = require('puppeteer');

(async() => {
  const browser = await puppeteer.launch();
  const page = await browser.newPage();
  await page.goto('https://github.com/GoogleChrome/puppeteer/issues/4069');
  await page.pdf({
    path: 'gh.pdf',
    margin: {
      top: 0,
      left: 0,
      right: 0,
      bottom: 0,
    },
  });

  await browser.close();
})();

Hmm so why it does not work with mine code maybe header and footer are glitching it?

Can confirm this bug. Breaks my PDFs too. When running Chromium as a browser and manually printing the same HTML and manually setting the margins to 0, it works. When using puppeteer, margins left: 0, right: 0, bottom: 0 are respected to, just not top: 0.

I can confirm this bug too. Using the option "headless: false", I can see that the result I want to achieve needs the option "margins: none" of chromium but setting the margins to 0 in pdf method options does not give the same result, the bottom margin is staying...

use
body {
    margin: 0;
}

body {
    margin: 0;
}

I know the issue is closed but in case it helps this turned out to fix an issue I was having. Margins in the @page css and puppeteer pdf option worked but there was always a very small margin remaining.


Un-ignore some local config.*.yaml files

We have a project template based on drupal/recommended-project, that we use when creating a client project. This project template adds some DDEV, Tugboat, Drush and Drupal configuration files that we always use. One of the files that we decided to not include in this is a .ddev/config.yaml file, as this is added to the project via ddev config saving us the trouble of changing the values that DDEV already guesses so well.
The problem is that because we don't want to add the config.yaml file, we have to take advantage of the config.*.yaml feature to add extra config files (we currently have one to configure nvm and another that runs drush deploy on a post-import-db hook). However the same rule that is used to load these files is used to .gitignore them. We would like to add an exception to this .gitignore rule that
Describe the solution you'd like
The suggestion is to add an extra .gitignore rule to allows files that are compliant with the config.*.yaml loading mechanism to be an exception to the existing .gitignore rule.
!/config.*.keep.y*ml

The above would allow files named config.drush.keep.yaml to be added to git during the normal project start-up process of git add .ddev.
Describe alternatives you've considered
The current solution we have is to document that these files must be forcefully added to git (git add -f), but experience shows that this is not always followed.

I would have thought that git add -f .ddev/config.drush.keep.yaml would work out OK for you.
I do consider the decision to gitignore these files to be suspect in general. Maybe config.*.yaml shouldn't be gitignored at all?

I agree that the ignore rule as it is makes little sense. But I also think that there should be a rule to add local changes without running the risk of them getting committed by mistake. So maybe a new rule to gitignore only all config.*.local.yaml ?
The problem of course is that such a change will suddenly flip how DDEV works, and a lot of files might get committed accidentally. This is the reason why I suggested the config.*.keep.yaml rule.

In my opinion it is good as it is now.
If we make changes, let's please try to keep it fully backward-compatible. We've had quite some frustration after updates in the past with .ddev/.gitignore changes.
I like the suggestion by @jcnventura (with a slight change):
/config.*.y*ml
!/config.*.dist.y*ml

dist is used in several tools already to provide project-wide configuration, with possibilities to overwrite the settings for your current use case in another file.

I guess I think that git already provides exactly what's needed here with ``git add -f`, and we should just leave it the way it is. I appreciate the suggestion, but the more rules and "interesting" things we add, the harder everything is to understand, and often little things like this only end up benefiting one team (the one that understands it).
I'm going to close this, but appreciate the suggestion and am happy to continue the conversation here or elsewhere.


FSharpFunc => Action/Func implicit conversion

It's super annoying that F# functions are not converted automatically to Action/Func when passed to methods:

So we have to write ugly code like this Action<_> (printfn "%s") or like this fun x -> printfn "%s" x

This adds some corner cases and imlicit typing to the language. Maybe another way would be to have an operator for this, which converts to Action/Func as needed? And a special error message could show or advice that operator?

@matthid the compiler already converts lambdas to Action/Func and it's caused no problems so far, so why not to do the same for any value of type FSharpFunc?

@vasily-kirichenko But from a users perspective that's not an implicit conversion, instead the user is writing an action or func in that case (I guess that's a philosophical question). Maybe @dsyme can share his opinion on this.

@matthid I had the same idea re: improve error reporting with guidance on how to convert (perhaps not even operators, just a few utility funcs added to FSharp.Core?)

@vasily-kirichenko consider adding some elements to #2503

IMHO this is a problem with delegates altogether, not only Action Func.

Thanks @smoothdeveloper after https://github.com/fsharp/fslang-suggestions/issues/248#issuecomment-273176935 I kind of changed my mind. Maybe we need it to just work :)

@matthid @vasily-kirichenko @smoothdeveloper Yes, this is a glitch (my fault, sorry...) that should be fixed.  I've marked https://github.com/fsharp/fslang-suggestions/issues/248 as approved in principle
Next steps would be to dig into the "single overload" path of method overload resolution and understand why it differs from the "multiple overload" path.

Closing as this is an approved RFC, we just need to implement this


Copy With Syntax Highlighting not work with Keynote/Pages

VSCode Version: 1.10.1
OS Version: macOS 10.12.3

Steps to Reproduce:

Use command+shit+p and execute copy with syntax highlighting
Paste to Keynote

Expect Result: Paste code block with style to Keynote
Actual Result: Paste plain text to Keynote
If I paste to MS Word first, copy from Word. Then paste to Keynote.
Then the style of code is correct.

I confirmed this
Pages and keynote may not support pasting html content http://apple.stackexchange.com/questions/124152/how-do-you-paste-syntax-highlighted-code-into-keynote-13 . I suspect that copying code from Word works because Word copies RTF text to the clipboard in addition to html content. It seems to me that this RTF text is what Pages and Keynote are looking for

For short, we can't do this with current design at this moment.
The long reason is that all our copy and paste stuff (and type, screen reader, etc) relies on HTML Dom. We listen to Copy/Paste events on textarea and we access the clipboard through the events. It's the browser (Chromium in our case) who handles all the clipboard work for us. If Chromium doesn't set HTML content in the system clipboard reasonably, then we can't.
As @mjbvz  mentioned above, Word may set RTF text to system clipboard through some native API. If we want to do the same thing, we may need some nodejs power to access clipboard.

Anyone found a work around this? still seem to be facing this issue

Anyone found a work around this? still seem to be facing this issue
@nitish24p

You can try to  copy code block as html format onto Apple's TextEdit.app then re-copy to keynote. The TextEdit.app will translate into RTF format for you. Hope this help.  reference

Yes i did that back then and it worked


fix: add links to splash page

added links to splash page :)

Re the above: Discussed offline, will update this to point to a Notion page.


[search][operationList] icons are not display.

the operation.icon option is not used in action-contextual component
    if (1 === operation.priority) {
            primaryActions.push(
                <this.props.buttonComponent
                    handleOnClick={this._handleAction(key)}
                    key={key}
                    label={operation.label}
                    shape={operation.style.shape || 'icon'}
                    style={operation.style || {}}
                    type='button'
                    {...this.props}
                    />
            );

Rename your icons using https://www.google.com/design/icons/ in the operation List

I think that the icons should be picked in the operation object instead of the props.
I take it


[fxcop] Settings UI

Summary of the Pull Request
Enable FxCop on the Settings.UI project and fixing the associated warnings.
PR Checklist

[x] Applies to #5129
[x] CLA signed. If not, go over here and sign the CLA
[x] Tests added/passed

[ ] Requires documentation to be updated
[ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Info on Pull Request
Fixes FxCop warnings including: removing redundant default-value initializations, ensuring Disposable fields are disposed, marking non-instance accessing methods and classes with only static members & methods as static, moving interop methods to NativeMethods class, fixing string-related issues (mainly specifying culture and string normalization), removing unused arguments or suppressing the warning if needed, using safe navigation operator as null argument checks, logging general exceptions that are caught and suppressing ConfigureAwait warnings (which are mostly intended for library code with unpredictable/unspecified execution environments--should be safe to do for UI code).
Validation Steps Performed
Ensure tests pass and manually validate Settings functionality in Release & Debug builds.

@alekhyareddy28 @ryanbodrug-microsoft I addressed the comments yesterday and as far as I can tell there are no issues with the changes so I think this is good for a re-review.
Regarding the ActivationService classes, I created #7647 to capture that and I can make a separate PR to remove them. I will just see if removing them creates any regressions and maybe wait until tomorrow if Sibille (from Windows Template Studio) can verify if they don't apply to our app (which I'm currently inclined to think).