fix: [M3-7817] - Show correct status of Child Account Enabled column for parent users

Description 📝
We need to fix our conditional that is rendering either "Disabled" or "Enabled" in the Child Account Access column of the Users & Grants table. This grant can be set for restricted parent users, by an unrestricted parent user, to determine whether that restricted parent can access child accounts.
Currently, Child Account Access on http://localhost:3000/account/users is “Disabled” for unrestricted parent users, which is not correct; it should be “Enabled”. This was a logic error - our check for grants is going to return undefined (and evaluate to "Disabled") for unrestricted parent users because we don't check grants for unrestricted users.
We should also confirm that the Child Account Access column updates as expected (to "Enabled") after a restricted parent is granted access.
Changes  🔄

Adds a restricted user check and flips the Disabled/Enabled conditional result.
Invalidates the grants query for the current user when global permissions are changed so current data is fetched.

[!NOTE]
Test coverage for these changes will be in the related test ticket, M3-7500. (#10240)

Preview 📷

Before
After

How to test 🧪
Prerequisites
(How to setup test environment)

Turn on the feature flag for Parent Child Accounts.
To get access to a parent account login, contact me.
On your parent account, create two other parent users: one will full account access unrestricted-parent-user and another without full account access restricted-parent-user.

Reproduction steps
(How to reproduce the issue, if applicable)

Using our dev environment, log into a parent account and go to the Users & Grants page.
Observe that the Child Account Access column shows "Disabled" for a unrestricted parent user.

Verification steps
(How to verify changes)

Check out this PR, yarn dev and switch to the dev environment.
Log into a parent account and go to http://localhost:3000/account/users.
Verify the following:

For an unrestricted parent user, the Child Account Access column displays Enabled. (You can create a new parent user with full account access to test.)
For a restricted parent user, the Child Account Access column displays Enabled if the child_account_access grant is true and Disabled if the child_account_access grant is false.

Go to the User Permissions page of the restricted-parent-user and toggle the "Enable child account access" general permission. Then go back to the Users Landing page and confirm the value has updated as expected.

For all other users, the Child Account Access column is not visible.

As an Author I have considered 🤔
Check all that apply

[x] 👀 Doing a self review
[x] ❔ Our contribution guidelines
[x] 🤏 Splitting feature into small PRs
[x] ➕ Adding a changeset
[x] 🧪 Providing/Improving test coverage
[x] 🔐 Removing all sensitive information from the code and PR description
[x] 🚩 Using a feature flag to protect the release
[x] 👣 Providing comprehensive reproduction steps
[ ] 📑 Providing or updating our documentation
[ ] 🕛 Scheduling a pair reviewing session
[ ] 📱 Providing mobile support
[ ] ♿  Providing accessibility support

CI failure was on volumes/delete-volume.spec.ts, which is unrelated to these changes. Merging now.


Samplegen: sample parameter default values are not filled in for Java

ValueSet: odyssey
output: https://github.com/googleapis/gapic-generator/blob/b7b11acfa1b82f1e9369711af9b872d6c08504a9/src/test/java/com/google/api/codegen/gapic/testdata/java/java_library.baseline#L206
cc/ @vchudnov-g

It seems to be caused by flattening. In a non-flattened method, we prefer types set on message over types set in the yaml, i.e., these fields are treated as strings. While in a flattened method, we honor the flattening field in the yaml, therefore these fields are treated as resource names, so they are rendered as above.
I am trying configuring entity names and will see how it goes.

We do not produce any samples using the flattening overload version of an API method and do not foresee any adoption of that in the near future. Flattening samples themselves may need some style reviews and correctness validations before we can use them. Therefore converting this issue to a feature request.


Maintenance planner downloads: Deselected files are still downloaded

Hi folks
First of all, many thanks for providing this library! It is an incredibly valuable tool when it comes to automating our SAP Basis deployment pipeline.
I think we found a minor bug in community.sap_launchpad.maintenance_planner_files - it returns files for a download that were deselected in the maintenance planner.
How to reproduce

Access the SAP maintenance planner

Click on "Plan a new system"

Click on "Plan"

Choose a SID and "Install an SAP S/4HANA system"

Select some release, i.e. "SAP S/4HANA 2022" with FPS 02, confirm selection

Go to "Select Files", select Linux X64, confirm selection

If you expand "Select Stack Independent Files" & "NON-ABAP", you will notice that all language stacks other than German (DE) and English (EN) are unselected:

When going further to "Download Files", you will see that only German (DE) and English (EN) are selected for download:

We finalize the MP part by pushing the downloads to the download basket (not sure this part is necessary)

Now, when listing the files to download with this module, it will not only tell us to download the language packs DE & EN, but all available language packs, even though they were not selected in the MP. I think this is a bug:
...
    - name: Execute Ansible Module 'maintenance_planner_files' to get files from MP
      community.sap_launchpad.maintenance_planner_files:
        suser_id: "{{ suser_id }}"
        suser_password: "{{ suser_password }}"
        transaction_name: "{{ transaction_name }}"
      register: sap_maintenance_planner_basket_register

    - name: Debug
      ansible.builtin.debug:
        var: sap_maintenance_planner_basket_register
        verbosity: 2
...

This will output all language files, even though deselected:
...
    "sap_maintenance_planner_basket_register": {
        "changed": true,
        "download_basket": [
...
            {
                "DirectLink": "https://softwaredownloads.sap.com/file/0030000001312922022",
                "Filename": "S4HANAOP107_ERP_LANG_SL.SAR"
            },
            {
                "DirectLink": "https://softwaredownloads.sap.com/file/0030000001312932022",
                "Filename": "S4HANAOP107_ERP_LANG_SV.SAR"
            },
            {
                "DirectLink": "https://softwaredownloads.sap.com/file/0030000001312942022",
                "Filename": "S4HANAOP107_ERP_LANG_TH.SAR"
            },
            {
                "DirectLink": "https://softwaredownloads.sap.com/file/0030000001312962022",
                "Filename": "S4HANAOP107_ERP_LANG_TR.SAR"
            },
            {
                "DirectLink": "https://softwaredownloads.sap.com/file/0030000001312972022",
                "Filename": "S4HANAOP107_ERP_LANG_UK.SAR"
            },
            {
                "DirectLink": "https://softwaredownloads.sap.com/file/0030000001312982022",
                "Filename": "S4HANAOP107_ERP_LANG_VI.SAR"
            },
            {
                "DirectLink": "https://softwaredownloads.sap.com/file/0030000001312992022",
                "Filename": "S4HANAOP107_ERP_LANG_ZF.SAR"
            },
            {
                "DirectLink": "https://softwaredownloads.sap.com/file/0030000001313002022",
                "Filename": "S4HANAOP107_ERP_LANG_ZH.SAR"
...

To summarize, it appears that the module returns all software packages from the stack, even deselected ones.
I dug a bit deeper into the code and saw that the API call that return the files above returns an XML which also contains the deselected files:
<?xml version="1.0" encoding="utf-16"?>
<mnp:response xmlns:mnp="http://xml.sap.com/2012/01/mnp">
...
 <mnp:entities>
        <mnp:entity id="selectFiles" step="downloadFiles" label="Download Files">
            <mnp:entity id="downloadStackFiles" label="Download Stack Files">
                <mnp:entity label="List of files selected for download" id="stack_files"
                            type="Download Stack Independent Files" enable="false">
                    <mnp:entity id="0010000000033172015" label="GBX01HR5605.SAR" type="REG" size="5"
                                selection_type="multiple" selected="true"
                                description="Attribute Change Package 28 for GBX01HR5 605" enable="false"/>
....
                    <mnp:entity id="0030000001312572022" label="S4HANAOP107_ERP_LANG_CS.SAR" type="STL" size="687978"
                                selection_type="multiple" selected="true" description="File on DVD" enable="false"/>
                    <mnp:entity id="0030000001312582022" label="S4HANAOP107_ERP_LANG_DA.SAR" type="STL" size="475621"
                                selection_type="multiple" selected="true" description="File on DVD" enable="false"/>
                    <mnp:entity id="0030000001312472022" label="S4HANAOP107_ERP_LANG_DE.SAR" type="STL" size="292015"
                                selection_type="multiple" selected="true" description="File on DVD" enable="false"/>
...

As you can see, both S4HANAOP107_ERP_LANG_DE (which was selected in the MP GUI) as well as S4HANAOP107_ERP_LANG_DA.SAR (which was unselected in the MP planner) have selected=true. If the clients are supposed to respect this field, then it might even be a bug in the SAP backend. I am not sure this can easily be fixed, but maybe you folks have a good internal contact working on this part that can take a look?
FWIW, I also checked out the SAP Download Manager (which I assume is the official client for the MP) and it correctly returns only the selected files, but I think it uses a slightly different API than the XML above.

@MatthiasWinzeler is this sample XML from after you have also clicked [Save] ?
As you debugged, the XML element mnp:entity has the XML attribute selected="true". However, when this XML is returned to the Ansible Module maintenance_planner_files there is currently no handling in the underlying Python Module function get_transaction_filename_url to only parse those with the XML attribute selected="true". A code change would be required.

@sean-freeman Thanks for your answer!
Yes, I just did it again and made sure I both clicked Save as well as Push to Download Basket (not sure the latter is necessary).
The issue is, that - even though the files are deselected - the files still show up in the XML with selected=true. So I suspect that this is actually a bug in the backend system (so adding code in this module to filter them out won't help). Do you by any chance have a contact to the guys on the backend system so that you could reach out to them to confirm this/get it fixed?
Another option would be to use a different API. From what I can tell, the SAP Download Manager - which has the correct behaviour and only lists the selected files - seems to use a different API than the XML above. Maybe we could switch to the other API? Happy to support if I can!

@MatthiasWinzeler Addressing this in reverse order.....
The MP Web GUI code filters the downloads selected and automatically appends to the SAP Software Center "Download Basket" API, which is then queried by the SAP Download Manager binary file (JAR).
Within the codebase here you will see leftovers of this approach:

def get_download_basket_files(trans_id)
def add_stack_download_files_to_basket(trans_id)
def get_download_basket_json()
def clear_download_basket()
def delete_item_in_download_basket(object_id)

If the Response Body payload (XML file) cannot be trusted with the correct data payload (i.e. selected="true" and selected="false"), then as you rightly state it's an error beyond our scope.
Even if the above Python Functions were re-added into the code execution flow, we would still have to use the XML with the same incorrect selection data and POST to the Download Basket. An extra few steps that do not have any benefit to the code flow and in my experience, can lead to clashes due to throttling of the APIs for the Download Basket (i.e. potentially downloading files that were left in the Download Basket from days/weeks/months ago).
The error would need to be raised in an SAP Support Incident using the Component BC-UPG-MP.
I think we should note this as a Known Issue, it is unlikely this will be resolved.

I think we should note this as a Known Issue, it is unlikely this will be resolved.

@sean-freeman agree! thanks for your input, I'll close this.


Null error reported in P2PClient

Getting a Null error in the P2PClient.GetBlockHeight methods around line 989

Created a new HandleDisconnectedNode(int nodeNum, HubConnection? _hubConnection)
This method will now take the hubConnection and nodeNum to process the disconnect appropriately. In the event the info has already been cleared from another process before this has had time to clear out of mem it will catch this rather than crash the wallet.
Code can be seen here;
 private static void HandleDisconnectedNode(int nodeNum, HubConnection? _hubConnection)
        {
            try
            {
                var nodes = Program.Nodes;
                var nodeList = nodes.ToList();

                var nodeInfo = NodeDict[nodeNum];
                if (nodeInfo != null)
                {
                    var node = nodeList.Where(x => x.NodeIP == nodeInfo).FirstOrDefault(); //null error happened here meaning nodeList was null
                    if (node != null)
                    {
                        Program.Nodes.Remove(node);
                    }
                    _hubConnection = null;
                    NodeDict[nodeNum] = null;
                }
            }
            catch(Exception ex)
            {
                string errorMsg = string.Format("Error handling disconnected node: {0}. Error Message: {1}", nodeNum.ToString(), ex.Message);
                ErrorLogUtility.LogError(errorMsg, "P2PClient.HandleDisconnectedNode()");
            }
        }

Now if there is an issue it will be logged within the ErrorLogUtility and the errorlog.txt file located in  RBX database folder


Docker container not able to communicate with other service running on localhost

Version
Microsoft Windows [Version 10.0.19044.2604]
WSL Version

[X] WSL 2
[ ] WSL 1

Kernel Version
5.15.79
Distro Version
Ubuntu 20.04
Other Software
Docker version 23.0.1, build a5ee5b1 (Running in WSL)
Docker engine is installed inside of WSL
Repro Steps

Install docker engine in WSL
Start a docker container also specify the container port and the host port in the run command (I have a mockserver/mockserver image running in the container)
Start another service in WSL (In my case a python unicorn server)

Expected Behavior
Docker container should be able to reach the service running on localhost
We get the expected result when --net=host is passed in the docker run command
Actual Behavior
Calling the service running locally from the docker container, give connection refuse error
Diagnostic Logs
No response

What wsl --version are you running?


feat!: Full ESM

These are the changes needed on top of #1921 to make probot fully ESM. Replaces #1825.
I guess we should not implement this until v14, but it's good for exploration.
Only 22 additions and 10 deletions now :rocket: (Excluding the dependency update we can do now, which I'll do in a separate commit on this branch).

I think esm only would be too hard for now.
So we most code changes are __dirname substitutions. Maybe we can reduce the use of __dirname in beta.
Also what do you think of a cjs esm dual mode. Like it is done in helmet?

I guess full esm should be the next step. Yes.

I guess only probot pino is left?

I guess only probot pino is left?

I believe so

See https://github.com/probot/probot/issues/1958 for packages needing ESM migration

@AaronDewes can you link GitHub actions on JSR so that releases can publish automatically
https://jsr.io/@probot/bot/publish

Done 👍
You're now also an admin on JSR


Update protobuf-java to 3.21.4

Updates com.google.protobuf:protobuf-java from 3.21.2 to 3.21.4.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "com.google.protobuf", artifactId = "protobuf-java" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "@monthly" },
  dependency = { groupId = "com.google.protobuf", artifactId = "protobuf-java" }
}]

labels: library-update, early-semver-patch, semver-spec-patch, commit-count:1

Superseded by #1309.

Superseded by #1346.


Cannot Download Drivers from Lenovo

Trying to update and add new Lenovo drivers, but keeps erroring out. Error is below:

If I copy the link and download directly, it works fine.

I've also just noticed this issue too.

And now it's started working again. I haven't really changed anything either

And now working

We have also faced this issue.

I had it appear again today and I left it for a while and tried again with no issues. I think one of Lenovo's load balanced servers might be playing up.

I've had to stop using it as we are a Lenovo house and I can't get the new drivers for our new models. You realise just how good this tool is when you can't use it and have to resort to WMI model queries in the task sequence :(

I took a quick peek at the calaogv2.xml file from Lenovo. It seems like driver packages that are (from Lenovo) verified for all Windows distributions has SCCM version="*" rather than multiple entries for each winver. This breaks MDMs package retrieval logic.
The workaround for this is to edit the catalogv2.xml and replace all  to say

Confirmed the change in behavior noted by @ForEachEva
The driver files reference Win 11 21H2. Hope Lenovo uses identical compatible drivers for both 10/11 21H2...

Not worked for me, can you list the exact steps you took to make it work?

Hi guys,
What works for me is if I choose to download only the driver package and not "All". I guess you have to do it in two steps, first one of the packages such as BIOS and then the other eg.
Hope it works for you too!

Not worked for me, can you list the exact steps you took to make it work?

Hi guys,
What works for me is if I choose to download only the driver package and not "All". I guess you have to do it in two steps, first one of the packages such as BIOS and then the other eg.
Hope it works for you too!

 Thanks!

Not worked for me, can you list the exact steps you took to make it work?

Hi guys,
What works for me is if I choose to download only the driver package and not "All". I guess you have to do it in two steps, first one of the packages such as BIOS and then the other eg.
Hope it works for you too!

 Thanks!

Same here, thank you! Part of the issue seems to be the driver version number being interpreted differently when Download Type is set to All. Downloading BIOS only still gives the "Unable to find driver for Lenovo [product]" error, but BIOS download and packaging is successful.

Glad it worked for you as well! :) It's such a simple solution, but oh so annoying when you're in the middle of it, troubleshooting and stuff. :P

Not worked for me, can you list the exact steps you took to make it work?

Hi guys,
What works for me is if I choose to download only the driver package and not "All". I guess you have to do it in two steps, first one of the packages such as BIOS and then the other eg.
Hope it works for you too!

 Thanks!

Cheers mate! Glad I could help. :)


Unable to get/renew a certificate for internationalized domain name (invalid character)

After updating to version 2.2.7 the renewal of a certificate for an internationalized domain name started to fail. The domain name contains the character "ö" (o with umlaut). After reverting back to version 2.2.6 the renewal succeeded again.
Failure log from 2.2.7:
2024-02-27 09:00:06.998 +02:00 [DBG] [HTTP] Send POST to "https://acme-v02.api.letsencrypt.org/acme/order/..."
2024-02-27 09:00:06.998 +02:00 [VRB] [HTTP] Request content: {"protected":"eyJhb..."}
2024-02-27 09:00:07.148 +02:00 [VRB] [HTTP] Request completed with status "OK"
2024-02-27 09:00:07.148 +02:00 [VRB] [HTTP] Response content: {
  "status": "ready",
  "expires": "2024-03-04T07:00:10Z",
  "identifiers": [
    {
      "type": "dns",
      "value": "www.xn--smesite-90a.se"
    },
    {
      "type": "dns",
      "value": "xn--smesite-90a.se"
    }
  ],
  "authorizations": [
    "https://acme-v02.api.letsencrypt.org/acme/authz-v3/...",
    "https://acme-v02.api.letsencrypt.org/acme/authz-v3/..."
  ],
  "finalize": "https://acme-v02.api.letsencrypt.org/acme/finalize/..."
}
...
2024-02-27 09:00:07.330 +02:00 [VRB] Submitting CSR
2024-02-27 09:00:07.341 +02:00 [DBG] [HTTP] Send POST to "https://acme-v02.api.letsencrypt.org/acme/finalize/..."
2024-02-27 09:00:07.341 +02:00 [VRB] [HTTP] Request content: {"protected":"eyJhb..."}
2024-02-27 09:00:07.486 +02:00 [WRN] [HTTP] Request completed with status "BadRequest"
2024-02-27 09:00:07.486 +02:00 [VRB] [HTTP] Response content: {
  "type": "urn:ietf:params:acme:error:rejectedIdentifier",
  "detail": "Error finalizing order :: Cannot issue for \"www.sömesite.se\": Domain name contains an invalid character",
  "status": 400
}

Success log from 2.2.6:
2024-02-27 09:18:46.799 +02:00 [DBG] [HTTP] Send POST to "https://acme-v02.api.letsencrypt.org/acme/order/..."
2024-02-27 09:18:46.799 +02:00 [VRB] [HTTP] Request content: {"protected":"eyJhb..."}
2024-02-27 09:18:46.989 +02:00 [VRB] [HTTP] Request completed with status "OK"
2024-02-27 09:18:46.990 +02:00 [VRB] [HTTP] Response content: {
  "status": "ready",
  "expires": "2024-03-04T07:00:10Z",
  "identifiers": [
    {
      "type": "dns",
      "value": "www.xn--smesite-90a.se"
    },
    {
      "type": "dns",
      "value": "xn--smesite-90a.se"
    }
  ],
  "authorizations": [
    "https://acme-v02.api.letsencrypt.org/acme/authz-v3/...",
    "https://acme-v02.api.letsencrypt.org/acme/authz-v3/..."
  ],
  "finalize": "https://acme-v02.api.letsencrypt.org/acme/finalize/..."
}
...
2024-02-27 09:18:47.211 +02:00 [VRB] Submitting CSR
2024-02-27 09:18:47.219 +02:00 [DBG] [HTTP] Send POST to "https://acme-v02.api.letsencrypt.org/acme/finalize/..."
2024-02-27 09:18:47.219 +02:00 [VRB] [HTTP] Request content: {"protected":"eyJhb..."}
2024-02-27 09:18:48.143 +02:00 [VRB] [HTTP] Request completed with status "OK"
2024-02-27 09:18:48.143 +02:00 [VRB] [HTTP] Response content: {
  "status": "valid",
  "expires": "2024-03-04T07:00:10Z",
  "identifiers": [
    {
      "type": "dns",
      "value": "www.xn--smesite-90a.se"
    },
    {
      "type": "dns",
      "value": "xn--smesite-90a.se"
    }
  ],
  "authorizations": [
    "https://acme-v02.api.letsencrypt.org/acme/authz-v3/...",
    "https://acme-v02.api.letsencrypt.org/acme/authz-v3/..."
  ],
  "finalize": "https://acme-v02.api.letsencrypt.org/acme/finalize/...",
  "certificate": "https://acme-v02.api.letsencrypt.org/acme/cert/..."
}

Platform:

Windows Server 2016 Standard, English
Version: 2.2.7, 64-bit, pluggable

Hi @jari-e21, thanks for reporting the issue, I've confirmed this as a bug and it's fixed in this build: https://ci.appveyor.com/project/WouterTinus/win-acme-s8t9q/builds/49285742/artifacts


Values of type 'java.util.GregorianCalendar' can't be used for the 'FirstDayOfWeek' element.

Recurrence.WeeklyPattern weeklyPattern = new Recurrence.WeeklyPattern(startsDate, eventDto.getInterval(), dayOfTheWeeks.toArray(new DayOfTheWeek[dayOfTheWeeks.size()]));
weeklyPattern.setStartDate(new Date(eventDto.getStartDate()));
weeklyPattern.setEndDate(new Date(eventDto.getEndDate()));
Calendar cal=Calendar.getInstance();
cal.setFirstDayOfWeek(Calendar.SUNDAY);
weeklyPattern.setFirstDayOfWeek(cal);
ServiceResponseCollection response = service.createItems(
list, folderId,
MessageDisposition.SendOnly,
SendInvitationsMode.SendToAllAndSaveCopy);
Caused by: microsoft.exchange.webservices.data.core.exception.service.local.ServiceXmlSerializationException: Values of type 'java.util.GregorianCalendar' can't be used for the 'FirstDayOfWeek' element.

Check following testcase:

import static org.junit.Assert.assertEquals;

import java.io.ByteArrayOutputStream;
import java.io.OutputStream;
import java.util.Calendar;

import org.junit.Test;

import microsoft.exchange.webservices.base.BaseTest;
import microsoft.exchange.webservices.data.core.EwsServiceXmlWriter;
import microsoft.exchange.webservices.data.property.complex.recurrence.pattern.Recurrence.WeeklyPattern;

public class RecurrenceWriterTest extends BaseTest{

  @Test
  public void testWeeklyPattern() throws Exception {
    OutputStream output = new ByteArrayOutputStream();
    EwsServiceXmlWriter writer = new EwsServiceXmlWriter(exchangeServiceMock, output);

    WeeklyPattern weekly = new WeeklyPattern();
    Calendar c = Calendar.getInstance();
    c.setFirstDayOfWeek(1);
    weekly.setFirstDayOfWeek(c);
    weekly.writeElementsToXml(writer);

    assertEquals(c, weekly.getFirstDayOfWeek());
  }
}

You are going to get this ServiceXmlSerializationException as below screenshot:

Hi @stulife,
I could reproduce it. It's a bug in the java-ews-api. It's currently difficult with fixes, cause this repo is nearly dead. There is a plan to move/fork a 'community' repo. But here is a qucikfix, hopefully you can use it:
`/**

Represents a recurrence pattern where each occurrence happens on specific
days a specific number of weeks after the previous one.
*/
public final static class WeeklyPattern extends IntervalPattern implements IComplexPropertyChangedDelegate {

/**
 * The days of the week.
 */
private DayOfTheWeekCollection daysOfTheWeek =
    new DayOfTheWeekCollection();

private DayOfTheWeek firstDayOfWeek;

/**
 * Initializes a new instance of the WeeklyPattern class. specific days
 * a specific number of weeks after the previous one.
 */
public WeeklyPattern() {
  super();

  this.daysOfTheWeek.addOnChangeEvent(this);
}

/**
 * Initializes a new instance of the WeeklyPattern class.
 *
 * @param startDate     the start date
 * @param interval      the interval
 * @param daysOfTheWeek the days of the week
 * @throws ArgumentOutOfRangeException the argument out of range exception
 */
public WeeklyPattern(Date startDate, int interval,
    DayOfTheWeek... daysOfTheWeek)
    throws ArgumentOutOfRangeException {
  super(startDate, interval);

  ArrayList<DayOfTheWeek> toProcess = new ArrayList<DayOfTheWeek>(
      Arrays.asList(daysOfTheWeek));
  Iterator<DayOfTheWeek> idaysOfTheWeek = toProcess.iterator();
  this.daysOfTheWeek.addRange(idaysOfTheWeek);
}

/**
 * Change event handler.
 *
 * @param complexProperty the complex property
 */
private void daysOfTheWeekChanged(ComplexProperty complexProperty) {
  this.changed();
}

/**
 * Gets the name of the XML element. <value>The name of the XML
 * element.</value>
 *
 * @return the xml element name
 */
@Override
public String getXmlElementName() {
  return XmlElementNames.WeeklyRecurrence;
}

/**
 * Write property to XML.
 *
 * @param writer the writer
 * @throws Exception the exception
 */
@Override
public void internalWritePropertiesToXml(EwsServiceXmlWriter writer)
    throws Exception {
  super.internalWritePropertiesToXml(writer);

  this.getDaysOfTheWeek().writeToXml(writer,
      XmlElementNames.DaysOfWeek);

  EwsUtilities.validatePropertyVersion((ExchangeService) writer.getService(), ExchangeVersion.Exchange2010_SP1,
                                 "FirstDayOfWeek");

  writer.writeElementValue(
        XmlNamespace.Types,
        XmlElementNames.FirstDayOfWeek,
        this.firstDayOfWeek);

}

/**
 * Tries to read element from XML.
 *
 * @param reader the reader
 * @return True if appropriate element was read.
 * @throws Exception the exception
 */
@Override
public boolean tryReadElementFromXml(EwsServiceXmlReader reader)
    throws Exception {
  if (super.tryReadElementFromXml(reader)) {
    return true;
  } else {
    if (reader.getLocalName().equals(XmlElementNames.DaysOfWeek)) {

      this.getDaysOfTheWeek().loadFromXml(reader,
          reader.getLocalName());
      return true;
    } else if (reader.getLocalName().equals(XmlElementNames.FirstDayOfWeek)) {
      this.firstDayOfWeek = reader.
          readElementValue(DayOfTheWeek.class,
              XmlNamespace.Types,
              XmlElementNames.FirstDayOfWeek);
      return true;
    } else {

      return false;
    }
  }
}

/**
 * Validates this instance.
 *
 * @throws Exception
 */
@Override
public void internalValidate() throws Exception {
  super.internalValidate();

  if (this.getDaysOfTheWeek().getCount() == 0) {
    throw new ServiceValidationException(
        "The recurrence pattern's property DaysOfTheWeek must contain at least one day of the week.");
  }
}

/**
 * Gets the list of the days of the week when occurrences happen.
 *
 * @return the days of the week
 */
public DayOfTheWeekCollection getDaysOfTheWeek() {
  return this.daysOfTheWeek;
}

public DayOfTheWeek getFirstDayOfWeek() throws ServiceValidationException {
  return this.getFieldValueOrThrowIfNull(DayOfTheWeek.class,
      this.firstDayOfWeek, "FirstDayOfWeek");
}

public void setFirstDayOfWeek(DayOfTheWeek value) {
  if (this.canSetFieldValue(this.firstDayOfWeek, value)) {
    this.firstDayOfWeek = value;
    this.changed();
  }
}

/*
 * (non-Javadoc)
 *
 * @see
 * microsoft.exchange.webservices.
 * ComplexPropertyChangedDelegateInterface#
 * complexPropertyChanged(microsoft.exchange.webservices.ComplexProperty
 * )
 */
@Override
public void complexPropertyChanged(ComplexProperty complexProperty) {
  this.daysOfTheWeekChanged(complexProperty);
}

}`
@leftstick: Thanks, for your unit test. I added some testcases on my fork, I hope to merge it as soon as possible to share this with you!
Thanks,
Jan

it's right ,with my solution as same,thank's

Hey, I understand that the repo is almost dead, but is there any chance this will be fixed anytime soon?

@lpld you can check the fix @OS-JaR  provided. And re-compile the source code, publish it to your own maven repo.
You and your team should fetch this library from your own maven repo instead

@leftstick Thanks for the answer. Probably that's what we'll do in the future too, 'cause it's not the first issue with this library that we face. For now I felt like it's easier to me to just extend couple classes, create new Recurrence PropertyDefinition with this issue fixed and replace it in AppointmentSchema via reflection.


include version in typedoc for spl-name-service, spl-token, and spl-token-lending

I was using spl-token and had some problems and it turns out I was on the wrong version!
It's just a single argument to typedoc (--includeVersion) to make it put the version number in the docs.

See also https://github.com/solana-labs/solana/pull/23428

(Pretty sure the cargo build didn't fail because of the typedoc flag)

(Pretty sure the cargo build didn't fail because of the typedoc flag)

Haha, nope. I'm looking at the CI failure now

Very short diff, just adding the flag to typedoc: https://github.com/solana-labs/solana-program-library/pull/2973/files


Feature to filter to a specified set of dates

8.0.3
Description
Request for info. Is there a way to filter down the dates displayed? For example, if I search for an event, I am interested in displaying only those dates that contain the event of interest so the Month collection view would collapse from the full set of dates to something like:
Jan 2018 (section header)
3     5      14
Feb 2018
March 2018
1   4   15
Steps To Reproduce
N/A
Expected Behavior
N/A
Additional Context
N/A

unfortunaty, the calendar wont be able to filter dates like that.
The best it can do is

Makes unwanted dates become invisible
Makes unwanted dates become grayed out.

I think i can make it work like how you mentioned, but the creative weird code I will have to do is way outside the boundaries that this lib was designed for haha

Thanks..yeah, I figured this was outside of the scope, but wanted to check. Thanks


person edit info

supervisor (future)
phone
title
notes?

Add ons: start and end dates
Category (ddl: Faculty, staff, admin staff, grad student, undergrad, visitor, volunteer)
Reports to my be able to get from IAM after UC Path has that info.


Title does not follow the theme

Checklist:

[x] I updated to the latest version available
[x] I cleared the cache of my browser

Release with the issue:
2.1
Last working release (if known):
0.0.5
Browser and Operating System:
safari macOs and iOS app

Description of problem:
The title does not follow the theme anymore (please see the "Vento" title WRT the "raffiche" title), I guess after version 0.1.0 included (but I'm not sure, haven't checked). I have all the titles in gray, only this one has changed.
Has something changed?
I have updated the theme "google light theme" to the latest version in the meantime, but this is the only card that has issues.
Screenshot of actual situation

Screenshot from my "netatmo issue" on 0.0.5

Javascript errors shown in the web inspector (if applicable):

Additional information:

Is the graph in the screenshot a home assistant graph or a custom mini-graph-card?
I tried to make the title match the home assistand default cards, and in version 0.0.5 it was more like the mini-graph-card title (which did not match default home assistant cards).
I'll check with the google light theme if the card title keeps matching the default home assistant cards. I think I noticed the mini-graph-card titles not changing with a theme.

Sorry, I forgot to add the code! The graph is standard HA, just a plotted sensor.
cards:
  - detail: 2
    entity: sensor.netatmo_jori_palace_anemogio_gust_strength
    graph: line
    name: Raffiche
    type: sensor
  - compass:
      indicator: arrow_outward
      show_north: true
    direction_offset: 0
    entity: sensor.netatmo_jori_palace_anemogio_gust_angle
    name: Vento
    secondary_entity: sensor.netatmo_jori_palace_anemogio_wind_strength
    type: 'custom:compass-card'
type: horizontal-stack

I also have some mini-graph-card cards, but in my deployment they seem to be compliant with the theme!

animate: true
cache: true
entities:
  - color: cyan
    entity: sensor.netatmo_taverna_co2
    name: Taverna
  - color: lightgreen
    entity: sensor.netatmo_jori_palace_interno_co2
    name: Fort Johns
hour24: true
hours_to_show: 168
font_size: 75
labels: true
show:
  average: true
  extrema: true
name: Anidride Carbonica
type: 'custom:mini-graph-card'

Ah I see now 🤦♂
The title for a sensor-card is different from a title for a entities card:

And I changed it to match the entities card title. The title does change with the theme though:

Only with the entities-card title styling.

For some obscure reason the entities-card and glances-card (and maybe more) use the card-header class, and the entity-card and sensor-card (and maybe more) use the header class.
In the default theme, the first is black, less weight and taller, and the latter is gray, bolder and smaller.
I'll revert back to the previously used header class next version (and fix the icon color in the process).

Aha! What a curious decision on HA's side.. thank you for the fix!


CAMEL-15575: prevent stack traces from being printed directly to stdout

This ensures that stacktraces are always handled by the logging
mechanism. Basically replaces all instances of calls to
printStackTrace() with a call to the logger handler.
I put the list of affected components in the ticket. A bit large patch, but in general the patch is simple: it just adds the calls to the logger and adds a logger to the class if needed.

[x] Make sure there is a JIRA issue filed for the change (usually before you start working on it).  Trivial changes like typos do not require a JIRA issue.  Your pull request should address just this issue, without pulling in other changes.
[x] Each commit in the pull request should have a meaningful subject line and body.
[x] If you're unsure, you can format the pull request title like [CAMEL-XXX] Fixes bug in camel-file component, where you replace CAMEL-XXX with the appropriate JIRA issue.
[x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[x] Run mvn clean install -Psourcecheck in your module with source check enabled to make sure basic checks pass and there are no checkstyle violations. A more thorough check will be performed on your pull request automatically.
Below are the contribution guidelines:
https://github.com/apache/camel/blob/master/CONTRIBUTING.md

Looking at the failures ...

@orpiske can you fix the conflict and merge to master.

@orpiske can you fix the conflict and merge to master.

Yes I can! I'll do that.

@davsclaus done. The changes from this PR were not necessary anymore on that conflicting file. I will wait for the check to run one more time - for good measure - and will merge it after it passes. Thanks!


feature: delete the repo prefix for download home path

Signed-off-by: Starnop<EMAIL_ADDRESS>
Ⅰ. Describe what this PR did
The store mgr set baseDir with prefix “repo” as the baseDir of local storage. In fact, it should be configured by the user. So I delete the prefix "repo".
Ⅱ. Does this pull request fix one issue?

Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗？)
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews

Codecov Report

Merging #577 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff           @@
##           master    #577   +/-   ##
======================================
  Coverage    47.3%   47.3%
======================================
  Files          97      97
  Lines        5549    5549
======================================
  Hits         2625    2625
  Misses       2707    2707
  Partials      217     217

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 5c1eb9a...7e75c51. Read the comment docs.


MacosSearchField

Hey @Andrewngabriel can I pick this up? I am currently working on the Toolbar where you usually find a search field, so I could build and integrate it.

@Andrewngabriel I'm reassigning this to @whiplashoo because I don't want this to hold him back, and AFAIK you're not yet working on this.


Create a callback in diaper_drive_participant for volume

Currently, the volume method hits the DB to get the volume that a single DiaperDriveParticipant has produced through their donations. Instead of doing a DB query, we should store this data in a field on the model, and have it updated through a callback (or just manually update it in the controller action)

Can we cloes this and keep it under https://github.com/rubyforgood/diaper/issues/411?


Add getModule method to core.

I had to fix some issues with packages and there was a lot of other dependencies that had to be upgraded :( sorry for the mess.

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

Comparison is base (260107d) 46.99% compared to head (524ee99) 46.29%.

:exclamation: Current head 524ee99 differs from pull request most recent head c45df10. Consider uploading reports for the commit c45df10 to get more accurate results

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #107      +/-   ##
==========================================
- Coverage   46.99%   46.29%   -0.71%
==========================================
  Files          14       14
  Lines         383      391       +8
  Branches       73       78       +5
==========================================
+ Hits          180      181       +1
- Misses        203      210       +7

Files
Coverage Δ

packages/react-core/src/use-module.ts
0.00% <0.00%> (ø)

packages/core/src/index.ts
37.41% <8.33%> (-2.45%)
:arrow_down:

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

Overall changes to allow for support of named exports other than default looks good. Just a few comments.


Creates a RangeError: Array buffer allocation failed when used with cdnizer

cdnizer is awesome,
so is run-sequence.
However, when I use them together I run into an issue.  Currently my sequence looks like this:
gulp.task('prep', callback => {
   runSequence('clean:dist', 'standard', 'wiredepDist', 'babel', 'ngAnnotate', 'stylus', 'useref', 'cdnizer', callback)
})

When I run gulp prep I get:
[20:19:38] 'cdnizer' errored after 25 ms
|[20:19:38] RangeError: Array buffer allocation failed
|    at Buffer.Uint8Array (native)
|    at FastBuffer (buffer.js:11:5)
|    at createUnsafeBuffer (buffer.js:38:12)
|    at allocate (buffer.js:181:12)
|    at Function.Buffer.allocUnsafe (buffer.js:141:10)
|    at tryCreateBuffer (fs.js:474:21)
|    at Object.fs.readFileSync (fs.js:519:14)
|    at Object.Module._extensions..json (module.js:585:20)
|    at Module.load (module.js:487:32)
|    at tryModuleLoad (module.js:446:12)
|[20:19:38] 'prep' errored after 4.3 s
|[20:19:38] RangeError in plugin 'run-sequence(cdnizer)'
|Message:
|    Array buffer allocation failed
|Stack:

But when I run gulp cdnizer alone, I do not have this issue.  Is this something I am doing wrong on my end?

I've never seen that before. What's the code for the cdnizer step look like? What version of Node & Gulp are you running?

Generally speaking, almost all errors with run-sequence are due to misconfigured tasks—specifically, ones that don't handle async correctly. If any step along the way doesn't return a stream, promise, or use a callback, then it's possible your cdnizer task is running before another step completes.

I am sure that is it. I will investigate my tasks closer and report back.

@computersarecool Did you ever find out any more about this?

It was due, as you thought, to a misconfigured task. Thank you.


Unidiomatic use of feature flags

Currently, the API changes depending on whether the async feature is enabled or not. E.g. the resolve function is async when the async feature is enabled, sync otherwise.
This can lead to trouble due to the way the rust feature flag system works. Features are supposed to be additive, so adding async should only add new methods and not change the signature of existing methods.
Even if it is ugly, it would be more correct to either prepend _async to the fns or have an entire async module that gets enabled due to the feature flag.
This would require increasing the major version number though, so maybe best combine it with other API changes.

Version 2 is using 3 features dht, async and relay each corresponds to a separate client. I think that should fix feature flags, but I would love if you check before I close this issue.


[Question] Store sessions/message.addresses so that I can broadcast message later

Bot Info

SDK Platform: NodeJS
SDK Version: ^3.13.1
Active Channels: MS Teams
Deployment Environment: Azure Bot Service

Context
1:1 conversation between Bot and User
Question

Can I store the sessions/message.addresses so that I can broadcast a message or create a new dialog later?

I want to have a trigger like this
server.get('/broadcast', function (req, res, next) {
    session = get_session_from_storage(req.params.id);
    var reply = new builder.Message() .address(session.message.address).text(instructions);
    bot.send(reply);
   res.send({});
   next();
});

If store session is the good way, what should I store to archive that function?

So you don't need to store the entire session object, as shown you just need to store the address object. For testing purposes you can simply store the address in memory (you could just declare a variable outside of the scope of server.get()  and store session.message.address there), but for production you would most likely want to create a database and send calls to it to get the user addresses for your broadcasting.
The Bot Framework support team prefers to answer questions like this on Stack Overflow to help the community as a whole. In the future, please post questions on Stack Overflow tagged with the BotFramework tag. Thanks!


inbox_ui, compose_reply, upload: Convert modules to TypeScript

I didn't catch anything reading this, but probably worth @amanagr doing a read and test before merging. Aman, can you add "integration review" or merge this once you've reviewed it?

I didn't catch anything with the inbox migration commit.

Merged, thanks @andersk! The configuration refactoring in upload.ts is quite nice.


Add step to add CLE disclaimer text to final output TSV in the CLE pipelines

Closes #664

For aml trio cwl, tumor_final_tsv and germline_final_tsv probably don't need disclaimer text. Wait for Dave's reply.


Feat: add async DB trait

...and you need to run cargo fmt before commit. We will add a contribution doc later :)

...would you please remove .idea/workspace.xml from your commits?


Serve HTML with text/html

.html files are served as text/plain currently.

That's on purpose to prevent people using it as hosting and to prevent the usage of exploits and so on..

.html is currently hard-coded to serve as text/plain to prevent people from running service workers on unpkg.com. But I think this is a restriction we can remove now.
A little history: we stopped serving HTML when we discovered that people serving HTML could run service workers on unpkg.com. Of course, this is a bad idea that would potentially break the site for everyone. The attack worked like this:

Someone would use { "main": "index.html" } in their package.json
A request to unpkg.com/pkg would serve the HTML file w/out redirecting
index.html would install a service worker on the root domain

However, I think we can remove this line now because we fixed (2) a long time ago. Now, when the request URL does not match the path of the file that actually gets served, we redirect to the full URL. I should probably make that clearer in the code, but what it means is that we won't be serving someone else's HTML file at the root URL (like /react or whatever), which means that people won't be able to install service workers for unpkg.com.
Does that make sense?
(BTW, thanks for pushing me here. Re-enabling HTML support is something I've been meaning to do for a loooong time now).

That would be awesome.
Just FYI, on our use case, we'd like to show component demos on webcomponents.org by just pointing an iframe at unpkg.
Thanks!

OK @justinfagnani, you should be good to go now. I just double checked and we no longer have the vulnerability that I described earlier 🙌


adding read-only role page to documents #5783

Description
Adding read only role page to documentation, covering read only access to OpenSearch Dashboards objects and readonly_mode. Using UI screenshot to demonstrate the process
Issues Resolved
Closes https://github.com/opensearch-project/documentation-website/issues/5783
Checklist

[x] By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and subject to the Developers Certificate of Origin.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@hdhalter the vale errors are fixed.
Regarding the information on https://opensearch.org/docs/latest/security/access-control/users-roles/#set-up-a-read-only-user-in-opensearch-dashboards.
Using v2.12.0 I don't see those two roles in the UI (opensearch_dashboards_user and opensearch_dashboards_read_only) and unable to use them via API

I feel like this topic is out of context on its own, so I think we should merge it into the users and roles topic.

@hdhalter thats a valid point, I've moved this across now

Have we addressed the duplicate information in the "Sample roles" section yet?
https://opensearch.org/docs/latest/security/access-control/users-roles/#set-up-a-read-only-user-in-opensearch-dashboards

@Naarcha-AWS, @scrawfor99 - if you are happy with this content, can we move it to editorial?

I've fixed broken links and removed the duplicate example for read only role

I've fixed broken links and removed the duplicate example for read only role

Thanks, @AntonEliatra , I had fixed the links in a separate PR, but I will close that. I think the example here is ok as long as it is labeled as an example of how to set up the read only role.

Thanks, al! I sent it for editorial review.

@hdhalter thats added now

Hi @natebower I'm a little confused regarding : vs '.'
I've seen you make suggestions changing these around, is there a rule I should follow here to avoid these in future?

Hi @natebower I'm a little confused regarding : vs '.' I've seen you make suggestions changing these around, is there a rule I should follow here to avoid these in future?

@AntonEliatra Yes: Use a colon to introduce example blocks (for example, code and scripts) and most lists. Do not use a colon to introduce tables or images. See here. Thanks!


cdk-virtual-scroll-viewport does not handle css position: sticky cleanly

What is the expected behavior?
using the css attribute position: sticky should allow for elements to remain displayed according to their sticky parameters.
What is the current behavior?
This works for a while but then breaks after a point. Im assuming its a matter of the 'stickied' dom elements getting recycled.
What are the steps to reproduce?
https://stackblitz.com/edit/angular-wnar6b-wzjdmh
This is a slightly modified version of an example from the docs. As you scroll the cdk-virtual-scroll-viewport you will notice the light blue headers stick to the the top of their area as expected. Once you exceed a certain amount of scrolling however the headers disappear. For me items 0-2 work but the 3rd one breaks.
Down below is an example using the [non-virtual] scrolling. Here the css attribute works as expected.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Forked from https://stackblitz.com/angular/apvvljrovad from the docs. no versions changed.
Is there anything else we should know?
https://github.com/angular/material2/issues/11621 also gets at my base requirement; wanting some elements of the virtual scroll list to 'stick around'. It would be ideal if standard css properties worked as via this ticket but that might be hard as the whole point of virtual-scroll is to remove things from the dom that 'shouldn't' be rendered. The position: sticky css attribute would seem to break those assumptions.

any luck? looking for same solution.

Just following up on this, any update. This is must requirement for table with large dataset.

What i did to keep my header sticky was to use a sticky: true  attribute in html.
example:

Hope this helps!

any luck? looking for same solution.

What i did to keep my header sticky was to use a sticky: true attribute in html.
example:

Hope this helps!

@kelz2o3 I don't really get what your solution is. Could you add an example?

i added this to my header row like so

sticky: true" is working fine with mat table if we don't use virtual scrolling, but it is messed up with virtual scrolling. Header starts moving when you start scrolling.

My use case is that I need a sticky header always present above a virtually-scrolling list ; I'm probably not the only one.

Here too, same problem now. @florenthobein which kind of workaround have you come up with?

It's the transformY indeed, that gets updated whenever elements of the list are replaced (remove+append).
I don't really have a neat solution. Tried to meddle with extending the FixedSizeVirtualScrollStrategy and move back a provided sticky header whenever onRenderedOffsetChanged` was triggered but it's ugly still too far from when transformY is applied, resulting in random blips unsuited for production.
So for now my "workaround" consists in:

having a header that is outside of the CDK Virtual Scroll and absolutely positioned over the list. Note: the header has to be a multiple of your cdk itemSize.
prepending the list with "fake" elements that are gonna be hidden behind the header (hence the need for a header that's the total height of those fake elements).

...yeah. 😓

@fabioloreggian Thanks for the explaination!
Hoewever, in the end I gave up, I don't want to use workaround that breaks over time

@florenthobein I found a solution to the tranformY compensation, but for some reason it's not sufficient, as once I started scrolling too far down, the headers will scroll with the content. Regardless, this is what I came up with after fiddling around a bit with the CDK scroll view port.
cdk-virtual-scroll-viewport {
    height: 100%;

    table {
        height: 100%;
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;

        thead {
            tr {
                th {
                    height: 59px;
                    border-bottom: 1px solid #d0d0d0;
                    padding: 7px 20px 7px 7px;
                    position: sticky;
                    background-color: #ffffff;
                    top: 0;
            }
        }
    }
}

<cdk-virtual-scroll-viewport #scrollViewport itemSize="59" (scrolledIndexChange)="scrollIndexChanged($event)">

        Header 1
        Header 2

...

</cdk-virtual-scroll-viewport>

public get inverseTranslation(): string {
    if (!this.viewPort || !this.viewPort["_renderedContentTransform"]) {
        return "translateY(0px)";
    }
    return this.viewPort["_renderedContentTransform"].replace(/translateY\((\d+)px\)/, "translateY(-$1px)");
}

That gets rid of the weird effects, but only until you scrolled down for a while. Not sure what I'm doing wrong and if that's even a problem I could solve. I'm not too familiar with sticky positions, it's still sometimes a mystery how that works exactly.

@wartab  your solution is partially worked.
When we scroll down after few moment headers disappear. Can you explain your code so i can find some solution. I'm also facing same challenge.

@monu0751 Sadly I do not know how to solve this. That is what I mean with "but for some reason it's not sufficient, as once I started scrolling too far down, the headers will scroll with the content".
This technique is to apply the opposite transform: translateY() to the column headers that CDK applies when using the virtual-scroll to create the scrollbar. This is done by adding a - sign in the regex replace.
That CSS transform is contained in a private field _renderedContentTransform in the VirtualScrollViewPort.

FWIW, I noticed that it does work as expected in Safari if you use position: -webkit-sticky;. Not sure if Webkit is the only one doing it right, or if they're just doing it in a different way that happens to work better for this case.

I have been somewhat successful in getting around this issue by forcing translateY(0) and then creating a component with height: Xpx at the beginning of the viewport (or in the first row of a table). I bind X to the value from virtualScrollViewport that is usually used for the translate value.

@florenthobein I found a solution to the tranformY compensation, but for some reason it's not sufficient, as once I started scrolling too far down, the headers will scroll with the content. Regardless, this is what I came up with after fiddling around a bit with the CDK scroll view port.
cdk-virtual-scroll-viewport {
    height: 100%;

    table {
        height: 100%;
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;

        thead {
            tr {
                th {
                    height: 59px;
                    border-bottom: 1px solid #d0d0d0;
                    padding: 7px 20px 7px 7px;
                    position: sticky;
                    background-color: #ffffff;
                    top: 0;
            }
        }
    }
}

<cdk-virtual-scroll-viewport #scrollViewport itemSize="59" (scrolledIndexChange)="scrollIndexChanged($event)">

        Header 1
        Header 2

...

</cdk-virtual-scroll-viewport>

@ViewChild(CdkVirtualScrollViewport)
public viewPort: CdkVirtualScrollViewport;

public get inverseTranslation(): string {
    if (!this.viewPort || !this.viewPort["_renderedContentTransform"]) {
        return "translateY(0px)";
    }
    return this.viewPort["_renderedContentTransform"].replace(/translateY\((\d+)px\)/, "translateY(-$1px)");
}

That gets rid of the weird effects, but only until you scrolled down for a while. Not sure what I'm doing wrong and if that's even a problem I could solve. I'm not too familiar with sticky positions, it's still sometimes a mystery how that works exactly.

The problem with the solution you posted is that you're using 'style.transform'. A position: sticky evaluates to a position: fixed once you hit the part where it would scroll, and that doesn't work right with a transformation.
Instead use style.top and set it to the inverse number of pixels, similar to what you're doing now.

@lonestarjdavis Amazing, thanks for the heads up, that works like a charm!

@wartab Could you please post a final solution, or create a stackblitz ?
Thanks.

@artem-galas https://stackblitz.com/edit/components-issue-t3xvyz That works for my use case.

@wartab Looks great with chrome.
However, when drag the scroll bar with firefox, the table header is still not clean.
Next if turn on the firefox debug inspector, it looks great again.
Do you have any idea what cause the issue with firefox wilthout turn on the debug inspector?

@lujian98
Not sure what version of Firefox you are using, but it is not happening for me.
I also do not really have much insight into Firefox since we only target Electron, which is Chromium. Apologies.

Thank you @wartab I am using latest Firefox.

Nice one @wartab!

@florenthobein I found a solution to the tranformY compensation, but for some reason it's not sufficient, as once I started scrolling too far down, the headers will scroll with the content. Regardless, this is what I came up with after fiddling around a bit with the CDK scroll view port.
cdk-virtual-scroll-viewport {
    height: 100%;

    table {
        height: 100%;
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;

        thead {
            tr {
                th {
                    height: 59px;
                    border-bottom: 1px solid #d0d0d0;
                    padding: 7px 20px 7px 7px;
                    position: sticky;
                    background-color: #ffffff;
                    top: 0;
            }
        }
    }
}

<cdk-virtual-scroll-viewport #scrollViewport itemSize="59" (scrolledIndexChange)="scrollIndexChanged($event)">

        Header 1
        Header 2

...

</cdk-virtual-scroll-viewport>

@ViewChild(CdkVirtualScrollViewport)
public viewPort: CdkVirtualScrollViewport;

public get inverseTranslation(): string {
    if (!this.viewPort || !this.viewPort["_renderedContentTransform"]) {
        return "translateY(0px)";
    }
    return this.viewPort["_renderedContentTransform"].replace(/translateY\((\d+)px\)/, "translateY(-$1px)");
}

That gets rid of the weird effects, but only until you scrolled down for a while. Not sure what I'm doing wrong and if that's even a problem I could solve. I'm not too familiar with sticky positions, it's still sometimes a mystery how that works exactly.

inverseTranslation function can be improved as follows:
  get inverseTranslation(): string {
    const offset = this.viewPort.getOffsetToRenderedContentStart();

    return `-${offset}px`;
  }```

@mmalerba Can you get this on the virtual scrolling bug list
https://github.com/angular/components/projects/20

@artem-galas https://stackblitz.com/edit/components-issue-t3xvyz That works for my use case.

that was a good example, but in my case I have resizable columns and header position fails when move those :(

@florenthobein I found a solution to the tranformY compensation, but for some reason it's not sufficient, as once I started scrolling too far down, the headers will scroll with the content. Regardless, this is what I came up with after fiddling around a bit with the CDK scroll view port.
cdk-virtual-scroll-viewport {
    height: 100%;

    table {
        height: 100%;
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;

        thead {
            tr {
                th {
                    height: 59px;
                    border-bottom: 1px solid #d0d0d0;
                    padding: 7px 20px 7px 7px;
                    position: sticky;
                    background-color: #ffffff;
                    top: 0;
            }
        }
    }
}

<cdk-virtual-scroll-viewport #scrollViewport itemSize="59" (scrolledIndexChange)="scrollIndexChanged($event)">

        Header 1
        Header 2

...

</cdk-virtual-scroll-viewport>

@ViewChild(CdkVirtualScrollViewport)
public viewPort: CdkVirtualScrollViewport;

public get inverseTranslation(): string {
    if (!this.viewPort || !this.viewPort["_renderedContentTransform"]) {
        return "translateY(0px)";
    }
    return this.viewPort["_renderedContentTransform"].replace(/translateY\((\d+)px\)/, "translateY(-$1px)");
}

That gets rid of the weird effects, but only until you scrolled down for a while. Not sure what I'm doing wrong and if that's even a problem I could solve. I'm not too familiar with sticky positions, it's still sometimes a mystery how that works exactly.

The problem with the solution you posted is that you're using style.transform. A position: sticky evaluates to a position: fixed once you hit the part where it would scroll, and that doesn't work right with a transformation.
Instead use style.top and set it to the inverse number of pixels, similar to what you're doing now.

The inverseTranslation method will be call on every view check, maybe it is not ideal regarding performances.
The CdkVirtualScrollViewport has a ScrollStrategy private property offering a onRenderedOffsetChanged method we can use to update the header position:

        Header 1
        Header 2

    headerTop = '0px';

    ngAfterViewInit(): void {
        if (!!this.viewPort) {
            this.viewPort['_scrollStrategy'].onRenderedOffsetChanged = () =>
                (this.headerTop = `-${this.viewPort.getOffsetToRenderedContentStart()}px`);
        }
    }

Dynamic sticky items with correct placement:
https://stackblitz.com/edit/angular-ivy-vuaf5b?file=src/app/app.component.html
(css vars need angular 10+)
Haven't figured out yet how to prevent it from being cleared too early from the viewport though.

Hello there,
I came across a similar issue and used the useful advices from this thread (thanks very much for sharing btw !!!).
However, this doesn't work if your table is handled with an *ngIf directive. The sticky headers workaround gets broke if the table is removed from the dom, the @ViewChild  assignments "gets lost".
My workaround was to use a setter instead of a variable, in my component :
/** Instead of using a variable, use a setter */
@ViewChild('tableViewPort') private set tableViewPortContent(tbvp: CdkVirtualScrollViewport) {
    this.tableViewPort = tbvp;
    if (this.tableViewPort) {
      this.initiateStickyHeaders();
    }
  }

  public ITEM_SIZE = 50;
  public offset: number;
  private tableViewPort: CdkVirtualScrollViewport;
  private tableSubscribers: any = {};

[...]

public ngOnInit(): void {}

public ngOnChanges(): void {}

public ngOnDestroy(): void {
    this.tableSubscribers.forEach((sub: any) => {
      sub?.unsubscribe();
    });
}

private initiateStickyHeaders(): void {
    /** Remove previous possible existing subscriber for cleanup */
    _.forEach(this.tableSubscribers, (sub: any) => {
      sub?.unsubscribe();
    });

    let subsc = this.tableViewPort?.scrolledIndexChange
      .pipe(
        map(() => this.tableViewPort?.getOffsetToRenderedContentStart() * -1),
        distinctUntilChanged(),
      )
      .subscribe((offset) => {
        this.offset = offset;
      });
    this.tableSubscribers.scrolledIndexChange = subsc;

    subsc = this.tableViewPort?.renderedRangeStream?.subscribe((range) => {
      this.offset = range.start * -this.ITEM_SIZE;
    });
    this.tableSubscribers.renderedRangeStream = subsc;
}

In my template :
<cdk-virtual-scroll-viewport #tableViewPort id="emloyee-table" [style.height.px]="600" [itemSize]="ITEM_SIZE" matSort (matSortChange)="sortContent($event)">

          <ng-container *ngFor="let header of headers" [matColumnDef]="header">

              {{header}}

             {{emp[header]}}
          </ng-container>

          <ng-template let-row matRowDef cdkVirtualFor [matRowDefColumns]="headers" [cdkVirtualForOf]="getPagedEmployeesList()">

          </ng-template>

</cdk-virtual-scroll-viewport>

Here is my solution using a directive. It uses the MutationObserver api to detect attributes changes on the scroll view port wrapper and then update the header top position.
directive:
import { Directive, ElementRef, OnDestroy, OnInit } from '@angular/core';

const TRANSLATE_Y_REGEX = /translateY\((\d+)px\)/;

const MUTATION_ATTRIBUTES_TYPE: MutationRecordType = 'attributes';

@Directive({
  selector: '[appTableStickyHeader]',
})
export class TableStickyHeaderDirective implements OnInit, OnDestroy {

  private translateYObserver: MutationObserver;

  constructor(
    private readonly virtualScrollViewPort: ElementRef,
  ) {
  }

  ngOnInit() {
    this.initStickHeader();
  }

  ngOnDestroy() {
    if (this.translateYObserver) {
      this.translateYObserver.disconnect();
    }
  }

  private initStickHeader() {
    const contentWrapper = this.virtualScrollViewPort.nativeElement.firstChild;
    const tableHeader = this.virtualScrollViewPort.nativeElement.querySelector('thead');

    this.translateYObserver = new MutationObserver((mutations =>
      this.onMutationsChange(mutations, contentWrapper, tableHeader)),
    );
    this.translateYObserver.observe(contentWrapper, {
      attributes: true,
    });
  }

  private onMutationsChange(mutations: MutationRecord[], contentWrapper: HTMLElement, tableHeader: HTMLElement) {
    mutations
      .filter(it => it.type === MUTATION_ATTRIBUTES_TYPE)
      .forEach(() => this.setHeaderTopPosition(contentWrapper, tableHeader));
  }

  private setHeaderTopPosition(contentWrapper: HTMLElement, tableHeader: HTMLElement) {
    const match = contentWrapper.style.transform.match(TRANSLATE_Y_REGEX);
    if (!match) {
      return;
    }

    const translate = parseInt(match[1]);
    tableHeader.style.top = `-${translate}px`;
  }
}

css:
thead {
  position: sticky;
}

Once #24394 is released (I guess 14.1), it is possible to have sticky elements before the scroll-viewport but within the scrolling element (adopted from the dev-app):

Content before virtual scrolling items

  <cdk-virtual-scroll-viewport itemSize="50">

      Item #{{i}} - ({{size}}px)

  </cdk-virtual-scroll-viewport>

Content after virtual scrolling items

So with this it should be possible to implement sticky headers.
However, using position:; sticky on items within the scroll-viewport is still not working. I guess this cannot be simply fixed within the cdk, but at least it could provide developers a better way to deal with it. As described above, the translate value needs to be compensated in top: ?.
@mmalerba what do you think about this approach: Exposing the current translate value as a css variable. Doing this would allow developers to make elements sticky like this, without the need of any additional js:
.sticky-element {
  position: sticky;
  top: calc(<wanted-top-value> + var(--cdk-scrolling-offset))
}

That's an interesting idea. Let me add it to our agenda for team discussion since we don't currently have any APIs like this

Hi @spike-rabbit, I had a chance to discuss this with the team. In general we're not opposed to this type of API in situations where it makes sense. Folks did have a couple of concerns:

We're not sure if there would  be performance implications of constantly updating a CSS variable. We'd need to do some testing to see if it causes some kind of style thrashing
There was some concern that sticky items may have bigger issues than just the positioning, i.e. if the item scrolls out of range it could be removed from the DOM completely. This wouldn't be a concern using the virtual scroll in append only mode, but in that case the position should be trivial anyways.

I do see that a lot of the requests here have to do with making sticky header elements that are not virtualized items, but just persistent elements that appear within the scrolling element. I guess I'm curious what the reason for putting these headers inside the scrolling element is. Why not just have them outside so they're naturally "sticky"? (Sorry if I'm just missing something obvious)

Header

<cdk-virtual-scroll-viewport>

Item

</cdk-virtual-scroll-viewport>

If there's a good motivation for needing them to be inside the scrolling element, and the performance concerns turn out to not be an issue, I could see adding this.

@mmalerba I poorly reimplemented a use case that I have: https://stackblitz.com/edit/angular-ujjkis. In the real life application, there are much more items so that we needed to virtualize scrolling.
What I am trying to show there is, that sticky elements can be used in larger items that are scrolled, if they have some kind of title or other meta information that should be visible while the item is in the viewport.
Regarding your concerns:

We have a custom virtual scrolling component using css variables running in production for a few years already. There are at least no obvious performance issues. To be honest, the application is only used on desktop computers and I never did actual performance tests.
Based on my experiences, using sticky items works pretty well. It's ok, that the item is removed from the DOM when out of the viewport. The sticky element is not visible at that time anyway.

I hope this is understandable. Unfortunately, I cannot share the link to the real application as it is located in our Intranet.

Ah ok, that seems like a reasonable use case. I wasn't thinking about a single item possibly being bigger than the viewport. I think we would probably be fine adding a CSS variable then. The next step would just be to do some quick testing to see if setting the variable somehow impacts performance

Hi @spike-rabbit, I had a chance to discuss this with the team. In general we're not opposed to this type of API in situations where it makes sense. Folks did have a couple of concerns:
1. We're not sure if there would  be performance implications of constantly updating a CSS variable. We'd need to do some testing to see if it causes some kind of style thrashing

2. There was some concern that sticky items may have bigger issues than just the positioning, i.e. if the item scrolls out of range it could be removed from the DOM completely. This wouldn't be a concern using the virtual scroll in append only mode, but in that case the position should be trivial anyways.

I do see that a lot of the requests here have to do with making sticky header elements that are not virtualized items, but just persistent elements that appear within the scrolling element. I guess I'm curious what the reason for putting these headers inside the scrolling element is. Why not just have them outside so they're naturally "sticky"? (Sorry if I'm just missing something obvious)

Header

<cdk-virtual-scroll-viewport>

Item

</cdk-virtual-scroll-viewport>

If there's a good motivation for needing them to be inside the scrolling element, and the performance concerns turn out to not be an issue, I could see adding this.

The reason this gets cited a lot is because specifically tables tend to misbehave frequently if you insert things that don't belong there. Addtionally, they make it quite trivial to have the header columns the same width as the body columns without forcing the width.

@mmalerba so how do we proceed here? Shall I create a pull request, and you do the performance testing?

@spike-rabbit sure, if you send me a PR I can look into how to test the performance

Once #24394 is released (I guess 14.1), it is possible to have sticky elements before the scroll-viewport but within the scrolling element (adopted from the dev-app):

Content before virtual scrolling items

  <cdk-virtual-scroll-viewport itemSize="50">

      Item #{{i}} - ({{size}}px)

  </cdk-virtual-scroll-viewport>

Content after virtual scrolling items

As you have mentioned, this only works for non-table elements. Since the th element in the thead needs to be sticky, the cdk-virtual-scroll-viewport must be placed inside a table which does not work:

        Header

      <cdk-virtual-scroll-viewport itemSize="50">

          Row data

      </cdk-virtual-scroll-viewport>

Once #24394 is released (I guess 14.1), it is possible to have sticky elements before the scroll-viewport but within the scrolling element (adopted from the dev-app):

Content before virtual scrolling items

  <cdk-virtual-scroll-viewport itemSize="50">

      Item #{{i}} - ({{size}}px)

  </cdk-virtual-scroll-viewport>

Content after virtual scrolling items

As you have mentioned, this only works for non-table elements. Since the th element in the thead needs to be sticky, the cdk-virtual-scroll-viewport must be placed inside a table which does not work:

        Header

      <cdk-virtual-scroll-viewport itemSize="50">

          Row data

      </cdk-virtual-scroll-viewport>

Have you ever considered making this a directive instead? Most of its logic could be the same, but instead of manipulating the DOM directly, the directive would provide (in addition to the other values) two "spacing" values. One that represents an offset from the top, and another one from the bottom.
Using these values, the user could offset the elements appropriately. Take a look at a non-Angular example. This solution only refreshes the table on scroll finish event, however, the idea is the same. When the viewport items needs to be refreshed, the first and last "imaginary" row height is updated accordingly.

Hey, is there any news on this? Are there plans to allow sticky elements to work inside a table?

i found somewhat a clean solution, it has it's own caveat though the headers do flicker, but that is just about it
private applyTableStickyHeaderFix(): void {
const offset = this.cdkVirtualScrollViewport.measureScrollOffset('top');
this.cdkVirtualScrollViewport.scrollToOffset(offset - 96);
asapScheduler.schedule(() => this.cdkVirtualScrollViewport.scrollToOffset(offset), 1);
}

Hi all, has anyone found a solution for this without any header flicker?

I'm also searching for a solution, can it be fixed?
Thanks!

+1

+1

More than 4 years have passed since the opening of the issue, and the solution has not appeared. It is sad.

I managed to make it work. Not perfect, but it works.
`this.viewport.scrolledIndexChange.subscribe(() => {
const el = this.viewport.elementRef.nativeElement.getElementsByClassName('cdk-virtual-scroll-content-wrapper') as HTMLCollectionOf;
  if (el.length > 0 && el[0].style.transform) {
    const headerCells = this.viewport.elementRef.nativeElement.getElementsByClassName('mat-header-cell') as HTMLCollectionOf<HTMLElement>;
    const translateY = el[0].style.transform.replace('translateY(', '').slice(0, -1);

    for (let i = 0; i < headerCells.length; i++) {
      if (headerCells[i].style.top !== ('-' + translateY)) {
        headerCells[i].style.top = '-' + translateY;
      }
    }
  }
});`

you can also check my workaround, a directive
import { CdkVirtualScrollViewport } from "@angular/cdk/scrolling";
import { AfterViewInit, Directive, OnDestroy, } from "@angular/core";
import { Subject, tap, takeUntil } from "rxjs";

@Directive({
  selector: "cdk-virtual-scroll-viewport[tableStickyHeader]"
})
export class CdkTableStickyHeaderDirective implements AfterViewInit, OnDestroy {
  private _destroy$: Subject<void>;

  constructor(
    private host: CdkVirtualScrollViewport,
  ) {
    this._destroy$ = new Subject();
  }

  ngAfterViewInit(): void {
    const header = this._getTableHeader();
    const contentWrapper = this._getContentWrapper();

    if (!header || !contentWrapper) return;

    this.host.scrolledIndexChange.pipe(
      tap(_ => {
        const headerTranslateY = getComputedStyle(contentWrapper!).getPropertyValue('transform')
        const translate = headerTranslateY.replace(/[^0-9\-.,]/g, '').split(',')[5].trim();

        header.style.top = `-${translate}px`;
      }),
      takeUntil(this._destroy$),
    ).subscribe()
  }

  ngOnDestroy(): void {
    this._destroy$.next();
    this._destroy$.complete();
  }

  private _getContentWrapper(): HTMLElement | null {
    return this.host.elementRef.nativeElement.querySelector(".cdk-virtual-scroll-content-wrapper");
  }

  private _getTableHeader(): HTMLElement | null {
    return this.host.elementRef.nativeElement.querySelector("thead");
  }
}

my implementation, may help u
import { AfterViewInit, Directive, OnDestroy, } from "@angular/core";
import { Subject, takeUntil, tap } from "rxjs";

// 4 year old issue)
// https://github.com/angular/components/issues/14833
@Directive({
  // eslint-disable-next-line @angular-eslint/directive-selector
  selector: "cdk-virtual-scroll-viewport[tableStickyHeader]"
})
export class CdkTableStickyHeaderDirective implements AfterViewInit, OnDestroy {
  private _destroy$: Subject<void>;

  constructor(
    private host: CdkVirtualScrollViewport,
  ) {
    this._destroy$ = new Subject();
  }

  ngAfterViewInit(): void {
    const header = this._getTableHeader();
    const contentWrapper = this._getContentWrapper();

    if (!header || !contentWrapper) return;

    this._stickyHeader(header);

    this.host.scrolledIndexChange.pipe(
      tap(_ => {
        const headerTranslateY = getComputedStyle(contentWrapper).getPropertyValue('transform')
        const translate = headerTranslateY.replace(/[^0-9\-.,]/g, '').split(',')[5].trim();

        header.style.top = `-${translate}px`;
      }),
      takeUntil(this._destroy$),
    ).subscribe()
  }

  ngOnDestroy(): void {
    this._destroy$.next();
    this._destroy$.complete();
  }

  private _getContentWrapper(): HTMLElement | null {
    return this.host.elementRef.nativeElement.querySelector(".cdk-virtual-scroll-content-wrapper");
  }

  private _getTableHeader(): HTMLElement | null {
    return this.host.elementRef.nativeElement.querySelector("thead");
  }

  private _stickyHeader(header: HTMLElement): void {
    header.style.position = "sticky";
    header.style.top = "0";
    header.style.zIndex = "1000";
  }
}```

Good afternoon devs, developer here in Brazil, still no plausible solution for this header problem with CdkVirtualScroll?
I have this structure:
<cdk-virtual-scroll-viewport
    #tableVirtualScroll
    [itemSize]="itemSize"
    [style.height.px]="heightTableContainer"
    [minBufferPx]="heightTableContainer < 100 ? 100 : heightTableContainer"
    [maxBufferPx]="heightTableContainer < 200 ? 200 : heightTableContainer"
  >

              <po-checkbox
                name="selectAll"
                *ngIf="!hideSelectAll"
                (p-change)="selectAllRows()"
                [p-checkboxValue]="selectAll === null ? 'mixed' : selectAll"
              ></po-checkbox>

but I don't find a solution... :/

@artem-galas https://stackblitz.com/edit/components-issue-t3xvyz That works for my use case.

based on that, i found working clean solution.
inverseOfTranslation (viewportOffsetNumber below) should be equal to the next (-1) * offset number, while scrolling.
how to achieve that?
`
<cdk-virtual-scroll-viewport itemSize=[your item size] >

Column 1
Column 2

{{row.col1}}
{{row.col2}}

`
ngAfterViewInit(): void {     this.viewport.renderedRangeStream.pipe(       tap(range => {         this.viewportOffsetNumber = -${[virtualItemSize] * range.start}px;       })     ).subscribe();  }

@artem-galas https://stackblitz.com/edit/components-issue-t3xvyz That works for my use case.

based on that, i found working clean solution.
inverseOfTranslation (viewportOffsetNumber below) should be equal to the next (-1) * offset number, while scrolling.
how to achieve that?
  <cdk-virtual-scroll-viewport itemSize=[your item size] >

          Column 1
          Column 2

          {{row.col1}}
          {{row.col2}}

  </cdk-virtual-scroll-viewport>

ngAfterViewInit(): void {
  this.viewport.renderedRangeStream.pipe(
    tap(range => {
      this.viewportOffsetNumber = `-${[virtualItemSize] * range.start}px`;
    })
  ).subscribe();
}

@artem-galas https://stackblitz.com/edit/components-issue-t3xvyz That works for my use case.

based on that, i found working clean solution. inverseOfTranslation (viewportOffsetNumber below) should be equal to the next (-1) * offset number, while scrolling. how to achieve that?
  <cdk-virtual-scroll-viewport [itemSize]=[virtualItemSize]>

          Column 1
          Column 2

          {{row.col1}}
          {{row.col2}}

  </cdk-virtual-scroll-viewport>

ngAfterViewInit(): void {
  this.viewport.renderedRangeStream.pipe(
    tap(range => {
      this.viewportOffsetNumber = `-${this.virtualItemSize * range.start}px`;
    })
  ).subscribe();
}

Worked for me although not when you do a responsive table for horizontal scroll(more this is a cdk virtual scrolling issue imo)

@artem-galas https://stackblitz.com/edit/components-issue-t3xvyz That works for my use case.

You are best!
I've resolved my issue

I have fixed above issue by adding new class in the tr mat-header-row tag with class name-“table-row" put below css in the class name-
.table-row {
  position: sticky;
  top: 0;
  z-index: 10;
}


How to detect if road exists at Vector3 position

Is there a function i can pass a vector3 and get a boolean back that tells me if there's a road there?
Like:
if (World.GetRoadAt(pos)) {
     // Do something...
}

PATHFIND::IS_POINT_ON_ROAD

Thanks! :3

Is there a way to detect if the point is water/land? Disregarding whether it's a road or not. Just land or water?

I don't think there's one specific method for that, but check this thread out:
http://gtaforums.com/topic/843561-pathfind-node-types/#entry1068754458

You may also want to look at WATER::GET_WATER_HEIGHT.
Also, please consider using our Gitter-Channel for scripting questions, since issues should be primarily used for bugs/features requests :wink:

@JohnnyCrazy Thanks man, also the link does not work but I would totally go over there to ask questions! Thanks for being so nice @Nacorpio @JohnnyCrazy .

Sorry, should be fixed now @sollaholla

@JohnnyCrazy Thanks a lot man! I'll just close this, and head over there.


Expression.py replicate detection

Currently Expression.py detects if a data set has replicates by look at the size of the smallest group. This means that in the situation of "partial replication", data is detected as replicated. However, the DESeq manual suggests treating partially replicated data as if it were replicated (using pooled variance estimation shares information across conditions anyway, so the replicated condition benefits form the the replicates in the other condition).
I suggest the following line in Expression.py:
 min_per_group = R('''min(table(groups)) ''')[0]

has_replicates = min_per_group >= 2

become:
 max_per_group = R('''max(table(groups)) ''')[0]

 has_replicates = max_per_group >= 2

Another alternative would be to return one of three values: Unreplicated, partially replicated or replicated and deal with each case seperately (for eg enforcing pooled variance estimation), but this is probably unneccsary and the risks inherent in partially replicated data can be left to the user.
Also when dispersion method is 'blind', Expressoin.py fails because it tries to plot dispersion estimates assuming that there are multiple dispersion estimates because it only checks that mode isn't "pooled".
The gulity lines are:

 if dispersion_method == "pooled":
        R.png('''%sdispersion_estimates_pooled.png''' %
              (outfile_prefix))
        R.plotDispEsts(cds)
        R['dev.off']()
    else:
        dispersions = R('''ls(cds@fitInfo)''')
        for dispersion in dispersions:
            R.png('%sdispersion_estimates_%s.png' %
                  (outfile_prefix, dispersion))
        R.plotDispEsts(cds, name=dispersion)
        R['dev.off']()

This fails as if dispersion_method == "blind" then dispersions is empty.
I have a pull reqiuest ready for the first issue if the change is agreed.

I assume this issue can be closed, if not please reopen.


Introduces several enhancements

This adds several enhancements:

Updates the README.md
Updates the config path where the shogun file is expected
Refactors the EntityTable action config
Replaces the custom ApplicationTable with the EntityTable
Introduces the DisplayField and JSONEditor and uses them in the ApplicationEditForm (see below)
Adds some minor styling improvements to the Form

@terrestris/devs please review

I merge it now and fix a typo in the followup


How do I put my username

I have no idea how to log in, or where is the config file. THanks for the help

@rodrigo081089 are you familiar with command line tools in general? there's help text in the tool itself, and the docs show example usage

Thanks, I did it. Is anyway to search a library instead of a series or movie name?

@rodrigo081089 there's currently no way to limit what libraries are searched.

Sorry, I meant get all the links from one library or all links on a server

@rodrigo081089 no, I had never considered such a feature. What is your use case?

I have a pkex share and there is a cartoon library I want to download completily

I'm closing this issue because the thread has wandered away from the original description. I'm keeping it in mind though for whenever I work on this software again.


Cropper / modal initializes poorly - Firefox

When I launch my cropper model in Firefox, it resizes the initial image, which is very ugly.
Both Safari and Chrome don't do this.
Safari / Chrome (good)

Firefox (horrible)

I tried my best to illustrate this issue in jsfiddle, but because jsfiddle doesn't like the image, the cropper never initializes in the first place.. You'll likely have to put this code elsewhere to reproduce it.
http://jsfiddle.net/bs9c8ct5/12/

You might need to set the style like this:
.modal-body img {
  width: 100%;
}

Didn't work unfortunately. I tried many other variations of that, along with .cropper-container as well.

Please follow the existing example: https://github.com/fengyuanchen/cropper/blob/master/examples/cropper-in-modal.html

I did follow that example.. even look at the JSFiddle above.
This issue isn't resolved and shouldn't have been closed.

So, when I open the jsfiddle demo in Firefox 42, everything seems fine.

Requires to set the checkCrossOrigin option to false in order to load the image correctly.

Thanks, setting checkCrossOrigin to false fixed it!
I don't believe the docs mention anything about adding that in though.

Actually scratch that last message.
It only appeared to work in the jsfiddle, because cropper never initializes in the jsfiddle to begin with.
I'll see if i can get it to work in codebin or jsbin.
In the meantime, copying the code exactly from jsfiddle and pasting it elsewhere will show you exactly what my problem is.

Sorry for all the back and forth.
It seems to work in the codepen http://codepen.io/anon/pen/obzvQq so something in my project must be clashing with it. I'll figure it out from here on.
Thanks for all the help!

Alright I've finally come to the conclusion the the problem was coming from me using an svg as the initial image. I'm still not sure why this only happens in firefox, but if I use a png it doesn't happen.. Any ideas?


cdc_acm sample with CONFIG_NO_OPTIMIZATIONS=y crashes on nrf52840 dev board

Compiling and running the cdc_acm sample with -O0 crashes on startup.
Add CONFIG_NO_OPTIMIZATIONS=y to the cdc_acm example and flash it on the nrf52840 dev board and it should print
*** Booting Zephyr OS build v2.4.0-rc1  ***
[00:00:00.005,401] <inf> cdc_acm_echo: Wait for DTR
[00:00:00.009,399] <inf> usb_cdc_acm: Device suspended
[00:00:00.110,107] <inf> usb_cdc_acm: Device resumed
[00:00:00.110,168] <inf> usb_cdc_acm: from suspend
[00:00:00.245,147] <inf> usb_cdc_acm: Device configured
[00:00:01.110,229] <err> os: ***** MPU FAULT *****
[00:00:01.110,229] <err> os:   Instruction Access Violation
[00:00:01.110,260] <err> os: r0/a1:  0x00000000  r1/a2:  0xffffffff  r2/a3:  0xe000ed00
[00:00:01.110,260] <err> os: r3/a4:  0x00000000 r12/ip:  0x00000000 r14/lr:  0x0001f74f
[00:00:01.110,290] <err> os:  xpsr:  0x00000000
[00:00:01.110,290] <err> os: Faulting instruction address (r15/pc): 0x2000276c
[00:00:01.110,321] <err> os: >>> ZEPHYR FATAL ERROR 0: CPU exception on CPU 0
[00:00:01.110,321] <err> os: Current thread: 0x20000390 (unknown)
[00:00:02.356,628] <err> os: Halting system

Tested with

Windows 10
gnuarmemb
Zephyr 2.3.0 and 2.4.0-rc1, same error

This is a known issue, see #19340 for details.
As workaround, you may to increase MAIN_STACK_SIZE to  2048, ISR_STACK_SIZE to 4096, USB_NRFX_WORK_QUEUE_STACK_SIZE to 2048, LOG_PROCESS_THREAD_STACK_SIZE to 4096


[Snyk] Security upgrade alpine from 3.16.2 to 3.16

This PR was automatically created by Snyk using the credentials of a real user.:sparkles: Snyk has automatically assigned this pull request, [set who gets assigned](https://app.snyk.io/org/lordoverlord/project/e1cc8c42-3ce1-48a2-9b6f-077d1915ff3d?utm_source=github&utm_medium=referral&page=fix-pr/settings/integration).
As this is a private repository, Snyk-bot does not have access. Therefore, this PR has been created automatically, but appears to have been created by a real user.
Keeping your Docker base image up-to-date means you’ll benefit from security fixes in the latest version of your chosen image.
Changes included in this PR

Dockerfile

We recommend upgrading to alpine:3.16, as this image has only 0 known vulnerabilities. To do this, merge this pull request, then verify your application still works as expected.
Some of the most important vulnerabilities in your base image include:

Severity
Priority Score / 1000
Issue
Exploit Maturity

221
CVE-2022-4304 SNYK-ALPINE316-OPENSSL-3314623
No Known Exploit

317
CVE-2022-4450 SNYK-ALPINE316-OPENSSL-3314624
No Known Exploit

317
CVE-2022-4450 SNYK-ALPINE316-OPENSSL-3314624
No Known Exploit

221
CVE-2023-0286 SNYK-ALPINE316-OPENSSL-3314641
No Known Exploit

221
CVE-2023-0215 SNYK-ALPINE316-OPENSSL-3314643
No Known Exploit

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.
For more information:
🧐 View latest project report
🛠 Adjust project settings

Learn how to fix vulnerabilities with free interactive lessons:
🦉 Learn about vulnerability in an interactive lesson of Snyk Learn.

Superseeded by updating alpine to 3.17.2


Will implement Clone and Debug trait for Database struct like mongodb crate?

Hi, any suggestion about this? Otherwise can't pass Database struct through state using axum.

Good advice! Will add this.


Updates in the Backend Code

Related Issue #12
Closes #12

Description

Made the updates in the backend code -

Changed the require type to import
Made the changes, so that after the deployment no previous repos should get lost

Checklist

[x] My code adheres to the established style guidelines of the project.
[  ] I have included comments in areas that may be difficult to understand.
[x] My changes have not introduced any new warnings.
[x] I have conducted a self-review of my code.

Also , I want to know that, whenever I put any repo name it shows me this


Update instructions for MacOS; homebrew installs LLVM 10 now

I think you need to rebase on master to get the fix to that cargo-audit test failure


Restart of VS Code is required to reset the preview with the current shader file.

Restart of VS Code is required to reset the preview with the current shader file.
If I open the shader preview with a working shader (no errors), it's not possible to open another glsl-file for the preview. The preview still shows the first shader.
Reproduce:

Open a glsl-file.
Show preview tab.
Change the file / Switch to another file.

Result: The preview does not switch to the selected file. Also after closing the tab and reopen with command. It does only work if I restart VS Code.
Summary, the preview does only work for the first previewed file.
Extension Version: 0.8.3
Version: 1.33.1 (user setup)
Commit: 51b0b28134d51361cf996d2f0a1c698247aeabd8
Date: 2019-04-11T08:27:14.102Z
Electron: 3.1.6
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 10.0.17763

Can you check your settings and see if "shader-toy.reloadOnEditTextDelay" is set to "false" . In the GUI for settings you will find this under Extensions->Shader-Toy->Reload On Change Editor.
If it is set to false, try setting it to true and see if at least half of your problem. I will check if I can reproduce the issue regarding re-running the command.

The option "Reload On Change Editor" should be set to true. Thanks for the hint.
Maybe this option should by default set to true?
"shader-toy.reloadOnChangeEditor": true

Possibly the option should be set to true, we can think about that for the next release.
Reopening because the issue of not being able to load another file explicitly still exists.

I'm not sure I know what you mean.

If you close the text-editor-tab and reopen it, the content of your shader would not change, so the preview should not need to reload.
If you close the preview-tab and reopen it via the command, then the corresponding shader of your active editor should be previewed.
If you rerun the command, irrespective of the current previewed shader, then the corresponding shader of your active editor should be previewed.

That's the behavior I would expect and consider reasonable UX. The fact that points 2 and 3 are not functional r/n is a bug, hence I reopened the issue.
Are we talking about the same issue then?

Should be fixed by #48


(PUP-9295) Update sensitive beaker test to expect success

Cases 4 and 5 in the sensitive language beaker test failed because the notify
resource no longer emits the clear text message for sensitive values. Update
the test to expect success.

Verified using:
$ bx rake ci:test:aio BEAKER_HOSTS=redhat7-64m-debian9-64a SHA=7d8748d31620db50dd8e00eabc699c25ab956821 SERVER_VERSION=5.3.10.SNAPSHOT.2019.10.07T1349 TESTS=tests/language/sensitive_data_type.rb OPTIONS='--preserve-hosts=always'


[feature] Adding functions to types for derived data?

I'm somewhat new to react/redux and have been struggling with how to handle "derived data." A trivialized example is given raw data like
let person = {first: 'Bob', last: 'Fish'}

what is the appropriate way to define person.fullName? Or should I just have personUtils.fullName(person)?  It seems if I were to use typed-immutable to define the structure of my data I could also define methods/ property-getters to define derived data.
Good idea/ bad idea?

@thom-nic with Record types you could define Person type like in the example below. Defined records will have all the getters for fields defined:
const Person = Record({first: String, last:String})

const bob = Record({first: 'Bob', last: 'Fish'})

bob.first // => 'Bob'
bob.last // => 'Fish

As of computed field like fullName I personally like to use plain functions:
fullName = ({first, last}) => `${first} ${last}`

I used to put such functions as a static methods of the Record constructor Person.fullName = fullName just for grouping, but I ditched that practice and tend to group functions into modules instead.
You could also define them as methods on the prototype if you like:
const asMethod = f => function(...args) => {f(this, ....args)}
Person.prototype.fullName = asMethod(fullName)

That is sometimes useful if you want a polymorphism behavior, although for that I still tend to use method library or if I don't want pull in extra library then this pattern:
const slice = (value, from, to) => value.constructor[$slice](value, from, to)
$slice = slice.symbol = Symbol.for('mylib/slice')

MyType[slice.symbol] = (myType, from, to) => /*... */
MyOtherType[slice.symbol] = (myOtherType, from, to) => /*... */

I prefer functions because:

I like to keep data separate from operations that can be performed on it. That way all operations are equal no first class second class.
Functions are more convenient for functional compositions and with high order functions like .map
.filter etc...

Ultimately I think it's really just matter of personal preference and does not really matter.

Oh and I don't personally like property getters for computed properties as I think they live an impression of being regular property while under the hood they do run code that may cause side-effects throw exception etc.. I much rather prefer to be able to distinguish computation from property access while reading a code without having to digg into implementations.
P.S. Record do use getters under the hood though, primarily so that they would throw exceptions at you if you try to mutate them and to make assignment possible on .asMutable() API.


improving the design  for the details page

When clicking on the "Edit Quiz" or "Delete Quiz" buttons, the "Yes" and "No" buttons are not properly aligned, and the color of the box blends with the background color of the details page, which negatively impacts the user experience.
allow me to contribute in this issuse!!

hey could you please assign this issue for me ...I am a UI designer also a mern stack developer

@Kheria1509 , assigned!

@Anurag-singh-thakur,
Since this issue was raised by @Kheria1509 , I am assigning the task to him.
If he's unable to complete it, I will let you know.
In the meantime, feel free to explore and work on other issues.

If he's unable to complete it, I will let you know.
In the meantime, feel free to explore and work on other issues.
—
Reply to this email directly, view it on GitHub
https://github.com/vishalverma9572/QuizMaster/issues/129#issuecomment-2414823842,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A7342JRHVPXXXYPG7SFXZTTZ3VTFFAVCNFSM6AAAAABP5ZQJSWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJUHAZDGOBUGI
.
You are receiving this because you were mentioned.Message ID:
@.***>

sorry

@vishalverma9572 , is the issue still open please assign it to me

Yup