net/http: add http1 and http2 Server IdleTimeout

Add http.Server.IdleTimeout to limit the keep-alive idle time for http1 and http2 servers.

If I may ask, this is going to entail us adding MaxIdleTimeout and MaxActiveTimeout to Server, right? And also we'll add defaults as you in have in CL 19159, true?

@odeke-em, the naming here is much easier if we don't consider HTTP/2 and PING frames as activity. Then we'd just call it IdleTimeout and be done with it.
 If so, we need names for both types of idle (network idle vs no-HTTP-requests idle). Or we define IdleTimeout to mean one thing, and give ReadTimeout the other meaning (see https://github.com/golang/go/issues/16958#issuecomment-244239789)?
Opinions welcome. Ideally with sample documentation you'd tell users.
I got as far as:
        // ReadTimeout optionally specifies a maximum duration before
        // timing out reads of request headers. It does not include
        // request bodies. For requests after the first on a
        // connection, this is timer starts upon receiving the first
        // byte. For keep-alive duration, see IdleTimeout.
        ReadTimeout  time.Duration

        // IdleTime, is, uh....
        IdleTimeout time.Duration

/cc @rhysh @broady @adg @bmizerany

/cc @prabrisat1 too.

// IdleTimeout is the maximum time between requests that a connection can stay idle. This timeout starts as soon as a connection is started and after each request is finished. It is canceled when a request starts.

?

So PING frames don't count, then? That's a valid answer.
Now that I think about, we should disable the Transport's TCP keep-alive when HTTP/2 is negotiated, since PING frames and TCP keep-alive packets serve the same purpose of keeping the connection alive from NAT timeouts and whatnot.

WRT request bodies vs request headers ... That does mean a malicious client could send headers and then bodies as slowly as possible. I guess though you would use a context with a timeout or the like to protect against that in the handler.

That probably complicates code though? Should ReadTimeout be canceled after the request's Body is closed, not when the headers are finished being read?

WRT request bodies vs request headers ... That does mean a malicious client could send headers fully and then bodies as slowly as possible. I guess though you would use a context with a timeout or the like to protect against that in the handler?

Yes, that's the job of the handler or caller of http.Transport.RoundTrip to guard against. We only give a timeout for headers, since the user isn't in control there.

Should ReadTimeout be canceled after the request's Body is closed, not when the headers are finished being read?

SetReadDeadline is currently only called before a TLS handshake, and before reading request headers, and is never disabled.
So yes, to work similarly to Go 1.0-1.7, we should probably not reset it after the headers and have it apply to the whole request, even if that's slightly odd.

Can the deadlines (since this is what is currently used) even be reset in the middle of a Read?

Why would we be in the middle of a read?

Why would we be in the middle of a read?

@bradfitz Actually you wouldn't be AFAICT. Not sure why I thought that earlier (in an internal convo about this issue).


Allow BrokerWithDynamicConfiguration to publish results

As explained in #181, this should be possible.
This is my first time interacting with this codebase, so please let me know if there’s anything wrong with what I’ve implemented here and/or if there are other ways to check for regressions than cargo test.

All good, thanks for the PR!


Azure spring data cosmos version schema

The former design of Spring version schema will make two separate artifacts to cope with Spring Data 2.2.x and 2.3.x, but if we let Spring BOM manage our versions we could use one artifact to support both versions.
The dependency management section in a pom file could also affect the transitive versions: https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#bill-of-materials-bom-poms.

/azp run java - cosmos - tests

/azp run java - cosmos - tests


Implement a few initial calculators

Use Case
As a developer prototyping configuring plots in real time, I want a few metrics to choose from so I can test metrics selection.
Acceptance Criteria
Implement 3-5 additional calculators using functions from numpy and scipy

This is de-prioritized in favor of prototyping with BioSimulators API


why set a separate distillation token?

Hello! Thank you for your wonderful job!
I have a question that when using the convnets as the teacher for distillation, your work chose to set another token(distillation token) to mimic the soft/hard predicts of convnets, and make class token to learn following the labels of dataset, did it?
If so, I wonder why not just make class token to learn from teacher and original label at the same time(using loss function like: loss = alpha * loss_from_label + (1- alpha)* loss_from_kd, only need the class token to cal). Has any experiment been done to check this method when the work was preparing, did it hurt the performance?
Looking forward to your reply!  Thank you a lot !

Hi @Ga-Lee ,
Thanks for your message.
Yes, we try both with and without distillation token (see row 3 and 6 in Table 3). I agree that the caption on this table is not very clear, we need to be updated it.
Best,
Hugo


Update test coverage to pull in directories rather than individual files

I recently noticed that several recently added files were not added to the files list for the test coverage statistics. We should investigate whether it's possible to list directories wholesale rather than the individual files to make sure this doesn't recur in the future.

Moved issue to internal repo


Floor/room numbers missing from the main site

Somehow, they are missing though I can't figure out why... maybe it's caching something?

Was rsync command breaking directory structure


az aks enable-addons - list of available addons is incomplete?

The az aks enable -addons command lists available addons.  So far this is the only reference I've found in Microsoft documentation that enumerates possible addons.  However if I try exporting one of my k8s clusters I can see "KubeDashboard": { enabled: false } in the addonProfiles section which suggests that it is also a possible addon which should be in this documentation.  However it feels like this should be it's own separate page or perhaps even better there should be an az aks list-addons that could returns all possible addons and links to appropriate documentation.

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

ID: d75c3a8d-1187-bea1-a7d4-7ebba71c1790
Version Independent ID: 75b0c352-762e-16ae-5cc6-d807ffc1dc3f
Content: az aks
Content Source: latest/docs-ref-autogen/aks.yml
Service: container-service
GitHub Login: @rloutlaw
Microsoft Alias: routlaw

I've just realised that KubeDashboard is not being supported from 1.19 and the cluster I was looking at was still on 1.18 so I guess this is the reason for it being like it is.


How to make backspace button on a physical keyboard?

I have a keyboard that is used for navigation through the objects, and for entering text into text fields. There is a definitions for navigation buttons in the lv_group.h file but how to implement backspace button  and delete button for text fields?

And issue number two with the text area:
When the a text is selected through the navigation buttons, then all touches on the text area add spaces to the text area. How to avoid that?

So do you need Delete and Backspace buttons too?

all touches on the screen add characters to the text area

How do you mean that?

Yes I need Delete and Backspace buttons.
I mean that whenever I touch the screen it adds some characters to the text area that is focused. To focus the text area I use navigation buttons.

Yes I need Delete and Backspace buttons.

I've just added LV_GROUP_KEY_BACKSPACE to dev-5.3 branch. Now there are separate keys for Delete and Backspace and the Text area can handle them.

I  mean that whenever I touch the screen it adds some characters to the text area that is focused. To focus the text area I use navigation buttons.

CAn you send a video about it?

Try this link to see the video:
https://drive.google.com/open?id=1fx2TPCrfDjncNYtctiXY5RtSWvDLdqtu

I don't experience this issue.
PLease send you touchpad driver too.

Have you had a chance to reproduce the issue?

When the touchpad is released you should use the last pressed coordinate. Like here: https://github.com/littlevgl/lv_drivers/blob/master/indev/mouse.c#L55
However, it can't cause the issue.
It looks like the touchpad works as a keypad. Does the touchpad work in other cases?
When you register the input devices have you set there type?
indev_drv.type = LV_INDEV_TYPE_POINTER;

1 a) No I am not using a touch pad as a keyboard.
b) What do you mean touchpad work in other cases?
2 Yes I setup the drv type as you stated.
Below is tha keypad and touchpad init functions:
uint32_t keypad_init(void)
{
    uint32_t status = tca8418e_init();
    if (STS_SUCCESS == status)
    {
        lv_indev_drv_t  kp_drv;
        lv_indev_drv_init(&kp_drv);
        kp_drv.type = LV_INDEV_TYPE_KEYPAD;
        kp_drv.read = keypad_read;
        kp_indev = lv_indev_drv_register(&kp_drv);
    }

    return status;
}

uint32_t touchpad_init(void)
{
    uint32_t status = tsc2007_init();

    if (status == STS_SUCCESS)
    {
        /* Initialize library. Set touchpad function pointers. */
        lv_indev_drv_t indev_drv;
        lv_indev_drv_init(&indev_drv);
        indev_drv.read = touchpad_read;
        indev_drv.type = LV_INDEV_TYPE_POINTER;
        lv_indev_drv_register(&indev_drv);
    }

    return status;
}

b) What do you mean touchpad work in other cases?

I mean can you use the touchpad properly to click buttons, swipe roller etc?

Yes, in other cases touchpad works fine.

I see.
Your codes seems fine I have no idea what causes it.
Can you create a simple GUI to demonstrate the issue? It'd be the best if you could reproduce the issue in the PC simulator too.

Ok I'll provide a code example, later today or tomorrow.

Did you create a group object for the text area object when you were trying to reproduce the issue?

I used the lv_test_group_1() fro from lv_examples repo

Hello Kris, Sorry for such delayed response. Here is the sample code that allows me to reproduce the issue:
lv_obj_t *text;

lv_res_t btn_callback(lv_obj_t *btn)
{
    lv_obj_t * label = lv_obj_get_free_ptr(btn);

    lv_label_set_text(label, lv_ta_get_text(text));

    return LV_RES_OK;
}

/* This may be main function. */
{
    lv_init();
    tft_init();
    touchpad_init();
    keypad_init();

    /* Create a text area. */
    text = lv_ta_create(lv_scr_act(), NULL);
    lv_ta_set_one_line(text, false);
    lv_ta_set_cursor_type(text, LV_CURSOR_LINE);
    lv_obj_set_width(text, 100);
    lv_obj_set_height(text,100);

    /* Create a label. */
    lv_obj_t *label = lv_label_create(lv_scr_act(), NULL);
    lv_label_set_text(label, "Initial text");

    /* Create a button. */
    lv_obj_t * btn = lv_btn_create(lv_scr_act(), NULL);
    lv_btn_set_toggle(btn, false);
    lv_btn_set_action(btn,
                      LV_BTN_ACTION_CLICK,
                      btn_callback);
    lv_obj_set_free_ptr(btn, label);

    /* Create a group so the text area will be available for editing. */
    lv_group_t * group = lv_group_create();
    lv_group_add_obj(group, text);

    /* You know what is it for ☺ */
    lv_obj_align(text, NULL, LV_ALIGN_CENTER, 0,0);
    lv_obj_align(label,text, LV_ALIGN_OUT_TOP_MID, 0,0);
    lv_obj_align(btn,  text, LV_ALIGN_OUT_BOTTOM_MID, 0,0);

    keypad_update(group);/* What is doing this function? See below... */
}

void keypad_update(lv_group_t * keypad_group)
{
    lv_indev_set_group(kp_indev, keypad_group);
}

Could you please try this code and report if you are able to reproduce the problem?

Hi,
I tried your code in the PC simulator and I didn't see any issues. See the video: group_issue.mp4.zip
I used the keyboard driver like this:
    lv_indev_drv_t kb_drv;
    kb_drv.type = LV_INDEV_TYPE_KEYPAD;
    kb_drv.read = keyboard_read;
    kp_indev = lv_indev_drv_register(&kb_drv);

Can you resend the video bacause it is 0.021 s long ?

Did you use the lv_indev_set_group(kp_indev, keypad_group); function call ?

My understanding is that the 'group' is the mechanism for  the keypad. When I register the group in the keypad indev structure (using lv_indev_set_group function) then the library allows to move the 'focus', between objects in the particular group, using keypad. Since lvgl v5.3 I see that the touchpad press activates (makes the object focused) the object if it is registered in the  group.
If, for example, I have a message box, then I create a new group which contains buttons from the message box. After the group is created then I have to put that new group into keypad indev structure using the  lv_indev_set_group function call. So that I can navigate between message box objects.
So actually I have some amount of keypad groups with different objects added to them. And I am registering those group in the keypad indev structure in different places of the application in run-time.
Also what I found is that the only way to edit text area is to add the text area object into some group and register that group in input device structure.
Could you please confirm if my understanding is correct?

Video:
https://drive.google.com/open?id=1w4qvDmF8Uiu684q9y32nj4tdDj89GGTw
Focus with click:
Yes, if the object is in a group, a click will make it focused. You can disable it with lv_group_set_click_focus(group, false)

If, for example, I have a message box, then I create a new group which contains buttons from the message box. After the group is created then I have to put that new group into keypad indev structure using the lv_indev_set_group function call. So that I can navigate between message box objects.

Almost. If you created an lv_mbox then you need to add the mbox object to the group and not its buttons directly. The mbox will handle it. However, if you created a container, labels and buttons yourself then you should the buttons individually.  Have look at the keyboard tutorial: https://github.com/littlevgl/lv_examples/blob/master/lv_tutorial/10_keyboard/lv_tutorial_keyboard.c
Maybe I misunderstood something but why do you want to create a new group for every object? If you have a keypad then one group should be enough for that.

I have few screens and a tabview. Each of them has a group that include all objects on the particular  tab or screen.

It shouldn't cause the issue, but I don't understand something:
In the video you sent I see that you use two groups: one for the text area and an other for the tabview. What is the purpose of using more groups if you have only one input device?

I have one group for each tab in the tabview object. This is to prevent navigating through objects which are not visible on the particular tab or screen. In the tabload function I always update the keypad with the particular group using lv_indev_set_group(kp_indev, keypad_group);
Regarding mbox - no question about it. I am doing just like you described.
Could you please review the following example?
I have a tabview with tab1 and tab2. tab1 has text1 and btn1 objects. tab2 has text2 and btn2 objects. How to make proper keypad navigation through all this objects?
My solution is the following pseudocode :
/* Screen Initialization function.  */
{
    group1 = lv_group_create();
    lv_group_add_obj(group1, tabview);
    lv_group_add_obj(group1, text1);
    lv_group_add_obj(group1, btn1);

    group2 = lv_group_create();
    lv_group_add_obj(group2, tabview);
    lv_group_add_obj(group2, text2);
    lv_group_add_obj(group2, btn2);
}

/* Tabview load callback function. */
lv_res_t job_tab_loaded(lv_obj_t *tabview, uint16_t tab_id)
{
    switch (tab_id)
    {
    case 0 : keypad_update(group1);break;
    case 1 : keypad_update(group2);break;
    }
}

What do you think about this?

Your code looks good. The only thing I don't understand is that in the video there was two focused objects (orange colored):

The tab itself
And the text area

In your described method there should be only one focused object.

Hello Kiss, I get how to avoid the problem.
In the keypad read function I added the code that clears the lv_indev_data_t * data input parameter structure.
Also I prepared the project that I think you may easily use to check the issue. This is the project that is from the lv_boards.zip file that you made. The target device is STM32F746 disco.
In the attached archive there is a project, and in the main.c file you'll find the following code:
bool keypad_read(lv_indev_data_t * data)
{
#if REPRODUCE_THE_ISSUE == 1
    /* Do not clear the *data structure */
#else
    data->state = LV_INDEV_STATE_REL;
    data->key = 0;
#endif
    return false;
}

In the previous implementation I did not touch the input parameter if the keypad controller did not output any data. But now I always clear the input parameter.
Is that behavior expected?
stm32f746_discovery_no_os.zip

Yes, it really could cause the issue. In the read function, you always should set the related fields of data.
However the examples you can find set the fields it should be:

More emphasized in the documentation
The library should do something to avoid this behavior. See: #560

I merged the fix into master and dev-5.3.
If you are still experiencing the issue, please reopen this issue


Path is not parsed correctly if '[' is present in the path

Steps to reproduce
$sess = New-PSSession -ComputerName localhost
Copy-Item -Path E:\test.txt -Destination 'e:\[test\' -ToSession $sess

Expected behavior
Should copy the file E:\test.txt to E:\[test directory

Actual behavior
Failed as '[' is seen as regex

Environment data

Applicable to all versions

It looks like Path vs LiteralPath. If users types special char in path they should escape it or use LiteralPath. It is simple and predictable UX. If a path comes from file system it should be considered as literal.

@iSazonov, note that the problematic path is passed to the -Destination parameter, where no distinction between literal and wildcard-based paths is offered.
In general, for output paths, it only every makes sense to interpret them as literal paths , so this is worth fixing - just as we're about to do for the  -OutFile parameter of Invoke-WebRequest / Invoke-RestMethod (see #11701 - incidentally, please change that PR's title).

@iSazonov @mklement0 , agree that -Destination parameter should be treated as literal. Right now it doesn't work with c:\[test directory, and hence needs to be fixed to make it work as literalpath.
Also, even if we consider regex scenario, having [ alone in the directory is not a regex and should be seen as literal path. In both cases it makes sense fixing it.

As an aside, @krishnayalavarthi, we're talking about wildcard expressions, not regexes.
Agreed, given that when remoting isn't involved, something like Copy-Item foo.txt [foo.txt seems to quietly fall back to a literal interpretation of the path.
It's implied by your repro steps, but to spell it out: the problem only arises in the context of remoting (even though background jobs use the same serialization infrastructure, I don't see it there).
Also note that remoting still targets Windows PowerShell by default, so it's better to start investigating with a command that also targets PowerShell Core:
$sess = New-PSSession -ComputerName localhost -ConfigurationName PowerShell.7

All the below commands have issue with this invalid wildcard in the path parameter.
PR #12170 solves the below failures.
`PS C:\WINDOWS\system32> Test-Path E:[test
Test-Path : Cannot retrieve the dynamic parameters for the cmdlet. The specified wildcard character pattern is not valid: [test
At line:1 char:1

Test-Path E:[test

CategoryInfo          : InvalidArgument: (:) [Test-Path], ParameterBindingException
FullyQualifiedErrorId : GetDynamicParametersException,Microsoft.PowerShell.Commands.TestPathCommand

PS C:\WINDOWS\system32> Get-Item E:[test -ea SilentlyContinue
Get-Item : Cannot retrieve the dynamic parameters for the cmdlet. The specified wildcard character pattern is not valid: [test
At line:1 char:1

Get-Item E:[test -ea SilentlyContinue

CategoryInfo          : InvalidArgument: (:) [Get-Item], ParameterBindingException
FullyQualifiedErrorId : GetDynamicParametersException,Microsoft.PowerShell.Commands.GetItemCommand

PS C:\WINDOWS\system32> Remove-Item E:[test -Force -ea SilentlyContinue
Remove-Item : Cannot retrieve the dynamic parameters for the cmdlet. The specified wildcard character pattern is not valid: [test
At line:1 char:1

Remove-Item E:[test -Force -ea SilentlyContinue

CategoryInfo          : InvalidArgument: (:) [Remove-Item], ParameterBindingException
FullyQualifiedErrorId : GetDynamicParametersException,Microsoft.PowerShell.Commands.RemoveItemCommand

PS C:\WINDOWS\system32>`

@krishnayalavarthi, these are examples of input paths, which by default bind to the -Path parameter, which does expect wildcard expressions.
To pass literal paths, use the -LiteralPath parameter (its short alias in PS Core is -lp).
That said, I cannot reproduce your symptoms, neither in direct invocation nor via remoting.

I just installed Powershell 7. Below are repro steps.
I agree that by-default if -Path is not given, the path binds to the -Path which should accept wildcard expressions.
Here we have the scenario of "invalid wildcard". If just [ is given in the path (in this case E:[test without completion bracket ]), the path should be treated as literalpath and should continue, instead of failing with the below errors.
PS C:\Program Files\PowerShell\7> Test-Path -Path 'e:\[test' Test-Path: Cannot retrieve the dynamic parameters for the cmdlet. The specified wildcard character pattern is not valid: [test PS C:\Program Files\PowerShell\7> Test-Path -LiteralPath 'e:\[test' True PS C:\Program Files\PowerShell\7>

Good point, @krishnayalavarthi  - the reason I didn't see the symptom is that these commands behave differently if no such file exists; since I have no E: drive, I actually got a meaningful error message.
If the drive exists, but not the path as a whole, Test-Path works as expected, but Get-Item returns nothing and doesn't complain.
That it would fail if the file actually exists is confusing and unhelpful.
I agree that falling back to a literal path is the more sensible behavior.
As a minor side effect, something like Get-Item C:\[NoSuch would start complaining (it currently doesn't), but I think that too is more sensible behavior.

@mklement0 I didn't notice this behavior earlier. Agree with you.
PS C:\Users> test-path E:\[test Test-Path: Cannot retrieve the dynamic parameters for the cmdlet. The specified wildcard character pattern is not valid: [test PS C:\Users> test-path E:\[nosuch False PS C:\Users> Get-Item E:\[test Get-Item: Cannot retrieve the dynamic parameters for the cmdlet. The specified wildcard character pattern is not valid: [test PS C:\Users> Get-Item E:\[nosuch PS C:\Users>

This PR will check if the path has invalid wild card (just [), in such case it will treat the path as literalpath and proceed.

We already have follow fix in other places: check the path exists as literal, if no process as wildcard.

We already have follow fix in other places: check the path exists as literal, if no process as wildcard.
Sorry, I didn't get the point. You are saying fix for "check the path exists as literal, if no process as wildcard." .  In yes, we should not be seeing the below error... right?

PS C:\Users> Get-Item E:\[test
Get-Item: Cannot retrieve the dynamic parameters for the cmdlet. The specified wildcard character pattern is not valid: [test
As the path has invalid wildcard char [ (just single [ instead of []), this should have been treated as literalpath and reported True as the path already exists in my file system.

The fix I mentioned is for WorkingDirectory. There is still another scenario fixed in the same way.

@iSazonov, the behavior that @krishnayalavarthi is proposing (if I understand correctly) makes for consistent behavior:

Something that cannot be a wildcard expression, because it is syntactically invalid, should be treated as a literal path.

As stated, that means that a command such as Get-Item C:\[NoSuch, which currently fails silently, would then complain, because no file literally named C:\[Nosuch is then found, which would trigger the Cannot find path '...' because it does not exist. error.

Are you concerned about this aspect of the proposed fix for backward compatibility reasons?

Are you proposing that  Get-Item C:\[NoSuch continue to fail silently (as opposed to successfully targeting a file C:\[DoesExist literally even with (implied) -Path)?

Note that the fixes you mention, if I understand correctly, sound like  a deliberate inconsistency for when wildcard patterns - notably including syntactically valid ones - happen to match an existing file if interpreted as literals. An inconsistency, I presume, that was intended to ease the pain of previously having to use -LiteralPath explicitly in order to unambiguously pass paths as literals.
We've run into this before: #6733 proposed that an invalid wildcard pattern consistently be treated as an error, which would be another way to resolve this - but it is at odds with the fixes you mention.
Either way, two fixes are required:

Fix the always-inappropriate wildcard interpretation of output file parameters such as -Destination - they should always be considered literal paths.

In line with the fixes you mention, make a wildcard pattern that as a literal matches an existing item fall back to a literal, for convenience (even though in the case of valid wildcard patterns that amounts to an inconsistency).

Consistently falling back to literals is what makes the most sense to me, not least because that's how it has always worked with paths that contain no wildcard metacharacters at all: Get-Item NoSuch is effectively treated as literal and therefore results in Cannot find path '...' because it does not exist. - even though it is technically also a valid wildcard expression.
Of course, the horribly treacherous combination with Get-ChildItem -Recurse is the regrettable exception: see #5699.

Are you concerned about this aspect of the proposed fix for backward compatibility reasons?

Yes, it looks like a breaking change.

Are you proposing that Get-Item C:[NoSuch continue to fail silently

No. Suggestion is to do (1) Get-Item -LiteralPath , then to do (2) Get-Item -Path
Then I'd agree that Get-Item C:\[NoSuch could return Get-Item: Cannot find path 'C:\[NoSuch' because it does not exist. but I think we can do without complicating wildcard analyzes for this.

We've run into this before: #6733 proposed that an invalid wildcard pattern consistently be treated as an error

In general it is impossible to ensure by parsing that a path is valid - only underlying file system can return reliable result. So the proposed steps (Literal, then Path) is best that we can do.
Since you mentioned #5699 I guess there is a common code that brings the behavior. In the case a fix should be common too and it will huge breaking change.

For reference #4076

Suggestion is to do  (1) Get-Item -LiteralPath , then to do (2) Get-Item -Path

That's what @SteveL-MSFT also just proposed in https://github.com/PowerShell/PowerShell/issues/6733#issuecomment-604136181 (and @vexx32 agreed), and it makes sense, given the history of this problem and inconvenience of having to know of and explicitly use a separate parameter for literal paths (-LiteralPath).

Then I'd agree that Get-Item C:[NoSuch could return Get-Item: Cannot find path 'C:[NoSuch' because it does not exist. but I think we can do without complicating wildcard analyzes for this.

Glad to hear it: As for complicating  the wildcard analyzer: All we need to know up front is whether a
given input is a syntactically valid wildcard pattern, and only a few edge case are not:
In short: Only patterns that either contain [] or have only a [ without a closing ] (but not vice versa) are invalid (e.g., test[].txt, test[.txt).
[WildcardPattern]::new('C:\[test') doesn't throw an exception on construction, but calling the .IsMatch() function does: [WildcardPattern]::new('C:\[test').IsMatch('foo')

In general it is impossible to ensure by parsing that a path is valid

That is not the goal here.

So the proposed steps (Literal, then Path) is best that we can do.

As stated, it's probably the best compromise under the circumstances, but let's be clear on the tradeoffs:
It means that passing something intended to be a wildcard can situationally and unexpectedly be treated as a literal.
For instance, I'm getting the wrong match if  I'm looking for -Path file[12].txt to match files file1.txt and/or file2.txt, and a file literally named file[12].txt happens to be present - and there is no workaround.
To only way to avoid this pitfall is to consistently treat any -Path value as a wildcard - and complain if it's syntactically invalid - and to treat only -LiteralPath values as literals.
Needless to say, that is inconvenient, and a perennial pitfall, especially to those who may not even be aware of the presence of the -LiteralPath parameter.
POSIX-like shells have solved this problem more succinctly: if the argument is unquoted, it is a wildcard; if it's quoted, it is a literal (that it is the shell itself rather than the target command that does the matching is a separate issue); e.g., file[12].txt asks for wildcard matching, 'file[12].txt' asks for a literal.
In a manner of speaking: it is the data type of the argument that unambiguously selects the desired behavior, akin to how /..../ is a regex literal in JavaScript, distinct from '...' (strings).
Note that the POSIX-shell approach is already implemented, but only  when passing arguments to external programs on Unix (of necessity, for compatibility): /bin/echo *.txt expands *.txt and passes the resulting file names as individual arguments, whereas /bin/echo '*.txt' passes *.txt verbatim.
As a general solution, we've previously discussed adopting the same distinction generally or  doing the inverse :
Given that we're stuck with the wildcard behavior as the default (positional binding to -Path), we could provide a succinct way to signal the desire to escape the pattern in order to treat it literally, which sigil sequence @` could do (with the ` suggesting escaping); e.g.,
Get-Item @`file[12].txt would ask that the pattern be escaped and would effectively be the equivalent of Get-Item -LiteralPath file[12].txt.
The same approach could be extended to regex contexts, including in expression mode, so that you could write 'foo|bar' -replace @\'foo|' as the succinct equivalent of 'foo|bar' -replace [regex]::Escape('foo|')

It means that passing something intended to be a wildcard can situationally and unexpectedly be treated as a literal.

Get-Item -Path E:\abc[test].txt

If we will check literal and the file exists what is a priority: return a result for the literal or process wildcard? Taken into account -Path parameter I think we should process wildcard and if result is nothing then check the literal. If the literal does not exist too what is an error we should return? Path not found?

Taken into account -Path parameter I think we should process wildcard and if result is nothing then check the literal.

I agree.

If the literal does not exist too what is an error we should return? Path not found?

If it is a syntactically valid wildcard expression, nothing should be output, as before.

If it is a syntactically invalid wildcard expression, there is no reason to even attempt wildcard matching, and only literal matching should be attempted - and that will give you the "Path not found" error.

@PowerShell/powershell-committee reviewed this, our recommendation:

if the wild card is invalid, treat as literal
if the path expects wild card matching, then wild card matching happens first and if nothing matches, then treat as literal
document that to escape wildcards, one needs to escape the escape character when using double quotes:

write-host "``["
`[

or using single quotes
write-host '`['
`[

for cmdlets that don't respect the single escaping (e.g. set-location), we should investigate a fix so that you don't need to escape it multiple times

Just as info for others because it is very confusing:
Test-Path with local paths work with one escape character.
But UNC paths need two escape characters.
Example if you want the test the literal path:
Test-Path "C:\New Folder`[123`]" `       ✅
Test-Path "\\Server\New Folder`[123`]"   ❌
Test-Path "\\Server\New Folder``[123``]" ✅

If anyone tackles this, it should be an experimental feature


Issue with force:source:convert and CustomWebpageLink

Summary
When running version 7.113 of force:source:convert the function attempts to process CustomWebbpageLinks as email services and throws the error shown below.
Steps To Reproduce:
Include a Custom WebPage Link in your package:
e.g.

online
Users Guide
link
600
page
Users Guide
noSidebar
Help
true

... and run force:source:convert.  The function works correctly in version 7.110
Expected result
Should be a successful conversion from SFDX to MDAPI, with no errors.
Actual result
ERROR running force:source:convert:  Component conversion failed: /var/folders/st/1ymrr4h11qv169zjw7ytdvdw0000gn/T/tmppy63sydc/emailservices/PaymentConnect_Settings.custompageweblink: Could not infer a metadata type
The function appears to be moving the object(s) to an "emailservices" directory instead of a "weblinks" directory and then failing on attempts to convert the object.
System Information
{
"cliVersion": "sfdx-cli/7.113.0",
"architecture": "darwin-x64",
"nodeVersion": "node-v10.15.3",
"pluginVersions": [
"@oclif/plugin-autocomplete 0.3.0 (core)",
"@oclif/plugin-commands 1.3.0 (core)",
"@oclif/plugin-help 3.2.3 (core)",
"@oclif/plugin-not-found 1.2.4 (core)",
"@oclif/plugin-plugins 1.10.1 (core)",
"@oclif/plugin-update 1.4.0-3 (core)",
"@oclif/plugin-warn-if-update-available 1.7.0 (core)",
"@oclif/plugin-which 1.0.3 (core)",
"@salesforce/sfdx-plugin-lwc-test 0.1.7 (core)",
"@salesforce/sfdx-trust 3.6.0 (core)",
"alias 1.1.10 (core)",
"apex 0.2.3 (core)",
"auth 1.7.1 (core)",
"config 1.2.23 (core)",
"custom-metadata 1.0.12 (core)",
"data 0.6.0 (core)",
"generator 1.2.0 (core)",
"limits 1.2.1 (core)",
"org 1.6.9 (core)",
"salesforce-alm 52.2.4 (core)",
"schema 1.0.8 (core)",
"sfdx-cli 7.113.0 (core)",
"source 1.0.7 (core)",
"telemetry 1.2.3 (core)",
"templates 52.1.0 (core)",
"user 1.4.0 (core)"
],
"osVersion": "Darwin 20.6.0"
}
Additional information

Hi @neutronron thanks for reporting this issue! We're already aware of the issue and have a PR in development fixing it https://github.com/forcedotcom/source-deploy-retrieve/pull/428 !

That's great news!  Thanks

Hi @neutronron this should be fixed in the latest-rc build of the cli 1.115.0, you can get it by either sfdx update stable-rc or npm install sfdx-cli@latest-rc --global depending on your preferred install method.
Please let us know if you're still seeing this in 1.115.0 of the CLI

Problem fixed.  Thank you!


loss suddenly increase?

Hi @lilanxiao,
thanks for your great work!
When I run the demo, I found that sometimes loss will suddenly increase and iou will suddenly drop.
Is there any ideas about this problem?

hi, thank you for this issue!
Yes, it also happens to me sometimes. I think it's due to my non-optional network design and hyper-parameter choices (e.g. too large learning rate), which leads to unstable training. I made this demo to show that the IoU loss is differentiable and didn't pay much attention to details.
But I don't think it's a big problem. I've used the IoU loss to train some 3D detectors. It worked well and didn't show any instability.

Thanks for your reply!
Just want to make sure that it's not a personal problem :)
And thanks for your great work again!


Report an error on names/linknames which would exceed the buffer size

Return MTAR_EFAILURE on what would currently be a buffer overflow.
Note: this does not cover the case where a tar of unknown origin contains filenames exceeding 100B. Which currently produces the following output using the README read example:
$ ./a.out
././@LongLink (102 bytes)
0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 (0 bytes)

here, the tarfile contains one file with a >100B filename. I think that case should probably be handled in raw_to_header, but wasn't sure, so I left it.

Also fixed the latter issue, and a potential double-free if the tar is closed internally, but the developer has an mtar_close() later, by checking to see if the pointer to the file/stream is null


Update renovate configuration

As you guess I did not intend to open this PR in this repository, sorry.


TODO: Add serialization tests for regularizer

Hope I have added the serialization tests correctly

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (fea907c) 79.42% compared to head (46a4773) 55.93%.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #18877       +/-   ##
===========================================
- Coverage   79.42%   55.93%   -23.49%
===========================================
  Files         336      336
  Lines       34826    34826
  Branches     6848     6848
===========================================
- Hits        27661    19481     -8180
- Misses       5584    13874     +8290
+ Partials     1581     1471      -110

Flag
Coverage Δ

keras
55.93% <ø> (-23.36%)
:arrow_down:

keras-jax
?

keras-numpy
55.93% <ø> (+<0.01%)
:arrow_up:

keras-tensorflow
?

keras-torch
?

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

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


Dashboard shows possible incorrect values

Describe the Bug
I'm a bit confused about the values/names the dashboard displays.
For example, from the screenshot, the UI shows 748 "visitors" but the api return a key called "uniques".
The chart displays the Unique Visitors and Page Views. If you count the values for each time on the chart for the unique values, you ended up with 920.
It does not make sense to have more unique visitors than "total" visitors. I'm not sure if the "Visitors" should be relabeled to "Unique Visitors" in the summary and in the chart it should be called "Total Visitors"(or just "Visitors") or if its something else in the code.
Thank you

Database
PostgreSQL
Relevant log output
No response
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response

Both the summary and table are unique visitors, but the table is grouped into a time series, so you can have the same unique visitor across multiple hours causing the increased count. However I think your right, having one label say Unique visitors and the other Visitors can cause confusion.

Thanks @franciscao633 ,
Is there any way to get the total and table values for non unique visitors?

My 2 cents:
Umami does not track Users per se, only Sessions grouped by IP/UserAgent and Page Views grouped by Sessions, so there's not really a distinction between Unique Visitors and Total Visits. Because people may be confused about what these somewhat technical terms mean, I think they should always be called "Visits" (unique Sessions) and "Views" (total Page Views) in the frontend.

I do think we can provide something like "Total Visits" vs "Unique Visits" though:
Google Analytics tracks individual users by fingerprinting them in many ways, most importantly by their logged in Google account. So if a Google user is logged in on multiple devices, they will have multiple sessions, but all associated to one user. So Google can count unique visitors (each user is counted once) and total visits (each session is counted once).
However, Umami doesn't track users, only sessions and pageViews. A session is identified by IP+UserAgent+WebsiteId+Hostname (sessionId). So if a user visits the website on multiple devices or browsers, they will have multiple sessions, but we don't know if they are the same user or not, so we can't differentiate between unique visitors and total visits like Google does.
We can however count sessions split by subunit periods of time, like days into hours. So we can define "unique visits" as the number of unique sessionIds in a unit and "total visits" as the sum of all unique sessionIds in subunits of a unit.
For example, if we're counting visits by day (unit) and a "user" (sessionId) visits the website in 3 different hours (subunits) of that day, then we count 1 unique visit and 3 total visits for that day. Then if another "user" visits the website in 2 different hours of that day, we count 2 unique visits and 5 total visits for that day and so on.
I implemented this "total visits" stat in my fork.
This is how it looks like in the src/queries/analytics/sessions/getSessionStats.ts query:
  let subqueryUnit = unit;
  switch (unit) {
    case 'hour':
      // This might be pushing it. We're counting unique visits by hour
      // and total visits by minute. If a user visits the website
      // in 2 different minutes of the same hour, then we count
      // 1 unique visit and 2 total visits for that hour...
      subqueryUnit = 'minute';
      break;
    case 'day':
      subqueryUnit = 'hour';
      break;
    case 'month':
      subqueryUnit = 'day';
      break;
    case 'year':
      subqueryUnit = 'month';
      break;
  }

  const subquery = `
    select g.u as unit, sum(g.c)::bigint as total from (
      select
        ${getDateQuery('website_event.created_at', subqueryUnit, timezone)} as su,
        ${getDateQuery('website_event.created_at', unit, timezone)} as u,
        count(distinct website_event.session_id) as c
      from website_event
        ${joinSession}
      where website_event.website_id = {{websiteId::uuid}}
        and website_event.created_at between {{startDate}} and {{endDate}}
        and event_type = {{eventType}}
        ${filterQuery}
      group by su, u
    ) as g group by u
  `;

  const query = `
    with subquery_cte as (${subquery})
    select
      m.x,
      m.y,
      (SELECT total FROM subquery_cte WHERE unit = m.x) as z
    from (
      select
        ${getDateQuery('website_event.created_at', unit, timezone)} x,
        count(distinct website_event.session_id) y
      from website_event
        ${joinSession}
      where website_event.website_id = {{websiteId::uuid}}
        and website_event.created_at between {{startDate}} and {{endDate}}
        and event_type = {{eventType}}
        ${filterQuery}
      group by x
    ) as m
  `;

  const result = await rawQuery(query, params);

  return result;

And in the src/queries/analytics/getWebsiteStats.ts query:
  return rawQuery(
    `
    select
      sum(t.c) as "pageviews",
      count(distinct t.session_id) as "uniques",
      sum(if(t.c = 1, 1, 0)) as "bounces",
      sum(if(max_time < min_time + interval 1 hour, max_time-min_time, 0)) as "totaltime"
    from (
      select
        session_id,
        ${getDateQuery('created_at', 'day')} time_series,
        count(*) c,
        min(created_at) min_time,
        max(created_at) max_time
      from website_event
      where website_id = {websiteId:UUID}
        and created_at between {startDate:DateTime} and {endDate:DateTime}
        and event_type = {eventType:UInt32}
        ${filterQuery}
      group by session_id, time_series
    ) as t;
    `,
    params,
  );

This is fixed in v2.10.0.


Telepathy Enchant Bug

Im using WorldGuard and FactionsOne , Telepathy enchant is breaking protected regions and factions warzone  & safezone claim. Im deny other-explosion flag but not work, Telepathy still breaking regions , config.yml telepathy disabled and /ce reload but not work telepathy still working :(

There is no FactionsOne support, I do believe.

Tnk u (ur plugin rlly nice)

It's not my plugin, I'm just answering questions that I can for badbones

Do u tell my bug to developer of this plugin ?

FactionsOne is not supported. If you want to stop block breaking with WG then set block break to deny in the region

^there's the dev :3


fix: clipboard deps

close https://github.com/dream-num/univer-pro/issues/2898

Pull Request Checklist

[ ] Related tickets or issues have been linked in the PR description (or missing issue).
[ ] Naming convention is followed (do please check it especially when you created new plugins, commands and resources).
[ ] Unit tests have been added for the changes (if applicable).
[ ] Breaking changes have been documented (or no breaking changes introduced in this PR).

@lumixraku  create-another-sheet，复制使用快捷键粘贴仍会进入编辑器
Uploading 2024_11_21 19_12_20 video.webm…


Repository name inconsistent with quickstart page

In Quickstart using Docker Compose, it points readers to chirpstack-docker and it is now still loraserver-docker. The repository name needs to be changed accordingly.

:+1: fixed.


How to catch the raised HTTPException with this logging module(fastapi_log)?

First Check

[X] I added a very descriptive title to this issue.
[X] I used the GitHub search to find a similar issue and didn't find it.
[X] I searched the FastAPI documentation, with the integrated search.
[X] I already searched in Google "How to X in FastAPI" and didn't find any information.
[X] I already read and followed all the tutorial in the docs and didn't find an answer.
[X] I already checked if it is not related to FastAPI but to Pydantic.
[X] I already checked if it is not related to FastAPI but to Swagger UI.
[X] I already checked if it is not related to FastAPI but to ReDoc.

Commit to Help

[X] I commit to help with one of those options 👆

Example Code
from fastapi import FastAPI, HTTPException
from pydantic import BaseModel
from fastapi_log.log_request import LoggingRoute

app = FastAPI()
app.router.route_class = LoggingRoute

uni_val = ""

class Auth(BaseModel):
    name : str
    password : str

@app.post("/get_val")
def get_val_func(data : Auth):
    global uni_val
    # A function which generates a value between 1 and 0 and stores it in global variable "uni_val"
    # Code

@app.get("ret_val")
def ret_val_func():
    global uni_val
    if uni_val > 0 :
        return uni_val
    else:
        raise HTTPException(
            status_code = 401,
            detail = { "code" : 401,
                       "message" : "Unauthorized" }
            )

Description
Hi,
I'm use the fastapi_log library(https://pypi.org/project/fastapi-log/) (https://github.com/12345k/fastapi-log) in my FastAPI project.
It works great to log request and responses(return statements), but it does not log FastAPI HTTPExceptions(which I used in some parts of the program instead of return statements).
How can I edit the source code for log_request.py (https://github.com/12345k/fastapi-log/blob/main/fastapi_log/log_request.py) to be able to log responses from HTTPExceptions as well ?
This isn't an issue with FastAPI, but I wanted any suggestions or possible solutions to log using the fastapi_log module, the code and message in the HTTPException raised.
Thank you
Operating System
Linux
Operating System Details
No response
FastAPI Version
0.75.2
Python Version
3.8.10
Additional Context
No response

from fastapi.exceptions import HTTPException

def register_exception(app: FastAPI):

    @app.exception_handler(HTTPException)
    async def http_exception_handler(request: Request, exc: HTTPException):

        # your logic
        pass

app = FastAPI()

register_exception(app)


Support for new hardware data model

Abstracting type Discovery into an interface to settle the differences between the new and old hardware data models.
Signed-off-by: Gaurav Gahlot<EMAIL_ADDRESS>

Ref: RFC #2 New Hardware data model


RM3 / Branding refresh / Slider / Light background

Purpose: Update the styling of Slider for the new branding.
inVision: https://cengage.invisionapp.com/share/M912EDCFJ6PU
Prerequisites:

Color palette in place
Typography updated
Progress Bars updated
Work Sans available

AC

If still necessary, change font from Open Sans to Work Sans

1.0 Track

1.1 Background: neutral-100
1.2 Border: 1px solid neutral-500
1.3 Height: 8px

2.0 Handle

2.1 Background: neutral-100
2.2 Border: 1px solid neutral-500
2.3 No drop shadow

3.0 Filled portion of track

3.1 Background: primary-500

Closing as these styles have been applied to the WIP PR (#360), and the issue will be completed as part of #64


Adding DragonFlyBSD support.

Thank you for the patch.
Reference for the reader

DragonFly BSD home - https://www.dragonflybsd.org/.
Further info on DragonFly - https://en.wikipedia.org/wiki/DragonFly_BSD

@devnexen out of curiosity, is that any specific reason to add DragonFly on whoAmI?
https://github.com/SpiderLabs/ModSecurity/blob/afefda53c69bb17e2ec16d24dd6fbc2c8fd7d063/src/modsecurity.cc#L112-L152

Well DragonFlyBSD stands on its own thus deserves to be distinct from FreeBSD.

merged! Thank you @devnexen ;)


Create Prideraiser attachment type

Put live campaign data in the feed!

Addressed in version 1.16.X


Feature/change logging

Codecov Report

Merging #37 (31c7116) into master (e39e608) will increase coverage by 0.04%.
The diff coverage is 100.00%.

:exclamation: Current head 31c7116 differs from pull request most recent head ee02eca. Consider uploading reports for the commit ee02eca to get more accurate results

@@            Coverage Diff             @@
##           master      #37      +/-   ##
==========================================
+ Coverage   70.90%   70.94%   +0.04%
==========================================
  Files          31       31
  Lines        1354     1356       +2
==========================================
+ Hits          960      962       +2
  Misses        394      394

Flag
Coverage Δ

unit-tests
70.94% <100.00%> (+0.04%)
:arrow_up:

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

Impacted Files
Coverage Δ

mango/logging/logger.py
82.35% <100.00%> (+2.35%)
:arrow_up:

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


Mobile View: Giving users the possibility to open and close the left menu containing the chat list

Refer to the whole thread here. Related PR changes could be ported here into this repo as well.
Question: Do you find it reasonable for me to send a PR that includes both this enhancement for mobile view, allowing users to open and close the left menu containing the chat list, and the previously opened issue regarding title edit? These changes overlap in the code part related to the 'chat menu' component. Sending two separate PRs might introduce dependency issues, so combining them into one could simplify the process. Your feedback on this proposal is appreciated.

Thanks, @giuliohome :)
@thivy, would you be OK with this functionality?

@oliverlabs they have done

@oliverlabs maybe it is enough to delete (or reduce) min-w-[380px] from this line
https://github.com/microsoft/azurechat/blob/main/src/components/chat/chat-row.tsx#L42
I'm under the impression that they don't want I touch the code though... I've already opened a PR and it has been ignored till now..

@giuliohome, many thanks. This fixes the issue, indeed!


I have a few questions...

Hello, guys. I'm recently looking to switch from RethinkDB to NeDB for my website. It looks promising so far, but I still have some questions.

If I split my website up into multiple processes and each process shared the same database file, will the database on each process update when one changes the file?
Is it possible to use in-method ways of selecting data from the current document? (Example: db.update((row) => ({ number: row.number + 1 })) (takes every document and adds one to the number property))
Could this database stand up to heavy DOS attacks? (Essentially just lots of queries on db-heavy queries)

I hope you guys can help. Thanks!

Hello @PassTheMayo this seems like a clear case of "you should not use NeDB" :). NeDB is designed for self-contained, single process applications (usually either local or at least used by not too many people). If you're thinking about multiple processes and query throughput you want to use a full fledged database.


calling userCanPay (as well as other client methods) leads to PlatformException

version 1.0.5
E/flutter (26185): [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: PlatformException(10, 10: , null, null)
E/flutter (26185): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:597:7)
E/flutter (26185): #1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:158:18)
E/flutter (26185):
E/flutter (26185): #2      PayMethodChannel.userCanPay (package:pay_platform_interface/pay_channel.dart:48:12)
E/flutter (26185):

This looks like an error on your configuration for Android. Take a look at the logs on Android for more details on the error:
adb -d logcat -s WalletMerchantError.

This looks like an error on your configuration for Android. Take a look at the logs on Android for more details on the error:
adb -d logcat -s WalletMerchantError.

Thank you Jose!


source tag on ways with improve_osm_tn value

I see that there were 9734 ways added to OSM with  the tag source=improve_osm_tn added to the way to report usage of the ImproveOsm.
The appropriate source code refering to imagery is added on the changeset. But the usage of  source tag on the way adds confusion and is to my point of view inappropriate since the source tag is used to report imagery.
An other tag should be used and could be simply added on the changeset.

The plugin doesn't add automatically any source tag. It is up to the user to add a source tag corresponding to the edit.


update namespace of illuminate Assert

Looks like the namespace for Illuminate\Foundation\Testing\Assert changed to Illuminate\Testing\Assert  in laravel 7.
This pull request replaces all instances of the old namespace with the new one. Should probably be a new major version since this most likely breaks backwards compatibility

Hey @dillingham. Great package 👏 Any chance you could merge in @klepak's PR?

👀


xcode archive fail ,why

name: Bug Report
about: Using AlphaWallet, but it's not working as you expect?

Describe the bug
A clear and concise description of what the bug is.
Steps to reproduce (REQUIRED)
Steps to reproduce the behavior

Tap Wallet tab
Tap ...
Tap ...
Wait ...
Tap ...

Expect
6a. ...
Observed
6b. ...
Screenshots
If applicable, screenshots (preferred to video) to help explain your problem, a wallet address or transaction hash if applicable/possible
Version or build number number
Version number (if app store), build number (if TestFlight)
Additional context (Error Messages, etc.)
Add any other context about the problem here.

yes.use Xcode 12.5 and clear,but fail too,can you tell me how to resolve this error ??

yes.use Xcode 12.5 and clear,but fail too,can you tell me how to resolve this error ??

yes.use Xcode 12.5 and clear,but fail too,can you tell me how to resolve this error ??

yes.use Xcode 12.5 and clear,but fail too,can you tell me how to resolve this error ??

Get back  as soon as possible ，please


wrapGAppsHook: use makeBinaryWrapper

WIP to make the GApps wrapper use makeBinaryWrapper instead of makeWrapper. cc @bergkvist @doronbehar @tfc
The basic motivation is that some applications like thunar are wrapped twice, once by wrapGAppsHook and once manually to add support for plugins, and because of the way shell scripts work this results in thunar's argv0 being set to .thunar-wrapped_, which is reflected in the X11 class name for all thunar windows. I already mentioned this issue at https://github.com/NixOS/nixpkgs/pull/126248#issuecomment-859896534 and this was one of the motivations for makeBinaryWrapper (https://github.com/NixOS/nixpkgs/pull/124556). Making the outer wrapper binary isn't enough to solve this, hence this PR.
This isn't as easy as it sounds for at least two reasons (more may arise!):

makeBinaryWrapper uses a wrapped GCC and will hence respect NIX_CFLAGS_COMPILE, which resulted in an error when trying to build libreoffice because a flag in its NIX_CFLAGS_COMPILE was for C++ only. I believe the wrapper shouldn't be affected by whatever CFLAGS happen to be set in the calling derivation, so I unset those variables in d399e701aa79815148ce08b41ed7263f122f1d24 (more unsetting may be needed). (I also tried to use gcc-unwrapped but got more errors)
some programs have both makeWrapper and wrapGAppsHook in their build inputs, and because setup hooks are propagated, both versions of the wrapping functions are installed and it seems like the binary ones win. This made the build of minecraft fail because the binary version doesn't implement --run, so I replaced every instance of --run "cd $foo" I could find with --chdir "$foo" in a4b32633e8c6429d2f2a02f70373d20e5d966ee6 and made makeWrapper implement --chdir in 2e3ae88a9c830ba18163c778ade179e7cc820cd3. I am not sure how exactly we want to resolve the issue of conflicting versions of wrapper hooks; maybe it's a good thing that all wrappers around a program are of the same "type".

I tried building a few things but I don't have a build farm handy and my server ran out of disk space 😬. Can I request a dedicated hydra jobset for this branch or something? cc @vcunat

The basic motivation is that some applications like thunar are wrapped twice, once by wrapGAppsHook and once manually to add support for plugins

This can be easily fixed with wrapperArgs and has nothing to do with makeBinaryWrapper and needs to be fixed independently.

The basic motivation is that some applications like thunar are wrapped twice, once by wrapGAppsHook and once manually to add support for plugins

This can be easily fixed with wrapperArgs and has nothing to do with makeBinaryWrapper and needs to be fixed independently.

That would work if the two wrappings happened in the same derivation, but there's a separate wrapper.nix stage.

Technically the wrapper could override the gapps wrapper's flags but then you'd need to rebuild thunar every time you add a plugin, which defeats the point of having the wrapper separate

That would work if the two wrappings happened in the same derivation, but there's a separate wrapper.nix stage.

We could override that but it would require a recompile or we clone the build derivation and dirty patch the wrapper.

Technically the wrapper could override the gapps wrapper's flags but then you'd need to rebuild thunar every time you add a plugin, which defeats the point of having the wrapper separate

We could also move the wrapping entirely to the wrapper or use a totally unwrapped program for plugin support and add the required variables only later. There are multiple ways to fix this independently of binary wrapper.

We could also move the wrapping entirely to the wrapper or use a totally unwrapped program for plugin support and add the required variables only later. There are multiple ways to fix this independently of binary wrapper.

Sounds like working around a technical limitation that has no raison d'être (can't have more than one layers of wrappers)

If the goal is to totally switch most things to binary wrappers we should also not layer them.

I'm not seeing the connection, I think these are independent questions.
To be clear, when I said "the basic motivation" I meant what motivated me to make this PR. I'm not saying we shouldn't unlayer the wrappers, or that this is the only way to fix thunar, but it seemed like a logical step forward.

Would it be possible to have makeWrapper detect an existing wrapper script, and copy and then edit it instead of double wrapping it?

I thought about this some time ago and eventually dropped the idea, but I can't remember why precisely. I think it felt like a layer violation because a wrapper (much less a wrapper builder) shouldn't have to know about the thing it's wrapping (imagine that the wrapped program is a mutable path like /run/current-system/sw/bin/foo, or somehow hasn't been built yet).
It would probably fix argv0 issues if done correctly, but doing it correctly doesn't seem significantly easier than this PR, and I think binary wrappers are a cleaner solution.

Hey,
As it seems to me, this PR only adds support for --chdir for makeWrapper and replaces all occurrences of --run cd? This seems like a good scope as a start, and I wonder if anyone had any further plans? (why is it a draft?).
I think that perhaps adding a wrapBinaryGAppsHook, and to migrate packages to it one by one, could be a good idea since this transition is so intimidating.

No, the meat of this PR is d6e2d3670ffc42665fd1d884b550c548a365fb82. I've extracted the --chdir thing into https://github.com/NixOS/nixpkgs/pull/164746

I managed to build my entire laptop's config with this (minus firefox, chromium and libreoffice). Should we merge and see if anything breaks in staging?

Yes, the tests for wrapGAppsHook are passing.

Well, merging such wide changes in phase

Restrict breaking changes to Release Critical Packages

wasn't an ideal moment, though yes... the wrapper is not listed in "release critical" list.

Not the best timing. Please wait for further binary wrapper migration until branch off. Thanks

I think this broke signal-desktop.
Recently I get
[5036:0510/101840.222112:FATAL:platform_selection.cc(45)] Invalid ozone platform: wayland}} fish: Job 1, 'signal-desktop' terminated by signal SIGTRAP (Trace or breakpoint trap)
when trying to start signal-desktop. I am on xmonad (Xorg).
Originally posted by @xaverdh in https://github.com/NixOS/nixpkgs/issues/158175#issuecomment-1122097577

So the right solution for signal-desktop would be to double wrap it with a non-binary wrapper, that sets the appropriate flag?

So the right solution for signal-desktop would be to double wrap it with a non-binary wrapper, that sets the appropriate flag?

That would be a workaround, though it's slightly complicated to implement right now because wrapGAppsHook forces makeWrapper to be the binary version. I'm making a cleanup PR in which I'll add explicit makeShellWrapper and makeBinaryWrapper functions.
Another option would be to somehow support this pattern in binary wrappers, but that seems a bit awkward.

Nope (see discussion there).
Apparently whichever of makeWrapper and wrapGAppsHook is last in nativeBuildInputs wins... good to know.


790: Add map projection to Rails and front end (WIP)

Closes #790.
This PR adds a field map_projection to the themes model, sets it to mercator by default, and permits an admin user to change the projection in the Themes menu to one of six possible projections that are supported by Mapbox GL JS 2.7. The map on the front end will then use that projection set by the admin user.

Natural Earth:

Albers:

Lambert Conformal Conic:

Works with default offline vector tiles and TileServer-GL while entirely offline:

Once mapbox-gl-rails updates to 2.9, we can file a small PR to add the globe projection as well, but will likely have to account for this not working with TileServer-GL when offline.
Lastly, a few small housekeeping fixes:

Move the zoom, pitch, and bearing fields above the bounding box fields in the Theme menu, since these are more useful to the user than the bounding box.
Fixing broken links in documentation
Reset 3d terrain exaggeration to 1 (default)

Will update this PR to build on the new refactor code, next week.


How to include 3+ fragments?

Hi,
We are trying to identify longer petptides and therefore higher charge states and 3+ fragments become important to us.
I have a few DDA library with 5+, 6+ peptide ions included also with all 1+, 2+, and 3+ fragments. I changed the yaml file

max_frag_charge: 3

and I was able to perform transfer learning without problem, but then after I generate predicted library from FASTA file, still only 1+, 2+ fragments were included in the tsv file.
Could you please advise me on how to include 3+ fragments?
Here is my yaml file:
model:
  frag_types:
  - b
  - y
  - b_modloss
  - y_modloss
  max_frag_charge: 3
PEPTDEEP_HOME: C:\Users\Administrator/peptdeep
local_model_zip_name: pretrained_models.zip
model_url: https://github.com/MannLabs/alphapeptdeep/releases/download/pre-trained-models/pretrained_models.zip
task_workflow:
- library
task_choices:
- train
- library
thread_num: 40
MAX_THREADS: 60
torch_device:
  device_type: gpu
  device_type_choices:
  - get_available
  - gpu
  - mps
  - cpu
  device_ids: []
log_level: info
log_level_choices:
- debug
- info
- warning
- error
- critical
common:
  modloss_importance_level: 1.0
  user_defined_modifications:
    IADTB@C:
      composition: H(24)C(14)N(4)O(3)
      modloss_composition: ''
peak_matching:
  ms2_ppm: true
  ms2_tol_value: 20.0
  ms1_ppm: true
  ms1_tol_value: 20.0
model_mgr:
  default_nce: 30.0
  default_instrument: Lumos
  mask_modloss: true
  model_type: generic
  model_choices:
  - generic
  - phos
  - hla
  - digly
  external_ms2_model: C:/Users/Administrator/peptdeep/refined_models_v3/ms2.pth
  external_rt_model: C:/Users/Administrator/peptdeep/refined_models_v3/rt.pth
  external_ccs_model: C:/Users/Administrator/peptdeep/refined_models_v3/ccs.pth
  instrument_group:
    ThermoTOF: ThermoTOF
    Astral: ThermoTOF
    Lumos: Lumos
    QE: QE
    timsTOF: timsTOF
    SciexTOF: SciexTOF
    Fusion: Lumos
    Eclipse: Lumos
    Velos: Lumos
    Elite: Lumos
    OrbitrapTribrid: Lumos
    ThermoTribrid: Lumos
    QE+: QE
    QEHF: QE
    QEHFX: QE
    Exploris: QE
    Exploris480: QE
    THERMOTOF: ThermoTOF
    ASTRAL: ThermoTOF
    LUMOS: Lumos
    TIMSTOF: timsTOF
    SCIEXTOF: SciexTOF
    FUSION: Lumos
    ECLIPSE: Lumos
    VELOS: Lumos
    ELITE: Lumos
    ORBITRAPTRIBRID: Lumos
    THERMOTRIBRID: Lumos
    EXPLORIS: QE
    EXPLORIS480: QE
  predict:
    batch_size_ms2: 512
    batch_size_rt_ccs: 1024
    verbose: true
    multiprocessing: true
  transfer:
    model_output_folder: C:/Users/Administrator/peptdeep/refined_models
    epoch_ms2: 20
    warmup_epoch_ms2: 10
    batch_size_ms2: 512
    lr_ms2: 0.0001
    epoch_rt_ccs: 40
    warmup_epoch_rt_ccs: 10
    batch_size_rt_ccs: 1024
    lr_rt_ccs: 0.0001
    verbose: false
    grid_nce_search: false
    grid_nce_first: 15.0
    grid_nce_last: 45.0
    grid_nce_step: 3.0
    grid_instrument:
    - Lumos
    psm_type: alphapept
    psm_type_choices:
    - alphapept
    - pfind
    - maxquant
    - diann
    - speclib_tsv
    - msfragger_pepxml
    - spectronaut_report
    dda_psm_types:
    - alphapept
    - pfind
    - maxquant
    - msfragger_pepxml
    psm_files: []
    ms_file_type: alphapept_hdf
    ms_file_type_choices:
    - alphapept_hdf
    - thermo_raw
    - mgf
    - mzml
    ms_files: []
    psm_num_to_train_ms2: 100000000
    psm_num_per_mod_to_train_ms2: 50
    psm_num_to_test_ms2: 0
    psm_num_to_train_rt_ccs: 100000000
    psm_num_per_mod_to_train_rt_ccs: 50
    psm_num_to_test_rt_ccs: 0
    top_n_mods_to_train: 10
    psm_modification_mapping: {}
library:
  infile_type: fasta
  infile_type_choices:
  - fasta
  - sequence_table
  - peptide_table
  - precursor_table
  - all_other_psm_reader_types
  infiles:
  - C:/Users/Administrator/peptdeep/uniprot_swissprot_20200903_can_iso_with_LOH_altAlleles_Ver3_20230808_fragpipe.fasta
  fasta:
    protease: ([DE])
    protease_choices:
    - trypsin
    - ([KR])
    - trypsin_not_P
    - ([KR](?=[^P]))
    - lys-c
    - K
    - lys-n
    - \w(?=K)
    - chymotrypsin
    - asp-n
    - glu-c
    max_miss_cleave: 5
    add_contaminants: false
  fix_mods:
  - IADTB@C
  var_mods:
  - Acetyl@Protein_N-term
  - Oxidation@M
  special_mods: []
  special_mods_cannot_modify_pep_n_term: false
  special_mods_cannot_modify_pep_c_term: false
  labeling_channels: {}
  min_var_mod_num: 0
  max_var_mod_num: 2
  min_special_mod_num: 0
  max_special_mod_num: 1
  min_precursor_charge: 2
  max_precursor_charge: 6
  min_peptide_len: 5
  max_peptide_len: 50
  min_precursor_mz: 200.0
  max_precursor_mz: 2000.0
  decoy: None
  decoy_choices:
  - protein_reverse
  - pseudo_reverse
  - diann
  - None
  max_frag_charge: 3
  frag_types:
  - b
  - y
  rt_to_irt: false
  irt_library: xxx/library.tsv
  irt_library_type: speclib_tsv
  generate_precursor_isotope: false
  output_folder: C:/Users/Administrator/peptdeep/spec_libs_uniprot_swissprot_20200903_can_iso_with_LOH_altAlleles_Ver3_20230808_fragpipe_gluc_v3_nodecoy
  output_tsv:
    enabled: true
    min_fragment_mz: 200.0
    max_fragment_mz: 2000.0
    min_relative_intensity: 0.001
    keep_higest_k_peaks: 12
    translate_batch_size: 100000
    translate_mod_to_unimod_id: false

This requires to create a new model and train it

This requires to create a new model and train it

Did you mean completely from scratch? I cannot do transfer learning?

@jalew188 ,
I tried retraining a model by leaving "pretrained model field" empty and using the transfer command, but I am still not getting 3+ fragment in the library I generated from FASTA file. Could you advise any way I could get it resolved?

No, I mean you need to write new model code, then train the new model. This is not enabled by command line.


Automatic unmute no longer works on twitter.com videos

Something probably changed with the volume control.

Fixed in the 1.0.0 release pending approval in the Chrome Web Store


BREAKING: don't emit diagnostic for max limit files

@ematipico Could you motivate this change?

It was pointed out to me that this diagnostic is emitted as an error to the user, while it's an expected behaviour inside the library. Biome by default doesn't handle the size of a certain limit, and since it's the default, it should ignore those files.
Now, the user that pointed out was a jerk and ignored them, however, that is true.
So I plan to change the logic, emit a diagnostic with a different severity, but still make the CLI working. It should not exit with an error code.

Closed by https://github.com/biomejs/biome/pull/4474


[dv/chip] Generate correct data integrity bits in stub_cpu mode

We currently rely on the tlul_adapter_host module to generate correct integrity bits for tlul transactions in stub_cpu mode.
In order to enable pass-through of integrity bits from the core, we need to disable generation in the tlul_adapter_host, and so we'll need some other way of generating the correct integrity bits.
I'll leave the pass-through turned off for now with a TODO against this issue.

@weicaiyang the generation is buried in the core so I think would be very difficult to keep it while stubbing the data

tom can you point us to where this code is?
maybe we can consider splitting up how we hijack the resets and thus retain
control of this logic.
On Tue, Aug 31, 2021 at 1:59 AM Tom Roberts @.***>
wrote:

@weicaiyang https://github.com/weicaiyang the generation is buried in
the core so I think would be very difficult to keep it while stubbing the
data
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/lowRISC/opentitan/issues/7966#issuecomment-909041045,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAH2RSU7ZEIWGKKGAUX3B7TT7SKVPANCNFSM5C5LW4XA
.
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.

The generation is here:
https://github.com/lowRISC/opentitan/blob/6750e3629795be1cae81ed6851d16324cf0a705f/hw/vendor/lowrisc_ibex/rtl/ibex_lockstep.sv#L237
I think the tricky bit is that the agent is generating its own write transactions, with its own write data (which the cpu doesn't see), so you would need to "inject" the write data into the core at that point to get it to generate the required integrity bits. Does that make sense?

@weicaiyang let us know what you think. I think the only difficulty is that right now the stub cpu hijack point is a tlul interface, but this is more of a generic data interface pre-conversion.  Maybe it'll be better for the DV agent to be aware of the integrity after all.

@tomroberts-lowrisc @tjaychen
We probably still hijack in the TLUL interface which is more standard. Let me update agent to generate the data integrity. Thanks

@weicaiyang has this issue been addressed?
@tjaychen if so, we should disable integrity generation at the Ibex boundary here:
https://github.com/lowRISC/opentitan/blob/bef8e3cca58676e412fa7c2d3fd4ab8d564a0ee0/hw/ip/tlul/rtl/tlul_adapter_host.sv#L29-L30
https://github.com/lowRISC/opentitan/blob/bef8e3cca58676e412fa7c2d3fd4ab8d564a0ee0/hw/ip/rv_core_ibex/rtl/rv_core_ibex.sv#L424-L426

yeah i'm not sure if the DV enhancements are there yet.
But certainly if they are we must disable the host generation as you point out.

@msfschaffner will work on this next week. Thanks for reminding me.

Cool, thanks @weicaiyang.
I just stumbled over this while working on the inverted ECC update (https://github.com/lowRISC/opentitan/pull/9259).

@weicaiyang has this been addressed by now? If yes, can we close this?

@weicaiyang has this been addressed by now? If yes, can we close this?

yes, this is done. Closing it now.


InputBlockV2 - Extend test coverage

Currently there are dozens of tests using InputBlock.
This task is about creating copies of those tests and replacing InputBlock by InputBlockV2, which over time will be the de-facto solution for InputBlock and flexible embedding table definition.
Associated to RMP #479, which you can check for more context

@marcromeyn , please review this ticket and break it up so that session based models are prioritized for 22.09 and the rest are kept in needs prioritization.

@marcromeyn , please tag the PR and close it


Feature request : Custom login page

For Feature Requests
Desired Feature: Hello, I ask you if it would be possible to make the login page customisable on Bookstack settings without touching to the code. Nothing very big, but just allowing us to add a welcome sentence or login indication.
Thank you for your work ! This is very appreciable.

Hello again @Dav31,
Thanks for the suggestion. I've got some ideas for general customisation which I think this will come under. My idea will involve touching code but would be fairly safe & upgrade compatible.
How often would you imagine needing to change the text? Just once or every so often?

Thank you for your quick answer !
Well, ideally, this modification would only be done once. I could do it on the code but I'm afraid that it won't last any update. Am I wrong ?

@Dav31 No, you're not wrong. Currently you'd have to apply the change after each update or use git tactically to merge in you're change each time.

Assigning to the next release with the intent of adding a specific new partial template to have a specific view to override via the visual theme system.

I have now merged #3848 for next release, which would allow setting custom content between the inputs and title of the login view, by overriding this view via the visual theme system.  Will therefore close this off.